@ikonai/sdk 1.0.0 → 1.0.2
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/index.js +672 -841
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _l(t) {
|
|
2
2
|
return t;
|
|
3
3
|
}
|
|
4
4
|
function ue(t) {
|
|
@@ -13,22 +13,22 @@ function ne(t) {
|
|
|
13
13
|
const e = se(t), r = new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
14
14
|
if (e.length < 27)
|
|
15
15
|
throw new Error("Protocol payload too short");
|
|
16
|
-
const n = r.getUint32(0, !0), s = r.getUint32(4, !0), i = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), c = r.getUint32(20, !0), u = r.getUint8(24),
|
|
16
|
+
const n = r.getUint32(0, !0), s = r.getUint32(4, !0), i = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), c = r.getUint32(20, !0), u = r.getUint8(24), f = r.getUint8(25), d = r.getUint8(26);
|
|
17
17
|
if (27 + c * 4 > e.length)
|
|
18
18
|
throw new Error("Protocol header exceeds payload length");
|
|
19
|
-
const
|
|
20
|
-
let
|
|
19
|
+
const E = [];
|
|
20
|
+
let p = 27;
|
|
21
21
|
for (let I = 0; I < c; I++)
|
|
22
|
-
|
|
22
|
+
E.push(r.getUint32(p, !0)), p += 4;
|
|
23
23
|
return {
|
|
24
24
|
length: n,
|
|
25
25
|
opcode: s,
|
|
26
26
|
senderId: i,
|
|
27
27
|
trackId: o,
|
|
28
28
|
sequenceId: a,
|
|
29
|
-
targetIds:
|
|
29
|
+
targetIds: E,
|
|
30
30
|
payloadVersion: u,
|
|
31
|
-
payloadType:
|
|
31
|
+
payloadType: f,
|
|
32
32
|
flags: d
|
|
33
33
|
};
|
|
34
34
|
}
|
|
@@ -43,16 +43,16 @@ function Me(t, e, r) {
|
|
|
43
43
|
const i = 27 + s.targetIds.length * 4;
|
|
44
44
|
return n.subarray(i, s.length);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], u = s?.payloadType ?? 8,
|
|
48
|
-
|
|
49
|
-
let
|
|
46
|
+
function F(t, e, r, n, s) {
|
|
47
|
+
const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], u = s?.payloadType ?? 8, f = 27 + c.length * 4, d = f + e.length, h = new Uint8Array(d), E = new DataView(h.buffer);
|
|
48
|
+
E.setUint32(0, d, !0), E.setUint32(4, t >>> 0, !0), E.setUint32(8, n >>> 0, !0), E.setUint32(12, i >>> 0, !0), E.setUint32(16, o >>> 0, !0), E.setUint32(20, c.length >>> 0, !0), E.setUint8(24, r & 255), E.setUint8(25, u & 255), E.setUint8(26, a & 255);
|
|
49
|
+
let p = 27;
|
|
50
50
|
for (let I = 0; I < c.length; I++)
|
|
51
|
-
|
|
52
|
-
return h.set(e,
|
|
51
|
+
E.setUint32(p, c[I] >>> 0, !0), p += 4;
|
|
52
|
+
return h.set(e, f), h;
|
|
53
53
|
}
|
|
54
|
-
var
|
|
55
|
-
const ht = 161, dt = 162, he = new TextEncoder(),
|
|
54
|
+
var R = /* @__PURE__ */ ((t) => (t[t.Null = 1] = "Null", t[t.Bool = 2] = "Bool", t[t.Int32 = 3] = "Int32", t[t.Int64 = 4] = "Int64", t[t.UInt32 = 5] = "UInt32", t[t.UInt64 = 6] = "UInt64", t[t.Float32 = 7] = "Float32", t[t.Float64 = 8] = "Float64", t[t.Array = 9] = "Array", t[t.Dict = 10] = "Dict", t[t.Object = 11] = "Object", t[t.String = 12] = "String", t[t.Binary = 13] = "Binary", t[t.Guid = 14] = "Guid", t))(R || {});
|
|
55
|
+
const ht = 161, dt = 162, he = new TextEncoder(), xr = new TextDecoder("utf-8", { fatal: !0 });
|
|
56
56
|
class D {
|
|
57
57
|
constructor(e = 1) {
|
|
58
58
|
this.version = e, this.buffer.writeByte(ht), this.buffer.writeVarUInt(e >>> 0);
|
|
@@ -233,12 +233,12 @@ class _e {
|
|
|
233
233
|
}
|
|
234
234
|
ensureElementType(e) {
|
|
235
235
|
if (this.elementType !== e)
|
|
236
|
-
throw new Error(`Array element type is ${
|
|
236
|
+
throw new Error(`Array element type is ${R[this.elementType]}, expected ${R[e]}`);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
class Oe {
|
|
240
240
|
constructor(e, r) {
|
|
241
|
-
this.keyType = e, this.valueType = r,
|
|
241
|
+
this.keyType = e, this.valueType = r, Pe(e);
|
|
242
242
|
}
|
|
243
243
|
payload = new H();
|
|
244
244
|
count = 0;
|
|
@@ -441,11 +441,11 @@ class Vr {
|
|
|
441
441
|
}
|
|
442
442
|
ensureKeyType(e) {
|
|
443
443
|
if (this.keyType !== e)
|
|
444
|
-
throw new Error(`Dictionary key type is ${
|
|
444
|
+
throw new Error(`Dictionary key type is ${R[this.keyType]}, expected ${R[e]}`);
|
|
445
445
|
}
|
|
446
446
|
ensureValueType(e) {
|
|
447
447
|
if (this.valueType !== e)
|
|
448
|
-
throw new Error(`Dictionary value type is ${
|
|
448
|
+
throw new Error(`Dictionary value type is ${R[this.valueType]}, expected ${R[e]}`);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
class z {
|
|
@@ -484,7 +484,7 @@ class z {
|
|
|
484
484
|
return new Wr(e, n, i);
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
class
|
|
487
|
+
class P {
|
|
488
488
|
constructor(e, r) {
|
|
489
489
|
this.type = e, this.payload = r;
|
|
490
490
|
}
|
|
@@ -546,7 +546,7 @@ class F {
|
|
|
546
546
|
return this.ensureType(
|
|
547
547
|
12
|
|
548
548
|
/* String */
|
|
549
|
-
),
|
|
549
|
+
), xr.decode(this.payload);
|
|
550
550
|
}
|
|
551
551
|
asGuid() {
|
|
552
552
|
return this.ensureType(
|
|
@@ -574,10 +574,10 @@ class F {
|
|
|
574
574
|
}
|
|
575
575
|
ensureType(e) {
|
|
576
576
|
if (this.type !== e)
|
|
577
|
-
throw new Error(`Teleport value has type ${
|
|
577
|
+
throw new Error(`Teleport value has type ${R[this.type]}, expected ${R[e]}`);
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
|
-
class Wr extends
|
|
580
|
+
class Wr extends P {
|
|
581
581
|
constructor(e, r, n) {
|
|
582
582
|
super(r, n), this.fieldId = e;
|
|
583
583
|
}
|
|
@@ -625,35 +625,35 @@ class Le {
|
|
|
625
625
|
const e = Y(this.elementType);
|
|
626
626
|
C(this.payload, this.offset, e);
|
|
627
627
|
const r = this.payload.subarray(this.offset, this.offset + e);
|
|
628
|
-
return this.offset += e, new
|
|
628
|
+
return this.offset += e, new q(this.elementType, r);
|
|
629
629
|
}
|
|
630
630
|
case 12:
|
|
631
631
|
case 13: {
|
|
632
632
|
const e = { offset: this.offset }, r = U(this.payload, e, "ArrayMalformed");
|
|
633
633
|
C(this.payload, e.offset, r);
|
|
634
634
|
const n = this.payload.subarray(e.offset, e.offset + r);
|
|
635
|
-
return this.offset = e.offset + r, new
|
|
635
|
+
return this.offset = e.offset + r, new q(this.elementType, n);
|
|
636
636
|
}
|
|
637
637
|
case 11: {
|
|
638
638
|
const e = { offset: this.offset }, r = U(this.payload, e, "ArrayMalformed");
|
|
639
639
|
C(this.payload, e.offset, r);
|
|
640
640
|
const n = this.payload.subarray(e.offset, e.offset + r);
|
|
641
|
-
return this.offset = e.offset + r, new
|
|
641
|
+
return this.offset = e.offset + r, new q(11, n);
|
|
642
642
|
}
|
|
643
643
|
case 9: {
|
|
644
|
-
const e =
|
|
645
|
-
return this.offset += e, new
|
|
644
|
+
const e = Fe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
645
|
+
return this.offset += e, new q(9, r);
|
|
646
646
|
}
|
|
647
647
|
case 10: {
|
|
648
648
|
const e = Be(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
649
|
-
return this.offset += e, new
|
|
649
|
+
return this.offset += e, new q(10, r);
|
|
650
650
|
}
|
|
651
651
|
default:
|
|
652
|
-
throw new Error(`Unsupported array element type ${
|
|
652
|
+
throw new Error(`Unsupported array element type ${R[this.elementType]}`);
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
}
|
|
656
|
-
class
|
|
656
|
+
class q extends P {
|
|
657
657
|
constructor(e, r) {
|
|
658
658
|
super(e, r);
|
|
659
659
|
}
|
|
@@ -670,7 +670,7 @@ class ve {
|
|
|
670
670
|
throw new Error("Dictionary payload too short");
|
|
671
671
|
if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
|
|
672
672
|
throw new Error("Dictionary key/value flags must be zero");
|
|
673
|
-
|
|
673
|
+
Pe(this.keyType);
|
|
674
674
|
const r = { offset: 2 };
|
|
675
675
|
this.count = U(e, r, "DictMalformed"), this.offset = r.offset;
|
|
676
676
|
}
|
|
@@ -691,13 +691,13 @@ class ve {
|
|
|
691
691
|
if (e >= 0) {
|
|
692
692
|
C(this.payload, this.offset, e);
|
|
693
693
|
const r = this.payload.subarray(this.offset, this.offset + e);
|
|
694
|
-
return this.offset += e, new
|
|
694
|
+
return this.offset += e, new P(this.keyType, r);
|
|
695
695
|
}
|
|
696
696
|
if (this.keyType === 12 || this.keyType === 13) {
|
|
697
697
|
const r = { offset: this.offset }, n = U(this.payload, r, "DictMalformed");
|
|
698
698
|
C(this.payload, r.offset, n);
|
|
699
699
|
const s = this.payload.subarray(r.offset, r.offset + n);
|
|
700
|
-
return this.offset = r.offset + n, new
|
|
700
|
+
return this.offset = r.offset + n, new P(this.keyType, s);
|
|
701
701
|
}
|
|
702
702
|
throw new Error("Unsupported dictionary key type");
|
|
703
703
|
}
|
|
@@ -708,21 +708,21 @@ class ve {
|
|
|
708
708
|
const e = { offset: this.offset }, r = U(this.payload, e, "DictMalformed");
|
|
709
709
|
C(this.payload, e.offset, r);
|
|
710
710
|
const n = this.payload.subarray(e.offset, e.offset + r);
|
|
711
|
-
return this.offset = e.offset + r, new
|
|
711
|
+
return this.offset = e.offset + r, new P(this.valueType, n);
|
|
712
712
|
}
|
|
713
713
|
case 11: {
|
|
714
714
|
const e = { offset: this.offset }, r = U(this.payload, e, "DictMalformed");
|
|
715
715
|
C(this.payload, e.offset, r);
|
|
716
716
|
const n = this.payload.subarray(e.offset, e.offset + r);
|
|
717
|
-
return this.offset = e.offset + r, new
|
|
717
|
+
return this.offset = e.offset + r, new P(11, n);
|
|
718
718
|
}
|
|
719
719
|
case 9: {
|
|
720
|
-
const e =
|
|
721
|
-
return this.offset += e, new
|
|
720
|
+
const e = Fe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
721
|
+
return this.offset += e, new P(9, r);
|
|
722
722
|
}
|
|
723
723
|
case 10: {
|
|
724
724
|
const e = Be(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
725
|
-
return this.offset += e, new
|
|
725
|
+
return this.offset += e, new P(10, r);
|
|
726
726
|
}
|
|
727
727
|
case 3:
|
|
728
728
|
case 5:
|
|
@@ -736,10 +736,10 @@ class ve {
|
|
|
736
736
|
const e = Y(this.valueType);
|
|
737
737
|
C(this.payload, this.offset, e);
|
|
738
738
|
const r = this.payload.subarray(this.offset, this.offset + e);
|
|
739
|
-
return this.offset += e, new
|
|
739
|
+
return this.offset += e, new P(this.valueType, r);
|
|
740
740
|
}
|
|
741
741
|
default:
|
|
742
|
-
throw new Error(`Unsupported dictionary value type ${
|
|
742
|
+
throw new Error(`Unsupported dictionary value type ${R[this.valueType]}`);
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
}
|
|
@@ -917,7 +917,7 @@ function Y(t) {
|
|
|
917
917
|
return -1;
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function Pe(t) {
|
|
921
921
|
if (t === 9 || t === 11 || t === 10 || t === 1)
|
|
922
922
|
throw new Error("Dictionary keys must be primitive Teleport types");
|
|
923
923
|
}
|
|
@@ -928,7 +928,7 @@ function C(t, e, r) {
|
|
|
928
928
|
function Yr(t, e) {
|
|
929
929
|
return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function Fe(t, e) {
|
|
932
932
|
if (e >= t.length)
|
|
933
933
|
throw new Error("Array payload exceeds bounds");
|
|
934
934
|
const r = t[e], n = r >> 4 & 15;
|
|
@@ -950,7 +950,7 @@ function Be(t, e) {
|
|
|
950
950
|
const r = t[e] >> 4 & 15, n = t[e + 1] >> 4 & 15;
|
|
951
951
|
if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
|
|
952
952
|
throw new Error("Dictionary key/value flags must be zero");
|
|
953
|
-
|
|
953
|
+
Pe(r);
|
|
954
954
|
const s = { offset: e + 2 }, i = U(t, s, "DictMalformed");
|
|
955
955
|
let o = s.offset;
|
|
956
956
|
for (let a = 0; a < i; a++)
|
|
@@ -972,11 +972,11 @@ function ye(t, e, r, n) {
|
|
|
972
972
|
return C(e, i.offset, o), i.offset + o;
|
|
973
973
|
}
|
|
974
974
|
case 9:
|
|
975
|
-
return r +
|
|
975
|
+
return r + Fe(e, r);
|
|
976
976
|
case 10:
|
|
977
977
|
return r + Be(e, r);
|
|
978
978
|
default:
|
|
979
|
-
throw new Error(`Unsupported Teleport type ${
|
|
979
|
+
throw new Error(`Unsupported Teleport type ${R[t]}`);
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
982
|
function ze(t) {
|
|
@@ -985,36 +985,36 @@ function ze(t) {
|
|
|
985
985
|
function se(t) {
|
|
986
986
|
return t instanceof Uint8Array ? t : new Uint8Array(t);
|
|
987
987
|
}
|
|
988
|
-
var ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ft || {}), X = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(X || {}), J = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(J || {}), k = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(k || {}), Q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(Q || {}), pt = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(pt || {}), q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(q || {}), Et = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(Et || {}), xe = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(xe || {}), T = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(T || {});
|
|
989
|
-
const
|
|
988
|
+
var ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ft || {}), X = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(X || {}), J = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(J || {}), k = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(k || {}), Q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(Q || {}), Et = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(Et || {}), Z = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Z || {}), pt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(pt || {}), Ge = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(Ge || {}), S = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(S || {});
|
|
989
|
+
const It = 1, jr = 1048637, zr = 727023925, Xr = 3395085689;
|
|
990
990
|
function Jr(t) {
|
|
991
|
-
const e = new D(
|
|
991
|
+
const e = new D(It);
|
|
992
992
|
return Qr(t, e), e.finish();
|
|
993
993
|
}
|
|
994
994
|
function Qr(t, e) {
|
|
995
995
|
e.writeGuidField(zr, t.ActionId), e.writeStringField(Xr, t.PayloadJson);
|
|
996
996
|
}
|
|
997
|
-
function
|
|
997
|
+
function Zr(t, e, r) {
|
|
998
998
|
const n = Jr(t);
|
|
999
|
-
return
|
|
999
|
+
return F(jr, n, It, e, r);
|
|
1000
1000
|
}
|
|
1001
|
-
const
|
|
1001
|
+
const qr = 467348717, en = 972460562, tn = 1911490601, rn = 2603556958, nn = 3609695522, sn = 4094837378, on = 4257460908;
|
|
1002
1002
|
function an(t) {
|
|
1003
1003
|
const e = {};
|
|
1004
|
-
return
|
|
1004
|
+
return mt(e), e;
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function mt(t) {
|
|
1007
1007
|
return t.ParameterIndex = 0, t.TypeName = "", t.ValueJson = "", t.ValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.EnumerationId = m.fromBytes(new Uint8Array(16)), t;
|
|
1008
1008
|
}
|
|
1009
1009
|
function cn(t, e) {
|
|
1010
1010
|
const r = e ?? an();
|
|
1011
|
-
return
|
|
1011
|
+
return mt(r), ln(t, r), r;
|
|
1012
1012
|
}
|
|
1013
1013
|
function ln(t, e) {
|
|
1014
1014
|
let r;
|
|
1015
1015
|
for (; (r = t.next()) !== null; )
|
|
1016
1016
|
switch (r.fieldId) {
|
|
1017
|
-
case
|
|
1017
|
+
case qr: {
|
|
1018
1018
|
if (r.isNull) throw new Error();
|
|
1019
1019
|
e.EnumerationId = r.asGuid();
|
|
1020
1020
|
break;
|
|
@@ -1051,7 +1051,7 @@ function ln(t, e) {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
1053
|
}
|
|
1054
|
-
const un = 265814330, hn = 1368629611, dn = 2431514951, fn = 2914494629,
|
|
1054
|
+
const un = 265814330, hn = 1368629611, dn = 2431514951, fn = 2914494629, En = 3284746250, pn = 4101844078;
|
|
1055
1055
|
function _t(t) {
|
|
1056
1056
|
const e = {};
|
|
1057
1057
|
return Tt(e), e;
|
|
@@ -1059,11 +1059,11 @@ function _t(t) {
|
|
|
1059
1059
|
function Tt(t) {
|
|
1060
1060
|
return t.Description = "", t.Codec = ft.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t.ShapeSets = void 0, t;
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1062
|
+
function In(t, e) {
|
|
1063
1063
|
const r = e ?? _t();
|
|
1064
|
-
return Tt(r),
|
|
1064
|
+
return Tt(r), mn(t, r), r;
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function mn(t, e) {
|
|
1067
1067
|
let r;
|
|
1068
1068
|
for (; (r = t.next()) !== null; )
|
|
1069
1069
|
switch (r.fieldId) {
|
|
@@ -1090,12 +1090,12 @@ function In(t, e) {
|
|
|
1090
1090
|
e.BitDepth = r.asInt32();
|
|
1091
1091
|
break;
|
|
1092
1092
|
}
|
|
1093
|
-
case
|
|
1093
|
+
case En: {
|
|
1094
1094
|
if (r.isNull) throw new Error();
|
|
1095
1095
|
e.Codec = r.asInt32();
|
|
1096
1096
|
break;
|
|
1097
1097
|
}
|
|
1098
|
-
case
|
|
1098
|
+
case pn: {
|
|
1099
1099
|
if (r.isNull) throw new Error();
|
|
1100
1100
|
e.SampleRate = r.asInt32();
|
|
1101
1101
|
break;
|
|
@@ -1149,13 +1149,13 @@ function gn(t) {
|
|
|
1149
1149
|
e.push(r.asString());
|
|
1150
1150
|
return e;
|
|
1151
1151
|
}
|
|
1152
|
-
const Cn = 76337612,
|
|
1152
|
+
const Cn = 76337612, Rn = 185396121, bn = 388632637, kn = 417197284, Un = 469070965, Dn = 470595159, Mn = 781727218, On = 834078886, Ln = 1043273762, vn = 1236999138, Pn = 1368629611, Fn = 1715899485, Bn = 1942830531, Gn = 1999510636, xn = 2079864626, Vn = 2142346422, Wn = 2598291686, Hn = 2719718823, $n = 2810953526, Kn = 2840065720, Yn = 2885165957, jn = 3586157513, zn = 3717933110, Xn = 4062655306;
|
|
1153
1153
|
function Ne(t) {
|
|
1154
1154
|
const e = {};
|
|
1155
1155
|
return wt(e), e;
|
|
1156
1156
|
}
|
|
1157
1157
|
function wt(t) {
|
|
1158
|
-
return t.ContextType = J.Unknown, t.UserType =
|
|
1158
|
+
return t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = X.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ge.Unknown, t;
|
|
1159
1159
|
}
|
|
1160
1160
|
function ge(t, e) {
|
|
1161
1161
|
const r = e ?? Ne();
|
|
@@ -1170,12 +1170,12 @@ function Jn(t, e) {
|
|
|
1170
1170
|
e.DeviceId = r.asString();
|
|
1171
1171
|
break;
|
|
1172
1172
|
}
|
|
1173
|
-
case
|
|
1173
|
+
case Rn: {
|
|
1174
1174
|
if (r.isNull) throw new Error();
|
|
1175
1175
|
e.InstallId = r.asString();
|
|
1176
1176
|
break;
|
|
1177
1177
|
}
|
|
1178
|
-
case
|
|
1178
|
+
case bn: {
|
|
1179
1179
|
if (r.isNull) throw new Error();
|
|
1180
1180
|
e.UserAgent = r.asString();
|
|
1181
1181
|
break;
|
|
@@ -1215,12 +1215,12 @@ function Jn(t, e) {
|
|
|
1215
1215
|
e.ReceiveAllMessages = r.asBool();
|
|
1216
1216
|
break;
|
|
1217
1217
|
}
|
|
1218
|
-
case
|
|
1218
|
+
case Pn: {
|
|
1219
1219
|
if (r.isNull) throw new Error();
|
|
1220
1220
|
e.Description = r.asString();
|
|
1221
1221
|
break;
|
|
1222
1222
|
}
|
|
1223
|
-
case
|
|
1223
|
+
case Fn: {
|
|
1224
1224
|
if (r.isNull) throw new Error();
|
|
1225
1225
|
e.Locale = r.asString();
|
|
1226
1226
|
break;
|
|
@@ -1230,12 +1230,12 @@ function Jn(t, e) {
|
|
|
1230
1230
|
e.SdkType = r.asInt32();
|
|
1231
1231
|
break;
|
|
1232
1232
|
}
|
|
1233
|
-
case
|
|
1233
|
+
case Gn: {
|
|
1234
1234
|
if (r.isNull) throw new Error();
|
|
1235
1235
|
e.SessionId = r.asInt32();
|
|
1236
1236
|
break;
|
|
1237
1237
|
}
|
|
1238
|
-
case
|
|
1238
|
+
case xn: {
|
|
1239
1239
|
if (r.isNull) throw new Error();
|
|
1240
1240
|
e.PreciseJoinedAt = r.asUInt64();
|
|
1241
1241
|
break;
|
|
@@ -1296,13 +1296,13 @@ function Qn(t) {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
return e;
|
|
1298
1298
|
}
|
|
1299
|
-
const
|
|
1299
|
+
const Zn = 746516514, qn = 877841741, es = 1175184220, ts = 1368629611, rs = 2341021724, ns = 3167053791, ss = 3686066300;
|
|
1300
1300
|
function is(t) {
|
|
1301
1301
|
const e = {};
|
|
1302
1302
|
return At(e), e;
|
|
1303
1303
|
}
|
|
1304
1304
|
function At(t) {
|
|
1305
|
-
return t.Type = k.None, t.Uri = "", t.OpcodeGroupsFromServer =
|
|
1305
|
+
return t.Type = k.None, t.Uri = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t;
|
|
1306
1306
|
}
|
|
1307
1307
|
function os(t, e) {
|
|
1308
1308
|
const r = e ?? is();
|
|
@@ -1312,12 +1312,12 @@ function as(t, e) {
|
|
|
1312
1312
|
let r;
|
|
1313
1313
|
for (; (r = t.next()) !== null; )
|
|
1314
1314
|
switch (r.fieldId) {
|
|
1315
|
-
case
|
|
1315
|
+
case Zn: {
|
|
1316
1316
|
if (r.isNull) throw new Error();
|
|
1317
1317
|
e.AuthTicket = r.asBinary();
|
|
1318
1318
|
break;
|
|
1319
1319
|
}
|
|
1320
|
-
case
|
|
1320
|
+
case qn: {
|
|
1321
1321
|
if (r.isNull) throw new Error();
|
|
1322
1322
|
e.Priority = r.asInt32();
|
|
1323
1323
|
break;
|
|
@@ -1349,7 +1349,7 @@ function as(t, e) {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
1351
|
}
|
|
1352
|
-
const cs = 5, ls = 65537, us = 166277978, hs = 1482635149, ds = 1559330978, fs = 2802434353,
|
|
1352
|
+
const cs = 5, ls = 65537, us = 166277978, hs = 1482635149, ds = 1559330978, fs = 2802434353, Es = 3085883711, ps = 3669484338, Is = 3707543140, ms = 3712281496, _s = 4160646707;
|
|
1353
1353
|
function Ts(t) {
|
|
1354
1354
|
const e = {};
|
|
1355
1355
|
return yt(e), e;
|
|
@@ -1389,22 +1389,22 @@ function As(t, e) {
|
|
|
1389
1389
|
e.ClientContext = ge(r.asObject());
|
|
1390
1390
|
break;
|
|
1391
1391
|
}
|
|
1392
|
-
case
|
|
1392
|
+
case Es: {
|
|
1393
1393
|
if (r.isNull) throw new Error();
|
|
1394
1394
|
e.ServerContext = ge(r.asObject());
|
|
1395
1395
|
break;
|
|
1396
1396
|
}
|
|
1397
|
-
case
|
|
1397
|
+
case ps: {
|
|
1398
1398
|
if (r.isNull) throw new Error();
|
|
1399
1399
|
e.FeatureFlags = gs(r.asDictionary());
|
|
1400
1400
|
break;
|
|
1401
1401
|
}
|
|
1402
|
-
case
|
|
1402
|
+
case Is: {
|
|
1403
1403
|
if (r.isNull) throw new Error();
|
|
1404
1404
|
e.SpaceId = r.asString();
|
|
1405
1405
|
break;
|
|
1406
1406
|
}
|
|
1407
|
-
case
|
|
1407
|
+
case ms: {
|
|
1408
1408
|
if (r.isNull) throw new Error();
|
|
1409
1409
|
e.PrimaryUserId = r.asString();
|
|
1410
1410
|
break;
|
|
@@ -1438,12 +1438,12 @@ function gs(t) {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
function Cs(t) {
|
|
1440
1440
|
const e = {};
|
|
1441
|
-
return
|
|
1441
|
+
return Rs(e), t && Object.assign(e, t), e;
|
|
1442
1442
|
}
|
|
1443
|
-
function
|
|
1444
|
-
return t.ServerSessionId = "", t.ContextType = J.Unknown, t.UserType =
|
|
1443
|
+
function Rs(t) {
|
|
1444
|
+
return t.ServerSessionId = "", t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = X.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ge.Unknown, t;
|
|
1445
1445
|
}
|
|
1446
|
-
const Nt = 1,
|
|
1446
|
+
const Nt = 1, bs = 1048632, ks = 3748161056, Us = 4289118421;
|
|
1447
1447
|
function Ds(t) {
|
|
1448
1448
|
const e = {};
|
|
1449
1449
|
return Ms(e), t && Object.assign(e, t), e;
|
|
@@ -1460,9 +1460,9 @@ function Ls(t, e) {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
function vs(t, e, r) {
|
|
1462
1462
|
const n = Os(t);
|
|
1463
|
-
return
|
|
1463
|
+
return F(bs, n, Nt, e, r);
|
|
1464
1464
|
}
|
|
1465
|
-
const
|
|
1465
|
+
const Ps = 1, Fs = 1048601, Bs = 112005851, Gs = 814454131, xs = 976255570, Vs = 1123310456, Ws = 2885165957, Hs = 3748161056, $s = 4289118421;
|
|
1466
1466
|
function Ks(t) {
|
|
1467
1467
|
const e = {};
|
|
1468
1468
|
return gt(e), e;
|
|
@@ -1487,12 +1487,12 @@ function zs(t, e) {
|
|
|
1487
1487
|
e.Scopes = Js(r.asArray());
|
|
1488
1488
|
break;
|
|
1489
1489
|
}
|
|
1490
|
-
case
|
|
1490
|
+
case Gs: {
|
|
1491
1491
|
if (r.isNull) throw new Error();
|
|
1492
1492
|
e.FunctionName = r.asString();
|
|
1493
1493
|
break;
|
|
1494
1494
|
}
|
|
1495
|
-
case
|
|
1495
|
+
case xs: {
|
|
1496
1496
|
if (r.isNull) throw new Error();
|
|
1497
1497
|
e.FunctionId = r.asGuid();
|
|
1498
1498
|
break;
|
|
@@ -1520,7 +1520,7 @@ function zs(t, e) {
|
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
function Xs(t, e) {
|
|
1523
|
-
const r = Me(t,
|
|
1523
|
+
const r = Me(t, Fs, Ps);
|
|
1524
1524
|
return Ys(r, e);
|
|
1525
1525
|
}
|
|
1526
1526
|
function Js(t) {
|
|
@@ -1537,7 +1537,7 @@ function Qs(t) {
|
|
|
1537
1537
|
e.push(cn(r.asObject()));
|
|
1538
1538
|
return e;
|
|
1539
1539
|
}
|
|
1540
|
-
const
|
|
1540
|
+
const Zs = 2994044322, qs = 3167053791;
|
|
1541
1541
|
function ei(t) {
|
|
1542
1542
|
const e = {};
|
|
1543
1543
|
return Ct(e), e;
|
|
@@ -1553,19 +1553,19 @@ function ri(t, e) {
|
|
|
1553
1553
|
let r;
|
|
1554
1554
|
for (; (r = t.next()) !== null; )
|
|
1555
1555
|
switch (r.fieldId) {
|
|
1556
|
-
case
|
|
1556
|
+
case Zs: {
|
|
1557
1557
|
if (r.isNull) throw new Error();
|
|
1558
1558
|
e.Id = r.asString();
|
|
1559
1559
|
break;
|
|
1560
1560
|
}
|
|
1561
|
-
case
|
|
1561
|
+
case qs: {
|
|
1562
1562
|
if (r.isNull) throw new Error();
|
|
1563
1563
|
e.Type = r.asString();
|
|
1564
1564
|
break;
|
|
1565
1565
|
}
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
1568
|
-
const
|
|
1568
|
+
const Rt = 1, ni = 1048631, si = 2205234621, ii = 2838554230, oi = 3748161056, ai = 4194102057, ci = 4289118421;
|
|
1569
1569
|
function li(t) {
|
|
1570
1570
|
const e = {};
|
|
1571
1571
|
return ui(e), t && Object.assign(e, t), e;
|
|
@@ -1574,7 +1574,7 @@ function ui(t) {
|
|
|
1574
1574
|
return t.CallId = m.fromBytes(new Uint8Array(16)), t.InstanceId = m.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
|
|
1575
1575
|
}
|
|
1576
1576
|
function hi(t) {
|
|
1577
|
-
const e = new D(
|
|
1577
|
+
const e = new D(Rt);
|
|
1578
1578
|
return di(t, e), e.finish();
|
|
1579
1579
|
}
|
|
1580
1580
|
function di(t, e) {
|
|
@@ -1582,37 +1582,37 @@ function di(t, e) {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
function fi(t, e, r) {
|
|
1584
1584
|
const n = hi(t);
|
|
1585
|
-
return
|
|
1585
|
+
return F(ni, n, Rt, e, r);
|
|
1586
1586
|
}
|
|
1587
|
-
const
|
|
1588
|
-
function
|
|
1587
|
+
const xe = 1, Ei = 1048600, bt = 703025676, kt = 814454131, Ut = 972460562, Dt = 976255570, Mt = 1368629611, Ot = 1479280922, Lt = 1533537016, vt = 2274386296, Pt = 2603556958, Ft = 2885165957, Bt = 3568439632;
|
|
1588
|
+
function pi(t) {
|
|
1589
1589
|
const e = {};
|
|
1590
|
-
return
|
|
1590
|
+
return Gt(e), e;
|
|
1591
1591
|
}
|
|
1592
|
-
function
|
|
1592
|
+
function Gt(t) {
|
|
1593
1593
|
return t.FunctionId = m.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ResultTypeName = "", t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.IsCancellable = !1, t.Description = "", t.LlmInlineResult = !1, t.LlmCallOnlyOnce = !1, t.RequiresInstance = !1, t;
|
|
1594
1594
|
}
|
|
1595
|
-
function
|
|
1596
|
-
const e = new D(
|
|
1597
|
-
return
|
|
1595
|
+
function Ii(t) {
|
|
1596
|
+
const e = new D(xe);
|
|
1597
|
+
return xt(t, e), e.finish();
|
|
1598
1598
|
}
|
|
1599
|
-
function
|
|
1600
|
-
e.writeStringField(
|
|
1599
|
+
function xt(t, e) {
|
|
1600
|
+
e.writeStringField(bt, t.ResultTypeName), e.writeStringField(kt, t.FunctionName), e.writeStringField(Ut, t.EnumerableItemTypeName), e.writeGuidField(Dt, t.FunctionId), e.writeStringField(Mt, t.Description), e.writeBoolField(Ot, t.IsCancellable), e.writeBoolField(Lt, t.RequiresInstance), e.writeBoolField(vt, t.LlmInlineResult), e.writeBoolField(Pt, t.IsEnumerable), e.writeArrayField(Ft, R.Object, (r) => {
|
|
1601
1601
|
for (const n of t.Parameters)
|
|
1602
1602
|
r.writeObject(wi, (s) => {
|
|
1603
1603
|
yi(n, s);
|
|
1604
1604
|
});
|
|
1605
1605
|
}), e.writeBoolField(Bt, t.LlmCallOnlyOnce);
|
|
1606
1606
|
}
|
|
1607
|
-
function
|
|
1608
|
-
const r = e ??
|
|
1609
|
-
return
|
|
1607
|
+
function mi(t, e) {
|
|
1608
|
+
const r = e ?? pi();
|
|
1609
|
+
return Gt(r), _i(t, r), r;
|
|
1610
1610
|
}
|
|
1611
1611
|
function _i(t, e) {
|
|
1612
1612
|
let r;
|
|
1613
1613
|
for (; (r = t.next()) !== null; )
|
|
1614
1614
|
switch (r.fieldId) {
|
|
1615
|
-
case
|
|
1615
|
+
case bt: {
|
|
1616
1616
|
if (r.isNull) throw new Error();
|
|
1617
1617
|
e.ResultTypeName = r.asString();
|
|
1618
1618
|
break;
|
|
@@ -1652,12 +1652,12 @@ function _i(t, e) {
|
|
|
1652
1652
|
e.LlmInlineResult = r.asBool();
|
|
1653
1653
|
break;
|
|
1654
1654
|
}
|
|
1655
|
-
case
|
|
1655
|
+
case Pt: {
|
|
1656
1656
|
if (r.isNull) throw new Error();
|
|
1657
1657
|
e.IsEnumerable = r.asBool();
|
|
1658
1658
|
break;
|
|
1659
1659
|
}
|
|
1660
|
-
case
|
|
1660
|
+
case Ft: {
|
|
1661
1661
|
if (r.isNull) throw new Error();
|
|
1662
1662
|
e.Parameters = Si(r.asArray());
|
|
1663
1663
|
break;
|
|
@@ -1670,8 +1670,8 @@ function _i(t, e) {
|
|
|
1670
1670
|
}
|
|
1671
1671
|
}
|
|
1672
1672
|
function Ti(t, e, r) {
|
|
1673
|
-
const n =
|
|
1674
|
-
return
|
|
1673
|
+
const n = Ii(t);
|
|
1674
|
+
return F(Ei, n, xe, e, r);
|
|
1675
1675
|
}
|
|
1676
1676
|
function Si(t) {
|
|
1677
1677
|
const e = [];
|
|
@@ -1746,8 +1746,8 @@ function gi(t, e) {
|
|
|
1746
1746
|
}
|
|
1747
1747
|
}
|
|
1748
1748
|
}
|
|
1749
|
-
const Qt = 1, Ci = 1048638,
|
|
1750
|
-
function
|
|
1749
|
+
const Qt = 1, Ci = 1048638, Ri = 3678477544;
|
|
1750
|
+
function bi(t) {
|
|
1751
1751
|
const e = {};
|
|
1752
1752
|
return ki(e), t && Object.assign(e, t), e;
|
|
1753
1753
|
}
|
|
@@ -1759,46 +1759,46 @@ function Ui(t) {
|
|
|
1759
1759
|
return Di(t, e), e.finish();
|
|
1760
1760
|
}
|
|
1761
1761
|
function Di(t, e) {
|
|
1762
|
-
e.writeArrayField(
|
|
1762
|
+
e.writeArrayField(Ri, R.Object, (r) => {
|
|
1763
1763
|
for (const n of t.Functions)
|
|
1764
|
-
r.writeObject(
|
|
1765
|
-
|
|
1764
|
+
r.writeObject(xe, (s) => {
|
|
1765
|
+
xt(n, s);
|
|
1766
1766
|
});
|
|
1767
1767
|
});
|
|
1768
1768
|
}
|
|
1769
1769
|
function Mi(t, e, r) {
|
|
1770
1770
|
const n = Ui(t);
|
|
1771
|
-
return
|
|
1771
|
+
return F(Ci, n, Qt, e, r);
|
|
1772
1772
|
}
|
|
1773
|
-
const
|
|
1774
|
-
function
|
|
1773
|
+
const Zt = 1, Oi = 1048602, Li = 349453957, vi = 703025676, Pi = 3403385840, Fi = 3748161056, Bi = 4289118421;
|
|
1774
|
+
function Gi(t) {
|
|
1775
1775
|
const e = {};
|
|
1776
|
-
return
|
|
1776
|
+
return xi(e), t && Object.assign(e, t), e;
|
|
1777
1777
|
}
|
|
1778
|
-
function
|
|
1778
|
+
function xi(t) {
|
|
1779
1779
|
return t.CallId = m.fromBytes(new Uint8Array(16)), t.InstanceId = m.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
|
|
1780
1780
|
}
|
|
1781
1781
|
function Vi(t) {
|
|
1782
|
-
const e = new D(
|
|
1782
|
+
const e = new D(Zt);
|
|
1783
1783
|
return Wi(t, e), e.finish();
|
|
1784
1784
|
}
|
|
1785
1785
|
function Wi(t, e) {
|
|
1786
|
-
e.writeBinaryField(Li, t.ResultData), e.writeStringField(vi, t.ResultTypeName), e.writeStringField(
|
|
1786
|
+
e.writeBinaryField(Li, t.ResultData), e.writeStringField(vi, t.ResultTypeName), e.writeStringField(Pi, t.ResultJson), e.writeGuidField(Fi, t.CallId), e.writeGuidField(Bi, t.InstanceId);
|
|
1787
1787
|
}
|
|
1788
1788
|
function Hi(t, e, r) {
|
|
1789
1789
|
const n = Vi(t);
|
|
1790
|
-
return
|
|
1790
|
+
return F(Oi, n, Zt, e, r);
|
|
1791
1791
|
}
|
|
1792
|
-
const
|
|
1792
|
+
const qt = 1, $i = 65549;
|
|
1793
1793
|
function Xe(t) {
|
|
1794
1794
|
return {};
|
|
1795
1795
|
}
|
|
1796
1796
|
function Ki(t) {
|
|
1797
|
-
return new D(
|
|
1797
|
+
return new D(qt).finish();
|
|
1798
1798
|
}
|
|
1799
1799
|
function Je(t, e, r) {
|
|
1800
1800
|
const n = Ki();
|
|
1801
|
-
return
|
|
1801
|
+
return F($i, n, qt, e, r);
|
|
1802
1802
|
}
|
|
1803
1803
|
const Yi = 3167053791, ji = 3342364356, zi = 3612929027;
|
|
1804
1804
|
function er(t) {
|
|
@@ -1806,7 +1806,7 @@ function er(t) {
|
|
|
1806
1806
|
return tr(e), e;
|
|
1807
1807
|
}
|
|
1808
1808
|
function tr(t) {
|
|
1809
|
-
return t.Category = "", t.Type =
|
|
1809
|
+
return t.Category = "", t.Type = Et.Face, t.FaceBlendshapes = [], t;
|
|
1810
1810
|
}
|
|
1811
1811
|
function Xi(t, e) {
|
|
1812
1812
|
const r = e ?? er();
|
|
@@ -1840,7 +1840,7 @@ function Qi(t) {
|
|
|
1840
1840
|
e.push(r.asString());
|
|
1841
1841
|
return e;
|
|
1842
1842
|
}
|
|
1843
|
-
const
|
|
1843
|
+
const Zi = 3612929027;
|
|
1844
1844
|
function rr(t) {
|
|
1845
1845
|
const e = {};
|
|
1846
1846
|
return nr(e), e;
|
|
@@ -1848,7 +1848,7 @@ function rr(t) {
|
|
|
1848
1848
|
function nr(t) {
|
|
1849
1849
|
return t.Category = "", t;
|
|
1850
1850
|
}
|
|
1851
|
-
function
|
|
1851
|
+
function qi(t, e) {
|
|
1852
1852
|
const r = e ?? rr();
|
|
1853
1853
|
return nr(r), eo(t, r), r;
|
|
1854
1854
|
}
|
|
@@ -1856,7 +1856,7 @@ function eo(t, e) {
|
|
|
1856
1856
|
let r;
|
|
1857
1857
|
for (; (r = t.next()) !== null; )
|
|
1858
1858
|
switch (r.fieldId) {
|
|
1859
|
-
case
|
|
1859
|
+
case Zi: {
|
|
1860
1860
|
if (r.isNull) throw new Error();
|
|
1861
1861
|
e.Category = r.asString();
|
|
1862
1862
|
break;
|
|
@@ -1869,7 +1869,7 @@ function sr(t) {
|
|
|
1869
1869
|
return ir(e), e;
|
|
1870
1870
|
}
|
|
1871
1871
|
function ir(t) {
|
|
1872
|
-
return t.Description = "", t.Codec =
|
|
1872
|
+
return t.Description = "", t.Codec = pt.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
|
|
1873
1873
|
}
|
|
1874
1874
|
function co(t, e) {
|
|
1875
1875
|
const r = e ?? sr();
|
|
@@ -1916,39 +1916,44 @@ function lo(t, e) {
|
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
1918
|
}
|
|
1919
|
-
const uo =
|
|
1920
|
-
function
|
|
1919
|
+
const uo = 4, ho = 65539, fo = 414670648, Eo = 693643444, po = 1144553441, Io = 1497620243, mo = 1559330978, _o = 1999510636, To = 2277643855, So = 2469008121, wo = 3042922213, Ao = 3219210453, yo = 3504054055, No = 3642827795, go = 3678477544, Co = 3696445035, Ro = 3707543140, bo = 3712281496, ko = 3748214980, Uo = 3823842552, Do = 3895362455, Mo = 3897397815, Oo = 4225107827;
|
|
1920
|
+
function Lo(t) {
|
|
1921
1921
|
const e = {};
|
|
1922
1922
|
return or(e), e;
|
|
1923
1923
|
}
|
|
1924
1924
|
function or(t) {
|
|
1925
|
-
return t.Clients = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelInstanceId = "", t.FirstUserId = "", t.ChannelUrl = "", t.ChannelId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.SessionId = "", t.
|
|
1925
|
+
return t.Clients = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelInstanceId = "", t.FirstUserId = "", t.ChannelUrl = "", t.ChannelId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.SessionId = "", t.RunnerType = "", t.BootType = "", t.PublicAccess = !1, t.DebugMode = !1, t.IsGitSource = !1, t.Functions = /* @__PURE__ */ Object.create(null), t;
|
|
1926
1926
|
}
|
|
1927
|
-
function
|
|
1927
|
+
function vo(t, e) {
|
|
1928
1928
|
const r = z.create(t);
|
|
1929
|
-
return
|
|
1929
|
+
return Po(r, e);
|
|
1930
1930
|
}
|
|
1931
|
-
function
|
|
1932
|
-
const r = e ??
|
|
1933
|
-
return or(r),
|
|
1931
|
+
function Po(t, e) {
|
|
1932
|
+
const r = e ?? Lo();
|
|
1933
|
+
return or(r), Fo(t, r), r;
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1935
|
+
function Fo(t, e) {
|
|
1936
1936
|
let r;
|
|
1937
1937
|
for (; (r = t.next()) !== null; )
|
|
1938
1938
|
switch (r.fieldId) {
|
|
1939
1939
|
case fo: {
|
|
1940
|
+
if (r.isNull) throw new Error();
|
|
1941
|
+
e.IsGitSource = r.asBool();
|
|
1942
|
+
break;
|
|
1943
|
+
}
|
|
1944
|
+
case Eo: {
|
|
1940
1945
|
if (r.isNull) throw new Error();
|
|
1941
1946
|
e.FirstUserId = r.asString();
|
|
1942
1947
|
break;
|
|
1943
1948
|
}
|
|
1944
1949
|
case po: {
|
|
1945
1950
|
if (r.isNull) throw new Error();
|
|
1946
|
-
e.Clients =
|
|
1951
|
+
e.Clients = Go(r.asDictionary());
|
|
1947
1952
|
break;
|
|
1948
1953
|
}
|
|
1949
|
-
case
|
|
1954
|
+
case Io: {
|
|
1950
1955
|
if (r.isNull) throw new Error();
|
|
1951
|
-
e.TrackingStreams =
|
|
1956
|
+
e.TrackingStreams = xo(r.asDictionary());
|
|
1952
1957
|
break;
|
|
1953
1958
|
}
|
|
1954
1959
|
case mo: {
|
|
@@ -1956,78 +1961,93 @@ function Oo(t, e) {
|
|
|
1956
1961
|
e.ChannelId = r.asString();
|
|
1957
1962
|
break;
|
|
1958
1963
|
}
|
|
1959
|
-
case Io: {
|
|
1960
|
-
if (r.isNull) throw new Error();
|
|
1961
|
-
e.SessionId = r.asString();
|
|
1962
|
-
break;
|
|
1963
|
-
}
|
|
1964
1964
|
case _o: {
|
|
1965
1965
|
if (r.isNull) throw new Error();
|
|
1966
|
-
e.
|
|
1966
|
+
e.SessionId = r.asString();
|
|
1967
1967
|
break;
|
|
1968
1968
|
}
|
|
1969
1969
|
case To: {
|
|
1970
1970
|
if (r.isNull) throw new Error();
|
|
1971
|
-
e.
|
|
1971
|
+
e.ChannelUrl = r.asString();
|
|
1972
1972
|
break;
|
|
1973
1973
|
}
|
|
1974
1974
|
case So: {
|
|
1975
1975
|
if (r.isNull) throw new Error();
|
|
1976
|
-
e.
|
|
1976
|
+
e.ChannelName = r.asString();
|
|
1977
1977
|
break;
|
|
1978
1978
|
}
|
|
1979
1979
|
case wo: {
|
|
1980
1980
|
if (r.isNull) throw new Error();
|
|
1981
|
-
e.
|
|
1981
|
+
e.PublicAccess = r.asBool();
|
|
1982
1982
|
break;
|
|
1983
1983
|
}
|
|
1984
1984
|
case Ao: {
|
|
1985
1985
|
if (r.isNull) throw new Error();
|
|
1986
|
-
e.
|
|
1986
|
+
e.OrganisationName = r.asString();
|
|
1987
1987
|
break;
|
|
1988
1988
|
}
|
|
1989
1989
|
case yo: {
|
|
1990
1990
|
if (r.isNull) throw new Error();
|
|
1991
|
-
e.
|
|
1991
|
+
e.DebugMode = r.asBool();
|
|
1992
1992
|
break;
|
|
1993
1993
|
}
|
|
1994
1994
|
case No: {
|
|
1995
1995
|
if (r.isNull) throw new Error();
|
|
1996
|
-
e.
|
|
1996
|
+
e.RunnerType = r.asString();
|
|
1997
1997
|
break;
|
|
1998
1998
|
}
|
|
1999
1999
|
case go: {
|
|
2000
2000
|
if (r.isNull) throw new Error();
|
|
2001
|
-
e.
|
|
2001
|
+
e.Functions = Vo(r.asDictionary());
|
|
2002
2002
|
break;
|
|
2003
2003
|
}
|
|
2004
2004
|
case Co: {
|
|
2005
2005
|
if (r.isNull) throw new Error();
|
|
2006
|
-
e.
|
|
2006
|
+
e.UIStreams = Wo(r.asDictionary());
|
|
2007
2007
|
break;
|
|
2008
2008
|
}
|
|
2009
|
-
case
|
|
2009
|
+
case Ro: {
|
|
2010
2010
|
if (r.isNull) throw new Error();
|
|
2011
|
-
e.
|
|
2011
|
+
e.SpaceId = r.asString();
|
|
2012
2012
|
break;
|
|
2013
2013
|
}
|
|
2014
|
-
case
|
|
2014
|
+
case bo: {
|
|
2015
2015
|
if (r.isNull) throw new Error();
|
|
2016
|
-
e.
|
|
2016
|
+
e.PrimaryUserId = r.asString();
|
|
2017
2017
|
break;
|
|
2018
2018
|
}
|
|
2019
2019
|
case ko: {
|
|
2020
|
+
if (r.isNull) throw new Error();
|
|
2021
|
+
e.BootType = r.asString();
|
|
2022
|
+
break;
|
|
2023
|
+
}
|
|
2024
|
+
case Uo: {
|
|
2025
|
+
if (r.isNull) throw new Error();
|
|
2026
|
+
e.ChannelInstanceId = r.asString();
|
|
2027
|
+
break;
|
|
2028
|
+
}
|
|
2029
|
+
case Do: {
|
|
2030
|
+
if (r.isNull) throw new Error();
|
|
2031
|
+
e.AudioStreams = Ho(r.asDictionary());
|
|
2032
|
+
break;
|
|
2033
|
+
}
|
|
2034
|
+
case Mo: {
|
|
2035
|
+
if (r.isNull) throw new Error();
|
|
2036
|
+
e.VideoStreams = $o(r.asDictionary());
|
|
2037
|
+
break;
|
|
2038
|
+
}
|
|
2039
|
+
case Oo: {
|
|
2020
2040
|
if (r.isNull) throw new Error();
|
|
2021
2041
|
e.SpaceName = r.asString();
|
|
2022
2042
|
break;
|
|
2023
2043
|
}
|
|
2024
2044
|
}
|
|
2025
2045
|
}
|
|
2026
|
-
function
|
|
2046
|
+
function Bo(t, e) {
|
|
2027
2047
|
const r = Me(t, ho, uo);
|
|
2028
|
-
return
|
|
2048
|
+
return vo(r, e);
|
|
2029
2049
|
}
|
|
2030
|
-
function
|
|
2050
|
+
function Go(t) {
|
|
2031
2051
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2032
2052
|
let r;
|
|
2033
2053
|
for (; (r = t.next()) !== null; ) {
|
|
@@ -2036,233 +2056,233 @@ function vo(t) {
|
|
|
2036
2056
|
}
|
|
2037
2057
|
return e;
|
|
2038
2058
|
}
|
|
2039
|
-
function
|
|
2059
|
+
function xo(t) {
|
|
2040
2060
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2041
2061
|
let r;
|
|
2042
2062
|
for (; (r = t.next()) !== null; ) {
|
|
2043
2063
|
const n = r.key.asString();
|
|
2044
|
-
e[n] =
|
|
2064
|
+
e[n] = _a(r.value.asObject());
|
|
2045
2065
|
}
|
|
2046
2066
|
return e;
|
|
2047
2067
|
}
|
|
2048
|
-
function
|
|
2068
|
+
function Vo(t) {
|
|
2049
2069
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2050
2070
|
let r;
|
|
2051
2071
|
for (; (r = t.next()) !== null; ) {
|
|
2052
2072
|
const n = r.key.asInt32();
|
|
2053
|
-
e[n] =
|
|
2073
|
+
e[n] = Ko(r.value.asArray());
|
|
2054
2074
|
}
|
|
2055
2075
|
return e;
|
|
2056
2076
|
}
|
|
2057
|
-
function
|
|
2077
|
+
function Wo(t) {
|
|
2058
2078
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2059
2079
|
let r;
|
|
2060
2080
|
for (; (r = t.next()) !== null; ) {
|
|
2061
2081
|
const n = r.key.asString();
|
|
2062
|
-
e[n] =
|
|
2082
|
+
e[n] = Qo(r.value.asObject());
|
|
2063
2083
|
}
|
|
2064
2084
|
return e;
|
|
2065
2085
|
}
|
|
2066
|
-
function
|
|
2086
|
+
function Ho(t) {
|
|
2067
2087
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2068
2088
|
let r;
|
|
2069
2089
|
for (; (r = t.next()) !== null; ) {
|
|
2070
2090
|
const n = r.key.asString();
|
|
2071
|
-
e[n] =
|
|
2091
|
+
e[n] = sa(r.value.asObject());
|
|
2072
2092
|
}
|
|
2073
2093
|
return e;
|
|
2074
2094
|
}
|
|
2075
|
-
function
|
|
2095
|
+
function $o(t) {
|
|
2076
2096
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2077
2097
|
let r;
|
|
2078
2098
|
for (; (r = t.next()) !== null; ) {
|
|
2079
2099
|
const n = r.key.asString();
|
|
2080
|
-
e[n] =
|
|
2100
|
+
e[n] = ha(r.value.asObject());
|
|
2081
2101
|
}
|
|
2082
2102
|
return e;
|
|
2083
2103
|
}
|
|
2084
|
-
function
|
|
2104
|
+
function Ko(t) {
|
|
2085
2105
|
const e = [];
|
|
2086
2106
|
let r;
|
|
2087
2107
|
for (; (r = t.next()) !== null; )
|
|
2088
|
-
e.push(
|
|
2108
|
+
e.push(mi(r.asObject()));
|
|
2089
2109
|
return e;
|
|
2090
2110
|
}
|
|
2091
|
-
const
|
|
2092
|
-
function
|
|
2111
|
+
const Yo = 161083277, jo = 325678206, zo = 3469892363, Xo = 3645544153;
|
|
2112
|
+
function Jo(t) {
|
|
2093
2113
|
const e = {};
|
|
2094
2114
|
return ar(e), e;
|
|
2095
2115
|
}
|
|
2096
2116
|
function ar(t) {
|
|
2097
2117
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = rr(), t;
|
|
2098
2118
|
}
|
|
2099
|
-
function
|
|
2100
|
-
const r = e ??
|
|
2101
|
-
return ar(r),
|
|
2119
|
+
function Qo(t, e) {
|
|
2120
|
+
const r = e ?? Jo();
|
|
2121
|
+
return ar(r), Zo(t, r), r;
|
|
2102
2122
|
}
|
|
2103
|
-
function
|
|
2123
|
+
function Zo(t, e) {
|
|
2104
2124
|
let r;
|
|
2105
2125
|
for (; (r = t.next()) !== null; )
|
|
2106
2126
|
switch (r.fieldId) {
|
|
2107
|
-
case
|
|
2127
|
+
case Yo: {
|
|
2108
2128
|
if (r.isNull) throw new Error();
|
|
2109
2129
|
e.StreamId = r.asString();
|
|
2110
2130
|
break;
|
|
2111
2131
|
}
|
|
2112
|
-
case
|
|
2132
|
+
case jo: {
|
|
2113
2133
|
if (r.isNull) throw new Error();
|
|
2114
2134
|
e.ClientSessionId = r.asInt32();
|
|
2115
2135
|
break;
|
|
2116
2136
|
}
|
|
2117
|
-
case
|
|
2137
|
+
case zo: {
|
|
2118
2138
|
if (r.isNull) throw new Error();
|
|
2119
2139
|
e.TrackId = r.asInt32();
|
|
2120
2140
|
break;
|
|
2121
2141
|
}
|
|
2122
|
-
case
|
|
2142
|
+
case Xo: {
|
|
2123
2143
|
if (r.isNull) throw new Error();
|
|
2124
|
-
e.Info =
|
|
2144
|
+
e.Info = qi(r.asObject());
|
|
2125
2145
|
break;
|
|
2126
2146
|
}
|
|
2127
2147
|
}
|
|
2128
2148
|
}
|
|
2129
|
-
const
|
|
2130
|
-
function
|
|
2149
|
+
const qo = 161083277, ea = 325678206, ta = 3469892363, ra = 3645544153;
|
|
2150
|
+
function na(t) {
|
|
2131
2151
|
const e = {};
|
|
2132
2152
|
return cr(e), e;
|
|
2133
2153
|
}
|
|
2134
2154
|
function cr(t) {
|
|
2135
2155
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = _t(), t;
|
|
2136
2156
|
}
|
|
2137
|
-
function
|
|
2138
|
-
const r = e ??
|
|
2139
|
-
return cr(r),
|
|
2157
|
+
function sa(t, e) {
|
|
2158
|
+
const r = e ?? na();
|
|
2159
|
+
return cr(r), ia(t, r), r;
|
|
2140
2160
|
}
|
|
2141
|
-
function
|
|
2161
|
+
function ia(t, e) {
|
|
2142
2162
|
let r;
|
|
2143
2163
|
for (; (r = t.next()) !== null; )
|
|
2144
2164
|
switch (r.fieldId) {
|
|
2145
|
-
case
|
|
2165
|
+
case qo: {
|
|
2146
2166
|
if (r.isNull) throw new Error();
|
|
2147
2167
|
e.StreamId = r.asString();
|
|
2148
2168
|
break;
|
|
2149
2169
|
}
|
|
2150
|
-
case
|
|
2170
|
+
case ea: {
|
|
2151
2171
|
if (r.isNull) throw new Error();
|
|
2152
2172
|
e.ClientSessionId = r.asInt32();
|
|
2153
2173
|
break;
|
|
2154
2174
|
}
|
|
2155
|
-
case
|
|
2175
|
+
case ta: {
|
|
2156
2176
|
if (r.isNull) throw new Error();
|
|
2157
2177
|
e.TrackId = r.asInt32();
|
|
2158
2178
|
break;
|
|
2159
2179
|
}
|
|
2160
|
-
case
|
|
2180
|
+
case ra: {
|
|
2161
2181
|
if (r.isNull) throw new Error();
|
|
2162
|
-
e.Info =
|
|
2182
|
+
e.Info = In(r.asObject());
|
|
2163
2183
|
break;
|
|
2164
2184
|
}
|
|
2165
2185
|
}
|
|
2166
2186
|
}
|
|
2167
|
-
const
|
|
2168
|
-
function
|
|
2187
|
+
const oa = 161083277, aa = 325678206, ca = 3469892363, la = 3645544153;
|
|
2188
|
+
function ua(t) {
|
|
2169
2189
|
const e = {};
|
|
2170
2190
|
return lr(e), e;
|
|
2171
2191
|
}
|
|
2172
2192
|
function lr(t) {
|
|
2173
2193
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = sr(), t;
|
|
2174
2194
|
}
|
|
2175
|
-
function
|
|
2176
|
-
const r = e ??
|
|
2177
|
-
return lr(r),
|
|
2195
|
+
function ha(t, e) {
|
|
2196
|
+
const r = e ?? ua();
|
|
2197
|
+
return lr(r), da(t, r), r;
|
|
2178
2198
|
}
|
|
2179
|
-
function
|
|
2199
|
+
function da(t, e) {
|
|
2180
2200
|
let r;
|
|
2181
2201
|
for (; (r = t.next()) !== null; )
|
|
2182
2202
|
switch (r.fieldId) {
|
|
2183
|
-
case
|
|
2203
|
+
case oa: {
|
|
2184
2204
|
if (r.isNull) throw new Error();
|
|
2185
2205
|
e.StreamId = r.asString();
|
|
2186
2206
|
break;
|
|
2187
2207
|
}
|
|
2188
|
-
case
|
|
2208
|
+
case aa: {
|
|
2189
2209
|
if (r.isNull) throw new Error();
|
|
2190
2210
|
e.ClientSessionId = r.asInt32();
|
|
2191
2211
|
break;
|
|
2192
2212
|
}
|
|
2193
|
-
case
|
|
2213
|
+
case ca: {
|
|
2194
2214
|
if (r.isNull) throw new Error();
|
|
2195
2215
|
e.TrackId = r.asInt32();
|
|
2196
2216
|
break;
|
|
2197
2217
|
}
|
|
2198
|
-
case
|
|
2218
|
+
case la: {
|
|
2199
2219
|
if (r.isNull) throw new Error();
|
|
2200
2220
|
e.Info = co(r.asObject());
|
|
2201
2221
|
break;
|
|
2202
2222
|
}
|
|
2203
2223
|
}
|
|
2204
2224
|
}
|
|
2205
|
-
const
|
|
2206
|
-
function
|
|
2225
|
+
const fa = 161083277, Ea = 325678206, pa = 3469892363, Ia = 3645544153;
|
|
2226
|
+
function ma(t) {
|
|
2207
2227
|
const e = {};
|
|
2208
2228
|
return ur(e), e;
|
|
2209
2229
|
}
|
|
2210
2230
|
function ur(t) {
|
|
2211
2231
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = er(), t;
|
|
2212
2232
|
}
|
|
2213
|
-
function
|
|
2214
|
-
const r = e ??
|
|
2215
|
-
return ur(r),
|
|
2233
|
+
function _a(t, e) {
|
|
2234
|
+
const r = e ?? ma();
|
|
2235
|
+
return ur(r), Ta(t, r), r;
|
|
2216
2236
|
}
|
|
2217
|
-
function
|
|
2237
|
+
function Ta(t, e) {
|
|
2218
2238
|
let r;
|
|
2219
2239
|
for (; (r = t.next()) !== null; )
|
|
2220
2240
|
switch (r.fieldId) {
|
|
2221
|
-
case
|
|
2241
|
+
case fa: {
|
|
2222
2242
|
if (r.isNull) throw new Error();
|
|
2223
2243
|
e.StreamId = r.asString();
|
|
2224
2244
|
break;
|
|
2225
2245
|
}
|
|
2226
|
-
case
|
|
2246
|
+
case Ea: {
|
|
2227
2247
|
if (r.isNull) throw new Error();
|
|
2228
2248
|
e.ClientSessionId = r.asInt32();
|
|
2229
2249
|
break;
|
|
2230
2250
|
}
|
|
2231
|
-
case
|
|
2251
|
+
case pa: {
|
|
2232
2252
|
if (r.isNull) throw new Error();
|
|
2233
2253
|
e.TrackId = r.asInt32();
|
|
2234
2254
|
break;
|
|
2235
2255
|
}
|
|
2236
|
-
case
|
|
2256
|
+
case Ia: {
|
|
2237
2257
|
if (r.isNull) throw new Error();
|
|
2238
2258
|
e.Info = Xi(r.asObject());
|
|
2239
2259
|
break;
|
|
2240
2260
|
}
|
|
2241
2261
|
}
|
|
2242
2262
|
}
|
|
2243
|
-
const hr = 1,
|
|
2263
|
+
const hr = 1, Sa = 131074;
|
|
2244
2264
|
function dr(t) {
|
|
2245
2265
|
return {};
|
|
2246
2266
|
}
|
|
2247
|
-
function
|
|
2267
|
+
function wa(t) {
|
|
2248
2268
|
return new D(hr).finish();
|
|
2249
2269
|
}
|
|
2250
2270
|
function fr(t, e, r) {
|
|
2251
|
-
const n =
|
|
2252
|
-
return
|
|
2271
|
+
const n = wa();
|
|
2272
|
+
return F(Sa, n, hr, e, r);
|
|
2253
2273
|
}
|
|
2254
|
-
const
|
|
2255
|
-
function
|
|
2274
|
+
const Er = 1, Aa = 8388612;
|
|
2275
|
+
function ya(t) {
|
|
2256
2276
|
return {};
|
|
2257
2277
|
}
|
|
2258
|
-
function
|
|
2259
|
-
return new D(
|
|
2278
|
+
function Na(t) {
|
|
2279
|
+
return new D(Er).finish();
|
|
2260
2280
|
}
|
|
2261
|
-
function
|
|
2262
|
-
const n =
|
|
2263
|
-
return
|
|
2281
|
+
function ga(t, e, r) {
|
|
2282
|
+
const n = Na();
|
|
2283
|
+
return F(Aa, n, Er, e, r);
|
|
2264
2284
|
}
|
|
2265
|
-
function
|
|
2285
|
+
function Ca(t) {
|
|
2266
2286
|
return new Worker(
|
|
2267
2287
|
"" + new URL("assets/protocol-worker-DKSTqFKg.js", import.meta.url).href,
|
|
2268
2288
|
{
|
|
@@ -2291,32 +2311,32 @@ class We extends W {
|
|
|
2291
2311
|
super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
|
|
2292
2312
|
}
|
|
2293
2313
|
}
|
|
2294
|
-
class
|
|
2314
|
+
class Ra extends Ve {
|
|
2295
2315
|
constructor(e) {
|
|
2296
2316
|
super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
|
|
2297
2317
|
}
|
|
2298
2318
|
}
|
|
2299
|
-
class
|
|
2319
|
+
class ba extends y {
|
|
2300
2320
|
constructor(e) {
|
|
2301
2321
|
super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
|
|
2302
2322
|
}
|
|
2303
2323
|
}
|
|
2304
|
-
class
|
|
2324
|
+
class Tl extends y {
|
|
2305
2325
|
constructor(e) {
|
|
2306
2326
|
super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
|
|
2307
2327
|
}
|
|
2308
2328
|
}
|
|
2309
|
-
class
|
|
2329
|
+
class Sl extends y {
|
|
2310
2330
|
constructor(e) {
|
|
2311
2331
|
super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
|
|
2312
2332
|
}
|
|
2313
2333
|
}
|
|
2314
|
-
class
|
|
2334
|
+
class wl extends y {
|
|
2315
2335
|
constructor() {
|
|
2316
2336
|
super("No channels available in this space"), this.name = "NoChannelsError";
|
|
2317
2337
|
}
|
|
2318
2338
|
}
|
|
2319
|
-
function
|
|
2339
|
+
function pr(t, e) {
|
|
2320
2340
|
return new Promise((r, n) => {
|
|
2321
2341
|
const s = () => {
|
|
2322
2342
|
clearTimeout(i), n(new Error("Aborted"));
|
|
@@ -2330,32 +2350,32 @@ function Er(t, e) {
|
|
|
2330
2350
|
e?.addEventListener("abort", s, { once: !0 });
|
|
2331
2351
|
});
|
|
2332
2352
|
}
|
|
2333
|
-
var
|
|
2353
|
+
var Ir = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.NONE = 4] = "NONE", t))(Ir || {});
|
|
2334
2354
|
let He = 1, fe = null;
|
|
2335
|
-
function
|
|
2355
|
+
function Al(t) {
|
|
2336
2356
|
He = t;
|
|
2337
2357
|
}
|
|
2338
|
-
function
|
|
2358
|
+
function yl() {
|
|
2339
2359
|
return He;
|
|
2340
2360
|
}
|
|
2341
|
-
function
|
|
2361
|
+
function ka(t) {
|
|
2342
2362
|
fe = t;
|
|
2343
2363
|
}
|
|
2344
|
-
function
|
|
2364
|
+
function Nl() {
|
|
2345
2365
|
return fe;
|
|
2346
2366
|
}
|
|
2347
|
-
const
|
|
2367
|
+
const Ua = {
|
|
2348
2368
|
0: "DEBUG",
|
|
2349
2369
|
1: "INFO",
|
|
2350
2370
|
2: "WARN",
|
|
2351
2371
|
3: "ERROR",
|
|
2352
2372
|
4: "NONE"
|
|
2353
2373
|
};
|
|
2354
|
-
function
|
|
2374
|
+
function Da(t, e) {
|
|
2355
2375
|
return `[${t}] ${e}`;
|
|
2356
2376
|
}
|
|
2357
2377
|
function ie(t, e, r, n) {
|
|
2358
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
2378
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = Ua[t];
|
|
2359
2379
|
if (fe && fe({
|
|
2360
2380
|
timestamp: s,
|
|
2361
2381
|
level: t,
|
|
@@ -2364,7 +2384,7 @@ function ie(t, e, r, n) {
|
|
|
2364
2384
|
message: r,
|
|
2365
2385
|
args: n
|
|
2366
2386
|
}), He <= t) {
|
|
2367
|
-
const o =
|
|
2387
|
+
const o = Da(e, r);
|
|
2368
2388
|
switch (t) {
|
|
2369
2389
|
case 0:
|
|
2370
2390
|
console.debug(o, ...n);
|
|
@@ -2397,8 +2417,8 @@ function L(t) {
|
|
|
2397
2417
|
}
|
|
2398
2418
|
};
|
|
2399
2419
|
}
|
|
2400
|
-
const oe = L("WebSocketTransport"),
|
|
2401
|
-
class
|
|
2420
|
+
const oe = L("WebSocketTransport"), Ma = 1e4;
|
|
2421
|
+
class Oa {
|
|
2402
2422
|
ws = null;
|
|
2403
2423
|
keepaliveTimeout = null;
|
|
2404
2424
|
// Pre-allocated keepalive response message to avoid allocation per keepalive
|
|
@@ -2425,7 +2445,7 @@ class ka {
|
|
|
2425
2445
|
clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
|
|
2426
2446
|
}, c = setTimeout(() => {
|
|
2427
2447
|
o || (o = !0, a(), this.ws?.close(), s(new W("WebSocket connection timeout")));
|
|
2428
|
-
},
|
|
2448
|
+
}, Ma);
|
|
2429
2449
|
this.ws.onopen = () => {
|
|
2430
2450
|
i = !0, clearTimeout(c), this.ws.send(r), this.resetKeepaliveTimeout(), o || (o = !0, n());
|
|
2431
2451
|
}, this.ws.onerror = () => {
|
|
@@ -2435,8 +2455,8 @@ class ka {
|
|
|
2435
2455
|
o = !0, a(), s(new W("WebSocket connection closed before opening"));
|
|
2436
2456
|
return;
|
|
2437
2457
|
}
|
|
2438
|
-
const
|
|
2439
|
-
this.callbacks.onClose(h,
|
|
2458
|
+
const f = u.wasClean && (u.code === 1e3 || u.code === 1001), d = u.code === 1e3 || u.code === 1001, h = u.reason || `code=${u.code}`;
|
|
2459
|
+
this.callbacks.onClose(h, f, d);
|
|
2440
2460
|
}, this.ws.onmessage = (u) => {
|
|
2441
2461
|
this.handleProtocolMessage(new Uint8Array(u.data));
|
|
2442
2462
|
};
|
|
@@ -2456,7 +2476,7 @@ class ka {
|
|
|
2456
2476
|
}
|
|
2457
2477
|
handleProtocolMessage(e) {
|
|
2458
2478
|
try {
|
|
2459
|
-
if (ne(e).opcode ===
|
|
2479
|
+
if (ne(e).opcode === S.KEEPALIVE_REQUEST) {
|
|
2460
2480
|
this.send(this.getKeepaliveResponse()), this.resetKeepaliveTimeout();
|
|
2461
2481
|
return;
|
|
2462
2482
|
}
|
|
@@ -2474,11 +2494,11 @@ class ka {
|
|
|
2474
2494
|
this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
|
|
2475
2495
|
}
|
|
2476
2496
|
}
|
|
2477
|
-
const B = L("WebTransportTransport"), Qe = 4,
|
|
2478
|
-
function
|
|
2497
|
+
const B = L("WebTransportTransport"), Qe = 4, La = 65536;
|
|
2498
|
+
function mr() {
|
|
2479
2499
|
return typeof WebTransport < "u";
|
|
2480
2500
|
}
|
|
2481
|
-
class
|
|
2501
|
+
class va {
|
|
2482
2502
|
transport = null;
|
|
2483
2503
|
stream = null;
|
|
2484
2504
|
reader = null;
|
|
@@ -2486,7 +2506,7 @@ class Da {
|
|
|
2486
2506
|
keepaliveTimeout = null;
|
|
2487
2507
|
readLoopActive = !1;
|
|
2488
2508
|
// Grow-only receive buffer with offset/length tracking to minimize allocations
|
|
2489
|
-
receiveBuffer = new Uint8Array(
|
|
2509
|
+
receiveBuffer = new Uint8Array(La);
|
|
2490
2510
|
receiveBufferOffset = 0;
|
|
2491
2511
|
receiveBufferLength = 0;
|
|
2492
2512
|
// Cached DataView to avoid allocation per message
|
|
@@ -2504,7 +2524,7 @@ class Da {
|
|
|
2504
2524
|
return this.transport !== null && this.writer !== null;
|
|
2505
2525
|
}
|
|
2506
2526
|
async connect(e, r) {
|
|
2507
|
-
if (!
|
|
2527
|
+
if (!mr())
|
|
2508
2528
|
throw new W("WebTransport is not supported in this browser");
|
|
2509
2529
|
try {
|
|
2510
2530
|
this.transport = new WebTransport(e), await this.transport.ready, B.debug(`Connected to WebTransport entrypoint: ${e}`), this.transport.closed.then(() => {
|
|
@@ -2598,7 +2618,7 @@ class Da {
|
|
|
2598
2618
|
*/
|
|
2599
2619
|
handleProtocolMessage(e) {
|
|
2600
2620
|
try {
|
|
2601
|
-
if (ne(e).opcode ===
|
|
2621
|
+
if (ne(e).opcode === S.KEEPALIVE_REQUEST) {
|
|
2602
2622
|
this.send(this.getKeepaliveResponse()), this.resetKeepaliveTimeout();
|
|
2603
2623
|
return;
|
|
2604
2624
|
}
|
|
@@ -2641,7 +2661,7 @@ class Da {
|
|
|
2641
2661
|
}
|
|
2642
2662
|
}
|
|
2643
2663
|
const ee = L("Channel");
|
|
2644
|
-
class
|
|
2664
|
+
class Pa {
|
|
2645
2665
|
state = "disconnected";
|
|
2646
2666
|
transport = null;
|
|
2647
2667
|
config;
|
|
@@ -2718,13 +2738,13 @@ class Ma {
|
|
|
2718
2738
|
switch (e.Type) {
|
|
2719
2739
|
case k.WebSocket:
|
|
2720
2740
|
case k.WebSocketProxy:
|
|
2721
|
-
this.transport = new
|
|
2741
|
+
this.transport = new Oa(r);
|
|
2722
2742
|
break;
|
|
2723
2743
|
case k.WebTransport:
|
|
2724
2744
|
case k.WebTransportProxy:
|
|
2725
|
-
if (!
|
|
2745
|
+
if (!mr())
|
|
2726
2746
|
throw new Error("WebTransport is not supported in this browser");
|
|
2727
|
-
this.transport = new
|
|
2747
|
+
this.transport = new va(r);
|
|
2728
2748
|
break;
|
|
2729
2749
|
default:
|
|
2730
2750
|
throw new Error(`Unsupported entrypoint type: ${k[e.Type]}`);
|
|
@@ -2737,7 +2757,7 @@ class Ma {
|
|
|
2737
2757
|
handleProtocolMessage(e) {
|
|
2738
2758
|
try {
|
|
2739
2759
|
const r = e;
|
|
2740
|
-
if (ue(r) ===
|
|
2760
|
+
if (ue(r) === S.CORE_ON_SERVER_STOPPING) {
|
|
2741
2761
|
ee.debug("Received server stopping message"), this.setState("stopped"), this.transport?.close();
|
|
2742
2762
|
return;
|
|
2743
2763
|
}
|
|
@@ -2765,8 +2785,8 @@ class Ma {
|
|
|
2765
2785
|
this.state !== e && (this.state = e, this.config.onStateChange?.(e));
|
|
2766
2786
|
}
|
|
2767
2787
|
}
|
|
2768
|
-
const
|
|
2769
|
-
class
|
|
2788
|
+
const G = L("ChannelManager");
|
|
2789
|
+
class Fa {
|
|
2770
2790
|
channels = /* @__PURE__ */ new Map();
|
|
2771
2791
|
// keyed by opcode group
|
|
2772
2792
|
activeType = null;
|
|
@@ -2816,7 +2836,7 @@ class Oa {
|
|
|
2816
2836
|
s.send(e);
|
|
2817
2837
|
return;
|
|
2818
2838
|
}
|
|
2819
|
-
|
|
2839
|
+
G.warn("No channel found for message");
|
|
2820
2840
|
}
|
|
2821
2841
|
/**
|
|
2822
2842
|
* Send a protocol message to all channels (for broadcast messages).
|
|
@@ -2847,10 +2867,10 @@ class Oa {
|
|
|
2847
2867
|
await this.connectAllChannels(i), this.config.endpointSelector?.rememberWorkingType(s), this.config.onRememberWorkingType?.(s), this.activeType = s, this.reconnectAttempts = 0, this.setState("connected");
|
|
2848
2868
|
return;
|
|
2849
2869
|
} catch (o) {
|
|
2850
|
-
|
|
2870
|
+
G.warn(`Failed to connect using ${k[s]}: ${o}`), this.disconnectAll();
|
|
2851
2871
|
}
|
|
2852
2872
|
}
|
|
2853
|
-
throw
|
|
2873
|
+
throw G.error("All endpoint types failed"), e || this.setState("offline"), new Error("Failed to connect using any endpoint type");
|
|
2854
2874
|
}
|
|
2855
2875
|
/**
|
|
2856
2876
|
* Connect all channels for a given endpoint type in parallel.
|
|
@@ -2868,7 +2888,7 @@ class Oa {
|
|
|
2868
2888
|
* Connect a single channel.
|
|
2869
2889
|
*/
|
|
2870
2890
|
async connectChannel(e) {
|
|
2871
|
-
const r = new
|
|
2891
|
+
const r = new Pa({
|
|
2872
2892
|
entrypoint: e,
|
|
2873
2893
|
sessionId: this.config.sessionId,
|
|
2874
2894
|
keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
|
|
@@ -2910,10 +2930,10 @@ class Oa {
|
|
|
2910
2930
|
handleChannelClose(e, r, n, s) {
|
|
2911
2931
|
if (!(this.state === "idle" || this.state === "stopped" || this.state === "offline")) {
|
|
2912
2932
|
if (n || s) {
|
|
2913
|
-
|
|
2933
|
+
G.debug("Channel closed by server"), this.shouldReconnect = !1, this.disconnectAll(), this.setState("stopped");
|
|
2914
2934
|
return;
|
|
2915
2935
|
}
|
|
2916
|
-
this.state === "connected" && (
|
|
2936
|
+
this.state === "connected" && (G.error("Channel closed unexpectedly, attempting reconnect"), this.disconnectAll(), this.attemptReconnect());
|
|
2917
2937
|
}
|
|
2918
2938
|
}
|
|
2919
2939
|
/**
|
|
@@ -2923,16 +2943,16 @@ class Oa {
|
|
|
2923
2943
|
if (!this.shouldReconnect)
|
|
2924
2944
|
return;
|
|
2925
2945
|
if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
|
|
2926
|
-
|
|
2946
|
+
G.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Ra(this.config.maxReconnectAttempts));
|
|
2927
2947
|
return;
|
|
2928
2948
|
}
|
|
2929
2949
|
this.setState("reconnecting"), this.reconnectAttempts++;
|
|
2930
2950
|
const e = this.config.reconnectBackoffMs * Math.pow(2, this.reconnectAttempts - 1);
|
|
2931
|
-
if (
|
|
2951
|
+
if (G.info(`Reconnecting in ${e}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await pr(e, this.abortController?.signal), !!this.shouldReconnect)
|
|
2932
2952
|
try {
|
|
2933
2953
|
await this.connectInternal(!0);
|
|
2934
2954
|
} catch (r) {
|
|
2935
|
-
|
|
2955
|
+
G.error("Reconnect failed:", r), await this.attemptReconnect();
|
|
2936
2956
|
}
|
|
2937
2957
|
}
|
|
2938
2958
|
/**
|
|
@@ -2950,7 +2970,7 @@ class Oa {
|
|
|
2950
2970
|
this.state !== e && (this.state = e, this.config.onStateChange?.(e));
|
|
2951
2971
|
}
|
|
2952
2972
|
}
|
|
2953
|
-
const
|
|
2973
|
+
const Ba = 5e3, Ga = 3e4, Ze = 35e3, qe = 500, et = 6, _r = 6e4, Ce = "ikon_device_id";
|
|
2954
2974
|
function $e() {
|
|
2955
2975
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
2956
2976
|
return crypto.randomUUID();
|
|
@@ -2961,14 +2981,14 @@ function $e() {
|
|
|
2961
2981
|
return crypto.randomUUID();
|
|
2962
2982
|
}
|
|
2963
2983
|
}
|
|
2964
|
-
function
|
|
2984
|
+
function gl() {
|
|
2965
2985
|
if (!(typeof localStorage > "u"))
|
|
2966
2986
|
try {
|
|
2967
2987
|
localStorage.removeItem(Ce);
|
|
2968
2988
|
} catch {
|
|
2969
2989
|
}
|
|
2970
2990
|
}
|
|
2971
|
-
function
|
|
2991
|
+
function Cl(t) {
|
|
2972
2992
|
try {
|
|
2973
2993
|
const e = t.split(".");
|
|
2974
2994
|
return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
|
|
@@ -2976,23 +2996,23 @@ function Gl(t) {
|
|
|
2976
2996
|
return null;
|
|
2977
2997
|
}
|
|
2978
2998
|
}
|
|
2979
|
-
const
|
|
2999
|
+
const Ee = {}, Re = "https://api.prod.ikon.live", pe = "https://api.dev.ikon.live", tt = "https://auth.ikonai.com", rt = "https://auth.dev.ikonai.com", Rl = "https://auth.ikonai.com";
|
|
2980
3000
|
function Tr(t) {
|
|
2981
|
-
return t === "development" ?
|
|
3001
|
+
return t === "development" ? pe : Re;
|
|
2982
3002
|
}
|
|
2983
|
-
function
|
|
2984
|
-
const t = typeof import.meta < "u" ?
|
|
2985
|
-
return t || (typeof window > "u" ?
|
|
3003
|
+
function bl() {
|
|
3004
|
+
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
|
|
3005
|
+
return t || (typeof window > "u" ? Re : !Ke() || window.location.hostname.includes(".dev.") ? pe : Re);
|
|
2986
3006
|
}
|
|
2987
|
-
function
|
|
2988
|
-
const t = typeof import.meta < "u" ?
|
|
3007
|
+
function kl() {
|
|
3008
|
+
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_TYPE : void 0;
|
|
2989
3009
|
if (t === "development" || t === "production")
|
|
2990
3010
|
return t;
|
|
2991
|
-
const e = typeof import.meta < "u" ?
|
|
3011
|
+
const e = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
|
|
2992
3012
|
return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : Ke() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
|
|
2993
3013
|
}
|
|
2994
|
-
function
|
|
2995
|
-
const t = typeof import.meta < "u" ?
|
|
3014
|
+
function Ul() {
|
|
3015
|
+
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_AUTH_URL : void 0;
|
|
2996
3016
|
return t || (typeof window > "u" ? tt : !Ke() || window.location.hostname.includes(".dev.") ? rt : tt);
|
|
2997
3017
|
}
|
|
2998
3018
|
function Sr() {
|
|
@@ -3003,8 +3023,8 @@ function Sr() {
|
|
|
3003
3023
|
e[r] = n;
|
|
3004
3024
|
return e;
|
|
3005
3025
|
}
|
|
3006
|
-
const
|
|
3007
|
-
function
|
|
3026
|
+
const xa = ["ikon_token", "ikon_provider", "error"];
|
|
3027
|
+
function Dl() {
|
|
3008
3028
|
if (typeof window > "u")
|
|
3009
3029
|
return { parameters: {} };
|
|
3010
3030
|
const t = window.location.pathname;
|
|
@@ -3016,7 +3036,7 @@ function Kl() {
|
|
|
3016
3036
|
throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
|
|
3017
3037
|
const i = Sr(), o = {};
|
|
3018
3038
|
for (const [a, c] of Object.entries(i))
|
|
3019
|
-
|
|
3039
|
+
xa.includes(a) || (o[a] = c);
|
|
3020
3040
|
return { sessionId: e, channelKey: r, parameters: o };
|
|
3021
3041
|
}
|
|
3022
3042
|
function Ke() {
|
|
@@ -3031,10 +3051,10 @@ function Ke() {
|
|
|
3031
3051
|
}
|
|
3032
3052
|
return !0;
|
|
3033
3053
|
}
|
|
3034
|
-
const
|
|
3035
|
-
async function
|
|
3054
|
+
const Ie = L("Authenticator"), j = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO, Va = 1e3, Wa = 5e3;
|
|
3055
|
+
async function Ha(t) {
|
|
3036
3056
|
try {
|
|
3037
|
-
const e = await fetch(`${
|
|
3057
|
+
const e = await fetch(`${pe}/users/me`, {
|
|
3038
3058
|
credentials: "include",
|
|
3039
3059
|
signal: t
|
|
3040
3060
|
});
|
|
@@ -3068,7 +3088,7 @@ async function Ar(t, e, r, n, s, i, o) {
|
|
|
3068
3088
|
}
|
|
3069
3089
|
return await u.json();
|
|
3070
3090
|
}
|
|
3071
|
-
async function
|
|
3091
|
+
async function $a(t, e, r, n) {
|
|
3072
3092
|
const s = `${t}/rooms/connect`, i = await fetch(s, wr(e, r, n));
|
|
3073
3093
|
if (!i.ok) {
|
|
3074
3094
|
const o = await i.text().catch(() => "Unknown error");
|
|
@@ -3078,17 +3098,17 @@ async function Ga(t, e, r, n) {
|
|
|
3078
3098
|
}
|
|
3079
3099
|
async function yr(t, e, r, n, s) {
|
|
3080
3100
|
const i = Date.now();
|
|
3081
|
-
let o =
|
|
3101
|
+
let o = Va;
|
|
3082
3102
|
for (; ; ) {
|
|
3083
3103
|
if (s?.aborted)
|
|
3084
3104
|
throw new y("Connection aborted");
|
|
3085
3105
|
if (Date.now() - i >= r)
|
|
3086
|
-
throw new
|
|
3087
|
-
const c = await
|
|
3106
|
+
throw new ba(r);
|
|
3107
|
+
const c = await $a(t, e, n, s), u = c.state?.toLowerCase();
|
|
3088
3108
|
if (u === "running")
|
|
3089
3109
|
return c;
|
|
3090
3110
|
if (u === "provisioning") {
|
|
3091
|
-
await
|
|
3111
|
+
await pr(o, s), o = Math.min(o * 1.5, Wa);
|
|
3092
3112
|
continue;
|
|
3093
3113
|
}
|
|
3094
3114
|
throw new y(`Unexpected channel state: ${c.state}`);
|
|
@@ -3103,12 +3123,12 @@ async function Ye(t, e) {
|
|
|
3103
3123
|
const n = await r.arrayBuffer(), s = new Uint8Array(n);
|
|
3104
3124
|
return { authResponse: ys(s) };
|
|
3105
3125
|
}
|
|
3106
|
-
function
|
|
3126
|
+
function Ka(t, e) {
|
|
3107
3127
|
return Cs({
|
|
3108
3128
|
ServerSessionId: "",
|
|
3109
3129
|
// Server will fill this in
|
|
3110
3130
|
ContextType: J.Browser,
|
|
3111
|
-
UserType:
|
|
3131
|
+
UserType: Z.Human,
|
|
3112
3132
|
PayloadType: Q.Teleport,
|
|
3113
3133
|
IsInternal: !1,
|
|
3114
3134
|
Description: t.description ?? "Ikon SDK TypeScript",
|
|
@@ -3131,7 +3151,7 @@ function Va(t, e) {
|
|
|
3131
3151
|
Parameters: t.parameters ?? {}
|
|
3132
3152
|
});
|
|
3133
3153
|
}
|
|
3134
|
-
function
|
|
3154
|
+
function Ya(t) {
|
|
3135
3155
|
return {
|
|
3136
3156
|
ServerSessionId: t.ServerSessionId,
|
|
3137
3157
|
ContextType: t.ContextType,
|
|
@@ -3158,13 +3178,13 @@ function Wa(t) {
|
|
|
3158
3178
|
Parameters: t.Parameters
|
|
3159
3179
|
};
|
|
3160
3180
|
}
|
|
3161
|
-
async function
|
|
3181
|
+
async function ja(t, e) {
|
|
3162
3182
|
const r = `https://${t.host}:${t.httpsPort}`;
|
|
3163
|
-
|
|
3183
|
+
Ie.debug(`Authenticating with local server: ${r}`);
|
|
3164
3184
|
const s = { ...Sr(), ...t.parameters };
|
|
3165
3185
|
let i = t.userId;
|
|
3166
|
-
i || (i = await
|
|
3167
|
-
const o =
|
|
3186
|
+
i || (i = await Ha(e), i || (i = "local", Ie.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
|
|
3187
|
+
const o = Ka({ ...t, parameters: s }, i), a = Ya(o), c = await fetch(`${r}/connect-token`, {
|
|
3168
3188
|
method: "POST",
|
|
3169
3189
|
headers: {
|
|
3170
3190
|
"Content-Type": "application/json"
|
|
@@ -3176,17 +3196,17 @@ async function Ha(t, e) {
|
|
|
3176
3196
|
const h = await c.text().catch(() => "Unknown error");
|
|
3177
3197
|
throw new y(`Failed to get connect token: ${c.status} ${h}`);
|
|
3178
3198
|
}
|
|
3179
|
-
const
|
|
3180
|
-
if (!
|
|
3199
|
+
const f = (await c.json()).token;
|
|
3200
|
+
if (!f)
|
|
3181
3201
|
throw new y("Server did not return a token");
|
|
3182
|
-
const d = `${r}/connect?token=${encodeURIComponent(
|
|
3202
|
+
const d = `${r}/connect?token=${encodeURIComponent(f)}`;
|
|
3183
3203
|
return Ye(d, e);
|
|
3184
3204
|
}
|
|
3185
|
-
async function
|
|
3205
|
+
async function za(t, e) {
|
|
3186
3206
|
if (t.sessionId && t.channelKey)
|
|
3187
3207
|
throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3188
3208
|
const r = Tr(t.backendType);
|
|
3189
|
-
|
|
3209
|
+
Ie.debug(`Authenticating with cloud server: ${r}, space ID: ${t.spaceId}`);
|
|
3190
3210
|
const n = await fetch(`${r}/auth/api-key`, {
|
|
3191
3211
|
method: "POST",
|
|
3192
3212
|
headers: {
|
|
@@ -3220,7 +3240,7 @@ async function $a(t, e) {
|
|
|
3220
3240
|
const c = {
|
|
3221
3241
|
code: (await Ar(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e)).code,
|
|
3222
3242
|
contextType: J.Plugin,
|
|
3223
|
-
userType: t.userType ??
|
|
3243
|
+
userType: t.userType ?? Z.Human,
|
|
3224
3244
|
clientType: t.clientType ?? X.DesktopWeb,
|
|
3225
3245
|
payloadType: Q.Teleport,
|
|
3226
3246
|
description: t.description ?? "Ikon SDK TypeScript",
|
|
@@ -3236,17 +3256,17 @@ async function $a(t, e) {
|
|
|
3236
3256
|
launchParams: t.parameters,
|
|
3237
3257
|
hash: t.sessionId,
|
|
3238
3258
|
waitForRunning: !0
|
|
3239
|
-
}, u = t.provisioningTimeoutMs ?? _r,
|
|
3240
|
-
if (!
|
|
3259
|
+
}, u = t.provisioningTimeoutMs ?? _r, f = await yr(r, c, u, i, e);
|
|
3260
|
+
if (!f.configuration?.url)
|
|
3241
3261
|
throw new y("Backend did not return a connect URL");
|
|
3242
|
-
const d =
|
|
3262
|
+
const d = f.configuration.url;
|
|
3243
3263
|
return Ye(d, e);
|
|
3244
3264
|
}
|
|
3245
|
-
async function
|
|
3265
|
+
async function Xa(t, e) {
|
|
3246
3266
|
if (t.sessionId && t.channelKey)
|
|
3247
3267
|
throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3248
3268
|
const r = Tr(t.backendType), n = t.token;
|
|
3249
|
-
|
|
3269
|
+
Ie.debug(`Authenticating with session token to: ${r}, space ID: ${t.spaceId}`);
|
|
3250
3270
|
const s = await fetch(`${r}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
|
|
3251
3271
|
method: "GET",
|
|
3252
3272
|
headers: {
|
|
@@ -3255,13 +3275,13 @@ async function Ka(t, e) {
|
|
|
3255
3275
|
signal: e
|
|
3256
3276
|
});
|
|
3257
3277
|
if (!s.ok) {
|
|
3258
|
-
const
|
|
3259
|
-
throw new y(`Failed to get or create profile: ${s.status} ${
|
|
3278
|
+
const f = await s.text().catch(() => "Unknown error");
|
|
3279
|
+
throw new y(`Failed to get or create profile: ${s.status} ${f}`);
|
|
3260
3280
|
}
|
|
3261
3281
|
const o = {
|
|
3262
3282
|
code: (await Ar(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, n, e)).code,
|
|
3263
3283
|
contextType: J.Browser,
|
|
3264
|
-
userType:
|
|
3284
|
+
userType: Z.Human,
|
|
3265
3285
|
clientType: X.DesktopWeb,
|
|
3266
3286
|
payloadType: Q.Teleport,
|
|
3267
3287
|
description: t.description ?? "Ikon SDK TypeScript",
|
|
@@ -3283,22 +3303,22 @@ async function Ka(t, e) {
|
|
|
3283
3303
|
const u = c.configuration.url;
|
|
3284
3304
|
return Ye(u, e);
|
|
3285
3305
|
}
|
|
3286
|
-
const Nr = "ikon.theme",
|
|
3306
|
+
const Nr = "ikon.theme", be = "ikon.theme-user", Ja = "ikon.theme-change";
|
|
3287
3307
|
function gr(t) {
|
|
3288
3308
|
typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
|
|
3289
3309
|
}
|
|
3290
|
-
const
|
|
3310
|
+
const Qa = {
|
|
3291
3311
|
name: "ikon.client.getTheme",
|
|
3292
3312
|
description: "Get the currently selected client theme",
|
|
3293
3313
|
returnType: { kind: "string", nullable: !0 }
|
|
3294
3314
|
};
|
|
3295
|
-
function
|
|
3315
|
+
function Za() {
|
|
3296
3316
|
if (typeof window > "u" || !window.localStorage)
|
|
3297
3317
|
return null;
|
|
3298
|
-
const t = window.localStorage.getItem(
|
|
3318
|
+
const t = window.localStorage.getItem(be) ?? window.localStorage.getItem(Nr) ?? "light";
|
|
3299
3319
|
return gr(t), t;
|
|
3300
3320
|
}
|
|
3301
|
-
const
|
|
3321
|
+
const qa = {
|
|
3302
3322
|
name: "ikon.client.setTheme",
|
|
3303
3323
|
description: "Update the client UI theme",
|
|
3304
3324
|
returnType: { kind: "boolean" },
|
|
@@ -3307,140 +3327,49 @@ const Xa = {
|
|
|
3307
3327
|
{ name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
|
|
3308
3328
|
]
|
|
3309
3329
|
};
|
|
3310
|
-
function
|
|
3330
|
+
function ec(t, e) {
|
|
3311
3331
|
if (typeof window > "u" || !window.localStorage || typeof t != "string")
|
|
3312
3332
|
return !1;
|
|
3313
3333
|
const r = t.trim().toLowerCase();
|
|
3314
3334
|
if (!r)
|
|
3315
3335
|
return !1;
|
|
3316
3336
|
const n = e === void 0 ? !0 : !!e, s = window.localStorage;
|
|
3317
|
-
n ? s.setItem(
|
|
3337
|
+
n ? s.setItem(be, r) : s.removeItem(be), s.setItem(Nr, r);
|
|
3318
3338
|
try {
|
|
3319
|
-
window.dispatchEvent(new CustomEvent(
|
|
3339
|
+
window.dispatchEvent(new CustomEvent(Ja, { detail: { mode: r } }));
|
|
3320
3340
|
} catch {
|
|
3321
3341
|
}
|
|
3322
3342
|
return gr(r), !0;
|
|
3323
3343
|
}
|
|
3324
|
-
const Qa = {
|
|
3325
|
-
name: "ikon.client.getLocation",
|
|
3326
|
-
description: "Retrieve the current geolocation coordinates from the browser",
|
|
3327
|
-
returnType: {
|
|
3328
|
-
kind: "dictionary",
|
|
3329
|
-
keyType: "string",
|
|
3330
|
-
value: { kind: "number" },
|
|
3331
|
-
nullable: !0
|
|
3332
|
-
}
|
|
3333
|
-
};
|
|
3334
|
-
async function qa() {
|
|
3335
|
-
if (typeof navigator > "u" || !navigator.geolocation)
|
|
3336
|
-
return null;
|
|
3337
|
-
try {
|
|
3338
|
-
const t = await new Promise((e, r) => {
|
|
3339
|
-
navigator.geolocation.getCurrentPosition(e, r, {
|
|
3340
|
-
enableHighAccuracy: !0,
|
|
3341
|
-
timeout: 1e4
|
|
3342
|
-
});
|
|
3343
|
-
});
|
|
3344
|
-
return {
|
|
3345
|
-
latitude: t.coords.latitude,
|
|
3346
|
-
longitude: t.coords.longitude,
|
|
3347
|
-
accuracy: t.coords.accuracy
|
|
3348
|
-
};
|
|
3349
|
-
} catch {
|
|
3350
|
-
return null;
|
|
3351
|
-
}
|
|
3352
|
-
}
|
|
3353
|
-
const Za = {
|
|
3354
|
-
name: "ikon.client.share",
|
|
3355
|
-
description: "Open the Web Share dialog when supported",
|
|
3356
|
-
returnType: { kind: "boolean" },
|
|
3357
|
-
parameters: [
|
|
3358
|
-
{ name: "title", type: { kind: "string", nullable: !0 }, description: "Share title" },
|
|
3359
|
-
{ name: "text", type: { kind: "string", nullable: !0 }, description: "Share text" },
|
|
3360
|
-
{ name: "url", type: { kind: "string", nullable: !0 }, description: "Share URL" }
|
|
3361
|
-
]
|
|
3362
|
-
};
|
|
3363
|
-
async function ec(t, e, r) {
|
|
3364
|
-
if (typeof navigator > "u" || typeof navigator.share != "function")
|
|
3365
|
-
return !1;
|
|
3366
|
-
const n = typeof t == "string" ? t.trim() : "", s = typeof e == "string" ? e.trim() : "", i = typeof r == "string" ? r.trim() : "", o = {};
|
|
3367
|
-
if (n && (o.title = n), s && (o.text = s), i && (o.url = i), !o.title && !o.text && !o.url)
|
|
3368
|
-
return !1;
|
|
3369
|
-
try {
|
|
3370
|
-
return await navigator.share(o), !0;
|
|
3371
|
-
} catch {
|
|
3372
|
-
return !1;
|
|
3373
|
-
}
|
|
3374
|
-
}
|
|
3375
3344
|
const tc = {
|
|
3376
|
-
name: "ikon.client.pickContacts",
|
|
3377
|
-
description: "Launch the native contact picker when available",
|
|
3378
|
-
returnType: { kind: "string", nullable: !0 },
|
|
3379
|
-
parameters: [{ name: "multiple", type: { kind: "boolean", nullable: !0 }, description: "Allow multiple contacts" }]
|
|
3380
|
-
};
|
|
3381
|
-
async function rc(t) {
|
|
3382
|
-
if (typeof navigator > "u")
|
|
3383
|
-
return null;
|
|
3384
|
-
const e = navigator, r = e.contacts?.select;
|
|
3385
|
-
if (!r)
|
|
3386
|
-
return null;
|
|
3387
|
-
try {
|
|
3388
|
-
const n = await r.call(e.contacts, ["name", "email", "tel"], {
|
|
3389
|
-
multiple: !!t
|
|
3390
|
-
}), s = (o) => Array.isArray(o) ? o.filter((a) => typeof a == "string" && a.length > 0) : [], i = n.map((o) => ({
|
|
3391
|
-
names: s(o.name),
|
|
3392
|
-
emails: s(o.email),
|
|
3393
|
-
phones: s(o.tel)
|
|
3394
|
-
}));
|
|
3395
|
-
return JSON.stringify(i);
|
|
3396
|
-
} catch {
|
|
3397
|
-
return null;
|
|
3398
|
-
}
|
|
3399
|
-
}
|
|
3400
|
-
const nc = {
|
|
3401
3345
|
name: "ikon.client.getLanguage",
|
|
3402
3346
|
description: "Get the browser language preference",
|
|
3403
3347
|
returnType: { kind: "string" }
|
|
3404
3348
|
};
|
|
3405
|
-
function
|
|
3349
|
+
function rc() {
|
|
3406
3350
|
return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
|
|
3407
3351
|
}
|
|
3408
|
-
const
|
|
3352
|
+
const nc = {
|
|
3409
3353
|
name: "ikon.client.getTimezone",
|
|
3410
3354
|
description: "Get the browser timezone (IANA format)",
|
|
3411
3355
|
returnType: { kind: "string" }
|
|
3412
3356
|
};
|
|
3413
|
-
function
|
|
3357
|
+
function sc() {
|
|
3414
3358
|
try {
|
|
3415
3359
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3416
3360
|
} catch {
|
|
3417
3361
|
return "UTC";
|
|
3418
3362
|
}
|
|
3419
3363
|
}
|
|
3420
|
-
const
|
|
3421
|
-
name: "ikon.client.copyToClipboard",
|
|
3422
|
-
description: "Copy text to clipboard",
|
|
3423
|
-
returnType: { kind: "boolean" },
|
|
3424
|
-
parameters: [{ name: "text", type: { kind: "string" }, description: "Text to copy" }]
|
|
3425
|
-
};
|
|
3426
|
-
async function cc(t) {
|
|
3427
|
-
if (typeof navigator > "u" || !navigator.clipboard || typeof t != "string")
|
|
3428
|
-
return !1;
|
|
3429
|
-
try {
|
|
3430
|
-
return await navigator.clipboard.writeText(t), !0;
|
|
3431
|
-
} catch {
|
|
3432
|
-
return !1;
|
|
3433
|
-
}
|
|
3434
|
-
}
|
|
3435
|
-
const lc = {
|
|
3364
|
+
const ic = {
|
|
3436
3365
|
name: "ikon.client.getUrl",
|
|
3437
3366
|
description: "Get the current browser URL path and query string",
|
|
3438
3367
|
returnType: { kind: "string", nullable: !0 }
|
|
3439
3368
|
};
|
|
3440
|
-
function
|
|
3369
|
+
function oc() {
|
|
3441
3370
|
return typeof window > "u" ? null : window.location.pathname + window.location.search;
|
|
3442
3371
|
}
|
|
3443
|
-
const
|
|
3372
|
+
const ac = {
|
|
3444
3373
|
name: "ikon.client.setUrl",
|
|
3445
3374
|
description: "Update the browser URL without triggering a page reload",
|
|
3446
3375
|
returnType: { kind: "boolean" },
|
|
@@ -3449,7 +3378,7 @@ const hc = {
|
|
|
3449
3378
|
{ name: "replace", type: { kind: "boolean", nullable: !0 }, description: "If true, replaces current history entry instead of adding new one" }
|
|
3450
3379
|
]
|
|
3451
3380
|
};
|
|
3452
|
-
function
|
|
3381
|
+
function cc(t, e) {
|
|
3453
3382
|
if (typeof window > "u" || !window.history || typeof t != "string")
|
|
3454
3383
|
return !1;
|
|
3455
3384
|
const r = t.trim();
|
|
@@ -3461,13 +3390,13 @@ function dc(t, e) {
|
|
|
3461
3390
|
return !1;
|
|
3462
3391
|
}
|
|
3463
3392
|
}
|
|
3464
|
-
const
|
|
3393
|
+
const lc = {
|
|
3465
3394
|
name: "ikon.client.vibrate",
|
|
3466
3395
|
description: "Trigger haptic feedback on supported devices",
|
|
3467
3396
|
returnType: { kind: "boolean" },
|
|
3468
3397
|
parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
|
|
3469
3398
|
};
|
|
3470
|
-
function
|
|
3399
|
+
function uc(t) {
|
|
3471
3400
|
if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
|
|
3472
3401
|
return !1;
|
|
3473
3402
|
try {
|
|
@@ -3477,105 +3406,14 @@ function pc(t) {
|
|
|
3477
3406
|
return !1;
|
|
3478
3407
|
}
|
|
3479
3408
|
}
|
|
3480
|
-
const Ec = {
|
|
3481
|
-
name: "ikon.client.playSound",
|
|
3482
|
-
description: "Play audio from a URL",
|
|
3483
|
-
returnType: { kind: "boolean" },
|
|
3484
|
-
parameters: [
|
|
3485
|
-
{ name: "url", type: { kind: "string" }, description: "URL of the audio file" },
|
|
3486
|
-
{ name: "volume", type: { kind: "number", nullable: !0 }, description: "Volume level from 0.0 to 1.0" }
|
|
3487
|
-
]
|
|
3488
|
-
};
|
|
3489
|
-
async function mc(t, e) {
|
|
3490
|
-
if (typeof window > "u" || typeof Audio > "u" || typeof t != "string" || !t.trim())
|
|
3491
|
-
return !1;
|
|
3492
|
-
try {
|
|
3493
|
-
const r = new Audio(t.trim());
|
|
3494
|
-
return r.volume = typeof e == "number" ? Math.max(0, Math.min(1, e)) : 1, await r.play(), !0;
|
|
3495
|
-
} catch {
|
|
3496
|
-
return !1;
|
|
3497
|
-
}
|
|
3498
|
-
}
|
|
3499
|
-
const Ic = {
|
|
3500
|
-
name: "ikon.client.showNotification",
|
|
3501
|
-
description: "Show a browser notification (requests permission if needed)",
|
|
3502
|
-
returnType: { kind: "boolean" },
|
|
3503
|
-
parameters: [
|
|
3504
|
-
{ name: "title", type: { kind: "string" }, description: "Notification title" },
|
|
3505
|
-
{ name: "body", type: { kind: "string", nullable: !0 }, description: "Notification body text" },
|
|
3506
|
-
{ name: "icon", type: { kind: "string", nullable: !0 }, description: "URL of notification icon" }
|
|
3507
|
-
]
|
|
3508
|
-
};
|
|
3509
|
-
async function _c(t, e, r) {
|
|
3510
|
-
if (typeof window > "u" || !("Notification" in window) || typeof t != "string" || !t.trim())
|
|
3511
|
-
return !1;
|
|
3512
|
-
try {
|
|
3513
|
-
let n = Notification.permission;
|
|
3514
|
-
if (n === "default" && (n = await Notification.requestPermission()), n !== "granted")
|
|
3515
|
-
return !1;
|
|
3516
|
-
const s = {};
|
|
3517
|
-
return typeof e == "string" && e.trim() && (s.body = e.trim()), typeof r == "string" && r.trim() && (s.icon = r.trim()), new Notification(t.trim(), s), !0;
|
|
3518
|
-
} catch {
|
|
3519
|
-
return !1;
|
|
3520
|
-
}
|
|
3521
|
-
}
|
|
3522
|
-
const Tc = {
|
|
3523
|
-
name: "ikon.client.requestFullscreen",
|
|
3524
|
-
description: "Enter fullscreen mode",
|
|
3525
|
-
returnType: { kind: "boolean" }
|
|
3526
|
-
};
|
|
3527
|
-
async function Sc() {
|
|
3528
|
-
if (typeof document > "u" || !document.documentElement)
|
|
3529
|
-
return !1;
|
|
3530
|
-
try {
|
|
3531
|
-
const t = document.documentElement, e = t.requestFullscreen || t.webkitRequestFullscreen || t.msRequestFullscreen;
|
|
3532
|
-
return e ? (await e.call(t), !0) : !1;
|
|
3533
|
-
} catch {
|
|
3534
|
-
return !1;
|
|
3535
|
-
}
|
|
3536
|
-
}
|
|
3537
|
-
const wc = {
|
|
3538
|
-
name: "ikon.client.exitFullscreen",
|
|
3539
|
-
description: "Exit fullscreen mode",
|
|
3540
|
-
returnType: { kind: "boolean" }
|
|
3541
|
-
};
|
|
3542
|
-
function Ac() {
|
|
3543
|
-
if (typeof document > "u")
|
|
3544
|
-
return !1;
|
|
3545
|
-
try {
|
|
3546
|
-
const t = document.exitFullscreen || document.webkitExitFullscreen || document.msExitFullscreen;
|
|
3547
|
-
return t ? (t.call(document), !0) : !1;
|
|
3548
|
-
} catch {
|
|
3549
|
-
return !1;
|
|
3550
|
-
}
|
|
3551
|
-
}
|
|
3552
|
-
const yc = {
|
|
3553
|
-
name: "ikon.client.downloadFile",
|
|
3554
|
-
description: "Trigger a file download",
|
|
3555
|
-
returnType: { kind: "boolean" },
|
|
3556
|
-
parameters: [
|
|
3557
|
-
{ name: "url", type: { kind: "string" }, description: "URL of the file to download" },
|
|
3558
|
-
{ name: "filename", type: { kind: "string", nullable: !0 }, description: "Suggested filename for the download" }
|
|
3559
|
-
]
|
|
3560
|
-
};
|
|
3561
|
-
function Nc(t, e) {
|
|
3562
|
-
if (typeof document > "u" || typeof t != "string" || !t.trim())
|
|
3563
|
-
return !1;
|
|
3564
|
-
try {
|
|
3565
|
-
const r = document.createElement("a");
|
|
3566
|
-
return r.href = t.trim(), r.download = typeof e == "string" && e.trim() ? e.trim() : "", r.style.display = "none", document.body.appendChild(r), r.click(), document.body.removeChild(r), !0;
|
|
3567
|
-
} catch {
|
|
3568
|
-
return !1;
|
|
3569
|
-
}
|
|
3570
|
-
}
|
|
3571
3409
|
let te = null;
|
|
3572
|
-
const
|
|
3410
|
+
const hc = {
|
|
3573
3411
|
name: "ikon.client.keepScreenAwake",
|
|
3574
3412
|
description: "Prevent or allow the screen to sleep",
|
|
3575
3413
|
returnType: { kind: "boolean" },
|
|
3576
3414
|
parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
|
|
3577
3415
|
};
|
|
3578
|
-
async function
|
|
3416
|
+
async function dc(t) {
|
|
3579
3417
|
if (typeof navigator > "u" || !("wakeLock" in navigator))
|
|
3580
3418
|
return !1;
|
|
3581
3419
|
try {
|
|
@@ -3584,15 +3422,15 @@ async function Cc(t) {
|
|
|
3584
3422
|
return !1;
|
|
3585
3423
|
}
|
|
3586
3424
|
}
|
|
3587
|
-
const
|
|
3425
|
+
const fc = {
|
|
3588
3426
|
name: "ikon.client.getVisibility",
|
|
3589
3427
|
description: "Get the current page visibility state",
|
|
3590
3428
|
returnType: { kind: "string", nullable: !0 }
|
|
3591
3429
|
};
|
|
3592
|
-
function
|
|
3430
|
+
function Ec() {
|
|
3593
3431
|
return typeof document > "u" ? null : document.visibilityState || null;
|
|
3594
3432
|
}
|
|
3595
|
-
const
|
|
3433
|
+
const pc = {
|
|
3596
3434
|
name: "ikon.client.scrollTo",
|
|
3597
3435
|
description: "Scroll the page to a specific position",
|
|
3598
3436
|
returnType: { kind: "boolean" },
|
|
@@ -3602,7 +3440,7 @@ const kc = {
|
|
|
3602
3440
|
{ name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
|
|
3603
3441
|
]
|
|
3604
3442
|
};
|
|
3605
|
-
function
|
|
3443
|
+
function Ic(t, e, r) {
|
|
3606
3444
|
if (typeof window > "u" || typeof t != "number" || typeof e != "number")
|
|
3607
3445
|
return !1;
|
|
3608
3446
|
try {
|
|
@@ -3615,12 +3453,12 @@ function Uc(t, e, r) {
|
|
|
3615
3453
|
return !1;
|
|
3616
3454
|
}
|
|
3617
3455
|
}
|
|
3618
|
-
const
|
|
3456
|
+
const mc = {
|
|
3619
3457
|
name: "ikon.client.getBatteryLevel",
|
|
3620
3458
|
description: "Get the current battery level (0-100)",
|
|
3621
3459
|
returnType: { kind: "number", nullable: !0 }
|
|
3622
3460
|
};
|
|
3623
|
-
async function
|
|
3461
|
+
async function _c() {
|
|
3624
3462
|
if (typeof navigator > "u" || !("getBattery" in navigator))
|
|
3625
3463
|
return null;
|
|
3626
3464
|
try {
|
|
@@ -3630,61 +3468,52 @@ async function Mc() {
|
|
|
3630
3468
|
return null;
|
|
3631
3469
|
}
|
|
3632
3470
|
}
|
|
3633
|
-
const
|
|
3471
|
+
const Tc = {
|
|
3634
3472
|
name: "ikon.client.getNetworkType",
|
|
3635
3473
|
description: "Get the current network connection type",
|
|
3636
3474
|
returnType: { kind: "string", nullable: !0 }
|
|
3637
3475
|
};
|
|
3638
|
-
function
|
|
3476
|
+
function Sc() {
|
|
3639
3477
|
if (typeof navigator > "u")
|
|
3640
3478
|
return null;
|
|
3641
3479
|
const t = navigator.connection;
|
|
3642
3480
|
return t && (t.effectiveType || t.type) || null;
|
|
3643
3481
|
}
|
|
3644
|
-
const
|
|
3645
|
-
{ definition:
|
|
3646
|
-
{ definition:
|
|
3647
|
-
{ definition: Qa, handler: qa },
|
|
3648
|
-
{ definition: Za, handler: ec },
|
|
3482
|
+
const wc = [
|
|
3483
|
+
{ definition: Qa, handler: Za },
|
|
3484
|
+
{ definition: qa, handler: ec },
|
|
3649
3485
|
{ definition: tc, handler: rc },
|
|
3650
3486
|
{ definition: nc, handler: sc },
|
|
3651
3487
|
{ definition: ic, handler: oc },
|
|
3652
3488
|
{ definition: ac, handler: cc },
|
|
3653
3489
|
{ definition: lc, handler: uc },
|
|
3654
3490
|
{ definition: hc, handler: dc },
|
|
3655
|
-
{ definition: fc, handler:
|
|
3656
|
-
{ definition:
|
|
3657
|
-
{ definition:
|
|
3658
|
-
{ definition: Tc, handler: Sc }
|
|
3659
|
-
{ definition: wc, handler: Ac },
|
|
3660
|
-
{ definition: yc, handler: Nc },
|
|
3661
|
-
{ definition: gc, handler: Cc },
|
|
3662
|
-
{ definition: bc, handler: Rc },
|
|
3663
|
-
{ definition: kc, handler: Uc },
|
|
3664
|
-
{ definition: Dc, handler: Mc },
|
|
3665
|
-
{ definition: Oc, handler: Lc }
|
|
3491
|
+
{ definition: fc, handler: Ec },
|
|
3492
|
+
{ definition: pc, handler: Ic },
|
|
3493
|
+
{ definition: mc, handler: _c },
|
|
3494
|
+
{ definition: Tc, handler: Sc }
|
|
3666
3495
|
];
|
|
3667
|
-
function
|
|
3668
|
-
const e =
|
|
3496
|
+
function Ac(t) {
|
|
3497
|
+
const e = wc.map(({ definition: r, handler: n }) => t.register(r, n));
|
|
3669
3498
|
return () => e.forEach((r) => r());
|
|
3670
3499
|
}
|
|
3671
3500
|
function nt() {
|
|
3672
3501
|
return typeof window < "u" && typeof navigator < "u";
|
|
3673
3502
|
}
|
|
3674
|
-
const
|
|
3675
|
-
function
|
|
3503
|
+
const yc = new Uint8Array(0);
|
|
3504
|
+
function me(t) {
|
|
3676
3505
|
switch (t.kind) {
|
|
3677
3506
|
case "array":
|
|
3678
3507
|
return {
|
|
3679
3508
|
kind: "array",
|
|
3680
|
-
element:
|
|
3509
|
+
element: me(t.element),
|
|
3681
3510
|
nullable: t.nullable ?? !1
|
|
3682
3511
|
};
|
|
3683
3512
|
case "dictionary":
|
|
3684
3513
|
return {
|
|
3685
3514
|
kind: "dictionary",
|
|
3686
3515
|
keyType: t.keyType ?? "string",
|
|
3687
|
-
value:
|
|
3516
|
+
value: me(t.value),
|
|
3688
3517
|
nullable: t.nullable ?? !1
|
|
3689
3518
|
};
|
|
3690
3519
|
default:
|
|
@@ -3731,9 +3560,9 @@ function Cr(t, e) {
|
|
|
3731
3560
|
}
|
|
3732
3561
|
return JSON.stringify(t);
|
|
3733
3562
|
}
|
|
3734
|
-
function
|
|
3563
|
+
function Nc(t, e) {
|
|
3735
3564
|
const r = (t.parameters ?? []).map((i) => {
|
|
3736
|
-
const o =
|
|
3565
|
+
const o = me(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Cr(i.defaultValue, o) : "";
|
|
3737
3566
|
return {
|
|
3738
3567
|
name: i.name,
|
|
3739
3568
|
descriptor: o,
|
|
@@ -3741,7 +3570,7 @@ function Bc(t, e) {
|
|
|
3741
3570
|
defaultValueJson: c,
|
|
3742
3571
|
description: i.description
|
|
3743
3572
|
};
|
|
3744
|
-
}), n =
|
|
3573
|
+
}), n = me(t.returnType), s = {
|
|
3745
3574
|
FunctionId: m.createRandom(),
|
|
3746
3575
|
FunctionName: t.name,
|
|
3747
3576
|
Description: t.description ?? "",
|
|
@@ -3758,7 +3587,7 @@ function Bc(t, e) {
|
|
|
3758
3587
|
TypeName: re(i.descriptor),
|
|
3759
3588
|
HasDefaultValue: i.hasDefaultValue,
|
|
3760
3589
|
DefaultValueJson: i.defaultValueJson,
|
|
3761
|
-
DefaultValueData:
|
|
3590
|
+
DefaultValueData: yc,
|
|
3762
3591
|
IsEnumerable: !1,
|
|
3763
3592
|
EnumerableItemTypeName: "",
|
|
3764
3593
|
Description: i.description ?? ""
|
|
@@ -3772,11 +3601,11 @@ function Bc(t, e) {
|
|
|
3772
3601
|
returnType: n
|
|
3773
3602
|
};
|
|
3774
3603
|
}
|
|
3775
|
-
const it = L("FunctionRegistry"),
|
|
3776
|
-
function
|
|
3604
|
+
const it = L("FunctionRegistry"), gc = new Uint8Array(0);
|
|
3605
|
+
function Cc(t) {
|
|
3777
3606
|
return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
|
|
3778
3607
|
}
|
|
3779
|
-
class
|
|
3608
|
+
class Rc {
|
|
3780
3609
|
functions = /* @__PURE__ */ new Map();
|
|
3781
3610
|
config = null;
|
|
3782
3611
|
isConnected = !1;
|
|
@@ -3798,7 +3627,7 @@ class Vc {
|
|
|
3798
3627
|
* If already connected, sends registration to server immediately.
|
|
3799
3628
|
*/
|
|
3800
3629
|
register(e, r) {
|
|
3801
|
-
const n =
|
|
3630
|
+
const n = Nc(e, r);
|
|
3802
3631
|
return this.functions.set(e.name, n), this.isConnected && this.config && this.sendRegistration(n), () => this.unregister(e.name);
|
|
3803
3632
|
}
|
|
3804
3633
|
/**
|
|
@@ -3830,7 +3659,7 @@ class Vc {
|
|
|
3830
3659
|
* Returns true if the message was handled.
|
|
3831
3660
|
*/
|
|
3832
3661
|
handleProtocolMessage(e, r) {
|
|
3833
|
-
if (r ===
|
|
3662
|
+
if (r === S.ACTION_FUNCTION_CALL) {
|
|
3834
3663
|
const n = ne(e);
|
|
3835
3664
|
return this.handleFunctionCall(e, n.senderId), !0;
|
|
3836
3665
|
}
|
|
@@ -3843,7 +3672,7 @@ class Vc {
|
|
|
3843
3672
|
sendAllRegistrations() {
|
|
3844
3673
|
if (!this.config || this.functions.size === 0)
|
|
3845
3674
|
return;
|
|
3846
|
-
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r =
|
|
3675
|
+
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = bi({ Functions: e }), n = Mi(r, this.config.sessionId);
|
|
3847
3676
|
this.config.sendProtocolMessage(n);
|
|
3848
3677
|
}
|
|
3849
3678
|
/**
|
|
@@ -3873,12 +3702,12 @@ class Vc {
|
|
|
3873
3702
|
try {
|
|
3874
3703
|
const s = [];
|
|
3875
3704
|
for (let u = 0; u < e.parameters.length; u++) {
|
|
3876
|
-
const
|
|
3877
|
-
h === void 0 || h === "" ?
|
|
3705
|
+
const f = e.parameters[u], h = r.Parameters?.[u]?.ValueJson;
|
|
3706
|
+
h === void 0 || h === "" ? f.hasDefaultValue ? s.push(st(f.defaultValueJson, f.descriptor)) : s.push(void 0) : s.push(st(h, f.descriptor));
|
|
3878
3707
|
}
|
|
3879
3708
|
const i = await e.handler(...s);
|
|
3880
|
-
let o = i, a =
|
|
3881
|
-
|
|
3709
|
+
let o = i, a = gc;
|
|
3710
|
+
Cc(i) && (o = i.value, a = new Uint8Array(i.data));
|
|
3882
3711
|
const c = Cr(o, e.returnType);
|
|
3883
3712
|
this.sendResult(r.CallId, r.InstanceId, n, e, c, a);
|
|
3884
3713
|
} catch (s) {
|
|
@@ -3901,7 +3730,7 @@ class Vc {
|
|
|
3901
3730
|
if (!this.config)
|
|
3902
3731
|
return;
|
|
3903
3732
|
const a = Hi(
|
|
3904
|
-
|
|
3733
|
+
Gi({
|
|
3905
3734
|
CallId: e,
|
|
3906
3735
|
InstanceId: r,
|
|
3907
3736
|
ResultTypeName: re(s.returnType),
|
|
@@ -3933,7 +3762,7 @@ class Vc {
|
|
|
3933
3762
|
this.config.sendProtocolMessage(i);
|
|
3934
3763
|
}
|
|
3935
3764
|
}
|
|
3936
|
-
function
|
|
3765
|
+
function bc(t, e) {
|
|
3937
3766
|
return { value: t, data: e };
|
|
3938
3767
|
}
|
|
3939
3768
|
function Se(t) {
|
|
@@ -3949,7 +3778,7 @@ const Te = {
|
|
|
3949
3778
|
StartAudioCapture: "ikon.client.startAudioCapture",
|
|
3950
3779
|
StopCapture: "ikon.client.stopCapture",
|
|
3951
3780
|
CaptureImage: "ikon.client.captureImage"
|
|
3952
|
-
},
|
|
3781
|
+
}, kc = {
|
|
3953
3782
|
name: Te.StartVideoCapture,
|
|
3954
3783
|
description: "Start camera or screen capture and stream video frames to the server",
|
|
3955
3784
|
returnType: { kind: "string" },
|
|
@@ -3957,26 +3786,26 @@ const Te = {
|
|
|
3957
3786
|
{ name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
|
|
3958
3787
|
{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
|
|
3959
3788
|
]
|
|
3960
|
-
},
|
|
3789
|
+
}, Uc = {
|
|
3961
3790
|
name: Te.StartAudioCapture,
|
|
3962
3791
|
description: "Start microphone capture and stream audio frames to the server",
|
|
3963
3792
|
returnType: { kind: "string" },
|
|
3964
3793
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
3965
|
-
},
|
|
3794
|
+
}, Dc = {
|
|
3966
3795
|
name: Te.StopCapture,
|
|
3967
3796
|
description: "Stop a previously started capture by captureId",
|
|
3968
3797
|
returnType: { kind: "boolean" },
|
|
3969
3798
|
parameters: [{ name: "captureId", type: { kind: "string" }, description: "Capture ID to stop" }]
|
|
3970
|
-
},
|
|
3799
|
+
}, Mc = {
|
|
3971
3800
|
name: Te.CaptureImage,
|
|
3972
3801
|
description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
|
|
3973
3802
|
returnType: { kind: "string" },
|
|
3974
3803
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
3975
3804
|
};
|
|
3976
|
-
function
|
|
3805
|
+
function Oc(t, e) {
|
|
3977
3806
|
const r = [];
|
|
3978
3807
|
return r.push(
|
|
3979
|
-
t.register(
|
|
3808
|
+
t.register(kc, async (n, s) => {
|
|
3980
3809
|
const i = e.mediaCapture;
|
|
3981
3810
|
if (!i)
|
|
3982
3811
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -3984,7 +3813,7 @@ function jc(t, e) {
|
|
|
3984
3813
|
return ((typeof n == "string" && n.trim().toLowerCase() === "screen" ? "screen" : "camera") === "screen" ? await i.video.startScreen({ userGesture: !1, options: o, constraints: o?.constraints }) : await i.video.startCamera({ userGesture: !1, options: o, constraints: o?.constraints })).captureId;
|
|
3985
3814
|
})
|
|
3986
3815
|
), r.push(
|
|
3987
|
-
t.register(
|
|
3816
|
+
t.register(Uc, async (n) => {
|
|
3988
3817
|
const s = e.mediaCapture;
|
|
3989
3818
|
if (!s)
|
|
3990
3819
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -3992,7 +3821,7 @@ function jc(t, e) {
|
|
|
3992
3821
|
return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).captureId;
|
|
3993
3822
|
})
|
|
3994
3823
|
), r.push(
|
|
3995
|
-
t.register(
|
|
3824
|
+
t.register(Dc, async (n) => {
|
|
3996
3825
|
const s = e.mediaCapture;
|
|
3997
3826
|
if (!s || typeof n != "string" || !n.trim())
|
|
3998
3827
|
return !1;
|
|
@@ -4000,7 +3829,7 @@ function jc(t, e) {
|
|
|
4000
3829
|
return i || o;
|
|
4001
3830
|
})
|
|
4002
3831
|
), r.push(
|
|
4003
|
-
t.register(
|
|
3832
|
+
t.register(Mc, async (n) => {
|
|
4004
3833
|
const s = e.mediaCapture;
|
|
4005
3834
|
if (!s)
|
|
4006
3835
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -4012,21 +3841,21 @@ function jc(t, e) {
|
|
|
4012
3841
|
width: i.width,
|
|
4013
3842
|
height: i.height
|
|
4014
3843
|
}), a = JSON.stringify({ mime: o.mime, width: o.width, height: o.height });
|
|
4015
|
-
return
|
|
3844
|
+
return bc(a, o.data);
|
|
4016
3845
|
})
|
|
4017
3846
|
), () => {
|
|
4018
3847
|
for (const n of r)
|
|
4019
3848
|
n();
|
|
4020
3849
|
};
|
|
4021
3850
|
}
|
|
4022
|
-
const
|
|
3851
|
+
const Rr = () => {
|
|
4023
3852
|
if (typeof navigator > "u")
|
|
4024
3853
|
return !1;
|
|
4025
3854
|
const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
4026
3855
|
return e || r;
|
|
4027
|
-
},
|
|
3856
|
+
}, Lc = globalThis;
|
|
4028
3857
|
function le() {
|
|
4029
|
-
if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" ||
|
|
3858
|
+
if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" || Lc.crossOriginIsolated === !1)
|
|
4030
3859
|
return !1;
|
|
4031
3860
|
try {
|
|
4032
3861
|
new SharedArrayBuffer(1);
|
|
@@ -4035,10 +3864,10 @@ function le() {
|
|
|
4035
3864
|
}
|
|
4036
3865
|
return !0;
|
|
4037
3866
|
}
|
|
4038
|
-
function
|
|
3867
|
+
function br(t) {
|
|
4039
3868
|
return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
|
|
4040
3869
|
}
|
|
4041
|
-
function
|
|
3870
|
+
function vc(t) {
|
|
4042
3871
|
return new Worker(
|
|
4043
3872
|
"" + new URL("assets/audio-playback-worker-Cwm3GaAx.js", import.meta.url).href,
|
|
4044
3873
|
{
|
|
@@ -4047,7 +3876,7 @@ function Xc(t) {
|
|
|
4047
3876
|
}
|
|
4048
3877
|
);
|
|
4049
3878
|
}
|
|
4050
|
-
const ae = 48e3,
|
|
3879
|
+
const ae = 48e3, b = 2, kr = 1500, ot = 512, at = "playback", Pc = 120, Fc = 300, Bc = 4, Gc = 200, xc = 100, Vc = 8e3, Wc = 10, Ur = 100, ke = 50, Dr = 128, Hc = 20, $c = !0, x = 1500, Kc = -20, Yc = -100, jc = 200, g = L("IkonAudioPlayback"), zc = () => {
|
|
4051
3880
|
if (typeof navigator > "u" || typeof window > "u")
|
|
4052
3881
|
return !1;
|
|
4053
3882
|
const t = navigator.userAgent, e = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
@@ -4059,19 +3888,19 @@ const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback", Jc = 120, Qc = 300
|
|
|
4059
3888
|
function K(t) {
|
|
4060
3889
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
4061
3890
|
}
|
|
4062
|
-
function
|
|
3891
|
+
function Xc(t) {
|
|
4063
3892
|
return `
|
|
4064
3893
|
// Audio buffer constants
|
|
4065
3894
|
const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
|
|
4066
3895
|
const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
|
|
4067
|
-
const BUFFER_TARGET_MIN_MS = ${
|
|
4068
|
-
const BUFFER_TARGET_MAX_MS = ${
|
|
4069
|
-
const JITTER_MULTIPLIER = ${
|
|
3896
|
+
const BUFFER_TARGET_MIN_MS = ${Pc};
|
|
3897
|
+
const BUFFER_TARGET_MAX_MS = ${Fc};
|
|
3898
|
+
const JITTER_MULTIPLIER = ${Bc};
|
|
4070
3899
|
const LOCAL_BUFFER_MAX_MS = ${kr};
|
|
4071
|
-
const CONTROL_PERIOD_MS = ${
|
|
4072
|
-
const UNDERRUN_JUMP_MS = ${
|
|
4073
|
-
const STABLE_TIME_TO_DECREASE_MS = ${
|
|
4074
|
-
const DECREASE_STEP_MS = ${
|
|
3900
|
+
const CONTROL_PERIOD_MS = ${Gc};
|
|
3901
|
+
const UNDERRUN_JUMP_MS = ${xc};
|
|
3902
|
+
const STABLE_TIME_TO_DECREASE_MS = ${Vc};
|
|
3903
|
+
const DECREASE_STEP_MS = ${Wc};
|
|
4075
3904
|
const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
|
|
4076
3905
|
|
|
4077
3906
|
// Pre-computed reciprocals for division-free calculations
|
|
@@ -4090,7 +3919,7 @@ const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
|
|
|
4090
3919
|
const RENDER_QUANTUM_SIZE = ${Dr};
|
|
4091
3920
|
|
|
4092
3921
|
// Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
|
|
4093
|
-
const BUFFER_REDUCTION_CROSSFADE_MS = ${
|
|
3922
|
+
const BUFFER_REDUCTION_CROSSFADE_MS = ${Hc};
|
|
4094
3923
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
|
|
4095
3924
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
|
|
4096
3925
|
|
|
@@ -4301,7 +4130,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
|
|
|
4301
4130
|
this.statsIntervalSamples = Math.max(1, Math.round((OUTPUT_SAMPLE_RATE_HZ * statusIntervalMs) / 1000));
|
|
4302
4131
|
|
|
4303
4132
|
// Normalization config (hardcoded)
|
|
4304
|
-
this.normalizationEnabled = ${
|
|
4133
|
+
this.normalizationEnabled = ${$c};
|
|
4305
4134
|
|
|
4306
4135
|
// Stream states for audio buffer
|
|
4307
4136
|
this.streams = new Map();
|
|
@@ -4977,7 +4806,7 @@ class je {
|
|
|
4977
4806
|
config;
|
|
4978
4807
|
enabled = !1;
|
|
4979
4808
|
stateUnsubscribe = null;
|
|
4980
|
-
isMobile =
|
|
4809
|
+
isMobile = zc();
|
|
4981
4810
|
boundVisibilityChange = null;
|
|
4982
4811
|
boundPageHide = null;
|
|
4983
4812
|
unlockHandler = null;
|
|
@@ -5088,7 +4917,7 @@ class je {
|
|
|
5088
4917
|
* (e.g., button click/release) to ensure the AudioContext can be recreated.
|
|
5089
4918
|
*/
|
|
5090
4919
|
requestRecovery() {
|
|
5091
|
-
if (this.enabled &&
|
|
4920
|
+
if (this.enabled && Rr() && this.audioContext) {
|
|
5092
4921
|
this.stopAudioGraph();
|
|
5093
4922
|
try {
|
|
5094
4923
|
const e = new AudioContext({
|
|
@@ -5182,31 +5011,31 @@ class je {
|
|
|
5182
5011
|
const e = this.audioContext;
|
|
5183
5012
|
if (!e)
|
|
5184
5013
|
return null;
|
|
5185
|
-
const r = e.currentTime, n = e.sampleRate, s =
|
|
5014
|
+
const r = e.currentTime, n = e.sampleRate, s = b;
|
|
5186
5015
|
for (const i of this.visemeBuffers.values()) {
|
|
5187
5016
|
if (!i.timingEstablished || i.count === 0)
|
|
5188
5017
|
continue;
|
|
5189
5018
|
const o = r - i.playbackStartContextTime;
|
|
5190
5019
|
if (o < 0)
|
|
5191
5020
|
continue;
|
|
5192
|
-
const a = o * n * s, c = i.frames, u = i.count, d = (i.head - u +
|
|
5193
|
-
let h = null,
|
|
5021
|
+
const a = o * n * s, c = i.frames, u = i.count, d = (i.head - u + x) % x;
|
|
5022
|
+
let h = null, E = null;
|
|
5194
5023
|
for (let l = 0; l < u; l++) {
|
|
5195
|
-
const N = (d + l) %
|
|
5196
|
-
if (
|
|
5024
|
+
const N = (d + l) % x, w = c[N], v = w.samplePosition + Math.max(w.frameSamples, 1);
|
|
5025
|
+
if (w.samplePosition <= a && (h = w), v > a && !E && (E = w, w.samplePosition <= a))
|
|
5197
5026
|
break;
|
|
5198
5027
|
}
|
|
5199
5028
|
if (!h)
|
|
5200
5029
|
continue;
|
|
5201
|
-
const
|
|
5202
|
-
if (a >
|
|
5030
|
+
const p = h.samplePosition + Math.max(h.frameSamples, 1);
|
|
5031
|
+
if (a > p && !E)
|
|
5203
5032
|
continue;
|
|
5204
|
-
if (!
|
|
5033
|
+
if (!E)
|
|
5205
5034
|
return this._visemeResult.mouthOpenY = h.mouthOpenY, this._visemeResult.mouthForm = h.mouthForm, this._visemeResult;
|
|
5206
|
-
const I = h.samplePosition,
|
|
5207
|
-
if (h !==
|
|
5035
|
+
const I = h.samplePosition, T = Math.max(h.frameSamples, 1), _ = I + T;
|
|
5036
|
+
if (h !== E && E.samplePosition > h.samplePosition && _ > I) {
|
|
5208
5037
|
const l = Math.min(1, Math.max(0, (a - I) / (_ - I)));
|
|
5209
|
-
this._visemeResult.mouthOpenY = h.mouthOpenY + l * (
|
|
5038
|
+
this._visemeResult.mouthOpenY = h.mouthOpenY + l * (E.mouthOpenY - h.mouthOpenY), this._visemeResult.mouthForm = h.mouthForm + l * (E.mouthForm - h.mouthForm);
|
|
5210
5039
|
} else
|
|
5211
5040
|
this._visemeResult.mouthOpenY = h.mouthOpenY, this._visemeResult.mouthForm = h.mouthForm;
|
|
5212
5041
|
return this._visemeResult;
|
|
@@ -5237,21 +5066,21 @@ class je {
|
|
|
5237
5066
|
} catch (u) {
|
|
5238
5067
|
try {
|
|
5239
5068
|
this.audioContext = new AudioContext({ latencyHint: c });
|
|
5240
|
-
} catch (
|
|
5069
|
+
} catch (f) {
|
|
5241
5070
|
try {
|
|
5242
5071
|
this.audioContext = new AudioContext();
|
|
5243
5072
|
} catch (d) {
|
|
5244
5073
|
g.warn(`Failed to create AudioContext: ${K(d)}`), this.audioContext = null;
|
|
5245
5074
|
return;
|
|
5246
5075
|
}
|
|
5247
|
-
g.debug(`AudioContext latencyHint unsupported: ${K(
|
|
5076
|
+
g.debug(`AudioContext latencyHint unsupported: ${K(f)}`);
|
|
5248
5077
|
}
|
|
5249
5078
|
g.debug(`AudioContext sample rate request unsupported: ${K(u)}`);
|
|
5250
5079
|
}
|
|
5251
5080
|
this.outputSampleRateHz = this.audioContext.sampleRate || ae, this.outputSampleRateHz !== a && g.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
|
|
5252
5081
|
}
|
|
5253
5082
|
const n = this.audioContext, s = this.resolveDiagnosticsConfig();
|
|
5254
|
-
if ((this.config.performance?.preferAudioWorklet ?? !0) &&
|
|
5083
|
+
if ((this.config.performance?.preferAudioWorklet ?? !0) && br(n)) {
|
|
5255
5084
|
await this.ensureAudioWorklet(n, s, e, r);
|
|
5256
5085
|
return;
|
|
5257
5086
|
}
|
|
@@ -5301,9 +5130,9 @@ class je {
|
|
|
5301
5130
|
setupMediaSession() {
|
|
5302
5131
|
if (!(typeof document > "u")) {
|
|
5303
5132
|
if (!this.silentAudioElement) {
|
|
5304
|
-
const s = new ArrayBuffer(882044), i = new DataView(s), o = (u,
|
|
5305
|
-
for (let d = 0; d <
|
|
5306
|
-
i.setUint8(u + d,
|
|
5133
|
+
const s = new ArrayBuffer(882044), i = new DataView(s), o = (u, f) => {
|
|
5134
|
+
for (let d = 0; d < f.length; d++)
|
|
5135
|
+
i.setUint8(u + d, f.charCodeAt(d));
|
|
5307
5136
|
};
|
|
5308
5137
|
o(0, "RIFF"), i.setUint32(4, 36 + 441e3 * 2, !0), o(8, "WAVE"), o(12, "fmt "), i.setUint32(16, 16, !0), i.setUint16(20, 1, !0), i.setUint16(22, 1, !0), i.setUint32(24, 44100, !0), i.setUint32(28, 44100 * 2, !0), i.setUint16(32, 2, !0), i.setUint16(34, 16, !0), o(36, "data"), i.setUint32(40, 441e3 * 2, !0);
|
|
5309
5138
|
const a = new Blob([s], { type: "audio/wav" }), c = URL.createObjectURL(a);
|
|
@@ -5404,17 +5233,17 @@ class je {
|
|
|
5404
5233
|
await this.resumeWithTimeout(e), this.getContextState(e) === "running" && this.removeUnlockHandler();
|
|
5405
5234
|
} catch {
|
|
5406
5235
|
}
|
|
5407
|
-
const i = `${this.outputSampleRateHz}_${
|
|
5236
|
+
const i = `${this.outputSampleRateHz}_${b}`;
|
|
5408
5237
|
if (!this.workletModuleUrl || this.workletModuleKey !== i) {
|
|
5409
5238
|
if (this.workletModuleUrl)
|
|
5410
5239
|
try {
|
|
5411
5240
|
URL.revokeObjectURL(this.workletModuleUrl);
|
|
5412
5241
|
} catch {
|
|
5413
5242
|
}
|
|
5414
|
-
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
5243
|
+
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([Xc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: b })], { type: "text/javascript" }));
|
|
5415
5244
|
}
|
|
5416
|
-
this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((
|
|
5417
|
-
throw g.warn(`Failed to load AudioWorklet module, falling back: ${K(
|
|
5245
|
+
this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((f) => {
|
|
5246
|
+
throw g.warn(`Failed to load AudioWorklet module, falling back: ${K(f)}`), f;
|
|
5418
5247
|
}));
|
|
5419
5248
|
try {
|
|
5420
5249
|
await this.workletReady;
|
|
@@ -5427,14 +5256,14 @@ class je {
|
|
|
5427
5256
|
this.audioWorkletNode = new AudioWorkletNode(e, "ikon-audio-player", {
|
|
5428
5257
|
numberOfInputs: 0,
|
|
5429
5258
|
numberOfOutputs: 1,
|
|
5430
|
-
outputChannelCount: [
|
|
5259
|
+
outputChannelCount: [b],
|
|
5431
5260
|
processorOptions: {
|
|
5432
5261
|
outputAudioConfig: { diagnostics: r },
|
|
5433
5262
|
useSharedArrayBuffer: a,
|
|
5434
|
-
outputChannels:
|
|
5263
|
+
outputChannels: b
|
|
5435
5264
|
}
|
|
5436
|
-
}), this.audioWorkletNode.port.onmessage = (
|
|
5437
|
-
const d =
|
|
5265
|
+
}), this.audioWorkletNode.port.onmessage = (f) => {
|
|
5266
|
+
const d = f.data;
|
|
5438
5267
|
if (!(!d || typeof d != "object")) {
|
|
5439
5268
|
if (d.type === "stats") {
|
|
5440
5269
|
if (!r.enabled)
|
|
@@ -5451,8 +5280,8 @@ class je {
|
|
|
5451
5280
|
}
|
|
5452
5281
|
}, this.audioWorkletNode.connect(e.destination), this.stopScriptProcessorDiagnostics(), await this.resumeAudioContextIfPossible(e, n, s), this.rebindWorkerTransportIfNeeded();
|
|
5453
5282
|
const c = this.pendingWorkletMessages.splice(0);
|
|
5454
|
-
for (const
|
|
5455
|
-
this.postToWorklet(
|
|
5283
|
+
for (const f of c)
|
|
5284
|
+
this.postToWorklet(f);
|
|
5456
5285
|
const u = this.getContextState(e) === "running";
|
|
5457
5286
|
this.notifyPlaybackActive(u);
|
|
5458
5287
|
}
|
|
@@ -5460,59 +5289,59 @@ class je {
|
|
|
5460
5289
|
if (this.scriptProcessorNode)
|
|
5461
5290
|
return;
|
|
5462
5291
|
this.stopAudioWorklet(), this.pendingWorkletMessages = [];
|
|
5463
|
-
const n = 1024, s = new Float32Array(n *
|
|
5292
|
+
const n = 1024, s = new Float32Array(n * b), i = Math.round(this.outputSampleRateHz * Ur / 1e3), o = Math.round(this.outputSampleRateHz * ke / 1e3), a = 1 / i, c = 1 / o, u = new Array(b), f = [], d = e.createScriptProcessor(n, 0, b);
|
|
5464
5293
|
d.onaudioprocess = (h) => {
|
|
5465
|
-
const
|
|
5466
|
-
for (let _ = 0; _ <
|
|
5467
|
-
const l =
|
|
5294
|
+
const E = h.outputBuffer, p = E.numberOfChannels, I = E.length;
|
|
5295
|
+
for (let _ = 0; _ < p; _++) {
|
|
5296
|
+
const l = E.getChannelData(_);
|
|
5468
5297
|
l.fill(0), u[_] = l;
|
|
5469
5298
|
}
|
|
5470
|
-
let
|
|
5471
|
-
|
|
5299
|
+
let T = 0;
|
|
5300
|
+
f.length = 0;
|
|
5472
5301
|
for (const [_, l] of this.fallbackQueues.entries()) {
|
|
5473
|
-
l.totalSamples > 0 && (
|
|
5474
|
-
for (let
|
|
5302
|
+
l.totalSamples > 0 && (T += 1), (l.ending || l.inputDrained) && l.fadeDirection !== "out" && l.totalSamples / p * 1e3 / this.outputSampleRateHz <= ke * 2 && (l.fadeDirection = "out"), this.readFromFallbackQueue(l, s), (l.totalSamples > 0 || !l.hasLastOut) && ((!l.lastOut || l.lastOut.length !== s.length) && (l.lastOut = new Float32Array(s.length)), l.lastOut.set(s), l.hasLastOut = !0);
|
|
5303
|
+
for (let w = 0; w < I; w++) {
|
|
5475
5304
|
l.fadeDirection === "in" ? (l.fadeGain = Math.min(1, l.fadeGain + a), l.fadeGain >= 1 && (l.fadeDirection = "none")) : l.fadeDirection === "out" && (l.fadeGain = Math.max(0, l.fadeGain - c), l.fadeGain <= 0 && (l.fadeDirection = "none"));
|
|
5476
|
-
for (let v = 0; v <
|
|
5477
|
-
const M = s[
|
|
5478
|
-
u[v][
|
|
5305
|
+
for (let v = 0; v < p; v++) {
|
|
5306
|
+
const M = s[w * p + v];
|
|
5307
|
+
u[v][w] += M * l.fadeGain;
|
|
5479
5308
|
}
|
|
5480
5309
|
}
|
|
5481
5310
|
const N = l.ending || l.inputDrained;
|
|
5482
5311
|
if (N && l.totalSamples <= 0) {
|
|
5483
5312
|
if (l.fadeDirection === "out" && l.fadeGain > 1e-3) {
|
|
5484
|
-
for (let
|
|
5313
|
+
for (let w = 0; w < I; w++)
|
|
5485
5314
|
if (l.fadeGain = Math.max(0, l.fadeGain - c), l.fadeGain <= 1e-3) {
|
|
5486
5315
|
l.fadeGain = 0, l.fadeDirection = "none";
|
|
5487
5316
|
break;
|
|
5488
5317
|
}
|
|
5489
5318
|
}
|
|
5490
|
-
l.fadeGain <= 1e-3 && l.ending &&
|
|
5319
|
+
l.fadeGain <= 1e-3 && l.ending && f.push(_);
|
|
5491
5320
|
} else if (!N && l.totalSamples <= 0 && l.hasLastOut && l.lastOut && l.fadeGain > 1e-3) {
|
|
5492
5321
|
l.fadeDirection = "out", l.underrunPending = !0;
|
|
5493
|
-
const
|
|
5322
|
+
const w = l.lastOut, v = I - 1;
|
|
5494
5323
|
for (let M = 0; M < I; M++) {
|
|
5495
5324
|
l.fadeGain = Math.max(0, l.fadeGain - c), l.fadeGain <= 0 && (l.fadeDirection = "none");
|
|
5496
|
-
for (let $ = 0; $ <
|
|
5497
|
-
const
|
|
5498
|
-
u[$][M] +=
|
|
5325
|
+
for (let $ = 0; $ < p; $++) {
|
|
5326
|
+
const Gr = w[v * p + $];
|
|
5327
|
+
u[$][M] += Gr * l.fadeGain;
|
|
5499
5328
|
}
|
|
5500
5329
|
}
|
|
5501
5330
|
}
|
|
5502
5331
|
}
|
|
5503
|
-
if (
|
|
5504
|
-
for (const _ of
|
|
5332
|
+
if (f.length > 0) {
|
|
5333
|
+
for (const _ of f)
|
|
5505
5334
|
this.fallbackQueues.delete(_), this.activeStreams.delete(_);
|
|
5506
5335
|
this.activeStreams.size === 0 && this.removeUnlockHandler();
|
|
5507
5336
|
}
|
|
5508
|
-
if (
|
|
5509
|
-
const _ = 1 / Math.sqrt(
|
|
5337
|
+
if (T > 1) {
|
|
5338
|
+
const _ = 1 / Math.sqrt(T);
|
|
5510
5339
|
for (let l = 0; l < I; l++)
|
|
5511
|
-
for (let N = 0; N <
|
|
5340
|
+
for (let N = 0; N < p; N++)
|
|
5512
5341
|
u[N][l] *= _;
|
|
5513
5342
|
}
|
|
5514
5343
|
for (let _ = 0; _ < I; _++)
|
|
5515
|
-
for (let l = 0; l <
|
|
5344
|
+
for (let l = 0; l < p; l++) {
|
|
5516
5345
|
const N = u[l][_];
|
|
5517
5346
|
u[l][_] = N > 1 ? 1 : N < -1 ? -1 : N;
|
|
5518
5347
|
}
|
|
@@ -5536,7 +5365,7 @@ class je {
|
|
|
5536
5365
|
e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
|
|
5537
5366
|
}
|
|
5538
5367
|
trimFallbackQueue(e) {
|
|
5539
|
-
const r = Math.floor(this.outputSampleRateHz *
|
|
5368
|
+
const r = Math.floor(this.outputSampleRateHz * b * kr / 1e3), n = e.totalSamples - r;
|
|
5540
5369
|
n <= 0 || this.skipFromFallbackQueue(e, n);
|
|
5541
5370
|
}
|
|
5542
5371
|
stopScriptProcessorDiagnostics() {
|
|
@@ -5555,7 +5384,7 @@ class je {
|
|
|
5555
5384
|
for (const [n, s] of this.fallbackQueues.entries()) {
|
|
5556
5385
|
if (s.totalSamples <= 0)
|
|
5557
5386
|
continue;
|
|
5558
|
-
const o = s.totalSamples /
|
|
5387
|
+
const o = s.totalSamples / b * 1e3 / this.outputSampleRateHz;
|
|
5559
5388
|
g.debug(`[Audio] stream=${n.substring(0, 8)} buffer=${o.toFixed(0)}ms renderer=ScriptProcessor`);
|
|
5560
5389
|
}
|
|
5561
5390
|
}, r);
|
|
@@ -5638,7 +5467,7 @@ class je {
|
|
|
5638
5467
|
type: "rebind",
|
|
5639
5468
|
transport: s,
|
|
5640
5469
|
outputSampleRate: this.outputSampleRateHz,
|
|
5641
|
-
outputChannels:
|
|
5470
|
+
outputChannels: b
|
|
5642
5471
|
});
|
|
5643
5472
|
} catch {
|
|
5644
5473
|
}
|
|
@@ -5650,39 +5479,39 @@ class je {
|
|
|
5650
5479
|
g.warn("Audio decode worker unavailable (Workers not supported)");
|
|
5651
5480
|
return;
|
|
5652
5481
|
}
|
|
5653
|
-
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask:
|
|
5482
|
+
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: S.GROUP_AUDIO });
|
|
5654
5483
|
if (!e) {
|
|
5655
5484
|
this.enabled && g.debug("Audio pipeline waiting for client connection");
|
|
5656
5485
|
return;
|
|
5657
5486
|
}
|
|
5658
5487
|
this.protocolPort = e;
|
|
5659
5488
|
try {
|
|
5660
|
-
this.audioWorker = new
|
|
5489
|
+
this.audioWorker = new vc();
|
|
5661
5490
|
} catch (d) {
|
|
5662
5491
|
g.warn(`Failed to create audio worker: ${K(d)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
5663
5492
|
return;
|
|
5664
5493
|
}
|
|
5665
5494
|
const r = this.audioWorker;
|
|
5666
5495
|
r.addEventListener("message", (d) => this.onAudioWorkerMessage(d.data)), r.addEventListener("error", (d) => {
|
|
5667
|
-
const h = [d.message, d.filename, d.lineno, d.colno].filter((
|
|
5496
|
+
const h = [d.message, d.filename, d.lineno, d.colno].filter((E) => E != null && String(E).length > 0);
|
|
5668
5497
|
g.error(`Audio worker failed: ${h.join(" ")}`.trim());
|
|
5669
5498
|
});
|
|
5670
5499
|
const s = (this.config.performance?.preferSharedArrayBuffer ?? !0) && !!this.audioWorkletNode && le(), i = this.config.performance?.preferWebCodecs ?? !0, o = {
|
|
5671
5500
|
type: "configure",
|
|
5672
5501
|
transport: s ? "sab" : "pcm",
|
|
5673
5502
|
outputSampleRate: this.outputSampleRateHz,
|
|
5674
|
-
outputChannels:
|
|
5503
|
+
outputChannels: b,
|
|
5675
5504
|
preferWebCodecs: i
|
|
5676
5505
|
};
|
|
5677
5506
|
r.postMessage(o), r.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
|
|
5678
|
-
const a = this.audioWorkletNode ? "AudioWorklet" : "ScriptProcessor", c = s ? "SharedArrayBuffer" : "MessagePort",
|
|
5679
|
-
g.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${
|
|
5507
|
+
const a = this.audioWorkletNode ? "AudioWorklet" : "ScriptProcessor", c = s ? "SharedArrayBuffer" : "MessagePort", f = i && typeof AudioDecoder < "u" ? "WebCodecs" : "WASM Opus";
|
|
5508
|
+
g.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${f}, output=${this.outputSampleRateHz}Hz/${b}ch`);
|
|
5680
5509
|
}
|
|
5681
5510
|
onAudioWorkerMessage(e) {
|
|
5682
5511
|
if (e.type === "streamBegin") {
|
|
5683
5512
|
if (this.activeStreams.add(e.streamId), e.shapeSets && e.shapeSets.length > 0 && (this.streamShapeSets.set(e.streamId, e.shapeSets), this.currentShapeSetValues.set(e.streamId, /* @__PURE__ */ new Map()), e.shapeSets.some((s) => s.Name === "Viseme"))) {
|
|
5684
|
-
const s = new Array(
|
|
5685
|
-
for (let i = 0; i <
|
|
5513
|
+
const s = new Array(x);
|
|
5514
|
+
for (let i = 0; i < x; i++)
|
|
5686
5515
|
s[i] = { samplePosition: 0, frameSamples: 0, mouthOpenY: 0, mouthForm: 0 };
|
|
5687
5516
|
this.visemeBuffers.set(e.streamId, {
|
|
5688
5517
|
frames: s,
|
|
@@ -5741,14 +5570,14 @@ class je {
|
|
|
5741
5570
|
s.epochTimestampSamples = e.timestampInterleavedSamples;
|
|
5742
5571
|
const c = this.audioContext;
|
|
5743
5572
|
if (c) {
|
|
5744
|
-
const u = (c.outputLatency ?? 0) + (c.baseLatency ?? 0),
|
|
5573
|
+
const u = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), f = Kc + u * 1e3, d = Math.min(jc, Math.max(Yc, f));
|
|
5745
5574
|
s.playbackStartContextTime = c.currentTime + d / 1e3;
|
|
5746
5575
|
}
|
|
5747
5576
|
s.timingEstablished = !0;
|
|
5748
5577
|
}
|
|
5749
5578
|
if (e.frameSizeInterleavedSamples > 0) {
|
|
5750
5579
|
const c = s.frames[s.head];
|
|
5751
|
-
c.samplePosition = e.timestampInterleavedSamples - s.epochTimestampSamples, c.frameSamples = e.frameSizeInterleavedSamples, c.mouthOpenY = a.Values[0], c.mouthForm = a.Values[1], s.head = (s.head + 1) %
|
|
5580
|
+
c.samplePosition = e.timestampInterleavedSamples - s.epochTimestampSamples, c.frameSamples = e.frameSizeInterleavedSamples, c.mouthOpenY = a.Values[0], c.mouthForm = a.Values[1], s.head = (s.head + 1) % x, s.count < x && s.count++;
|
|
5752
5581
|
}
|
|
5753
5582
|
}
|
|
5754
5583
|
}
|
|
@@ -5864,7 +5693,7 @@ class je {
|
|
|
5864
5693
|
}));
|
|
5865
5694
|
}
|
|
5866
5695
|
}
|
|
5867
|
-
function
|
|
5696
|
+
function Jc(t) {
|
|
5868
5697
|
return new Worker(
|
|
5869
5698
|
"" + new URL("assets/video-playback-worker-Bfm3r5xW.js", import.meta.url).href,
|
|
5870
5699
|
{
|
|
@@ -5877,7 +5706,7 @@ const V = L("IkonVideoPlayback");
|
|
|
5877
5706
|
function we(t) {
|
|
5878
5707
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
5879
5708
|
}
|
|
5880
|
-
class
|
|
5709
|
+
class Qc {
|
|
5881
5710
|
client;
|
|
5882
5711
|
config;
|
|
5883
5712
|
enabled = !0;
|
|
@@ -5952,7 +5781,7 @@ class hl {
|
|
|
5952
5781
|
}
|
|
5953
5782
|
let e;
|
|
5954
5783
|
try {
|
|
5955
|
-
e = new
|
|
5784
|
+
e = new Jc();
|
|
5956
5785
|
} catch (r) {
|
|
5957
5786
|
V.warn(`Failed to create video worker: ${we(r)}`);
|
|
5958
5787
|
return;
|
|
@@ -6041,7 +5870,7 @@ class hl {
|
|
|
6041
5870
|
const r = this.parseStreamId(e);
|
|
6042
5871
|
if (!r)
|
|
6043
5872
|
return;
|
|
6044
|
-
const n =
|
|
5873
|
+
const n = ga(ya(), this.client.sessionId ?? 0, {
|
|
6045
5874
|
trackId: r.trackId,
|
|
6046
5875
|
targetIds: [r.senderId]
|
|
6047
5876
|
});
|
|
@@ -6066,7 +5895,7 @@ class hl {
|
|
|
6066
5895
|
ensureProtocolPort() {
|
|
6067
5896
|
if (!this.worker || this.protocolPort)
|
|
6068
5897
|
return;
|
|
6069
|
-
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask:
|
|
5898
|
+
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: S.GROUP_VIDEO });
|
|
6070
5899
|
if (e) {
|
|
6071
5900
|
this.protocolPort = e;
|
|
6072
5901
|
try {
|
|
@@ -6101,11 +5930,11 @@ class hl {
|
|
|
6101
5930
|
}));
|
|
6102
5931
|
}
|
|
6103
5932
|
}
|
|
6104
|
-
class
|
|
5933
|
+
class Zc {
|
|
6105
5934
|
audio;
|
|
6106
5935
|
video;
|
|
6107
5936
|
constructor(e, r) {
|
|
6108
|
-
this.audio = new je(e, r?.audio), this.video = new
|
|
5937
|
+
this.audio = new je(e, r?.audio), this.video = new Qc(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
|
|
6109
5938
|
}
|
|
6110
5939
|
/**
|
|
6111
5940
|
* Releases media resources (workers, audio graph, decoders).
|
|
@@ -6116,7 +5945,7 @@ class dl {
|
|
|
6116
5945
|
this.audio.dispose(), this.video.dispose();
|
|
6117
5946
|
}
|
|
6118
5947
|
}
|
|
6119
|
-
class
|
|
5948
|
+
class qc {
|
|
6120
5949
|
static getStorageForCapacity(e, r) {
|
|
6121
5950
|
const n = Int32Array.BYTES_PER_ELEMENT * 2, s = r.BYTES_PER_ELEMENT * e;
|
|
6122
5951
|
return new SharedArrayBuffer(n + s);
|
|
@@ -6170,7 +5999,7 @@ class fl {
|
|
|
6170
5999
|
return n = (n + r) % this.capacity, Atomics.store(this.readWrite, 0, n), r;
|
|
6171
6000
|
}
|
|
6172
6001
|
}
|
|
6173
|
-
function
|
|
6002
|
+
function el(t) {
|
|
6174
6003
|
return new Worker(
|
|
6175
6004
|
"" + new URL("assets/audio-capture-worker-kpORDYGU.js", import.meta.url).href,
|
|
6176
6005
|
{
|
|
@@ -6179,12 +6008,12 @@ function pl(t) {
|
|
|
6179
6008
|
}
|
|
6180
6009
|
);
|
|
6181
6010
|
}
|
|
6182
|
-
const
|
|
6183
|
-
function
|
|
6011
|
+
const tl = L("IkonAudioCapture");
|
|
6012
|
+
function rl() {
|
|
6184
6013
|
const t = globalThis.crypto;
|
|
6185
6014
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
6186
6015
|
}
|
|
6187
|
-
function
|
|
6016
|
+
function nl() {
|
|
6188
6017
|
return `
|
|
6189
6018
|
class RingBuffer {
|
|
6190
6019
|
static getStorageForCapacity(capacity, type) {
|
|
@@ -6313,7 +6142,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
|
|
|
6313
6142
|
registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
|
|
6314
6143
|
`;
|
|
6315
6144
|
}
|
|
6316
|
-
class
|
|
6145
|
+
class sl {
|
|
6317
6146
|
constructor(e, r) {
|
|
6318
6147
|
this.client = e, this.config = r ?? {};
|
|
6319
6148
|
}
|
|
@@ -6333,12 +6162,12 @@ class _l {
|
|
|
6333
6162
|
ensureWorker() {
|
|
6334
6163
|
if (this.worker)
|
|
6335
6164
|
return this.worker;
|
|
6336
|
-
const e = new
|
|
6165
|
+
const e = new el();
|
|
6337
6166
|
return this.worker = e, e.addEventListener("message", (r) => {
|
|
6338
6167
|
const n = r.data;
|
|
6339
6168
|
if (n?.type === "error") {
|
|
6340
6169
|
const s = n.error;
|
|
6341
|
-
|
|
6170
|
+
tl.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
|
|
6342
6171
|
}
|
|
6343
6172
|
}), e;
|
|
6344
6173
|
}
|
|
@@ -6347,7 +6176,7 @@ class _l {
|
|
|
6347
6176
|
throw new Error("Cannot start audio capture before client is connected");
|
|
6348
6177
|
const r = this.ensureWorker();
|
|
6349
6178
|
if (!this.sendPort) {
|
|
6350
|
-
const n = this.client.createProtocolSendPort({ opcodeGroupsMask:
|
|
6179
|
+
const n = this.client.createProtocolSendPort({ opcodeGroupsMask: S.GROUP_AUDIO });
|
|
6351
6180
|
if (!n)
|
|
6352
6181
|
throw new Error("Failed to create protocol send port for audio capture");
|
|
6353
6182
|
this.sendPort = n, r.postMessage({ type: "attachSendPort", port: n.port }, [n.port]);
|
|
@@ -6374,9 +6203,9 @@ class _l {
|
|
|
6374
6203
|
return await navigator.mediaDevices.getUserMedia({ audio: n });
|
|
6375
6204
|
}
|
|
6376
6205
|
async ensureWorklet(e) {
|
|
6377
|
-
if (!
|
|
6206
|
+
if (!br(e))
|
|
6378
6207
|
throw new Error("AudioWorklet is not supported in this browser");
|
|
6379
|
-
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
6208
|
+
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([nl()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
|
|
6380
6209
|
try {
|
|
6381
6210
|
await this.workletReady;
|
|
6382
6211
|
} catch (r) {
|
|
@@ -6392,16 +6221,16 @@ class _l {
|
|
|
6392
6221
|
if (!i)
|
|
6393
6222
|
throw s.getTracks().forEach((_) => _.stop()), new Error("No audio track available");
|
|
6394
6223
|
await this.ensureWorklet(n);
|
|
6395
|
-
const o =
|
|
6224
|
+
const o = rl(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), u = n.createGain();
|
|
6396
6225
|
u.gain.value = 0, u.connect(n.destination);
|
|
6397
6226
|
const h = le() ? "sab" : "pcm";
|
|
6398
|
-
let
|
|
6227
|
+
let E;
|
|
6399
6228
|
if (h === "sab") {
|
|
6400
6229
|
const _ = Math.floor(n.sampleRate * 2);
|
|
6401
|
-
|
|
6230
|
+
E = qc.getStorageForCapacity(_, Float32Array);
|
|
6402
6231
|
}
|
|
6403
|
-
const
|
|
6404
|
-
|
|
6232
|
+
const p = this.ensureWorker();
|
|
6233
|
+
p.postMessage({
|
|
6405
6234
|
type: "start",
|
|
6406
6235
|
captureId: o,
|
|
6407
6236
|
senderId: r,
|
|
@@ -6413,21 +6242,21 @@ class _l {
|
|
|
6413
6242
|
preferWebCodecs: this.config.performance?.preferWebCodecs
|
|
6414
6243
|
},
|
|
6415
6244
|
transport: h,
|
|
6416
|
-
sharedArrayBuffer:
|
|
6245
|
+
sharedArrayBuffer: E
|
|
6417
6246
|
}), await new Promise((_, l) => {
|
|
6418
6247
|
const N = setTimeout(() => {
|
|
6419
|
-
|
|
6420
|
-
}, 1e4),
|
|
6248
|
+
p.removeEventListener("message", w), l(new Error("Audio capture worker start timeout"));
|
|
6249
|
+
}, 1e4), w = (v) => {
|
|
6421
6250
|
const M = v.data;
|
|
6422
6251
|
if (M?.type === "started" && M.captureId === o)
|
|
6423
|
-
clearTimeout(N),
|
|
6252
|
+
clearTimeout(N), p.removeEventListener("message", w), _();
|
|
6424
6253
|
else if (M?.type === "error" && M.captureId === o) {
|
|
6425
|
-
clearTimeout(N),
|
|
6254
|
+
clearTimeout(N), p.removeEventListener("message", w);
|
|
6426
6255
|
const $ = M.error;
|
|
6427
6256
|
l(new Error($?.message ?? "Audio capture failed to start"));
|
|
6428
6257
|
}
|
|
6429
6258
|
};
|
|
6430
|
-
|
|
6259
|
+
p.addEventListener("message", w);
|
|
6431
6260
|
});
|
|
6432
6261
|
const I = new AudioWorkletNode(n, "ikon-audio-capture", {
|
|
6433
6262
|
numberOfInputs: 1,
|
|
@@ -6436,17 +6265,17 @@ class _l {
|
|
|
6436
6265
|
processorOptions: {
|
|
6437
6266
|
transport: h,
|
|
6438
6267
|
channels: 1,
|
|
6439
|
-
sharedArrayBuffer:
|
|
6268
|
+
sharedArrayBuffer: E
|
|
6440
6269
|
}
|
|
6441
6270
|
});
|
|
6442
6271
|
c.connect(I), I.connect(u), h === "pcm" && (I.port.onmessage = (_) => {
|
|
6443
6272
|
const l = _.data;
|
|
6444
6273
|
if (!(!l || typeof l != "object") && l.type === "pcm" && l.pcm instanceof Float32Array) {
|
|
6445
6274
|
const N = l.pcm;
|
|
6446
|
-
|
|
6275
|
+
p.postMessage({ type: "pcm", captureId: o, pcm: N }, [N.buffer]);
|
|
6447
6276
|
}
|
|
6448
6277
|
});
|
|
6449
|
-
const
|
|
6278
|
+
const T = {
|
|
6450
6279
|
captureId: o,
|
|
6451
6280
|
trackId: a,
|
|
6452
6281
|
stream: s,
|
|
@@ -6457,14 +6286,14 @@ class _l {
|
|
|
6457
6286
|
gain: u,
|
|
6458
6287
|
stopped: !1,
|
|
6459
6288
|
startSegment: () => {
|
|
6460
|
-
|
|
6289
|
+
T.stopped || p.postMessage({ type: "startSegment", captureId: o });
|
|
6461
6290
|
},
|
|
6462
6291
|
endSegment: () => {
|
|
6463
|
-
|
|
6292
|
+
T.stopped || (p.postMessage({ type: "endSegment", captureId: o }), Rr() && T.stop());
|
|
6464
6293
|
},
|
|
6465
6294
|
stop: async () => {
|
|
6466
|
-
if (!
|
|
6467
|
-
|
|
6295
|
+
if (!T.stopped) {
|
|
6296
|
+
T.stopped = !0, this.captures.delete(o);
|
|
6468
6297
|
try {
|
|
6469
6298
|
c.disconnect();
|
|
6470
6299
|
} catch {
|
|
@@ -6481,20 +6310,20 @@ class _l {
|
|
|
6481
6310
|
s.getTracks().forEach((_) => _.stop());
|
|
6482
6311
|
} catch {
|
|
6483
6312
|
}
|
|
6484
|
-
|
|
6313
|
+
p.postMessage({ type: "stop", captureId: o });
|
|
6485
6314
|
}
|
|
6486
6315
|
}
|
|
6487
6316
|
};
|
|
6488
6317
|
return i.addEventListener("ended", () => {
|
|
6489
|
-
|
|
6490
|
-
}), this.captures.set(o,
|
|
6318
|
+
T.stop();
|
|
6319
|
+
}), this.captures.set(o, T), {
|
|
6491
6320
|
captureId: o,
|
|
6492
6321
|
get isActive() {
|
|
6493
|
-
return !
|
|
6322
|
+
return !T.stopped;
|
|
6494
6323
|
},
|
|
6495
|
-
startSegment:
|
|
6496
|
-
endSegment:
|
|
6497
|
-
stop:
|
|
6324
|
+
startSegment: T.startSegment,
|
|
6325
|
+
endSegment: T.endSegment,
|
|
6326
|
+
stop: T.stop
|
|
6498
6327
|
};
|
|
6499
6328
|
}
|
|
6500
6329
|
async stop(e) {
|
|
@@ -6539,9 +6368,9 @@ class _l {
|
|
|
6539
6368
|
}
|
|
6540
6369
|
}
|
|
6541
6370
|
}
|
|
6542
|
-
const Mr = 1280, Or = 720,
|
|
6543
|
-
async function
|
|
6544
|
-
const r = e.mime ?? Lr, n = e.quality ??
|
|
6371
|
+
const Mr = 1280, Or = 720, il = 30, Lr = "image/jpeg", ol = 0.92;
|
|
6372
|
+
async function al(t, e) {
|
|
6373
|
+
const r = e.mime ?? Lr, n = e.quality ?? ol;
|
|
6545
6374
|
if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
|
|
6546
6375
|
try {
|
|
6547
6376
|
return await t.convertToBlob({ type: r, quality: n });
|
|
@@ -6558,7 +6387,7 @@ async function wl(t, e) {
|
|
|
6558
6387
|
);
|
|
6559
6388
|
});
|
|
6560
6389
|
}
|
|
6561
|
-
class
|
|
6390
|
+
class cl {
|
|
6562
6391
|
async acquireCameraStream(e) {
|
|
6563
6392
|
if (!navigator.mediaDevices)
|
|
6564
6393
|
throw new Error("Media devices are not available in this environment");
|
|
@@ -6575,9 +6404,9 @@ class Al {
|
|
|
6575
6404
|
} catch {
|
|
6576
6405
|
}
|
|
6577
6406
|
try {
|
|
6578
|
-
await new Promise((
|
|
6579
|
-
const I = () =>
|
|
6580
|
-
s.addEventListener("loadedmetadata", I, { once: !0 }), s.addEventListener("error",
|
|
6407
|
+
await new Promise((E, p) => {
|
|
6408
|
+
const I = () => E(), T = () => p(new Error("Failed to load video element"));
|
|
6409
|
+
s.addEventListener("loadedmetadata", I, { once: !0 }), s.addEventListener("error", T, { once: !0 });
|
|
6581
6410
|
});
|
|
6582
6411
|
try {
|
|
6583
6412
|
await s.play();
|
|
@@ -6588,14 +6417,14 @@ class Al {
|
|
|
6588
6417
|
if (typeof OffscreenCanvas < "u")
|
|
6589
6418
|
u = new OffscreenCanvas(a, c);
|
|
6590
6419
|
else {
|
|
6591
|
-
const
|
|
6592
|
-
|
|
6420
|
+
const E = document.createElement("canvas");
|
|
6421
|
+
E.width = a, E.height = c, u = E;
|
|
6593
6422
|
}
|
|
6594
|
-
const
|
|
6595
|
-
if (!
|
|
6423
|
+
const f = u.getContext("2d", { alpha: !1 });
|
|
6424
|
+
if (!f)
|
|
6596
6425
|
throw new Error("2D canvas context unavailable");
|
|
6597
|
-
|
|
6598
|
-
const d = await
|
|
6426
|
+
f.drawImage(s, 0, 0, a, c);
|
|
6427
|
+
const d = await al(u, e), h = await d.arrayBuffer();
|
|
6599
6428
|
return {
|
|
6600
6429
|
mime: d.type || e.mime || Lr,
|
|
6601
6430
|
width: a,
|
|
@@ -6622,7 +6451,7 @@ class Al {
|
|
|
6622
6451
|
}
|
|
6623
6452
|
}
|
|
6624
6453
|
}
|
|
6625
|
-
function
|
|
6454
|
+
function ll(t) {
|
|
6626
6455
|
return new Worker(
|
|
6627
6456
|
"" + new URL("assets/video-capture-worker-BBs_62Fq.js", import.meta.url).href,
|
|
6628
6457
|
{
|
|
@@ -6632,17 +6461,17 @@ function yl(t) {
|
|
|
6632
6461
|
);
|
|
6633
6462
|
}
|
|
6634
6463
|
const lt = L("IkonVideoCapture");
|
|
6635
|
-
function
|
|
6464
|
+
function ul() {
|
|
6636
6465
|
const t = globalThis.crypto;
|
|
6637
6466
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
6638
6467
|
}
|
|
6639
|
-
function
|
|
6468
|
+
function hl() {
|
|
6640
6469
|
const t = globalThis.MediaStreamTrackProcessor;
|
|
6641
6470
|
if (!t)
|
|
6642
6471
|
throw new Error("MediaStreamTrackProcessor is not available in this browser");
|
|
6643
6472
|
return t;
|
|
6644
6473
|
}
|
|
6645
|
-
class
|
|
6474
|
+
class dl {
|
|
6646
6475
|
constructor(e) {
|
|
6647
6476
|
this.client = e;
|
|
6648
6477
|
}
|
|
@@ -6658,7 +6487,7 @@ class Cl {
|
|
|
6658
6487
|
ensureWorker() {
|
|
6659
6488
|
if (this.worker)
|
|
6660
6489
|
return this.worker;
|
|
6661
|
-
const e = new
|
|
6490
|
+
const e = new ll();
|
|
6662
6491
|
return this.worker = e, e.addEventListener("message", (r) => {
|
|
6663
6492
|
const n = r.data;
|
|
6664
6493
|
if (n?.type === "error") {
|
|
@@ -6672,20 +6501,20 @@ class Cl {
|
|
|
6672
6501
|
throw new Error("Cannot start video capture before client is connected");
|
|
6673
6502
|
const r = this.ensureWorker();
|
|
6674
6503
|
if (!this.sendPort) {
|
|
6675
|
-
const n = this.client.createProtocolSendPort({ opcodeGroupsMask:
|
|
6504
|
+
const n = this.client.createProtocolSendPort({ opcodeGroupsMask: S.GROUP_VIDEO });
|
|
6676
6505
|
if (!n)
|
|
6677
6506
|
throw new Error("Failed to create protocol send port for video capture");
|
|
6678
6507
|
this.sendPort = n, r.postMessage({ type: "attachSendPort", port: n.port }, [n.port]);
|
|
6679
6508
|
}
|
|
6680
6509
|
if (!this.protocolPort) {
|
|
6681
|
-
const n = this.client.createProtocolMessagePort({ opcodeGroupsMask:
|
|
6510
|
+
const n = this.client.createProtocolMessagePort({ opcodeGroupsMask: S.GROUP_VIDEO });
|
|
6682
6511
|
n && (this.protocolPort = n, r.postMessage({ type: "attachProtocolPort", port: n.port }, [n.port]));
|
|
6683
6512
|
}
|
|
6684
6513
|
}
|
|
6685
6514
|
async getMediaStream(e) {
|
|
6686
6515
|
if (!navigator.mediaDevices)
|
|
6687
6516
|
throw new Error("Media devices are not available in this environment");
|
|
6688
|
-
const r = e.constraints ?? {}, n = e.options?.framerate ??
|
|
6517
|
+
const r = e.constraints ?? {}, n = e.options?.framerate ?? il, s = {
|
|
6689
6518
|
...r,
|
|
6690
6519
|
frameRate: r.frameRate ?? { ideal: n }
|
|
6691
6520
|
};
|
|
@@ -6696,11 +6525,11 @@ class Cl {
|
|
|
6696
6525
|
if (!r)
|
|
6697
6526
|
throw new Error("Cannot start video capture before client is connected");
|
|
6698
6527
|
this.ensurePorts();
|
|
6699
|
-
const n =
|
|
6528
|
+
const n = ul(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
|
|
6700
6529
|
if (!i)
|
|
6701
6530
|
throw s.getTracks().forEach((I) => I.stop()), new Error("No video track available");
|
|
6702
|
-
const o = i.getSettings(), a = e.options?.width ?? o.width ?? Mr, c = e.options?.height ?? o.height ?? Or, u =
|
|
6703
|
-
|
|
6531
|
+
const o = i.getSettings(), a = e.options?.width ?? o.width ?? Mr, c = e.options?.height ?? o.height ?? Or, u = hl(), d = new u({ track: i }).readable, h = this.allocateTrackId(), E = this.ensureWorker();
|
|
6532
|
+
E.postMessage(
|
|
6704
6533
|
{
|
|
6705
6534
|
type: "start",
|
|
6706
6535
|
captureId: n,
|
|
@@ -6719,26 +6548,26 @@ class Cl {
|
|
|
6719
6548
|
},
|
|
6720
6549
|
[d]
|
|
6721
6550
|
);
|
|
6722
|
-
const
|
|
6551
|
+
const p = {
|
|
6723
6552
|
captureId: n,
|
|
6724
6553
|
trackId: h,
|
|
6725
6554
|
stream: s,
|
|
6726
6555
|
track: i,
|
|
6727
6556
|
stopped: !1,
|
|
6728
6557
|
stop: async () => {
|
|
6729
|
-
if (!
|
|
6730
|
-
|
|
6558
|
+
if (!p.stopped) {
|
|
6559
|
+
p.stopped = !0, this.captures.delete(n);
|
|
6731
6560
|
try {
|
|
6732
6561
|
s.getTracks().forEach((I) => I.stop());
|
|
6733
6562
|
} catch {
|
|
6734
6563
|
}
|
|
6735
|
-
|
|
6564
|
+
E.postMessage({ type: "stop", captureId: n });
|
|
6736
6565
|
}
|
|
6737
6566
|
}
|
|
6738
6567
|
};
|
|
6739
6568
|
return i.addEventListener("ended", () => {
|
|
6740
|
-
|
|
6741
|
-
}), this.captures.set(n,
|
|
6569
|
+
p.stop();
|
|
6570
|
+
}), this.captures.set(n, p), { captureId: n, stop: p.stop };
|
|
6742
6571
|
}
|
|
6743
6572
|
async startCamera(e) {
|
|
6744
6573
|
return this.start({ source: "camera", ...e });
|
|
@@ -6767,12 +6596,12 @@ class Cl {
|
|
|
6767
6596
|
this.protocolPort?.close(), this.protocolPort = null, this.sendPort?.close(), this.sendPort = null;
|
|
6768
6597
|
}
|
|
6769
6598
|
}
|
|
6770
|
-
class
|
|
6599
|
+
class fl {
|
|
6771
6600
|
audio;
|
|
6772
6601
|
video;
|
|
6773
6602
|
image;
|
|
6774
6603
|
constructor(e, r) {
|
|
6775
|
-
this.audio = new
|
|
6604
|
+
this.audio = new sl(e, r?.audio), this.video = new dl(e), this.image = new cl();
|
|
6776
6605
|
}
|
|
6777
6606
|
dispose() {
|
|
6778
6607
|
this.audio.dispose(), this.video.dispose();
|
|
@@ -6784,7 +6613,7 @@ const ut = {
|
|
|
6784
6613
|
[k.WebTransportProxy]: 2,
|
|
6785
6614
|
[k.WebSocketProxy]: 3
|
|
6786
6615
|
}, Ae = "ikon_endpoint_type";
|
|
6787
|
-
class
|
|
6616
|
+
class El {
|
|
6788
6617
|
isLocal;
|
|
6789
6618
|
workingEndpointType = null;
|
|
6790
6619
|
constructor(e) {
|
|
@@ -6846,7 +6675,7 @@ class Rl {
|
|
|
6846
6675
|
}
|
|
6847
6676
|
}
|
|
6848
6677
|
const A = L("IkonClient");
|
|
6849
|
-
class
|
|
6678
|
+
class Ml {
|
|
6850
6679
|
channelManager = null;
|
|
6851
6680
|
protocolWorker = null;
|
|
6852
6681
|
workerManagerState = null;
|
|
@@ -6901,27 +6730,27 @@ class Yl {
|
|
|
6901
6730
|
return this._mediaCapture;
|
|
6902
6731
|
}
|
|
6903
6732
|
constructor(e) {
|
|
6904
|
-
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ??
|
|
6733
|
+
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? Ba, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? Ga;
|
|
6905
6734
|
const r = [e.local, e.apiKey, e.sessionToken].filter(Boolean).length;
|
|
6906
6735
|
if (r === 0)
|
|
6907
6736
|
throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
|
|
6908
6737
|
if (r > 1)
|
|
6909
6738
|
throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
|
|
6910
|
-
this.endpointSelector = new
|
|
6739
|
+
this.endpointSelector = new El({
|
|
6911
6740
|
local: e.local
|
|
6912
|
-
}), this._functionRegistry = new
|
|
6741
|
+
}), this._functionRegistry = new Rc(), nt() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Ac(this._functionRegistry));
|
|
6913
6742
|
const n = e.audio ? {
|
|
6914
6743
|
performance: e.audio.performance,
|
|
6915
6744
|
background: e.audio.background,
|
|
6916
6745
|
diagnostics: e.audio.diagnostics
|
|
6917
6746
|
} : void 0, s = e.video ? { performance: e.video.performance } : void 0;
|
|
6918
|
-
this._media = new
|
|
6747
|
+
this._media = new Zc(this, { audio: n, video: s, mediaSession: e.mediaSession }), this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0), nt() && (this._mediaCapture = new fl(this, {
|
|
6919
6748
|
audio: {
|
|
6920
6749
|
performance: {
|
|
6921
6750
|
preferWebCodecs: e.audio?.performance?.preferWebCodecs
|
|
6922
6751
|
}
|
|
6923
6752
|
}
|
|
6924
|
-
}), this.unregisterMediaCaptureFunctions =
|
|
6753
|
+
}), this.unregisterMediaCaptureFunctions = Oc(this._functionRegistry, this));
|
|
6925
6754
|
}
|
|
6926
6755
|
_lastError = void 0;
|
|
6927
6756
|
/**
|
|
@@ -6986,7 +6815,7 @@ class Yl {
|
|
|
6986
6815
|
A.info("Disconnecting from Ikon server"), this.clearTimers(), this.cleanupLifecycleHandlers(), this._mediaCapture?.dispose(), this.unregisterMediaCaptureFunctions && (this.unregisterMediaCaptureFunctions(), this.unregisterMediaCaptureFunctions = null), this.unregisterBrowserFunctions && (this.unregisterBrowserFunctions(), this.unregisterBrowserFunctions = null), this.abortController?.abort(), this.abortController = null, this.disconnectProtocol(), this.authResponse = null, this._sessionId = void 0, this._globalState = null, this._globalStateReceived = !1, this._channelsConnected = !1, this._joinedHandled = !1, this._functionRegistry.detach(), this.setState("idle");
|
|
6987
6816
|
}
|
|
6988
6817
|
sendActionCall(e, r) {
|
|
6989
|
-
const n =
|
|
6818
|
+
const n = Zr(
|
|
6990
6819
|
{
|
|
6991
6820
|
ActionId: m.fromString(e),
|
|
6992
6821
|
PayloadJson: r ?? "{}"
|
|
@@ -7162,11 +6991,11 @@ class Yl {
|
|
|
7162
6991
|
async authenticate() {
|
|
7163
6992
|
const e = this.abortController?.signal;
|
|
7164
6993
|
if (this.config.local)
|
|
7165
|
-
return
|
|
6994
|
+
return ja(this.config.local, e);
|
|
7166
6995
|
if (this.config.apiKey)
|
|
7167
|
-
return
|
|
6996
|
+
return za(this.config.apiKey, e);
|
|
7168
6997
|
if (this.config.sessionToken)
|
|
7169
|
-
return
|
|
6998
|
+
return Xa(this.config.sessionToken, e);
|
|
7170
6999
|
throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
|
|
7171
7000
|
}
|
|
7172
7001
|
/**
|
|
@@ -7178,9 +7007,9 @@ class Yl {
|
|
|
7178
7007
|
this.notifyMessageSubscribers(e, r, n);
|
|
7179
7008
|
return;
|
|
7180
7009
|
}
|
|
7181
|
-
if (r ===
|
|
7010
|
+
if (r === S.CORE_GLOBAL_STATE)
|
|
7182
7011
|
try {
|
|
7183
|
-
this._globalState =
|
|
7012
|
+
this._globalState = Bo(e), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
|
|
7184
7013
|
} catch (s) {
|
|
7185
7014
|
A.error("Failed to parse GlobalState:", s);
|
|
7186
7015
|
}
|
|
@@ -7268,38 +7097,40 @@ class Yl {
|
|
|
7268
7097
|
}
|
|
7269
7098
|
let r;
|
|
7270
7099
|
try {
|
|
7271
|
-
r = new
|
|
7272
|
-
} catch (
|
|
7273
|
-
A.warn(`Failed to create protocol worker, falling back to main thread: ${
|
|
7100
|
+
r = new Ca();
|
|
7101
|
+
} catch (f) {
|
|
7102
|
+
A.warn(`Failed to create protocol worker, falling back to main thread: ${f}`), await this.connectProtocolOnMainThread(e);
|
|
7274
7103
|
return;
|
|
7275
7104
|
}
|
|
7276
7105
|
this.channelManager = null, this.protocolWorker = r, this.workerManagerState = "idle";
|
|
7277
|
-
const n = new Promise((
|
|
7278
|
-
const
|
|
7279
|
-
const
|
|
7280
|
-
if (
|
|
7281
|
-
const
|
|
7282
|
-
this.handleProtocolMessage(
|
|
7106
|
+
const n = new Promise((f, d) => {
|
|
7107
|
+
const h = (E) => {
|
|
7108
|
+
const p = E.data;
|
|
7109
|
+
if (p?.type === "protocol" && p.message instanceof ArrayBuffer) {
|
|
7110
|
+
const I = new Uint8Array(p.message);
|
|
7111
|
+
this.handleProtocolMessage(I);
|
|
7283
7112
|
return;
|
|
7284
7113
|
}
|
|
7285
|
-
if (
|
|
7286
|
-
const
|
|
7287
|
-
this.workerManagerState =
|
|
7288
|
-
const
|
|
7289
|
-
|
|
7114
|
+
if (p?.type === "state") {
|
|
7115
|
+
const I = p.state;
|
|
7116
|
+
this.workerManagerState = I;
|
|
7117
|
+
const T = p.activeType;
|
|
7118
|
+
T !== void 0 && this.endpointSelector.rememberWorkingType(T), this.handleChannelManagerStateChange(I), I === "connected" && f();
|
|
7290
7119
|
return;
|
|
7291
7120
|
}
|
|
7292
|
-
if (
|
|
7293
|
-
const
|
|
7294
|
-
|
|
7121
|
+
if (p?.type === "error") {
|
|
7122
|
+
const I = p.error, T = new Error(String(I?.message ?? "Worker error"));
|
|
7123
|
+
T.name = String(I?.name ?? "Error"), d(T);
|
|
7295
7124
|
}
|
|
7296
7125
|
};
|
|
7297
|
-
r.addEventListener("message",
|
|
7298
|
-
const
|
|
7299
|
-
|
|
7126
|
+
r.addEventListener("message", h), r.addEventListener("error", (E) => {
|
|
7127
|
+
const p = [E.message, E.filename, E.lineno, E.colno].filter((I) => I != null && String(I).length > 0);
|
|
7128
|
+
d(new Error(`Protocol worker failed: ${p.join(" ")}`.trim()));
|
|
7300
7129
|
});
|
|
7301
|
-
}), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ??
|
|
7302
|
-
this.updateWorkerInterestMask()
|
|
7130
|
+
}), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ?? Ze, o = this.config.timeouts?.reconnectBackoffMs ?? qe, a = this.config.timeouts?.maxReconnectAttempts ?? et;
|
|
7131
|
+
this.updateWorkerInterestMask();
|
|
7132
|
+
const c = typeof window < "u" ? new URLSearchParams(window.location.search) : null;
|
|
7133
|
+
(this.config.debug?.devtools || c?.get("devtools") === "true") && r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({
|
|
7303
7134
|
type: "connect",
|
|
7304
7135
|
sessionId: this._sessionId,
|
|
7305
7136
|
entrypoints: e,
|
|
@@ -7310,15 +7141,15 @@ class Yl {
|
|
|
7310
7141
|
});
|
|
7311
7142
|
try {
|
|
7312
7143
|
await n;
|
|
7313
|
-
} catch (
|
|
7314
|
-
A.warn(`Protocol worker connect failed, falling back to main thread: ${
|
|
7144
|
+
} catch (f) {
|
|
7145
|
+
A.warn(`Protocol worker connect failed, falling back to main thread: ${f}`), this.disconnectProtocol(), await this.connectProtocolOnMainThread(e);
|
|
7315
7146
|
}
|
|
7316
7147
|
}
|
|
7317
7148
|
async connectProtocolOnMainThread(e) {
|
|
7318
|
-
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new
|
|
7149
|
+
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new Fa({
|
|
7319
7150
|
sessionId: this._sessionId,
|
|
7320
|
-
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ??
|
|
7321
|
-
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ??
|
|
7151
|
+
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? Ze,
|
|
7152
|
+
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? qe,
|
|
7322
7153
|
maxReconnectAttempts: this.config.timeouts?.maxReconnectAttempts ?? et,
|
|
7323
7154
|
endpointSelector: this.endpointSelector,
|
|
7324
7155
|
onProtocolMessage: (r) => {
|
|
@@ -7357,7 +7188,7 @@ class Yl {
|
|
|
7357
7188
|
this.protocolWorker.postMessage({ type: "setInterest", opcodeGroupsMask: void 0 });
|
|
7358
7189
|
return;
|
|
7359
7190
|
}
|
|
7360
|
-
let e =
|
|
7191
|
+
let e = S.GROUP_CORE | S.GROUP_ACTIONS;
|
|
7361
7192
|
for (const [, r] of this.messageSubscribers.entries()) {
|
|
7362
7193
|
if (!r || r.opcodeGroupsMask === void 0) {
|
|
7363
7194
|
this.protocolWorker.postMessage({ type: "setInterest", opcodeGroupsMask: void 0 });
|
|
@@ -7446,121 +7277,121 @@ class Yl {
|
|
|
7446
7277
|
}
|
|
7447
7278
|
}
|
|
7448
7279
|
}
|
|
7449
|
-
function
|
|
7280
|
+
function Ol(t) {
|
|
7450
7281
|
return t === "connecting" || t === "connectingSlow" || t === "reconnecting";
|
|
7451
7282
|
}
|
|
7452
|
-
function
|
|
7283
|
+
function Ll(t) {
|
|
7453
7284
|
return t === "connected";
|
|
7454
7285
|
}
|
|
7455
|
-
function
|
|
7286
|
+
function vl(t) {
|
|
7456
7287
|
return t === "offline" || t === "offlineError" || t === "idle";
|
|
7457
7288
|
}
|
|
7458
|
-
function
|
|
7289
|
+
function Pl(t) {
|
|
7459
7290
|
return t === "offlineError";
|
|
7460
7291
|
}
|
|
7461
7292
|
const vr = /* @__PURE__ */ new Map();
|
|
7462
|
-
for (const [t, e] of Object.entries(
|
|
7293
|
+
for (const [t, e] of Object.entries(S))
|
|
7463
7294
|
typeof e == "number" && vr.set(e, t);
|
|
7464
|
-
function
|
|
7295
|
+
function Fl(t) {
|
|
7465
7296
|
return vr.get(t) ?? `UNKNOWN_${t}`;
|
|
7466
7297
|
}
|
|
7467
|
-
const
|
|
7468
|
-
let O = [], Ue =
|
|
7469
|
-
function
|
|
7298
|
+
const Pr = 1e3, Fr = Ir.INFO;
|
|
7299
|
+
let O = [], Ue = Pr, Br = Fr, De = null;
|
|
7300
|
+
function pl(t) {
|
|
7470
7301
|
t.level < Br || (O.push(t), O.length > Ue && (O = O.slice(-Ue)));
|
|
7471
7302
|
}
|
|
7472
|
-
function
|
|
7473
|
-
Ue = t?.maxBufferSize ??
|
|
7303
|
+
function Il(t) {
|
|
7304
|
+
Ue = t?.maxBufferSize ?? Pr, Br = t?.minLevel ?? Fr, O = [], ka(pl);
|
|
7474
7305
|
}
|
|
7475
|
-
function
|
|
7306
|
+
function Bl(t) {
|
|
7476
7307
|
De = t;
|
|
7477
7308
|
}
|
|
7478
|
-
function
|
|
7309
|
+
function Gl() {
|
|
7479
7310
|
return O;
|
|
7480
7311
|
}
|
|
7481
|
-
function
|
|
7312
|
+
function ml() {
|
|
7482
7313
|
const t = O;
|
|
7483
7314
|
return O = [], t;
|
|
7484
7315
|
}
|
|
7485
|
-
function
|
|
7316
|
+
function xl() {
|
|
7486
7317
|
if (!De || O.length === 0)
|
|
7487
7318
|
return 0;
|
|
7488
|
-
const t =
|
|
7319
|
+
const t = ml();
|
|
7489
7320
|
return De(t), t.length;
|
|
7490
7321
|
}
|
|
7491
|
-
function
|
|
7322
|
+
function Vl() {
|
|
7492
7323
|
O = [];
|
|
7493
7324
|
}
|
|
7494
|
-
function
|
|
7325
|
+
function Wl() {
|
|
7495
7326
|
return O.length;
|
|
7496
7327
|
}
|
|
7497
|
-
|
|
7328
|
+
Il();
|
|
7498
7329
|
export {
|
|
7499
7330
|
y as AuthenticationError,
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7331
|
+
Pa as Channel,
|
|
7332
|
+
Fa as ChannelManager,
|
|
7333
|
+
Tl as ChannelNotFoundError,
|
|
7503
7334
|
X as ClientType,
|
|
7504
7335
|
Ve as ConnectionError,
|
|
7505
7336
|
J as ContextType,
|
|
7506
|
-
|
|
7337
|
+
El as EndpointSelector,
|
|
7507
7338
|
k as EntrypointType,
|
|
7508
|
-
|
|
7509
|
-
|
|
7339
|
+
Rc as FunctionRegistry,
|
|
7340
|
+
Rl as IKON_AUTH_BASE_URL,
|
|
7510
7341
|
rt as IKON_AUTH_URL_DEV,
|
|
7511
7342
|
tt as IKON_AUTH_URL_PROD,
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7343
|
+
pe as IKON_BACKEND_URL_DEV,
|
|
7344
|
+
Re as IKON_BACKEND_URL_PROD,
|
|
7345
|
+
sl as IkonAudioCapture,
|
|
7515
7346
|
je as IkonAudioPlayback,
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7347
|
+
Ml as IkonClient,
|
|
7348
|
+
cl as IkonImageCapture,
|
|
7349
|
+
Zc as IkonMedia,
|
|
7350
|
+
fl as IkonMediaCapture,
|
|
7351
|
+
dl as IkonVideoCapture,
|
|
7352
|
+
Qc as IkonVideoPlayback,
|
|
7522
7353
|
We as KeepaliveTimeoutError,
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7354
|
+
Ir as LogLevel,
|
|
7355
|
+
Ra as MaxRetriesExceededError,
|
|
7356
|
+
wl as NoChannelsError,
|
|
7357
|
+
S as Opcode,
|
|
7358
|
+
ba as ProvisioningTimeoutError,
|
|
7359
|
+
Sl as SpaceNotFoundError,
|
|
7529
7360
|
W as TransportError,
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7361
|
+
Z as UserType,
|
|
7362
|
+
_l as asProtocolMessage,
|
|
7363
|
+
gl as clearDeviceId,
|
|
7364
|
+
Vl as clearLogBuffer,
|
|
7534
7365
|
L as createLogger,
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7366
|
+
Ul as deriveAuthUrl,
|
|
7367
|
+
kl as deriveBackendType,
|
|
7368
|
+
bl as deriveBackendUrl,
|
|
7369
|
+
Cl as extractUserIdFromToken,
|
|
7370
|
+
xl as flushLogs,
|
|
7371
|
+
Gl as getBufferedLogs,
|
|
7372
|
+
Wl as getLogBufferSize,
|
|
7373
|
+
yl as getLogLevel,
|
|
7374
|
+
Nl as getLogSink,
|
|
7375
|
+
Fl as getOpcodeName,
|
|
7545
7376
|
$e as getOrCreateDeviceId,
|
|
7546
|
-
|
|
7547
|
-
|
|
7377
|
+
Il as initializeLogSink,
|
|
7378
|
+
br as isAudioWorkletSupported,
|
|
7548
7379
|
nt as isBrowserEnvironment,
|
|
7549
7380
|
Ke as isCloudEnvironment,
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7381
|
+
Ll as isConnected,
|
|
7382
|
+
Ol as isConnecting,
|
|
7383
|
+
Pl as isError,
|
|
7384
|
+
vl as isOffline,
|
|
7554
7385
|
le as isSharedArrayBufferSupported,
|
|
7555
|
-
|
|
7556
|
-
|
|
7386
|
+
mr as isWebTransportSupported,
|
|
7387
|
+
Dl as parseUrlParams,
|
|
7557
7388
|
ue as readOpcode,
|
|
7558
7389
|
ce as readOpcodeGroup,
|
|
7559
7390
|
ne as readProtocolMessageHeaders,
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7391
|
+
Ac as registerBrowserFunctions,
|
|
7392
|
+
Al as setLogLevel,
|
|
7393
|
+
ka as setLogSink,
|
|
7394
|
+
Bl as setSendLogsCallback,
|
|
7395
|
+
ml as takeBufferedLogs,
|
|
7396
|
+
bc as withResultData
|
|
7566
7397
|
};
|