@ikonai/sdk 1.0.30 → 1.0.31
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 +1004 -992
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Ls = {
|
|
2
2
|
Compressed: 8
|
|
3
3
|
};
|
|
4
4
|
function _f(t) {
|
|
@@ -21,7 +21,7 @@ function ae(t) {
|
|
|
21
21
|
throw new Error("Protocol header exceeds payload length");
|
|
22
22
|
const m = [];
|
|
23
23
|
let S = 27;
|
|
24
|
-
for (let
|
|
24
|
+
for (let _ = 0; _ < c; _++)
|
|
25
25
|
m.push(n.getUint32(S, !0)), S += 4;
|
|
26
26
|
return {
|
|
27
27
|
length: r,
|
|
@@ -52,17 +52,17 @@ async function dt(t, e, n) {
|
|
|
52
52
|
throw new Error(`Unexpected payload type ${s.payloadType}`);
|
|
53
53
|
const i = 27 + s.targetIds.length * 4;
|
|
54
54
|
let o = r.subarray(i, s.length);
|
|
55
|
-
return (s.flags &
|
|
55
|
+
return (s.flags & Ls.Compressed) !== 0 && (o = await Fs(o)), o;
|
|
56
56
|
}
|
|
57
57
|
function P(t, e, n, r, s) {
|
|
58
58
|
const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], l = s?.payloadType ?? 8, f = 27 + c.length * 4, p = f + e.length, d = new Uint8Array(p), m = new DataView(d.buffer);
|
|
59
59
|
m.setUint32(0, p, !0), m.setUint32(4, t >>> 0, !0), m.setUint32(8, r >>> 0, !0), m.setUint32(12, i >>> 0, !0), m.setUint32(16, o >>> 0, !0), m.setUint32(20, c.length >>> 0, !0), m.setUint8(24, n & 255), m.setUint8(25, l & 255), m.setUint8(26, a & 255);
|
|
60
60
|
let S = 27;
|
|
61
|
-
for (let
|
|
62
|
-
m.setUint32(S, c[
|
|
61
|
+
for (let _ = 0; _ < c.length; _++)
|
|
62
|
+
m.setUint32(S, c[_] >>> 0, !0), S += 4;
|
|
63
63
|
return d.set(e, f), d;
|
|
64
64
|
}
|
|
65
|
-
async function
|
|
65
|
+
async function Fs(t) {
|
|
66
66
|
if (typeof DecompressionStream > "u")
|
|
67
67
|
throw new Error("DecompressionStream not supported");
|
|
68
68
|
const e = new DecompressionStream("gzip"), n = e.writable.getWriter(), r = new Uint8Array(t);
|
|
@@ -81,10 +81,10 @@ async function Ls(t) {
|
|
|
81
81
|
return a;
|
|
82
82
|
}
|
|
83
83
|
var O = /* @__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))(O || {});
|
|
84
|
-
const
|
|
84
|
+
const nn = 161, rn = 162, Le = new TextEncoder(), Bs = new TextDecoder("utf-8", { fatal: !0 });
|
|
85
85
|
class U {
|
|
86
86
|
constructor(e = 1) {
|
|
87
|
-
this.version = e, this.buffer.writeByte(
|
|
87
|
+
this.version = e, this.buffer.writeByte(nn), this.buffer.writeVarUInt(e >>> 0);
|
|
88
88
|
}
|
|
89
89
|
buffer = new q();
|
|
90
90
|
closed = !1;
|
|
@@ -142,7 +142,7 @@ class U {
|
|
|
142
142
|
this.writeVariableField(e, 10, o);
|
|
143
143
|
}
|
|
144
144
|
finish() {
|
|
145
|
-
return this.closed || (this.buffer.writeByte(
|
|
145
|
+
return this.closed || (this.buffer.writeByte(rn), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
|
|
146
146
|
}
|
|
147
147
|
writeFixedField(e, n, r) {
|
|
148
148
|
this.writeFieldHeader(e, n, 0), r();
|
|
@@ -151,7 +151,7 @@ class U {
|
|
|
151
151
|
this.writeFieldHeader(e, n, r.length), this.buffer.writeBytes(r);
|
|
152
152
|
}
|
|
153
153
|
writeFieldHeader(e, n, r) {
|
|
154
|
-
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(Fe(n)),
|
|
154
|
+
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(Fe(n)), Hs(n) && this.buffer.writeVarUInt(r >>> 0);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
class Ve {
|
|
@@ -275,7 +275,7 @@ class ht {
|
|
|
275
275
|
beginEntry() {
|
|
276
276
|
if (this.entryOpen)
|
|
277
277
|
throw new Error("Previous dictionary entry not completed");
|
|
278
|
-
return this.count++, this.entryOpen = !0, new
|
|
278
|
+
return this.count++, this.entryOpen = !0, new xs(this.keyType, this.valueType, this.payload, () => {
|
|
279
279
|
this.entryOpen = !1;
|
|
280
280
|
});
|
|
281
281
|
}
|
|
@@ -286,7 +286,7 @@ class ht {
|
|
|
286
286
|
return e.writeByte(Fe(this.keyType)), e.writeByte(Fe(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
class
|
|
289
|
+
class xs {
|
|
290
290
|
constructor(e, n, r, s) {
|
|
291
291
|
this.keyType = e, this.valueType = n, this.payload = r, this.onComplete = s;
|
|
292
292
|
}
|
|
@@ -487,7 +487,7 @@ class V {
|
|
|
487
487
|
const n = le(e);
|
|
488
488
|
if (n.length < 2)
|
|
489
489
|
throw new Error("Teleport payload too short");
|
|
490
|
-
if (n[0] !==
|
|
490
|
+
if (n[0] !== nn || n[n.length - 1] !== rn)
|
|
491
491
|
throw new Error("Teleport object missing markers");
|
|
492
492
|
const r = { offset: 1 }, s = W(n, r, "InvalidLength");
|
|
493
493
|
return new V(n, s, r.offset);
|
|
@@ -497,7 +497,7 @@ class V {
|
|
|
497
497
|
return null;
|
|
498
498
|
if (this.offset + 5 > this.buffer.length)
|
|
499
499
|
throw new Error("Teleport object truncated");
|
|
500
|
-
const e =
|
|
500
|
+
const e = $s(this.buffer, this.offset);
|
|
501
501
|
this.offset += 4;
|
|
502
502
|
const n = this.buffer[this.offset++], r = n >> 4 & 15;
|
|
503
503
|
if ((n & 15) !== 0)
|
|
@@ -510,7 +510,7 @@ class V {
|
|
|
510
510
|
const o = { offset: this.offset }, a = W(this.buffer, o, "InvalidLength");
|
|
511
511
|
F(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
|
|
512
512
|
}
|
|
513
|
-
return new
|
|
513
|
+
return new Ws(e, r, i);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
class K {
|
|
@@ -575,7 +575,7 @@ class K {
|
|
|
575
575
|
return this.ensureType(
|
|
576
576
|
12
|
|
577
577
|
/* String */
|
|
578
|
-
),
|
|
578
|
+
), Bs.decode(this.payload);
|
|
579
579
|
}
|
|
580
580
|
asGuid() {
|
|
581
581
|
return this.ensureType(
|
|
@@ -606,7 +606,7 @@ class K {
|
|
|
606
606
|
throw new Error(`Teleport value has type ${O[this.type]}, expected ${O[e]}`);
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
class
|
|
609
|
+
class Ws extends K {
|
|
610
610
|
constructor(e, n, r) {
|
|
611
611
|
super(n, r), this.fieldId = e;
|
|
612
612
|
}
|
|
@@ -713,7 +713,7 @@ class pt {
|
|
|
713
713
|
return null;
|
|
714
714
|
}
|
|
715
715
|
const e = this.readKey(), n = this.readValue();
|
|
716
|
-
return this.index++, new
|
|
716
|
+
return this.index++, new Gs(e, n);
|
|
717
717
|
}
|
|
718
718
|
readKey() {
|
|
719
719
|
const e = se(this.keyType);
|
|
@@ -772,7 +772,7 @@ class pt {
|
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
|
-
class
|
|
775
|
+
class Gs {
|
|
776
776
|
constructor(e, n) {
|
|
777
777
|
this.key = e, this.value = n;
|
|
778
778
|
}
|
|
@@ -906,7 +906,7 @@ function W(t, e, n) {
|
|
|
906
906
|
for (; e.offset < t.length; ) {
|
|
907
907
|
const o = t[e.offset++];
|
|
908
908
|
if (i++, r |= (o & 127) << s, (o & 128) === 0) {
|
|
909
|
-
if (i !==
|
|
909
|
+
if (i !== Vs(r))
|
|
910
910
|
throw new Error("Teleport VarUInt is not canonical");
|
|
911
911
|
return r >>> 0;
|
|
912
912
|
}
|
|
@@ -915,7 +915,7 @@ function W(t, e, n) {
|
|
|
915
915
|
}
|
|
916
916
|
throw new Error(n);
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function Vs(t) {
|
|
919
919
|
return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
|
|
920
920
|
}
|
|
921
921
|
function Fe(t, e = 0) {
|
|
@@ -923,7 +923,7 @@ function Fe(t, e = 0) {
|
|
|
923
923
|
throw new Error("Teleport flags must fit into 4 bits");
|
|
924
924
|
return (t & 15) << 4 | e & 15;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function Hs(t) {
|
|
927
927
|
return t === 12 || t === 13 || t === 9 || t === 11 || t === 10;
|
|
928
928
|
}
|
|
929
929
|
function se(t) {
|
|
@@ -954,7 +954,7 @@ function F(t, e, n) {
|
|
|
954
954
|
if (e < 0 || n < 0 || e + n > t.length)
|
|
955
955
|
throw new Error("Teleport payload exceeds bounds");
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function $s(t, e) {
|
|
958
958
|
return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
|
|
959
959
|
}
|
|
960
960
|
function Et(t, e) {
|
|
@@ -1014,371 +1014,371 @@ function Ot(t) {
|
|
|
1014
1014
|
function le(t) {
|
|
1015
1015
|
return t instanceof Uint8Array ? t : new Uint8Array(t);
|
|
1016
1016
|
}
|
|
1017
|
-
var rn = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(rn || {}), ne = /* @__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))(ne || {}), ue = /* @__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))(ue || {}), b = /* @__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[t.WebRTC = 128] = "WebRTC", t[t.TcpTls = 256] = "TcpTls", t))(b || {}), sn = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.SendBackToSender = 1] = "SendBackToSender", t[t.Delayable = 2] = "Delayable", t[t.SendToUser = 4] = "SendToUser", t[t.Compressed = 8] = "Compressed", t[t.Unreliable = 16] = "Unreliable", t))(sn || {}), de = /* @__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))(de || {}), on = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(on || {}), he = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(he || {}), an = /* @__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))(an || {}), _t = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(_t || {}), cn = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(cn || {}), ln = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(ln || {}), g = /* @__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.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", 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.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", 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))(g || {});
|
|
1018
|
-
const
|
|
1019
|
-
function
|
|
1020
|
-
const e = new U(
|
|
1021
|
-
return
|
|
1017
|
+
var sn = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(sn || {}), ne = /* @__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))(ne || {}), ue = /* @__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))(ue || {}), b = /* @__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[t.WebRTC = 128] = "WebRTC", t[t.TcpTls = 256] = "TcpTls", t))(b || {}), on = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.SendBackToSender = 1] = "SendBackToSender", t[t.Delayable = 2] = "Delayable", t[t.SendToUser = 4] = "SendToUser", t[t.Compressed = 8] = "Compressed", t[t.Unreliable = 16] = "Unreliable", t))(on || {}), de = /* @__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))(de || {}), an = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(an || {}), he = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(he || {}), cn = /* @__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))(cn || {}), _t = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(_t || {}), ln = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(ln || {}), un = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(un || {}), g = /* @__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.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", 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.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", 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))(g || {});
|
|
1018
|
+
const dn = 1, Ks = 1048637, Ys = 727023925, js = 3395085689;
|
|
1019
|
+
function zs(t) {
|
|
1020
|
+
const e = new U(dn);
|
|
1021
|
+
return Xs(t, e), e.finish();
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1024
|
-
e.writeGuidField(
|
|
1023
|
+
function Xs(t, e) {
|
|
1024
|
+
e.writeGuidField(Ys, t.ActionId), e.writeStringField(js, t.PayloadJson);
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1027
|
-
const r =
|
|
1028
|
-
return P(
|
|
1026
|
+
function Js(t, e, n) {
|
|
1027
|
+
const r = zs(t);
|
|
1028
|
+
return P(Ks, r, dn, e, n);
|
|
1029
1029
|
}
|
|
1030
|
-
const
|
|
1031
|
-
function
|
|
1030
|
+
const Qs = 1, hn = 467348717, fn = 972460562, pn = 1911490601, mn = 2603556958, En = 3609695522, In = 4094837378, _n = 4257460908;
|
|
1031
|
+
function Tn(t) {
|
|
1032
1032
|
const e = {};
|
|
1033
|
-
return
|
|
1033
|
+
return wn(e), t && Object.assign(e, t), e;
|
|
1034
1034
|
}
|
|
1035
|
-
function
|
|
1035
|
+
function wn(t) {
|
|
1036
1036
|
return t.ParameterIndex = 0, t.TypeName = "", t.ValueJson = "", t.ValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.EnumerationId = w.fromBytes(new Uint8Array(16)), t;
|
|
1037
1037
|
}
|
|
1038
|
-
function Qs(t, e) {
|
|
1039
|
-
e.writeGuidField(dn, t.EnumerationId), e.writeStringField(hn, t.EnumerableItemTypeName), e.writeStringField(fn, t.ValueJson), e.writeBoolField(pn, t.IsEnumerable), e.writeStringField(mn, t.TypeName), e.writeBinaryField(En, t.ValueData), e.writeInt32Field(In, t.ParameterIndex | 0);
|
|
1040
|
-
}
|
|
1041
1038
|
function Zs(t, e) {
|
|
1042
|
-
|
|
1043
|
-
return Tn(n), qs(t, n), n;
|
|
1039
|
+
e.writeGuidField(hn, t.EnumerationId), e.writeStringField(fn, t.EnumerableItemTypeName), e.writeStringField(pn, t.ValueJson), e.writeBoolField(mn, t.IsEnumerable), e.writeStringField(En, t.TypeName), e.writeBinaryField(In, t.ValueData), e.writeInt32Field(_n, t.ParameterIndex | 0);
|
|
1044
1040
|
}
|
|
1045
1041
|
function qs(t, e) {
|
|
1042
|
+
const n = e ?? Tn();
|
|
1043
|
+
return wn(n), ei(t, n), n;
|
|
1044
|
+
}
|
|
1045
|
+
function ei(t, e) {
|
|
1046
1046
|
let n;
|
|
1047
1047
|
for (; (n = t.next()) !== null; )
|
|
1048
1048
|
switch (n.fieldId) {
|
|
1049
|
-
case
|
|
1049
|
+
case hn: {
|
|
1050
1050
|
if (n.isNull) throw new Error();
|
|
1051
1051
|
e.EnumerationId = n.asGuid();
|
|
1052
1052
|
break;
|
|
1053
1053
|
}
|
|
1054
|
-
case
|
|
1054
|
+
case fn: {
|
|
1055
1055
|
if (n.isNull) throw new Error();
|
|
1056
1056
|
e.EnumerableItemTypeName = n.asString();
|
|
1057
1057
|
break;
|
|
1058
1058
|
}
|
|
1059
|
-
case
|
|
1059
|
+
case pn: {
|
|
1060
1060
|
if (n.isNull) throw new Error();
|
|
1061
1061
|
e.ValueJson = n.asString();
|
|
1062
1062
|
break;
|
|
1063
1063
|
}
|
|
1064
|
-
case
|
|
1064
|
+
case mn: {
|
|
1065
1065
|
if (n.isNull) throw new Error();
|
|
1066
1066
|
e.IsEnumerable = n.asBool();
|
|
1067
1067
|
break;
|
|
1068
1068
|
}
|
|
1069
|
-
case
|
|
1069
|
+
case En: {
|
|
1070
1070
|
if (n.isNull) throw new Error();
|
|
1071
1071
|
e.TypeName = n.asString();
|
|
1072
1072
|
break;
|
|
1073
1073
|
}
|
|
1074
|
-
case
|
|
1074
|
+
case In: {
|
|
1075
1075
|
if (n.isNull) throw new Error();
|
|
1076
1076
|
e.ValueData = n.asBinary();
|
|
1077
1077
|
break;
|
|
1078
1078
|
}
|
|
1079
|
-
case
|
|
1079
|
+
case _n: {
|
|
1080
1080
|
if (n.isNull) throw new Error();
|
|
1081
1081
|
e.ParameterIndex = n.asInt32();
|
|
1082
1082
|
break;
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
1085
|
}
|
|
1086
|
-
const
|
|
1087
|
-
function ni(t) {
|
|
1088
|
-
const e = {};
|
|
1089
|
-
return ri(e), t && Object.assign(e, t), e;
|
|
1090
|
-
}
|
|
1086
|
+
const Sn = 1, ti = 1048642, ni = 3748018590;
|
|
1091
1087
|
function ri(t) {
|
|
1092
|
-
|
|
1088
|
+
const e = {};
|
|
1089
|
+
return si(e), t && Object.assign(e, t), e;
|
|
1093
1090
|
}
|
|
1094
1091
|
function si(t) {
|
|
1095
|
-
|
|
1096
|
-
return ii(t, e), e.finish();
|
|
1092
|
+
return t.Path = "", t;
|
|
1097
1093
|
}
|
|
1098
|
-
function ii(t
|
|
1099
|
-
e
|
|
1094
|
+
function ii(t) {
|
|
1095
|
+
const e = new U(Sn);
|
|
1096
|
+
return oi(t, e), e.finish();
|
|
1100
1097
|
}
|
|
1101
|
-
function oi(t, e
|
|
1102
|
-
|
|
1103
|
-
return P(ei, r, wn, e, n);
|
|
1098
|
+
function oi(t, e) {
|
|
1099
|
+
e.writeStringField(ni, t.Path);
|
|
1104
1100
|
}
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
return gn(e), e;
|
|
1101
|
+
function ai(t, e, n) {
|
|
1102
|
+
const r = ii(t);
|
|
1103
|
+
return P(ti, r, Sn, e, n);
|
|
1109
1104
|
}
|
|
1105
|
+
const ci = 161083277, li = 265814330, ui = 1368629611, di = 2431514951, hi = 2745379226, fi = 3282782683, pi = 3284746250, mi = 4101844078;
|
|
1110
1106
|
function gn(t) {
|
|
1111
|
-
|
|
1107
|
+
const e = {};
|
|
1108
|
+
return Cn(e), e;
|
|
1112
1109
|
}
|
|
1113
|
-
function
|
|
1114
|
-
|
|
1115
|
-
return gn(n), Ei(t, n), n;
|
|
1110
|
+
function Cn(t) {
|
|
1111
|
+
return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = sn.Unknown, t.CodecDetails = "", t.SampleRate = 0, t.Channels = 0, t.ShapeSets = void 0, t;
|
|
1116
1112
|
}
|
|
1117
1113
|
function Ei(t, e) {
|
|
1114
|
+
const n = e ?? gn();
|
|
1115
|
+
return Cn(n), Ii(t, n), n;
|
|
1116
|
+
}
|
|
1117
|
+
function Ii(t, e) {
|
|
1118
1118
|
let n;
|
|
1119
1119
|
for (; (n = t.next()) !== null; )
|
|
1120
1120
|
switch (n.fieldId) {
|
|
1121
|
-
case
|
|
1121
|
+
case ci: {
|
|
1122
1122
|
if (n.isNull) throw new Error();
|
|
1123
1123
|
e.StreamId = n.asString();
|
|
1124
1124
|
break;
|
|
1125
1125
|
}
|
|
1126
|
-
case
|
|
1126
|
+
case li: {
|
|
1127
1127
|
if (n.isNull) {
|
|
1128
1128
|
e.ShapeSets = void 0;
|
|
1129
1129
|
break;
|
|
1130
1130
|
}
|
|
1131
|
-
e.ShapeSets =
|
|
1131
|
+
e.ShapeSets = _i(n.asArray());
|
|
1132
1132
|
break;
|
|
1133
1133
|
}
|
|
1134
|
-
case
|
|
1134
|
+
case ui: {
|
|
1135
1135
|
if (n.isNull) throw new Error();
|
|
1136
1136
|
e.Description = n.asString();
|
|
1137
1137
|
break;
|
|
1138
1138
|
}
|
|
1139
|
-
case
|
|
1139
|
+
case di: {
|
|
1140
1140
|
if (n.isNull) throw new Error();
|
|
1141
1141
|
e.Channels = n.asInt32();
|
|
1142
1142
|
break;
|
|
1143
1143
|
}
|
|
1144
|
-
case
|
|
1144
|
+
case hi: {
|
|
1145
1145
|
if (n.isNull) throw new Error();
|
|
1146
1146
|
e.CodecDetails = n.asString();
|
|
1147
1147
|
break;
|
|
1148
1148
|
}
|
|
1149
|
-
case
|
|
1149
|
+
case fi: {
|
|
1150
1150
|
if (n.isNull) throw new Error();
|
|
1151
1151
|
e.SourceType = n.asString();
|
|
1152
1152
|
break;
|
|
1153
1153
|
}
|
|
1154
|
-
case
|
|
1154
|
+
case pi: {
|
|
1155
1155
|
if (n.isNull) throw new Error();
|
|
1156
1156
|
e.Codec = n.asInt32();
|
|
1157
1157
|
break;
|
|
1158
1158
|
}
|
|
1159
|
-
case
|
|
1159
|
+
case mi: {
|
|
1160
1160
|
if (n.isNull) throw new Error();
|
|
1161
1161
|
e.SampleRate = n.asInt32();
|
|
1162
1162
|
break;
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
1165
|
}
|
|
1166
|
-
function
|
|
1166
|
+
function _i(t) {
|
|
1167
1167
|
const e = [];
|
|
1168
1168
|
let n;
|
|
1169
1169
|
for (; (n = t.next()) !== null; )
|
|
1170
|
-
e.push(
|
|
1170
|
+
e.push(Ci(n.asObject()));
|
|
1171
1171
|
return e;
|
|
1172
1172
|
}
|
|
1173
|
-
const
|
|
1174
|
-
function
|
|
1173
|
+
const Ti = 1107713536, wi = 1154362099, Si = 1185721362;
|
|
1174
|
+
function gi(t) {
|
|
1175
1175
|
const e = {};
|
|
1176
|
-
return
|
|
1176
|
+
return yn(e), e;
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1178
|
+
function yn(t) {
|
|
1179
1179
|
return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
|
|
1180
1180
|
}
|
|
1181
|
-
function gi(t, e) {
|
|
1182
|
-
const n = e ?? Si();
|
|
1183
|
-
return Cn(n), Ci(t, n), n;
|
|
1184
|
-
}
|
|
1185
1181
|
function Ci(t, e) {
|
|
1182
|
+
const n = e ?? gi();
|
|
1183
|
+
return yn(n), yi(t, n), n;
|
|
1184
|
+
}
|
|
1185
|
+
function yi(t, e) {
|
|
1186
1186
|
let n;
|
|
1187
1187
|
for (; (n = t.next()) !== null; )
|
|
1188
1188
|
switch (n.fieldId) {
|
|
1189
|
-
case
|
|
1189
|
+
case Ti: {
|
|
1190
1190
|
if (n.isNull) throw new Error();
|
|
1191
1191
|
e.Name = n.asString();
|
|
1192
1192
|
break;
|
|
1193
1193
|
}
|
|
1194
|
-
case
|
|
1194
|
+
case wi: {
|
|
1195
1195
|
if (n.isNull) throw new Error();
|
|
1196
1196
|
e.SetId = n.asUInt32();
|
|
1197
1197
|
break;
|
|
1198
1198
|
}
|
|
1199
|
-
case
|
|
1199
|
+
case Si: {
|
|
1200
1200
|
if (n.isNull) throw new Error();
|
|
1201
|
-
e.ShapeNames =
|
|
1201
|
+
e.ShapeNames = Ai(n.asArray());
|
|
1202
1202
|
break;
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function Ai(t) {
|
|
1207
1207
|
const e = [];
|
|
1208
1208
|
let n;
|
|
1209
1209
|
for (; (n = t.next()) !== null; )
|
|
1210
1210
|
e.push(n.asString());
|
|
1211
1211
|
return e;
|
|
1212
1212
|
}
|
|
1213
|
-
const
|
|
1213
|
+
const Ri = 76337612, bi = 185396121, Ni = 250031587, ki = 388632637, Di = 417197284, vi = 469070965, Ui = 470595159, Oi = 594855258, Mi = 781727218, Pi = 834078886, Li = 1043273762, Fi = 1236999138, Bi = 1286979607, xi = 1368629611, Wi = 1715899485, Gi = 1942830531, Vi = 1999510636, Hi = 2033288346, $i = 2079864626, Ki = 2142346422, Yi = 2232517119, ji = 2598291686, zi = 2719718823, Xi = 2810953526, Ji = 2840065720, Qi = 2885165957, Zi = 3542818975, qi = 3586157513, eo = 3717933110, to = 4062655306;
|
|
1214
1214
|
function qe(t) {
|
|
1215
1215
|
const e = {};
|
|
1216
|
-
return
|
|
1216
|
+
return An(e), e;
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1218
|
+
function An(t) {
|
|
1219
1219
|
return t.ContextType = ue.Unknown, t.UserType = he.Unknown, t.PayloadType = de.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 = ne.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = _t.Unknown, t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t.IsTouchDevice = !1, t.InitialPath = "", t;
|
|
1220
1220
|
}
|
|
1221
1221
|
function et(t, e) {
|
|
1222
1222
|
const n = e ?? qe();
|
|
1223
|
-
return
|
|
1223
|
+
return An(n), no(t, n), n;
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function no(t, e) {
|
|
1226
1226
|
let n;
|
|
1227
1227
|
for (; (n = t.next()) !== null; )
|
|
1228
1228
|
switch (n.fieldId) {
|
|
1229
|
-
case
|
|
1229
|
+
case Ri: {
|
|
1230
1230
|
if (n.isNull) throw new Error();
|
|
1231
1231
|
e.DeviceId = n.asString();
|
|
1232
1232
|
break;
|
|
1233
1233
|
}
|
|
1234
|
-
case
|
|
1234
|
+
case bi: {
|
|
1235
1235
|
if (n.isNull) throw new Error();
|
|
1236
1236
|
e.InstallId = n.asString();
|
|
1237
1237
|
break;
|
|
1238
1238
|
}
|
|
1239
|
-
case
|
|
1239
|
+
case Ni: {
|
|
1240
1240
|
if (n.isNull) throw new Error();
|
|
1241
1241
|
e.Theme = n.asString();
|
|
1242
1242
|
break;
|
|
1243
1243
|
}
|
|
1244
|
-
case
|
|
1244
|
+
case ki: {
|
|
1245
1245
|
if (n.isNull) throw new Error();
|
|
1246
1246
|
e.UserAgent = n.asString();
|
|
1247
1247
|
break;
|
|
1248
1248
|
}
|
|
1249
|
-
case
|
|
1249
|
+
case Di: {
|
|
1250
1250
|
if (n.isNull) throw new Error();
|
|
1251
1251
|
e.ContextType = n.asInt32();
|
|
1252
1252
|
break;
|
|
1253
1253
|
}
|
|
1254
|
-
case
|
|
1254
|
+
case vi: {
|
|
1255
1255
|
if (n.isNull) throw new Error();
|
|
1256
1256
|
e.HasInput = n.asBool();
|
|
1257
1257
|
break;
|
|
1258
1258
|
}
|
|
1259
|
-
case
|
|
1259
|
+
case Ui: {
|
|
1260
1260
|
if (n.isNull) throw new Error();
|
|
1261
1261
|
e.UserType = n.asInt32();
|
|
1262
1262
|
break;
|
|
1263
1263
|
}
|
|
1264
|
-
case
|
|
1264
|
+
case Oi: {
|
|
1265
1265
|
if (n.isNull) throw new Error();
|
|
1266
1266
|
e.InitialPath = n.asString();
|
|
1267
1267
|
break;
|
|
1268
1268
|
}
|
|
1269
|
-
case
|
|
1269
|
+
case Mi: {
|
|
1270
1270
|
if (n.isNull) throw new Error();
|
|
1271
1271
|
e.UserId = n.asString();
|
|
1272
1272
|
break;
|
|
1273
1273
|
}
|
|
1274
|
-
case
|
|
1274
|
+
case Pi: {
|
|
1275
1275
|
if (n.isNull) throw new Error();
|
|
1276
1276
|
e.ProductId = n.asString();
|
|
1277
1277
|
break;
|
|
1278
1278
|
}
|
|
1279
|
-
case
|
|
1279
|
+
case Li: {
|
|
1280
1280
|
if (n.isNull) throw new Error();
|
|
1281
1281
|
e.AuthSessionId = n.asString();
|
|
1282
1282
|
break;
|
|
1283
1283
|
}
|
|
1284
|
-
case
|
|
1284
|
+
case Fi: {
|
|
1285
1285
|
if (n.isNull) throw new Error();
|
|
1286
1286
|
e.ReceiveAllMessages = n.asBool();
|
|
1287
1287
|
break;
|
|
1288
1288
|
}
|
|
1289
|
-
case
|
|
1289
|
+
case Bi: {
|
|
1290
1290
|
if (n.isNull) throw new Error();
|
|
1291
1291
|
e.ViewportHeight = n.asInt32();
|
|
1292
1292
|
break;
|
|
1293
1293
|
}
|
|
1294
|
-
case
|
|
1294
|
+
case xi: {
|
|
1295
1295
|
if (n.isNull) throw new Error();
|
|
1296
1296
|
e.Description = n.asString();
|
|
1297
1297
|
break;
|
|
1298
1298
|
}
|
|
1299
|
-
case
|
|
1299
|
+
case Wi: {
|
|
1300
1300
|
if (n.isNull) throw new Error();
|
|
1301
1301
|
e.Locale = n.asString();
|
|
1302
1302
|
break;
|
|
1303
1303
|
}
|
|
1304
|
-
case
|
|
1304
|
+
case Gi: {
|
|
1305
1305
|
if (n.isNull) throw new Error();
|
|
1306
1306
|
e.SdkType = n.asInt32();
|
|
1307
1307
|
break;
|
|
1308
1308
|
}
|
|
1309
|
-
case
|
|
1309
|
+
case Vi: {
|
|
1310
1310
|
if (n.isNull) throw new Error();
|
|
1311
1311
|
e.SessionId = n.asInt32();
|
|
1312
1312
|
break;
|
|
1313
1313
|
}
|
|
1314
|
-
case
|
|
1314
|
+
case Hi: {
|
|
1315
1315
|
if (n.isNull) throw new Error();
|
|
1316
1316
|
e.ViewportWidth = n.asInt32();
|
|
1317
1317
|
break;
|
|
1318
1318
|
}
|
|
1319
|
-
case
|
|
1319
|
+
case $i: {
|
|
1320
1320
|
if (n.isNull) throw new Error();
|
|
1321
1321
|
e.PreciseJoinedAt = n.asUInt64();
|
|
1322
1322
|
break;
|
|
1323
1323
|
}
|
|
1324
|
-
case
|
|
1324
|
+
case Ki: {
|
|
1325
1325
|
if (n.isNull) throw new Error();
|
|
1326
1326
|
e.PayloadType = n.asInt32();
|
|
1327
1327
|
break;
|
|
1328
1328
|
}
|
|
1329
|
-
case
|
|
1329
|
+
case Yi: {
|
|
1330
1330
|
if (n.isNull) throw new Error();
|
|
1331
1331
|
e.IsTouchDevice = n.asBool();
|
|
1332
1332
|
break;
|
|
1333
1333
|
}
|
|
1334
|
-
case
|
|
1334
|
+
case ji: {
|
|
1335
1335
|
if (n.isNull) throw new Error();
|
|
1336
1336
|
e.VersionId = n.asString();
|
|
1337
1337
|
break;
|
|
1338
1338
|
}
|
|
1339
|
-
case
|
|
1339
|
+
case zi: {
|
|
1340
1340
|
if (n.isNull) throw new Error();
|
|
1341
1341
|
e.UniqueSessionId = n.asString();
|
|
1342
1342
|
break;
|
|
1343
1343
|
}
|
|
1344
|
-
case
|
|
1344
|
+
case Xi: {
|
|
1345
1345
|
if (n.isNull) throw new Error();
|
|
1346
1346
|
e.ClientType = n.asInt32();
|
|
1347
1347
|
break;
|
|
1348
1348
|
}
|
|
1349
|
-
case
|
|
1349
|
+
case Ji: {
|
|
1350
1350
|
if (n.isNull) throw new Error();
|
|
1351
1351
|
e.IsReady = n.asBool();
|
|
1352
1352
|
break;
|
|
1353
1353
|
}
|
|
1354
|
-
case
|
|
1354
|
+
case Qi: {
|
|
1355
1355
|
if (n.isNull) throw new Error();
|
|
1356
|
-
e.Parameters =
|
|
1356
|
+
e.Parameters = ro(n.asDictionary());
|
|
1357
1357
|
break;
|
|
1358
1358
|
}
|
|
1359
|
-
case
|
|
1359
|
+
case Zi: {
|
|
1360
1360
|
if (n.isNull) throw new Error();
|
|
1361
1361
|
e.Timezone = n.asString();
|
|
1362
1362
|
break;
|
|
1363
1363
|
}
|
|
1364
|
-
case
|
|
1364
|
+
case qi: {
|
|
1365
1365
|
if (n.isNull) throw new Error();
|
|
1366
1366
|
e.IsInternal = n.asBool();
|
|
1367
1367
|
break;
|
|
1368
1368
|
}
|
|
1369
|
-
case
|
|
1369
|
+
case eo: {
|
|
1370
1370
|
if (n.isNull) throw new Error();
|
|
1371
1371
|
e.ChannelLocale = n.asString();
|
|
1372
1372
|
break;
|
|
1373
1373
|
}
|
|
1374
|
-
case
|
|
1374
|
+
case to: {
|
|
1375
1375
|
if (n.isNull) throw new Error();
|
|
1376
1376
|
e.EmbeddedSpaceId = n.asString();
|
|
1377
1377
|
break;
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1381
|
+
function ro(t) {
|
|
1382
1382
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1383
1383
|
let n;
|
|
1384
1384
|
for (; (n = t.next()) !== null; ) {
|
|
@@ -1387,143 +1387,143 @@ function no(t) {
|
|
|
1387
1387
|
}
|
|
1388
1388
|
return e;
|
|
1389
1389
|
}
|
|
1390
|
-
const
|
|
1391
|
-
function
|
|
1390
|
+
const so = 746516514, io = 877841741, oo = 1175184220, ao = 1368629611, co = 2341021724, lo = 3167053791, uo = 3632106223, ho = 3686066300;
|
|
1391
|
+
function fo(t) {
|
|
1392
1392
|
const e = {};
|
|
1393
|
-
return
|
|
1393
|
+
return Rn(e), e;
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1395
|
+
function Rn(t) {
|
|
1396
1396
|
return t.Type = b.None, t.Uri = "", t.OpcodeGroupsFromServer = g.NONE, t.OpcodeGroupsToServer = g.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t.IsUnreliable = !1, t;
|
|
1397
1397
|
}
|
|
1398
|
-
function fo(t, e) {
|
|
1399
|
-
const n = e ?? ho();
|
|
1400
|
-
return An(n), po(t, n), n;
|
|
1401
|
-
}
|
|
1402
1398
|
function po(t, e) {
|
|
1399
|
+
const n = e ?? fo();
|
|
1400
|
+
return Rn(n), mo(t, n), n;
|
|
1401
|
+
}
|
|
1402
|
+
function mo(t, e) {
|
|
1403
1403
|
let n;
|
|
1404
1404
|
for (; (n = t.next()) !== null; )
|
|
1405
1405
|
switch (n.fieldId) {
|
|
1406
|
-
case
|
|
1406
|
+
case so: {
|
|
1407
1407
|
if (n.isNull) throw new Error();
|
|
1408
1408
|
e.AuthTicket = n.asBinary();
|
|
1409
1409
|
break;
|
|
1410
1410
|
}
|
|
1411
|
-
case
|
|
1411
|
+
case io: {
|
|
1412
1412
|
if (n.isNull) throw new Error();
|
|
1413
1413
|
e.Priority = n.asInt32();
|
|
1414
1414
|
break;
|
|
1415
1415
|
}
|
|
1416
|
-
case
|
|
1416
|
+
case oo: {
|
|
1417
1417
|
if (n.isNull) throw new Error();
|
|
1418
1418
|
e.OpcodeGroupsFromServer = n.asInt32();
|
|
1419
1419
|
break;
|
|
1420
1420
|
}
|
|
1421
|
-
case
|
|
1421
|
+
case ao: {
|
|
1422
1422
|
if (n.isNull) throw new Error();
|
|
1423
1423
|
e.Description = n.asString();
|
|
1424
1424
|
break;
|
|
1425
1425
|
}
|
|
1426
|
-
case
|
|
1426
|
+
case co: {
|
|
1427
1427
|
if (n.isNull) throw new Error();
|
|
1428
1428
|
e.Uri = n.asString();
|
|
1429
1429
|
break;
|
|
1430
1430
|
}
|
|
1431
|
-
case
|
|
1431
|
+
case lo: {
|
|
1432
1432
|
if (n.isNull) throw new Error();
|
|
1433
1433
|
e.Type = n.asInt32();
|
|
1434
1434
|
break;
|
|
1435
1435
|
}
|
|
1436
|
-
case
|
|
1436
|
+
case uo: {
|
|
1437
1437
|
if (n.isNull) throw new Error();
|
|
1438
1438
|
e.IsUnreliable = n.asBool();
|
|
1439
1439
|
break;
|
|
1440
1440
|
}
|
|
1441
|
-
case
|
|
1441
|
+
case ho: {
|
|
1442
1442
|
if (n.isNull) throw new Error();
|
|
1443
1443
|
e.OpcodeGroupsToServer = n.asInt32();
|
|
1444
1444
|
break;
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
1448
|
-
const
|
|
1449
|
-
function
|
|
1448
|
+
const Eo = 65537, Io = 166277978, _o = 1482635149, To = 1559330978, wo = 2802434353, So = 3085883711, go = 3669484338, Co = 3707543140, yo = 3712281496, Ao = 3823842552;
|
|
1449
|
+
function Ro(t) {
|
|
1450
1450
|
const e = {};
|
|
1451
|
-
return
|
|
1451
|
+
return bn(e), e;
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1453
|
+
function bn(t) {
|
|
1454
1454
|
return t.ClientContext = qe(), t.ServerContext = qe(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.ChannelInstanceId = "", t.PrimaryUserId = "", t;
|
|
1455
1455
|
}
|
|
1456
|
-
function Ro(t, e) {
|
|
1457
|
-
const n = V.create(t);
|
|
1458
|
-
return bo(n, e);
|
|
1459
|
-
}
|
|
1460
1456
|
function bo(t, e) {
|
|
1461
|
-
const n =
|
|
1462
|
-
return
|
|
1457
|
+
const n = V.create(t);
|
|
1458
|
+
return No(n, e);
|
|
1463
1459
|
}
|
|
1464
1460
|
function No(t, e) {
|
|
1461
|
+
const n = e ?? Ro();
|
|
1462
|
+
return bn(n), ko(t, n), n;
|
|
1463
|
+
}
|
|
1464
|
+
function ko(t, e) {
|
|
1465
1465
|
let n;
|
|
1466
1466
|
for (; (n = t.next()) !== null; )
|
|
1467
1467
|
switch (n.fieldId) {
|
|
1468
|
-
case
|
|
1468
|
+
case Io: {
|
|
1469
1469
|
if (n.isNull) throw new Error();
|
|
1470
1470
|
e.CertHash = n.asString();
|
|
1471
1471
|
break;
|
|
1472
1472
|
}
|
|
1473
|
-
case
|
|
1473
|
+
case _o: {
|
|
1474
1474
|
if (n.isNull) throw new Error();
|
|
1475
|
-
e.Entrypoints =
|
|
1475
|
+
e.Entrypoints = vo(n.asArray());
|
|
1476
1476
|
break;
|
|
1477
1477
|
}
|
|
1478
|
-
case
|
|
1478
|
+
case To: {
|
|
1479
1479
|
if (n.isNull) throw new Error();
|
|
1480
1480
|
e.ChannelId = n.asString();
|
|
1481
1481
|
break;
|
|
1482
1482
|
}
|
|
1483
|
-
case
|
|
1483
|
+
case wo: {
|
|
1484
1484
|
if (n.isNull) throw new Error();
|
|
1485
1485
|
e.ClientContext = et(n.asObject());
|
|
1486
1486
|
break;
|
|
1487
1487
|
}
|
|
1488
|
-
case
|
|
1488
|
+
case So: {
|
|
1489
1489
|
if (n.isNull) throw new Error();
|
|
1490
1490
|
e.ServerContext = et(n.asObject());
|
|
1491
1491
|
break;
|
|
1492
1492
|
}
|
|
1493
|
-
case
|
|
1493
|
+
case go: {
|
|
1494
1494
|
if (n.isNull) throw new Error();
|
|
1495
|
-
e.FeatureFlags =
|
|
1495
|
+
e.FeatureFlags = Uo(n.asDictionary());
|
|
1496
1496
|
break;
|
|
1497
1497
|
}
|
|
1498
|
-
case
|
|
1498
|
+
case Co: {
|
|
1499
1499
|
if (n.isNull) throw new Error();
|
|
1500
1500
|
e.SpaceId = n.asString();
|
|
1501
1501
|
break;
|
|
1502
1502
|
}
|
|
1503
|
-
case
|
|
1503
|
+
case yo: {
|
|
1504
1504
|
if (n.isNull) throw new Error();
|
|
1505
1505
|
e.PrimaryUserId = n.asString();
|
|
1506
1506
|
break;
|
|
1507
1507
|
}
|
|
1508
|
-
case
|
|
1508
|
+
case Ao: {
|
|
1509
1509
|
if (n.isNull) throw new Error();
|
|
1510
1510
|
e.ChannelInstanceId = n.asString();
|
|
1511
1511
|
break;
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
|
-
async function
|
|
1516
|
-
const n = await dt(t,
|
|
1517
|
-
return
|
|
1515
|
+
async function Do(t, e) {
|
|
1516
|
+
const n = await dt(t, Eo);
|
|
1517
|
+
return bo(n, e);
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1519
|
+
function vo(t) {
|
|
1520
1520
|
const e = [];
|
|
1521
1521
|
let n;
|
|
1522
1522
|
for (; (n = t.next()) !== null; )
|
|
1523
|
-
e.push(
|
|
1523
|
+
e.push(po(n.asObject()));
|
|
1524
1524
|
return e;
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1526
|
+
function Uo(t) {
|
|
1527
1527
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1528
1528
|
let n;
|
|
1529
1529
|
for (; (n = t.next()) !== null; ) {
|
|
@@ -1532,743 +1532,743 @@ function vo(t) {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
return e;
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function Oo(t) {
|
|
1536
1536
|
const e = {};
|
|
1537
|
-
return
|
|
1537
|
+
return Mo(e), t && Object.assign(e, t), e;
|
|
1538
1538
|
}
|
|
1539
|
-
function
|
|
1539
|
+
function Mo(t) {
|
|
1540
1540
|
return t.ServerSessionId = "", t.ContextType = ue.Unknown, t.UserType = he.Unknown, t.PayloadType = de.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = g.NONE, t.OpcodeGroupsToServer = g.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = ne.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = _t.Unknown, t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t.IsTouchDevice = !1, t.InitialPath = "", t;
|
|
1541
1541
|
}
|
|
1542
|
-
const
|
|
1543
|
-
function
|
|
1542
|
+
const Nn = 1, Po = 1048632, Lo = 3748161056, Fo = 4289118421;
|
|
1543
|
+
function Bo(t) {
|
|
1544
1544
|
const e = {};
|
|
1545
|
-
return
|
|
1545
|
+
return xo(e), t && Object.assign(e, t), e;
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1547
|
+
function xo(t) {
|
|
1548
1548
|
return t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t;
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1551
|
-
const e = new U(
|
|
1552
|
-
return
|
|
1550
|
+
function Wo(t) {
|
|
1551
|
+
const e = new U(Nn);
|
|
1552
|
+
return Go(t, e), e.finish();
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1555
|
-
e.writeGuidField(
|
|
1554
|
+
function Go(t, e) {
|
|
1555
|
+
e.writeGuidField(Lo, t.CallId), e.writeGuidField(Fo, t.InstanceId);
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1558
|
-
const r =
|
|
1559
|
-
return P(
|
|
1557
|
+
function Vo(t, e, n) {
|
|
1558
|
+
const r = Wo(t);
|
|
1559
|
+
return P(Po, r, Nn, e, n);
|
|
1560
1560
|
}
|
|
1561
|
-
const
|
|
1562
|
-
function
|
|
1561
|
+
const kn = 1, Dn = 1048601, vn = 112005851, Un = 814454131, On = 976255570, Mn = 2610786289, Pn = 2885165957, Ln = 3748161056, Fn = 4289118421;
|
|
1562
|
+
function Bn(t) {
|
|
1563
1563
|
const e = {};
|
|
1564
|
-
return
|
|
1564
|
+
return xn(e), t && Object.assign(e, t), e;
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1566
|
+
function xn(t) {
|
|
1567
1567
|
return t.FunctionId = w.fromBytes(new Uint8Array(16)), t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.Scopes = [], t.Version = "", t;
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1570
|
-
const e = new U(
|
|
1571
|
-
return
|
|
1569
|
+
function Ho(t) {
|
|
1570
|
+
const e = new U(kn);
|
|
1571
|
+
return $o(t, e), e.finish();
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1574
|
-
e.writeArrayField(
|
|
1573
|
+
function $o(t, e) {
|
|
1574
|
+
e.writeArrayField(vn, O.Object, (n) => {
|
|
1575
1575
|
for (const r of t.Scopes)
|
|
1576
|
-
n.writeObject(
|
|
1577
|
-
|
|
1576
|
+
n.writeObject(Zo, (s) => {
|
|
1577
|
+
ea(r, s);
|
|
1578
1578
|
});
|
|
1579
|
-
}), e.writeStringField(
|
|
1579
|
+
}), e.writeStringField(Un, t.FunctionName), e.writeGuidField(On, t.FunctionId), e.writeStringField(Mn, t.Version), e.writeArrayField(Pn, O.Object, (n) => {
|
|
1580
1580
|
for (const r of t.Parameters)
|
|
1581
|
-
n.writeObject(
|
|
1582
|
-
|
|
1581
|
+
n.writeObject(Qs, (s) => {
|
|
1582
|
+
Zs(r, s);
|
|
1583
1583
|
});
|
|
1584
|
-
}), e.writeGuidField(
|
|
1585
|
-
}
|
|
1586
|
-
function $o(t, e) {
|
|
1587
|
-
const n = V.create(t);
|
|
1588
|
-
return Ko(n, e);
|
|
1584
|
+
}), e.writeGuidField(Ln, t.CallId), e.writeGuidField(Fn, t.InstanceId);
|
|
1589
1585
|
}
|
|
1590
1586
|
function Ko(t, e) {
|
|
1591
|
-
const n =
|
|
1592
|
-
return
|
|
1587
|
+
const n = V.create(t);
|
|
1588
|
+
return Yo(n, e);
|
|
1593
1589
|
}
|
|
1594
1590
|
function Yo(t, e) {
|
|
1591
|
+
const n = e ?? Bn();
|
|
1592
|
+
return xn(n), jo(t, n), n;
|
|
1593
|
+
}
|
|
1594
|
+
function jo(t, e) {
|
|
1595
1595
|
let n;
|
|
1596
1596
|
for (; (n = t.next()) !== null; )
|
|
1597
1597
|
switch (n.fieldId) {
|
|
1598
|
-
case
|
|
1598
|
+
case vn: {
|
|
1599
1599
|
if (n.isNull) throw new Error();
|
|
1600
|
-
e.Scopes =
|
|
1600
|
+
e.Scopes = Jo(n.asArray());
|
|
1601
1601
|
break;
|
|
1602
1602
|
}
|
|
1603
|
-
case
|
|
1603
|
+
case Un: {
|
|
1604
1604
|
if (n.isNull) throw new Error();
|
|
1605
1605
|
e.FunctionName = n.asString();
|
|
1606
1606
|
break;
|
|
1607
1607
|
}
|
|
1608
|
-
case
|
|
1608
|
+
case On: {
|
|
1609
1609
|
if (n.isNull) throw new Error();
|
|
1610
1610
|
e.FunctionId = n.asGuid();
|
|
1611
1611
|
break;
|
|
1612
1612
|
}
|
|
1613
|
-
case
|
|
1613
|
+
case Mn: {
|
|
1614
1614
|
if (n.isNull) throw new Error();
|
|
1615
1615
|
e.Version = n.asString();
|
|
1616
1616
|
break;
|
|
1617
1617
|
}
|
|
1618
|
-
case
|
|
1618
|
+
case Pn: {
|
|
1619
1619
|
if (n.isNull) throw new Error();
|
|
1620
|
-
e.Parameters =
|
|
1620
|
+
e.Parameters = Qo(n.asArray());
|
|
1621
1621
|
break;
|
|
1622
1622
|
}
|
|
1623
|
-
case
|
|
1623
|
+
case Ln: {
|
|
1624
1624
|
if (n.isNull) throw new Error();
|
|
1625
1625
|
e.CallId = n.asGuid();
|
|
1626
1626
|
break;
|
|
1627
1627
|
}
|
|
1628
|
-
case
|
|
1628
|
+
case Fn: {
|
|
1629
1629
|
if (n.isNull) throw new Error();
|
|
1630
1630
|
e.InstanceId = n.asGuid();
|
|
1631
1631
|
break;
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1636
|
-
const r =
|
|
1637
|
-
return P(
|
|
1635
|
+
function zo(t, e, n) {
|
|
1636
|
+
const r = Ho(t);
|
|
1637
|
+
return P(Dn, r, kn, e, n);
|
|
1638
1638
|
}
|
|
1639
|
-
async function
|
|
1640
|
-
const n = await dt(t,
|
|
1641
|
-
return
|
|
1639
|
+
async function Xo(t, e) {
|
|
1640
|
+
const n = await dt(t, Dn);
|
|
1641
|
+
return Ko(n, e);
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1643
|
+
function Jo(t) {
|
|
1644
1644
|
const e = [];
|
|
1645
1645
|
let n;
|
|
1646
1646
|
for (; (n = t.next()) !== null; )
|
|
1647
|
-
e.push(
|
|
1647
|
+
e.push(ta(n.asObject()));
|
|
1648
1648
|
return e;
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1650
|
+
function Qo(t) {
|
|
1651
1651
|
const e = [];
|
|
1652
1652
|
let n;
|
|
1653
1653
|
for (; (n = t.next()) !== null; )
|
|
1654
|
-
e.push(
|
|
1654
|
+
e.push(qs(n.asObject()));
|
|
1655
1655
|
return e;
|
|
1656
1656
|
}
|
|
1657
|
-
const
|
|
1658
|
-
function
|
|
1657
|
+
const Zo = 1, Wn = 2994044322, Gn = 3167053791;
|
|
1658
|
+
function qo(t) {
|
|
1659
1659
|
const e = {};
|
|
1660
|
-
return
|
|
1660
|
+
return Vn(e), e;
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function Vn(t) {
|
|
1663
1663
|
return t.Type = "", t.Id = "", t;
|
|
1664
1664
|
}
|
|
1665
|
-
function qo(t, e) {
|
|
1666
|
-
e.writeStringField(xn, t.Id), e.writeStringField(Wn, t.Type);
|
|
1667
|
-
}
|
|
1668
1665
|
function ea(t, e) {
|
|
1669
|
-
|
|
1670
|
-
return Gn(n), ta(t, n), n;
|
|
1666
|
+
e.writeStringField(Wn, t.Id), e.writeStringField(Gn, t.Type);
|
|
1671
1667
|
}
|
|
1672
1668
|
function ta(t, e) {
|
|
1669
|
+
const n = e ?? qo();
|
|
1670
|
+
return Vn(n), na(t, n), n;
|
|
1671
|
+
}
|
|
1672
|
+
function na(t, e) {
|
|
1673
1673
|
let n;
|
|
1674
1674
|
for (; (n = t.next()) !== null; )
|
|
1675
1675
|
switch (n.fieldId) {
|
|
1676
|
-
case
|
|
1676
|
+
case Wn: {
|
|
1677
1677
|
if (n.isNull) throw new Error();
|
|
1678
1678
|
e.Id = n.asString();
|
|
1679
1679
|
break;
|
|
1680
1680
|
}
|
|
1681
|
-
case
|
|
1681
|
+
case Gn: {
|
|
1682
1682
|
if (n.isNull) throw new Error();
|
|
1683
1683
|
e.Type = n.asString();
|
|
1684
1684
|
break;
|
|
1685
1685
|
}
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
|
-
const
|
|
1689
|
-
function
|
|
1688
|
+
const Hn = 1, $n = 1048631, Kn = 2205234621, Yn = 2838554230, jn = 3748161056, zn = 4194102057, Xn = 4289118421;
|
|
1689
|
+
function Jn(t) {
|
|
1690
1690
|
const e = {};
|
|
1691
|
-
return
|
|
1691
|
+
return Qn(e), t && Object.assign(e, t), e;
|
|
1692
1692
|
}
|
|
1693
|
-
function
|
|
1693
|
+
function Qn(t) {
|
|
1694
1694
|
return t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1697
|
-
const e = new U(
|
|
1698
|
-
return
|
|
1699
|
-
}
|
|
1700
|
-
function ra(t, e) {
|
|
1701
|
-
e.writeStringField($n, t.ErrorTypeName), e.writeStringField(Kn, t.ErrorMessage), e.writeGuidField(Yn, t.CallId), e.writeStringField(jn, t.StackTrace), e.writeGuidField(zn, t.InstanceId);
|
|
1696
|
+
function ra(t) {
|
|
1697
|
+
const e = new U(Hn);
|
|
1698
|
+
return sa(t, e), e.finish();
|
|
1702
1699
|
}
|
|
1703
1700
|
function sa(t, e) {
|
|
1704
|
-
|
|
1705
|
-
return ia(n, e);
|
|
1701
|
+
e.writeStringField(Kn, t.ErrorTypeName), e.writeStringField(Yn, t.ErrorMessage), e.writeGuidField(jn, t.CallId), e.writeStringField(zn, t.StackTrace), e.writeGuidField(Xn, t.InstanceId);
|
|
1706
1702
|
}
|
|
1707
1703
|
function ia(t, e) {
|
|
1708
|
-
const n =
|
|
1709
|
-
return
|
|
1704
|
+
const n = V.create(t);
|
|
1705
|
+
return oa(n, e);
|
|
1710
1706
|
}
|
|
1711
1707
|
function oa(t, e) {
|
|
1708
|
+
const n = e ?? Jn();
|
|
1709
|
+
return Qn(n), aa(t, n), n;
|
|
1710
|
+
}
|
|
1711
|
+
function aa(t, e) {
|
|
1712
1712
|
let n;
|
|
1713
1713
|
for (; (n = t.next()) !== null; )
|
|
1714
1714
|
switch (n.fieldId) {
|
|
1715
|
-
case
|
|
1715
|
+
case Kn: {
|
|
1716
1716
|
if (n.isNull) throw new Error();
|
|
1717
1717
|
e.ErrorTypeName = n.asString();
|
|
1718
1718
|
break;
|
|
1719
1719
|
}
|
|
1720
|
-
case
|
|
1720
|
+
case Yn: {
|
|
1721
1721
|
if (n.isNull) throw new Error();
|
|
1722
1722
|
e.ErrorMessage = n.asString();
|
|
1723
1723
|
break;
|
|
1724
1724
|
}
|
|
1725
|
-
case
|
|
1725
|
+
case jn: {
|
|
1726
1726
|
if (n.isNull) throw new Error();
|
|
1727
1727
|
e.CallId = n.asGuid();
|
|
1728
1728
|
break;
|
|
1729
1729
|
}
|
|
1730
|
-
case
|
|
1730
|
+
case zn: {
|
|
1731
1731
|
if (n.isNull) throw new Error();
|
|
1732
1732
|
e.StackTrace = n.asString();
|
|
1733
1733
|
break;
|
|
1734
1734
|
}
|
|
1735
|
-
case
|
|
1735
|
+
case Xn: {
|
|
1736
1736
|
if (n.isNull) throw new Error();
|
|
1737
1737
|
e.InstanceId = n.asGuid();
|
|
1738
1738
|
break;
|
|
1739
1739
|
}
|
|
1740
1740
|
}
|
|
1741
1741
|
}
|
|
1742
|
-
function
|
|
1743
|
-
const r =
|
|
1744
|
-
return P(
|
|
1742
|
+
function ca(t, e, n) {
|
|
1743
|
+
const r = ra(t);
|
|
1744
|
+
return P($n, r, Hn, e, n);
|
|
1745
1745
|
}
|
|
1746
|
-
function
|
|
1747
|
-
const n = ce(t,
|
|
1748
|
-
return
|
|
1746
|
+
function la(t, e) {
|
|
1747
|
+
const n = ce(t, $n);
|
|
1748
|
+
return ia(n, e);
|
|
1749
1749
|
}
|
|
1750
|
-
const Tt = 1,
|
|
1751
|
-
function
|
|
1750
|
+
const Tt = 1, ua = 1048600, Zn = 703025676, qn = 814454131, er = 972460562, tr = 976255570, nr = 1368629611, rr = 1479280922, sr = 1533537016, ir = 1909301063, or = 2274386296, ar = 2603556958, cr = 2885165957, lr = 3568439632;
|
|
1751
|
+
function da(t) {
|
|
1752
1752
|
const e = {};
|
|
1753
|
-
return
|
|
1753
|
+
return ur(e), e;
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1755
|
+
function ur(t) {
|
|
1756
1756
|
return t.FunctionId = w.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.Versions = [], t;
|
|
1757
1757
|
}
|
|
1758
|
-
function
|
|
1758
|
+
function ha(t) {
|
|
1759
1759
|
const e = new U(Tt);
|
|
1760
|
-
return
|
|
1760
|
+
return dr(t, e), e.finish();
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1763
|
-
e.writeStringField(
|
|
1762
|
+
function dr(t, e) {
|
|
1763
|
+
e.writeStringField(Zn, t.ResultTypeName), e.writeStringField(qn, t.FunctionName), e.writeStringField(er, t.EnumerableItemTypeName), e.writeGuidField(tr, t.FunctionId), e.writeStringField(nr, t.Description), e.writeBoolField(rr, t.IsCancellable), e.writeBoolField(sr, t.RequiresInstance), e.writeArrayField(ir, O.String, (n) => {
|
|
1764
1764
|
for (const r of t.Versions)
|
|
1765
1765
|
n.writeString(r);
|
|
1766
|
-
}), e.writeBoolField(
|
|
1766
|
+
}), e.writeBoolField(or, t.LlmInlineResult), e.writeBoolField(ar, t.IsEnumerable), e.writeArrayField(cr, O.Object, (n) => {
|
|
1767
1767
|
for (const r of t.Parameters)
|
|
1768
|
-
n.writeObject(
|
|
1769
|
-
|
|
1768
|
+
n.writeObject(_a, (s) => {
|
|
1769
|
+
wa(r, s);
|
|
1770
1770
|
});
|
|
1771
|
-
}), e.writeBoolField(
|
|
1772
|
-
}
|
|
1773
|
-
function ha(t, e) {
|
|
1774
|
-
const n = e ?? ua();
|
|
1775
|
-
return lr(n), fa(t, n), n;
|
|
1771
|
+
}), e.writeBoolField(lr, t.LlmCallOnlyOnce);
|
|
1776
1772
|
}
|
|
1777
1773
|
function fa(t, e) {
|
|
1774
|
+
const n = e ?? da();
|
|
1775
|
+
return ur(n), pa(t, n), n;
|
|
1776
|
+
}
|
|
1777
|
+
function pa(t, e) {
|
|
1778
1778
|
let n;
|
|
1779
1779
|
for (; (n = t.next()) !== null; )
|
|
1780
1780
|
switch (n.fieldId) {
|
|
1781
|
-
case
|
|
1781
|
+
case Zn: {
|
|
1782
1782
|
if (n.isNull) throw new Error();
|
|
1783
1783
|
e.ResultTypeName = n.asString();
|
|
1784
1784
|
break;
|
|
1785
1785
|
}
|
|
1786
|
-
case
|
|
1786
|
+
case qn: {
|
|
1787
1787
|
if (n.isNull) throw new Error();
|
|
1788
1788
|
e.FunctionName = n.asString();
|
|
1789
1789
|
break;
|
|
1790
1790
|
}
|
|
1791
|
-
case
|
|
1791
|
+
case er: {
|
|
1792
1792
|
if (n.isNull) throw new Error();
|
|
1793
1793
|
e.EnumerableItemTypeName = n.asString();
|
|
1794
1794
|
break;
|
|
1795
1795
|
}
|
|
1796
|
-
case
|
|
1796
|
+
case tr: {
|
|
1797
1797
|
if (n.isNull) throw new Error();
|
|
1798
1798
|
e.FunctionId = n.asGuid();
|
|
1799
1799
|
break;
|
|
1800
1800
|
}
|
|
1801
|
-
case
|
|
1801
|
+
case nr: {
|
|
1802
1802
|
if (n.isNull) throw new Error();
|
|
1803
1803
|
e.Description = n.asString();
|
|
1804
1804
|
break;
|
|
1805
1805
|
}
|
|
1806
|
-
case
|
|
1806
|
+
case rr: {
|
|
1807
1807
|
if (n.isNull) throw new Error();
|
|
1808
1808
|
e.IsCancellable = n.asBool();
|
|
1809
1809
|
break;
|
|
1810
1810
|
}
|
|
1811
|
-
case
|
|
1811
|
+
case sr: {
|
|
1812
1812
|
if (n.isNull) throw new Error();
|
|
1813
1813
|
e.RequiresInstance = n.asBool();
|
|
1814
1814
|
break;
|
|
1815
1815
|
}
|
|
1816
|
-
case
|
|
1816
|
+
case ir: {
|
|
1817
1817
|
if (n.isNull) throw new Error();
|
|
1818
|
-
e.Versions =
|
|
1818
|
+
e.Versions = Ea(n.asArray());
|
|
1819
1819
|
break;
|
|
1820
1820
|
}
|
|
1821
|
-
case
|
|
1821
|
+
case or: {
|
|
1822
1822
|
if (n.isNull) throw new Error();
|
|
1823
1823
|
e.LlmInlineResult = n.asBool();
|
|
1824
1824
|
break;
|
|
1825
1825
|
}
|
|
1826
|
-
case
|
|
1826
|
+
case ar: {
|
|
1827
1827
|
if (n.isNull) throw new Error();
|
|
1828
1828
|
e.IsEnumerable = n.asBool();
|
|
1829
1829
|
break;
|
|
1830
1830
|
}
|
|
1831
|
-
case
|
|
1831
|
+
case cr: {
|
|
1832
1832
|
if (n.isNull) throw new Error();
|
|
1833
|
-
e.Parameters =
|
|
1833
|
+
e.Parameters = Ia(n.asArray());
|
|
1834
1834
|
break;
|
|
1835
1835
|
}
|
|
1836
|
-
case
|
|
1836
|
+
case lr: {
|
|
1837
1837
|
if (n.isNull) throw new Error();
|
|
1838
1838
|
e.LlmCallOnlyOnce = n.asBool();
|
|
1839
1839
|
break;
|
|
1840
1840
|
}
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1844
|
-
const r =
|
|
1845
|
-
return P(
|
|
1843
|
+
function ma(t, e, n) {
|
|
1844
|
+
const r = ha(t);
|
|
1845
|
+
return P(ua, r, Tt, e, n);
|
|
1846
1846
|
}
|
|
1847
|
-
function
|
|
1847
|
+
function Ea(t) {
|
|
1848
1848
|
const e = [];
|
|
1849
1849
|
let n;
|
|
1850
1850
|
for (; (n = t.next()) !== null; )
|
|
1851
1851
|
e.push(n.asString());
|
|
1852
1852
|
return e;
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1854
|
+
function Ia(t) {
|
|
1855
1855
|
const e = [];
|
|
1856
1856
|
let n;
|
|
1857
1857
|
for (; (n = t.next()) !== null; )
|
|
1858
|
-
e.push(
|
|
1858
|
+
e.push(Sa(n.asObject()));
|
|
1859
1859
|
return e;
|
|
1860
1860
|
}
|
|
1861
|
-
const
|
|
1862
|
-
function
|
|
1861
|
+
const _a = 1, hr = 607861992, fr = 894485888, pr = 972460562, mr = 1368629611, Er = 1883521406, Ir = 2603556958, _r = 3609695522, Tr = 4075263697, wr = 4257460908;
|
|
1862
|
+
function Ta(t) {
|
|
1863
1863
|
const e = {};
|
|
1864
|
-
return
|
|
1864
|
+
return Sr(e), e;
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1866
|
+
function Sr(t) {
|
|
1867
1867
|
return t.ParameterIndex = 0, t.ParameterName = "", t.TypeName = "", t.HasDefaultValue = !1, t.DefaultValueJson = "", t.DefaultValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.Description = "", t;
|
|
1868
1868
|
}
|
|
1869
|
-
function Ta(t, e) {
|
|
1870
|
-
e.writeBoolField(dr, t.HasDefaultValue), e.writeStringField(hr, t.DefaultValueJson), e.writeStringField(fr, t.EnumerableItemTypeName), e.writeStringField(pr, t.Description), e.writeBinaryField(mr, t.DefaultValueData), e.writeBoolField(Er, t.IsEnumerable), e.writeStringField(Ir, t.TypeName), e.writeStringField(_r, t.ParameterName), e.writeInt32Field(Tr, t.ParameterIndex | 0);
|
|
1871
|
-
}
|
|
1872
1869
|
function wa(t, e) {
|
|
1873
|
-
|
|
1874
|
-
return wr(n), Sa(t, n), n;
|
|
1870
|
+
e.writeBoolField(hr, t.HasDefaultValue), e.writeStringField(fr, t.DefaultValueJson), e.writeStringField(pr, t.EnumerableItemTypeName), e.writeStringField(mr, t.Description), e.writeBinaryField(Er, t.DefaultValueData), e.writeBoolField(Ir, t.IsEnumerable), e.writeStringField(_r, t.TypeName), e.writeStringField(Tr, t.ParameterName), e.writeInt32Field(wr, t.ParameterIndex | 0);
|
|
1875
1871
|
}
|
|
1876
1872
|
function Sa(t, e) {
|
|
1873
|
+
const n = e ?? Ta();
|
|
1874
|
+
return Sr(n), ga(t, n), n;
|
|
1875
|
+
}
|
|
1876
|
+
function ga(t, e) {
|
|
1877
1877
|
let n;
|
|
1878
1878
|
for (; (n = t.next()) !== null; )
|
|
1879
1879
|
switch (n.fieldId) {
|
|
1880
|
-
case
|
|
1880
|
+
case hr: {
|
|
1881
1881
|
if (n.isNull) throw new Error();
|
|
1882
1882
|
e.HasDefaultValue = n.asBool();
|
|
1883
1883
|
break;
|
|
1884
1884
|
}
|
|
1885
|
-
case
|
|
1885
|
+
case fr: {
|
|
1886
1886
|
if (n.isNull) throw new Error();
|
|
1887
1887
|
e.DefaultValueJson = n.asString();
|
|
1888
1888
|
break;
|
|
1889
1889
|
}
|
|
1890
|
-
case
|
|
1890
|
+
case pr: {
|
|
1891
1891
|
if (n.isNull) throw new Error();
|
|
1892
1892
|
e.EnumerableItemTypeName = n.asString();
|
|
1893
1893
|
break;
|
|
1894
1894
|
}
|
|
1895
|
-
case
|
|
1895
|
+
case mr: {
|
|
1896
1896
|
if (n.isNull) throw new Error();
|
|
1897
1897
|
e.Description = n.asString();
|
|
1898
1898
|
break;
|
|
1899
1899
|
}
|
|
1900
|
-
case
|
|
1900
|
+
case Er: {
|
|
1901
1901
|
if (n.isNull) throw new Error();
|
|
1902
1902
|
e.DefaultValueData = n.asBinary();
|
|
1903
1903
|
break;
|
|
1904
1904
|
}
|
|
1905
|
-
case
|
|
1905
|
+
case Ir: {
|
|
1906
1906
|
if (n.isNull) throw new Error();
|
|
1907
1907
|
e.IsEnumerable = n.asBool();
|
|
1908
1908
|
break;
|
|
1909
1909
|
}
|
|
1910
|
-
case
|
|
1910
|
+
case _r: {
|
|
1911
1911
|
if (n.isNull) throw new Error();
|
|
1912
1912
|
e.TypeName = n.asString();
|
|
1913
1913
|
break;
|
|
1914
1914
|
}
|
|
1915
|
-
case
|
|
1915
|
+
case Tr: {
|
|
1916
1916
|
if (n.isNull) throw new Error();
|
|
1917
1917
|
e.ParameterName = n.asString();
|
|
1918
1918
|
break;
|
|
1919
1919
|
}
|
|
1920
|
-
case
|
|
1920
|
+
case wr: {
|
|
1921
1921
|
if (n.isNull) throw new Error();
|
|
1922
1922
|
e.ParameterIndex = n.asInt32();
|
|
1923
1923
|
break;
|
|
1924
1924
|
}
|
|
1925
1925
|
}
|
|
1926
1926
|
}
|
|
1927
|
-
const
|
|
1928
|
-
function
|
|
1927
|
+
const gr = 1, Ca = 1048638, ya = 3678477544;
|
|
1928
|
+
function Aa(t) {
|
|
1929
1929
|
const e = {};
|
|
1930
|
-
return
|
|
1930
|
+
return Ra(e), t && Object.assign(e, t), e;
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function Ra(t) {
|
|
1933
1933
|
return t.Functions = [], t;
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1936
|
-
const e = new U(
|
|
1937
|
-
return
|
|
1935
|
+
function ba(t) {
|
|
1936
|
+
const e = new U(gr);
|
|
1937
|
+
return Na(t, e), e.finish();
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1940
|
-
e.writeArrayField(
|
|
1939
|
+
function Na(t, e) {
|
|
1940
|
+
e.writeArrayField(ya, O.Object, (n) => {
|
|
1941
1941
|
for (const r of t.Functions)
|
|
1942
1942
|
n.writeObject(Tt, (s) => {
|
|
1943
|
-
|
|
1943
|
+
dr(r, s);
|
|
1944
1944
|
});
|
|
1945
1945
|
});
|
|
1946
1946
|
}
|
|
1947
|
-
function
|
|
1948
|
-
const r =
|
|
1949
|
-
return P(
|
|
1947
|
+
function ka(t, e, n) {
|
|
1948
|
+
const r = ba(t);
|
|
1949
|
+
return P(Ca, r, gr, e, n);
|
|
1950
1950
|
}
|
|
1951
|
-
const
|
|
1952
|
-
function
|
|
1951
|
+
const Cr = 1, yr = 1048602, Ar = 349453957, Rr = 703025676, br = 3403385840, Nr = 3748161056, kr = 4289118421;
|
|
1952
|
+
function Dr(t) {
|
|
1953
1953
|
const e = {};
|
|
1954
|
-
return
|
|
1954
|
+
return vr(e), t && Object.assign(e, t), e;
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function vr(t) {
|
|
1957
1957
|
return t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1960
|
-
const e = new U(
|
|
1961
|
-
return
|
|
1962
|
-
}
|
|
1963
|
-
function Da(t, e) {
|
|
1964
|
-
e.writeBinaryField(yr, t.ResultData), e.writeStringField(Ar, t.ResultTypeName), e.writeStringField(Rr, t.ResultJson), e.writeGuidField(br, t.CallId), e.writeGuidField(Nr, t.InstanceId);
|
|
1959
|
+
function Da(t) {
|
|
1960
|
+
const e = new U(Cr);
|
|
1961
|
+
return va(t, e), e.finish();
|
|
1965
1962
|
}
|
|
1966
1963
|
function va(t, e) {
|
|
1967
|
-
|
|
1968
|
-
return Ua(n, e);
|
|
1964
|
+
e.writeBinaryField(Ar, t.ResultData), e.writeStringField(Rr, t.ResultTypeName), e.writeStringField(br, t.ResultJson), e.writeGuidField(Nr, t.CallId), e.writeGuidField(kr, t.InstanceId);
|
|
1969
1965
|
}
|
|
1970
1966
|
function Ua(t, e) {
|
|
1971
|
-
const n =
|
|
1972
|
-
return
|
|
1967
|
+
const n = V.create(t);
|
|
1968
|
+
return Oa(n, e);
|
|
1973
1969
|
}
|
|
1974
1970
|
function Oa(t, e) {
|
|
1971
|
+
const n = e ?? Dr();
|
|
1972
|
+
return vr(n), Ma(t, n), n;
|
|
1973
|
+
}
|
|
1974
|
+
function Ma(t, e) {
|
|
1975
1975
|
let n;
|
|
1976
1976
|
for (; (n = t.next()) !== null; )
|
|
1977
1977
|
switch (n.fieldId) {
|
|
1978
|
-
case
|
|
1978
|
+
case Ar: {
|
|
1979
1979
|
if (n.isNull) throw new Error();
|
|
1980
1980
|
e.ResultData = n.asBinary();
|
|
1981
1981
|
break;
|
|
1982
1982
|
}
|
|
1983
|
-
case
|
|
1983
|
+
case Rr: {
|
|
1984
1984
|
if (n.isNull) throw new Error();
|
|
1985
1985
|
e.ResultTypeName = n.asString();
|
|
1986
1986
|
break;
|
|
1987
1987
|
}
|
|
1988
|
-
case
|
|
1988
|
+
case br: {
|
|
1989
1989
|
if (n.isNull) throw new Error();
|
|
1990
1990
|
e.ResultJson = n.asString();
|
|
1991
1991
|
break;
|
|
1992
1992
|
}
|
|
1993
|
-
case
|
|
1993
|
+
case Nr: {
|
|
1994
1994
|
if (n.isNull) throw new Error();
|
|
1995
1995
|
e.CallId = n.asGuid();
|
|
1996
1996
|
break;
|
|
1997
1997
|
}
|
|
1998
|
-
case
|
|
1998
|
+
case kr: {
|
|
1999
1999
|
if (n.isNull) throw new Error();
|
|
2000
2000
|
e.InstanceId = n.asGuid();
|
|
2001
2001
|
break;
|
|
2002
2002
|
}
|
|
2003
2003
|
}
|
|
2004
2004
|
}
|
|
2005
|
-
function
|
|
2006
|
-
const r =
|
|
2007
|
-
return P(
|
|
2005
|
+
function Pa(t, e, n) {
|
|
2006
|
+
const r = Da(t);
|
|
2007
|
+
return P(yr, r, Cr, e, n);
|
|
2008
2008
|
}
|
|
2009
|
-
function
|
|
2010
|
-
const n = ce(t,
|
|
2011
|
-
return
|
|
2009
|
+
function La(t, e) {
|
|
2010
|
+
const n = ce(t, yr);
|
|
2011
|
+
return Ua(n, e);
|
|
2012
2012
|
}
|
|
2013
|
-
const
|
|
2013
|
+
const Ur = 1, Fa = 65549;
|
|
2014
2014
|
function Mt(t) {
|
|
2015
2015
|
return {};
|
|
2016
2016
|
}
|
|
2017
|
-
function
|
|
2018
|
-
return new U(
|
|
2017
|
+
function Ba(t) {
|
|
2018
|
+
return new U(Ur).finish();
|
|
2019
2019
|
}
|
|
2020
2020
|
function Pt(t, e, n) {
|
|
2021
|
-
const r =
|
|
2022
|
-
return P(
|
|
2023
|
-
}
|
|
2024
|
-
const Ba = 3167053791, xa = 3342364356, Wa = 3612929027;
|
|
2025
|
-
function Ur(t) {
|
|
2026
|
-
const e = {};
|
|
2027
|
-
return Or(e), e;
|
|
2021
|
+
const r = Ba();
|
|
2022
|
+
return P(Fa, r, Ur, e, n);
|
|
2028
2023
|
}
|
|
2024
|
+
const xa = 3167053791, Wa = 3342364356, Ga = 3612929027;
|
|
2029
2025
|
function Or(t) {
|
|
2030
|
-
|
|
2026
|
+
const e = {};
|
|
2027
|
+
return Mr(e), e;
|
|
2031
2028
|
}
|
|
2032
|
-
function
|
|
2033
|
-
|
|
2034
|
-
return Or(n), Va(t, n), n;
|
|
2029
|
+
function Mr(t) {
|
|
2030
|
+
return t.Category = "", t.Type = an.Face, t.FaceBlendshapes = [], t;
|
|
2035
2031
|
}
|
|
2036
2032
|
function Va(t, e) {
|
|
2033
|
+
const n = e ?? Or();
|
|
2034
|
+
return Mr(n), Ha(t, n), n;
|
|
2035
|
+
}
|
|
2036
|
+
function Ha(t, e) {
|
|
2037
2037
|
let n;
|
|
2038
2038
|
for (; (n = t.next()) !== null; )
|
|
2039
2039
|
switch (n.fieldId) {
|
|
2040
|
-
case
|
|
2040
|
+
case xa: {
|
|
2041
2041
|
if (n.isNull) throw new Error();
|
|
2042
2042
|
e.Type = n.asInt32();
|
|
2043
2043
|
break;
|
|
2044
2044
|
}
|
|
2045
|
-
case
|
|
2045
|
+
case Wa: {
|
|
2046
2046
|
if (n.isNull) throw new Error();
|
|
2047
|
-
e.FaceBlendshapes =
|
|
2047
|
+
e.FaceBlendshapes = $a(n.asArray());
|
|
2048
2048
|
break;
|
|
2049
2049
|
}
|
|
2050
|
-
case
|
|
2050
|
+
case Ga: {
|
|
2051
2051
|
if (n.isNull) throw new Error();
|
|
2052
2052
|
e.Category = n.asString();
|
|
2053
2053
|
break;
|
|
2054
2054
|
}
|
|
2055
2055
|
}
|
|
2056
2056
|
}
|
|
2057
|
-
function
|
|
2057
|
+
function $a(t) {
|
|
2058
2058
|
const e = [];
|
|
2059
2059
|
let n;
|
|
2060
2060
|
for (; (n = t.next()) !== null; )
|
|
2061
2061
|
e.push(n.asString());
|
|
2062
2062
|
return e;
|
|
2063
2063
|
}
|
|
2064
|
-
const
|
|
2065
|
-
function
|
|
2064
|
+
const Ka = 3612929027;
|
|
2065
|
+
function Pr(t) {
|
|
2066
2066
|
const e = {};
|
|
2067
|
-
return
|
|
2067
|
+
return Lr(e), e;
|
|
2068
2068
|
}
|
|
2069
|
-
function
|
|
2069
|
+
function Lr(t) {
|
|
2070
2070
|
return t.Category = "", t;
|
|
2071
2071
|
}
|
|
2072
|
-
function Ka(t, e) {
|
|
2073
|
-
const n = e ?? Mr();
|
|
2074
|
-
return Pr(n), Ya(t, n), n;
|
|
2075
|
-
}
|
|
2076
2072
|
function Ya(t, e) {
|
|
2073
|
+
const n = e ?? Pr();
|
|
2074
|
+
return Lr(n), ja(t, n), n;
|
|
2075
|
+
}
|
|
2076
|
+
function ja(t, e) {
|
|
2077
2077
|
let n;
|
|
2078
2078
|
for (; (n = t.next()) !== null; )
|
|
2079
2079
|
switch (n.fieldId) {
|
|
2080
|
-
case
|
|
2080
|
+
case Ka: {
|
|
2081
2081
|
if (n.isNull) throw new Error();
|
|
2082
2082
|
e.Category = n.asString();
|
|
2083
2083
|
break;
|
|
2084
2084
|
}
|
|
2085
2085
|
}
|
|
2086
2086
|
}
|
|
2087
|
-
const
|
|
2088
|
-
function Lr(t) {
|
|
2089
|
-
const e = {};
|
|
2090
|
-
return Fr(e), e;
|
|
2091
|
-
}
|
|
2087
|
+
const za = 161083277, Xa = 164808083, Ja = 1368629611, Qa = 2745379226, Za = 2950031986, qa = 3282782683, ec = 3284746250, tc = 4065070594;
|
|
2092
2088
|
function Fr(t) {
|
|
2093
|
-
|
|
2089
|
+
const e = {};
|
|
2090
|
+
return Br(e), e;
|
|
2094
2091
|
}
|
|
2095
|
-
function
|
|
2096
|
-
|
|
2097
|
-
return Fr(n), nc(t, n), n;
|
|
2092
|
+
function Br(t) {
|
|
2093
|
+
return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = cn.H264, t.CodecDetails = "", t.Width = 0, t.Height = 0, t.Framerate = 30, t;
|
|
2098
2094
|
}
|
|
2099
2095
|
function nc(t, e) {
|
|
2096
|
+
const n = e ?? Fr();
|
|
2097
|
+
return Br(n), rc(t, n), n;
|
|
2098
|
+
}
|
|
2099
|
+
function rc(t, e) {
|
|
2100
2100
|
let n;
|
|
2101
2101
|
for (; (n = t.next()) !== null; )
|
|
2102
2102
|
switch (n.fieldId) {
|
|
2103
|
-
case
|
|
2103
|
+
case za: {
|
|
2104
2104
|
if (n.isNull) throw new Error();
|
|
2105
2105
|
e.StreamId = n.asString();
|
|
2106
2106
|
break;
|
|
2107
2107
|
}
|
|
2108
|
-
case
|
|
2108
|
+
case Xa: {
|
|
2109
2109
|
if (n.isNull) throw new Error();
|
|
2110
2110
|
e.Framerate = n.asFloat64();
|
|
2111
2111
|
break;
|
|
2112
2112
|
}
|
|
2113
|
-
case
|
|
2113
|
+
case Ja: {
|
|
2114
2114
|
if (n.isNull) throw new Error();
|
|
2115
2115
|
e.Description = n.asString();
|
|
2116
2116
|
break;
|
|
2117
2117
|
}
|
|
2118
|
-
case
|
|
2118
|
+
case Qa: {
|
|
2119
2119
|
if (n.isNull) throw new Error();
|
|
2120
2120
|
e.CodecDetails = n.asString();
|
|
2121
2121
|
break;
|
|
2122
2122
|
}
|
|
2123
|
-
case
|
|
2123
|
+
case Za: {
|
|
2124
2124
|
if (n.isNull) throw new Error();
|
|
2125
2125
|
e.Height = n.asInt32();
|
|
2126
2126
|
break;
|
|
2127
2127
|
}
|
|
2128
|
-
case
|
|
2128
|
+
case qa: {
|
|
2129
2129
|
if (n.isNull) throw new Error();
|
|
2130
2130
|
e.SourceType = n.asString();
|
|
2131
2131
|
break;
|
|
2132
2132
|
}
|
|
2133
|
-
case
|
|
2133
|
+
case ec: {
|
|
2134
2134
|
if (n.isNull) throw new Error();
|
|
2135
2135
|
e.Codec = n.asInt32();
|
|
2136
2136
|
break;
|
|
2137
2137
|
}
|
|
2138
|
-
case
|
|
2138
|
+
case tc: {
|
|
2139
2139
|
if (n.isNull) throw new Error();
|
|
2140
2140
|
e.Width = n.asInt32();
|
|
2141
2141
|
break;
|
|
2142
2142
|
}
|
|
2143
2143
|
}
|
|
2144
2144
|
}
|
|
2145
|
-
const
|
|
2146
|
-
function
|
|
2145
|
+
const sc = 65539, ic = 693643444, oc = 1144553441, ac = 1497620243, cc = 1559330978, lc = 1976546434, uc = 1999510636, dc = 2271236852, hc = 2277643855, fc = 2469008121, pc = 3042922213, mc = 3064612128, Ec = 3219210453, Ic = 3504054055, _c = 3678477544, Tc = 3696445035, wc = 3707543140, Sc = 3712281496, gc = 3895362455, Cc = 3897397815, yc = 4225107827;
|
|
2146
|
+
function Ac(t) {
|
|
2147
2147
|
const e = {};
|
|
2148
|
-
return
|
|
2149
|
-
}
|
|
2150
|
-
function Br(t) {
|
|
2151
|
-
return t.Clients = /* @__PURE__ */ Object.create(null), t.Functions = /* @__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.ChannelId = "", t.SessionId = "", t.ChannelUrl = "", t.SessionChannelUrl = "", t.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = cn.Local, t.AppSourceType = ln.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
|
|
2148
|
+
return xr(e), e;
|
|
2152
2149
|
}
|
|
2153
|
-
function
|
|
2154
|
-
|
|
2155
|
-
return Rc(n, e);
|
|
2150
|
+
function xr(t) {
|
|
2151
|
+
return t.Clients = /* @__PURE__ */ Object.create(null), t.Functions = /* @__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.ChannelId = "", t.SessionId = "", t.ChannelUrl = "", t.SessionChannelUrl = "", t.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = ln.Local, t.AppSourceType = un.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
|
|
2156
2152
|
}
|
|
2157
2153
|
function Rc(t, e) {
|
|
2158
|
-
const n =
|
|
2159
|
-
return
|
|
2154
|
+
const n = V.create(t);
|
|
2155
|
+
return bc(n, e);
|
|
2160
2156
|
}
|
|
2161
2157
|
function bc(t, e) {
|
|
2158
|
+
const n = e ?? Ac();
|
|
2159
|
+
return xr(n), Nc(t, n), n;
|
|
2160
|
+
}
|
|
2161
|
+
function Nc(t, e) {
|
|
2162
2162
|
let n;
|
|
2163
2163
|
for (; (n = t.next()) !== null; )
|
|
2164
2164
|
switch (n.fieldId) {
|
|
2165
|
-
case sc: {
|
|
2166
|
-
if (n.isNull) throw new Error();
|
|
2167
|
-
e.FirstUserId = n.asString();
|
|
2168
|
-
break;
|
|
2169
|
-
}
|
|
2170
2165
|
case ic: {
|
|
2171
2166
|
if (n.isNull) throw new Error();
|
|
2172
|
-
e.
|
|
2167
|
+
e.FirstUserId = n.asString();
|
|
2173
2168
|
break;
|
|
2174
2169
|
}
|
|
2175
2170
|
case oc: {
|
|
2176
2171
|
if (n.isNull) throw new Error();
|
|
2177
|
-
e.
|
|
2172
|
+
e.Clients = Dc(n.asDictionary());
|
|
2178
2173
|
break;
|
|
2179
2174
|
}
|
|
2180
2175
|
case ac: {
|
|
2181
2176
|
if (n.isNull) throw new Error();
|
|
2182
|
-
e.
|
|
2177
|
+
e.TrackingStreams = vc(n.asDictionary());
|
|
2183
2178
|
break;
|
|
2184
2179
|
}
|
|
2185
2180
|
case cc: {
|
|
2186
2181
|
if (n.isNull) throw new Error();
|
|
2187
|
-
e.
|
|
2182
|
+
e.ChannelId = n.asString();
|
|
2188
2183
|
break;
|
|
2189
2184
|
}
|
|
2190
2185
|
case lc: {
|
|
2191
2186
|
if (n.isNull) throw new Error();
|
|
2192
|
-
e.
|
|
2187
|
+
e.AppSourceType = n.asInt32();
|
|
2193
2188
|
break;
|
|
2194
2189
|
}
|
|
2195
2190
|
case uc: {
|
|
2196
2191
|
if (n.isNull) throw new Error();
|
|
2197
|
-
e.
|
|
2192
|
+
e.SessionId = n.asString();
|
|
2198
2193
|
break;
|
|
2199
2194
|
}
|
|
2200
2195
|
case dc: {
|
|
2201
2196
|
if (n.isNull) throw new Error();
|
|
2202
|
-
e.
|
|
2197
|
+
e.SessionChannelUrl = n.asString();
|
|
2203
2198
|
break;
|
|
2204
2199
|
}
|
|
2205
2200
|
case hc: {
|
|
2206
2201
|
if (n.isNull) throw new Error();
|
|
2207
|
-
e.
|
|
2202
|
+
e.ChannelUrl = n.asString();
|
|
2208
2203
|
break;
|
|
2209
2204
|
}
|
|
2210
2205
|
case fc: {
|
|
2211
2206
|
if (n.isNull) throw new Error();
|
|
2212
|
-
e.
|
|
2207
|
+
e.ChannelName = n.asString();
|
|
2213
2208
|
break;
|
|
2214
2209
|
}
|
|
2215
2210
|
case pc: {
|
|
2216
2211
|
if (n.isNull) throw new Error();
|
|
2217
|
-
e.
|
|
2212
|
+
e.PublicAccess = n.asBool();
|
|
2218
2213
|
break;
|
|
2219
2214
|
}
|
|
2220
2215
|
case mc: {
|
|
2221
2216
|
if (n.isNull) throw new Error();
|
|
2222
|
-
e.
|
|
2217
|
+
e.ServerRunType = n.asInt32();
|
|
2223
2218
|
break;
|
|
2224
2219
|
}
|
|
2225
2220
|
case Ec: {
|
|
2226
2221
|
if (n.isNull) throw new Error();
|
|
2227
|
-
e.
|
|
2222
|
+
e.OrganisationName = n.asString();
|
|
2228
2223
|
break;
|
|
2229
2224
|
}
|
|
2230
2225
|
case Ic: {
|
|
2231
2226
|
if (n.isNull) throw new Error();
|
|
2232
|
-
e.
|
|
2227
|
+
e.DebugMode = n.asBool();
|
|
2233
2228
|
break;
|
|
2234
2229
|
}
|
|
2235
2230
|
case _c: {
|
|
2236
2231
|
if (n.isNull) throw new Error();
|
|
2237
|
-
e.
|
|
2232
|
+
e.Functions = Uc(n.asDictionary());
|
|
2238
2233
|
break;
|
|
2239
2234
|
}
|
|
2240
2235
|
case Tc: {
|
|
2241
2236
|
if (n.isNull) throw new Error();
|
|
2242
|
-
e.
|
|
2237
|
+
e.UIStreams = Oc(n.asDictionary());
|
|
2243
2238
|
break;
|
|
2244
2239
|
}
|
|
2245
2240
|
case wc: {
|
|
2246
2241
|
if (n.isNull) throw new Error();
|
|
2247
|
-
e.
|
|
2242
|
+
e.SpaceId = n.asString();
|
|
2248
2243
|
break;
|
|
2249
2244
|
}
|
|
2250
2245
|
case Sc: {
|
|
2251
2246
|
if (n.isNull) throw new Error();
|
|
2252
|
-
e.
|
|
2247
|
+
e.PrimaryUserId = n.asString();
|
|
2253
2248
|
break;
|
|
2254
2249
|
}
|
|
2255
2250
|
case gc: {
|
|
2256
2251
|
if (n.isNull) throw new Error();
|
|
2257
|
-
e.
|
|
2252
|
+
e.AudioStreams = Mc(n.asDictionary());
|
|
2258
2253
|
break;
|
|
2259
2254
|
}
|
|
2260
2255
|
case Cc: {
|
|
2256
|
+
if (n.isNull) throw new Error();
|
|
2257
|
+
e.VideoStreams = Pc(n.asDictionary());
|
|
2258
|
+
break;
|
|
2259
|
+
}
|
|
2260
|
+
case yc: {
|
|
2261
2261
|
if (n.isNull) throw new Error();
|
|
2262
2262
|
e.SpaceName = n.asString();
|
|
2263
2263
|
break;
|
|
2264
2264
|
}
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
|
-
async function
|
|
2268
|
-
const n = await dt(t,
|
|
2269
|
-
return
|
|
2267
|
+
async function kc(t, e) {
|
|
2268
|
+
const n = await dt(t, sc);
|
|
2269
|
+
return Rc(n, e);
|
|
2270
2270
|
}
|
|
2271
|
-
function
|
|
2271
|
+
function Dc(t) {
|
|
2272
2272
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2273
2273
|
let n;
|
|
2274
2274
|
for (; (n = t.next()) !== null; ) {
|
|
@@ -2277,475 +2277,475 @@ function kc(t) {
|
|
|
2277
2277
|
}
|
|
2278
2278
|
return e;
|
|
2279
2279
|
}
|
|
2280
|
-
function
|
|
2280
|
+
function vc(t) {
|
|
2281
2281
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2282
2282
|
let n;
|
|
2283
2283
|
for (; (n = t.next()) !== null; ) {
|
|
2284
2284
|
const r = n.key.asString();
|
|
2285
|
-
e[r] =
|
|
2285
|
+
e[r] = ll(n.value.asObject());
|
|
2286
2286
|
}
|
|
2287
2287
|
return e;
|
|
2288
2288
|
}
|
|
2289
|
-
function
|
|
2289
|
+
function Uc(t) {
|
|
2290
2290
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2291
2291
|
let n;
|
|
2292
2292
|
for (; (n = t.next()) !== null; ) {
|
|
2293
2293
|
const r = n.key.asInt32();
|
|
2294
|
-
e[r] =
|
|
2294
|
+
e[r] = Lc(n.value.asArray());
|
|
2295
2295
|
}
|
|
2296
2296
|
return e;
|
|
2297
2297
|
}
|
|
2298
|
-
function
|
|
2298
|
+
function Oc(t) {
|
|
2299
2299
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2300
2300
|
let n;
|
|
2301
2301
|
for (; (n = t.next()) !== null; ) {
|
|
2302
2302
|
const r = n.key.asString();
|
|
2303
|
-
e[r] =
|
|
2303
|
+
e[r] = Vc(n.value.asObject());
|
|
2304
2304
|
}
|
|
2305
2305
|
return e;
|
|
2306
2306
|
}
|
|
2307
|
-
function
|
|
2307
|
+
function Mc(t) {
|
|
2308
2308
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2309
2309
|
let n;
|
|
2310
2310
|
for (; (n = t.next()) !== null; ) {
|
|
2311
2311
|
const r = n.key.asString();
|
|
2312
|
-
e[r] =
|
|
2312
|
+
e[r] = Xc(n.value.asObject());
|
|
2313
2313
|
}
|
|
2314
2314
|
return e;
|
|
2315
2315
|
}
|
|
2316
|
-
function
|
|
2316
|
+
function Pc(t) {
|
|
2317
2317
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2318
2318
|
let n;
|
|
2319
2319
|
for (; (n = t.next()) !== null; ) {
|
|
2320
2320
|
const r = n.key.asString();
|
|
2321
|
-
e[r] =
|
|
2321
|
+
e[r] = nl(n.value.asObject());
|
|
2322
2322
|
}
|
|
2323
2323
|
return e;
|
|
2324
2324
|
}
|
|
2325
|
-
function
|
|
2325
|
+
function Lc(t) {
|
|
2326
2326
|
const e = [];
|
|
2327
2327
|
let n;
|
|
2328
2328
|
for (; (n = t.next()) !== null; )
|
|
2329
|
-
e.push(
|
|
2329
|
+
e.push(fa(n.asObject()));
|
|
2330
2330
|
return e;
|
|
2331
2331
|
}
|
|
2332
|
-
const
|
|
2333
|
-
function
|
|
2332
|
+
const Fc = 161083277, Bc = 325678206, xc = 3469892363, Wc = 3645544153;
|
|
2333
|
+
function Gc(t) {
|
|
2334
2334
|
const e = {};
|
|
2335
|
-
return
|
|
2336
|
-
}
|
|
2337
|
-
function xr(t) {
|
|
2338
|
-
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Mr(), t;
|
|
2335
|
+
return Wr(e), e;
|
|
2339
2336
|
}
|
|
2340
|
-
function
|
|
2341
|
-
|
|
2342
|
-
return xr(n), Vc(t, n), n;
|
|
2337
|
+
function Wr(t) {
|
|
2338
|
+
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Pr(), t;
|
|
2343
2339
|
}
|
|
2344
2340
|
function Vc(t, e) {
|
|
2341
|
+
const n = e ?? Gc();
|
|
2342
|
+
return Wr(n), Hc(t, n), n;
|
|
2343
|
+
}
|
|
2344
|
+
function Hc(t, e) {
|
|
2345
2345
|
let n;
|
|
2346
2346
|
for (; (n = t.next()) !== null; )
|
|
2347
2347
|
switch (n.fieldId) {
|
|
2348
|
-
case
|
|
2348
|
+
case Fc: {
|
|
2349
2349
|
if (n.isNull) throw new Error();
|
|
2350
2350
|
e.StreamId = n.asString();
|
|
2351
2351
|
break;
|
|
2352
2352
|
}
|
|
2353
|
-
case
|
|
2353
|
+
case Bc: {
|
|
2354
2354
|
if (n.isNull) throw new Error();
|
|
2355
2355
|
e.ClientSessionId = n.asInt32();
|
|
2356
2356
|
break;
|
|
2357
2357
|
}
|
|
2358
|
-
case
|
|
2358
|
+
case xc: {
|
|
2359
2359
|
if (n.isNull) throw new Error();
|
|
2360
2360
|
e.TrackId = n.asInt32();
|
|
2361
2361
|
break;
|
|
2362
2362
|
}
|
|
2363
|
-
case
|
|
2363
|
+
case Wc: {
|
|
2364
2364
|
if (n.isNull) throw new Error();
|
|
2365
|
-
e.Info =
|
|
2365
|
+
e.Info = Ya(n.asObject());
|
|
2366
2366
|
break;
|
|
2367
2367
|
}
|
|
2368
2368
|
}
|
|
2369
2369
|
}
|
|
2370
|
-
const
|
|
2371
|
-
function
|
|
2370
|
+
const $c = 161083277, Kc = 325678206, Yc = 3469892363, jc = 3645544153;
|
|
2371
|
+
function zc(t) {
|
|
2372
2372
|
const e = {};
|
|
2373
|
-
return
|
|
2374
|
-
}
|
|
2375
|
-
function Wr(t) {
|
|
2376
|
-
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Sn(), t;
|
|
2373
|
+
return Gr(e), e;
|
|
2377
2374
|
}
|
|
2378
|
-
function
|
|
2379
|
-
|
|
2380
|
-
return Wr(n), Xc(t, n), n;
|
|
2375
|
+
function Gr(t) {
|
|
2376
|
+
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = gn(), t;
|
|
2381
2377
|
}
|
|
2382
2378
|
function Xc(t, e) {
|
|
2379
|
+
const n = e ?? zc();
|
|
2380
|
+
return Gr(n), Jc(t, n), n;
|
|
2381
|
+
}
|
|
2382
|
+
function Jc(t, e) {
|
|
2383
2383
|
let n;
|
|
2384
2384
|
for (; (n = t.next()) !== null; )
|
|
2385
2385
|
switch (n.fieldId) {
|
|
2386
|
-
case
|
|
2386
|
+
case $c: {
|
|
2387
2387
|
if (n.isNull) throw new Error();
|
|
2388
2388
|
e.StreamId = n.asString();
|
|
2389
2389
|
break;
|
|
2390
2390
|
}
|
|
2391
|
-
case
|
|
2391
|
+
case Kc: {
|
|
2392
2392
|
if (n.isNull) throw new Error();
|
|
2393
2393
|
e.ClientSessionId = n.asInt32();
|
|
2394
2394
|
break;
|
|
2395
2395
|
}
|
|
2396
|
-
case
|
|
2396
|
+
case Yc: {
|
|
2397
2397
|
if (n.isNull) throw new Error();
|
|
2398
2398
|
e.TrackId = n.asInt32();
|
|
2399
2399
|
break;
|
|
2400
2400
|
}
|
|
2401
|
-
case
|
|
2401
|
+
case jc: {
|
|
2402
2402
|
if (n.isNull) throw new Error();
|
|
2403
|
-
e.Info =
|
|
2403
|
+
e.Info = Ei(n.asObject());
|
|
2404
2404
|
break;
|
|
2405
2405
|
}
|
|
2406
2406
|
}
|
|
2407
2407
|
}
|
|
2408
|
-
const
|
|
2409
|
-
function
|
|
2408
|
+
const Qc = 161083277, Zc = 325678206, qc = 3469892363, el = 3645544153;
|
|
2409
|
+
function tl(t) {
|
|
2410
2410
|
const e = {};
|
|
2411
|
-
return
|
|
2412
|
-
}
|
|
2413
|
-
function Gr(t) {
|
|
2414
|
-
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Lr(), t;
|
|
2411
|
+
return Vr(e), e;
|
|
2415
2412
|
}
|
|
2416
|
-
function
|
|
2417
|
-
|
|
2418
|
-
return Gr(n), nl(t, n), n;
|
|
2413
|
+
function Vr(t) {
|
|
2414
|
+
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Fr(), t;
|
|
2419
2415
|
}
|
|
2420
2416
|
function nl(t, e) {
|
|
2417
|
+
const n = e ?? tl();
|
|
2418
|
+
return Vr(n), rl(t, n), n;
|
|
2419
|
+
}
|
|
2420
|
+
function rl(t, e) {
|
|
2421
2421
|
let n;
|
|
2422
2422
|
for (; (n = t.next()) !== null; )
|
|
2423
2423
|
switch (n.fieldId) {
|
|
2424
|
-
case
|
|
2424
|
+
case Qc: {
|
|
2425
2425
|
if (n.isNull) throw new Error();
|
|
2426
2426
|
e.StreamId = n.asString();
|
|
2427
2427
|
break;
|
|
2428
2428
|
}
|
|
2429
|
-
case
|
|
2429
|
+
case Zc: {
|
|
2430
2430
|
if (n.isNull) throw new Error();
|
|
2431
2431
|
e.ClientSessionId = n.asInt32();
|
|
2432
2432
|
break;
|
|
2433
2433
|
}
|
|
2434
|
-
case
|
|
2434
|
+
case qc: {
|
|
2435
2435
|
if (n.isNull) throw new Error();
|
|
2436
2436
|
e.TrackId = n.asInt32();
|
|
2437
2437
|
break;
|
|
2438
2438
|
}
|
|
2439
|
-
case
|
|
2439
|
+
case el: {
|
|
2440
2440
|
if (n.isNull) throw new Error();
|
|
2441
|
-
e.Info =
|
|
2441
|
+
e.Info = nc(n.asObject());
|
|
2442
2442
|
break;
|
|
2443
2443
|
}
|
|
2444
2444
|
}
|
|
2445
2445
|
}
|
|
2446
|
-
const
|
|
2447
|
-
function
|
|
2446
|
+
const sl = 161083277, il = 325678206, ol = 3469892363, al = 3645544153;
|
|
2447
|
+
function cl(t) {
|
|
2448
2448
|
const e = {};
|
|
2449
|
-
return
|
|
2450
|
-
}
|
|
2451
|
-
function Vr(t) {
|
|
2452
|
-
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Ur(), t;
|
|
2449
|
+
return Hr(e), e;
|
|
2453
2450
|
}
|
|
2454
|
-
function
|
|
2455
|
-
|
|
2456
|
-
return Vr(n), ll(t, n), n;
|
|
2451
|
+
function Hr(t) {
|
|
2452
|
+
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Or(), t;
|
|
2457
2453
|
}
|
|
2458
2454
|
function ll(t, e) {
|
|
2455
|
+
const n = e ?? cl();
|
|
2456
|
+
return Hr(n), ul(t, n), n;
|
|
2457
|
+
}
|
|
2458
|
+
function ul(t, e) {
|
|
2459
2459
|
let n;
|
|
2460
2460
|
for (; (n = t.next()) !== null; )
|
|
2461
2461
|
switch (n.fieldId) {
|
|
2462
|
-
case
|
|
2462
|
+
case sl: {
|
|
2463
2463
|
if (n.isNull) throw new Error();
|
|
2464
2464
|
e.StreamId = n.asString();
|
|
2465
2465
|
break;
|
|
2466
2466
|
}
|
|
2467
|
-
case
|
|
2467
|
+
case il: {
|
|
2468
2468
|
if (n.isNull) throw new Error();
|
|
2469
2469
|
e.ClientSessionId = n.asInt32();
|
|
2470
2470
|
break;
|
|
2471
2471
|
}
|
|
2472
|
-
case
|
|
2472
|
+
case ol: {
|
|
2473
2473
|
if (n.isNull) throw new Error();
|
|
2474
2474
|
e.TrackId = n.asInt32();
|
|
2475
2475
|
break;
|
|
2476
2476
|
}
|
|
2477
|
-
case
|
|
2477
|
+
case al: {
|
|
2478
2478
|
if (n.isNull) throw new Error();
|
|
2479
|
-
e.Info =
|
|
2479
|
+
e.Info = Va(n.asObject());
|
|
2480
2480
|
break;
|
|
2481
2481
|
}
|
|
2482
2482
|
}
|
|
2483
2483
|
}
|
|
2484
|
-
const
|
|
2485
|
-
function
|
|
2484
|
+
const $r = 1, dl = 131074;
|
|
2485
|
+
function Kr(t) {
|
|
2486
2486
|
return {};
|
|
2487
2487
|
}
|
|
2488
|
-
function
|
|
2489
|
-
return new U(
|
|
2488
|
+
function hl(t) {
|
|
2489
|
+
return new U($r).finish();
|
|
2490
2490
|
}
|
|
2491
|
-
function
|
|
2492
|
-
const r =
|
|
2493
|
-
return P(
|
|
2491
|
+
function Yr(t, e, n) {
|
|
2492
|
+
const r = hl();
|
|
2493
|
+
return P(dl, r, $r, e, n);
|
|
2494
2494
|
}
|
|
2495
|
-
const
|
|
2496
|
-
function
|
|
2495
|
+
const jr = 1, fl = 65558, pl = 250031587, ml = 1286979607, El = 2033288346, Il = 3542818975;
|
|
2496
|
+
function _l(t) {
|
|
2497
2497
|
const e = {};
|
|
2498
|
-
return
|
|
2498
|
+
return Tl(e), t && Object.assign(e, t), e;
|
|
2499
2499
|
}
|
|
2500
|
-
function
|
|
2500
|
+
function Tl(t) {
|
|
2501
2501
|
return t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t;
|
|
2502
2502
|
}
|
|
2503
|
-
function
|
|
2504
|
-
const e = new U(
|
|
2505
|
-
return
|
|
2503
|
+
function wl(t) {
|
|
2504
|
+
const e = new U(jr);
|
|
2505
|
+
return Sl(t, e), e.finish();
|
|
2506
2506
|
}
|
|
2507
|
-
function
|
|
2508
|
-
e.writeStringField(
|
|
2507
|
+
function Sl(t, e) {
|
|
2508
|
+
e.writeStringField(pl, t.Theme), e.writeInt32Field(ml, t.ViewportHeight | 0), e.writeInt32Field(El, t.ViewportWidth | 0), e.writeStringField(Il, t.Timezone);
|
|
2509
2509
|
}
|
|
2510
|
-
function
|
|
2511
|
-
const r =
|
|
2512
|
-
return P(
|
|
2510
|
+
function gl(t, e, n) {
|
|
2511
|
+
const r = wl(t);
|
|
2512
|
+
return P(fl, r, jr, e, n);
|
|
2513
2513
|
}
|
|
2514
|
-
const
|
|
2515
|
-
function
|
|
2514
|
+
const zr = 1, Cl = 8388612;
|
|
2515
|
+
function yl(t) {
|
|
2516
2516
|
return {};
|
|
2517
2517
|
}
|
|
2518
|
-
function
|
|
2519
|
-
return new U(
|
|
2518
|
+
function Al(t) {
|
|
2519
|
+
return new U(zr).finish();
|
|
2520
2520
|
}
|
|
2521
|
-
function
|
|
2522
|
-
const r =
|
|
2523
|
-
return P(
|
|
2521
|
+
function Rl(t, e, n) {
|
|
2522
|
+
const r = Al();
|
|
2523
|
+
return P(Cl, r, zr, e, n);
|
|
2524
2524
|
}
|
|
2525
|
-
const
|
|
2526
|
-
function
|
|
2525
|
+
const Xr = 65567, bl = 1455877031;
|
|
2526
|
+
function Nl(t) {
|
|
2527
2527
|
const e = {};
|
|
2528
|
-
return
|
|
2528
|
+
return Jr(e), e;
|
|
2529
2529
|
}
|
|
2530
|
-
function
|
|
2530
|
+
function Jr(t) {
|
|
2531
2531
|
return t.Sdp = "", t;
|
|
2532
2532
|
}
|
|
2533
|
-
function Nl(t, e) {
|
|
2534
|
-
const n = V.create(t);
|
|
2535
|
-
return kl(n, e);
|
|
2536
|
-
}
|
|
2537
2533
|
function kl(t, e) {
|
|
2538
|
-
const n =
|
|
2539
|
-
return
|
|
2534
|
+
const n = V.create(t);
|
|
2535
|
+
return Dl(n, e);
|
|
2540
2536
|
}
|
|
2541
2537
|
function Dl(t, e) {
|
|
2538
|
+
const n = e ?? Nl();
|
|
2539
|
+
return Jr(n), vl(t, n), n;
|
|
2540
|
+
}
|
|
2541
|
+
function vl(t, e) {
|
|
2542
2542
|
let n;
|
|
2543
2543
|
for (; (n = t.next()) !== null; )
|
|
2544
2544
|
switch (n.fieldId) {
|
|
2545
|
-
case
|
|
2545
|
+
case bl: {
|
|
2546
2546
|
if (n.isNull) throw new Error();
|
|
2547
2547
|
e.Sdp = n.asString();
|
|
2548
2548
|
break;
|
|
2549
2549
|
}
|
|
2550
2550
|
}
|
|
2551
2551
|
}
|
|
2552
|
-
function
|
|
2553
|
-
const n = ce(t,
|
|
2554
|
-
return
|
|
2552
|
+
function Ul(t, e) {
|
|
2553
|
+
const n = ce(t, Xr);
|
|
2554
|
+
return kl(n, e);
|
|
2555
2555
|
}
|
|
2556
|
-
const
|
|
2556
|
+
const Qr = 1, Ol = 65570, Ml = 2677673673;
|
|
2557
2557
|
function Lt(t) {
|
|
2558
2558
|
const e = {};
|
|
2559
|
-
return
|
|
2559
|
+
return Pl(e), t && Object.assign(e, t), e;
|
|
2560
2560
|
}
|
|
2561
|
-
function
|
|
2561
|
+
function Pl(t) {
|
|
2562
2562
|
return t.IsStart = !1, t;
|
|
2563
2563
|
}
|
|
2564
|
-
function
|
|
2565
|
-
const e = new U(
|
|
2566
|
-
return
|
|
2564
|
+
function Ll(t) {
|
|
2565
|
+
const e = new U(Qr);
|
|
2566
|
+
return Fl(t, e), e.finish();
|
|
2567
2567
|
}
|
|
2568
|
-
function
|
|
2569
|
-
e.writeBoolField(
|
|
2568
|
+
function Fl(t, e) {
|
|
2569
|
+
e.writeBoolField(Ml, t.IsStart);
|
|
2570
2570
|
}
|
|
2571
2571
|
function Ft(t, e, n) {
|
|
2572
|
-
const r =
|
|
2573
|
-
return P(
|
|
2572
|
+
const r = Ll(t);
|
|
2573
|
+
return P(Ol, r, Qr, e, n);
|
|
2574
2574
|
}
|
|
2575
|
-
const
|
|
2576
|
-
function
|
|
2575
|
+
const Zr = 1, wt = 65568, qr = 646075140, es = 2324511977, ts = 4002097439;
|
|
2576
|
+
function ns(t) {
|
|
2577
2577
|
const e = {};
|
|
2578
|
-
return
|
|
2578
|
+
return rs(e), t && Object.assign(e, t), e;
|
|
2579
2579
|
}
|
|
2580
|
-
function
|
|
2580
|
+
function rs(t) {
|
|
2581
2581
|
return t.Candidate = "", t.SdpMid = "", t.SdpMLineIndex = 0, t;
|
|
2582
2582
|
}
|
|
2583
|
-
function
|
|
2584
|
-
const e = new U(
|
|
2585
|
-
return
|
|
2586
|
-
}
|
|
2587
|
-
function Bl(t, e) {
|
|
2588
|
-
e.writeStringField(Zr, t.Candidate), e.writeStringField(qr, t.SdpMid), e.writeInt32Field(es, t.SdpMLineIndex | 0);
|
|
2583
|
+
function Bl(t) {
|
|
2584
|
+
const e = new U(Zr);
|
|
2585
|
+
return xl(t, e), e.finish();
|
|
2589
2586
|
}
|
|
2590
2587
|
function xl(t, e) {
|
|
2591
|
-
|
|
2592
|
-
return Wl(n, e);
|
|
2588
|
+
e.writeStringField(qr, t.Candidate), e.writeStringField(es, t.SdpMid), e.writeInt32Field(ts, t.SdpMLineIndex | 0);
|
|
2593
2589
|
}
|
|
2594
2590
|
function Wl(t, e) {
|
|
2595
|
-
const n =
|
|
2596
|
-
return
|
|
2591
|
+
const n = V.create(t);
|
|
2592
|
+
return Gl(n, e);
|
|
2597
2593
|
}
|
|
2598
2594
|
function Gl(t, e) {
|
|
2595
|
+
const n = e ?? ns();
|
|
2596
|
+
return rs(n), Vl(t, n), n;
|
|
2597
|
+
}
|
|
2598
|
+
function Vl(t, e) {
|
|
2599
2599
|
let n;
|
|
2600
2600
|
for (; (n = t.next()) !== null; )
|
|
2601
2601
|
switch (n.fieldId) {
|
|
2602
|
-
case
|
|
2602
|
+
case qr: {
|
|
2603
2603
|
if (n.isNull) throw new Error();
|
|
2604
2604
|
e.Candidate = n.asString();
|
|
2605
2605
|
break;
|
|
2606
2606
|
}
|
|
2607
|
-
case
|
|
2607
|
+
case es: {
|
|
2608
2608
|
if (n.isNull) throw new Error();
|
|
2609
2609
|
e.SdpMid = n.asString();
|
|
2610
2610
|
break;
|
|
2611
2611
|
}
|
|
2612
|
-
case
|
|
2612
|
+
case ts: {
|
|
2613
2613
|
if (n.isNull) throw new Error();
|
|
2614
2614
|
e.SdpMLineIndex = n.asInt32();
|
|
2615
2615
|
break;
|
|
2616
2616
|
}
|
|
2617
2617
|
}
|
|
2618
2618
|
}
|
|
2619
|
-
function
|
|
2620
|
-
const r =
|
|
2621
|
-
return P(wt, r,
|
|
2619
|
+
function Hl(t, e, n) {
|
|
2620
|
+
const r = Bl(t);
|
|
2621
|
+
return P(wt, r, Zr, e, n);
|
|
2622
2622
|
}
|
|
2623
|
-
function
|
|
2623
|
+
function $l(t, e) {
|
|
2624
2624
|
const n = ce(t, wt);
|
|
2625
|
-
return
|
|
2625
|
+
return Wl(n, e);
|
|
2626
2626
|
}
|
|
2627
|
-
const
|
|
2628
|
-
function
|
|
2627
|
+
const ss = 1, Kl = 65566, Yl = 407060584, jl = 1175184220, zl = 1241248827, Xl = 1455877031, Jl = 3419353826, Ql = 3686066300;
|
|
2628
|
+
function Zl(t) {
|
|
2629
2629
|
const e = {};
|
|
2630
|
-
return
|
|
2630
|
+
return ql(e), t && Object.assign(e, t), e;
|
|
2631
2631
|
}
|
|
2632
|
-
function
|
|
2632
|
+
function ql(t) {
|
|
2633
2633
|
return t.Sdp = "", t.OpcodeGroupsFromServer = g.NONE, t.OpcodeGroupsToServer = g.NONE, t.UseAudioTrack = !1, t.UseVideoTrack = !1, t.UseDataChannel = !1, t;
|
|
2634
2634
|
}
|
|
2635
|
-
function
|
|
2636
|
-
const e = new U(
|
|
2637
|
-
return
|
|
2635
|
+
function eu(t) {
|
|
2636
|
+
const e = new U(ss);
|
|
2637
|
+
return tu(t, e), e.finish();
|
|
2638
2638
|
}
|
|
2639
|
-
function
|
|
2640
|
-
e.writeBoolField(
|
|
2639
|
+
function tu(t, e) {
|
|
2640
|
+
e.writeBoolField(Yl, t.UseVideoTrack), e.writeInt32Field(jl, t.OpcodeGroupsFromServer), e.writeBoolField(zl, t.UseAudioTrack), e.writeStringField(Xl, t.Sdp), e.writeBoolField(Jl, t.UseDataChannel), e.writeInt32Field(Ql, t.OpcodeGroupsToServer);
|
|
2641
2641
|
}
|
|
2642
|
-
function
|
|
2643
|
-
const r =
|
|
2644
|
-
return P(
|
|
2642
|
+
function nu(t, e, n) {
|
|
2643
|
+
const r = eu(t);
|
|
2644
|
+
return P(Kl, r, ss, e, n);
|
|
2645
2645
|
}
|
|
2646
|
-
const
|
|
2647
|
-
function
|
|
2646
|
+
const is = 65569, ru = 2838554230, su = 3673535008;
|
|
2647
|
+
function iu(t) {
|
|
2648
2648
|
const e = {};
|
|
2649
|
-
return
|
|
2649
|
+
return os(e), e;
|
|
2650
2650
|
}
|
|
2651
|
-
function
|
|
2651
|
+
function os(t) {
|
|
2652
2652
|
return t.Success = !0, t.ErrorMessage = "", t;
|
|
2653
2653
|
}
|
|
2654
|
-
function iu(t, e) {
|
|
2655
|
-
const n = V.create(t);
|
|
2656
|
-
return ou(n, e);
|
|
2657
|
-
}
|
|
2658
2654
|
function ou(t, e) {
|
|
2659
|
-
const n =
|
|
2660
|
-
return
|
|
2655
|
+
const n = V.create(t);
|
|
2656
|
+
return au(n, e);
|
|
2661
2657
|
}
|
|
2662
2658
|
function au(t, e) {
|
|
2659
|
+
const n = e ?? iu();
|
|
2660
|
+
return os(n), cu(t, n), n;
|
|
2661
|
+
}
|
|
2662
|
+
function cu(t, e) {
|
|
2663
2663
|
let n;
|
|
2664
2664
|
for (; (n = t.next()) !== null; )
|
|
2665
2665
|
switch (n.fieldId) {
|
|
2666
|
-
case
|
|
2666
|
+
case ru: {
|
|
2667
2667
|
if (n.isNull) throw new Error();
|
|
2668
2668
|
e.ErrorMessage = n.asString();
|
|
2669
2669
|
break;
|
|
2670
2670
|
}
|
|
2671
|
-
case
|
|
2671
|
+
case su: {
|
|
2672
2672
|
if (n.isNull) throw new Error();
|
|
2673
2673
|
e.Success = n.asBool();
|
|
2674
2674
|
break;
|
|
2675
2675
|
}
|
|
2676
2676
|
}
|
|
2677
2677
|
}
|
|
2678
|
-
function
|
|
2679
|
-
const n = ce(t,
|
|
2680
|
-
return
|
|
2678
|
+
function lu(t, e) {
|
|
2679
|
+
const n = ce(t, is);
|
|
2680
|
+
return ou(n, e);
|
|
2681
2681
|
}
|
|
2682
|
-
const
|
|
2683
|
-
function
|
|
2682
|
+
const as = 65571, uu = 161083277, du = 317031266, hu = 1093174542, fu = 1970024675, pu = 2481928696, mu = 2762891795, Eu = 3282782683;
|
|
2683
|
+
function Iu(t) {
|
|
2684
2684
|
const e = {};
|
|
2685
|
-
return
|
|
2685
|
+
return cs(e), e;
|
|
2686
2686
|
}
|
|
2687
|
-
function
|
|
2687
|
+
function cs(t) {
|
|
2688
2688
|
return t.Kind = "", t.TrackIndex = 0, t.SenderId = 0, t.SenderTrackId = 0, t.StreamId = "", t.SourceType = "", t.Active = !0, t;
|
|
2689
2689
|
}
|
|
2690
|
-
function Iu(t, e) {
|
|
2691
|
-
const n = V.create(t);
|
|
2692
|
-
return _u(n, e);
|
|
2693
|
-
}
|
|
2694
2690
|
function _u(t, e) {
|
|
2695
|
-
const n =
|
|
2696
|
-
return
|
|
2691
|
+
const n = V.create(t);
|
|
2692
|
+
return Tu(n, e);
|
|
2697
2693
|
}
|
|
2698
2694
|
function Tu(t, e) {
|
|
2695
|
+
const n = e ?? Iu();
|
|
2696
|
+
return cs(n), wu(t, n), n;
|
|
2697
|
+
}
|
|
2698
|
+
function wu(t, e) {
|
|
2699
2699
|
let n;
|
|
2700
2700
|
for (; (n = t.next()) !== null; )
|
|
2701
2701
|
switch (n.fieldId) {
|
|
2702
|
-
case
|
|
2702
|
+
case uu: {
|
|
2703
2703
|
if (n.isNull) throw new Error();
|
|
2704
2704
|
e.StreamId = n.asString();
|
|
2705
2705
|
break;
|
|
2706
2706
|
}
|
|
2707
|
-
case
|
|
2707
|
+
case du: {
|
|
2708
2708
|
if (n.isNull) throw new Error();
|
|
2709
2709
|
e.Kind = n.asString();
|
|
2710
2710
|
break;
|
|
2711
2711
|
}
|
|
2712
|
-
case
|
|
2712
|
+
case hu: {
|
|
2713
2713
|
if (n.isNull) throw new Error();
|
|
2714
2714
|
e.SenderTrackId = n.asInt32();
|
|
2715
2715
|
break;
|
|
2716
2716
|
}
|
|
2717
|
-
case
|
|
2717
|
+
case fu: {
|
|
2718
2718
|
if (n.isNull) throw new Error();
|
|
2719
2719
|
e.SenderId = n.asInt32();
|
|
2720
2720
|
break;
|
|
2721
2721
|
}
|
|
2722
|
-
case
|
|
2722
|
+
case pu: {
|
|
2723
2723
|
if (n.isNull) throw new Error();
|
|
2724
2724
|
e.Active = n.asBool();
|
|
2725
2725
|
break;
|
|
2726
2726
|
}
|
|
2727
|
-
case
|
|
2727
|
+
case mu: {
|
|
2728
2728
|
if (n.isNull) throw new Error();
|
|
2729
2729
|
e.TrackIndex = n.asInt32();
|
|
2730
2730
|
break;
|
|
2731
2731
|
}
|
|
2732
|
-
case
|
|
2732
|
+
case Eu: {
|
|
2733
2733
|
if (n.isNull) throw new Error();
|
|
2734
2734
|
e.SourceType = n.asString();
|
|
2735
2735
|
break;
|
|
2736
2736
|
}
|
|
2737
2737
|
}
|
|
2738
2738
|
}
|
|
2739
|
-
function
|
|
2740
|
-
const n = ce(t,
|
|
2741
|
-
return
|
|
2739
|
+
function Su(t, e) {
|
|
2740
|
+
const n = ce(t, as);
|
|
2741
|
+
return _u(n, e);
|
|
2742
2742
|
}
|
|
2743
2743
|
class St extends Error {
|
|
2744
2744
|
constructor(e, n) {
|
|
2745
2745
|
super(e), this.cause = n, this.name = "ConnectionError";
|
|
2746
2746
|
}
|
|
2747
2747
|
}
|
|
2748
|
-
class
|
|
2748
|
+
class N extends St {
|
|
2749
2749
|
constructor(e, n) {
|
|
2750
2750
|
super(e, n), this.name = "AuthenticationError";
|
|
2751
2751
|
}
|
|
@@ -2760,32 +2760,32 @@ class gt extends Z {
|
|
|
2760
2760
|
super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
|
|
2761
2761
|
}
|
|
2762
2762
|
}
|
|
2763
|
-
class
|
|
2763
|
+
class gu extends St {
|
|
2764
2764
|
constructor(e) {
|
|
2765
2765
|
super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
|
|
2766
2766
|
}
|
|
2767
2767
|
}
|
|
2768
|
-
class
|
|
2768
|
+
class Cu extends N {
|
|
2769
2769
|
constructor(e) {
|
|
2770
2770
|
super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
|
|
2771
2771
|
}
|
|
2772
2772
|
}
|
|
2773
|
-
class Tf extends
|
|
2773
|
+
class Tf extends N {
|
|
2774
2774
|
constructor(e) {
|
|
2775
2775
|
super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
|
|
2776
2776
|
}
|
|
2777
2777
|
}
|
|
2778
|
-
class wf extends
|
|
2778
|
+
class wf extends N {
|
|
2779
2779
|
constructor(e) {
|
|
2780
2780
|
super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
|
|
2781
2781
|
}
|
|
2782
2782
|
}
|
|
2783
|
-
class Sf extends
|
|
2783
|
+
class Sf extends N {
|
|
2784
2784
|
constructor() {
|
|
2785
2785
|
super("No channels available in this space"), this.name = "NoChannelsError";
|
|
2786
2786
|
}
|
|
2787
2787
|
}
|
|
2788
|
-
function
|
|
2788
|
+
function ls(t, e) {
|
|
2789
2789
|
return new Promise((n, r) => {
|
|
2790
2790
|
const s = () => {
|
|
2791
2791
|
clearTimeout(i), r(new Error("Aborted"));
|
|
@@ -2802,13 +2802,13 @@ function cs(t, e) {
|
|
|
2802
2802
|
var He = /* @__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))(He || {});
|
|
2803
2803
|
let Ct = 1, Be = null;
|
|
2804
2804
|
const tt = /* @__PURE__ */ new Map();
|
|
2805
|
-
function
|
|
2805
|
+
function us(t) {
|
|
2806
2806
|
Ct = t;
|
|
2807
2807
|
}
|
|
2808
2808
|
function gf() {
|
|
2809
2809
|
return Ct;
|
|
2810
2810
|
}
|
|
2811
|
-
function
|
|
2811
|
+
function yu(t) {
|
|
2812
2812
|
Be = t;
|
|
2813
2813
|
}
|
|
2814
2814
|
function Cf() {
|
|
@@ -2822,18 +2822,18 @@ function yf(t, e) {
|
|
|
2822
2822
|
tt.delete(t);
|
|
2823
2823
|
};
|
|
2824
2824
|
}
|
|
2825
|
-
const
|
|
2825
|
+
const Au = {
|
|
2826
2826
|
0: "DEBUG",
|
|
2827
2827
|
1: "INFO",
|
|
2828
2828
|
2: "WARN",
|
|
2829
2829
|
3: "ERROR",
|
|
2830
2830
|
4: "NONE"
|
|
2831
2831
|
};
|
|
2832
|
-
function
|
|
2832
|
+
function Ru(t, e) {
|
|
2833
2833
|
return `[${t}] ${e}`;
|
|
2834
2834
|
}
|
|
2835
2835
|
function be(t, e, n, r) {
|
|
2836
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
2836
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = Au[t], o = {
|
|
2837
2837
|
timestamp: s,
|
|
2838
2838
|
level: t,
|
|
2839
2839
|
levelName: i,
|
|
@@ -2851,7 +2851,7 @@ function be(t, e, n, r) {
|
|
|
2851
2851
|
}
|
|
2852
2852
|
}
|
|
2853
2853
|
if (Ct <= t) {
|
|
2854
|
-
const a =
|
|
2854
|
+
const a = Ru(e, n);
|
|
2855
2855
|
switch (t) {
|
|
2856
2856
|
case 0:
|
|
2857
2857
|
console.debug(a, ...r);
|
|
@@ -2884,8 +2884,8 @@ function L(t) {
|
|
|
2884
2884
|
}
|
|
2885
2885
|
};
|
|
2886
2886
|
}
|
|
2887
|
-
const Ne = L("WebSocketTransport"),
|
|
2888
|
-
class
|
|
2887
|
+
const Ne = L("WebSocketTransport"), bu = 1e4;
|
|
2888
|
+
class Nu {
|
|
2889
2889
|
ws = null;
|
|
2890
2890
|
keepaliveTimeout = null;
|
|
2891
2891
|
isClosed = !1;
|
|
@@ -2913,7 +2913,7 @@ class bu {
|
|
|
2913
2913
|
clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
|
|
2914
2914
|
}, c = setTimeout(() => {
|
|
2915
2915
|
o || (o = !0, a(), this.ws?.close(), s(new Z("WebSocket connection timeout")));
|
|
2916
|
-
},
|
|
2916
|
+
}, bu);
|
|
2917
2917
|
this.ws.onopen = () => {
|
|
2918
2918
|
i = !0, clearTimeout(c), this.ws.send(n), this.resetKeepaliveTimeout(), o || (o = !0, r());
|
|
2919
2919
|
}, this.ws.onerror = () => {
|
|
@@ -2942,7 +2942,7 @@ class bu {
|
|
|
2942
2942
|
* Get or create a cached keepalive response message.
|
|
2943
2943
|
*/
|
|
2944
2944
|
getKeepaliveResponse() {
|
|
2945
|
-
return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = Kr(
|
|
2945
|
+
return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = Yr(Kr(), this.sessionId)), this.keepaliveResponseMessage;
|
|
2946
2946
|
}
|
|
2947
2947
|
handleProtocolMessage(e) {
|
|
2948
2948
|
try {
|
|
@@ -2964,11 +2964,11 @@ class bu {
|
|
|
2964
2964
|
this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
|
|
2965
2965
|
}
|
|
2966
2966
|
}
|
|
2967
|
-
const Y = L("WebTransportTransport"), Bt = 4,
|
|
2968
|
-
function
|
|
2967
|
+
const Y = L("WebTransportTransport"), Bt = 4, ku = 65536;
|
|
2968
|
+
function ds() {
|
|
2969
2969
|
return typeof WebTransport < "u";
|
|
2970
2970
|
}
|
|
2971
|
-
class
|
|
2971
|
+
class Du {
|
|
2972
2972
|
transport = null;
|
|
2973
2973
|
stream = null;
|
|
2974
2974
|
reader = null;
|
|
@@ -2977,7 +2977,7 @@ class ku {
|
|
|
2977
2977
|
readLoopActive = !1;
|
|
2978
2978
|
isClosed = !1;
|
|
2979
2979
|
// Grow-only receive buffer with offset/length tracking to minimize allocations
|
|
2980
|
-
receiveBuffer = new Uint8Array(
|
|
2980
|
+
receiveBuffer = new Uint8Array(ku);
|
|
2981
2981
|
receiveBufferOffset = 0;
|
|
2982
2982
|
receiveBufferLength = 0;
|
|
2983
2983
|
// Cached DataView to avoid allocation per message
|
|
@@ -2995,7 +2995,7 @@ class ku {
|
|
|
2995
2995
|
return this.transport !== null && this.writer !== null;
|
|
2996
2996
|
}
|
|
2997
2997
|
async connect(e, n) {
|
|
2998
|
-
if (!
|
|
2998
|
+
if (!ds())
|
|
2999
2999
|
throw new Z("WebTransport is not supported in this browser");
|
|
3000
3000
|
this.isClosed = !1;
|
|
3001
3001
|
try {
|
|
@@ -3064,7 +3064,7 @@ class ku {
|
|
|
3064
3064
|
* Get or create a cached keepalive response message.
|
|
3065
3065
|
*/
|
|
3066
3066
|
getKeepaliveResponse() {
|
|
3067
|
-
return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = Kr(
|
|
3067
|
+
return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = Yr(Kr(), this.sessionId)), this.keepaliveResponseMessage;
|
|
3068
3068
|
}
|
|
3069
3069
|
/**
|
|
3070
3070
|
* Process complete messages from the receive buffer.
|
|
@@ -3134,7 +3134,7 @@ class ku {
|
|
|
3134
3134
|
}
|
|
3135
3135
|
}
|
|
3136
3136
|
const me = L("Channel");
|
|
3137
|
-
class
|
|
3137
|
+
class vu {
|
|
3138
3138
|
state = "disconnected";
|
|
3139
3139
|
transport = null;
|
|
3140
3140
|
config;
|
|
@@ -3218,13 +3218,13 @@ class Du {
|
|
|
3218
3218
|
switch (e.Type) {
|
|
3219
3219
|
case b.WebSocket:
|
|
3220
3220
|
case b.WebSocketProxy:
|
|
3221
|
-
this.transport = new
|
|
3221
|
+
this.transport = new Nu(n);
|
|
3222
3222
|
break;
|
|
3223
3223
|
case b.WebTransport:
|
|
3224
3224
|
case b.WebTransportProxy:
|
|
3225
|
-
if (!
|
|
3225
|
+
if (!ds())
|
|
3226
3226
|
throw new Error("WebTransport is not supported in this browser");
|
|
3227
|
-
this.transport = new
|
|
3227
|
+
this.transport = new Du(n);
|
|
3228
3228
|
break;
|
|
3229
3229
|
default:
|
|
3230
3230
|
throw new Error(`Unsupported entrypoint type: ${b[e.Type]}`);
|
|
@@ -3266,7 +3266,7 @@ class Du {
|
|
|
3266
3266
|
}
|
|
3267
3267
|
}
|
|
3268
3268
|
const M = L("ChannelManager");
|
|
3269
|
-
class
|
|
3269
|
+
class Uu {
|
|
3270
3270
|
channels = /* @__PURE__ */ new Map();
|
|
3271
3271
|
// keyed by opcode group
|
|
3272
3272
|
activeType = null;
|
|
@@ -3403,7 +3403,7 @@ class vu {
|
|
|
3403
3403
|
* Connect a single channel.
|
|
3404
3404
|
*/
|
|
3405
3405
|
async connectChannel(e) {
|
|
3406
|
-
const n = new
|
|
3406
|
+
const n = new vu({
|
|
3407
3407
|
entrypoint: e,
|
|
3408
3408
|
sessionId: this.config.sessionId,
|
|
3409
3409
|
keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
|
|
@@ -3458,10 +3458,10 @@ class vu {
|
|
|
3458
3458
|
async attemptReconnect() {
|
|
3459
3459
|
if (this.shouldReconnect) {
|
|
3460
3460
|
if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
|
|
3461
|
-
M.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new
|
|
3461
|
+
M.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new gu(this.config.maxReconnectAttempts));
|
|
3462
3462
|
return;
|
|
3463
3463
|
}
|
|
3464
|
-
if (this.setState("reconnecting"), this.reconnectAttempts++, this.reconnectAttempts > 1 ? (M.info(`Reconnecting in ${this.config.reconnectBackoffMs}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await
|
|
3464
|
+
if (this.setState("reconnecting"), this.reconnectAttempts++, this.reconnectAttempts > 1 ? (M.info(`Reconnecting in ${this.config.reconnectBackoffMs}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await ls(this.config.reconnectBackoffMs, this.abortController?.signal)) : M.info(`Reconnecting immediately (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), !!this.shouldReconnect)
|
|
3465
3465
|
try {
|
|
3466
3466
|
await this.connectInternal(!0);
|
|
3467
3467
|
} catch (e) {
|
|
@@ -3500,8 +3500,8 @@ class vu {
|
|
|
3500
3500
|
this.state !== e && (this.state = e, this.config.onStateChange?.(e));
|
|
3501
3501
|
}
|
|
3502
3502
|
}
|
|
3503
|
-
const Af = "opus", Rf = 48e3, bf = 2, Nf = 64e3,
|
|
3504
|
-
class
|
|
3503
|
+
const Af = "opus", Rf = 48e3, bf = 2, Nf = 64e3, Ou = 150, kf = "VP8", Mu = 5e6, Df = 30, Pu = 0.05, Lu = "max-bundle", Fu = "require", Bu = [], xu = 16, Wu = 16, Gu = "ikon-data", Vu = !1, Hu = 0, G = L("WebRTCConnection");
|
|
3504
|
+
class $u {
|
|
3505
3505
|
pc = null;
|
|
3506
3506
|
dataChannel = null;
|
|
3507
3507
|
_state = "new";
|
|
@@ -3523,20 +3523,20 @@ class Hu {
|
|
|
3523
3523
|
return this.dataChannel?.readyState === "open";
|
|
3524
3524
|
}
|
|
3525
3525
|
async initialize() {
|
|
3526
|
-
const e =
|
|
3526
|
+
const e = Bu;
|
|
3527
3527
|
if (this.pc = new RTCPeerConnection({
|
|
3528
3528
|
iceServers: e,
|
|
3529
|
-
bundlePolicy:
|
|
3530
|
-
rtcpMuxPolicy:
|
|
3529
|
+
bundlePolicy: Lu,
|
|
3530
|
+
rtcpMuxPolicy: Fu
|
|
3531
3531
|
}), this.setupEventHandlers(), this.config.useAudioTrack)
|
|
3532
|
-
for (let n = 0; n <
|
|
3532
|
+
for (let n = 0; n < xu; n++)
|
|
3533
3533
|
this.pc.addTransceiver("audio", { direction: "sendrecv" });
|
|
3534
3534
|
if (this.config.useVideoTrack)
|
|
3535
|
-
for (let n = 0; n <
|
|
3535
|
+
for (let n = 0; n < Wu; n++)
|
|
3536
3536
|
this.pc.addTransceiver("video", { direction: "sendrecv" });
|
|
3537
|
-
this.config.useDataChannel && (this.dataChannel = this.pc.createDataChannel(
|
|
3538
|
-
ordered:
|
|
3539
|
-
maxRetransmits:
|
|
3537
|
+
this.config.useDataChannel && (this.dataChannel = this.pc.createDataChannel(Gu, {
|
|
3538
|
+
ordered: Vu,
|
|
3539
|
+
maxRetransmits: Hu
|
|
3540
3540
|
}), this.setupDataChannelHandlers(this.dataChannel));
|
|
3541
3541
|
}
|
|
3542
3542
|
async createOffer() {
|
|
@@ -3623,7 +3623,7 @@ class Hu {
|
|
|
3623
3623
|
}, this.pc.ontrack = (e) => {
|
|
3624
3624
|
const n = e.track;
|
|
3625
3625
|
if (n.kind === "audio") {
|
|
3626
|
-
const r =
|
|
3626
|
+
const r = Ou;
|
|
3627
3627
|
try {
|
|
3628
3628
|
e.receiver.jitterBufferTarget = r;
|
|
3629
3629
|
} catch (o) {
|
|
@@ -3633,7 +3633,7 @@ class Hu {
|
|
|
3633
3633
|
this.config.onAudioTrack?.(i, n, s);
|
|
3634
3634
|
} else if (n.kind === "video") {
|
|
3635
3635
|
try {
|
|
3636
|
-
e.receiver.playoutDelayHint =
|
|
3636
|
+
e.receiver.playoutDelayHint = Pu;
|
|
3637
3637
|
} catch (i) {
|
|
3638
3638
|
G.warn("Failed to set playoutDelayHint:", i);
|
|
3639
3639
|
}
|
|
@@ -3660,7 +3660,7 @@ class Hu {
|
|
|
3660
3660
|
}
|
|
3661
3661
|
}
|
|
3662
3662
|
const A = L("WebRTCSignaling");
|
|
3663
|
-
class
|
|
3663
|
+
class Ku {
|
|
3664
3664
|
config;
|
|
3665
3665
|
connection = null;
|
|
3666
3666
|
sendMessage = null;
|
|
@@ -3704,7 +3704,7 @@ class $u {
|
|
|
3704
3704
|
this.videoTrackCount++, this.config.onVideoTrack?.(s, i, o);
|
|
3705
3705
|
}
|
|
3706
3706
|
};
|
|
3707
|
-
this.connection = new
|
|
3707
|
+
this.connection = new $u(n), await this.connection.initialize();
|
|
3708
3708
|
const r = await this.connection.createOffer();
|
|
3709
3709
|
this.sendOffer(r);
|
|
3710
3710
|
} catch (n) {
|
|
@@ -3714,13 +3714,13 @@ class $u {
|
|
|
3714
3714
|
handleProtocolMessage(e) {
|
|
3715
3715
|
const n = (e instanceof Uint8Array, e), r = n;
|
|
3716
3716
|
switch (Se(r)) {
|
|
3717
|
-
case
|
|
3717
|
+
case Xr:
|
|
3718
3718
|
return this.handleAnswer(r), !0;
|
|
3719
3719
|
case wt:
|
|
3720
3720
|
return this.handleRemoteIceCandidate(r), !0;
|
|
3721
|
-
case
|
|
3721
|
+
case is:
|
|
3722
3722
|
return this.handleReady(r), !0;
|
|
3723
|
-
case
|
|
3723
|
+
case as:
|
|
3724
3724
|
return this.handleTrackMap(r), !0;
|
|
3725
3725
|
default:
|
|
3726
3726
|
return !1;
|
|
@@ -3819,7 +3819,7 @@ class $u {
|
|
|
3819
3819
|
}
|
|
3820
3820
|
async applyEncodingParams(e, n) {
|
|
3821
3821
|
try {
|
|
3822
|
-
const r = n ??
|
|
3822
|
+
const r = n ?? Mu, s = e.getParameters();
|
|
3823
3823
|
s.encodings?.length || (s.encodings = [{}]), s.encodings[0].maxBitrate = r, s.degradationPreference = "balanced", await e.setParameters(s);
|
|
3824
3824
|
} catch (r) {
|
|
3825
3825
|
A.warn("Failed to set encoding params:", r);
|
|
@@ -3830,19 +3830,19 @@ class $u {
|
|
|
3830
3830
|
A.error("Cannot send offer: no send function");
|
|
3831
3831
|
return;
|
|
3832
3832
|
}
|
|
3833
|
-
const n =
|
|
3833
|
+
const n = Zl({
|
|
3834
3834
|
Sdp: e,
|
|
3835
3835
|
OpcodeGroupsFromServer: this.config.opcodeGroupsFromServer,
|
|
3836
3836
|
OpcodeGroupsToServer: this.config.opcodeGroupsToServer,
|
|
3837
3837
|
UseAudioTrack: this.config.useAudioTrack,
|
|
3838
3838
|
UseVideoTrack: this.config.useVideoTrack,
|
|
3839
3839
|
UseDataChannel: this.config.useDataChannel
|
|
3840
|
-
}), r =
|
|
3840
|
+
}), r = nu(n, this.config.sessionId);
|
|
3841
3841
|
this.sendMessage(r), A.debug("Sent WebRTC offer");
|
|
3842
3842
|
}
|
|
3843
3843
|
async handleAnswer(e) {
|
|
3844
3844
|
try {
|
|
3845
|
-
const n =
|
|
3845
|
+
const n = Ul(e);
|
|
3846
3846
|
await this.connection?.setRemoteDescription(n.Sdp, "answer"), A.debug("WebRTC answer received and applied");
|
|
3847
3847
|
} catch (n) {
|
|
3848
3848
|
A.error("Failed to handle WebRTC answer:", n);
|
|
@@ -3851,16 +3851,16 @@ class $u {
|
|
|
3851
3851
|
handleLocalIceCandidate(e) {
|
|
3852
3852
|
if (!e || !this.sendMessage)
|
|
3853
3853
|
return;
|
|
3854
|
-
const n =
|
|
3854
|
+
const n = ns({
|
|
3855
3855
|
Candidate: e.candidate,
|
|
3856
3856
|
SdpMid: e.sdpMid ?? "",
|
|
3857
3857
|
SdpMLineIndex: e.sdpMLineIndex ?? 0
|
|
3858
|
-
}), r =
|
|
3858
|
+
}), r = Hl(n, this.config.sessionId);
|
|
3859
3859
|
this.sendMessage(r);
|
|
3860
3860
|
}
|
|
3861
3861
|
async handleRemoteIceCandidate(e) {
|
|
3862
3862
|
try {
|
|
3863
|
-
const n =
|
|
3863
|
+
const n = $l(e);
|
|
3864
3864
|
if (n.Candidate) {
|
|
3865
3865
|
const r = n.Candidate.startsWith("candidate:") ? n.Candidate : `candidate:${n.Candidate}`, s = n.SdpMid || String(n.SdpMLineIndex);
|
|
3866
3866
|
await this.connection?.addIceCandidate({
|
|
@@ -3875,7 +3875,7 @@ class $u {
|
|
|
3875
3875
|
}
|
|
3876
3876
|
handleReady(e) {
|
|
3877
3877
|
try {
|
|
3878
|
-
const n =
|
|
3878
|
+
const n = lu(e);
|
|
3879
3879
|
n.Success ? (A.debug("WebRTC connection ready"), this.isConnecting = !1) : (A.error(`WebRTC connection failed (server): ${n.ErrorMessage}`), this.disconnect());
|
|
3880
3880
|
} catch (n) {
|
|
3881
3881
|
A.error("Failed to handle WebRTC ready:", n);
|
|
@@ -3883,18 +3883,18 @@ class $u {
|
|
|
3883
3883
|
}
|
|
3884
3884
|
handleTrackMap(e) {
|
|
3885
3885
|
try {
|
|
3886
|
-
const n =
|
|
3886
|
+
const n = Su(e);
|
|
3887
3887
|
this.config.onTrackMap?.(n);
|
|
3888
3888
|
} catch (n) {
|
|
3889
3889
|
A.error("Failed to handle WebRTC track map:", n);
|
|
3890
3890
|
}
|
|
3891
3891
|
}
|
|
3892
3892
|
}
|
|
3893
|
-
const
|
|
3893
|
+
const Yu = 5e3, ju = 3e4, xt = 15e3, Wt = 2e3, Gt = 2, hs = 6e4, ge = "ikon.theme", Ce = "ikon.theme-user", zu = "ikon.theme-change";
|
|
3894
3894
|
function nt(t) {
|
|
3895
3895
|
typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
|
|
3896
3896
|
}
|
|
3897
|
-
function
|
|
3897
|
+
function fs() {
|
|
3898
3898
|
return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
3899
3899
|
}
|
|
3900
3900
|
function $e() {
|
|
@@ -3903,12 +3903,12 @@ function $e() {
|
|
|
3903
3903
|
const t = window.localStorage.getItem(Ce);
|
|
3904
3904
|
if (t) return t;
|
|
3905
3905
|
const e = window.localStorage.getItem(ge);
|
|
3906
|
-
return e ||
|
|
3906
|
+
return e || fs();
|
|
3907
3907
|
}
|
|
3908
3908
|
function yt() {
|
|
3909
3909
|
return typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight };
|
|
3910
3910
|
}
|
|
3911
|
-
function
|
|
3911
|
+
function Xu() {
|
|
3912
3912
|
if (typeof window > "u" || !window.localStorage)
|
|
3913
3913
|
return "light";
|
|
3914
3914
|
const t = window.localStorage.getItem(Ce), e = window.localStorage.getItem(ge);
|
|
@@ -3916,21 +3916,21 @@ function zu() {
|
|
|
3916
3916
|
const r = t ?? e;
|
|
3917
3917
|
return nt(r), r;
|
|
3918
3918
|
}
|
|
3919
|
-
const n =
|
|
3919
|
+
const n = fs();
|
|
3920
3920
|
return window.localStorage.setItem(ge, n), nt(n), n;
|
|
3921
3921
|
}
|
|
3922
|
-
const
|
|
3922
|
+
const Ju = {
|
|
3923
3923
|
name: "ikon.client.getTheme",
|
|
3924
3924
|
description: "Get the currently selected client theme",
|
|
3925
3925
|
returnType: { kind: "string", nullable: !0 }
|
|
3926
3926
|
};
|
|
3927
|
-
function
|
|
3927
|
+
function Qu() {
|
|
3928
3928
|
if (typeof window > "u" || !window.localStorage)
|
|
3929
3929
|
return null;
|
|
3930
3930
|
const t = window.localStorage.getItem(Ce), e = window.localStorage.getItem(ge);
|
|
3931
3931
|
return t ?? e ?? null;
|
|
3932
3932
|
}
|
|
3933
|
-
const
|
|
3933
|
+
const Zu = {
|
|
3934
3934
|
name: "ikon.client.setTheme",
|
|
3935
3935
|
description: "Update the client UI theme",
|
|
3936
3936
|
returnType: { kind: "boolean" },
|
|
@@ -3939,7 +3939,7 @@ const Qu = {
|
|
|
3939
3939
|
{ name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
|
|
3940
3940
|
]
|
|
3941
3941
|
};
|
|
3942
|
-
function
|
|
3942
|
+
function qu(t, e) {
|
|
3943
3943
|
if (typeof window > "u" || !window.localStorage || typeof t != "string")
|
|
3944
3944
|
return !1;
|
|
3945
3945
|
const n = t.trim().toLowerCase();
|
|
@@ -3948,25 +3948,25 @@ function Zu(t, e) {
|
|
|
3948
3948
|
const r = e === void 0 ? !0 : !!e, s = window.localStorage;
|
|
3949
3949
|
r ? s.setItem(Ce, n) : s.removeItem(Ce), s.setItem(ge, n);
|
|
3950
3950
|
try {
|
|
3951
|
-
window.dispatchEvent(new CustomEvent(
|
|
3951
|
+
window.dispatchEvent(new CustomEvent(zu, { detail: { mode: n } }));
|
|
3952
3952
|
} catch {
|
|
3953
3953
|
}
|
|
3954
3954
|
return nt(n), !0;
|
|
3955
3955
|
}
|
|
3956
|
-
const
|
|
3956
|
+
const ed = {
|
|
3957
3957
|
name: "ikon.client.getLanguage",
|
|
3958
3958
|
description: "Get the browser language preference",
|
|
3959
3959
|
returnType: { kind: "string" }
|
|
3960
3960
|
};
|
|
3961
|
-
function
|
|
3961
|
+
function td() {
|
|
3962
3962
|
return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
|
|
3963
3963
|
}
|
|
3964
|
-
const
|
|
3964
|
+
const nd = {
|
|
3965
3965
|
name: "ikon.client.getTimezone",
|
|
3966
3966
|
description: "Get the browser timezone (IANA format)",
|
|
3967
3967
|
returnType: { kind: "string" }
|
|
3968
3968
|
};
|
|
3969
|
-
function
|
|
3969
|
+
function rd() {
|
|
3970
3970
|
try {
|
|
3971
3971
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3972
3972
|
} catch {
|
|
@@ -3991,15 +3991,15 @@ function bt() {
|
|
|
3991
3991
|
const t = navigator.maxTouchPoints > 0, e = window.innerWidth <= 1024;
|
|
3992
3992
|
return t && e ? ne.MobileWeb : ne.DesktopWeb;
|
|
3993
3993
|
}
|
|
3994
|
-
const
|
|
3994
|
+
const sd = {
|
|
3995
3995
|
name: "ikon.client.getUrl",
|
|
3996
3996
|
description: "Get the current browser URL path and query string",
|
|
3997
3997
|
returnType: { kind: "string", nullable: !0 }
|
|
3998
3998
|
};
|
|
3999
|
-
function
|
|
3999
|
+
function id() {
|
|
4000
4000
|
return typeof window > "u" ? null : window.location.pathname + window.location.search;
|
|
4001
4001
|
}
|
|
4002
|
-
const
|
|
4002
|
+
const od = {
|
|
4003
4003
|
name: "ikon.client.setUrl",
|
|
4004
4004
|
description: "Update the browser URL without triggering a page reload",
|
|
4005
4005
|
returnType: { kind: "boolean" },
|
|
@@ -4009,7 +4009,7 @@ const id = {
|
|
|
4009
4009
|
{ name: "preserveQueryParams", type: { kind: "boolean", nullable: !0 }, description: "If true, preserves existing query parameters when the URL does not contain a query string" }
|
|
4010
4010
|
]
|
|
4011
4011
|
};
|
|
4012
|
-
function
|
|
4012
|
+
function ad(t, e, n) {
|
|
4013
4013
|
if (typeof window > "u" || !window.history || typeof t != "string")
|
|
4014
4014
|
return !1;
|
|
4015
4015
|
const r = t.trim();
|
|
@@ -4022,13 +4022,13 @@ function od(t, e, n) {
|
|
|
4022
4022
|
return !1;
|
|
4023
4023
|
}
|
|
4024
4024
|
}
|
|
4025
|
-
const
|
|
4025
|
+
const cd = {
|
|
4026
4026
|
name: "ikon.client.vibrate",
|
|
4027
4027
|
description: "Trigger haptic feedback on supported devices",
|
|
4028
4028
|
returnType: { kind: "boolean" },
|
|
4029
4029
|
parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
|
|
4030
4030
|
};
|
|
4031
|
-
function
|
|
4031
|
+
function ld(t) {
|
|
4032
4032
|
if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
|
|
4033
4033
|
return !1;
|
|
4034
4034
|
try {
|
|
@@ -4039,7 +4039,7 @@ function cd(t) {
|
|
|
4039
4039
|
}
|
|
4040
4040
|
}
|
|
4041
4041
|
let Q = null, rt = !1, ke = !1;
|
|
4042
|
-
async function
|
|
4042
|
+
async function ud() {
|
|
4043
4043
|
if (!(typeof navigator > "u" || !("wakeLock" in navigator)))
|
|
4044
4044
|
try {
|
|
4045
4045
|
Q = await navigator.wakeLock.request("screen");
|
|
@@ -4047,15 +4047,15 @@ async function ld() {
|
|
|
4047
4047
|
}
|
|
4048
4048
|
}
|
|
4049
4049
|
function Vt() {
|
|
4050
|
-
document.visibilityState === "visible" && rt && !Q &&
|
|
4050
|
+
document.visibilityState === "visible" && rt && !Q && ud();
|
|
4051
4051
|
}
|
|
4052
|
-
const
|
|
4052
|
+
const dd = {
|
|
4053
4053
|
name: "ikon.client.keepScreenAwake",
|
|
4054
4054
|
description: "Prevent or allow the screen to sleep",
|
|
4055
4055
|
returnType: { kind: "boolean" },
|
|
4056
4056
|
parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
|
|
4057
4057
|
};
|
|
4058
|
-
async function
|
|
4058
|
+
async function hd(t) {
|
|
4059
4059
|
if (typeof navigator > "u" || !("wakeLock" in navigator))
|
|
4060
4060
|
return !1;
|
|
4061
4061
|
try {
|
|
@@ -4064,15 +4064,15 @@ async function dd(t) {
|
|
|
4064
4064
|
return !1;
|
|
4065
4065
|
}
|
|
4066
4066
|
}
|
|
4067
|
-
const
|
|
4067
|
+
const fd = {
|
|
4068
4068
|
name: "ikon.client.getVisibility",
|
|
4069
4069
|
description: "Get the current page visibility state",
|
|
4070
4070
|
returnType: { kind: "string", nullable: !0 }
|
|
4071
4071
|
};
|
|
4072
|
-
function
|
|
4072
|
+
function pd() {
|
|
4073
4073
|
return typeof document > "u" ? null : document.visibilityState || null;
|
|
4074
4074
|
}
|
|
4075
|
-
const
|
|
4075
|
+
const md = {
|
|
4076
4076
|
name: "ikon.client.scrollTo",
|
|
4077
4077
|
description: "Scroll the page to a specific position",
|
|
4078
4078
|
returnType: { kind: "boolean" },
|
|
@@ -4082,7 +4082,7 @@ const pd = {
|
|
|
4082
4082
|
{ name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
|
|
4083
4083
|
]
|
|
4084
4084
|
};
|
|
4085
|
-
function
|
|
4085
|
+
function Ed(t, e, n) {
|
|
4086
4086
|
if (typeof window > "u" || typeof t != "number" || typeof e != "number")
|
|
4087
4087
|
return !1;
|
|
4088
4088
|
try {
|
|
@@ -4095,12 +4095,12 @@ function md(t, e, n) {
|
|
|
4095
4095
|
return !1;
|
|
4096
4096
|
}
|
|
4097
4097
|
}
|
|
4098
|
-
const
|
|
4098
|
+
const Id = {
|
|
4099
4099
|
name: "ikon.client.getBatteryLevel",
|
|
4100
4100
|
description: "Get the current battery level (0-100)",
|
|
4101
4101
|
returnType: { kind: "number", nullable: !0 }
|
|
4102
4102
|
};
|
|
4103
|
-
async function
|
|
4103
|
+
async function _d() {
|
|
4104
4104
|
if (typeof navigator > "u" || !("getBattery" in navigator))
|
|
4105
4105
|
return null;
|
|
4106
4106
|
try {
|
|
@@ -4110,23 +4110,23 @@ async function Id() {
|
|
|
4110
4110
|
return null;
|
|
4111
4111
|
}
|
|
4112
4112
|
}
|
|
4113
|
-
const
|
|
4113
|
+
const Td = {
|
|
4114
4114
|
name: "ikon.client.getNetworkType",
|
|
4115
4115
|
description: "Get the current network connection type",
|
|
4116
4116
|
returnType: { kind: "string", nullable: !0 }
|
|
4117
4117
|
};
|
|
4118
|
-
function
|
|
4118
|
+
function wd() {
|
|
4119
4119
|
if (typeof navigator > "u")
|
|
4120
4120
|
return null;
|
|
4121
4121
|
const t = navigator.connection;
|
|
4122
4122
|
return t && (t.effectiveType || t.type) || null;
|
|
4123
4123
|
}
|
|
4124
|
-
const
|
|
4124
|
+
const Sd = {
|
|
4125
4125
|
name: "ikon.client.requestFullscreen",
|
|
4126
4126
|
description: "Request the browser to enter fullscreen mode",
|
|
4127
4127
|
returnType: { kind: "boolean" }
|
|
4128
4128
|
};
|
|
4129
|
-
async function
|
|
4129
|
+
async function gd() {
|
|
4130
4130
|
if (typeof document > "u" || !document.documentElement)
|
|
4131
4131
|
return !1;
|
|
4132
4132
|
try {
|
|
@@ -4136,12 +4136,12 @@ async function Sd() {
|
|
|
4136
4136
|
return !1;
|
|
4137
4137
|
}
|
|
4138
4138
|
}
|
|
4139
|
-
const
|
|
4139
|
+
const Cd = {
|
|
4140
4140
|
name: "ikon.client.exitFullscreen",
|
|
4141
4141
|
description: "Exit browser fullscreen mode",
|
|
4142
4142
|
returnType: { kind: "boolean" }
|
|
4143
4143
|
};
|
|
4144
|
-
function
|
|
4144
|
+
function yd() {
|
|
4145
4145
|
if (typeof document > "u")
|
|
4146
4146
|
return !1;
|
|
4147
4147
|
try {
|
|
@@ -4151,24 +4151,24 @@ function Cd() {
|
|
|
4151
4151
|
return !1;
|
|
4152
4152
|
}
|
|
4153
4153
|
}
|
|
4154
|
-
const
|
|
4155
|
-
{ definition:
|
|
4156
|
-
{ definition:
|
|
4157
|
-
{ definition:
|
|
4158
|
-
{ definition:
|
|
4159
|
-
{ definition:
|
|
4160
|
-
{ definition:
|
|
4161
|
-
{ definition:
|
|
4162
|
-
{ definition:
|
|
4163
|
-
{ definition:
|
|
4164
|
-
{ definition:
|
|
4165
|
-
{ definition:
|
|
4166
|
-
{ definition:
|
|
4167
|
-
{ definition:
|
|
4168
|
-
{ definition:
|
|
4154
|
+
const Ad = [
|
|
4155
|
+
{ definition: Ju, handler: Qu },
|
|
4156
|
+
{ definition: Zu, handler: qu },
|
|
4157
|
+
{ definition: ed, handler: td },
|
|
4158
|
+
{ definition: nd, handler: rd },
|
|
4159
|
+
{ definition: sd, handler: id },
|
|
4160
|
+
{ definition: od, handler: ad },
|
|
4161
|
+
{ definition: cd, handler: ld },
|
|
4162
|
+
{ definition: dd, handler: hd },
|
|
4163
|
+
{ definition: fd, handler: pd },
|
|
4164
|
+
{ definition: md, handler: Ed },
|
|
4165
|
+
{ definition: Id, handler: _d },
|
|
4166
|
+
{ definition: Td, handler: wd },
|
|
4167
|
+
{ definition: Sd, handler: gd },
|
|
4168
|
+
{ definition: Cd, handler: yd }
|
|
4169
4169
|
];
|
|
4170
|
-
function
|
|
4171
|
-
const e =
|
|
4170
|
+
function Rd(t) {
|
|
4171
|
+
const e = Ad.map(({ definition: n, handler: r }) => t.register(n, r));
|
|
4172
4172
|
return () => e.forEach((n) => n());
|
|
4173
4173
|
}
|
|
4174
4174
|
function je() {
|
|
@@ -4192,7 +4192,7 @@ function vf() {
|
|
|
4192
4192
|
} catch {
|
|
4193
4193
|
}
|
|
4194
4194
|
}
|
|
4195
|
-
function
|
|
4195
|
+
function bd(t) {
|
|
4196
4196
|
try {
|
|
4197
4197
|
const e = t.split(".");
|
|
4198
4198
|
return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
|
|
@@ -4201,10 +4201,10 @@ function Rd(t) {
|
|
|
4201
4201
|
}
|
|
4202
4202
|
}
|
|
4203
4203
|
const xe = {}, it = "https://api.prod.ikon.live", ot = "https://api.dev.ikon.live", Ht = "https://auth.ikonai.com", $t = "https://auth.dev.ikonai.com", Uf = "https://auth.ikonai.com";
|
|
4204
|
-
function
|
|
4204
|
+
function ps(t) {
|
|
4205
4205
|
return t === "development" ? ot : it;
|
|
4206
4206
|
}
|
|
4207
|
-
function
|
|
4207
|
+
function Kt() {
|
|
4208
4208
|
const t = typeof import.meta < "u" ? xe?.VITE_IKON_BACKEND_URL : void 0;
|
|
4209
4209
|
return t || (typeof window > "u" ? it : !Nt() || window.location.hostname.includes(".dev.") ? ot : it);
|
|
4210
4210
|
}
|
|
@@ -4281,7 +4281,7 @@ async function Ud(t, e, n, r) {
|
|
|
4281
4281
|
const i = await s.json();
|
|
4282
4282
|
if (!i.token)
|
|
4283
4283
|
return;
|
|
4284
|
-
const o =
|
|
4284
|
+
const o = bd(i.token);
|
|
4285
4285
|
return o ? { userId: o, token: i.token } : void 0;
|
|
4286
4286
|
} catch {
|
|
4287
4287
|
return;
|
|
@@ -4299,7 +4299,7 @@ async function Od(t, e, n, r) {
|
|
|
4299
4299
|
ee.warn("Failed to ensure profile:", s);
|
|
4300
4300
|
}
|
|
4301
4301
|
}
|
|
4302
|
-
function
|
|
4302
|
+
function ms(t, e, n) {
|
|
4303
4303
|
const r = {
|
|
4304
4304
|
method: "POST",
|
|
4305
4305
|
headers: {
|
|
@@ -4311,58 +4311,58 @@ function ps(t, e, n) {
|
|
|
4311
4311
|
};
|
|
4312
4312
|
return e || (r.credentials = "include"), r;
|
|
4313
4313
|
}
|
|
4314
|
-
async function
|
|
4314
|
+
async function Es(t, e, n, r, s, i, o) {
|
|
4315
4315
|
const a = `${t}/rooms`, c = {
|
|
4316
4316
|
space: e,
|
|
4317
4317
|
...n ? { key: n } : {},
|
|
4318
4318
|
...r && Object.keys(r).length > 0 ? { params: r } : {},
|
|
4319
4319
|
...s ? { hash: s } : {}
|
|
4320
|
-
}, l = await fetch(a,
|
|
4320
|
+
}, l = await fetch(a, ms(c, i, o));
|
|
4321
4321
|
if (!l.ok) {
|
|
4322
4322
|
const p = await l.text().catch(() => "Unknown error");
|
|
4323
|
-
throw new
|
|
4323
|
+
throw new N(`Failed to request channel: ${l.status} ${p}`);
|
|
4324
4324
|
}
|
|
4325
4325
|
return await l.json();
|
|
4326
4326
|
}
|
|
4327
4327
|
async function Md(t, e, n, r) {
|
|
4328
|
-
const s = `${t}/rooms/connect`, i = await fetch(s,
|
|
4328
|
+
const s = `${t}/rooms/connect`, i = await fetch(s, ms(e, n, r));
|
|
4329
4329
|
if (!i.ok) {
|
|
4330
4330
|
const o = await i.text().catch(() => "Unknown error");
|
|
4331
|
-
throw new
|
|
4331
|
+
throw new N(`Backend connect failed: ${i.status} ${o}`);
|
|
4332
4332
|
}
|
|
4333
4333
|
return i.json();
|
|
4334
4334
|
}
|
|
4335
|
-
async function
|
|
4335
|
+
async function Is(t, e, n, r, s) {
|
|
4336
4336
|
const i = Date.now();
|
|
4337
4337
|
let o = Dd;
|
|
4338
4338
|
for (; ; ) {
|
|
4339
4339
|
if (s?.aborted)
|
|
4340
|
-
throw new
|
|
4340
|
+
throw new N("Connection aborted");
|
|
4341
4341
|
if (Date.now() - i >= n)
|
|
4342
|
-
throw new
|
|
4342
|
+
throw new Cu(n);
|
|
4343
4343
|
const c = await Md(t, e, r, s), l = c.state?.toLowerCase();
|
|
4344
4344
|
if (l === "running")
|
|
4345
4345
|
return c;
|
|
4346
4346
|
if (l === "provisioning") {
|
|
4347
|
-
await
|
|
4347
|
+
await ls(o, s), o = Math.min(o * 1.5, vd);
|
|
4348
4348
|
continue;
|
|
4349
4349
|
}
|
|
4350
|
-
throw new
|
|
4350
|
+
throw new N(`Unexpected channel state: ${c.state}`);
|
|
4351
4351
|
}
|
|
4352
4352
|
}
|
|
4353
4353
|
async function We(t, e) {
|
|
4354
4354
|
const n = await fetch(t, { signal: e });
|
|
4355
4355
|
if (!n.ok) {
|
|
4356
4356
|
const o = await n.text().catch(() => "Unknown error");
|
|
4357
|
-
throw new
|
|
4357
|
+
throw new N(`Failed to connect: ${n.status} ${o}`);
|
|
4358
4358
|
}
|
|
4359
4359
|
const r = await n.arrayBuffer(), s = new Uint8Array(r);
|
|
4360
|
-
return { authResponse: await
|
|
4360
|
+
return { authResponse: await Do(s) };
|
|
4361
4361
|
}
|
|
4362
|
-
async function
|
|
4362
|
+
async function _s(t, e, n, r, s) {
|
|
4363
4363
|
const i = [];
|
|
4364
4364
|
if (n === "force-proxy" ? e && i.push({ url: e, isProxy: !0 }) : n === "force-direct" ? i.push({ url: t, isProxy: !1 }) : r ? (e && i.push({ url: e, isProxy: !0 }), i.push({ url: t, isProxy: !1 })) : (i.push({ url: t, isProxy: !1 }), e && i.push({ url: e, isProxy: !0 })), i.length === 0)
|
|
4365
|
-
throw new
|
|
4365
|
+
throw new N("No connect URL available");
|
|
4366
4366
|
let o;
|
|
4367
4367
|
for (const a of i)
|
|
4368
4368
|
try {
|
|
@@ -4371,11 +4371,11 @@ async function Is(t, e, n, r, s) {
|
|
|
4371
4371
|
} catch (c) {
|
|
4372
4372
|
o = c, ee.warn(`Auth via ${a.isProxy ? "proxy" : "direct"} URL failed: ${c}`);
|
|
4373
4373
|
}
|
|
4374
|
-
throw o ?? new
|
|
4374
|
+
throw o ?? new N("All authentication attempts failed");
|
|
4375
4375
|
}
|
|
4376
4376
|
function Pd(t, e) {
|
|
4377
4377
|
const n = yt();
|
|
4378
|
-
return
|
|
4378
|
+
return Oo({
|
|
4379
4379
|
ServerSessionId: "",
|
|
4380
4380
|
// Server will fill this in
|
|
4381
4381
|
ContextType: ue.Browser,
|
|
@@ -4450,7 +4450,19 @@ async function Fd(t, e) {
|
|
|
4450
4450
|
const S = await Ud(t.spaceId, i, Nd(), e);
|
|
4451
4451
|
S && (o = S.userId, a = S.token);
|
|
4452
4452
|
}
|
|
4453
|
-
o || (o = i, ee.debug("Using deviceId as userId fallback")), t.spaceId && a
|
|
4453
|
+
if (o || (o = i, ee.debug("Using deviceId as userId fallback")), t.spaceId && a)
|
|
4454
|
+
if (t.token) {
|
|
4455
|
+
const S = Kt(), _ = await fetch(`${S}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
|
|
4456
|
+
method: "GET",
|
|
4457
|
+
headers: { Authorization: `Bearer ${a}` },
|
|
4458
|
+
signal: e
|
|
4459
|
+
});
|
|
4460
|
+
if (!_.ok) {
|
|
4461
|
+
const E = await _.text().catch(() => "Unknown error");
|
|
4462
|
+
throw new N(`Failed to get or create profile: ${_.status} ${E}`);
|
|
4463
|
+
}
|
|
4464
|
+
} else
|
|
4465
|
+
await Od(Kt(), t.spaceId, a, e);
|
|
4454
4466
|
const c = Pd({ ...t, parameters: s }, o), l = Ld(c), f = await fetch(`${n}/connect-token`, {
|
|
4455
4467
|
method: "POST",
|
|
4456
4468
|
headers: {
|
|
@@ -4461,18 +4473,18 @@ async function Fd(t, e) {
|
|
|
4461
4473
|
});
|
|
4462
4474
|
if (!f.ok) {
|
|
4463
4475
|
const S = await f.text().catch(() => "Unknown error");
|
|
4464
|
-
throw new
|
|
4476
|
+
throw new N(`Failed to get connect token: ${f.status} ${S}`);
|
|
4465
4477
|
}
|
|
4466
4478
|
const d = (await f.json()).token;
|
|
4467
4479
|
if (!d)
|
|
4468
|
-
throw new
|
|
4480
|
+
throw new N("Server did not return a token");
|
|
4469
4481
|
const m = `${n}/connect?token=${encodeURIComponent(d)}`;
|
|
4470
4482
|
return We(m, e);
|
|
4471
4483
|
}
|
|
4472
4484
|
async function Bd(t, e, n = "auto", r = !1) {
|
|
4473
4485
|
if (t.sessionId && t.channelKey)
|
|
4474
|
-
throw new
|
|
4475
|
-
const s =
|
|
4486
|
+
throw new N("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
4487
|
+
const s = ps(t.backendType);
|
|
4476
4488
|
ee.debug(`Authenticating with cloud server: ${s}, space ID: ${t.spaceId}`);
|
|
4477
4489
|
const i = await fetch(`${s}/auth/api-key`, {
|
|
4478
4490
|
method: "POST",
|
|
@@ -4487,12 +4499,12 @@ async function Bd(t, e, n = "auto", r = !1) {
|
|
|
4487
4499
|
signal: e
|
|
4488
4500
|
});
|
|
4489
4501
|
if (!i.ok) {
|
|
4490
|
-
const
|
|
4491
|
-
throw new
|
|
4502
|
+
const _ = await i.text().catch(() => "Unknown error");
|
|
4503
|
+
throw new N(`API key authentication failed: ${i.status} ${_}`);
|
|
4492
4504
|
}
|
|
4493
4505
|
const a = (await i.json()).token;
|
|
4494
4506
|
if (!a)
|
|
4495
|
-
throw new
|
|
4507
|
+
throw new N("Backend did not return a token");
|
|
4496
4508
|
const c = await fetch(`${s}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
|
|
4497
4509
|
method: "GET",
|
|
4498
4510
|
headers: {
|
|
@@ -4501,10 +4513,10 @@ async function Bd(t, e, n = "auto", r = !1) {
|
|
|
4501
4513
|
signal: e
|
|
4502
4514
|
});
|
|
4503
4515
|
if (!c.ok) {
|
|
4504
|
-
const
|
|
4505
|
-
throw new
|
|
4516
|
+
const _ = await c.text().catch(() => "Unknown error");
|
|
4517
|
+
throw new N(`Failed to get or create profile: ${c.status} ${_}`);
|
|
4506
4518
|
}
|
|
4507
|
-
const l = await
|
|
4519
|
+
const l = await Es(s, t.spaceId, t.channelKey, t.parameters, t.sessionId, a, e), f = Ye(), p = yt(), d = {
|
|
4508
4520
|
code: l.code,
|
|
4509
4521
|
contextType: ue.Plugin,
|
|
4510
4522
|
userType: t.userType ?? he.Human,
|
|
@@ -4529,10 +4541,10 @@ async function Bd(t, e, n = "auto", r = !1) {
|
|
|
4529
4541
|
timezone: At(),
|
|
4530
4542
|
isTouchDevice: Rt(),
|
|
4531
4543
|
initialPath: kt()
|
|
4532
|
-
}, m = t.provisioningTimeoutMs ??
|
|
4544
|
+
}, m = t.provisioningTimeoutMs ?? hs, S = await Is(s, d, m, a, e);
|
|
4533
4545
|
if (!S.configuration?.url)
|
|
4534
|
-
throw new
|
|
4535
|
-
return
|
|
4546
|
+
throw new N("Backend did not return a connect URL");
|
|
4547
|
+
return _s(
|
|
4536
4548
|
S.configuration.url,
|
|
4537
4549
|
S.configuration.proxyUrl,
|
|
4538
4550
|
n,
|
|
@@ -4542,8 +4554,8 @@ async function Bd(t, e, n = "auto", r = !1) {
|
|
|
4542
4554
|
}
|
|
4543
4555
|
async function xd(t, e, n = "auto", r = !1) {
|
|
4544
4556
|
if (t.sessionId && t.channelKey)
|
|
4545
|
-
throw new
|
|
4546
|
-
const s =
|
|
4557
|
+
throw new N("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
4558
|
+
const s = ps(t.backendType), i = t.token;
|
|
4547
4559
|
ee.debug(`Authenticating with session token to: ${s}, space ID: ${t.spaceId}`);
|
|
4548
4560
|
const o = await fetch(`${s}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
|
|
4549
4561
|
method: "GET",
|
|
@@ -4554,9 +4566,9 @@ async function xd(t, e, n = "auto", r = !1) {
|
|
|
4554
4566
|
});
|
|
4555
4567
|
if (!o.ok) {
|
|
4556
4568
|
const m = await o.text().catch(() => "Unknown error");
|
|
4557
|
-
throw new
|
|
4569
|
+
throw new N(`Failed to get or create profile: ${o.status} ${m}`);
|
|
4558
4570
|
}
|
|
4559
|
-
const a = await
|
|
4571
|
+
const a = await Es(s, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e), c = Ye(), l = yt(), f = {
|
|
4560
4572
|
code: a.code,
|
|
4561
4573
|
contextType: ue.Browser,
|
|
4562
4574
|
userType: he.Human,
|
|
@@ -4581,10 +4593,10 @@ async function xd(t, e, n = "auto", r = !1) {
|
|
|
4581
4593
|
timezone: At(),
|
|
4582
4594
|
isTouchDevice: Rt(),
|
|
4583
4595
|
initialPath: kt()
|
|
4584
|
-
}, p = t.provisioningTimeoutMs ??
|
|
4596
|
+
}, p = t.provisioningTimeoutMs ?? hs, d = await Is(s, f, p, i, e);
|
|
4585
4597
|
if (!d.configuration?.url)
|
|
4586
|
-
throw new
|
|
4587
|
-
return
|
|
4598
|
+
throw new N("Backend did not return a connect URL");
|
|
4599
|
+
return _s(
|
|
4588
4600
|
d.configuration.url,
|
|
4589
4601
|
d.configuration.proxyUrl,
|
|
4590
4602
|
n,
|
|
@@ -4592,7 +4604,7 @@ async function xd(t, e, n = "auto", r = !1) {
|
|
|
4592
4604
|
e
|
|
4593
4605
|
);
|
|
4594
4606
|
}
|
|
4595
|
-
const Wd = "ikon-proxy", Gd = "ikon-websocket", Vd = "ikon-webtransport",
|
|
4607
|
+
const Wd = "ikon-proxy", Gd = "ikon-websocket", Vd = "ikon-webtransport", Ts = "ikon-debug", Hd = "ikon-lang", $d = "ikon-server-url", Lf = "ikon-git-source", Ff = "ikon-git-branch", Kd = "ikon-audio", Yd = "ikon-video", jd = "ikon-webrtc";
|
|
4596
4608
|
function Dt(t, e) {
|
|
4597
4609
|
if (typeof window > "u")
|
|
4598
4610
|
return null;
|
|
@@ -4622,7 +4634,7 @@ function Qd() {
|
|
|
4622
4634
|
return te(Vd);
|
|
4623
4635
|
}
|
|
4624
4636
|
function Zd() {
|
|
4625
|
-
return te(
|
|
4637
|
+
return te(Ts) === !0;
|
|
4626
4638
|
}
|
|
4627
4639
|
function Bf() {
|
|
4628
4640
|
return Dt(Hd);
|
|
@@ -4678,7 +4690,7 @@ function ye(t) {
|
|
|
4678
4690
|
return t;
|
|
4679
4691
|
}
|
|
4680
4692
|
}
|
|
4681
|
-
function
|
|
4693
|
+
function Yt(t, e) {
|
|
4682
4694
|
if (t === void 0 || t === "")
|
|
4683
4695
|
return;
|
|
4684
4696
|
const n = JSON.parse(t);
|
|
@@ -4689,7 +4701,7 @@ function Kt(t, e) {
|
|
|
4689
4701
|
}
|
|
4690
4702
|
return n;
|
|
4691
4703
|
}
|
|
4692
|
-
function
|
|
4704
|
+
function ws(t, e) {
|
|
4693
4705
|
if (t === void 0)
|
|
4694
4706
|
return "null";
|
|
4695
4707
|
if (t === null) {
|
|
@@ -4701,7 +4713,7 @@ function Ts(t, e) {
|
|
|
4701
4713
|
}
|
|
4702
4714
|
function sh(t, e) {
|
|
4703
4715
|
const n = (t.parameters ?? []).map((i) => {
|
|
4704
|
-
const o = Ge(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ?
|
|
4716
|
+
const o = Ge(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? ws(i.defaultValue, o) : "";
|
|
4705
4717
|
return {
|
|
4706
4718
|
name: i.name,
|
|
4707
4719
|
descriptor: o,
|
|
@@ -4749,7 +4761,7 @@ class oh extends Error {
|
|
|
4749
4761
|
super(e), this.remoteErrorType = n, this.remoteStackTrace = r, this.name = "FunctionCallError";
|
|
4750
4762
|
}
|
|
4751
4763
|
}
|
|
4752
|
-
const Ee = L("FunctionRegistry"),
|
|
4764
|
+
const Ee = L("FunctionRegistry"), jt = new Uint8Array(0), zt = 3e4;
|
|
4753
4765
|
function ah(t) {
|
|
4754
4766
|
return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
|
|
4755
4767
|
}
|
|
@@ -4836,13 +4848,13 @@ class ch {
|
|
|
4836
4848
|
throw new Error(`Remote function not found: ${e}`);
|
|
4837
4849
|
const s = w.createRandom(), i = n.map((c, l) => {
|
|
4838
4850
|
const f = r.parameters[l], p = f ? f.TypeName : this.inferTypeName(c);
|
|
4839
|
-
return
|
|
4851
|
+
return Tn({
|
|
4840
4852
|
ParameterIndex: l,
|
|
4841
4853
|
TypeName: p,
|
|
4842
4854
|
ValueJson: JSON.stringify(c ?? null),
|
|
4843
|
-
ValueData:
|
|
4855
|
+
ValueData: jt
|
|
4844
4856
|
});
|
|
4845
|
-
}), o =
|
|
4857
|
+
}), o = Bn({
|
|
4846
4858
|
FunctionId: w.createRandom(),
|
|
4847
4859
|
CallId: s,
|
|
4848
4860
|
InstanceId: w.createRandom(),
|
|
@@ -4850,13 +4862,13 @@ class ch {
|
|
|
4850
4862
|
Parameters: i,
|
|
4851
4863
|
Scopes: [],
|
|
4852
4864
|
Version: ""
|
|
4853
|
-
}), a =
|
|
4865
|
+
}), a = zo(o, this.config.sessionId, {
|
|
4854
4866
|
targetIds: [r.clientSessionId]
|
|
4855
4867
|
});
|
|
4856
4868
|
return new Promise((c, l) => {
|
|
4857
4869
|
const f = setTimeout(() => {
|
|
4858
|
-
this.pendingCalls.delete(s.toString()), l(new Error(`Function call '${e}' timed out after ${
|
|
4859
|
-
},
|
|
4870
|
+
this.pendingCalls.delete(s.toString()), l(new Error(`Function call '${e}' timed out after ${zt}ms`));
|
|
4871
|
+
}, zt);
|
|
4860
4872
|
this.pendingCalls.set(s.toString(), {
|
|
4861
4873
|
resolve: c,
|
|
4862
4874
|
reject: l,
|
|
@@ -4917,7 +4929,7 @@ class ch {
|
|
|
4917
4929
|
return n === g.ACTION_FUNCTION_RESULT ? (this.handleFunctionResult(e), !0) : n === g.ACTION_FUNCTION_ERROR ? (this.handleFunctionError(e), !0) : !1;
|
|
4918
4930
|
}
|
|
4919
4931
|
handleFunctionResult(e) {
|
|
4920
|
-
const n =
|
|
4932
|
+
const n = La(e), r = n.CallId.toString(), s = this.pendingCalls.get(r);
|
|
4921
4933
|
if (!s) {
|
|
4922
4934
|
Ee.warn(`Received result for unknown call: ${r}`);
|
|
4923
4935
|
return;
|
|
@@ -4927,7 +4939,7 @@ class ch {
|
|
|
4927
4939
|
s.resolve(i);
|
|
4928
4940
|
}
|
|
4929
4941
|
handleFunctionError(e) {
|
|
4930
|
-
const n =
|
|
4942
|
+
const n = la(e), r = n.CallId.toString(), s = this.pendingCalls.get(r);
|
|
4931
4943
|
if (!s) {
|
|
4932
4944
|
Ee.warn(`Received error for unknown call: ${r}`);
|
|
4933
4945
|
return;
|
|
@@ -4955,7 +4967,7 @@ class ch {
|
|
|
4955
4967
|
sendAllRegistrations() {
|
|
4956
4968
|
if (!this.config || this.functions.size === 0)
|
|
4957
4969
|
return;
|
|
4958
|
-
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), n =
|
|
4970
|
+
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), n = Aa({ Functions: e }), r = ka(n, this.config.sessionId);
|
|
4959
4971
|
this.config.sendProtocolMessage(r);
|
|
4960
4972
|
}
|
|
4961
4973
|
/**
|
|
@@ -4964,14 +4976,14 @@ class ch {
|
|
|
4964
4976
|
sendRegistration(e) {
|
|
4965
4977
|
if (!this.config)
|
|
4966
4978
|
return;
|
|
4967
|
-
const n =
|
|
4979
|
+
const n = ma(e.registerPayload, this.config.sessionId);
|
|
4968
4980
|
this.config.sendProtocolMessage(n);
|
|
4969
4981
|
}
|
|
4970
4982
|
/**
|
|
4971
4983
|
* Handle an incoming function call.
|
|
4972
4984
|
*/
|
|
4973
4985
|
async handleFunctionCall(e, n) {
|
|
4974
|
-
const r = await
|
|
4986
|
+
const r = await Xo(e), s = this.functions.get(r.FunctionName);
|
|
4975
4987
|
if (!s) {
|
|
4976
4988
|
Ee.warn(`Received call for unknown function: ${r.FunctionName}`), this.sendError(r.CallId, r.InstanceId, n, new Error(`Unknown function: ${r.FunctionName}`));
|
|
4977
4989
|
return;
|
|
@@ -4986,12 +4998,12 @@ class ch {
|
|
|
4986
4998
|
const s = [];
|
|
4987
4999
|
for (let l = 0; l < e.parameters.length; l++) {
|
|
4988
5000
|
const f = e.parameters[l], d = n.Parameters?.[l]?.ValueJson;
|
|
4989
|
-
d === void 0 || d === "" ? f.hasDefaultValue ? s.push(
|
|
5001
|
+
d === void 0 || d === "" ? f.hasDefaultValue ? s.push(Yt(f.defaultValueJson, f.descriptor)) : s.push(void 0) : s.push(Yt(d, f.descriptor));
|
|
4990
5002
|
}
|
|
4991
5003
|
const i = await e.handler(...s);
|
|
4992
|
-
let o = i, a =
|
|
5004
|
+
let o = i, a = jt;
|
|
4993
5005
|
ah(i) && (o = i.value, a = new Uint8Array(i.data));
|
|
4994
|
-
const c =
|
|
5006
|
+
const c = ws(o, e.returnType);
|
|
4995
5007
|
this.sendResult(n.CallId, n.InstanceId, r, e, c, a);
|
|
4996
5008
|
} catch (s) {
|
|
4997
5009
|
Ee.error(`Function ${n.FunctionName} execution failed:`, s), this.sendError(n.CallId, n.InstanceId, r, s instanceof Error ? s : new Error(String(s)));
|
|
@@ -5003,7 +5015,7 @@ class ch {
|
|
|
5003
5015
|
sendAck(e, n, r) {
|
|
5004
5016
|
if (!this.config)
|
|
5005
5017
|
return;
|
|
5006
|
-
const s =
|
|
5018
|
+
const s = Vo(Bo({ CallId: e, InstanceId: n }), this.config.sessionId, { targetIds: [r] });
|
|
5007
5019
|
this.config.sendProtocolMessage(s);
|
|
5008
5020
|
}
|
|
5009
5021
|
/**
|
|
@@ -5012,8 +5024,8 @@ class ch {
|
|
|
5012
5024
|
sendResult(e, n, r, s, i, o) {
|
|
5013
5025
|
if (!this.config)
|
|
5014
5026
|
return;
|
|
5015
|
-
const a =
|
|
5016
|
-
|
|
5027
|
+
const a = Pa(
|
|
5028
|
+
Dr({
|
|
5017
5029
|
CallId: e,
|
|
5018
5030
|
InstanceId: n,
|
|
5019
5031
|
ResultTypeName: ye(s.returnType),
|
|
@@ -5031,8 +5043,8 @@ class ch {
|
|
|
5031
5043
|
sendError(e, n, r, s) {
|
|
5032
5044
|
if (!this.config)
|
|
5033
5045
|
return;
|
|
5034
|
-
const i =
|
|
5035
|
-
|
|
5046
|
+
const i = ca(
|
|
5047
|
+
Jn({
|
|
5036
5048
|
CallId: e,
|
|
5037
5049
|
InstanceId: n,
|
|
5038
5050
|
ErrorMessage: s.message,
|
|
@@ -5164,13 +5176,13 @@ function ph(t, e) {
|
|
|
5164
5176
|
r();
|
|
5165
5177
|
};
|
|
5166
5178
|
}
|
|
5167
|
-
const
|
|
5179
|
+
const Ss = {
|
|
5168
5180
|
PlaySound: "ikon.client.playSound",
|
|
5169
5181
|
StopSound: "ikon.client.stopSound"
|
|
5170
5182
|
}, at = /* @__PURE__ */ new Map(), oe = /* @__PURE__ */ new Map();
|
|
5171
5183
|
let mh = 1;
|
|
5172
5184
|
const Eh = {
|
|
5173
|
-
name:
|
|
5185
|
+
name: Ss.PlaySound,
|
|
5174
5186
|
description: "Play a sound effect",
|
|
5175
5187
|
returnType: { kind: "string", nullable: !0 },
|
|
5176
5188
|
parameters: [
|
|
@@ -5209,7 +5221,7 @@ function Ih(t, e, n, r) {
|
|
|
5209
5221
|
});
|
|
5210
5222
|
}
|
|
5211
5223
|
const _h = {
|
|
5212
|
-
name:
|
|
5224
|
+
name: Ss.StopSound,
|
|
5213
5225
|
description: "Stop a playing sound by ID",
|
|
5214
5226
|
returnType: { kind: "boolean" },
|
|
5215
5227
|
parameters: [{ name: "playbackId", type: { kind: "string" }, description: "Playback ID from playSound" }]
|
|
@@ -5246,7 +5258,7 @@ function gh(t) {
|
|
|
5246
5258
|
e.forEach((n) => n()), wh();
|
|
5247
5259
|
};
|
|
5248
5260
|
}
|
|
5249
|
-
const
|
|
5261
|
+
const gs = () => {
|
|
5250
5262
|
if (typeof navigator > "u")
|
|
5251
5263
|
return !1;
|
|
5252
5264
|
const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), n = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
@@ -5266,7 +5278,7 @@ function Pe() {
|
|
|
5266
5278
|
}
|
|
5267
5279
|
return !0;
|
|
5268
5280
|
}
|
|
5269
|
-
function
|
|
5281
|
+
function Cs(t) {
|
|
5270
5282
|
return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
|
|
5271
5283
|
}
|
|
5272
5284
|
function yh() {
|
|
@@ -5278,7 +5290,7 @@ function yh() {
|
|
|
5278
5290
|
const o = new Blob([r], { type: "audio/wav" });
|
|
5279
5291
|
return URL.createObjectURL(o);
|
|
5280
5292
|
}
|
|
5281
|
-
class
|
|
5293
|
+
class ys {
|
|
5282
5294
|
_silentAudioElement = null;
|
|
5283
5295
|
get silentAudioElement() {
|
|
5284
5296
|
return this._silentAudioElement;
|
|
@@ -5331,12 +5343,12 @@ function Ah(t) {
|
|
|
5331
5343
|
}
|
|
5332
5344
|
);
|
|
5333
5345
|
}
|
|
5334
|
-
const ve = 48e3, x = 2,
|
|
5346
|
+
const ve = 48e3, x = 2, As = 1500, Xt = 512, Jt = "playback", Rh = 120, bh = 300, Nh = 4, kh = 200, Dh = 100, vh = 8e3, Uh = 10, Rs = 100, ct = 50, bs = 128, Oh = 20, Mh = !0, X = 1500, Ph = -20, Lh = -100, Fh = 200, D = L("IkonAudioPlayback"), Bh = () => {
|
|
5335
5347
|
if (typeof navigator > "u" || typeof window > "u")
|
|
5336
5348
|
return !1;
|
|
5337
5349
|
const t = navigator.userAgent, e = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t), n = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
5338
5350
|
return e || n;
|
|
5339
|
-
},
|
|
5351
|
+
}, Qt = {
|
|
5340
5352
|
enabled: !1,
|
|
5341
5353
|
statusIntervalMs: 1e3
|
|
5342
5354
|
};
|
|
@@ -5351,7 +5363,7 @@ const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_R
|
|
|
5351
5363
|
const BUFFER_TARGET_MIN_MS = ${Rh};
|
|
5352
5364
|
const BUFFER_TARGET_MAX_MS = ${bh};
|
|
5353
5365
|
const JITTER_MULTIPLIER = ${Nh};
|
|
5354
|
-
const LOCAL_BUFFER_MAX_MS = ${
|
|
5366
|
+
const LOCAL_BUFFER_MAX_MS = ${As};
|
|
5355
5367
|
const CONTROL_PERIOD_MS = ${kh};
|
|
5356
5368
|
const UNDERRUN_JUMP_MS = ${Dh};
|
|
5357
5369
|
const STABLE_TIME_TO_DECREASE_MS = ${vh};
|
|
@@ -5363,7 +5375,7 @@ const INV_OUTPUT_SAMPLE_RATE_HZ = 1 / OUTPUT_SAMPLE_RATE_HZ;
|
|
|
5363
5375
|
const MS_PER_SAMPLE = 1000 * INV_OUTPUT_SAMPLE_RATE_HZ;
|
|
5364
5376
|
|
|
5365
5377
|
// Fade envelope constants
|
|
5366
|
-
const FADE_IN_DURATION_MS = ${
|
|
5378
|
+
const FADE_IN_DURATION_MS = ${Rs};
|
|
5367
5379
|
const FADE_OUT_DURATION_MS = ${ct};
|
|
5368
5380
|
const FADE_IN_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_IN_DURATION_MS / 1000);
|
|
5369
5381
|
const FADE_OUT_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_OUT_DURATION_MS / 1000);
|
|
@@ -5371,7 +5383,7 @@ const FADE_IN_INCREMENT = 1.0 / FADE_IN_DURATION_SAMPLES;
|
|
|
5371
5383
|
const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
|
|
5372
5384
|
|
|
5373
5385
|
// Render quantum size (standard Web Audio API value)
|
|
5374
|
-
const RENDER_QUANTUM_SIZE = ${
|
|
5386
|
+
const RENDER_QUANTUM_SIZE = ${bs};
|
|
5375
5387
|
|
|
5376
5388
|
// Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
|
|
5377
5389
|
const BUFFER_REDUCTION_CROSSFADE_MS = ${Oh};
|
|
@@ -6334,7 +6346,7 @@ class vt {
|
|
|
6334
6346
|
pendingWorkletMessages = [];
|
|
6335
6347
|
audioWorker = null;
|
|
6336
6348
|
protocolPort = null;
|
|
6337
|
-
mediaSessionHelper = new
|
|
6349
|
+
mediaSessionHelper = new ys();
|
|
6338
6350
|
fallbackQueues = /* @__PURE__ */ new Map();
|
|
6339
6351
|
activeStreams = /* @__PURE__ */ new Set();
|
|
6340
6352
|
mediaSessionConfig = null;
|
|
@@ -6347,7 +6359,7 @@ class vt {
|
|
|
6347
6359
|
// Pre-allocated result object for getCurrentVisemeValues to avoid hot-path allocations
|
|
6348
6360
|
_visemeResult = { mouthOpenY: 0, mouthForm: 0 };
|
|
6349
6361
|
constructor(e, n) {
|
|
6350
|
-
this.client = e, this.config = n ?? {},
|
|
6362
|
+
this.client = e, this.config = n ?? {}, D.debug(`Audio playback initialized, isMobile=${this.isMobile}`);
|
|
6351
6363
|
}
|
|
6352
6364
|
/**
|
|
6353
6365
|
* Set Media Session metadata for OS-level media controls (lock screen, notifications).
|
|
@@ -6426,16 +6438,16 @@ class vt {
|
|
|
6426
6438
|
* (e.g., button click/release) to ensure the AudioContext can be recreated.
|
|
6427
6439
|
*/
|
|
6428
6440
|
requestRecovery() {
|
|
6429
|
-
if (this.enabled &&
|
|
6441
|
+
if (this.enabled && gs() && this.audioContext) {
|
|
6430
6442
|
this.stopAudioGraph();
|
|
6431
6443
|
try {
|
|
6432
6444
|
const e = new AudioContext({
|
|
6433
6445
|
sampleRate: ve,
|
|
6434
|
-
latencyHint:
|
|
6446
|
+
latencyHint: Jt
|
|
6435
6447
|
});
|
|
6436
6448
|
this.audioContext = e, this.outputSampleRateHz = e.sampleRate, e.resume(), this.setupAudioGraphAfterRecreate();
|
|
6437
6449
|
} catch (e) {
|
|
6438
|
-
|
|
6450
|
+
D.error(`iOS audio recovery failed: ${J(e)}`), this.addUnlockHandler();
|
|
6439
6451
|
}
|
|
6440
6452
|
return;
|
|
6441
6453
|
}
|
|
@@ -6530,8 +6542,8 @@ class vt {
|
|
|
6530
6542
|
const a = o * r * s, c = i.frames, l = i.count, p = (i.head - l + X) % X;
|
|
6531
6543
|
let d = null, m = null;
|
|
6532
6544
|
for (let u = 0; u < l; u++) {
|
|
6533
|
-
const v = (p + u) % X, C = c[v],
|
|
6534
|
-
if (C.samplePosition <= a && (d = C),
|
|
6545
|
+
const v = (p + u) % X, C = c[v], k = C.samplePosition + Math.max(C.frameSamples, 1);
|
|
6546
|
+
if (C.samplePosition <= a && (d = C), k > a && !m && (m = C, C.samplePosition <= a))
|
|
6535
6547
|
break;
|
|
6536
6548
|
}
|
|
6537
6549
|
if (!d)
|
|
@@ -6541,9 +6553,9 @@ class vt {
|
|
|
6541
6553
|
continue;
|
|
6542
6554
|
if (!m)
|
|
6543
6555
|
return this._visemeResult.mouthOpenY = d.mouthOpenY, this._visemeResult.mouthForm = d.mouthForm, this._visemeResult;
|
|
6544
|
-
const
|
|
6545
|
-
if (d !== m && m.samplePosition > d.samplePosition && h >
|
|
6546
|
-
const u = Math.min(1, Math.max(0, (a -
|
|
6556
|
+
const _ = d.samplePosition, E = Math.max(d.frameSamples, 1), h = _ + E;
|
|
6557
|
+
if (d !== m && m.samplePosition > d.samplePosition && h > _) {
|
|
6558
|
+
const u = Math.min(1, Math.max(0, (a - _) / (h - _)));
|
|
6547
6559
|
this._visemeResult.mouthOpenY = d.mouthOpenY + u * (m.mouthOpenY - d.mouthOpenY), this._visemeResult.mouthForm = d.mouthForm + u * (m.mouthForm - d.mouthForm);
|
|
6548
6560
|
} else
|
|
6549
6561
|
this._visemeResult.mouthOpenY = d.mouthOpenY, this._visemeResult.mouthForm = d.mouthForm;
|
|
@@ -6554,8 +6566,8 @@ class vt {
|
|
|
6554
6566
|
resolveDiagnosticsConfig() {
|
|
6555
6567
|
const e = this.config.diagnostics ?? {};
|
|
6556
6568
|
return {
|
|
6557
|
-
enabled: e.enabled ??
|
|
6558
|
-
statusIntervalMs: e.statusIntervalMs ??
|
|
6569
|
+
enabled: e.enabled ?? Qt.enabled,
|
|
6570
|
+
statusIntervalMs: e.statusIntervalMs ?? Qt.statusIntervalMs
|
|
6559
6571
|
};
|
|
6560
6572
|
}
|
|
6561
6573
|
resolveBackgroundConfig() {
|
|
@@ -6569,7 +6581,7 @@ class vt {
|
|
|
6569
6581
|
if (typeof window > "u")
|
|
6570
6582
|
return;
|
|
6571
6583
|
if (!this.audioContext) {
|
|
6572
|
-
const a = ve, c =
|
|
6584
|
+
const a = ve, c = Jt;
|
|
6573
6585
|
try {
|
|
6574
6586
|
this.audioContext = new AudioContext({ sampleRate: a, latencyHint: c });
|
|
6575
6587
|
} catch (l) {
|
|
@@ -6579,17 +6591,17 @@ class vt {
|
|
|
6579
6591
|
try {
|
|
6580
6592
|
this.audioContext = new AudioContext();
|
|
6581
6593
|
} catch (p) {
|
|
6582
|
-
|
|
6594
|
+
D.warn(`Failed to create AudioContext: ${J(p)}`), this.audioContext = null;
|
|
6583
6595
|
return;
|
|
6584
6596
|
}
|
|
6585
|
-
|
|
6597
|
+
D.debug(`AudioContext latencyHint unsupported: ${J(f)}`);
|
|
6586
6598
|
}
|
|
6587
|
-
|
|
6599
|
+
D.debug(`AudioContext sample rate request unsupported: ${J(l)}`);
|
|
6588
6600
|
}
|
|
6589
|
-
this.outputSampleRateHz = this.audioContext.sampleRate || ve, this.outputSampleRateHz !== a &&
|
|
6601
|
+
this.outputSampleRateHz = this.audioContext.sampleRate || ve, this.outputSampleRateHz !== a && D.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
|
|
6590
6602
|
}
|
|
6591
6603
|
const r = this.audioContext, s = this.resolveDiagnosticsConfig();
|
|
6592
|
-
if ((this.config.performance?.preferAudioWorklet ?? !0) &&
|
|
6604
|
+
if ((this.config.performance?.preferAudioWorklet ?? !0) && Cs(r)) {
|
|
6593
6605
|
await this.ensureAudioWorklet(r, s, e, n);
|
|
6594
6606
|
return;
|
|
6595
6607
|
}
|
|
@@ -6598,7 +6610,7 @@ class vt {
|
|
|
6598
6610
|
attachAudioContextHealthHandlers(e) {
|
|
6599
6611
|
e.__ikonAudioHealthAttached !== !0 && (Object.defineProperty(e, "__ikonAudioHealthAttached", { value: !0, enumerable: !1 }), e.onstatechange = () => {
|
|
6600
6612
|
const n = this.getContextState(e), r = n === "running";
|
|
6601
|
-
this.notifyPlaybackActive(r), this.enabled && !r && (
|
|
6613
|
+
this.notifyPlaybackActive(r), this.enabled && !r && (D.warn(`AudioContext state changed to '${n}', attempting recovery`), this.recoverAudioContext({ reason: "statechange" }));
|
|
6602
6614
|
}, this.attachVisibilityHandler());
|
|
6603
6615
|
}
|
|
6604
6616
|
attachVisibilityHandler() {
|
|
@@ -6722,7 +6734,7 @@ class vt {
|
|
|
6722
6734
|
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([xh({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: x })], { type: "text/javascript" }));
|
|
6723
6735
|
}
|
|
6724
6736
|
this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((f) => {
|
|
6725
|
-
throw
|
|
6737
|
+
throw D.warn(`Failed to load AudioWorklet module, falling back: ${J(f)}`), f;
|
|
6726
6738
|
}));
|
|
6727
6739
|
try {
|
|
6728
6740
|
await this.workletReady;
|
|
@@ -6746,14 +6758,14 @@ class vt {
|
|
|
6746
6758
|
if (!(!p || typeof p != "object")) {
|
|
6747
6759
|
if (p.type === "log") {
|
|
6748
6760
|
const d = p, m = d.streamId ? ` [stream=${d.streamId.substring(0, 8)}]` : "";
|
|
6749
|
-
d.level === "error" ?
|
|
6761
|
+
d.level === "error" ? D.error(`[Worklet]${m} ${d.message}`) : d.level === "warn" ? D.warn(`[Worklet]${m} ${d.message}`) : D.info(`[Worklet]${m} ${d.message}`);
|
|
6750
6762
|
return;
|
|
6751
6763
|
}
|
|
6752
6764
|
if (p.type === "stats") {
|
|
6753
6765
|
if (!n.enabled)
|
|
6754
6766
|
return;
|
|
6755
6767
|
const d = p;
|
|
6756
|
-
|
|
6768
|
+
D.debug(`[Audio] stream=${d.streamId.substring(0, 8)} state=${d.state} buffer=${d.bufferMs.toFixed(0)}ms target=${d.targetMs.toFixed(0)}ms jitter=${d.jitterMs.toFixed(1)}ms underrun=${d.underrunCount} drop=${d.dropCount}`);
|
|
6757
6769
|
return;
|
|
6758
6770
|
}
|
|
6759
6771
|
if (p.type === "streamDrained" && "streamId" in p && typeof p.streamId == "string") {
|
|
@@ -6773,9 +6785,9 @@ class vt {
|
|
|
6773
6785
|
if (this.scriptProcessorNode)
|
|
6774
6786
|
return;
|
|
6775
6787
|
this.stopAudioWorklet(), this.pendingWorkletMessages = [];
|
|
6776
|
-
const r = 1024, s = new Float32Array(r * x), i = Math.round(this.outputSampleRateHz *
|
|
6788
|
+
const r = 1024, s = new Float32Array(r * x), i = Math.round(this.outputSampleRateHz * Rs / 1e3), o = Math.round(this.outputSampleRateHz * ct / 1e3), a = 1 / i, c = 1 / o, l = new Array(x), f = [], p = e.createScriptProcessor(r, 0, x);
|
|
6777
6789
|
p.onaudioprocess = (d) => {
|
|
6778
|
-
const m = d.outputBuffer, S = m.numberOfChannels,
|
|
6790
|
+
const m = d.outputBuffer, S = m.numberOfChannels, _ = m.length;
|
|
6779
6791
|
for (let h = 0; h < S; h++) {
|
|
6780
6792
|
const u = m.getChannelData(h);
|
|
6781
6793
|
u.fill(0), l[h] = u;
|
|
@@ -6784,17 +6796,17 @@ class vt {
|
|
|
6784
6796
|
f.length = 0;
|
|
6785
6797
|
for (const [h, u] of this.fallbackQueues.entries()) {
|
|
6786
6798
|
u.totalSamples > 0 && (E += 1), (u.ending || u.inputDrained) && u.fadeDirection !== "out" && u.totalSamples / S * 1e3 / this.outputSampleRateHz <= ct * 2 && (u.fadeDirection = "out"), this.readFromFallbackQueue(u, s), (u.totalSamples > 0 || !u.hasLastOut) && ((!u.lastOut || u.lastOut.length !== s.length) && (u.lastOut = new Float32Array(s.length)), u.lastOut.set(s), u.hasLastOut = !0);
|
|
6787
|
-
for (let C = 0; C <
|
|
6799
|
+
for (let C = 0; C < _; C++) {
|
|
6788
6800
|
u.fadeDirection === "in" ? (u.fadeGain = Math.min(1, u.fadeGain + a), u.fadeGain >= 1 && (u.fadeDirection = "none")) : u.fadeDirection === "out" && (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none"));
|
|
6789
|
-
for (let
|
|
6790
|
-
const I = s[C * S +
|
|
6791
|
-
l[
|
|
6801
|
+
for (let k = 0; k < S; k++) {
|
|
6802
|
+
const I = s[C * S + k];
|
|
6803
|
+
l[k][C] += I * u.fadeGain;
|
|
6792
6804
|
}
|
|
6793
6805
|
}
|
|
6794
6806
|
const v = u.ending || u.inputDrained;
|
|
6795
6807
|
if (v && u.totalSamples <= 0) {
|
|
6796
6808
|
if (u.fadeDirection === "out" && u.fadeGain > 1e-3) {
|
|
6797
|
-
for (let C = 0; C <
|
|
6809
|
+
for (let C = 0; C < _; C++)
|
|
6798
6810
|
if (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 1e-3) {
|
|
6799
6811
|
u.fadeGain = 0, u.fadeDirection = "none";
|
|
6800
6812
|
break;
|
|
@@ -6803,11 +6815,11 @@ class vt {
|
|
|
6803
6815
|
u.fadeGain <= 1e-3 && u.ending && f.push(h);
|
|
6804
6816
|
} else if (!v && u.totalSamples <= 0 && u.hasLastOut && u.lastOut && u.fadeGain > 1e-3) {
|
|
6805
6817
|
u.fadeDirection = "out", u.underrunPending = !0;
|
|
6806
|
-
const C = u.lastOut,
|
|
6807
|
-
for (let I = 0; I <
|
|
6818
|
+
const C = u.lastOut, k = _ - 1;
|
|
6819
|
+
for (let I = 0; I < _; I++) {
|
|
6808
6820
|
u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none");
|
|
6809
6821
|
for (let z = 0; z < S; z++) {
|
|
6810
|
-
const Ut = C[
|
|
6822
|
+
const Ut = C[k * S + z];
|
|
6811
6823
|
l[z][I] += Ut * u.fadeGain;
|
|
6812
6824
|
}
|
|
6813
6825
|
}
|
|
@@ -6820,11 +6832,11 @@ class vt {
|
|
|
6820
6832
|
}
|
|
6821
6833
|
if (E > 1) {
|
|
6822
6834
|
const h = 1 / Math.sqrt(E);
|
|
6823
|
-
for (let u = 0; u <
|
|
6835
|
+
for (let u = 0; u < _; u++)
|
|
6824
6836
|
for (let v = 0; v < S; v++)
|
|
6825
6837
|
l[v][u] *= h;
|
|
6826
6838
|
}
|
|
6827
|
-
for (let h = 0; h <
|
|
6839
|
+
for (let h = 0; h < _; h++)
|
|
6828
6840
|
for (let u = 0; u < S; u++) {
|
|
6829
6841
|
const v = l[u][h];
|
|
6830
6842
|
l[u][h] = v > 1 ? 1 : v < -1 ? -1 : v;
|
|
@@ -6849,7 +6861,7 @@ class vt {
|
|
|
6849
6861
|
e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
|
|
6850
6862
|
}
|
|
6851
6863
|
trimFallbackQueue(e) {
|
|
6852
|
-
const n = Math.floor(this.outputSampleRateHz * x *
|
|
6864
|
+
const n = Math.floor(this.outputSampleRateHz * x * As / 1e3), r = e.totalSamples - n;
|
|
6853
6865
|
r <= 0 || this.skipFromFallbackQueue(e, r);
|
|
6854
6866
|
}
|
|
6855
6867
|
stopScriptProcessorDiagnostics() {
|
|
@@ -6869,7 +6881,7 @@ class vt {
|
|
|
6869
6881
|
if (s.totalSamples <= 0)
|
|
6870
6882
|
continue;
|
|
6871
6883
|
const o = s.totalSamples / x * 1e3 / this.outputSampleRateHz;
|
|
6872
|
-
|
|
6884
|
+
D.debug(`[Audio] stream=${r.substring(0, 8)} buffer=${o.toFixed(0)}ms renderer=ScriptProcessor`);
|
|
6873
6885
|
}
|
|
6874
6886
|
}, n);
|
|
6875
6887
|
}
|
|
@@ -6896,7 +6908,7 @@ class vt {
|
|
|
6896
6908
|
try {
|
|
6897
6909
|
await this.resumeWithTimeout(e), this.removeUnlockHandler();
|
|
6898
6910
|
} catch (o) {
|
|
6899
|
-
|
|
6911
|
+
D.warn(`Failed to resume AudioContext: ${J(o)}`), this.addUnlockHandler();
|
|
6900
6912
|
}
|
|
6901
6913
|
}
|
|
6902
6914
|
async recoverAudioContext(e) {
|
|
@@ -6937,7 +6949,7 @@ class vt {
|
|
|
6937
6949
|
return;
|
|
6938
6950
|
}
|
|
6939
6951
|
} catch (i) {
|
|
6940
|
-
|
|
6952
|
+
D.debug(`AudioContext resume failed or timed out (${e.reason}): ${i}`);
|
|
6941
6953
|
}
|
|
6942
6954
|
this.addUnlockHandler();
|
|
6943
6955
|
}
|
|
@@ -6960,25 +6972,25 @@ class vt {
|
|
|
6960
6972
|
if (this.audioWorker)
|
|
6961
6973
|
return;
|
|
6962
6974
|
if (typeof Worker > "u") {
|
|
6963
|
-
|
|
6975
|
+
D.warn("Audio decode worker unavailable (Workers not supported)");
|
|
6964
6976
|
return;
|
|
6965
6977
|
}
|
|
6966
6978
|
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: g.GROUP_AUDIO });
|
|
6967
6979
|
if (!e) {
|
|
6968
|
-
this.enabled &&
|
|
6980
|
+
this.enabled && D.debug("Audio pipeline waiting for client connection");
|
|
6969
6981
|
return;
|
|
6970
6982
|
}
|
|
6971
6983
|
this.protocolPort = e;
|
|
6972
6984
|
try {
|
|
6973
6985
|
this.audioWorker = new Ah();
|
|
6974
6986
|
} catch (p) {
|
|
6975
|
-
|
|
6987
|
+
D.warn(`Failed to create audio worker: ${J(p)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
6976
6988
|
return;
|
|
6977
6989
|
}
|
|
6978
6990
|
const n = this.audioWorker;
|
|
6979
6991
|
n.addEventListener("message", (p) => this.onAudioWorkerMessage(p.data)), n.addEventListener("error", (p) => {
|
|
6980
6992
|
const d = [p.message, p.filename, p.lineno, p.colno].filter((m) => m != null && String(m).length > 0);
|
|
6981
|
-
|
|
6993
|
+
D.error(`Audio worker failed: ${d.join(" ")}`.trim());
|
|
6982
6994
|
});
|
|
6983
6995
|
const s = (this.config.performance?.preferSharedArrayBuffer ?? !0) && !!this.audioWorkletNode && Pe(), i = this.config.performance?.preferWebCodecs ?? !0, o = {
|
|
6984
6996
|
type: "configure",
|
|
@@ -6989,7 +7001,7 @@ class vt {
|
|
|
6989
7001
|
};
|
|
6990
7002
|
n.postMessage(o), n.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
|
|
6991
7003
|
const a = this.audioWorkletNode ? "AudioWorklet" : "ScriptProcessor", c = s ? "SharedArrayBuffer" : "MessagePort", f = i && typeof AudioDecoder < "u" ? "WebCodecs" : "WASM Opus";
|
|
6992
|
-
|
|
7004
|
+
D.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${f}, output=${this.outputSampleRateHz}Hz/${x}ch`);
|
|
6993
7005
|
}
|
|
6994
7006
|
onAudioWorkerMessage(e) {
|
|
6995
7007
|
if (e.type === "streamBegin") {
|
|
@@ -7080,7 +7092,7 @@ class vt {
|
|
|
7080
7092
|
});
|
|
7081
7093
|
return;
|
|
7082
7094
|
}
|
|
7083
|
-
e.type === "error" &&
|
|
7095
|
+
e.type === "error" && D.warn(`Audio worker error${e.streamId ? ` (stream ${e.streamId})` : ""}: ${e.error.message}`);
|
|
7084
7096
|
}
|
|
7085
7097
|
postToWorklet(e, n) {
|
|
7086
7098
|
if (!this.audioWorkletNode) {
|
|
@@ -7103,8 +7115,8 @@ class vt {
|
|
|
7103
7115
|
const n = this.pendingWorkletMessages.findIndex((r) => r.type === "streamBegin" && r.streamId === e.streamId);
|
|
7104
7116
|
n >= 0 && this.pendingWorkletMessages.splice(n, 1);
|
|
7105
7117
|
}
|
|
7106
|
-
if (this.pendingWorkletMessages.push(e), !(this.pendingWorkletMessages.length <=
|
|
7107
|
-
for (; !(this.pendingWorkletMessages.length <=
|
|
7118
|
+
if (this.pendingWorkletMessages.push(e), !(this.pendingWorkletMessages.length <= Xt))
|
|
7119
|
+
for (; !(this.pendingWorkletMessages.length <= Xt); ) {
|
|
7108
7120
|
const n = this.pendingWorkletMessages.findIndex((r) => r.type !== "streamBegin");
|
|
7109
7121
|
if (n < 0)
|
|
7110
7122
|
break;
|
|
@@ -7351,7 +7363,7 @@ class Gh {
|
|
|
7351
7363
|
}
|
|
7352
7364
|
}
|
|
7353
7365
|
requestIdrForStream(e, n) {
|
|
7354
|
-
const r =
|
|
7366
|
+
const r = Rl(yl(), this.client.sessionId ?? 0, {
|
|
7355
7367
|
trackId: n,
|
|
7356
7368
|
targetIds: [e]
|
|
7357
7369
|
});
|
|
@@ -7482,7 +7494,7 @@ function $h(t) {
|
|
|
7482
7494
|
}
|
|
7483
7495
|
);
|
|
7484
7496
|
}
|
|
7485
|
-
const R = L("IkonAudioCapture"), Ue = 3, Kh = 200, Yh = 2e3, jh = 5e3,
|
|
7497
|
+
const R = L("IkonAudioCapture"), Ue = 3, Kh = 200, Yh = 2e3, jh = 5e3, Zt = 3e3;
|
|
7486
7498
|
function zh(t) {
|
|
7487
7499
|
return new Promise((e) => setTimeout(e, t));
|
|
7488
7500
|
}
|
|
@@ -7572,7 +7584,7 @@ class RingBuffer {
|
|
|
7572
7584
|
}
|
|
7573
7585
|
}
|
|
7574
7586
|
|
|
7575
|
-
const RENDER_QUANTUM_SIZE = ${
|
|
7587
|
+
const RENDER_QUANTUM_SIZE = ${bs};
|
|
7576
7588
|
|
|
7577
7589
|
class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
|
|
7578
7590
|
constructor(options) {
|
|
@@ -7758,7 +7770,7 @@ class Zh {
|
|
|
7758
7770
|
} catch {
|
|
7759
7771
|
}
|
|
7760
7772
|
e.pendingRestartTimer && clearTimeout(e.pendingRestartTimer);
|
|
7761
|
-
const m = e.restartCount, S = e.onError,
|
|
7773
|
+
const m = e.restartCount, S = e.onError, _ = {
|
|
7762
7774
|
...e.originalRequest,
|
|
7763
7775
|
constraints: e.currentConstraints,
|
|
7764
7776
|
options: e.currentOptions,
|
|
@@ -7766,7 +7778,7 @@ class Zh {
|
|
|
7766
7778
|
onStateChange: e.onStateChange
|
|
7767
7779
|
};
|
|
7768
7780
|
e.pendingRestartTimer = setTimeout(() => {
|
|
7769
|
-
e.pendingRestartTimer = null, !(!e.stopped || e.stoppedReason !== "recoverable-error") && this.startMic(
|
|
7781
|
+
e.pendingRestartTimer = null, !(!e.stopped || e.stoppedReason !== "recoverable-error") && this.startMic(_).then((E) => {
|
|
7770
7782
|
const h = this.captures.get(E.captureId);
|
|
7771
7783
|
h && (h.restartCount = m, h.lastStableTime = Date.now());
|
|
7772
7784
|
}).catch((E) => {
|
|
@@ -7816,7 +7828,7 @@ class Zh {
|
|
|
7816
7828
|
if (e.ctx.state !== "suspended")
|
|
7817
7829
|
return !1;
|
|
7818
7830
|
const s = Date.now();
|
|
7819
|
-
if (!r && s - e.lastResumeAttemptTime <
|
|
7831
|
+
if (!r && s - e.lastResumeAttemptTime < Zt)
|
|
7820
7832
|
return R.debug(`Resume attempt from ${n} skipped (cooldown)`), !1;
|
|
7821
7833
|
e.lastResumeAttemptTime = s, this.emitDiagnostic({
|
|
7822
7834
|
event: "resume-attempt",
|
|
@@ -7851,7 +7863,7 @@ class Zh {
|
|
|
7851
7863
|
if (e.stopped || e.ctx.state !== "suspended")
|
|
7852
7864
|
return;
|
|
7853
7865
|
const s = Date.now();
|
|
7854
|
-
if (!r && s - e.lastResumeAttemptTime <
|
|
7866
|
+
if (!r && s - e.lastResumeAttemptTime < Zt) {
|
|
7855
7867
|
R.debug(`Resume attempt from ${n} skipped (cooldown)`);
|
|
7856
7868
|
return;
|
|
7857
7869
|
}
|
|
@@ -8079,7 +8091,7 @@ class Zh {
|
|
|
8079
8091
|
* De-duplicates concurrent loading attempts for the same context.
|
|
8080
8092
|
*/
|
|
8081
8093
|
async ensureWorklet(e) {
|
|
8082
|
-
if (!
|
|
8094
|
+
if (!Cs(e))
|
|
8083
8095
|
throw new Error("AudioWorklet is not supported in this browser");
|
|
8084
8096
|
if (this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([Qh()], { type: "text/javascript" }))), this.workletReady && this.workletContext === e)
|
|
8085
8097
|
try {
|
|
@@ -8142,9 +8154,9 @@ class Zh {
|
|
|
8142
8154
|
s.source = p;
|
|
8143
8155
|
const d = o.createGain();
|
|
8144
8156
|
d.gain.value = 0, d.connect(o.destination), s.gain = d;
|
|
8145
|
-
const
|
|
8157
|
+
const _ = Pe() ? "sab" : "pcm";
|
|
8146
8158
|
let E;
|
|
8147
|
-
if (
|
|
8159
|
+
if (_ === "sab") {
|
|
8148
8160
|
const y = Math.floor(o.sampleRate * 10);
|
|
8149
8161
|
E = Hh.getStorageForCapacity(y, Float32Array);
|
|
8150
8162
|
}
|
|
@@ -8162,19 +8174,19 @@ class Zh {
|
|
|
8162
8174
|
...e.options,
|
|
8163
8175
|
preferWebCodecs: this.config.performance?.preferWebCodecs
|
|
8164
8176
|
},
|
|
8165
|
-
transport:
|
|
8177
|
+
transport: _,
|
|
8166
8178
|
sharedArrayBuffer: E
|
|
8167
8179
|
}), await new Promise((y, B) => {
|
|
8168
8180
|
const $ = setTimeout(() => {
|
|
8169
8181
|
u.removeEventListener("message", Re), B(new Error("Audio capture worker start timeout"));
|
|
8170
|
-
}, 1e4), Re = (
|
|
8171
|
-
const fe =
|
|
8182
|
+
}, 1e4), Re = (Ms) => {
|
|
8183
|
+
const fe = Ms.data;
|
|
8172
8184
|
if (fe?.type === "started" && fe.captureId === r)
|
|
8173
8185
|
clearTimeout($), u.removeEventListener("message", Re), y();
|
|
8174
8186
|
else if (fe?.type === "error" && fe.captureId === r) {
|
|
8175
8187
|
clearTimeout($), u.removeEventListener("message", Re);
|
|
8176
|
-
const
|
|
8177
|
-
B(new Error(
|
|
8188
|
+
const Ps = fe.error;
|
|
8189
|
+
B(new Error(Ps?.message ?? "Audio capture failed to start"));
|
|
8178
8190
|
}
|
|
8179
8191
|
};
|
|
8180
8192
|
u.addEventListener("message", Re);
|
|
@@ -8184,19 +8196,19 @@ class Zh {
|
|
|
8184
8196
|
numberOfOutputs: 1,
|
|
8185
8197
|
outputChannelCount: [1],
|
|
8186
8198
|
processorOptions: {
|
|
8187
|
-
transport:
|
|
8199
|
+
transport: _,
|
|
8188
8200
|
channels: 1,
|
|
8189
8201
|
sharedArrayBuffer: E
|
|
8190
8202
|
}
|
|
8191
8203
|
});
|
|
8192
|
-
s.worklet = C, p.connect(C), C.connect(d),
|
|
8204
|
+
s.worklet = C, p.connect(C), C.connect(d), _ === "pcm" && (C.port.onmessage = (y) => {
|
|
8193
8205
|
const B = y.data;
|
|
8194
8206
|
if (!(!B || typeof B != "object") && B.type === "pcm" && B.pcm instanceof Float32Array) {
|
|
8195
8207
|
const $ = B.pcm;
|
|
8196
8208
|
u.postMessage({ type: "pcm", captureId: r, pcm: $ }, [$.buffer]);
|
|
8197
8209
|
}
|
|
8198
8210
|
});
|
|
8199
|
-
const
|
|
8211
|
+
const k = this.extractDeviceId(e.constraints), I = {
|
|
8200
8212
|
captureId: r,
|
|
8201
8213
|
trackId: f,
|
|
8202
8214
|
stream: a,
|
|
@@ -8206,7 +8218,7 @@ class Zh {
|
|
|
8206
8218
|
worklet: C,
|
|
8207
8219
|
gain: d,
|
|
8208
8220
|
stopped: !1,
|
|
8209
|
-
intendedDeviceId:
|
|
8221
|
+
intendedDeviceId: k,
|
|
8210
8222
|
currentConstraints: c,
|
|
8211
8223
|
currentOptions: e.options ?? {},
|
|
8212
8224
|
healthCheckTimer: null,
|
|
@@ -8231,7 +8243,7 @@ class Zh {
|
|
|
8231
8243
|
I.stopped || u.postMessage({ type: "startSegment", captureId: r });
|
|
8232
8244
|
},
|
|
8233
8245
|
endSegment: () => {
|
|
8234
|
-
I.stopped || (u.postMessage({ type: "endSegment", captureId: r }),
|
|
8246
|
+
I.stopped || (u.postMessage({ type: "endSegment", captureId: r }), gs() && I.stop());
|
|
8235
8247
|
},
|
|
8236
8248
|
stop: async (y = "user") => {
|
|
8237
8249
|
if (!I.stopped) {
|
|
@@ -8492,9 +8504,9 @@ class Zh {
|
|
|
8492
8504
|
return !n || n.stopped ? !1 : this.attemptResumeAsync(n, "userGesture", !0);
|
|
8493
8505
|
}
|
|
8494
8506
|
}
|
|
8495
|
-
const Te = 1280, we = 720, qh = 30,
|
|
8507
|
+
const Te = 1280, we = 720, qh = 30, Ns = "image/jpeg", ef = 0.92;
|
|
8496
8508
|
async function tf(t, e) {
|
|
8497
|
-
const n = e.mime ??
|
|
8509
|
+
const n = e.mime ?? Ns, r = e.quality ?? ef;
|
|
8498
8510
|
if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
|
|
8499
8511
|
try {
|
|
8500
8512
|
return await t.convertToBlob({ type: n, quality: r });
|
|
@@ -8534,8 +8546,8 @@ class nf {
|
|
|
8534
8546
|
}
|
|
8535
8547
|
try {
|
|
8536
8548
|
await new Promise((m, S) => {
|
|
8537
|
-
const
|
|
8538
|
-
s.addEventListener("loadedmetadata",
|
|
8549
|
+
const _ = () => m(), E = () => S(new Error("Failed to load video element"));
|
|
8550
|
+
s.addEventListener("loadedmetadata", _, { once: !0 }), s.addEventListener("error", E, { once: !0 });
|
|
8539
8551
|
});
|
|
8540
8552
|
try {
|
|
8541
8553
|
await s.play();
|
|
@@ -8555,7 +8567,7 @@ class nf {
|
|
|
8555
8567
|
f.drawImage(s, 0, 0, a, c);
|
|
8556
8568
|
const p = await tf(l, e), d = await p.arrayBuffer();
|
|
8557
8569
|
return {
|
|
8558
|
-
mime: p.type || e.mime ||
|
|
8570
|
+
mime: p.type || e.mime || Ns,
|
|
8559
8571
|
width: a,
|
|
8560
8572
|
height: c,
|
|
8561
8573
|
data: new Uint8Array(d)
|
|
@@ -8726,7 +8738,7 @@ class af {
|
|
|
8726
8738
|
if (!i)
|
|
8727
8739
|
throw s.getTracks().forEach((h) => h.stop()), new Error("No video track available");
|
|
8728
8740
|
e.sourceType === "screen" && await new Promise((h) => setTimeout(h, 200));
|
|
8729
|
-
const o = i.getSettings(), a = e.sourceType === "screen" ? o.width ?? Te : e.options?.width ?? o.width ?? Te, c = e.sourceType === "screen" ? o.height ?? we : e.options?.height ?? o.height ?? we, l = of(), p = new l({ track: i }).readable, d = this.allocateTrackId(), m = this.ensureWorker(), S = e.sourceType,
|
|
8741
|
+
const o = i.getSettings(), a = e.sourceType === "screen" ? o.width ?? Te : e.options?.width ?? o.width ?? Te, c = e.sourceType === "screen" ? o.height ?? we : e.options?.height ?? o.height ?? we, l = of(), p = new l({ track: i }).readable, d = this.allocateTrackId(), m = this.ensureWorker(), S = e.sourceType, _ = e.onStopped;
|
|
8730
8742
|
m.postMessage(
|
|
8731
8743
|
{
|
|
8732
8744
|
type: "start",
|
|
@@ -8763,9 +8775,9 @@ class af {
|
|
|
8763
8775
|
s.getTracks().forEach((h) => h.stop());
|
|
8764
8776
|
} catch {
|
|
8765
8777
|
}
|
|
8766
|
-
if (m.postMessage({ type: "stop", captureId: r }),
|
|
8778
|
+
if (m.postMessage({ type: "stop", captureId: r }), _)
|
|
8767
8779
|
try {
|
|
8768
|
-
|
|
8780
|
+
_();
|
|
8769
8781
|
} catch {
|
|
8770
8782
|
}
|
|
8771
8783
|
}
|
|
@@ -8776,10 +8788,10 @@ class af {
|
|
|
8776
8788
|
const u = h.width !== void 0 && h.width !== E.currentOptions?.width, v = h.height !== void 0 && h.height !== E.currentOptions?.height, C = h.framerate !== void 0 && h.framerate !== E.currentOptions?.framerate;
|
|
8777
8789
|
if (u || v || C)
|
|
8778
8790
|
try {
|
|
8779
|
-
const
|
|
8780
|
-
h.width !== void 0 && (
|
|
8781
|
-
} catch (
|
|
8782
|
-
_e.warn(`Failed to apply camera constraints: ${
|
|
8791
|
+
const k = {};
|
|
8792
|
+
h.width !== void 0 && (k.width = { ideal: h.width }), h.height !== void 0 && (k.height = { ideal: h.height }), h.framerate !== void 0 && (k.frameRate = { ideal: h.framerate }), await i.applyConstraints(k), _e.info(`Camera track constraints updated: ${h.width}x${h.height}@${h.framerate}fps`);
|
|
8793
|
+
} catch (k) {
|
|
8794
|
+
_e.warn(`Failed to apply camera constraints: ${k}`);
|
|
8783
8795
|
}
|
|
8784
8796
|
}
|
|
8785
8797
|
E.currentOptions = h, m.postMessage({ type: "updateOptions", captureId: r, options: h });
|
|
@@ -8793,12 +8805,12 @@ class af {
|
|
|
8793
8805
|
E.dimensionCheckInterval && (clearInterval(E.dimensionCheckInterval), E.dimensionCheckInterval = void 0);
|
|
8794
8806
|
return;
|
|
8795
8807
|
}
|
|
8796
|
-
const v = i.getSettings(), C = v.width ?? h,
|
|
8797
|
-
(C !== h ||
|
|
8808
|
+
const v = i.getSettings(), C = v.width ?? h, k = v.height ?? u;
|
|
8809
|
+
(C !== h || k !== u) && (h = C, u = k, m.postMessage({
|
|
8798
8810
|
type: "updateDimensions",
|
|
8799
8811
|
captureId: r,
|
|
8800
8812
|
width: C,
|
|
8801
|
-
height:
|
|
8813
|
+
height: k
|
|
8802
8814
|
}));
|
|
8803
8815
|
}, 1e3);
|
|
8804
8816
|
}
|
|
@@ -8853,16 +8865,16 @@ class cf {
|
|
|
8853
8865
|
this.audio.dispose(), this.video.dispose();
|
|
8854
8866
|
}
|
|
8855
8867
|
}
|
|
8856
|
-
const
|
|
8868
|
+
const ks = L("DebugMode");
|
|
8857
8869
|
let re = !1;
|
|
8858
8870
|
function lf() {
|
|
8859
|
-
return re = Zd(), re && (
|
|
8871
|
+
return re = Zd(), re && (us(He.DEBUG), ks.warn("Debug mode enabled")), re;
|
|
8860
8872
|
}
|
|
8861
8873
|
function uf() {
|
|
8862
8874
|
return re;
|
|
8863
8875
|
}
|
|
8864
8876
|
function df() {
|
|
8865
|
-
re || (re = !0,
|
|
8877
|
+
re || (re = !0, us(He.DEBUG), ks.warn("Debug mode enabled"), zd(Ts, "true"));
|
|
8866
8878
|
}
|
|
8867
8879
|
function hf(t) {
|
|
8868
8880
|
return new Worker(
|
|
@@ -8873,12 +8885,12 @@ function hf(t) {
|
|
|
8873
8885
|
}
|
|
8874
8886
|
);
|
|
8875
8887
|
}
|
|
8876
|
-
const
|
|
8888
|
+
const qt = {
|
|
8877
8889
|
[b.WebTransport]: 0,
|
|
8878
8890
|
[b.WebSocket]: 1,
|
|
8879
8891
|
[b.WebTransportProxy]: 2,
|
|
8880
8892
|
[b.WebSocketProxy]: 3
|
|
8881
|
-
}, Xe = /* @__PURE__ */ new Set([b.WebTransportProxy, b.WebSocketProxy]), Je = /* @__PURE__ */ new Set([b.WebTransport, b.WebSocket]),
|
|
8893
|
+
}, Xe = /* @__PURE__ */ new Set([b.WebTransportProxy, b.WebSocketProxy]), Je = /* @__PURE__ */ new Set([b.WebTransport, b.WebSocket]), en = /* @__PURE__ */ new Set([b.WebSocket, b.WebSocketProxy]), tn = /* @__PURE__ */ new Set([b.WebTransport, b.WebTransportProxy]), Qe = "ikon_endpoint_type", Oe = "ikon_proxy_preferred";
|
|
8882
8894
|
class ff {
|
|
8883
8895
|
isLocal;
|
|
8884
8896
|
_proxyMode;
|
|
@@ -8917,7 +8929,7 @@ class ff {
|
|
|
8917
8929
|
let r;
|
|
8918
8930
|
this._proxyMode === "force-proxy" ? r = n.filter((i) => Xe.has(i)) : this._proxyMode === "force-direct" ? r = n.filter((i) => Je.has(i)) : r = n, r = this.filterByTransport(r);
|
|
8919
8931
|
const s = [...r].sort((i, o) => {
|
|
8920
|
-
const a =
|
|
8932
|
+
const a = qt[i] ?? 999, c = qt[o] ?? 999;
|
|
8921
8933
|
return a - c;
|
|
8922
8934
|
});
|
|
8923
8935
|
if (this._proxyMode === "auto" && this._proxyPreferred) {
|
|
@@ -8972,7 +8984,7 @@ class ff {
|
|
|
8972
8984
|
}
|
|
8973
8985
|
filterByTransport(e) {
|
|
8974
8986
|
const n = this._websocket, r = this._webtransport;
|
|
8975
|
-
return n === void 0 && r === void 0 || n === !0 && r === !0 ? e : e.filter((s) => n === !0 && r === void 0 ?
|
|
8987
|
+
return n === void 0 && r === void 0 || n === !0 && r === !0 ? e : e.filter((s) => n === !0 && r === void 0 ? en.has(s) : r === !0 && n === void 0 ? tn.has(s) : n === !1 ? !en.has(s) : r === !1 ? !tn.has(s) : !0);
|
|
8976
8988
|
}
|
|
8977
8989
|
loadRememberedType() {
|
|
8978
8990
|
try {
|
|
@@ -8991,7 +9003,7 @@ class ff {
|
|
|
8991
9003
|
}
|
|
8992
9004
|
}
|
|
8993
9005
|
}
|
|
8994
|
-
const
|
|
9006
|
+
const T = L("IkonClient");
|
|
8995
9007
|
function pf() {
|
|
8996
9008
|
return typeof __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__ < "u" && __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__;
|
|
8997
9009
|
}
|
|
@@ -9122,20 +9134,20 @@ class xf {
|
|
|
9122
9134
|
return this._webRtcSignaling;
|
|
9123
9135
|
}
|
|
9124
9136
|
constructor(e) {
|
|
9125
|
-
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ??
|
|
9137
|
+
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? Yu, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? ju;
|
|
9126
9138
|
const n = [e.local, e.apiKey, e.sessionToken].filter(Boolean).length;
|
|
9127
9139
|
if (n === 0)
|
|
9128
9140
|
throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
|
|
9129
9141
|
if (n > 1)
|
|
9130
9142
|
throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
|
|
9131
|
-
je() &&
|
|
9143
|
+
je() && Xu();
|
|
9132
9144
|
const r = e.local ? null : Xd(), s = r === !0 ? "force-proxy" : r === !1 ? "force-direct" : "auto", i = e.local ? null : Jd(), o = e.local ? null : Qd(), a = i ?? e.websocket, c = o ?? e.webtransport;
|
|
9133
9145
|
this.endpointSelector = new ff({
|
|
9134
9146
|
local: e.local,
|
|
9135
9147
|
proxyMode: s,
|
|
9136
9148
|
websocket: a,
|
|
9137
9149
|
webtransport: c
|
|
9138
|
-
}), s !== "auto" ?
|
|
9150
|
+
}), s !== "auto" ? T.info(`Proxy mode: ${s}`) : this.endpointSelector.proxyPreferred && T.info("Proxy preferred (from previous session)"), (a !== void 0 || c !== void 0) && T.info(`Transport filter: websocket=${a ?? "auto"}, webtransport=${c ?? "auto"}`), this._functionRegistry = new ch(), je() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Rd(this._functionRegistry), this.unregisterSoundFunctions = gh(this._functionRegistry));
|
|
9139
9151
|
const l = eh(), f = th(), p = nh();
|
|
9140
9152
|
this._audioEnabled = l ?? e.audio?.enabled ?? !0, this._videoEnabled = f ?? e.video?.enabled ?? !0;
|
|
9141
9153
|
const d = e.audio ? {
|
|
@@ -9196,14 +9208,14 @@ class xf {
|
|
|
9196
9208
|
this.setupLifecycleHandlers();
|
|
9197
9209
|
const e = qd();
|
|
9198
9210
|
if (e) {
|
|
9199
|
-
|
|
9211
|
+
T.info("Found external connect URL in query parameter"), await this.executeConnection(() => We(e, this.abortController.signal));
|
|
9200
9212
|
return;
|
|
9201
9213
|
}
|
|
9202
9214
|
if (this._waitForExternalConnectUrl) {
|
|
9203
|
-
|
|
9215
|
+
T.info("Waiting for external connect URL from parent window"), this.setState("waitingForExternalConnectUrl"), this._externalConnectUrlCleanup = this.setupExternalConnectUrlListener();
|
|
9204
9216
|
return;
|
|
9205
9217
|
}
|
|
9206
|
-
|
|
9218
|
+
T.info("Connecting to Ikon server"), await this.executeConnection(() => this.authenticate());
|
|
9207
9219
|
}
|
|
9208
9220
|
/**
|
|
9209
9221
|
* Execute the connection flow with the provided authentication function.
|
|
@@ -9212,28 +9224,28 @@ class xf {
|
|
|
9212
9224
|
this._lastError = void 0, this.abortController = new AbortController(), this.setState("connecting"), this.slowConnectionTimer = setTimeout(() => {
|
|
9213
9225
|
this.currentState === "connecting" && this.setState("connectingSlow");
|
|
9214
9226
|
}, this.slowConnectionThresholdMs), this.connectionTimer = setTimeout(() => {
|
|
9215
|
-
(this.currentState === "connecting" || this.currentState === "connectingSlow") && (
|
|
9227
|
+
(this.currentState === "connecting" || this.currentState === "connectingSlow") && (T.error("Connection timeout"), this.abortController?.abort(), this.setState("offline"), this.config.onError?.(new Error("Connection timeout")));
|
|
9216
9228
|
}, this.connectionTimeoutMs);
|
|
9217
9229
|
try {
|
|
9218
9230
|
const n = await e();
|
|
9219
|
-
this.authResponse = n.authResponse, this._sessionId = n.authResponse.ClientContext.SessionId,
|
|
9231
|
+
this.authResponse = n.authResponse, this._sessionId = n.authResponse.ClientContext.SessionId, T.info("Authenticated to Ikon server"), await this.connectProtocol(this.authResponse.Entrypoints);
|
|
9220
9232
|
} catch (n) {
|
|
9221
9233
|
if (n instanceof DOMException && n.name === "AbortError")
|
|
9222
9234
|
return;
|
|
9223
|
-
throw
|
|
9235
|
+
throw T.error("Connection failed:", n), this.clearTimers(), this.setState("offline"), this.config.onError?.(n instanceof Error ? n : new Error(String(n))), n;
|
|
9224
9236
|
}
|
|
9225
9237
|
}
|
|
9226
9238
|
/**
|
|
9227
9239
|
* Disconnect from the server.
|
|
9228
9240
|
*/
|
|
9229
9241
|
disconnect() {
|
|
9230
|
-
|
|
9242
|
+
T.info("Disconnecting from Ikon server"), this.clearTimers(), this.cleanupLifecycleHandlers(), this._externalConnectUrlCleanup && (this._externalConnectUrlCleanup(), this._externalConnectUrlCleanup = null), this._mediaCapture?.dispose(), this.unregisterMediaCaptureFunctions && (this.unregisterMediaCaptureFunctions(), this.unregisterMediaCaptureFunctions = null), this.unregisterSoundFunctions && (this.unregisterSoundFunctions(), this.unregisterSoundFunctions = null), this.unregisterBrowserFunctions && (this.unregisterBrowserFunctions(), this.unregisterBrowserFunctions = null), this.abortController?.abort(), this.abortController = null, this._fullReauthAttempted = !1, this._reauthInProgress = !1, this.releaseKeepaliveLock(), this.disconnectProtocol(), this.authResponse = null, this._sessionId = void 0, this._globalState = null, this._globalStateReceived = !1, this._channelsConnected = !1, this._joinedHandled = !1, this._environmentTrackingSetup = !1;
|
|
9231
9243
|
for (const e of this._webRtcAudioElements.values())
|
|
9232
9244
|
e.srcObject = null, e.remove();
|
|
9233
9245
|
this._webRtcAudioElements.clear(), this._webRtcAudioStreams.clear(), this._webRtcVideoStreams.clear(), this._webRtcTrackMap.clear(), this.removeWebRtcAudioUnlockHandler(), this._webRtcMediaSession.cleanup(), this._functionRegistry.detach(), this.setState("idle");
|
|
9234
9246
|
}
|
|
9235
9247
|
sendActionCall(e, n) {
|
|
9236
|
-
const r =
|
|
9248
|
+
const r = Js(
|
|
9237
9249
|
{
|
|
9238
9250
|
ActionId: w.fromString(e),
|
|
9239
9251
|
PayloadJson: n ?? "{}"
|
|
@@ -9247,7 +9259,7 @@ class xf {
|
|
|
9247
9259
|
* Routes to appropriate channel based on the message's opcode group.
|
|
9248
9260
|
*/
|
|
9249
9261
|
sendProtocolMessage(e) {
|
|
9250
|
-
if (e.length > 26 && (e[26] &
|
|
9262
|
+
if (e.length > 26 && (e[26] & on.Unreliable) !== 0 && this._webRtcSignaling?.isDataChannelOpen) {
|
|
9251
9263
|
const n = new Uint8Array(e).buffer;
|
|
9252
9264
|
this._webRtcSignaling.sendDataChannelMessage(n);
|
|
9253
9265
|
return;
|
|
@@ -9261,7 +9273,7 @@ class xf {
|
|
|
9261
9273
|
this.channelManager.sendProtocolMessage(e);
|
|
9262
9274
|
return;
|
|
9263
9275
|
}
|
|
9264
|
-
|
|
9276
|
+
T.warn("Cannot send: not connected");
|
|
9265
9277
|
}
|
|
9266
9278
|
/**
|
|
9267
9279
|
* Send a client context update to the server.
|
|
@@ -9269,11 +9281,11 @@ class xf {
|
|
|
9269
9281
|
*/
|
|
9270
9282
|
sendUpdateClientContext(e) {
|
|
9271
9283
|
if (!this._sessionId) {
|
|
9272
|
-
|
|
9284
|
+
T.warn("Cannot send UpdateClientContext: not connected");
|
|
9273
9285
|
return;
|
|
9274
9286
|
}
|
|
9275
|
-
const n =
|
|
9276
|
-
|
|
9287
|
+
const n = gl(
|
|
9288
|
+
_l({
|
|
9277
9289
|
ViewportWidth: e.viewportWidth ?? 0,
|
|
9278
9290
|
ViewportHeight: e.viewportHeight ?? 0,
|
|
9279
9291
|
Theme: e.theme ?? "",
|
|
@@ -9378,7 +9390,7 @@ class xf {
|
|
|
9378
9390
|
return;
|
|
9379
9391
|
this.channelManager?.sendProtocolMessage(c);
|
|
9380
9392
|
} catch (c) {
|
|
9381
|
-
|
|
9393
|
+
T.warn(`Failed to forward protocol send port message: ${c}`);
|
|
9382
9394
|
}
|
|
9383
9395
|
};
|
|
9384
9396
|
try {
|
|
@@ -9456,10 +9468,10 @@ class xf {
|
|
|
9456
9468
|
this.notifyMessageSubscribers(e, n, r);
|
|
9457
9469
|
return;
|
|
9458
9470
|
}
|
|
9459
|
-
n === g.CORE_GLOBAL_STATE &&
|
|
9471
|
+
n === g.CORE_GLOBAL_STATE && kc(e).then((s) => {
|
|
9460
9472
|
this._globalState = s, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(s, this._sessionId), this._globalState.DebugMode && df(), uf() && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
|
|
9461
9473
|
}).catch((s) => {
|
|
9462
|
-
|
|
9474
|
+
T.error("Failed to parse GlobalState:", s);
|
|
9463
9475
|
}), this.notifyMessageSubscribers(e, n, r);
|
|
9464
9476
|
}
|
|
9465
9477
|
handleDataChannelMessage(e) {
|
|
@@ -9467,7 +9479,7 @@ class xf {
|
|
|
9467
9479
|
const n = new Uint8Array(e);
|
|
9468
9480
|
this.handleProtocolMessage(n);
|
|
9469
9481
|
} catch (n) {
|
|
9470
|
-
|
|
9482
|
+
T.warn("Failed to parse DataChannel message:", n);
|
|
9471
9483
|
}
|
|
9472
9484
|
}
|
|
9473
9485
|
/**
|
|
@@ -9491,7 +9503,7 @@ class xf {
|
|
|
9491
9503
|
}
|
|
9492
9504
|
s[a](e);
|
|
9493
9505
|
} catch (l) {
|
|
9494
|
-
|
|
9506
|
+
T.error("Message subscriber error:", l);
|
|
9495
9507
|
}
|
|
9496
9508
|
}
|
|
9497
9509
|
}
|
|
@@ -9508,7 +9520,7 @@ class xf {
|
|
|
9508
9520
|
this.currentState === "connected" && (this._channelsConnected = !1, this._globalStateReceived = !1, this._joinedHandled = !1, this._functionRegistry.detach(), this.releaseKeepaliveLock(), this.setState("reconnecting"));
|
|
9509
9521
|
break;
|
|
9510
9522
|
case "stopped":
|
|
9511
|
-
|
|
9523
|
+
T.info("Ikon server has stopped"), this.clearTimers(), this.setState("offline");
|
|
9512
9524
|
break;
|
|
9513
9525
|
case "offline":
|
|
9514
9526
|
if (this._reauthInProgress)
|
|
@@ -9541,7 +9553,7 @@ class xf {
|
|
|
9541
9553
|
try {
|
|
9542
9554
|
n(e);
|
|
9543
9555
|
} catch (r) {
|
|
9544
|
-
|
|
9556
|
+
T.error("State subscriber error:", r);
|
|
9545
9557
|
}
|
|
9546
9558
|
this.config.onConnectionStateChange?.(e);
|
|
9547
9559
|
}
|
|
@@ -9551,7 +9563,7 @@ class xf {
|
|
|
9551
9563
|
* Use this for unrecoverable SDK internal errors.
|
|
9552
9564
|
*/
|
|
9553
9565
|
setErrorState(e) {
|
|
9554
|
-
|
|
9566
|
+
T.error("SDK error, going offline:", e), this._lastError = e, this.clearTimers(), this.cleanupLifecycleHandlers(), this.disconnectProtocol(), this.currentState = "offlineError", this.config.onConnectionStateChange?.("offlineError"), this.config.onError?.(e);
|
|
9555
9567
|
}
|
|
9556
9568
|
async connectProtocol(e, n = !1) {
|
|
9557
9569
|
if (typeof Worker > "u") {
|
|
@@ -9562,14 +9574,14 @@ class xf {
|
|
|
9562
9574
|
try {
|
|
9563
9575
|
r = new hf();
|
|
9564
9576
|
} catch (p) {
|
|
9565
|
-
|
|
9577
|
+
T.warn(`Failed to create protocol worker, falling back to main thread: ${p}`), await this.connectProtocolOnMainThread(e, n);
|
|
9566
9578
|
return;
|
|
9567
9579
|
}
|
|
9568
9580
|
this.channelManager = null, this.protocolWorker = r, this.workerManagerState = "idle";
|
|
9569
9581
|
const s = new Promise((p, d) => {
|
|
9570
9582
|
let m = !1;
|
|
9571
|
-
const S = (
|
|
9572
|
-
const E =
|
|
9583
|
+
const S = (_) => {
|
|
9584
|
+
const E = _.data;
|
|
9573
9585
|
if (E?.type === "protocol" && E.message instanceof ArrayBuffer) {
|
|
9574
9586
|
const h = new Uint8Array(E.message);
|
|
9575
9587
|
this.handleProtocolMessage(h);
|
|
@@ -9587,10 +9599,10 @@ class xf {
|
|
|
9587
9599
|
u.name = String(h?.name ?? "Error"), d(u);
|
|
9588
9600
|
}
|
|
9589
9601
|
};
|
|
9590
|
-
r.addEventListener("message", S), r.addEventListener("error", (
|
|
9591
|
-
const E = [
|
|
9602
|
+
r.addEventListener("message", S), r.addEventListener("error", (_) => {
|
|
9603
|
+
const E = [_.message, _.filename, _.lineno, _.colno].filter((h) => h != null && String(h).length > 0);
|
|
9592
9604
|
if (m) {
|
|
9593
|
-
|
|
9605
|
+
T.error("Protocol worker crashed after connect"), this.workerManagerState = "offline", this.handleChannelManagerStateChange("offline");
|
|
9594
9606
|
return;
|
|
9595
9607
|
}
|
|
9596
9608
|
d(new Error(`Protocol worker failed: ${E.join(" ")}`.trim()));
|
|
@@ -9612,7 +9624,7 @@ class xf {
|
|
|
9612
9624
|
try {
|
|
9613
9625
|
await s;
|
|
9614
9626
|
} catch (p) {
|
|
9615
|
-
|
|
9627
|
+
T.warn(`Protocol worker connect failed, falling back to main thread: ${p}`), this.disconnectProtocol(), await this.connectProtocolOnMainThread(e, n);
|
|
9616
9628
|
}
|
|
9617
9629
|
f && (this._audioEnabled || this._videoEnabled) && await this.setupWebRtcSignaling();
|
|
9618
9630
|
}
|
|
@@ -9654,17 +9666,17 @@ class xf {
|
|
|
9654
9666
|
this.onWebRtcTrackMapChanged?.(s);
|
|
9655
9667
|
}
|
|
9656
9668
|
};
|
|
9657
|
-
this._webRtcSignaling = new
|
|
9669
|
+
this._webRtcSignaling = new Ku(n);
|
|
9658
9670
|
try {
|
|
9659
9671
|
await this._webRtcSignaling.connect((r) => {
|
|
9660
9672
|
this.sendProtocolMessage(r);
|
|
9661
|
-
}),
|
|
9673
|
+
}), T.debug("WebRTC signaling started");
|
|
9662
9674
|
} catch (r) {
|
|
9663
|
-
|
|
9675
|
+
T.error("Failed to setup WebRTC signaling:", r), this._webRtcSignaling = null;
|
|
9664
9676
|
}
|
|
9665
9677
|
}
|
|
9666
9678
|
_webRtcAudioUnlockHandler = null;
|
|
9667
|
-
_webRtcMediaSession = new
|
|
9679
|
+
_webRtcMediaSession = new ys();
|
|
9668
9680
|
playWebRtcAudioTrack(e, n) {
|
|
9669
9681
|
if (typeof document > "u")
|
|
9670
9682
|
return;
|
|
@@ -9672,14 +9684,14 @@ class xf {
|
|
|
9672
9684
|
r && (r.srcObject = null, r.remove());
|
|
9673
9685
|
const s = document.createElement("audio");
|
|
9674
9686
|
s.autoplay = !0, s.srcObject = n, this._webRtcAudioElements.set(e, s), s.play().then(() => {
|
|
9675
|
-
|
|
9687
|
+
T.debug(`WebRTC audio track ${e} playing`), e === 0 && this.setupWebRtcMediaSession();
|
|
9676
9688
|
}).catch(() => {
|
|
9677
|
-
if (
|
|
9689
|
+
if (T.debug(`WebRTC audio track ${e} autoplay blocked, waiting for user interaction`), !this._webRtcAudioUnlockHandler) {
|
|
9678
9690
|
const i = () => {
|
|
9679
9691
|
let o = !0;
|
|
9680
9692
|
for (const [a, c] of this._webRtcAudioElements)
|
|
9681
9693
|
c.play().then(() => {
|
|
9682
|
-
|
|
9694
|
+
T.debug(`WebRTC audio track ${a} playing (after user interaction)`);
|
|
9683
9695
|
}).catch(() => {
|
|
9684
9696
|
o = !1;
|
|
9685
9697
|
});
|
|
@@ -9713,7 +9725,7 @@ class xf {
|
|
|
9713
9725
|
async connectProtocolOnMainThread(e, n = !1) {
|
|
9714
9726
|
this.workerManagerState = null, this.protocolWorker = null;
|
|
9715
9727
|
const r = this.config.webRtc?.enabled ?? !1;
|
|
9716
|
-
|
|
9728
|
+
T.info(`Connecting on main thread (webRtcEnabled=${r}, entrypoints=${e.length})`), this.channelManager = new Uu({
|
|
9717
9729
|
sessionId: this._sessionId,
|
|
9718
9730
|
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? xt,
|
|
9719
9731
|
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? Wt,
|
|
@@ -9788,20 +9800,20 @@ class xf {
|
|
|
9788
9800
|
return !(this._waitForExternalConnectUrl || !this.config.local && !this.config.apiKey && !this.config.sessionToken || !this.abortController || this.abortController.signal.aborted);
|
|
9789
9801
|
}
|
|
9790
9802
|
async attemptFullReauth() {
|
|
9791
|
-
this._fullReauthAttempted = !0, this._reauthInProgress = !0,
|
|
9803
|
+
this._fullReauthAttempted = !0, this._reauthInProgress = !0, T.info("Fast reconnect exhausted, attempting full re-authentication"), this.endpointSelector.clearRememberedType(), this.disconnectProtocol(), this._channelsConnected = !1, this._globalStateReceived = !1, this._joinedHandled = !1;
|
|
9792
9804
|
try {
|
|
9793
9805
|
const e = await this.authenticate();
|
|
9794
|
-
this.authResponse = e.authResponse, this._sessionId = e.authResponse.ClientContext.SessionId,
|
|
9806
|
+
this.authResponse = e.authResponse, this._sessionId = e.authResponse.ClientContext.SessionId, T.info("Re-authenticated, connecting to new server"), await this.connectProtocol(this.authResponse.Entrypoints);
|
|
9795
9807
|
} catch (e) {
|
|
9796
9808
|
if (e instanceof DOMException && e.name === "AbortError")
|
|
9797
9809
|
return;
|
|
9798
|
-
|
|
9810
|
+
T.error("Full re-authentication failed:", e), this.clearTimers(), this.setState("offline"), this.config.onError?.(e instanceof Error ? e : new Error(String(e)));
|
|
9799
9811
|
} finally {
|
|
9800
9812
|
this._reauthInProgress = !1;
|
|
9801
9813
|
}
|
|
9802
9814
|
}
|
|
9803
9815
|
attemptReconnectOnVisible() {
|
|
9804
|
-
this.currentState === "offline" && (this._reauthInProgress || this.canAttemptFullReauth() && (
|
|
9816
|
+
this.currentState === "offline" && (this._reauthInProgress || this.canAttemptFullReauth() && (T.info("Page became visible while offline, attempting reconnection"), this._fullReauthAttempted = !1, this._channelsConnected = !1, this._globalStateReceived = !1, this._joinedHandled = !1, this.setState("reconnecting"), this.disconnectProtocol(), this.authResponse ? this.connectProtocol(this.authResponse.Entrypoints, !0) : this.attemptFullReauth()));
|
|
9805
9817
|
}
|
|
9806
9818
|
/**
|
|
9807
9819
|
* Clear all timers.
|
|
@@ -9826,14 +9838,14 @@ class xf {
|
|
|
9826
9838
|
* Close connection cleanly to avoid orphaned connections on the server.
|
|
9827
9839
|
*/
|
|
9828
9840
|
handleBeforeUnload() {
|
|
9829
|
-
|
|
9841
|
+
T.debug("Page unloading, closing connection..."), this.disconnect();
|
|
9830
9842
|
}
|
|
9831
9843
|
/**
|
|
9832
9844
|
* Handle page hide event (mobile-friendly, bfcache compatible).
|
|
9833
9845
|
* Only disconnect if page is actually being unloaded (not persisted).
|
|
9834
9846
|
*/
|
|
9835
9847
|
handlePageHide(e) {
|
|
9836
|
-
e.persisted || (
|
|
9848
|
+
e.persisted || (T.debug("Page hidden (not persisted), closing connection..."), this.disconnect());
|
|
9837
9849
|
}
|
|
9838
9850
|
/**
|
|
9839
9851
|
* Handle visibility change event.
|
|
@@ -9850,8 +9862,8 @@ class xf {
|
|
|
9850
9862
|
handlePopstate() {
|
|
9851
9863
|
if (!this._sessionId)
|
|
9852
9864
|
return;
|
|
9853
|
-
const e = window.location.pathname + window.location.search, n =
|
|
9854
|
-
|
|
9865
|
+
const e = window.location.pathname + window.location.search, n = ai(
|
|
9866
|
+
ri({ Path: e }),
|
|
9855
9867
|
this._sessionId
|
|
9856
9868
|
);
|
|
9857
9869
|
this.sendProtocolMessage(n);
|
|
@@ -9862,10 +9874,10 @@ class xf {
|
|
|
9862
9874
|
*/
|
|
9863
9875
|
checkConnectionHealth() {
|
|
9864
9876
|
if (this.protocolWorker) {
|
|
9865
|
-
this.currentState === "connected" && this.workerManagerState !== "connected" && (
|
|
9877
|
+
this.currentState === "connected" && this.workerManagerState !== "connected" && (T.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
|
|
9866
9878
|
return;
|
|
9867
9879
|
}
|
|
9868
|
-
this.channelManager && this.currentState === "connected" && this.channelManager.managerState !== "connected" && (
|
|
9880
|
+
this.channelManager && this.currentState === "connected" && this.channelManager.managerState !== "connected" && (T.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
|
|
9869
9881
|
}
|
|
9870
9882
|
/**
|
|
9871
9883
|
* Try to handle joined state - only proceeds if both channels are connected and GlobalState is received.
|
|
@@ -9886,7 +9898,7 @@ class xf {
|
|
|
9886
9898
|
const e = Pt(Mt(), this._sessionId ?? 0);
|
|
9887
9899
|
this.sendProtocolMessage(e);
|
|
9888
9900
|
} catch (e) {
|
|
9889
|
-
|
|
9901
|
+
T.error("onJoined callback error:", e);
|
|
9890
9902
|
const n = Pt(Mt(), this._sessionId ?? 0);
|
|
9891
9903
|
this.sendProtocolMessage(n);
|
|
9892
9904
|
}
|
|
@@ -9922,17 +9934,17 @@ class xf {
|
|
|
9922
9934
|
*/
|
|
9923
9935
|
setupExternalConnectUrlListener() {
|
|
9924
9936
|
const e = (n) => {
|
|
9925
|
-
n.data?.type === "IKON_EXTERNAL_CONNECT_URL" && typeof n.data.serverUrl == "string" && (
|
|
9926
|
-
|
|
9937
|
+
n.data?.type === "IKON_EXTERNAL_CONNECT_URL" && typeof n.data.serverUrl == "string" && (T.info("Received external connect URL from parent window"), this.handleExternalConnectUrl(n.data.serverUrl).catch((r) => {
|
|
9938
|
+
T.error("Failed to connect with external connect URL:", r), this.config.onError?.(r instanceof Error ? r : new Error(String(r))), this.setState("offlineError");
|
|
9927
9939
|
}));
|
|
9928
9940
|
};
|
|
9929
|
-
if (window.addEventListener("message", e),
|
|
9941
|
+
if (window.addEventListener("message", e), T.debug("External connect URL listener registered"), window.parent && window.parent !== window)
|
|
9930
9942
|
try {
|
|
9931
|
-
window.parent.postMessage({ type: "IKON_CLIENT_READY_FOR_CONNECT_URL" }, "*"),
|
|
9943
|
+
window.parent.postMessage({ type: "IKON_CLIENT_READY_FOR_CONNECT_URL" }, "*"), T.debug("Posted IKON_CLIENT_READY_FOR_CONNECT_URL to parent window");
|
|
9932
9944
|
} catch {
|
|
9933
9945
|
}
|
|
9934
9946
|
return () => {
|
|
9935
|
-
window.removeEventListener("message", e),
|
|
9947
|
+
window.removeEventListener("message", e), T.debug("External connect URL listener removed");
|
|
9936
9948
|
};
|
|
9937
9949
|
}
|
|
9938
9950
|
/**
|
|
@@ -9941,7 +9953,7 @@ class xf {
|
|
|
9941
9953
|
async handleExternalConnectUrl(e) {
|
|
9942
9954
|
if (this.currentState !== "waitingForExternalConnectUrl")
|
|
9943
9955
|
throw new Error(`Cannot connect with external connect URL: already in state ${this.currentState}`);
|
|
9944
|
-
|
|
9956
|
+
T.info("Connecting with external connect URL");
|
|
9945
9957
|
try {
|
|
9946
9958
|
await this.executeConnection(() => We(e, this.abortController.signal));
|
|
9947
9959
|
} finally {
|
|
@@ -9961,19 +9973,19 @@ function Vf(t) {
|
|
|
9961
9973
|
function Hf(t) {
|
|
9962
9974
|
return t === "offlineError";
|
|
9963
9975
|
}
|
|
9964
|
-
const
|
|
9976
|
+
const Ds = /* @__PURE__ */ new Map();
|
|
9965
9977
|
for (const [t, e] of Object.entries(g))
|
|
9966
|
-
typeof e == "number" &&
|
|
9978
|
+
typeof e == "number" && Ds.set(e, t);
|
|
9967
9979
|
function $f(t) {
|
|
9968
|
-
return
|
|
9980
|
+
return Ds.get(t) ?? `UNKNOWN_${t}`;
|
|
9969
9981
|
}
|
|
9970
|
-
const
|
|
9971
|
-
let H = [], lt =
|
|
9982
|
+
const vs = 1e3, Us = He.INFO;
|
|
9983
|
+
let H = [], lt = vs, Os = Us, ut = null;
|
|
9972
9984
|
function mf(t) {
|
|
9973
|
-
t.level <
|
|
9985
|
+
t.level < Os || (H.push(t), H.length > lt && (H = H.slice(-lt)));
|
|
9974
9986
|
}
|
|
9975
9987
|
function Ef(t) {
|
|
9976
|
-
lt = t?.maxBufferSize ??
|
|
9988
|
+
lt = t?.maxBufferSize ?? vs, Os = t?.minLevel ?? Us, H = [], yu(mf);
|
|
9977
9989
|
}
|
|
9978
9990
|
function Kf(t) {
|
|
9979
9991
|
ut = t;
|
|
@@ -9999,9 +10011,9 @@ function Xf() {
|
|
|
9999
10011
|
}
|
|
10000
10012
|
Ef();
|
|
10001
10013
|
export {
|
|
10002
|
-
|
|
10003
|
-
|
|
10004
|
-
|
|
10014
|
+
N as AuthenticationError,
|
|
10015
|
+
vu as Channel,
|
|
10016
|
+
Uu as ChannelManager,
|
|
10005
10017
|
Tf as ChannelNotFoundError,
|
|
10006
10018
|
ne as ClientType,
|
|
10007
10019
|
St as ConnectionError,
|
|
@@ -10016,7 +10028,7 @@ export {
|
|
|
10016
10028
|
ot as IKON_BACKEND_URL_DEV,
|
|
10017
10029
|
it as IKON_BACKEND_URL_PROD,
|
|
10018
10030
|
Kd as IKON_PARAM_AUDIO,
|
|
10019
|
-
|
|
10031
|
+
Ts as IKON_PARAM_DEBUG,
|
|
10020
10032
|
Ff as IKON_PARAM_GIT_BRANCH,
|
|
10021
10033
|
Lf as IKON_PARAM_GIT_SOURCE,
|
|
10022
10034
|
Hd as IKON_PARAM_LANG,
|
|
@@ -10036,31 +10048,31 @@ export {
|
|
|
10036
10048
|
Gh as IkonVideoPlayback,
|
|
10037
10049
|
gt as KeepaliveTimeoutError,
|
|
10038
10050
|
He as LogLevel,
|
|
10039
|
-
|
|
10051
|
+
gu as MaxRetriesExceededError,
|
|
10040
10052
|
Sf as NoChannelsError,
|
|
10041
10053
|
g as Opcode,
|
|
10042
|
-
|
|
10054
|
+
Cu as ProvisioningTimeoutError,
|
|
10043
10055
|
wf as SpaceNotFoundError,
|
|
10044
10056
|
Z as TransportError,
|
|
10045
10057
|
he as UserType,
|
|
10046
10058
|
Nf as WEBRTC_AUDIO_BITRATE,
|
|
10047
10059
|
bf as WEBRTC_AUDIO_CHANNELS,
|
|
10048
10060
|
Af as WEBRTC_AUDIO_CODEC,
|
|
10049
|
-
|
|
10061
|
+
Ou as WEBRTC_AUDIO_JITTER_BUFFER_TARGET_MS,
|
|
10050
10062
|
Rf as WEBRTC_AUDIO_SAMPLE_RATE,
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10063
|
+
Lu as WEBRTC_BUNDLE_POLICY,
|
|
10064
|
+
Gu as WEBRTC_DATA_CHANNEL_LABEL,
|
|
10065
|
+
Hu as WEBRTC_DATA_CHANNEL_MAX_RETRANSMITS,
|
|
10066
|
+
Vu as WEBRTC_DATA_CHANNEL_ORDERED,
|
|
10067
|
+
Bu as WEBRTC_ICE_SERVERS,
|
|
10068
|
+
xu as WEBRTC_MAX_AUDIO_TRACKS,
|
|
10069
|
+
Wu as WEBRTC_MAX_VIDEO_TRACKS,
|
|
10070
|
+
Fu as WEBRTC_RTCP_MUX_POLICY,
|
|
10059
10071
|
kf as WEBRTC_VIDEO_CODEC,
|
|
10060
|
-
|
|
10072
|
+
Mu as WEBRTC_VIDEO_MAX_BITRATE,
|
|
10061
10073
|
Df as WEBRTC_VIDEO_MAX_FRAMERATE,
|
|
10062
|
-
|
|
10063
|
-
|
|
10074
|
+
$u as WebRTCConnection,
|
|
10075
|
+
Ku as WebRTCSignaling,
|
|
10064
10076
|
_f as asProtocolMessage,
|
|
10065
10077
|
vf as clearDeviceId,
|
|
10066
10078
|
zf as clearLogBuffer,
|
|
@@ -10068,8 +10080,8 @@ export {
|
|
|
10068
10080
|
L as createLogger,
|
|
10069
10081
|
Nd as deriveAuthUrl,
|
|
10070
10082
|
Of as deriveBackendType,
|
|
10071
|
-
|
|
10072
|
-
|
|
10083
|
+
Kt as deriveBackendUrl,
|
|
10084
|
+
bd as extractUserIdFromToken,
|
|
10073
10085
|
jf as flushLogs,
|
|
10074
10086
|
eh as getAudioParam,
|
|
10075
10087
|
Yf as getBufferedLogs,
|
|
@@ -10088,7 +10100,7 @@ export {
|
|
|
10088
10100
|
Qd as getWebTransportParam,
|
|
10089
10101
|
lf as initializeDebugMode,
|
|
10090
10102
|
Ef as initializeLogSink,
|
|
10091
|
-
|
|
10103
|
+
Cs as isAudioWorkletSupported,
|
|
10092
10104
|
je as isBrowserEnvironment,
|
|
10093
10105
|
Nt as isCloudEnvironment,
|
|
10094
10106
|
Gf as isConnected,
|
|
@@ -10097,14 +10109,14 @@ export {
|
|
|
10097
10109
|
Hf as isError,
|
|
10098
10110
|
Vf as isOffline,
|
|
10099
10111
|
Pe as isSharedArrayBufferSupported,
|
|
10100
|
-
|
|
10112
|
+
ds as isWebTransportSupported,
|
|
10101
10113
|
Mf as parseUrlParams,
|
|
10102
10114
|
Se as readOpcode,
|
|
10103
10115
|
Me as readOpcodeGroup,
|
|
10104
10116
|
ae as readProtocolMessageHeaders,
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10117
|
+
Rd as registerBrowserFunctions,
|
|
10118
|
+
us as setLogLevel,
|
|
10119
|
+
yu as setLogSink,
|
|
10108
10120
|
zd as setSdkUrlParam,
|
|
10109
10121
|
Kf as setSendLogsCallback,
|
|
10110
10122
|
yf as subscribeToLogEvents,
|