@ikonai/sdk 0.0.16 → 0.0.19
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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Ci(e) {
|
|
2
2
|
return e;
|
|
3
3
|
}
|
|
4
4
|
function Ne(e) {
|
|
@@ -52,10 +52,10 @@ function k(e, l, i, s, d) {
|
|
|
52
52
|
return t.set(l, o), t;
|
|
53
53
|
}
|
|
54
54
|
var C = /* @__PURE__ */ ((e) => (e[e.Null = 1] = "Null", e[e.Bool = 2] = "Bool", e[e.Int32 = 3] = "Int32", e[e.Int64 = 4] = "Int64", e[e.UInt32 = 5] = "UInt32", e[e.UInt64 = 6] = "UInt64", e[e.Float32 = 7] = "Float32", e[e.Float64 = 8] = "Float64", e[e.Array = 9] = "Array", e[e.Dict = 10] = "Dict", e[e.Object = 11] = "Object", e[e.String = 12] = "String", e[e.Binary = 13] = "Binary", e[e.Guid = 14] = "Guid", e))(C || {});
|
|
55
|
-
const
|
|
55
|
+
const nn = 161, ln = 162, ge = new TextEncoder(), Mn = new TextDecoder("utf-8", { fatal: !0 });
|
|
56
56
|
class y {
|
|
57
57
|
constructor(l = 1) {
|
|
58
|
-
this.version = l, this.buffer.writeByte(
|
|
58
|
+
this.version = l, this.buffer.writeByte(nn), this.buffer.writeVarUInt(l >>> 0);
|
|
59
59
|
}
|
|
60
60
|
buffer = new Ie();
|
|
61
61
|
closed = !1;
|
|
@@ -113,7 +113,7 @@ class y {
|
|
|
113
113
|
this.writeVariableField(l, 10, c);
|
|
114
114
|
}
|
|
115
115
|
finish() {
|
|
116
|
-
return this.closed || (this.buffer.writeByte(
|
|
116
|
+
return this.closed || (this.buffer.writeByte(ln), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
|
|
117
117
|
}
|
|
118
118
|
writeFixedField(l, i, s) {
|
|
119
119
|
this.writeFieldHeader(l, i, 0), s();
|
|
@@ -122,7 +122,7 @@ class y {
|
|
|
122
122
|
this.writeFieldHeader(l, i, s.length), this.buffer.writeBytes(s);
|
|
123
123
|
}
|
|
124
124
|
writeFieldHeader(l, i, s) {
|
|
125
|
-
this.buffer.writeUInt32(l >>> 0), this.buffer.writeByte(Me(i)),
|
|
125
|
+
this.buffer.writeUInt32(l >>> 0), this.buffer.writeByte(Me(i)), _n(i) && this.buffer.writeVarUInt(s >>> 0);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
class je {
|
|
@@ -246,7 +246,7 @@ class or {
|
|
|
246
246
|
beginEntry() {
|
|
247
247
|
if (this.entryOpen)
|
|
248
248
|
throw new Error("Previous dictionary entry not completed");
|
|
249
|
-
return this.count++, this.entryOpen = !0, new
|
|
249
|
+
return this.count++, this.entryOpen = !0, new kn(this.keyType, this.valueType, this.payload, () => {
|
|
250
250
|
this.entryOpen = !1;
|
|
251
251
|
});
|
|
252
252
|
}
|
|
@@ -257,7 +257,7 @@ class or {
|
|
|
257
257
|
return l.writeByte(Me(this.keyType)), l.writeByte(Me(this.valueType)), l.writeVarUInt(this.count), l.writeBytes(this.payload.toUint8Array()), l.toUint8Array();
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
class
|
|
260
|
+
class kn {
|
|
261
261
|
constructor(l, i, s, d) {
|
|
262
262
|
this.keyType = l, this.valueType = i, this.payload = s, this.onComplete = d;
|
|
263
263
|
}
|
|
@@ -458,7 +458,7 @@ class E {
|
|
|
458
458
|
const i = Te(l);
|
|
459
459
|
if (i.length < 2)
|
|
460
460
|
throw new Error("Teleport payload too short");
|
|
461
|
-
if (i[0] !==
|
|
461
|
+
if (i[0] !== nn || i[i.length - 1] !== ln)
|
|
462
462
|
throw new Error("Teleport object missing markers");
|
|
463
463
|
const s = { offset: 1 }, d = G(i, s, "InvalidLength");
|
|
464
464
|
return new E(i, d, s.offset);
|
|
@@ -468,7 +468,7 @@ class E {
|
|
|
468
468
|
return null;
|
|
469
469
|
if (this.offset + 5 > this.buffer.length)
|
|
470
470
|
throw new Error("Teleport object truncated");
|
|
471
|
-
const l =
|
|
471
|
+
const l = On(this.buffer, this.offset);
|
|
472
472
|
this.offset += 4;
|
|
473
473
|
const i = this.buffer[this.offset++], s = i >> 4 & 15;
|
|
474
474
|
if ((i & 15) !== 0)
|
|
@@ -481,7 +481,7 @@ class E {
|
|
|
481
481
|
const c = { offset: this.offset }, f = G(this.buffer, c, "InvalidLength");
|
|
482
482
|
R(this.buffer, c.offset, f), a = this.buffer.subarray(c.offset, c.offset + f), this.offset = c.offset + f;
|
|
483
483
|
}
|
|
484
|
-
return new
|
|
484
|
+
return new Sn(l, s, a);
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
class Y {
|
|
@@ -546,7 +546,7 @@ class Y {
|
|
|
546
546
|
return this.ensureType(
|
|
547
547
|
12
|
|
548
548
|
/* String */
|
|
549
|
-
),
|
|
549
|
+
), Mn.decode(this.payload);
|
|
550
550
|
}
|
|
551
551
|
asGuid() {
|
|
552
552
|
return this.ensureType(
|
|
@@ -577,7 +577,7 @@ class Y {
|
|
|
577
577
|
throw new Error(`Teleport value has type ${C[this.type]}, expected ${C[l]}`);
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
|
-
class
|
|
580
|
+
class Sn extends Y {
|
|
581
581
|
constructor(l, i, s) {
|
|
582
582
|
super(i, s), this.fieldId = l;
|
|
583
583
|
}
|
|
@@ -684,7 +684,7 @@ class lr {
|
|
|
684
684
|
return null;
|
|
685
685
|
}
|
|
686
686
|
const l = this.readKey(), i = this.readValue();
|
|
687
|
-
return this.index++, new
|
|
687
|
+
return this.index++, new Pn(l, i);
|
|
688
688
|
}
|
|
689
689
|
readKey() {
|
|
690
690
|
const l = ie(this.keyType);
|
|
@@ -743,7 +743,7 @@ class lr {
|
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
class
|
|
746
|
+
class Pn {
|
|
747
747
|
constructor(l, i) {
|
|
748
748
|
this.key = l, this.value = i;
|
|
749
749
|
}
|
|
@@ -866,7 +866,7 @@ function G(e, l, i) {
|
|
|
866
866
|
for (; l.offset < e.length; ) {
|
|
867
867
|
const c = e[l.offset++];
|
|
868
868
|
if (a++, s |= (c & 127) << d, (c & 128) === 0) {
|
|
869
|
-
if (a !==
|
|
869
|
+
if (a !== Cn(s))
|
|
870
870
|
throw new Error("Teleport VarUInt is not canonical");
|
|
871
871
|
return s >>> 0;
|
|
872
872
|
}
|
|
@@ -875,7 +875,7 @@ function G(e, l, i) {
|
|
|
875
875
|
}
|
|
876
876
|
throw new Error(i);
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function Cn(e) {
|
|
879
879
|
return e < 128 ? 1 : e < 16384 ? 2 : e < 2097152 ? 3 : e < 268435456 ? 4 : 5;
|
|
880
880
|
}
|
|
881
881
|
function Me(e, l = 0) {
|
|
@@ -883,7 +883,7 @@ function Me(e, l = 0) {
|
|
|
883
883
|
throw new Error("Teleport flags must fit into 4 bits");
|
|
884
884
|
return (e & 15) << 4 | l & 15;
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function _n(e) {
|
|
887
887
|
return e === 12 || e === 13 || e === 9 || e === 11 || e === 10;
|
|
888
888
|
}
|
|
889
889
|
function ie(e) {
|
|
@@ -914,7 +914,7 @@ function R(e, l, i) {
|
|
|
914
914
|
if (l < 0 || i < 0 || l + i > e.length)
|
|
915
915
|
throw new Error("Teleport payload exceeds bounds");
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function On(e, l) {
|
|
918
918
|
return (e[l] | e[l + 1] << 8 | e[l + 2] << 16 | e[l + 3] << 24) >>> 0;
|
|
919
919
|
}
|
|
920
920
|
function sr(e, l) {
|
|
@@ -1154,7 +1154,7 @@ var Fr;
|
|
|
1154
1154
|
}
|
|
1155
1155
|
e.fromProtocolMessage = h;
|
|
1156
1156
|
})(Fr || (Fr = {}));
|
|
1157
|
-
var
|
|
1157
|
+
var br;
|
|
1158
1158
|
((e) => {
|
|
1159
1159
|
e.TeleportVersion = 1, e.TeleportOpcode = 1048577, e.TeleportLayoutHash = 1470463683, e.ActionIdFieldId = 727023925, e.CallArgumentsJsonFieldId = 2749491771, e.ClientFunctionResultsFieldId = 3123601234, e.CallIdFieldId = 3748161056;
|
|
1160
1160
|
function l(r) {
|
|
@@ -1258,47 +1258,47 @@ var mr;
|
|
|
1258
1258
|
}
|
|
1259
1259
|
r.writeToTeleport = I;
|
|
1260
1260
|
function N(T, p) {
|
|
1261
|
-
const
|
|
1262
|
-
return F(
|
|
1261
|
+
const b = E.create(T);
|
|
1262
|
+
return F(b, p);
|
|
1263
1263
|
}
|
|
1264
1264
|
r.decode = N;
|
|
1265
1265
|
function F(T, p) {
|
|
1266
|
-
const
|
|
1267
|
-
return n(
|
|
1266
|
+
const b = p ?? t();
|
|
1267
|
+
return n(b), m(T, b), b;
|
|
1268
1268
|
}
|
|
1269
1269
|
r.readFromTeleport = F;
|
|
1270
|
-
function
|
|
1271
|
-
let
|
|
1272
|
-
for (; (
|
|
1273
|
-
switch (
|
|
1270
|
+
function m(T, p) {
|
|
1271
|
+
let b;
|
|
1272
|
+
for (; (b = T.next()) !== null; )
|
|
1273
|
+
switch (b.fieldId) {
|
|
1274
1274
|
case r.ErrorFieldId: {
|
|
1275
|
-
if (
|
|
1275
|
+
if (b.isNull)
|
|
1276
1276
|
throw new Error("Field Error cannot be null");
|
|
1277
|
-
p.Error =
|
|
1277
|
+
p.Error = b.asString();
|
|
1278
1278
|
break;
|
|
1279
1279
|
}
|
|
1280
1280
|
case r.CallIndexFieldId: {
|
|
1281
|
-
if (
|
|
1281
|
+
if (b.isNull)
|
|
1282
1282
|
throw new Error("Field CallIndex cannot be null");
|
|
1283
|
-
p.CallIndex =
|
|
1283
|
+
p.CallIndex = b.asInt32();
|
|
1284
1284
|
break;
|
|
1285
1285
|
}
|
|
1286
1286
|
case r.FunctionNameFieldId: {
|
|
1287
|
-
if (
|
|
1287
|
+
if (b.isNull)
|
|
1288
1288
|
throw new Error("Field FunctionName cannot be null");
|
|
1289
|
-
p.FunctionName =
|
|
1289
|
+
p.FunctionName = b.asString();
|
|
1290
1290
|
break;
|
|
1291
1291
|
}
|
|
1292
1292
|
case r.ResultJsonFieldId: {
|
|
1293
|
-
if (
|
|
1293
|
+
if (b.isNull)
|
|
1294
1294
|
throw new Error("Field ResultJson cannot be null");
|
|
1295
|
-
p.ResultJson =
|
|
1295
|
+
p.ResultJson = b.asString();
|
|
1296
1296
|
break;
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
1299
1299
|
}
|
|
1300
1300
|
})(e.ActionClientFunctionResult || (e.ActionClientFunctionResult = {}));
|
|
1301
|
-
})(
|
|
1301
|
+
})(br || (br = {}));
|
|
1302
1302
|
var Xe;
|
|
1303
1303
|
((e) => {
|
|
1304
1304
|
e.TeleportVersion = 1, e.TeleportOpcode = 1048637, e.TeleportLayoutHash = 3197858841, e.ActionIdFieldId = 727023925, e.PayloadJsonFieldId = 3395085689;
|
|
@@ -1359,7 +1359,7 @@ var Xe;
|
|
|
1359
1359
|
}
|
|
1360
1360
|
e.fromProtocolMessage = h;
|
|
1361
1361
|
})(Xe || (Xe = {}));
|
|
1362
|
-
var
|
|
1362
|
+
var mr;
|
|
1363
1363
|
((e) => {
|
|
1364
1364
|
e.TeleportVersion = 1, e.TeleportOpcode = 1048616, e.TeleportLayoutHash = 3168041334, e.ResultJsonFieldId = 3403385840, e.CallIdFieldId = 3748161056;
|
|
1365
1365
|
function l(o) {
|
|
@@ -1418,7 +1418,7 @@ var br;
|
|
|
1418
1418
|
return a(t, r);
|
|
1419
1419
|
}
|
|
1420
1420
|
e.fromProtocolMessage = h;
|
|
1421
|
-
})(
|
|
1421
|
+
})(mr || (mr = {}));
|
|
1422
1422
|
var yr;
|
|
1423
1423
|
((e) => {
|
|
1424
1424
|
e.TeleportVersion = 1, e.TeleportOpcode = 1048611, e.TeleportLayoutHash = 2819248366, e.ActionIdFieldId = 727023925, e.TextFieldId = 2069861431;
|
|
@@ -1616,41 +1616,41 @@ var Nr;
|
|
|
1616
1616
|
}
|
|
1617
1617
|
r.writeToTeleport = I;
|
|
1618
1618
|
function N(T, p) {
|
|
1619
|
-
const
|
|
1620
|
-
return F(
|
|
1619
|
+
const b = E.create(T);
|
|
1620
|
+
return F(b, p);
|
|
1621
1621
|
}
|
|
1622
1622
|
r.decode = N;
|
|
1623
1623
|
function F(T, p) {
|
|
1624
|
-
const
|
|
1625
|
-
return n(
|
|
1624
|
+
const b = p ?? t();
|
|
1625
|
+
return n(b), m(T, b), b;
|
|
1626
1626
|
}
|
|
1627
1627
|
r.readFromTeleport = F;
|
|
1628
|
-
function
|
|
1629
|
-
let
|
|
1630
|
-
for (; (
|
|
1631
|
-
switch (
|
|
1628
|
+
function m(T, p) {
|
|
1629
|
+
let b;
|
|
1630
|
+
for (; (b = T.next()) !== null; )
|
|
1631
|
+
switch (b.fieldId) {
|
|
1632
1632
|
case r.LabelFieldId: {
|
|
1633
|
-
if (
|
|
1633
|
+
if (b.isNull)
|
|
1634
1634
|
throw new Error("Field Label cannot be null");
|
|
1635
|
-
p.Label =
|
|
1635
|
+
p.Label = b.asString();
|
|
1636
1636
|
break;
|
|
1637
1637
|
}
|
|
1638
1638
|
case r.ScoreFieldId: {
|
|
1639
|
-
if (
|
|
1639
|
+
if (b.isNull)
|
|
1640
1640
|
throw new Error("Field Score cannot be null");
|
|
1641
|
-
p.Score =
|
|
1641
|
+
p.Score = b.asFloat64();
|
|
1642
1642
|
break;
|
|
1643
1643
|
}
|
|
1644
1644
|
case r.IsFlaggedFieldId: {
|
|
1645
|
-
if (
|
|
1645
|
+
if (b.isNull)
|
|
1646
1646
|
throw new Error("Field IsFlagged cannot be null");
|
|
1647
|
-
p.IsFlagged =
|
|
1647
|
+
p.IsFlagged = b.asBool();
|
|
1648
1648
|
break;
|
|
1649
1649
|
}
|
|
1650
1650
|
case r.OriginalCategoryFieldId: {
|
|
1651
|
-
if (
|
|
1651
|
+
if (b.isNull)
|
|
1652
1652
|
throw new Error("Field OriginalCategory cannot be null");
|
|
1653
|
-
p.OriginalCategory =
|
|
1653
|
+
p.OriginalCategory = b.asString();
|
|
1654
1654
|
break;
|
|
1655
1655
|
}
|
|
1656
1656
|
}
|
|
@@ -2427,8 +2427,8 @@ var jr;
|
|
|
2427
2427
|
((r) => {
|
|
2428
2428
|
r.TeleportVersion = 1, r.TeleportLayoutHash = 3775948468, r.CallIndexFieldId = 719441180, r.FunctionNameFieldId = 814454131, r.ParametersFieldId = 2885165957;
|
|
2429
2429
|
function t(p) {
|
|
2430
|
-
const
|
|
2431
|
-
return n(
|
|
2430
|
+
const b = {};
|
|
2431
|
+
return n(b), p && Object.assign(b, p), b;
|
|
2432
2432
|
}
|
|
2433
2433
|
r.create = t;
|
|
2434
2434
|
function n(p) {
|
|
@@ -2436,59 +2436,59 @@ var jr;
|
|
|
2436
2436
|
}
|
|
2437
2437
|
r.reset = n;
|
|
2438
2438
|
function u(p) {
|
|
2439
|
-
const
|
|
2440
|
-
return I(p,
|
|
2439
|
+
const b = new y(r.TeleportVersion);
|
|
2440
|
+
return I(p, b), b.finish();
|
|
2441
2441
|
}
|
|
2442
2442
|
r.encode = u;
|
|
2443
|
-
function I(p,
|
|
2444
|
-
|
|
2443
|
+
function I(p, b) {
|
|
2444
|
+
b.writeInt32Field(r.CallIndexFieldId, p.CallIndex | 0), b.writeStringField(r.FunctionNameFieldId, p.FunctionName), b.writeArrayField(r.ParametersFieldId, C.Object, (P) => {
|
|
2445
2445
|
for (const V of p.Parameters)
|
|
2446
|
-
P.writeObject(
|
|
2447
|
-
|
|
2446
|
+
P.writeObject(Z.TeleportVersion, (_) => {
|
|
2447
|
+
Z.writeToTeleport(V, _);
|
|
2448
2448
|
});
|
|
2449
2449
|
});
|
|
2450
2450
|
}
|
|
2451
2451
|
r.writeToTeleport = I;
|
|
2452
|
-
function N(p,
|
|
2452
|
+
function N(p, b) {
|
|
2453
2453
|
const P = E.create(p);
|
|
2454
|
-
return F(P,
|
|
2454
|
+
return F(P, b);
|
|
2455
2455
|
}
|
|
2456
2456
|
r.decode = N;
|
|
2457
|
-
function F(p,
|
|
2458
|
-
const P =
|
|
2459
|
-
return n(P),
|
|
2457
|
+
function F(p, b) {
|
|
2458
|
+
const P = b ?? t();
|
|
2459
|
+
return n(P), m(p, P), P;
|
|
2460
2460
|
}
|
|
2461
2461
|
r.readFromTeleport = F;
|
|
2462
|
-
function
|
|
2462
|
+
function m(p, b) {
|
|
2463
2463
|
let P;
|
|
2464
2464
|
for (; (P = p.next()) !== null; )
|
|
2465
2465
|
switch (P.fieldId) {
|
|
2466
2466
|
case r.CallIndexFieldId: {
|
|
2467
2467
|
if (P.isNull)
|
|
2468
2468
|
throw new Error("Field CallIndex cannot be null");
|
|
2469
|
-
|
|
2469
|
+
b.CallIndex = P.asInt32();
|
|
2470
2470
|
break;
|
|
2471
2471
|
}
|
|
2472
2472
|
case r.FunctionNameFieldId: {
|
|
2473
2473
|
if (P.isNull)
|
|
2474
2474
|
throw new Error("Field FunctionName cannot be null");
|
|
2475
|
-
|
|
2475
|
+
b.FunctionName = P.asString();
|
|
2476
2476
|
break;
|
|
2477
2477
|
}
|
|
2478
2478
|
case r.ParametersFieldId: {
|
|
2479
2479
|
if (P.isNull)
|
|
2480
2480
|
throw new Error("Field Parameters cannot be null");
|
|
2481
|
-
|
|
2481
|
+
b.Parameters = T(P.asArray());
|
|
2482
2482
|
break;
|
|
2483
2483
|
}
|
|
2484
2484
|
}
|
|
2485
2485
|
}
|
|
2486
2486
|
function T(p) {
|
|
2487
|
-
const
|
|
2487
|
+
const b = [];
|
|
2488
2488
|
let P;
|
|
2489
2489
|
for (; (P = p.next()) !== null; )
|
|
2490
|
-
|
|
2491
|
-
return
|
|
2490
|
+
b.push(Z.readFromTeleport(P.asObject()));
|
|
2491
|
+
return b;
|
|
2492
2492
|
}
|
|
2493
2493
|
})(e.ActionOptimisticClientCall || (e.ActionOptimisticClientCall = {}));
|
|
2494
2494
|
})(jr || (jr = {}));
|
|
@@ -3150,7 +3150,7 @@ var Qr;
|
|
|
3150
3150
|
}
|
|
3151
3151
|
e.fromProtocolMessage = h;
|
|
3152
3152
|
})(Qr || (Qr = {}));
|
|
3153
|
-
var
|
|
3153
|
+
var Zr;
|
|
3154
3154
|
((e) => {
|
|
3155
3155
|
e.TeleportVersion = 1, e.TeleportOpcode = 1048623, e.TeleportLayoutHash = 306932954, e.FadeoutTimeInSecFieldId = 2279034664, e.IdFieldId = 2994044322;
|
|
3156
3156
|
function l(o) {
|
|
@@ -3209,8 +3209,8 @@ var qr;
|
|
|
3209
3209
|
return a(t, r);
|
|
3210
3210
|
}
|
|
3211
3211
|
e.fromProtocolMessage = h;
|
|
3212
|
-
})(
|
|
3213
|
-
var
|
|
3212
|
+
})(Zr || (Zr = {}));
|
|
3213
|
+
var qr;
|
|
3214
3214
|
((e) => {
|
|
3215
3215
|
e.TeleportVersion = 1, e.TeleportOpcode = 1048583, e.TeleportLayoutHash = 3199876816, e.LocationFieldId = 3182968015;
|
|
3216
3216
|
function l(o) {
|
|
@@ -3265,7 +3265,7 @@ var Zr;
|
|
|
3265
3265
|
return a(t, r);
|
|
3266
3266
|
}
|
|
3267
3267
|
e.fromProtocolMessage = h;
|
|
3268
|
-
})(
|
|
3268
|
+
})(qr || (qr = {}));
|
|
3269
3269
|
var Br;
|
|
3270
3270
|
((e) => {
|
|
3271
3271
|
e.TeleportVersion = 1, e.TeleportOpcode = 1048579, e.TeleportLayoutHash = 3933620822, e.PreciseCreatedAtFieldId = 522063616, e.UserIdFieldId = 781727218, e.CreatedAtFieldId = 1263193241, e.TextFieldId = 2069861431, e.GenerateChatMessageFieldId = 4027184195;
|
|
@@ -4129,41 +4129,41 @@ var ct;
|
|
|
4129
4129
|
}
|
|
4130
4130
|
r.writeToTeleport = I;
|
|
4131
4131
|
function N(T, p) {
|
|
4132
|
-
const
|
|
4133
|
-
return F(
|
|
4132
|
+
const b = E.create(T);
|
|
4133
|
+
return F(b, p);
|
|
4134
4134
|
}
|
|
4135
4135
|
r.decode = N;
|
|
4136
4136
|
function F(T, p) {
|
|
4137
|
-
const
|
|
4138
|
-
return n(
|
|
4137
|
+
const b = p ?? t();
|
|
4138
|
+
return n(b), m(T, b), b;
|
|
4139
4139
|
}
|
|
4140
4140
|
r.readFromTeleport = F;
|
|
4141
|
-
function
|
|
4142
|
-
let
|
|
4143
|
-
for (; (
|
|
4144
|
-
switch (
|
|
4141
|
+
function m(T, p) {
|
|
4142
|
+
let b;
|
|
4143
|
+
for (; (b = T.next()) !== null; )
|
|
4144
|
+
switch (b.fieldId) {
|
|
4145
4145
|
case r.EventNameFieldId: {
|
|
4146
|
-
if (
|
|
4146
|
+
if (b.isNull)
|
|
4147
4147
|
throw new Error("Field EventName cannot be null");
|
|
4148
|
-
p.EventName =
|
|
4148
|
+
p.EventName = b.asString();
|
|
4149
4149
|
break;
|
|
4150
4150
|
}
|
|
4151
4151
|
case r.MessageFieldId: {
|
|
4152
|
-
if (
|
|
4152
|
+
if (b.isNull)
|
|
4153
4153
|
throw new Error("Field Message cannot be null");
|
|
4154
|
-
p.Message =
|
|
4154
|
+
p.Message = b.asString();
|
|
4155
4155
|
break;
|
|
4156
4156
|
}
|
|
4157
4157
|
case r.ParametersFieldId: {
|
|
4158
|
-
if (
|
|
4158
|
+
if (b.isNull)
|
|
4159
4159
|
throw new Error("Field Parameters cannot be null");
|
|
4160
|
-
p.Parameters =
|
|
4160
|
+
p.Parameters = b.asString();
|
|
4161
4161
|
break;
|
|
4162
4162
|
}
|
|
4163
4163
|
case r.TimeFieldId: {
|
|
4164
|
-
if (
|
|
4164
|
+
if (b.isNull)
|
|
4165
4165
|
throw new Error("Field Time cannot be null");
|
|
4166
|
-
p.Time =
|
|
4166
|
+
p.Time = b.asString();
|
|
4167
4167
|
break;
|
|
4168
4168
|
}
|
|
4169
4169
|
}
|
|
@@ -4370,41 +4370,41 @@ var ft;
|
|
|
4370
4370
|
}
|
|
4371
4371
|
r.writeToTeleport = I;
|
|
4372
4372
|
function N(T, p) {
|
|
4373
|
-
const
|
|
4374
|
-
return F(
|
|
4373
|
+
const b = E.create(T);
|
|
4374
|
+
return F(b, p);
|
|
4375
4375
|
}
|
|
4376
4376
|
r.decode = N;
|
|
4377
4377
|
function F(T, p) {
|
|
4378
|
-
const
|
|
4379
|
-
return n(
|
|
4378
|
+
const b = p ?? t();
|
|
4379
|
+
return n(b), m(T, b), b;
|
|
4380
4380
|
}
|
|
4381
4381
|
r.readFromTeleport = F;
|
|
4382
|
-
function
|
|
4383
|
-
let
|
|
4384
|
-
for (; (
|
|
4385
|
-
switch (
|
|
4382
|
+
function m(T, p) {
|
|
4383
|
+
let b;
|
|
4384
|
+
for (; (b = T.next()) !== null; )
|
|
4385
|
+
switch (b.fieldId) {
|
|
4386
4386
|
case r.MessageFieldId: {
|
|
4387
|
-
if (
|
|
4387
|
+
if (b.isNull)
|
|
4388
4388
|
throw new Error("Field Message cannot be null");
|
|
4389
|
-
p.Message =
|
|
4389
|
+
p.Message = b.asString();
|
|
4390
4390
|
break;
|
|
4391
4391
|
}
|
|
4392
4392
|
case r.ParametersFieldId: {
|
|
4393
|
-
if (
|
|
4393
|
+
if (b.isNull)
|
|
4394
4394
|
throw new Error("Field Parameters cannot be null");
|
|
4395
|
-
p.Parameters =
|
|
4395
|
+
p.Parameters = b.asString();
|
|
4396
4396
|
break;
|
|
4397
4397
|
}
|
|
4398
4398
|
case r.TypeFieldId: {
|
|
4399
|
-
if (
|
|
4399
|
+
if (b.isNull)
|
|
4400
4400
|
throw new Error("Field Type cannot be null");
|
|
4401
|
-
p.Type =
|
|
4401
|
+
p.Type = b.asInt32();
|
|
4402
4402
|
break;
|
|
4403
4403
|
}
|
|
4404
4404
|
case r.TimeFieldId: {
|
|
4405
|
-
if (
|
|
4405
|
+
if (b.isNull)
|
|
4406
4406
|
throw new Error("Field Time cannot be null");
|
|
4407
|
-
p.Time =
|
|
4407
|
+
p.Time = b.asString();
|
|
4408
4408
|
break;
|
|
4409
4409
|
}
|
|
4410
4410
|
}
|
|
@@ -4435,8 +4435,8 @@ var wt;
|
|
|
4435
4435
|
const N = I, F = u[I];
|
|
4436
4436
|
if (F == null)
|
|
4437
4437
|
continue;
|
|
4438
|
-
const
|
|
4439
|
-
|
|
4438
|
+
const m = n.beginEntry();
|
|
4439
|
+
m.writeKeyString(N), m.writeValueFloat64(F), m.complete();
|
|
4440
4440
|
}
|
|
4441
4441
|
});
|
|
4442
4442
|
}
|
|
@@ -4579,8 +4579,8 @@ var ht;
|
|
|
4579
4579
|
const N = I, F = u[I];
|
|
4580
4580
|
if (F == null)
|
|
4581
4581
|
continue;
|
|
4582
|
-
const
|
|
4583
|
-
|
|
4582
|
+
const m = n.beginEntry();
|
|
4583
|
+
m.writeKeyString(N), m.writeValueFloat32(F), m.complete();
|
|
4584
4584
|
}
|
|
4585
4585
|
});
|
|
4586
4586
|
}
|
|
@@ -4959,41 +4959,41 @@ var Tt;
|
|
|
4959
4959
|
}
|
|
4960
4960
|
r.writeToTeleport = I;
|
|
4961
4961
|
function N(T, p) {
|
|
4962
|
-
const
|
|
4963
|
-
return F(
|
|
4962
|
+
const b = E.create(T);
|
|
4963
|
+
return F(b, p);
|
|
4964
4964
|
}
|
|
4965
4965
|
r.decode = N;
|
|
4966
4966
|
function F(T, p) {
|
|
4967
|
-
const
|
|
4968
|
-
return n(
|
|
4967
|
+
const b = p ?? t();
|
|
4968
|
+
return n(b), m(T, b), b;
|
|
4969
4969
|
}
|
|
4970
4970
|
r.readFromTeleport = F;
|
|
4971
|
-
function
|
|
4972
|
-
let
|
|
4973
|
-
for (; (
|
|
4974
|
-
switch (
|
|
4971
|
+
function m(T, p) {
|
|
4972
|
+
let b;
|
|
4973
|
+
for (; (b = T.next()) !== null; )
|
|
4974
|
+
switch (b.fieldId) {
|
|
4975
4975
|
case r.EventNameFieldId: {
|
|
4976
|
-
if (
|
|
4976
|
+
if (b.isNull)
|
|
4977
4977
|
throw new Error("Field EventName cannot be null");
|
|
4978
|
-
p.EventName =
|
|
4978
|
+
p.EventName = b.asString();
|
|
4979
4979
|
break;
|
|
4980
4980
|
}
|
|
4981
4981
|
case r.UsageFieldId: {
|
|
4982
|
-
if (
|
|
4982
|
+
if (b.isNull)
|
|
4983
4983
|
throw new Error("Field Usage cannot be null");
|
|
4984
|
-
p.Usage =
|
|
4984
|
+
p.Usage = b.asFloat32();
|
|
4985
4985
|
break;
|
|
4986
4986
|
}
|
|
4987
4987
|
case r.ParametersFieldId: {
|
|
4988
|
-
if (
|
|
4988
|
+
if (b.isNull)
|
|
4989
4989
|
throw new Error("Field Parameters cannot be null");
|
|
4990
|
-
p.Parameters =
|
|
4990
|
+
p.Parameters = b.asString();
|
|
4991
4991
|
break;
|
|
4992
4992
|
}
|
|
4993
4993
|
case r.TimeFieldId: {
|
|
4994
|
-
if (
|
|
4994
|
+
if (b.isNull)
|
|
4995
4995
|
throw new Error("Field Time cannot be null");
|
|
4996
|
-
p.Time =
|
|
4996
|
+
p.Time = b.asString();
|
|
4997
4997
|
break;
|
|
4998
4998
|
}
|
|
4999
4999
|
}
|
|
@@ -5102,7 +5102,7 @@ var Ft;
|
|
|
5102
5102
|
}
|
|
5103
5103
|
e.fromProtocolMessage = h;
|
|
5104
5104
|
})(Ft || (Ft = {}));
|
|
5105
|
-
var
|
|
5105
|
+
var bt;
|
|
5106
5106
|
((e) => {
|
|
5107
5107
|
e.TeleportVersion = 1, e.TeleportOpcode = 4194309, e.TeleportLayoutHash = 2782422021, e.AverageVolumeFieldId = 205938238, e.IsFirstFieldId = 1594075008, e.TimeStampInInterleavedSamplesFieldId = 2026534360, e.SamplesFieldId = 3409001585, e.AudioEventEstimatedDurationFieldId = 3466650495, e.FrameSizeInInterleavedSamplesFieldId = 4007456593, e.IsLastFieldId = 4017217601, e.SequenceFieldId = 4065417427, e.EpochFieldId = 4086360332;
|
|
5108
5108
|
function l(o) {
|
|
@@ -5203,8 +5203,8 @@ var mt;
|
|
|
5203
5203
|
return a(t, r);
|
|
5204
5204
|
}
|
|
5205
5205
|
e.fromProtocolMessage = h;
|
|
5206
|
-
})(
|
|
5207
|
-
var
|
|
5206
|
+
})(bt || (bt = {}));
|
|
5207
|
+
var mt;
|
|
5208
5208
|
((e) => {
|
|
5209
5209
|
e.TeleportVersion = 1, e.TeleportOpcode = 4194308, e.TeleportLayoutHash = 1723412637, e.VolumeFieldId = 2079085407, e.CountFieldId = 3485914759;
|
|
5210
5210
|
function l(o) {
|
|
@@ -5263,7 +5263,7 @@ var bt;
|
|
|
5263
5263
|
return a(t, r);
|
|
5264
5264
|
}
|
|
5265
5265
|
e.fromProtocolMessage = h;
|
|
5266
|
-
})(
|
|
5266
|
+
})(mt || (mt = {}));
|
|
5267
5267
|
var re;
|
|
5268
5268
|
((e) => {
|
|
5269
5269
|
e.TeleportVersion = 1, e.TeleportOpcode = 4194305, e.TeleportLayoutHash = 2116996259, e.DescriptionFieldId = 1368629611, e.ChannelsFieldId = 2431514951, e.BitDepthFieldId = 2914494629, e.CodecFieldId = 3284746250, e.SampleRateFieldId = 4101844078;
|
|
@@ -5417,11 +5417,11 @@ var Qe;
|
|
|
5417
5417
|
}), n.writeDictionaryField(e.FeatureFlagsFieldId, C.String, C.Bool, (u) => {
|
|
5418
5418
|
const I = t.FeatureFlags;
|
|
5419
5419
|
for (const N of Object.keys(I)) {
|
|
5420
|
-
const F = N,
|
|
5421
|
-
if (
|
|
5420
|
+
const F = N, m = I[N];
|
|
5421
|
+
if (m == null)
|
|
5422
5422
|
continue;
|
|
5423
5423
|
const T = u.beginEntry();
|
|
5424
|
-
T.writeKeyString(F), T.writeValueBool(
|
|
5424
|
+
T.writeKeyString(F), T.writeValueBool(m), T.complete();
|
|
5425
5425
|
}
|
|
5426
5426
|
}), n.writeStringField(e.SpaceIdFieldId, t.SpaceId), n.writeStringField(e.PrimaryUserIdFieldId, t.PrimaryUserId), n.writeStringField(e.ChannelTemplateIdFieldId, t.ChannelTemplateId);
|
|
5427
5427
|
}
|
|
@@ -5675,7 +5675,7 @@ var Nt;
|
|
|
5675
5675
|
}
|
|
5676
5676
|
e.fromProtocolMessage = h;
|
|
5677
5677
|
})(Nt || (Nt = {}));
|
|
5678
|
-
var
|
|
5678
|
+
var Ze;
|
|
5679
5679
|
((e) => {
|
|
5680
5680
|
e.TeleportVersion = 1, e.TeleportOpcode = 0, e.TeleportLayoutHash = 1939420761, e.DeviceIdFieldId = 76337612, e.InstallIdFieldId = 185396121, e.UserAgentFieldId = 388632637, e.ContextTypeFieldId = 417197284, e.HasInputFieldId = 469070965, e.UserTypeFieldId = 470595159, e.UserIdFieldId = 781727218, e.ProductIdFieldId = 834078886, e.AuthSessionIdFieldId = 1043273762, e.OpcodeGroupsFromServerFieldId = 1175184220, e.ReceiveAllMessagesFieldId = 1236999138, e.DescriptionFieldId = 1368629611, e.LocaleFieldId = 1715899485, e.SdkTypeFieldId = 1942830531, e.PayloadTypeFieldId = 2142346422, e.VersionIdFieldId = 2598291686, e.ClientTypeFieldId = 2810953526, e.ParametersFieldId = 2885165957, e.IsInternalFieldId = 3586157513, e.OpcodeGroupsToServerFieldId = 3686066300, e.ChannelLocaleFieldId = 3717933110, e.ProtocolVersionFieldId = 3828903910, e.ServerSessionIdFieldId = 3914217035, e.EmbeddedSpaceIdFieldId = 4062655306;
|
|
5681
5681
|
function l(r) {
|
|
@@ -5699,8 +5699,8 @@ var qe;
|
|
|
5699
5699
|
const N = I, F = u[I];
|
|
5700
5700
|
if (F == null)
|
|
5701
5701
|
continue;
|
|
5702
|
-
const
|
|
5703
|
-
|
|
5702
|
+
const m = n.beginEntry();
|
|
5703
|
+
m.writeKeyString(N), m.writeValueString(F), m.complete();
|
|
5704
5704
|
}
|
|
5705
5705
|
}), t.writeBoolField(e.IsInternalFieldId, r.IsInternal), t.writeInt32Field(e.OpcodeGroupsToServerFieldId, r.OpcodeGroupsToServer), t.writeStringField(e.ChannelLocaleFieldId, r.ChannelLocale), t.writeInt32Field(e.ProtocolVersionFieldId, r.ProtocolVersion | 0), t.writeStringField(e.ServerSessionIdFieldId, r.ServerSessionId), t.writeStringField(e.EmbeddedSpaceIdFieldId, r.EmbeddedSpaceId);
|
|
5706
5706
|
}
|
|
@@ -5884,7 +5884,7 @@ var qe;
|
|
|
5884
5884
|
}
|
|
5885
5885
|
return t;
|
|
5886
5886
|
}
|
|
5887
|
-
})(
|
|
5887
|
+
})(Ze || (Ze = {}));
|
|
5888
5888
|
var he;
|
|
5889
5889
|
((e) => {
|
|
5890
5890
|
e.TeleportVersion = 1, e.TeleportOpcode = 0, e.TeleportLayoutHash = 2083170344, e.AuthTicketFieldId = 746516514, e.PriorityFieldId = 877841741, e.OpcodeGroupsFromServerFieldId = 1175184220, e.DescriptionFieldId = 1368629611, e.UriFieldId = 2341021724, e.TypeFieldId = 3167053791, e.OpcodeGroupsToServerFieldId = 3686066300;
|
|
@@ -5999,8 +5999,8 @@ var L;
|
|
|
5999
5999
|
const N = I, F = u[I];
|
|
6000
6000
|
if (F == null)
|
|
6001
6001
|
continue;
|
|
6002
|
-
const
|
|
6003
|
-
|
|
6002
|
+
const m = n.beginEntry();
|
|
6003
|
+
m.writeKeyString(N), m.writeValueString(F), m.complete();
|
|
6004
6004
|
}
|
|
6005
6005
|
}), t.writeBoolField(e.IsInternalFieldId, r.IsInternal), t.writeStringField(e.ChannelLocaleFieldId, r.ChannelLocale), t.writeStringField(e.EmbeddedSpaceIdFieldId, r.EmbeddedSpaceId);
|
|
6006
6006
|
}
|
|
@@ -6635,7 +6635,7 @@ var Ct;
|
|
|
6635
6635
|
}
|
|
6636
6636
|
e.fromProtocolMessage = h;
|
|
6637
6637
|
})(Ct || (Ct = {}));
|
|
6638
|
-
var
|
|
6638
|
+
var qe;
|
|
6639
6639
|
((e) => {
|
|
6640
6640
|
e.TeleportVersion = 1, e.TeleportOpcode = 1048601, e.TeleportLayoutHash = 2238437484, e.ScopesFieldId = 112005851, e.FunctionNameFieldId = 814454131, e.FunctionIdFieldId = 976255570, e.ClientBackendTokenFieldId = 1123310456, e.ParametersFieldId = 2885165957, e.CallIdFieldId = 3748161056, e.InstanceIdFieldId = 4289118421;
|
|
6641
6641
|
function l(t) {
|
|
@@ -6660,8 +6660,8 @@ var Ze;
|
|
|
6660
6660
|
});
|
|
6661
6661
|
}), n.writeStringField(e.FunctionNameFieldId, t.FunctionName), n.writeGuidField(e.FunctionIdFieldId, t.FunctionId), n.writeStringField(e.ClientBackendTokenFieldId, t.ClientBackendToken), n.writeArrayField(e.ParametersFieldId, C.Object, (u) => {
|
|
6662
6662
|
for (const I of t.Parameters)
|
|
6663
|
-
u.writeObject(
|
|
6664
|
-
|
|
6663
|
+
u.writeObject(Z.TeleportVersion, (N) => {
|
|
6664
|
+
Z.writeToTeleport(I, N);
|
|
6665
6665
|
});
|
|
6666
6666
|
}), n.writeGuidField(e.CallIdFieldId, t.CallId), n.writeGuidField(e.InstanceIdFieldId, t.InstanceId);
|
|
6667
6667
|
}
|
|
@@ -6745,14 +6745,14 @@ var Ze;
|
|
|
6745
6745
|
const n = [];
|
|
6746
6746
|
let u;
|
|
6747
6747
|
for (; (u = t.next()) !== null; )
|
|
6748
|
-
n.push(
|
|
6748
|
+
n.push(Z.readFromTeleport(u.asObject()));
|
|
6749
6749
|
return n;
|
|
6750
6750
|
}
|
|
6751
6751
|
((t) => {
|
|
6752
6752
|
t.TeleportVersion = 1, t.TeleportLayoutHash = 1710859415, t.IdFieldId = 2994044322, t.TypeFieldId = 3167053791;
|
|
6753
6753
|
function n(p) {
|
|
6754
|
-
const
|
|
6755
|
-
return u(
|
|
6754
|
+
const b = {};
|
|
6755
|
+
return u(b), p && Object.assign(b, p), b;
|
|
6756
6756
|
}
|
|
6757
6757
|
t.create = n;
|
|
6758
6758
|
function u(p) {
|
|
@@ -6760,44 +6760,44 @@ var Ze;
|
|
|
6760
6760
|
}
|
|
6761
6761
|
t.reset = u;
|
|
6762
6762
|
function I(p) {
|
|
6763
|
-
const
|
|
6764
|
-
return N(p,
|
|
6763
|
+
const b = new y(t.TeleportVersion);
|
|
6764
|
+
return N(p, b), b.finish();
|
|
6765
6765
|
}
|
|
6766
6766
|
t.encode = I;
|
|
6767
|
-
function N(p,
|
|
6768
|
-
|
|
6767
|
+
function N(p, b) {
|
|
6768
|
+
b.writeStringField(t.IdFieldId, p.Id), b.writeStringField(t.TypeFieldId, p.Type);
|
|
6769
6769
|
}
|
|
6770
6770
|
t.writeToTeleport = N;
|
|
6771
|
-
function F(p,
|
|
6771
|
+
function F(p, b) {
|
|
6772
6772
|
const P = E.create(p);
|
|
6773
|
-
return
|
|
6773
|
+
return m(P, b);
|
|
6774
6774
|
}
|
|
6775
6775
|
t.decode = F;
|
|
6776
|
-
function
|
|
6777
|
-
const P =
|
|
6776
|
+
function m(p, b) {
|
|
6777
|
+
const P = b ?? n();
|
|
6778
6778
|
return u(P), T(p, P), P;
|
|
6779
6779
|
}
|
|
6780
|
-
t.readFromTeleport =
|
|
6781
|
-
function T(p,
|
|
6780
|
+
t.readFromTeleport = m;
|
|
6781
|
+
function T(p, b) {
|
|
6782
6782
|
let P;
|
|
6783
6783
|
for (; (P = p.next()) !== null; )
|
|
6784
6784
|
switch (P.fieldId) {
|
|
6785
6785
|
case t.IdFieldId: {
|
|
6786
6786
|
if (P.isNull)
|
|
6787
6787
|
throw new Error("Field Id cannot be null");
|
|
6788
|
-
|
|
6788
|
+
b.Id = P.asString();
|
|
6789
6789
|
break;
|
|
6790
6790
|
}
|
|
6791
6791
|
case t.TypeFieldId: {
|
|
6792
6792
|
if (P.isNull)
|
|
6793
6793
|
throw new Error("Field Type cannot be null");
|
|
6794
|
-
|
|
6794
|
+
b.Type = P.asString();
|
|
6795
6795
|
break;
|
|
6796
6796
|
}
|
|
6797
6797
|
}
|
|
6798
6798
|
}
|
|
6799
6799
|
})(e.ScopeEntry || (e.ScopeEntry = {}));
|
|
6800
|
-
})(
|
|
6800
|
+
})(qe || (qe = {}));
|
|
6801
6801
|
var _t;
|
|
6802
6802
|
((e) => {
|
|
6803
6803
|
e.TeleportVersion = 1, e.TeleportOpcode = 1048629, e.TeleportLayoutHash = 1508754766, e.CallIdFieldId = 3748161056, e.InstanceIdFieldId = 4289118421;
|
|
@@ -7298,71 +7298,71 @@ var X;
|
|
|
7298
7298
|
}
|
|
7299
7299
|
r.writeToTeleport = I;
|
|
7300
7300
|
function N(T, p) {
|
|
7301
|
-
const
|
|
7302
|
-
return F(
|
|
7301
|
+
const b = E.create(T);
|
|
7302
|
+
return F(b, p);
|
|
7303
7303
|
}
|
|
7304
7304
|
r.decode = N;
|
|
7305
7305
|
function F(T, p) {
|
|
7306
|
-
const
|
|
7307
|
-
return n(
|
|
7306
|
+
const b = p ?? t();
|
|
7307
|
+
return n(b), m(T, b), b;
|
|
7308
7308
|
}
|
|
7309
7309
|
r.readFromTeleport = F;
|
|
7310
|
-
function
|
|
7311
|
-
let
|
|
7312
|
-
for (; (
|
|
7313
|
-
switch (
|
|
7310
|
+
function m(T, p) {
|
|
7311
|
+
let b;
|
|
7312
|
+
for (; (b = T.next()) !== null; )
|
|
7313
|
+
switch (b.fieldId) {
|
|
7314
7314
|
case r.HasDefaultValueFieldId: {
|
|
7315
|
-
if (
|
|
7315
|
+
if (b.isNull)
|
|
7316
7316
|
throw new Error("Field HasDefaultValue cannot be null");
|
|
7317
|
-
p.HasDefaultValue =
|
|
7317
|
+
p.HasDefaultValue = b.asBool();
|
|
7318
7318
|
break;
|
|
7319
7319
|
}
|
|
7320
7320
|
case r.DefaultValueJsonFieldId: {
|
|
7321
|
-
if (
|
|
7321
|
+
if (b.isNull)
|
|
7322
7322
|
throw new Error("Field DefaultValueJson cannot be null");
|
|
7323
|
-
p.DefaultValueJson =
|
|
7323
|
+
p.DefaultValueJson = b.asString();
|
|
7324
7324
|
break;
|
|
7325
7325
|
}
|
|
7326
7326
|
case r.EnumerableItemTypeNameFieldId: {
|
|
7327
|
-
if (
|
|
7327
|
+
if (b.isNull)
|
|
7328
7328
|
throw new Error("Field EnumerableItemTypeName cannot be null");
|
|
7329
|
-
p.EnumerableItemTypeName =
|
|
7329
|
+
p.EnumerableItemTypeName = b.asString();
|
|
7330
7330
|
break;
|
|
7331
7331
|
}
|
|
7332
7332
|
case r.DescriptionFieldId: {
|
|
7333
|
-
if (
|
|
7333
|
+
if (b.isNull)
|
|
7334
7334
|
throw new Error("Field Description cannot be null");
|
|
7335
|
-
p.Description =
|
|
7335
|
+
p.Description = b.asString();
|
|
7336
7336
|
break;
|
|
7337
7337
|
}
|
|
7338
7338
|
case r.DefaultValueDataFieldId: {
|
|
7339
|
-
if (
|
|
7339
|
+
if (b.isNull)
|
|
7340
7340
|
throw new Error("Field DefaultValueData cannot be null");
|
|
7341
|
-
p.DefaultValueData =
|
|
7341
|
+
p.DefaultValueData = b.asBinary();
|
|
7342
7342
|
break;
|
|
7343
7343
|
}
|
|
7344
7344
|
case r.IsEnumerableFieldId: {
|
|
7345
|
-
if (
|
|
7345
|
+
if (b.isNull)
|
|
7346
7346
|
throw new Error("Field IsEnumerable cannot be null");
|
|
7347
|
-
p.IsEnumerable =
|
|
7347
|
+
p.IsEnumerable = b.asBool();
|
|
7348
7348
|
break;
|
|
7349
7349
|
}
|
|
7350
7350
|
case r.TypeNameFieldId: {
|
|
7351
|
-
if (
|
|
7351
|
+
if (b.isNull)
|
|
7352
7352
|
throw new Error("Field TypeName cannot be null");
|
|
7353
|
-
p.TypeName =
|
|
7353
|
+
p.TypeName = b.asString();
|
|
7354
7354
|
break;
|
|
7355
7355
|
}
|
|
7356
7356
|
case r.ParameterNameFieldId: {
|
|
7357
|
-
if (
|
|
7357
|
+
if (b.isNull)
|
|
7358
7358
|
throw new Error("Field ParameterName cannot be null");
|
|
7359
|
-
p.ParameterName =
|
|
7359
|
+
p.ParameterName = b.asString();
|
|
7360
7360
|
break;
|
|
7361
7361
|
}
|
|
7362
7362
|
case r.ParameterIndexFieldId: {
|
|
7363
|
-
if (
|
|
7363
|
+
if (b.isNull)
|
|
7364
7364
|
throw new Error("Field ParameterIndex cannot be null");
|
|
7365
|
-
p.ParameterIndex =
|
|
7365
|
+
p.ParameterIndex = b.asInt32();
|
|
7366
7366
|
break;
|
|
7367
7367
|
}
|
|
7368
7368
|
}
|
|
@@ -7513,7 +7513,7 @@ var Ce;
|
|
|
7513
7513
|
}
|
|
7514
7514
|
e.fromProtocolMessage = h;
|
|
7515
7515
|
})(Ce || (Ce = {}));
|
|
7516
|
-
var
|
|
7516
|
+
var Z;
|
|
7517
7517
|
((e) => {
|
|
7518
7518
|
e.TeleportVersion = 1, e.TeleportOpcode = 0, e.TeleportLayoutHash = 760727997, e.EnumerationIdFieldId = 467348717, e.EnumerableItemTypeNameFieldId = 972460562, e.ValueJsonFieldId = 1911490601, e.IsEnumerableFieldId = 2603556958, e.TypeNameFieldId = 3609695522, e.ValueDataFieldId = 4094837378, e.ParameterIndexFieldId = 4257460908;
|
|
7519
7519
|
function l(o) {
|
|
@@ -7602,7 +7602,7 @@ var q;
|
|
|
7602
7602
|
return a(t, r);
|
|
7603
7603
|
}
|
|
7604
7604
|
e.fromProtocolMessage = h;
|
|
7605
|
-
})(
|
|
7605
|
+
})(Z || (Z = {}));
|
|
7606
7606
|
var te;
|
|
7607
7607
|
((e) => {
|
|
7608
7608
|
e.TeleportVersion = 1, e.TeleportOpcode = 65549, e.TeleportLayoutHash = 4089149075;
|
|
@@ -7652,8 +7652,8 @@ var Be;
|
|
|
7652
7652
|
((e) => {
|
|
7653
7653
|
e.TeleportVersion = 3, e.TeleportOpcode = 65539, e.TeleportLayoutHash = 2784858855, e.FirstUserIdFieldId = 693643444, e.ClientsFieldId = 1144553441, e.TrackingStreamsFieldId = 1497620243, e.ChannelIdFieldId = 1559330978, e.SessionIdFieldId = 1999510636, e.ChannelUrlFieldId = 2277643855, e.ChannelNameFieldId = 2469008121, e.OrganisationNameFieldId = 3219210453, e.FunctionsFieldId = 3678477544, e.UIStreamsFieldId = 3696445035, e.SpaceIdFieldId = 3707543140, e.PrimaryUserIdFieldId = 3712281496, e.ChannelInstanceIdFieldId = 3823842552, e.AudioStreamsFieldId = 3895362455, e.VideoStreamsFieldId = 3897397815, e.SpaceNameFieldId = 4225107827;
|
|
7654
7654
|
function l(F) {
|
|
7655
|
-
const
|
|
7656
|
-
return i(
|
|
7655
|
+
const m = {};
|
|
7656
|
+
return i(m), F && Object.assign(m, F), m;
|
|
7657
7657
|
}
|
|
7658
7658
|
e.create = l;
|
|
7659
7659
|
function i(F) {
|
|
@@ -7661,15 +7661,15 @@ var Be;
|
|
|
7661
7661
|
}
|
|
7662
7662
|
e.reset = i;
|
|
7663
7663
|
function s(F) {
|
|
7664
|
-
const
|
|
7665
|
-
return d(F,
|
|
7664
|
+
const m = new y(e.TeleportVersion);
|
|
7665
|
+
return d(F, m), m.finish();
|
|
7666
7666
|
}
|
|
7667
7667
|
e.encode = s;
|
|
7668
|
-
function d(F,
|
|
7669
|
-
|
|
7668
|
+
function d(F, m) {
|
|
7669
|
+
m.writeStringField(e.FirstUserIdFieldId, F.FirstUserId), m.writeDictionaryField(e.ClientsFieldId, C.Int32, C.Object, (T) => {
|
|
7670
7670
|
const p = F.Clients;
|
|
7671
|
-
for (const
|
|
7672
|
-
const P = Number(
|
|
7671
|
+
for (const b of Object.keys(p)) {
|
|
7672
|
+
const P = Number(b), V = p[b];
|
|
7673
7673
|
if (V == null)
|
|
7674
7674
|
continue;
|
|
7675
7675
|
const _ = T.beginEntry();
|
|
@@ -7677,10 +7677,10 @@ var Be;
|
|
|
7677
7677
|
L.writeToTeleport(V, g);
|
|
7678
7678
|
}), _.complete();
|
|
7679
7679
|
}
|
|
7680
|
-
}),
|
|
7680
|
+
}), m.writeDictionaryField(e.TrackingStreamsFieldId, C.String, C.Object, (T) => {
|
|
7681
7681
|
const p = F.TrackingStreams;
|
|
7682
|
-
for (const
|
|
7683
|
-
const P =
|
|
7682
|
+
for (const b of Object.keys(p)) {
|
|
7683
|
+
const P = b, V = p[b];
|
|
7684
7684
|
if (V == null)
|
|
7685
7685
|
continue;
|
|
7686
7686
|
const _ = T.beginEntry();
|
|
@@ -7688,10 +7688,10 @@ var Be;
|
|
|
7688
7688
|
e.TrackingStreamState.writeToTeleport(V, g);
|
|
7689
7689
|
}), _.complete();
|
|
7690
7690
|
}
|
|
7691
|
-
}),
|
|
7691
|
+
}), m.writeStringField(e.ChannelIdFieldId, F.ChannelId), m.writeStringField(e.SessionIdFieldId, F.SessionId), m.writeStringField(e.ChannelUrlFieldId, F.ChannelUrl), m.writeStringField(e.ChannelNameFieldId, F.ChannelName), m.writeStringField(e.OrganisationNameFieldId, F.OrganisationName), m.writeDictionaryField(e.FunctionsFieldId, C.Int32, C.Array, (T) => {
|
|
7692
7692
|
const p = F.Functions;
|
|
7693
|
-
for (const
|
|
7694
|
-
const P = Number(
|
|
7693
|
+
for (const b of Object.keys(p)) {
|
|
7694
|
+
const P = Number(b), V = p[b];
|
|
7695
7695
|
if (V == null)
|
|
7696
7696
|
continue;
|
|
7697
7697
|
const _ = T.beginEntry();
|
|
@@ -7702,10 +7702,10 @@ var Be;
|
|
|
7702
7702
|
});
|
|
7703
7703
|
}), _.complete();
|
|
7704
7704
|
}
|
|
7705
|
-
}),
|
|
7705
|
+
}), m.writeDictionaryField(e.UIStreamsFieldId, C.String, C.Object, (T) => {
|
|
7706
7706
|
const p = F.UIStreams;
|
|
7707
|
-
for (const
|
|
7708
|
-
const P =
|
|
7707
|
+
for (const b of Object.keys(p)) {
|
|
7708
|
+
const P = b, V = p[b];
|
|
7709
7709
|
if (V == null)
|
|
7710
7710
|
continue;
|
|
7711
7711
|
const _ = T.beginEntry();
|
|
@@ -7713,10 +7713,10 @@ var Be;
|
|
|
7713
7713
|
e.UIStreamState.writeToTeleport(V, g);
|
|
7714
7714
|
}), _.complete();
|
|
7715
7715
|
}
|
|
7716
|
-
}),
|
|
7716
|
+
}), m.writeStringField(e.SpaceIdFieldId, F.SpaceId), m.writeStringField(e.PrimaryUserIdFieldId, F.PrimaryUserId), m.writeStringField(e.ChannelInstanceIdFieldId, F.ChannelInstanceId), m.writeDictionaryField(e.AudioStreamsFieldId, C.String, C.Object, (T) => {
|
|
7717
7717
|
const p = F.AudioStreams;
|
|
7718
|
-
for (const
|
|
7719
|
-
const P =
|
|
7718
|
+
for (const b of Object.keys(p)) {
|
|
7719
|
+
const P = b, V = p[b];
|
|
7720
7720
|
if (V == null)
|
|
7721
7721
|
continue;
|
|
7722
7722
|
const _ = T.beginEntry();
|
|
@@ -7724,10 +7724,10 @@ var Be;
|
|
|
7724
7724
|
e.AudioStreamState.writeToTeleport(V, g);
|
|
7725
7725
|
}), _.complete();
|
|
7726
7726
|
}
|
|
7727
|
-
}),
|
|
7727
|
+
}), m.writeDictionaryField(e.VideoStreamsFieldId, C.String, C.Object, (T) => {
|
|
7728
7728
|
const p = F.VideoStreams;
|
|
7729
|
-
for (const
|
|
7730
|
-
const P =
|
|
7729
|
+
for (const b of Object.keys(p)) {
|
|
7730
|
+
const P = b, V = p[b];
|
|
7731
7731
|
if (V == null)
|
|
7732
7732
|
continue;
|
|
7733
7733
|
const _ = T.beginEntry();
|
|
@@ -7735,221 +7735,221 @@ var Be;
|
|
|
7735
7735
|
e.VideoStreamState.writeToTeleport(V, g);
|
|
7736
7736
|
}), _.complete();
|
|
7737
7737
|
}
|
|
7738
|
-
}),
|
|
7738
|
+
}), m.writeStringField(e.SpaceNameFieldId, F.SpaceName);
|
|
7739
7739
|
}
|
|
7740
7740
|
e.writeToTeleport = d;
|
|
7741
|
-
function a(F,
|
|
7741
|
+
function a(F, m) {
|
|
7742
7742
|
const T = E.create(F);
|
|
7743
|
-
return c(T,
|
|
7743
|
+
return c(T, m);
|
|
7744
7744
|
}
|
|
7745
7745
|
e.decode = a;
|
|
7746
|
-
function c(F,
|
|
7747
|
-
const T =
|
|
7746
|
+
function c(F, m) {
|
|
7747
|
+
const T = m ?? l();
|
|
7748
7748
|
return i(T), f(F, T), T;
|
|
7749
7749
|
}
|
|
7750
7750
|
e.readFromTeleport = c;
|
|
7751
|
-
function f(F,
|
|
7751
|
+
function f(F, m) {
|
|
7752
7752
|
let T;
|
|
7753
7753
|
for (; (T = F.next()) !== null; )
|
|
7754
7754
|
switch (T.fieldId) {
|
|
7755
7755
|
case e.FirstUserIdFieldId: {
|
|
7756
7756
|
if (T.isNull)
|
|
7757
7757
|
throw new Error("Field FirstUserId cannot be null");
|
|
7758
|
-
|
|
7758
|
+
m.FirstUserId = T.asString();
|
|
7759
7759
|
break;
|
|
7760
7760
|
}
|
|
7761
7761
|
case e.ClientsFieldId: {
|
|
7762
7762
|
if (T.isNull)
|
|
7763
7763
|
throw new Error("Field Clients cannot be null");
|
|
7764
|
-
|
|
7764
|
+
m.Clients = o(T.asDictionary());
|
|
7765
7765
|
break;
|
|
7766
7766
|
}
|
|
7767
7767
|
case e.TrackingStreamsFieldId: {
|
|
7768
7768
|
if (T.isNull)
|
|
7769
7769
|
throw new Error("Field TrackingStreams cannot be null");
|
|
7770
|
-
|
|
7770
|
+
m.TrackingStreams = r(T.asDictionary());
|
|
7771
7771
|
break;
|
|
7772
7772
|
}
|
|
7773
7773
|
case e.ChannelIdFieldId: {
|
|
7774
7774
|
if (T.isNull)
|
|
7775
7775
|
throw new Error("Field ChannelId cannot be null");
|
|
7776
|
-
|
|
7776
|
+
m.ChannelId = T.asString();
|
|
7777
7777
|
break;
|
|
7778
7778
|
}
|
|
7779
7779
|
case e.SessionIdFieldId: {
|
|
7780
7780
|
if (T.isNull)
|
|
7781
7781
|
throw new Error("Field SessionId cannot be null");
|
|
7782
|
-
|
|
7782
|
+
m.SessionId = T.asString();
|
|
7783
7783
|
break;
|
|
7784
7784
|
}
|
|
7785
7785
|
case e.ChannelUrlFieldId: {
|
|
7786
7786
|
if (T.isNull)
|
|
7787
7787
|
throw new Error("Field ChannelUrl cannot be null");
|
|
7788
|
-
|
|
7788
|
+
m.ChannelUrl = T.asString();
|
|
7789
7789
|
break;
|
|
7790
7790
|
}
|
|
7791
7791
|
case e.ChannelNameFieldId: {
|
|
7792
7792
|
if (T.isNull)
|
|
7793
7793
|
throw new Error("Field ChannelName cannot be null");
|
|
7794
|
-
|
|
7794
|
+
m.ChannelName = T.asString();
|
|
7795
7795
|
break;
|
|
7796
7796
|
}
|
|
7797
7797
|
case e.OrganisationNameFieldId: {
|
|
7798
7798
|
if (T.isNull)
|
|
7799
7799
|
throw new Error("Field OrganisationName cannot be null");
|
|
7800
|
-
|
|
7800
|
+
m.OrganisationName = T.asString();
|
|
7801
7801
|
break;
|
|
7802
7802
|
}
|
|
7803
7803
|
case e.FunctionsFieldId: {
|
|
7804
7804
|
if (T.isNull)
|
|
7805
7805
|
throw new Error("Field Functions cannot be null");
|
|
7806
|
-
|
|
7806
|
+
m.Functions = t(T.asDictionary());
|
|
7807
7807
|
break;
|
|
7808
7808
|
}
|
|
7809
7809
|
case e.UIStreamsFieldId: {
|
|
7810
7810
|
if (T.isNull)
|
|
7811
7811
|
throw new Error("Field UIStreams cannot be null");
|
|
7812
|
-
|
|
7812
|
+
m.UIStreams = n(T.asDictionary());
|
|
7813
7813
|
break;
|
|
7814
7814
|
}
|
|
7815
7815
|
case e.SpaceIdFieldId: {
|
|
7816
7816
|
if (T.isNull)
|
|
7817
7817
|
throw new Error("Field SpaceId cannot be null");
|
|
7818
|
-
|
|
7818
|
+
m.SpaceId = T.asString();
|
|
7819
7819
|
break;
|
|
7820
7820
|
}
|
|
7821
7821
|
case e.PrimaryUserIdFieldId: {
|
|
7822
7822
|
if (T.isNull)
|
|
7823
7823
|
throw new Error("Field PrimaryUserId cannot be null");
|
|
7824
|
-
|
|
7824
|
+
m.PrimaryUserId = T.asString();
|
|
7825
7825
|
break;
|
|
7826
7826
|
}
|
|
7827
7827
|
case e.ChannelInstanceIdFieldId: {
|
|
7828
7828
|
if (T.isNull)
|
|
7829
7829
|
throw new Error("Field ChannelInstanceId cannot be null");
|
|
7830
|
-
|
|
7830
|
+
m.ChannelInstanceId = T.asString();
|
|
7831
7831
|
break;
|
|
7832
7832
|
}
|
|
7833
7833
|
case e.AudioStreamsFieldId: {
|
|
7834
7834
|
if (T.isNull)
|
|
7835
7835
|
throw new Error("Field AudioStreams cannot be null");
|
|
7836
|
-
|
|
7836
|
+
m.AudioStreams = u(T.asDictionary());
|
|
7837
7837
|
break;
|
|
7838
7838
|
}
|
|
7839
7839
|
case e.VideoStreamsFieldId: {
|
|
7840
7840
|
if (T.isNull)
|
|
7841
7841
|
throw new Error("Field VideoStreams cannot be null");
|
|
7842
|
-
|
|
7842
|
+
m.VideoStreams = I(T.asDictionary());
|
|
7843
7843
|
break;
|
|
7844
7844
|
}
|
|
7845
7845
|
case e.SpaceNameFieldId: {
|
|
7846
7846
|
if (T.isNull)
|
|
7847
7847
|
throw new Error("Field SpaceName cannot be null");
|
|
7848
|
-
|
|
7848
|
+
m.SpaceName = T.asString();
|
|
7849
7849
|
break;
|
|
7850
7850
|
}
|
|
7851
7851
|
}
|
|
7852
7852
|
}
|
|
7853
|
-
function w(F,
|
|
7853
|
+
function w(F, m, T) {
|
|
7854
7854
|
const p = s(F);
|
|
7855
|
-
return k(e.TeleportOpcode, p, e.TeleportVersion,
|
|
7855
|
+
return k(e.TeleportOpcode, p, e.TeleportVersion, m, T);
|
|
7856
7856
|
}
|
|
7857
7857
|
e.toProtocolMessage = w;
|
|
7858
|
-
function h(F,
|
|
7858
|
+
function h(F, m) {
|
|
7859
7859
|
const T = M(F, e.TeleportOpcode, e.TeleportVersion);
|
|
7860
|
-
return a(T,
|
|
7860
|
+
return a(T, m);
|
|
7861
7861
|
}
|
|
7862
7862
|
e.fromProtocolMessage = h;
|
|
7863
7863
|
function o(F) {
|
|
7864
|
-
const
|
|
7864
|
+
const m = /* @__PURE__ */ Object.create(null);
|
|
7865
7865
|
let T;
|
|
7866
7866
|
for (; (T = F.next()) !== null; ) {
|
|
7867
7867
|
const p = T.key.asInt32();
|
|
7868
|
-
|
|
7868
|
+
m[p] = L.readFromTeleport(T.value.asObject());
|
|
7869
7869
|
}
|
|
7870
|
-
return
|
|
7870
|
+
return m;
|
|
7871
7871
|
}
|
|
7872
7872
|
function r(F) {
|
|
7873
|
-
const
|
|
7873
|
+
const m = /* @__PURE__ */ Object.create(null);
|
|
7874
7874
|
let T;
|
|
7875
7875
|
for (; (T = F.next()) !== null; ) {
|
|
7876
7876
|
const p = T.key.asString();
|
|
7877
|
-
|
|
7877
|
+
m[p] = e.TrackingStreamState.readFromTeleport(T.value.asObject());
|
|
7878
7878
|
}
|
|
7879
|
-
return
|
|
7879
|
+
return m;
|
|
7880
7880
|
}
|
|
7881
7881
|
function t(F) {
|
|
7882
|
-
const
|
|
7882
|
+
const m = /* @__PURE__ */ Object.create(null);
|
|
7883
7883
|
let T;
|
|
7884
7884
|
for (; (T = F.next()) !== null; ) {
|
|
7885
7885
|
const p = T.key.asInt32();
|
|
7886
|
-
|
|
7886
|
+
m[p] = N(T.value.asArray());
|
|
7887
7887
|
}
|
|
7888
|
-
return
|
|
7888
|
+
return m;
|
|
7889
7889
|
}
|
|
7890
7890
|
function n(F) {
|
|
7891
|
-
const
|
|
7891
|
+
const m = /* @__PURE__ */ Object.create(null);
|
|
7892
7892
|
let T;
|
|
7893
7893
|
for (; (T = F.next()) !== null; ) {
|
|
7894
7894
|
const p = T.key.asString();
|
|
7895
|
-
|
|
7895
|
+
m[p] = e.UIStreamState.readFromTeleport(T.value.asObject());
|
|
7896
7896
|
}
|
|
7897
|
-
return
|
|
7897
|
+
return m;
|
|
7898
7898
|
}
|
|
7899
7899
|
function u(F) {
|
|
7900
|
-
const
|
|
7900
|
+
const m = /* @__PURE__ */ Object.create(null);
|
|
7901
7901
|
let T;
|
|
7902
7902
|
for (; (T = F.next()) !== null; ) {
|
|
7903
7903
|
const p = T.key.asString();
|
|
7904
|
-
|
|
7904
|
+
m[p] = e.AudioStreamState.readFromTeleport(T.value.asObject());
|
|
7905
7905
|
}
|
|
7906
|
-
return
|
|
7906
|
+
return m;
|
|
7907
7907
|
}
|
|
7908
7908
|
function I(F) {
|
|
7909
|
-
const
|
|
7909
|
+
const m = /* @__PURE__ */ Object.create(null);
|
|
7910
7910
|
let T;
|
|
7911
7911
|
for (; (T = F.next()) !== null; ) {
|
|
7912
7912
|
const p = T.key.asString();
|
|
7913
|
-
|
|
7913
|
+
m[p] = e.VideoStreamState.readFromTeleport(T.value.asObject());
|
|
7914
7914
|
}
|
|
7915
|
-
return
|
|
7915
|
+
return m;
|
|
7916
7916
|
}
|
|
7917
7917
|
function N(F) {
|
|
7918
|
-
const
|
|
7918
|
+
const m = [];
|
|
7919
7919
|
let T;
|
|
7920
7920
|
for (; (T = F.next()) !== null; )
|
|
7921
|
-
|
|
7922
|
-
return
|
|
7921
|
+
m.push(X.readFromTeleport(T.asObject()));
|
|
7922
|
+
return m;
|
|
7923
7923
|
}
|
|
7924
7924
|
((F) => {
|
|
7925
7925
|
F.TeleportVersion = 3, F.TeleportLayoutHash = 3143891131, F.StreamIdFieldId = 161083277, F.ClientSessionIdFieldId = 325678206, F.TrackIdFieldId = 3469892363, F.InfoFieldId = 3645544153;
|
|
7926
|
-
function
|
|
7926
|
+
function m(g) {
|
|
7927
7927
|
const S = {};
|
|
7928
7928
|
return T(S), g && Object.assign(S, g), S;
|
|
7929
7929
|
}
|
|
7930
|
-
F.create =
|
|
7930
|
+
F.create = m;
|
|
7931
7931
|
function T(g) {
|
|
7932
7932
|
return g.StreamId = "", g.ClientSessionId = 0, g.TrackId = 0, g.Info = ne.create(), g;
|
|
7933
7933
|
}
|
|
7934
7934
|
F.reset = T;
|
|
7935
7935
|
function p(g) {
|
|
7936
7936
|
const S = new y(F.TeleportVersion);
|
|
7937
|
-
return
|
|
7937
|
+
return b(g, S), S.finish();
|
|
7938
7938
|
}
|
|
7939
7939
|
F.encode = p;
|
|
7940
|
-
function
|
|
7940
|
+
function b(g, S) {
|
|
7941
7941
|
S.writeStringField(F.StreamIdFieldId, g.StreamId), S.writeInt32Field(F.ClientSessionIdFieldId, g.ClientSessionId | 0), S.writeInt32Field(F.TrackIdFieldId, g.TrackId | 0), S.writeObjectField(F.InfoFieldId, ne.TeleportVersion, (O) => {
|
|
7942
7942
|
ne.writeToTeleport(g.Info, O);
|
|
7943
7943
|
});
|
|
7944
7944
|
}
|
|
7945
|
-
F.writeToTeleport =
|
|
7945
|
+
F.writeToTeleport = b;
|
|
7946
7946
|
function P(g, S) {
|
|
7947
7947
|
const O = E.create(g);
|
|
7948
7948
|
return V(O, S);
|
|
7949
7949
|
}
|
|
7950
7950
|
F.decode = P;
|
|
7951
7951
|
function V(g, S) {
|
|
7952
|
-
const O = S ??
|
|
7952
|
+
const O = S ?? m();
|
|
7953
7953
|
return T(O), _(g, O), O;
|
|
7954
7954
|
}
|
|
7955
7955
|
F.readFromTeleport = V;
|
|
@@ -7985,33 +7985,33 @@ var Be;
|
|
|
7985
7985
|
}
|
|
7986
7986
|
})(e.UIStreamState || (e.UIStreamState = {})), ((F) => {
|
|
7987
7987
|
F.TeleportVersion = 3, F.TeleportLayoutHash = 3143891131, F.StreamIdFieldId = 161083277, F.ClientSessionIdFieldId = 325678206, F.TrackIdFieldId = 3469892363, F.InfoFieldId = 3645544153;
|
|
7988
|
-
function
|
|
7988
|
+
function m(g) {
|
|
7989
7989
|
const S = {};
|
|
7990
7990
|
return T(S), g && Object.assign(S, g), S;
|
|
7991
7991
|
}
|
|
7992
|
-
F.create =
|
|
7992
|
+
F.create = m;
|
|
7993
7993
|
function T(g) {
|
|
7994
7994
|
return g.StreamId = "", g.ClientSessionId = 0, g.TrackId = 0, g.Info = re.create(), g;
|
|
7995
7995
|
}
|
|
7996
7996
|
F.reset = T;
|
|
7997
7997
|
function p(g) {
|
|
7998
7998
|
const S = new y(F.TeleportVersion);
|
|
7999
|
-
return
|
|
7999
|
+
return b(g, S), S.finish();
|
|
8000
8000
|
}
|
|
8001
8001
|
F.encode = p;
|
|
8002
|
-
function
|
|
8002
|
+
function b(g, S) {
|
|
8003
8003
|
S.writeStringField(F.StreamIdFieldId, g.StreamId), S.writeInt32Field(F.ClientSessionIdFieldId, g.ClientSessionId | 0), S.writeInt32Field(F.TrackIdFieldId, g.TrackId | 0), S.writeObjectField(F.InfoFieldId, re.TeleportVersion, (O) => {
|
|
8004
8004
|
re.writeToTeleport(g.Info, O);
|
|
8005
8005
|
});
|
|
8006
8006
|
}
|
|
8007
|
-
F.writeToTeleport =
|
|
8007
|
+
F.writeToTeleport = b;
|
|
8008
8008
|
function P(g, S) {
|
|
8009
8009
|
const O = E.create(g);
|
|
8010
8010
|
return V(O, S);
|
|
8011
8011
|
}
|
|
8012
8012
|
F.decode = P;
|
|
8013
8013
|
function V(g, S) {
|
|
8014
|
-
const O = S ??
|
|
8014
|
+
const O = S ?? m();
|
|
8015
8015
|
return T(O), _(g, O), O;
|
|
8016
8016
|
}
|
|
8017
8017
|
F.readFromTeleport = V;
|
|
@@ -8047,33 +8047,33 @@ var Be;
|
|
|
8047
8047
|
}
|
|
8048
8048
|
})(e.AudioStreamState || (e.AudioStreamState = {})), ((F) => {
|
|
8049
8049
|
F.TeleportVersion = 3, F.TeleportLayoutHash = 3143891131, F.StreamIdFieldId = 161083277, F.ClientSessionIdFieldId = 325678206, F.TrackIdFieldId = 3469892363, F.InfoFieldId = 3645544153;
|
|
8050
|
-
function
|
|
8050
|
+
function m(g) {
|
|
8051
8051
|
const S = {};
|
|
8052
8052
|
return T(S), g && Object.assign(S, g), S;
|
|
8053
8053
|
}
|
|
8054
|
-
F.create =
|
|
8054
|
+
F.create = m;
|
|
8055
8055
|
function T(g) {
|
|
8056
8056
|
return g.StreamId = "", g.ClientSessionId = 0, g.TrackId = 0, g.Info = le.create(), g;
|
|
8057
8057
|
}
|
|
8058
8058
|
F.reset = T;
|
|
8059
8059
|
function p(g) {
|
|
8060
8060
|
const S = new y(F.TeleportVersion);
|
|
8061
|
-
return
|
|
8061
|
+
return b(g, S), S.finish();
|
|
8062
8062
|
}
|
|
8063
8063
|
F.encode = p;
|
|
8064
|
-
function
|
|
8064
|
+
function b(g, S) {
|
|
8065
8065
|
S.writeStringField(F.StreamIdFieldId, g.StreamId), S.writeInt32Field(F.ClientSessionIdFieldId, g.ClientSessionId | 0), S.writeInt32Field(F.TrackIdFieldId, g.TrackId | 0), S.writeObjectField(F.InfoFieldId, le.TeleportVersion, (O) => {
|
|
8066
8066
|
le.writeToTeleport(g.Info, O);
|
|
8067
8067
|
});
|
|
8068
8068
|
}
|
|
8069
|
-
F.writeToTeleport =
|
|
8069
|
+
F.writeToTeleport = b;
|
|
8070
8070
|
function P(g, S) {
|
|
8071
8071
|
const O = E.create(g);
|
|
8072
8072
|
return V(O, S);
|
|
8073
8073
|
}
|
|
8074
8074
|
F.decode = P;
|
|
8075
8075
|
function V(g, S) {
|
|
8076
|
-
const O = S ??
|
|
8076
|
+
const O = S ?? m();
|
|
8077
8077
|
return T(O), _(g, O), O;
|
|
8078
8078
|
}
|
|
8079
8079
|
F.readFromTeleport = V;
|
|
@@ -8109,33 +8109,33 @@ var Be;
|
|
|
8109
8109
|
}
|
|
8110
8110
|
})(e.VideoStreamState || (e.VideoStreamState = {})), ((F) => {
|
|
8111
8111
|
F.TeleportVersion = 3, F.TeleportLayoutHash = 3143891131, F.StreamIdFieldId = 161083277, F.ClientSessionIdFieldId = 325678206, F.TrackIdFieldId = 3469892363, F.InfoFieldId = 3645544153;
|
|
8112
|
-
function
|
|
8112
|
+
function m(g) {
|
|
8113
8113
|
const S = {};
|
|
8114
8114
|
return T(S), g && Object.assign(S, g), S;
|
|
8115
8115
|
}
|
|
8116
|
-
F.create =
|
|
8116
|
+
F.create = m;
|
|
8117
8117
|
function T(g) {
|
|
8118
8118
|
return g.StreamId = "", g.ClientSessionId = 0, g.TrackId = 0, g.Info = oe.create(), g;
|
|
8119
8119
|
}
|
|
8120
8120
|
F.reset = T;
|
|
8121
8121
|
function p(g) {
|
|
8122
8122
|
const S = new y(F.TeleportVersion);
|
|
8123
|
-
return
|
|
8123
|
+
return b(g, S), S.finish();
|
|
8124
8124
|
}
|
|
8125
8125
|
F.encode = p;
|
|
8126
|
-
function
|
|
8126
|
+
function b(g, S) {
|
|
8127
8127
|
S.writeStringField(F.StreamIdFieldId, g.StreamId), S.writeInt32Field(F.ClientSessionIdFieldId, g.ClientSessionId | 0), S.writeInt32Field(F.TrackIdFieldId, g.TrackId | 0), S.writeObjectField(F.InfoFieldId, oe.TeleportVersion, (O) => {
|
|
8128
8128
|
oe.writeToTeleport(g.Info, O);
|
|
8129
8129
|
});
|
|
8130
8130
|
}
|
|
8131
|
-
F.writeToTeleport =
|
|
8131
|
+
F.writeToTeleport = b;
|
|
8132
8132
|
function P(g, S) {
|
|
8133
8133
|
const O = E.create(g);
|
|
8134
8134
|
return V(O, S);
|
|
8135
8135
|
}
|
|
8136
8136
|
F.decode = P;
|
|
8137
8137
|
function V(g, S) {
|
|
8138
|
-
const O = S ??
|
|
8138
|
+
const O = S ?? m();
|
|
8139
8139
|
return T(O), _(g, O), O;
|
|
8140
8140
|
}
|
|
8141
8141
|
F.readFromTeleport = V;
|
|
@@ -8244,38 +8244,38 @@ var vt;
|
|
|
8244
8244
|
e.encode = s;
|
|
8245
8245
|
function d(I, N) {
|
|
8246
8246
|
N.writeBoolField(e.DisableLegacyDefaultExtensionsFieldId, I.DisableLegacyDefaultExtensions), N.writeDictionaryField(e.DynamicConfigObsoleteFieldId, C.String, C.String, (F) => {
|
|
8247
|
-
const
|
|
8248
|
-
for (const T of Object.keys(
|
|
8249
|
-
const p = T,
|
|
8250
|
-
if (
|
|
8247
|
+
const m = I.DynamicConfigObsolete;
|
|
8248
|
+
for (const T of Object.keys(m)) {
|
|
8249
|
+
const p = T, b = m[T];
|
|
8250
|
+
if (b == null)
|
|
8251
8251
|
continue;
|
|
8252
8252
|
const P = F.beginEntry();
|
|
8253
|
-
P.writeKeyString(p), P.writeValueString(
|
|
8253
|
+
P.writeKeyString(p), P.writeValueString(b), P.complete();
|
|
8254
8254
|
}
|
|
8255
8255
|
}), N.writeArrayField(e.ExtensionsFieldId, C.Object, (F) => {
|
|
8256
|
-
for (const
|
|
8256
|
+
for (const m of I.Extensions)
|
|
8257
8257
|
F.writeObject(e.ServerExtensionInit.TeleportVersion, (T) => {
|
|
8258
|
-
e.ServerExtensionInit.writeToTeleport(
|
|
8258
|
+
e.ServerExtensionInit.writeToTeleport(m, T);
|
|
8259
8259
|
});
|
|
8260
8260
|
}), N.writeArrayField(e.TunnelPortsFieldId, C.Int32, (F) => {
|
|
8261
|
-
for (const
|
|
8262
|
-
F.writeInt32(
|
|
8261
|
+
for (const m of I.TunnelPorts)
|
|
8262
|
+
F.writeInt32(m | 0);
|
|
8263
8263
|
}), N.writeStringField(e.ChannelIdFieldId, I.ChannelId), N.writeStringField(e.SessionIdFieldId, I.SessionId), N.writeStringField(e.ChannelUrlFieldId, I.ChannelUrl), N.writeStringField(e.ChannelNameFieldId, I.ChannelName), N.writeStringField(e.DynamicConfigJsonContentFieldId, I.DynamicConfigJsonContent), N.writeStringField(e.SpaceGitRepositoryUrlFieldId, I.SpaceGitRepositoryUrl), N.writeArrayField(e.TunnelsFieldId, C.String, (F) => {
|
|
8264
|
-
for (const
|
|
8265
|
-
F.writeString(
|
|
8264
|
+
for (const m of I.Tunnels)
|
|
8265
|
+
F.writeString(m);
|
|
8266
8266
|
}), N.writeStringField(e.IkonBackendUrlFieldId, I.IkonBackendUrl), N.writeStringField(e.OrganisationNameFieldId, I.OrganisationName), N.writeArrayField(e.PluginsFieldId, C.Object, (F) => {
|
|
8267
|
-
for (const
|
|
8267
|
+
for (const m of I.Plugins)
|
|
8268
8268
|
F.writeObject(e.ServerPluginInit.TeleportVersion, (T) => {
|
|
8269
|
-
e.ServerPluginInit.writeToTeleport(
|
|
8269
|
+
e.ServerPluginInit.writeToTeleport(m, T);
|
|
8270
8270
|
});
|
|
8271
8271
|
}), N.writeStringField(e.SpaceIdFieldId, I.SpaceId), N.writeStringField(e.PrimaryUserIdFieldId, I.PrimaryUserId), N.writeStringField(e.IkonBackendTokenFieldId, I.IkonBackendToken), N.writeStringField(e.ChannelTemplateIdFieldId, I.ChannelTemplateId), N.writeDictionaryField(e.SessionIdentityFieldId, C.String, C.String, (F) => {
|
|
8272
|
-
const
|
|
8273
|
-
for (const T of Object.keys(
|
|
8274
|
-
const p = T,
|
|
8275
|
-
if (
|
|
8272
|
+
const m = I.SessionIdentity;
|
|
8273
|
+
for (const T of Object.keys(m)) {
|
|
8274
|
+
const p = T, b = m[T];
|
|
8275
|
+
if (b == null)
|
|
8276
8276
|
continue;
|
|
8277
8277
|
const P = F.beginEntry();
|
|
8278
|
-
P.writeKeyString(p), P.writeValueString(
|
|
8278
|
+
P.writeKeyString(p), P.writeValueString(b), P.complete();
|
|
8279
8279
|
}
|
|
8280
8280
|
}), N.writeStringField(e.SpaceNameFieldId, I.SpaceName);
|
|
8281
8281
|
}
|
|
@@ -8417,8 +8417,8 @@ var vt;
|
|
|
8417
8417
|
}
|
|
8418
8418
|
}
|
|
8419
8419
|
function w(I, N, F) {
|
|
8420
|
-
const
|
|
8421
|
-
return k(e.TeleportOpcode,
|
|
8420
|
+
const m = s(I);
|
|
8421
|
+
return k(e.TeleportOpcode, m, e.TeleportVersion, N, F);
|
|
8422
8422
|
}
|
|
8423
8423
|
e.toProtocolMessage = w;
|
|
8424
8424
|
function h(I, N) {
|
|
@@ -8458,8 +8458,8 @@ var vt;
|
|
|
8458
8458
|
const N = /* @__PURE__ */ Object.create(null);
|
|
8459
8459
|
let F;
|
|
8460
8460
|
for (; (F = I.next()) !== null; ) {
|
|
8461
|
-
const
|
|
8462
|
-
N[
|
|
8461
|
+
const m = F.key.asString();
|
|
8462
|
+
N[m] = F.value.asString();
|
|
8463
8463
|
}
|
|
8464
8464
|
return N;
|
|
8465
8465
|
}
|
|
@@ -8474,30 +8474,30 @@ var vt;
|
|
|
8474
8474
|
return _.Enabled = !1, _.BundleDirectoryPath = "", _.BundleDirectoryZipContent = new Uint8Array(0), _.DllName = "", _.TypeName = "", _.ConfigFilePath = "", _.ConfigJsonContent = "", _.ExtraConfigs = [], _;
|
|
8475
8475
|
}
|
|
8476
8476
|
I.reset = F;
|
|
8477
|
-
function
|
|
8477
|
+
function m(_) {
|
|
8478
8478
|
const g = new y(I.TeleportVersion);
|
|
8479
8479
|
return T(_, g), g.finish();
|
|
8480
8480
|
}
|
|
8481
|
-
I.encode =
|
|
8481
|
+
I.encode = m;
|
|
8482
8482
|
function T(_, g) {
|
|
8483
8483
|
g.writeStringField(I.BundleDirectoryPathFieldId, _.BundleDirectoryPath), g.writeBinaryField(I.BundleDirectoryZipContentFieldId, _.BundleDirectoryZipContent), g.writeStringField(I.ConfigJsonContentFieldId, _.ConfigJsonContent), g.writeStringField(I.DllNameFieldId, _.DllName), g.writeStringField(I.ConfigFilePathFieldId, _.ConfigFilePath), g.writeBoolField(I.EnabledFieldId, _.Enabled), g.writeArrayField(I.ExtraConfigsFieldId, C.Object, (S) => {
|
|
8484
8484
|
for (const O of _.ExtraConfigs)
|
|
8485
|
-
S.writeObject(e.ServerPluginInitExtraConfig.TeleportVersion, (
|
|
8486
|
-
e.ServerPluginInitExtraConfig.writeToTeleport(O,
|
|
8485
|
+
S.writeObject(e.ServerPluginInitExtraConfig.TeleportVersion, (gn) => {
|
|
8486
|
+
e.ServerPluginInitExtraConfig.writeToTeleport(O, gn);
|
|
8487
8487
|
});
|
|
8488
8488
|
}), g.writeStringField(I.TypeNameFieldId, _.TypeName);
|
|
8489
8489
|
}
|
|
8490
8490
|
I.writeToTeleport = T;
|
|
8491
8491
|
function p(_, g) {
|
|
8492
8492
|
const S = E.create(_);
|
|
8493
|
-
return
|
|
8493
|
+
return b(S, g);
|
|
8494
8494
|
}
|
|
8495
8495
|
I.decode = p;
|
|
8496
|
-
function
|
|
8496
|
+
function b(_, g) {
|
|
8497
8497
|
const S = g ?? N();
|
|
8498
8498
|
return F(S), P(_, S), S;
|
|
8499
8499
|
}
|
|
8500
|
-
I.readFromTeleport =
|
|
8500
|
+
I.readFromTeleport = b;
|
|
8501
8501
|
function P(_, g) {
|
|
8502
8502
|
let S;
|
|
8503
8503
|
for (; (S = _.next()) !== null; )
|
|
@@ -8570,25 +8570,25 @@ var vt;
|
|
|
8570
8570
|
return V.FilePath = "", V.Content = "", V;
|
|
8571
8571
|
}
|
|
8572
8572
|
I.reset = F;
|
|
8573
|
-
function
|
|
8573
|
+
function m(V) {
|
|
8574
8574
|
const _ = new y(I.TeleportVersion);
|
|
8575
8575
|
return T(V, _), _.finish();
|
|
8576
8576
|
}
|
|
8577
|
-
I.encode =
|
|
8577
|
+
I.encode = m;
|
|
8578
8578
|
function T(V, _) {
|
|
8579
8579
|
_.writeStringField(I.FilePathFieldId, V.FilePath), _.writeStringField(I.ContentFieldId, V.Content);
|
|
8580
8580
|
}
|
|
8581
8581
|
I.writeToTeleport = T;
|
|
8582
8582
|
function p(V, _) {
|
|
8583
8583
|
const g = E.create(V);
|
|
8584
|
-
return
|
|
8584
|
+
return b(g, _);
|
|
8585
8585
|
}
|
|
8586
8586
|
I.decode = p;
|
|
8587
|
-
function
|
|
8587
|
+
function b(V, _) {
|
|
8588
8588
|
const g = _ ?? N();
|
|
8589
8589
|
return F(g), P(V, g), g;
|
|
8590
8590
|
}
|
|
8591
|
-
I.readFromTeleport =
|
|
8591
|
+
I.readFromTeleport = b;
|
|
8592
8592
|
function P(V, _) {
|
|
8593
8593
|
let g;
|
|
8594
8594
|
for (; (g = V.next()) !== null; )
|
|
@@ -8618,25 +8618,25 @@ var vt;
|
|
|
8618
8618
|
return V.Enabled = !1, V.TypeName = "", V.ConfigJsonContent = "", V;
|
|
8619
8619
|
}
|
|
8620
8620
|
I.reset = F;
|
|
8621
|
-
function
|
|
8621
|
+
function m(V) {
|
|
8622
8622
|
const _ = new y(I.TeleportVersion);
|
|
8623
8623
|
return T(V, _), _.finish();
|
|
8624
8624
|
}
|
|
8625
|
-
I.encode =
|
|
8625
|
+
I.encode = m;
|
|
8626
8626
|
function T(V, _) {
|
|
8627
8627
|
_.writeStringField(I.ConfigJsonContentFieldId, V.ConfigJsonContent), _.writeBoolField(I.EnabledFieldId, V.Enabled), _.writeStringField(I.TypeNameFieldId, V.TypeName);
|
|
8628
8628
|
}
|
|
8629
8629
|
I.writeToTeleport = T;
|
|
8630
8630
|
function p(V, _) {
|
|
8631
8631
|
const g = E.create(V);
|
|
8632
|
-
return
|
|
8632
|
+
return b(g, _);
|
|
8633
8633
|
}
|
|
8634
8634
|
I.decode = p;
|
|
8635
|
-
function
|
|
8635
|
+
function b(V, _) {
|
|
8636
8636
|
const g = _ ?? N();
|
|
8637
8637
|
return F(g), P(V, g), g;
|
|
8638
8638
|
}
|
|
8639
|
-
I.readFromTeleport =
|
|
8639
|
+
I.readFromTeleport = b;
|
|
8640
8640
|
function P(V, _) {
|
|
8641
8641
|
let g;
|
|
8642
8642
|
for (; (g = V.next()) !== null; )
|
|
@@ -8687,8 +8687,8 @@ var jt;
|
|
|
8687
8687
|
const N = I, F = u[I];
|
|
8688
8688
|
if (F == null)
|
|
8689
8689
|
continue;
|
|
8690
|
-
const
|
|
8691
|
-
|
|
8690
|
+
const m = n.beginEntry();
|
|
8691
|
+
m.writeKeyString(N), m.writeValueString(F), m.complete();
|
|
8692
8692
|
}
|
|
8693
8693
|
});
|
|
8694
8694
|
}
|
|
@@ -9549,7 +9549,7 @@ var Qt;
|
|
|
9549
9549
|
}
|
|
9550
9550
|
e.fromProtocolMessage = h;
|
|
9551
9551
|
})(Qt || (Qt = {}));
|
|
9552
|
-
var
|
|
9552
|
+
var Zt;
|
|
9553
9553
|
((e) => {
|
|
9554
9554
|
e.TeleportVersion = 1, e.TeleportOpcode = 65541, e.TeleportLayoutHash = 720504711, e.ClientContextFieldId = 2802434353;
|
|
9555
9555
|
function l(o) {
|
|
@@ -9604,8 +9604,8 @@ var qt;
|
|
|
9604
9604
|
return a(t, r);
|
|
9605
9605
|
}
|
|
9606
9606
|
e.fromProtocolMessage = h;
|
|
9607
|
-
})(
|
|
9608
|
-
var
|
|
9607
|
+
})(Zt || (Zt = {}));
|
|
9608
|
+
var qt;
|
|
9609
9609
|
((e) => {
|
|
9610
9610
|
e.TeleportVersion = 1, e.TeleportOpcode = 65542, e.TeleportLayoutHash = 720504711, e.ClientContextFieldId = 2802434353;
|
|
9611
9611
|
function l(o) {
|
|
@@ -9660,7 +9660,7 @@ var Zt;
|
|
|
9660
9660
|
return a(t, r);
|
|
9661
9661
|
}
|
|
9662
9662
|
e.fromProtocolMessage = h;
|
|
9663
|
-
})(
|
|
9663
|
+
})(qt || (qt = {}));
|
|
9664
9664
|
var j = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", e[e.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", e[e.GROUP_CORE = 65536] = "GROUP_CORE", e[e.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", e[e.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", e[e.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", e[e.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", e[e.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", e[e.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", e[e.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", e[e.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", e[e.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", e[e.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", e[e.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", e[e.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", e[e.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", e[e.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", e[e.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", e[e.CORE_SERVER_START = 65552] = "CORE_SERVER_START", e[e.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", e[e.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", e[e.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", e[e.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", e[e.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", e[e.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", e[e.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", e[e.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", e[e.GROUP_EVENTS = 262144] = "GROUP_EVENTS", e[e.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", e[e.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", e[e.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", e[e.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", e[e.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", e[e.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", e[e.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", e[e.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", e[e.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", e[e.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", e[e.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", e[e.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", e[e.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", e[e.ACTION_CALL = 1048577] = "ACTION_CALL", e[e.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", e[e.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", e[e.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", e[e.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", e[e.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", e[e.ACTION_TAP = 1048583] = "ACTION_TAP", e[e.ACTION_PAN = 1048584] = "ACTION_PAN", e[e.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", e[e.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", e[e.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", e[e.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", e[e.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", e[e.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", e[e.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", e[e.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", e[e.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", e[e.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", e[e.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", e[e.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", e[e.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", e[e.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", e[e.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", e[e.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", e[e.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", e[e.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", e[e.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", e[e.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", e[e.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", e[e.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", e[e.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", e[e.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", e[e.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", e[e.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", e[e.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", e[e.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", e[e.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", e[e.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", e[e.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", e[e.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", e[e.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", e[e.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", e[e.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", e[e.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", e[e.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", e[e.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", e[e.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", e[e.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", e[e.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", e[e.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", e[e.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", e[e.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", e[e.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", e[e.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", e[e.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", e[e.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", e[e.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", e[e.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", e[e.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", e[e.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", e[e.ACTION_CALL2 = 1048637] = "ACTION_CALL2", e[e.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", e[e.GROUP_UI = 2097152] = "GROUP_UI", e[e.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", e[e.UI_STREAM_END = 2097154] = "UI_STREAM_END", e[e.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", e[e.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", e[e.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", e[e.UI_SECTION_END = 2097158] = "UI_SECTION_END", e[e.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", e[e.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", e[e.UI_LIST_END = 2097161] = "UI_LIST_END", e[e.UI_TEXT = 2097162] = "UI_TEXT", e[e.UI_HEADER = 2097163] = "UI_HEADER", e[e.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", e[e.UI_BUTTON = 2097165] = "UI_BUTTON", e[e.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", e[e.UI_IMAGE = 2097167] = "UI_IMAGE", e[e.UI_FILE = 2097168] = "UI_FILE", e[e.UI_BADGE = 2097169] = "UI_BADGE", e[e.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", e[e.UI_MAP = 2097171] = "UI_MAP", e[e.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", e[e.UI_ICON = 2097173] = "UI_ICON", e[e.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", e[e.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", e[e.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", e[e.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", e[e.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", e[e.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", e[e.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", e[e.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", e[e.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", e[e.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", e[e.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", e[e.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", e[e.UI_QS = 2097186] = "UI_QS", e[e.UI_ELEMENT = 2097187] = "UI_ELEMENT", e[e.UI_STYLES = 2097188] = "UI_STYLES", e[e.UI_SVG = 2097189] = "UI_SVG", e[e.UI_UPDATE = 2097190] = "UI_UPDATE", e[e.UI_INIT = 2097191] = "UI_INIT", e[e.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", e[e.GROUP_COMMON = 4128768] = "GROUP_COMMON", e[e.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", e[e.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", e[e.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", e[e.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", e[e.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", e[e.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", e[e.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", e[e.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", e[e.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", e[e.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", e[e.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", e[e.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", e[e.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", e[e.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", e[e.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", e[e.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", e[e.GROUP_SCENE = 33554432] = "GROUP_SCENE", e[e.SCENE_MESH = 33554433] = "SCENE_MESH", e[e.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", e[e.GROUP_ALL = 67043328] = "GROUP_ALL", e[e.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", e))(j || {}), Bt;
|
|
9665
9665
|
((e) => {
|
|
9666
9666
|
e.TeleportVersion = 1, e.TeleportOpcode = 33554434, e.TeleportLayoutHash = 2736242701, e.SubIdFieldId = 53696160, e.SerializerTypeFieldId = 945836134, e.ElementCountFieldId = 2575916304, e.StrideSizeFieldId = 2643117937, e.ByteOffsetFieldId = 2645860747, e.TypeFieldId = 3167053791, e.TypeSizeFieldId = 3335201933, e.ByteArrayFieldId = 4137315252, e.ElementOffsetFieldId = 4223202547;
|
|
@@ -10180,8 +10180,8 @@ var ro;
|
|
|
10180
10180
|
((t) => {
|
|
10181
10181
|
t.TeleportVersion = 1, t.TeleportLayoutHash = 4085725210, t.NameFieldId = 1107713536, t.ValueFieldId = 1405462580, t.GroupFieldId = 2111279390;
|
|
10182
10182
|
function n(p) {
|
|
10183
|
-
const
|
|
10184
|
-
return u(
|
|
10183
|
+
const b = {};
|
|
10184
|
+
return u(b), p && Object.assign(b, p), b;
|
|
10185
10185
|
}
|
|
10186
10186
|
t.create = n;
|
|
10187
10187
|
function u(p) {
|
|
@@ -10189,44 +10189,44 @@ var ro;
|
|
|
10189
10189
|
}
|
|
10190
10190
|
t.reset = u;
|
|
10191
10191
|
function I(p) {
|
|
10192
|
-
const
|
|
10193
|
-
return N(p,
|
|
10192
|
+
const b = new y(t.TeleportVersion);
|
|
10193
|
+
return N(p, b), b.finish();
|
|
10194
10194
|
}
|
|
10195
10195
|
t.encode = I;
|
|
10196
|
-
function N(p,
|
|
10197
|
-
|
|
10196
|
+
function N(p, b) {
|
|
10197
|
+
b.writeStringField(t.NameFieldId, p.Name), b.writeStringField(t.ValueFieldId, p.Value), b.writeStringField(t.GroupFieldId, p.Group);
|
|
10198
10198
|
}
|
|
10199
10199
|
t.writeToTeleport = N;
|
|
10200
|
-
function F(p,
|
|
10200
|
+
function F(p, b) {
|
|
10201
10201
|
const P = E.create(p);
|
|
10202
|
-
return
|
|
10202
|
+
return m(P, b);
|
|
10203
10203
|
}
|
|
10204
10204
|
t.decode = F;
|
|
10205
|
-
function
|
|
10206
|
-
const P =
|
|
10205
|
+
function m(p, b) {
|
|
10206
|
+
const P = b ?? n();
|
|
10207
10207
|
return u(P), T(p, P), P;
|
|
10208
10208
|
}
|
|
10209
|
-
t.readFromTeleport =
|
|
10210
|
-
function T(p,
|
|
10209
|
+
t.readFromTeleport = m;
|
|
10210
|
+
function T(p, b) {
|
|
10211
10211
|
let P;
|
|
10212
10212
|
for (; (P = p.next()) !== null; )
|
|
10213
10213
|
switch (P.fieldId) {
|
|
10214
10214
|
case t.NameFieldId: {
|
|
10215
10215
|
if (P.isNull)
|
|
10216
10216
|
throw new Error("Field Name cannot be null");
|
|
10217
|
-
|
|
10217
|
+
b.Name = P.asString();
|
|
10218
10218
|
break;
|
|
10219
10219
|
}
|
|
10220
10220
|
case t.ValueFieldId: {
|
|
10221
10221
|
if (P.isNull)
|
|
10222
10222
|
throw new Error("Field Value cannot be null");
|
|
10223
|
-
|
|
10223
|
+
b.Value = P.asString();
|
|
10224
10224
|
break;
|
|
10225
10225
|
}
|
|
10226
10226
|
case t.GroupFieldId: {
|
|
10227
10227
|
if (P.isNull)
|
|
10228
10228
|
throw new Error("Field Group cannot be null");
|
|
10229
|
-
|
|
10229
|
+
b.Group = P.asString();
|
|
10230
10230
|
break;
|
|
10231
10231
|
}
|
|
10232
10232
|
}
|
|
@@ -11183,12 +11183,12 @@ var fo;
|
|
|
11183
11183
|
u.writeDictionaryField(e.PayloadsFieldId, C.String, C.Object, (I) => {
|
|
11184
11184
|
const N = n.Payloads;
|
|
11185
11185
|
for (const F of Object.keys(N)) {
|
|
11186
|
-
const
|
|
11186
|
+
const m = F, T = N[F];
|
|
11187
11187
|
if (T == null)
|
|
11188
11188
|
continue;
|
|
11189
11189
|
const p = I.beginEntry();
|
|
11190
|
-
p.writeKeyString(
|
|
11191
|
-
|
|
11190
|
+
p.writeKeyString(m), p.writeValueObject(q.TeleportVersion, (b) => {
|
|
11191
|
+
q.writeToTeleport(T, b);
|
|
11192
11192
|
}), p.complete();
|
|
11193
11193
|
}
|
|
11194
11194
|
}), u.writeStringField(e.StyleIdFieldId, n.StyleId), u.writeStringField(e.NameFieldId, n.Name), u.writeStringField(e.DescriptionFieldId, n.Description), u.writeInt32Field(e.ElementIdFieldId, n.ElementId | 0), u.writeArrayField(e.LabelsFieldId, C.String, (I) => {
|
|
@@ -11197,12 +11197,12 @@ var fo;
|
|
|
11197
11197
|
}), u.writeStringField(e.ArgumentsJsonFieldId, n.ArgumentsJson), u.writeDictionaryField(e.ActionIdsFieldId, C.String, C.Object, (I) => {
|
|
11198
11198
|
const N = n.ActionIds;
|
|
11199
11199
|
for (const F of Object.keys(N)) {
|
|
11200
|
-
const
|
|
11200
|
+
const m = F, T = N[F];
|
|
11201
11201
|
if (T == null)
|
|
11202
11202
|
continue;
|
|
11203
11203
|
const p = I.beginEntry();
|
|
11204
|
-
p.writeKeyString(
|
|
11205
|
-
we.writeToTeleport(T,
|
|
11204
|
+
p.writeKeyString(m), p.writeValueObject(we.TeleportVersion, (b) => {
|
|
11205
|
+
we.writeToTeleport(T, b);
|
|
11206
11206
|
}), p.complete();
|
|
11207
11207
|
}
|
|
11208
11208
|
});
|
|
@@ -11294,7 +11294,7 @@ var fo;
|
|
|
11294
11294
|
let I;
|
|
11295
11295
|
for (; (I = n.next()) !== null; ) {
|
|
11296
11296
|
const N = I.key.asString();
|
|
11297
|
-
u[N] =
|
|
11297
|
+
u[N] = q.readFromTeleport(I.value.asObject());
|
|
11298
11298
|
}
|
|
11299
11299
|
return u;
|
|
11300
11300
|
}
|
|
@@ -11469,53 +11469,53 @@ var wo;
|
|
|
11469
11469
|
}
|
|
11470
11470
|
r.writeToTeleport = I;
|
|
11471
11471
|
function N(T, p) {
|
|
11472
|
-
const
|
|
11473
|
-
return F(
|
|
11472
|
+
const b = E.create(T);
|
|
11473
|
+
return F(b, p);
|
|
11474
11474
|
}
|
|
11475
11475
|
r.decode = N;
|
|
11476
11476
|
function F(T, p) {
|
|
11477
|
-
const
|
|
11478
|
-
return n(
|
|
11477
|
+
const b = p ?? t();
|
|
11478
|
+
return n(b), m(T, b), b;
|
|
11479
11479
|
}
|
|
11480
11480
|
r.readFromTeleport = F;
|
|
11481
|
-
function
|
|
11482
|
-
let
|
|
11483
|
-
for (; (
|
|
11484
|
-
switch (
|
|
11481
|
+
function m(T, p) {
|
|
11482
|
+
let b;
|
|
11483
|
+
for (; (b = T.next()) !== null; )
|
|
11484
|
+
switch (b.fieldId) {
|
|
11485
11485
|
case r.FileNameFieldId: {
|
|
11486
|
-
if (
|
|
11486
|
+
if (b.isNull)
|
|
11487
11487
|
throw new Error("Field FileName cannot be null");
|
|
11488
|
-
p.FileName =
|
|
11488
|
+
p.FileName = b.asString();
|
|
11489
11489
|
break;
|
|
11490
11490
|
}
|
|
11491
11491
|
case r.SizeFieldId: {
|
|
11492
|
-
if (
|
|
11492
|
+
if (b.isNull)
|
|
11493
11493
|
throw new Error("Field Size cannot be null");
|
|
11494
|
-
p.Size =
|
|
11494
|
+
p.Size = b.asInt32();
|
|
11495
11495
|
break;
|
|
11496
11496
|
}
|
|
11497
11497
|
case r.NameFieldId: {
|
|
11498
|
-
if (
|
|
11498
|
+
if (b.isNull)
|
|
11499
11499
|
throw new Error("Field Name cannot be null");
|
|
11500
|
-
p.Name =
|
|
11500
|
+
p.Name = b.asString();
|
|
11501
11501
|
break;
|
|
11502
11502
|
}
|
|
11503
11503
|
case r.CreatedAtFieldId: {
|
|
11504
|
-
if (
|
|
11504
|
+
if (b.isNull)
|
|
11505
11505
|
throw new Error("Field CreatedAt cannot be null");
|
|
11506
|
-
p.CreatedAt =
|
|
11506
|
+
p.CreatedAt = b.asString();
|
|
11507
11507
|
break;
|
|
11508
11508
|
}
|
|
11509
11509
|
case r.UrlFieldId: {
|
|
11510
|
-
if (
|
|
11510
|
+
if (b.isNull)
|
|
11511
11511
|
throw new Error("Field Url cannot be null");
|
|
11512
|
-
p.Url =
|
|
11512
|
+
p.Url = b.asString();
|
|
11513
11513
|
break;
|
|
11514
11514
|
}
|
|
11515
11515
|
case r.IdFieldId: {
|
|
11516
|
-
if (
|
|
11516
|
+
if (b.isNull)
|
|
11517
11517
|
throw new Error("Field Id cannot be null");
|
|
11518
|
-
p.Id =
|
|
11518
|
+
p.Id = b.asString();
|
|
11519
11519
|
break;
|
|
11520
11520
|
}
|
|
11521
11521
|
}
|
|
@@ -12006,7 +12006,7 @@ var Fo;
|
|
|
12006
12006
|
return t;
|
|
12007
12007
|
}
|
|
12008
12008
|
})(Fo || (Fo = {}));
|
|
12009
|
-
var
|
|
12009
|
+
var bo;
|
|
12010
12010
|
((e) => {
|
|
12011
12011
|
e.TeleportVersion = 1, e.TeleportOpcode = 2097167, e.TeleportLayoutHash = 902326874, e.DropActionIdFieldId = 125663982, e.DragOverActionIdFieldId = 397939120, e.DragEndActionIdFieldId = 604708310, e.DragLeaveActionIdFieldId = 807214320, e.StyleIdFieldId = 979822885, e.NameFieldId = 1107713536, e.PressStartActionIdFieldId = 1115189793, e.PressChangeActionIdFieldId = 1297223534, e.PressEndActionIdFieldId = 1604349297, e.ElementIdFieldId = 1753055760, e.DragStartActionIdFieldId = 2069639306, e.LabelsFieldId = 2329079073, e.UrlFieldId = 2643541312, e.MimeFieldId = 2697635005, e.ClickActionIdFieldId = 2904763197, e.DataFieldId = 2986785889, e.DragEnterActionIdFieldId = 3852067844, e.PressUpActionIdFieldId = 4113077146;
|
|
12012
12012
|
function l(r) {
|
|
@@ -12171,8 +12171,8 @@ var mo;
|
|
|
12171
12171
|
t.push(n.asString());
|
|
12172
12172
|
return t;
|
|
12173
12173
|
}
|
|
12174
|
-
})(
|
|
12175
|
-
var
|
|
12174
|
+
})(bo || (bo = {}));
|
|
12175
|
+
var mo;
|
|
12176
12176
|
((e) => {
|
|
12177
12177
|
e.TeleportVersion = 1, e.TeleportOpcode = 2097191, e.TeleportLayoutHash = 2491188219, e.ModulesFieldId = 2824693793;
|
|
12178
12178
|
function l(r) {
|
|
@@ -12255,42 +12255,42 @@ var bo;
|
|
|
12255
12255
|
r.encode = u;
|
|
12256
12256
|
function I(T, p) {
|
|
12257
12257
|
p.writeStringField(r.NameFieldId, T.Name);
|
|
12258
|
-
const
|
|
12259
|
-
|
|
12258
|
+
const b = T.Javascript;
|
|
12259
|
+
b != null && p.writeStringField(r.JavascriptFieldId, b);
|
|
12260
12260
|
}
|
|
12261
12261
|
r.writeToTeleport = I;
|
|
12262
12262
|
function N(T, p) {
|
|
12263
|
-
const
|
|
12264
|
-
return F(
|
|
12263
|
+
const b = E.create(T);
|
|
12264
|
+
return F(b, p);
|
|
12265
12265
|
}
|
|
12266
12266
|
r.decode = N;
|
|
12267
12267
|
function F(T, p) {
|
|
12268
|
-
const
|
|
12269
|
-
return n(
|
|
12268
|
+
const b = p ?? t();
|
|
12269
|
+
return n(b), m(T, b), b;
|
|
12270
12270
|
}
|
|
12271
12271
|
r.readFromTeleport = F;
|
|
12272
|
-
function
|
|
12273
|
-
let
|
|
12274
|
-
for (; (
|
|
12275
|
-
switch (
|
|
12272
|
+
function m(T, p) {
|
|
12273
|
+
let b;
|
|
12274
|
+
for (; (b = T.next()) !== null; )
|
|
12275
|
+
switch (b.fieldId) {
|
|
12276
12276
|
case r.NameFieldId: {
|
|
12277
|
-
if (
|
|
12277
|
+
if (b.isNull)
|
|
12278
12278
|
throw new Error("Field Name cannot be null");
|
|
12279
|
-
p.Name =
|
|
12279
|
+
p.Name = b.asString();
|
|
12280
12280
|
break;
|
|
12281
12281
|
}
|
|
12282
12282
|
case r.JavascriptFieldId: {
|
|
12283
|
-
if (
|
|
12283
|
+
if (b.isNull) {
|
|
12284
12284
|
p.Javascript = void 0;
|
|
12285
12285
|
break;
|
|
12286
12286
|
}
|
|
12287
|
-
p.Javascript =
|
|
12287
|
+
p.Javascript = b.asString();
|
|
12288
12288
|
break;
|
|
12289
12289
|
}
|
|
12290
12290
|
}
|
|
12291
12291
|
}
|
|
12292
12292
|
})(e.UIInitModule || (e.UIInitModule = {}));
|
|
12293
|
-
})(
|
|
12293
|
+
})(mo || (mo = {}));
|
|
12294
12294
|
var yo;
|
|
12295
12295
|
((e) => {
|
|
12296
12296
|
e.TeleportVersion = 1, e.TeleportOpcode = 2097180, e.TeleportLayoutHash = 4201975843, e.VariantFieldId = 224706665, e.StyleIdFieldId = 979822885, e.NameFieldId = 1107713536, e.ColorFieldId = 1668824531, e.ElementIdFieldId = 1753055760, e.InitialValueFieldId = 2273729899, e.RowsFieldId = 2325885894, e.LabelsFieldId = 2329079073, e.UpdateActionIdFieldId = 3146631935, e.SubmitActionIdFieldId = 4282408692;
|
|
@@ -12734,8 +12734,8 @@ var Mo;
|
|
|
12734
12734
|
((t) => {
|
|
12735
12735
|
t.TeleportVersion = 1, t.TeleportLayoutHash = 2810867083, t.TitleFieldId = 347326591, t.LongitudeFieldId = 3612634469, t.LatitudeFieldId = 4280239745;
|
|
12736
12736
|
function n(p) {
|
|
12737
|
-
const
|
|
12738
|
-
return u(
|
|
12737
|
+
const b = {};
|
|
12738
|
+
return u(b), p && Object.assign(b, p), b;
|
|
12739
12739
|
}
|
|
12740
12740
|
t.create = n;
|
|
12741
12741
|
function u(p) {
|
|
@@ -12743,44 +12743,44 @@ var Mo;
|
|
|
12743
12743
|
}
|
|
12744
12744
|
t.reset = u;
|
|
12745
12745
|
function I(p) {
|
|
12746
|
-
const
|
|
12747
|
-
return N(p,
|
|
12746
|
+
const b = new y(t.TeleportVersion);
|
|
12747
|
+
return N(p, b), b.finish();
|
|
12748
12748
|
}
|
|
12749
12749
|
t.encode = I;
|
|
12750
|
-
function N(p,
|
|
12751
|
-
|
|
12750
|
+
function N(p, b) {
|
|
12751
|
+
b.writeStringField(t.TitleFieldId, p.Title), b.writeFloat32Field(t.LongitudeFieldId, p.Longitude), b.writeFloat32Field(t.LatitudeFieldId, p.Latitude);
|
|
12752
12752
|
}
|
|
12753
12753
|
t.writeToTeleport = N;
|
|
12754
|
-
function F(p,
|
|
12754
|
+
function F(p, b) {
|
|
12755
12755
|
const P = E.create(p);
|
|
12756
|
-
return
|
|
12756
|
+
return m(P, b);
|
|
12757
12757
|
}
|
|
12758
12758
|
t.decode = F;
|
|
12759
|
-
function
|
|
12760
|
-
const P =
|
|
12759
|
+
function m(p, b) {
|
|
12760
|
+
const P = b ?? n();
|
|
12761
12761
|
return u(P), T(p, P), P;
|
|
12762
12762
|
}
|
|
12763
|
-
t.readFromTeleport =
|
|
12764
|
-
function T(p,
|
|
12763
|
+
t.readFromTeleport = m;
|
|
12764
|
+
function T(p, b) {
|
|
12765
12765
|
let P;
|
|
12766
12766
|
for (; (P = p.next()) !== null; )
|
|
12767
12767
|
switch (P.fieldId) {
|
|
12768
12768
|
case t.TitleFieldId: {
|
|
12769
12769
|
if (P.isNull)
|
|
12770
12770
|
throw new Error("Field Title cannot be null");
|
|
12771
|
-
|
|
12771
|
+
b.Title = P.asString();
|
|
12772
12772
|
break;
|
|
12773
12773
|
}
|
|
12774
12774
|
case t.LongitudeFieldId: {
|
|
12775
12775
|
if (P.isNull)
|
|
12776
12776
|
throw new Error("Field Longitude cannot be null");
|
|
12777
|
-
|
|
12777
|
+
b.Longitude = P.asFloat32();
|
|
12778
12778
|
break;
|
|
12779
12779
|
}
|
|
12780
12780
|
case t.LatitudeFieldId: {
|
|
12781
12781
|
if (P.isNull)
|
|
12782
12782
|
throw new Error("Field Latitude cannot be null");
|
|
12783
|
-
|
|
12783
|
+
b.Latitude = P.asFloat32();
|
|
12784
12784
|
break;
|
|
12785
12785
|
}
|
|
12786
12786
|
}
|
|
@@ -12881,7 +12881,7 @@ var ko;
|
|
|
12881
12881
|
return t;
|
|
12882
12882
|
}
|
|
12883
12883
|
})(ko || (ko = {}));
|
|
12884
|
-
var
|
|
12884
|
+
var q;
|
|
12885
12885
|
((e) => {
|
|
12886
12886
|
e.TeleportVersion = 1, e.TeleportOpcode = 0, e.TeleportLayoutHash = 1537116481, e.ValueFieldId = 1405462580, e.MimeTypeFieldId = 2968276160;
|
|
12887
12887
|
function l(o) {
|
|
@@ -12940,7 +12940,7 @@ var Z;
|
|
|
12940
12940
|
return a(t, r);
|
|
12941
12941
|
}
|
|
12942
12942
|
e.fromProtocolMessage = h;
|
|
12943
|
-
})(
|
|
12943
|
+
})(q || (q = {}));
|
|
12944
12944
|
var So;
|
|
12945
12945
|
((e) => {
|
|
12946
12946
|
e.TeleportVersion = 1, e.TeleportOpcode = 2097181, e.TeleportLayoutHash = 393918750, e.PercentageFieldId = 117496938, e.StyleIdFieldId = 979822885, e.ElementIdFieldId = 1753055760, e.LabelsFieldId = 2329079073;
|
|
@@ -13047,11 +13047,11 @@ var Po;
|
|
|
13047
13047
|
}), n.writeStringField(e.EventActionIdFieldId, t.EventActionId), n.writeDictionaryField(e.ArgumentsJsonFieldId, C.String, C.String, (u) => {
|
|
13048
13048
|
const I = t.ArgumentsJson;
|
|
13049
13049
|
for (const N of Object.keys(I)) {
|
|
13050
|
-
const F = N,
|
|
13051
|
-
if (
|
|
13050
|
+
const F = N, m = I[N];
|
|
13051
|
+
if (m == null)
|
|
13052
13052
|
continue;
|
|
13053
13053
|
const T = u.beginEntry();
|
|
13054
|
-
T.writeKeyString(F), T.writeValueString(
|
|
13054
|
+
T.writeKeyString(F), T.writeValueString(m), T.complete();
|
|
13055
13055
|
}
|
|
13056
13056
|
});
|
|
13057
13057
|
}
|
|
@@ -13887,8 +13887,8 @@ var xo;
|
|
|
13887
13887
|
const N = I, F = u[I];
|
|
13888
13888
|
if (F == null)
|
|
13889
13889
|
continue;
|
|
13890
|
-
const
|
|
13891
|
-
|
|
13890
|
+
const m = n.beginEntry();
|
|
13891
|
+
m.writeKeyString(N), m.writeValueString(F), m.complete();
|
|
13892
13892
|
}
|
|
13893
13893
|
});
|
|
13894
13894
|
}
|
|
@@ -14009,8 +14009,8 @@ var Wo;
|
|
|
14009
14009
|
((r) => {
|
|
14010
14010
|
r.TeleportVersion = 1, r.TeleportLayoutHash = 2452306282, r.StyleIdFieldId = 979822885, r.StyleFieldId = 2374537704;
|
|
14011
14011
|
function t(p) {
|
|
14012
|
-
const
|
|
14013
|
-
return n(
|
|
14012
|
+
const b = {};
|
|
14013
|
+
return n(b), p && Object.assign(b, p), b;
|
|
14014
14014
|
}
|
|
14015
14015
|
r.create = t;
|
|
14016
14016
|
function n(p) {
|
|
@@ -14018,12 +14018,12 @@ var Wo;
|
|
|
14018
14018
|
}
|
|
14019
14019
|
r.reset = n;
|
|
14020
14020
|
function u(p) {
|
|
14021
|
-
const
|
|
14022
|
-
return I(p,
|
|
14021
|
+
const b = new y(r.TeleportVersion);
|
|
14022
|
+
return I(p, b), b.finish();
|
|
14023
14023
|
}
|
|
14024
14024
|
r.encode = u;
|
|
14025
|
-
function I(p,
|
|
14026
|
-
|
|
14025
|
+
function I(p, b) {
|
|
14026
|
+
b.writeStringField(r.StyleIdFieldId, p.StyleId), b.writeDictionaryField(r.StyleFieldId, C.String, C.String, (P) => {
|
|
14027
14027
|
const V = p.Style;
|
|
14028
14028
|
for (const _ of Object.keys(V)) {
|
|
14029
14029
|
const g = _, S = V[_];
|
|
@@ -14035,42 +14035,42 @@ var Wo;
|
|
|
14035
14035
|
});
|
|
14036
14036
|
}
|
|
14037
14037
|
r.writeToTeleport = I;
|
|
14038
|
-
function N(p,
|
|
14038
|
+
function N(p, b) {
|
|
14039
14039
|
const P = E.create(p);
|
|
14040
|
-
return F(P,
|
|
14040
|
+
return F(P, b);
|
|
14041
14041
|
}
|
|
14042
14042
|
r.decode = N;
|
|
14043
|
-
function F(p,
|
|
14044
|
-
const P =
|
|
14045
|
-
return n(P),
|
|
14043
|
+
function F(p, b) {
|
|
14044
|
+
const P = b ?? t();
|
|
14045
|
+
return n(P), m(p, P), P;
|
|
14046
14046
|
}
|
|
14047
14047
|
r.readFromTeleport = F;
|
|
14048
|
-
function
|
|
14048
|
+
function m(p, b) {
|
|
14049
14049
|
let P;
|
|
14050
14050
|
for (; (P = p.next()) !== null; )
|
|
14051
14051
|
switch (P.fieldId) {
|
|
14052
14052
|
case r.StyleIdFieldId: {
|
|
14053
14053
|
if (P.isNull)
|
|
14054
14054
|
throw new Error("Field StyleId cannot be null");
|
|
14055
|
-
|
|
14055
|
+
b.StyleId = P.asString();
|
|
14056
14056
|
break;
|
|
14057
14057
|
}
|
|
14058
14058
|
case r.StyleFieldId: {
|
|
14059
14059
|
if (P.isNull)
|
|
14060
14060
|
throw new Error("Field Style cannot be null");
|
|
14061
|
-
|
|
14061
|
+
b.Style = T(P.asDictionary());
|
|
14062
14062
|
break;
|
|
14063
14063
|
}
|
|
14064
14064
|
}
|
|
14065
14065
|
}
|
|
14066
14066
|
function T(p) {
|
|
14067
|
-
const
|
|
14067
|
+
const b = /* @__PURE__ */ Object.create(null);
|
|
14068
14068
|
let P;
|
|
14069
14069
|
for (; (P = p.next()) !== null; ) {
|
|
14070
14070
|
const V = P.key.asString();
|
|
14071
|
-
|
|
14071
|
+
b[V] = P.value.asString();
|
|
14072
14072
|
}
|
|
14073
|
-
return
|
|
14073
|
+
return b;
|
|
14074
14074
|
}
|
|
14075
14075
|
})(e.UIStylesBatchItem || (e.UIStylesBatchItem = {}));
|
|
14076
14076
|
})(Wo || (Wo = {}));
|
|
@@ -14098,10 +14098,10 @@ var Ro;
|
|
|
14098
14098
|
const N = I, F = u[I];
|
|
14099
14099
|
if (F == null)
|
|
14100
14100
|
continue;
|
|
14101
|
-
const
|
|
14102
|
-
|
|
14103
|
-
|
|
14104
|
-
}),
|
|
14101
|
+
const m = n.beginEntry();
|
|
14102
|
+
m.writeKeyString(N), m.writeValueObject(q.TeleportVersion, (T) => {
|
|
14103
|
+
q.writeToTeleport(F, T);
|
|
14104
|
+
}), m.complete();
|
|
14105
14105
|
}
|
|
14106
14106
|
});
|
|
14107
14107
|
}
|
|
@@ -14149,7 +14149,7 @@ var Ro;
|
|
|
14149
14149
|
let n;
|
|
14150
14150
|
for (; (n = r.next()) !== null; ) {
|
|
14151
14151
|
const u = n.key.asString();
|
|
14152
|
-
t[u] =
|
|
14152
|
+
t[u] = q.readFromTeleport(n.value.asObject());
|
|
14153
14153
|
}
|
|
14154
14154
|
return t;
|
|
14155
14155
|
}
|
|
@@ -14508,6 +14508,15 @@ var $o;
|
|
|
14508
14508
|
}
|
|
14509
14509
|
e.fromProtocolMessage = h;
|
|
14510
14510
|
})($o || ($o = {}));
|
|
14511
|
+
function Vn(e) {
|
|
14512
|
+
return new Worker(
|
|
14513
|
+
"/assets/protocol-worker-DZqyPqA2.js",
|
|
14514
|
+
{
|
|
14515
|
+
type: "module",
|
|
14516
|
+
name: e?.name
|
|
14517
|
+
}
|
|
14518
|
+
);
|
|
14519
|
+
}
|
|
14511
14520
|
class ar extends Error {
|
|
14512
14521
|
constructor(l, i) {
|
|
14513
14522
|
super(l), this.cause = i, this.name = "ConnectionError";
|
|
@@ -14528,32 +14537,32 @@ class cr extends A {
|
|
|
14528
14537
|
super(`No keepalive received within ${l}ms`), this.name = "KeepaliveTimeoutError";
|
|
14529
14538
|
}
|
|
14530
14539
|
}
|
|
14531
|
-
class
|
|
14540
|
+
class Ln extends ar {
|
|
14532
14541
|
constructor(l) {
|
|
14533
14542
|
super(`Maximum reconnection attempts (${l}) exceeded`), this.name = "MaxRetriesExceededError";
|
|
14534
14543
|
}
|
|
14535
14544
|
}
|
|
14536
|
-
class
|
|
14545
|
+
class Dn extends H {
|
|
14537
14546
|
constructor(l) {
|
|
14538
14547
|
super(`Channel provisioning timeout after ${l}ms`), this.name = "ProvisioningTimeoutError";
|
|
14539
14548
|
}
|
|
14540
14549
|
}
|
|
14541
|
-
class
|
|
14550
|
+
class _i extends H {
|
|
14542
14551
|
constructor(l) {
|
|
14543
14552
|
super(`Channel not found: ${l}`), this.name = "ChannelNotFoundError";
|
|
14544
14553
|
}
|
|
14545
14554
|
}
|
|
14546
|
-
class
|
|
14555
|
+
class Oi extends H {
|
|
14547
14556
|
constructor(l) {
|
|
14548
14557
|
super(`Space not found for domain: ${l}`), this.name = "SpaceNotFoundError";
|
|
14549
14558
|
}
|
|
14550
14559
|
}
|
|
14551
|
-
class
|
|
14560
|
+
class Vi extends H {
|
|
14552
14561
|
constructor() {
|
|
14553
14562
|
super("No channels available in this space"), this.name = "NoChannelsError";
|
|
14554
14563
|
}
|
|
14555
14564
|
}
|
|
14556
|
-
function
|
|
14565
|
+
function sn(e, l) {
|
|
14557
14566
|
return new Promise((i, s) => {
|
|
14558
14567
|
const d = () => {
|
|
14559
14568
|
clearTimeout(a), s(new Error("Aborted"));
|
|
@@ -14567,32 +14576,32 @@ function ln(e, l) {
|
|
|
14567
14576
|
l?.addEventListener("abort", d, { once: !0 });
|
|
14568
14577
|
});
|
|
14569
14578
|
}
|
|
14570
|
-
var
|
|
14579
|
+
var dn = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e[e.NONE = 4] = "NONE", e))(dn || {});
|
|
14571
14580
|
let ur = 1, Oe = null;
|
|
14572
|
-
function
|
|
14581
|
+
function Li(e) {
|
|
14573
14582
|
ur = e;
|
|
14574
14583
|
}
|
|
14575
|
-
function
|
|
14584
|
+
function Di() {
|
|
14576
14585
|
return ur;
|
|
14577
14586
|
}
|
|
14578
|
-
function
|
|
14587
|
+
function vn(e) {
|
|
14579
14588
|
Oe = e;
|
|
14580
14589
|
}
|
|
14581
|
-
function
|
|
14590
|
+
function vi() {
|
|
14582
14591
|
return Oe;
|
|
14583
14592
|
}
|
|
14584
|
-
const
|
|
14593
|
+
const jn = {
|
|
14585
14594
|
0: "DEBUG",
|
|
14586
14595
|
1: "INFO",
|
|
14587
14596
|
2: "WARN",
|
|
14588
14597
|
3: "ERROR",
|
|
14589
14598
|
4: "NONE"
|
|
14590
14599
|
};
|
|
14591
|
-
function
|
|
14600
|
+
function Hn(e, l) {
|
|
14592
14601
|
return `[${e}] ${l}`;
|
|
14593
14602
|
}
|
|
14594
14603
|
function Fe(e, l, i, s) {
|
|
14595
|
-
const d = (/* @__PURE__ */ new Date()).toISOString(), a =
|
|
14604
|
+
const d = (/* @__PURE__ */ new Date()).toISOString(), a = jn[e];
|
|
14596
14605
|
if (Oe && Oe({
|
|
14597
14606
|
timestamp: d,
|
|
14598
14607
|
level: e,
|
|
@@ -14601,7 +14610,7 @@ function Fe(e, l, i, s) {
|
|
|
14601
14610
|
message: i,
|
|
14602
14611
|
args: s
|
|
14603
14612
|
}), ur <= e) {
|
|
14604
|
-
const c =
|
|
14613
|
+
const c = Hn(l, i);
|
|
14605
14614
|
switch (e) {
|
|
14606
14615
|
case 0:
|
|
14607
14616
|
console.debug(c, ...s);
|
|
@@ -14634,8 +14643,8 @@ function z(e) {
|
|
|
14634
14643
|
}
|
|
14635
14644
|
};
|
|
14636
14645
|
}
|
|
14637
|
-
const
|
|
14638
|
-
class
|
|
14646
|
+
const be = z("WebSocketTransport"), xn = 1e4;
|
|
14647
|
+
class Wn {
|
|
14639
14648
|
ws = null;
|
|
14640
14649
|
keepaliveTimeout = null;
|
|
14641
14650
|
keepaliveTimeoutMs;
|
|
@@ -14660,11 +14669,11 @@ class Hn {
|
|
|
14660
14669
|
clearTimeout(w), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
|
|
14661
14670
|
}, w = setTimeout(() => {
|
|
14662
14671
|
c || (c = !0, f(), this.ws?.close(), d(new A("WebSocket connection timeout")));
|
|
14663
|
-
},
|
|
14672
|
+
}, xn);
|
|
14664
14673
|
this.ws.onopen = () => {
|
|
14665
14674
|
a = !0, clearTimeout(w), this.ws.send(i), this.resetKeepaliveTimeout(), c || (c = !0, s());
|
|
14666
14675
|
}, this.ws.onerror = () => {
|
|
14667
|
-
clearTimeout(w),
|
|
14676
|
+
clearTimeout(w), be.error("WebSocket error"), c || (c = !0, f(), d(new A("WebSocket connection failed")));
|
|
14668
14677
|
}, this.ws.onclose = (h) => {
|
|
14669
14678
|
if (this.clearKeepaliveTimeout(), !a && !c) {
|
|
14670
14679
|
c = !0, f(), d(new A("WebSocket connection closed before opening"));
|
|
@@ -14678,7 +14687,7 @@ class Hn {
|
|
|
14678
14687
|
});
|
|
14679
14688
|
}
|
|
14680
14689
|
send(l) {
|
|
14681
|
-
this.ws?.readyState === WebSocket.OPEN ? this.ws.send(l) :
|
|
14690
|
+
this.ws?.readyState === WebSocket.OPEN ? this.ws.send(l) : be.warn("Cannot send: WebSocket not connected");
|
|
14682
14691
|
}
|
|
14683
14692
|
close() {
|
|
14684
14693
|
this.clearKeepaliveTimeout(), this.ws && (this.ws.close(1e3, "Client closing"), this.ws = null);
|
|
@@ -14692,12 +14701,12 @@ class Hn {
|
|
|
14692
14701
|
}
|
|
14693
14702
|
this.resetKeepaliveTimeout(), this.callbacks.onProtocolMessage(l);
|
|
14694
14703
|
} catch (i) {
|
|
14695
|
-
|
|
14704
|
+
be.error("Failed to process protocol message:", i), this.callbacks.onError(i instanceof Error ? i : new Error(String(i)));
|
|
14696
14705
|
}
|
|
14697
14706
|
}
|
|
14698
14707
|
resetKeepaliveTimeout() {
|
|
14699
14708
|
this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
|
|
14700
|
-
|
|
14709
|
+
be.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new cr(this.keepaliveTimeoutMs)), this.close();
|
|
14701
14710
|
}, this.keepaliveTimeoutMs);
|
|
14702
14711
|
}
|
|
14703
14712
|
clearKeepaliveTimeout() {
|
|
@@ -14705,10 +14714,10 @@ class Hn {
|
|
|
14705
14714
|
}
|
|
14706
14715
|
}
|
|
14707
14716
|
const Q = z("WebTransportTransport"), zo = 4;
|
|
14708
|
-
function
|
|
14717
|
+
function an() {
|
|
14709
14718
|
return typeof WebTransport < "u";
|
|
14710
14719
|
}
|
|
14711
|
-
class
|
|
14720
|
+
class Rn {
|
|
14712
14721
|
transport = null;
|
|
14713
14722
|
stream = null;
|
|
14714
14723
|
reader = null;
|
|
@@ -14726,7 +14735,7 @@ class xn {
|
|
|
14726
14735
|
return this.transport !== null && this.writer !== null;
|
|
14727
14736
|
}
|
|
14728
14737
|
async connect(l, i) {
|
|
14729
|
-
if (!
|
|
14738
|
+
if (!an())
|
|
14730
14739
|
throw new A("WebTransport is not supported in this browser");
|
|
14731
14740
|
try {
|
|
14732
14741
|
this.transport = new WebTransport(l), await this.transport.ready, Q.debug(`Connected to WebTransport entrypoint: ${l}`), this.transport.closed.then(() => {
|
|
@@ -14840,8 +14849,8 @@ class xn {
|
|
|
14840
14849
|
}
|
|
14841
14850
|
}
|
|
14842
14851
|
}
|
|
14843
|
-
const
|
|
14844
|
-
class
|
|
14852
|
+
const me = z("Channel");
|
|
14853
|
+
class Gn {
|
|
14845
14854
|
state = "disconnected";
|
|
14846
14855
|
transport = null;
|
|
14847
14856
|
config;
|
|
@@ -14883,7 +14892,7 @@ class Wn {
|
|
|
14883
14892
|
try {
|
|
14884
14893
|
await this.connectTransport(), this.setState("connected");
|
|
14885
14894
|
} catch (l) {
|
|
14886
|
-
throw
|
|
14895
|
+
throw me.error("Channel connection failed:", l), this.setState("disconnected"), l;
|
|
14887
14896
|
}
|
|
14888
14897
|
}
|
|
14889
14898
|
/**
|
|
@@ -14897,7 +14906,7 @@ class Wn {
|
|
|
14897
14906
|
*/
|
|
14898
14907
|
send(l) {
|
|
14899
14908
|
if (!this.transport?.isConnected) {
|
|
14900
|
-
|
|
14909
|
+
me.warn("Cannot send: channel not connected");
|
|
14901
14910
|
return;
|
|
14902
14911
|
}
|
|
14903
14912
|
this.transport.send(l);
|
|
@@ -14918,13 +14927,13 @@ class Wn {
|
|
|
14918
14927
|
switch (l.Type) {
|
|
14919
14928
|
case K.WebSocket:
|
|
14920
14929
|
case K.WebSocketProxy:
|
|
14921
|
-
this.transport = new
|
|
14930
|
+
this.transport = new Wn(i);
|
|
14922
14931
|
break;
|
|
14923
14932
|
case K.WebTransport:
|
|
14924
14933
|
case K.WebTransportProxy:
|
|
14925
|
-
if (!
|
|
14934
|
+
if (!an())
|
|
14926
14935
|
throw new Error("WebTransport is not supported in this browser");
|
|
14927
|
-
this.transport = new
|
|
14936
|
+
this.transport = new Rn(i);
|
|
14928
14937
|
break;
|
|
14929
14938
|
default:
|
|
14930
14939
|
throw new Error(`Unsupported entrypoint type: ${K[l.Type]}`);
|
|
@@ -14943,7 +14952,7 @@ class Wn {
|
|
|
14943
14952
|
}
|
|
14944
14953
|
this.config.onProtocolMessage?.(i);
|
|
14945
14954
|
} catch (i) {
|
|
14946
|
-
|
|
14955
|
+
me.error("Failed to handle protocol message:", i), this.config.onError?.(i instanceof Error ? i : new Error(String(i)));
|
|
14947
14956
|
}
|
|
14948
14957
|
}
|
|
14949
14958
|
/**
|
|
@@ -14956,7 +14965,7 @@ class Wn {
|
|
|
14956
14965
|
* Handle transport error.
|
|
14957
14966
|
*/
|
|
14958
14967
|
handleError(l) {
|
|
14959
|
-
|
|
14968
|
+
me.error("Channel error:", l), this.config.onError?.(l), l instanceof cr && this.handleClose("Keepalive timeout", !1);
|
|
14960
14969
|
}
|
|
14961
14970
|
/**
|
|
14962
14971
|
* Update and notify state change.
|
|
@@ -14966,7 +14975,7 @@ class Wn {
|
|
|
14966
14975
|
}
|
|
14967
14976
|
}
|
|
14968
14977
|
const B = z("ChannelManager");
|
|
14969
|
-
class
|
|
14978
|
+
class Kn {
|
|
14970
14979
|
channels = /* @__PURE__ */ new Map();
|
|
14971
14980
|
// keyed by opcode group
|
|
14972
14981
|
activeType = null;
|
|
@@ -15068,7 +15077,7 @@ class Rn {
|
|
|
15068
15077
|
* Connect a single channel.
|
|
15069
15078
|
*/
|
|
15070
15079
|
async connectChannel(l) {
|
|
15071
|
-
const i = new
|
|
15080
|
+
const i = new Gn({
|
|
15072
15081
|
entrypoint: l,
|
|
15073
15082
|
sessionId: this.config.sessionId,
|
|
15074
15083
|
keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
|
|
@@ -15118,12 +15127,12 @@ class Rn {
|
|
|
15118
15127
|
if (!this.shouldReconnect)
|
|
15119
15128
|
return;
|
|
15120
15129
|
if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
|
|
15121
|
-
B.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new
|
|
15130
|
+
B.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Ln(this.config.maxReconnectAttempts));
|
|
15122
15131
|
return;
|
|
15123
15132
|
}
|
|
15124
15133
|
this.setState("reconnecting"), this.reconnectAttempts++;
|
|
15125
15134
|
const l = this.config.reconnectBackoffMs * Math.pow(2, this.reconnectAttempts - 1);
|
|
15126
|
-
if (B.info(`Reconnecting in ${l}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await
|
|
15135
|
+
if (B.info(`Reconnecting in ${l}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await sn(l, this.abortController?.signal), !!this.shouldReconnect)
|
|
15127
15136
|
try {
|
|
15128
15137
|
await this.connectInternal(!0);
|
|
15129
15138
|
} catch (i) {
|
|
@@ -15145,7 +15154,7 @@ class Rn {
|
|
|
15145
15154
|
this.state !== l && (this.state = l, this.config.onStateChange?.(l));
|
|
15146
15155
|
}
|
|
15147
15156
|
}
|
|
15148
|
-
const
|
|
15157
|
+
const Jn = 5e3, $n = 3e4, Yo = 35e3, Xo = 500, Qo = 6, cn = 6e4, Ae = "ikon_device_id";
|
|
15149
15158
|
function fr() {
|
|
15150
15159
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
15151
15160
|
return crypto.randomUUID();
|
|
@@ -15156,14 +15165,14 @@ function fr() {
|
|
|
15156
15165
|
return crypto.randomUUID();
|
|
15157
15166
|
}
|
|
15158
15167
|
}
|
|
15159
|
-
function
|
|
15168
|
+
function ji() {
|
|
15160
15169
|
if (!(typeof localStorage > "u"))
|
|
15161
15170
|
try {
|
|
15162
15171
|
localStorage.removeItem(Ae);
|
|
15163
15172
|
} catch {
|
|
15164
15173
|
}
|
|
15165
15174
|
}
|
|
15166
|
-
function
|
|
15175
|
+
function Hi(e) {
|
|
15167
15176
|
try {
|
|
15168
15177
|
const l = e.split(".");
|
|
15169
15178
|
return l.length !== 3 ? null : JSON.parse(atob(l[1])).id ?? null;
|
|
@@ -15171,26 +15180,26 @@ function Oi(e) {
|
|
|
15171
15180
|
return null;
|
|
15172
15181
|
}
|
|
15173
15182
|
}
|
|
15174
|
-
const Ve = {}, Ue = "https://api.prod.ikon.live", Le = "https://api.dev.ikon.live",
|
|
15175
|
-
function
|
|
15183
|
+
const Ve = {}, Ue = "https://api.prod.ikon.live", Le = "https://api.dev.ikon.live", Zo = "https://auth.ikonai.com", qo = "https://auth.dev.ikonai.com", xi = "https://auth.ikonai.com";
|
|
15184
|
+
function un(e) {
|
|
15176
15185
|
return e === "development" ? Le : Ue;
|
|
15177
15186
|
}
|
|
15178
|
-
function
|
|
15187
|
+
function Wi() {
|
|
15179
15188
|
const e = typeof import.meta < "u" ? Ve?.VITE_IKON_BACKEND_URL : void 0;
|
|
15180
15189
|
return e || (typeof window > "u" ? Ue : !wr() || window.location.hostname.includes(".dev.") ? Le : Ue);
|
|
15181
15190
|
}
|
|
15182
|
-
function
|
|
15191
|
+
function Ri() {
|
|
15183
15192
|
const e = typeof import.meta < "u" ? Ve?.VITE_IKON_BACKEND_TYPE : void 0;
|
|
15184
15193
|
if (e === "development" || e === "production")
|
|
15185
15194
|
return e;
|
|
15186
15195
|
const l = typeof import.meta < "u" ? Ve?.VITE_IKON_BACKEND_URL : void 0;
|
|
15187
15196
|
return l ? l.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : wr() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
|
|
15188
15197
|
}
|
|
15189
|
-
function
|
|
15198
|
+
function Gi() {
|
|
15190
15199
|
const e = typeof import.meta < "u" ? Ve?.VITE_IKON_AUTH_URL : void 0;
|
|
15191
|
-
return e || (typeof window > "u" ?
|
|
15200
|
+
return e || (typeof window > "u" ? Zo : !wr() || window.location.hostname.includes(".dev.") ? qo : Zo);
|
|
15192
15201
|
}
|
|
15193
|
-
function
|
|
15202
|
+
function fn() {
|
|
15194
15203
|
if (typeof window > "u")
|
|
15195
15204
|
return {};
|
|
15196
15205
|
const e = new URLSearchParams(window.location.search), l = {};
|
|
@@ -15198,8 +15207,8 @@ function un() {
|
|
|
15198
15207
|
l[i] = s;
|
|
15199
15208
|
return l;
|
|
15200
15209
|
}
|
|
15201
|
-
const
|
|
15202
|
-
function
|
|
15210
|
+
const zn = ["ikon_token", "ikon_provider", "error"];
|
|
15211
|
+
function Ki() {
|
|
15203
15212
|
if (typeof window > "u")
|
|
15204
15213
|
return { parameters: {} };
|
|
15205
15214
|
const e = window.location.pathname;
|
|
@@ -15209,9 +15218,9 @@ function ji() {
|
|
|
15209
15218
|
const d = e.match(/^\/c\/([^/]+)/);
|
|
15210
15219
|
if (d && (i = decodeURIComponent(d[1])), l && i)
|
|
15211
15220
|
throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
|
|
15212
|
-
const a =
|
|
15221
|
+
const a = fn(), c = {};
|
|
15213
15222
|
for (const [f, w] of Object.entries(a))
|
|
15214
|
-
|
|
15223
|
+
zn.includes(f) || (c[f] = w);
|
|
15215
15224
|
return { sessionId: l, channelKey: i, parameters: c };
|
|
15216
15225
|
}
|
|
15217
15226
|
function wr() {
|
|
@@ -15226,8 +15235,8 @@ function wr() {
|
|
|
15226
15235
|
}
|
|
15227
15236
|
return !0;
|
|
15228
15237
|
}
|
|
15229
|
-
const De = z("Authenticator"), de = j.GROUP_CORE | j.GROUP_KEEPALIVE | j.GROUP_EVENTS | j.GROUP_ACTIONS | j.GROUP_UI | j.GROUP_AUDIO | j.GROUP_VIDEO,
|
|
15230
|
-
async function
|
|
15238
|
+
const De = z("Authenticator"), de = j.GROUP_CORE | j.GROUP_KEEPALIVE | j.GROUP_EVENTS | j.GROUP_ACTIONS | j.GROUP_UI | j.GROUP_AUDIO | j.GROUP_VIDEO, Yn = 1e3, Xn = 5e3;
|
|
15239
|
+
async function Qn(e) {
|
|
15231
15240
|
try {
|
|
15232
15241
|
const l = await fetch(`${Le}/users/me`, {
|
|
15233
15242
|
credentials: "include",
|
|
@@ -15238,7 +15247,7 @@ async function Yn(e) {
|
|
|
15238
15247
|
return;
|
|
15239
15248
|
}
|
|
15240
15249
|
}
|
|
15241
|
-
function
|
|
15250
|
+
function wn(e, l, i) {
|
|
15242
15251
|
const s = {
|
|
15243
15252
|
method: "POST",
|
|
15244
15253
|
headers: {
|
|
@@ -15250,40 +15259,40 @@ function fn(e, l, i) {
|
|
|
15250
15259
|
};
|
|
15251
15260
|
return l || (s.credentials = "include"), s;
|
|
15252
15261
|
}
|
|
15253
|
-
async function
|
|
15262
|
+
async function hn(e, l, i, s, d, a, c) {
|
|
15254
15263
|
const f = `${e}/rooms`, w = {
|
|
15255
15264
|
space: l,
|
|
15256
15265
|
...i ? { key: i } : {},
|
|
15257
15266
|
...s && Object.keys(s).length > 0 ? { params: s } : {},
|
|
15258
15267
|
...d ? { hash: d } : {}
|
|
15259
|
-
}, h = await fetch(f,
|
|
15268
|
+
}, h = await fetch(f, wn(w, a, c));
|
|
15260
15269
|
if (!h.ok) {
|
|
15261
15270
|
const r = await h.text().catch(() => "Unknown error");
|
|
15262
15271
|
throw new H(`Failed to request channel: ${h.status} ${r}`);
|
|
15263
15272
|
}
|
|
15264
15273
|
return await h.json();
|
|
15265
15274
|
}
|
|
15266
|
-
async function
|
|
15267
|
-
const d = `${e}/rooms/connect`, a = await fetch(d,
|
|
15275
|
+
async function Zn(e, l, i, s) {
|
|
15276
|
+
const d = `${e}/rooms/connect`, a = await fetch(d, wn(l, i, s));
|
|
15268
15277
|
if (!a.ok) {
|
|
15269
15278
|
const c = await a.text().catch(() => "Unknown error");
|
|
15270
15279
|
throw new H(`Backend connect failed: ${a.status} ${c}`);
|
|
15271
15280
|
}
|
|
15272
15281
|
return a.json();
|
|
15273
15282
|
}
|
|
15274
|
-
async function
|
|
15283
|
+
async function In(e, l, i, s, d) {
|
|
15275
15284
|
const a = Date.now();
|
|
15276
|
-
let c =
|
|
15285
|
+
let c = Yn;
|
|
15277
15286
|
for (; ; ) {
|
|
15278
15287
|
if (d?.aborted)
|
|
15279
15288
|
throw new H("Connection aborted");
|
|
15280
15289
|
if (Date.now() - a >= i)
|
|
15281
|
-
throw new
|
|
15282
|
-
const w = await
|
|
15290
|
+
throw new Dn(i);
|
|
15291
|
+
const w = await Zn(e, l, s, d), h = w.state?.toLowerCase();
|
|
15283
15292
|
if (h === "running")
|
|
15284
15293
|
return w;
|
|
15285
15294
|
if (h === "provisioning") {
|
|
15286
|
-
await
|
|
15295
|
+
await sn(c, d), c = Math.min(c * 1.5, Xn);
|
|
15287
15296
|
continue;
|
|
15288
15297
|
}
|
|
15289
15298
|
throw new H(`Unexpected channel state: ${w.state}`);
|
|
@@ -15298,8 +15307,8 @@ async function hr(e, l) {
|
|
|
15298
15307
|
const s = await i.arrayBuffer(), d = new Uint8Array(s);
|
|
15299
15308
|
return { authResponse: Qe.fromProtocolMessage(d) };
|
|
15300
15309
|
}
|
|
15301
|
-
function
|
|
15302
|
-
return
|
|
15310
|
+
function qn(e, l) {
|
|
15311
|
+
return Ze.create({
|
|
15303
15312
|
ServerSessionId: "",
|
|
15304
15313
|
// Server will fill this in
|
|
15305
15314
|
ContextType: xe.Browser,
|
|
@@ -15326,7 +15335,7 @@ function Qn(e, l) {
|
|
|
15326
15335
|
Parameters: e.parameters ?? {}
|
|
15327
15336
|
});
|
|
15328
15337
|
}
|
|
15329
|
-
function
|
|
15338
|
+
function Bn(e) {
|
|
15330
15339
|
return {
|
|
15331
15340
|
ServerSessionId: e.ServerSessionId,
|
|
15332
15341
|
ContextType: e.ContextType,
|
|
@@ -15353,13 +15362,13 @@ function qn(e) {
|
|
|
15353
15362
|
Parameters: e.Parameters
|
|
15354
15363
|
};
|
|
15355
15364
|
}
|
|
15356
|
-
async function
|
|
15365
|
+
async function An(e, l) {
|
|
15357
15366
|
const i = `https://${e.host}:${e.httpsPort}`;
|
|
15358
15367
|
De.debug(`Authenticating with local server: ${i}`);
|
|
15359
|
-
const d = { ...
|
|
15368
|
+
const d = { ...fn(), ...e.parameters };
|
|
15360
15369
|
let a = e.userId;
|
|
15361
|
-
a || (a = await
|
|
15362
|
-
const c =
|
|
15370
|
+
a || (a = await Qn(l), a || (a = "local", De.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
|
|
15371
|
+
const c = qn({ ...e, parameters: d }, a), f = Bn(c), w = await fetch(`${i}/connect-token`, {
|
|
15363
15372
|
method: "POST",
|
|
15364
15373
|
headers: {
|
|
15365
15374
|
"Content-Type": "application/json"
|
|
@@ -15377,10 +15386,10 @@ async function Zn(e, l) {
|
|
|
15377
15386
|
const r = `${i}/connect?token=${encodeURIComponent(o)}`;
|
|
15378
15387
|
return hr(r, l);
|
|
15379
15388
|
}
|
|
15380
|
-
async function
|
|
15389
|
+
async function Un(e, l) {
|
|
15381
15390
|
if (e.sessionId && e.channelKey)
|
|
15382
15391
|
throw new H("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
15383
|
-
const i =
|
|
15392
|
+
const i = un(e.backendType);
|
|
15384
15393
|
De.debug(`Authenticating with cloud server: ${i}, space ID: ${e.spaceId}`);
|
|
15385
15394
|
const s = await fetch(`${i}/auth/api-key`, {
|
|
15386
15395
|
method: "POST",
|
|
@@ -15413,7 +15422,7 @@ async function Bn(e, l) {
|
|
|
15413
15422
|
throw new H(`Failed to get or create profile: ${c.status} ${t}`);
|
|
15414
15423
|
}
|
|
15415
15424
|
const w = {
|
|
15416
|
-
code: (await
|
|
15425
|
+
code: (await hn(i, e.spaceId, e.channelKey, e.parameters, e.sessionId, a, l)).code,
|
|
15417
15426
|
contextType: xe.Plugin,
|
|
15418
15427
|
userType: e.userType ?? Re.Human,
|
|
15419
15428
|
clientType: e.clientType ?? He.DesktopWeb,
|
|
@@ -15431,16 +15440,16 @@ async function Bn(e, l) {
|
|
|
15431
15440
|
launchParams: e.parameters,
|
|
15432
15441
|
hash: e.sessionId,
|
|
15433
15442
|
waitForRunning: !0
|
|
15434
|
-
}, h = e.provisioningTimeoutMs ??
|
|
15443
|
+
}, h = e.provisioningTimeoutMs ?? cn, o = await In(i, w, h, a, l);
|
|
15435
15444
|
if (!o.configuration?.url)
|
|
15436
15445
|
throw new H("Backend did not return a connect URL");
|
|
15437
15446
|
const r = o.configuration.url;
|
|
15438
15447
|
return hr(r, l);
|
|
15439
15448
|
}
|
|
15440
|
-
async function
|
|
15449
|
+
async function el(e, l) {
|
|
15441
15450
|
if (e.sessionId && e.channelKey)
|
|
15442
15451
|
throw new H("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
15443
|
-
const i =
|
|
15452
|
+
const i = un(e.backendType), s = e.token;
|
|
15444
15453
|
De.debug(`Authenticating with session token to: ${i}, space ID: ${e.spaceId}`);
|
|
15445
15454
|
const d = await fetch(`${i}/profiles/me?space=${encodeURIComponent(e.spaceId)}`, {
|
|
15446
15455
|
method: "GET",
|
|
@@ -15454,7 +15463,7 @@ async function An(e, l) {
|
|
|
15454
15463
|
throw new H(`Failed to get or create profile: ${d.status} ${o}`);
|
|
15455
15464
|
}
|
|
15456
15465
|
const c = {
|
|
15457
|
-
code: (await
|
|
15466
|
+
code: (await hn(i, e.spaceId, e.channelKey, e.parameters, e.sessionId, s, l)).code,
|
|
15458
15467
|
contextType: xe.Browser,
|
|
15459
15468
|
userType: Re.Human,
|
|
15460
15469
|
clientType: He.DesktopWeb,
|
|
@@ -15472,28 +15481,28 @@ async function An(e, l) {
|
|
|
15472
15481
|
launchParams: e.parameters,
|
|
15473
15482
|
hash: e.sessionId,
|
|
15474
15483
|
waitForRunning: !0
|
|
15475
|
-
}, f = e.provisioningTimeoutMs ??
|
|
15484
|
+
}, f = e.provisioningTimeoutMs ?? cn, w = await In(i, c, f, s, l);
|
|
15476
15485
|
if (!w.configuration?.url)
|
|
15477
15486
|
throw new H("Backend did not return a connect URL");
|
|
15478
15487
|
const h = w.configuration.url;
|
|
15479
15488
|
return hr(h, l);
|
|
15480
15489
|
}
|
|
15481
|
-
const
|
|
15482
|
-
function
|
|
15490
|
+
const pn = "ikon.theme", er = "ikon.theme-user", rl = "ikon.theme-change";
|
|
15491
|
+
function Tn(e) {
|
|
15483
15492
|
typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", e);
|
|
15484
15493
|
}
|
|
15485
|
-
const
|
|
15494
|
+
const tl = {
|
|
15486
15495
|
name: "ikon.client.getTheme",
|
|
15487
15496
|
description: "Get the currently selected client theme",
|
|
15488
15497
|
returnType: { kind: "string", nullable: !0 }
|
|
15489
15498
|
};
|
|
15490
|
-
function
|
|
15499
|
+
function ol() {
|
|
15491
15500
|
if (typeof window > "u" || !window.localStorage)
|
|
15492
15501
|
return null;
|
|
15493
|
-
const e = window.localStorage.getItem(er) ?? window.localStorage.getItem(
|
|
15494
|
-
return
|
|
15502
|
+
const e = window.localStorage.getItem(er) ?? window.localStorage.getItem(pn) ?? "light";
|
|
15503
|
+
return Tn(e), e;
|
|
15495
15504
|
}
|
|
15496
|
-
const
|
|
15505
|
+
const nl = {
|
|
15497
15506
|
name: "ikon.client.setTheme",
|
|
15498
15507
|
description: "Update the client UI theme",
|
|
15499
15508
|
returnType: { kind: "boolean" },
|
|
@@ -15502,21 +15511,21 @@ const tl = {
|
|
|
15502
15511
|
{ name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
|
|
15503
15512
|
]
|
|
15504
15513
|
};
|
|
15505
|
-
function
|
|
15514
|
+
function ll(e, l) {
|
|
15506
15515
|
if (typeof window > "u" || !window.localStorage || typeof e != "string")
|
|
15507
15516
|
return !1;
|
|
15508
15517
|
const i = e.trim().toLowerCase();
|
|
15509
15518
|
if (!i)
|
|
15510
15519
|
return !1;
|
|
15511
15520
|
const s = l === void 0 ? !0 : !!l, d = window.localStorage;
|
|
15512
|
-
s ? d.setItem(er, i) : d.removeItem(er), d.setItem(
|
|
15521
|
+
s ? d.setItem(er, i) : d.removeItem(er), d.setItem(pn, i);
|
|
15513
15522
|
try {
|
|
15514
|
-
window.dispatchEvent(new CustomEvent(
|
|
15523
|
+
window.dispatchEvent(new CustomEvent(rl, { detail: { mode: i } }));
|
|
15515
15524
|
} catch {
|
|
15516
15525
|
}
|
|
15517
|
-
return
|
|
15526
|
+
return Tn(i), !0;
|
|
15518
15527
|
}
|
|
15519
|
-
const
|
|
15528
|
+
const il = {
|
|
15520
15529
|
name: "ikon.client.getLocation",
|
|
15521
15530
|
description: "Retrieve the current geolocation coordinates from the browser",
|
|
15522
15531
|
returnType: {
|
|
@@ -15526,7 +15535,7 @@ const nl = {
|
|
|
15526
15535
|
nullable: !0
|
|
15527
15536
|
}
|
|
15528
15537
|
};
|
|
15529
|
-
async function
|
|
15538
|
+
async function sl() {
|
|
15530
15539
|
if (typeof navigator > "u" || !navigator.geolocation)
|
|
15531
15540
|
return null;
|
|
15532
15541
|
try {
|
|
@@ -15545,7 +15554,7 @@ async function ll() {
|
|
|
15545
15554
|
return null;
|
|
15546
15555
|
}
|
|
15547
15556
|
}
|
|
15548
|
-
const
|
|
15557
|
+
const dl = {
|
|
15549
15558
|
name: "ikon.client.share",
|
|
15550
15559
|
description: "Open the Web Share dialog when supported",
|
|
15551
15560
|
returnType: { kind: "boolean" },
|
|
@@ -15555,7 +15564,7 @@ const il = {
|
|
|
15555
15564
|
{ name: "url", type: { kind: "string", nullable: !0 }, description: "Share URL" }
|
|
15556
15565
|
]
|
|
15557
15566
|
};
|
|
15558
|
-
async function
|
|
15567
|
+
async function al(e, l, i) {
|
|
15559
15568
|
if (typeof navigator > "u" || typeof navigator.share != "function")
|
|
15560
15569
|
return !1;
|
|
15561
15570
|
const s = typeof e == "string" ? e.trim() : "", d = typeof l == "string" ? l.trim() : "", a = typeof i == "string" ? i.trim() : "", c = {};
|
|
@@ -15567,13 +15576,13 @@ async function sl(e, l, i) {
|
|
|
15567
15576
|
return !1;
|
|
15568
15577
|
}
|
|
15569
15578
|
}
|
|
15570
|
-
const
|
|
15579
|
+
const cl = {
|
|
15571
15580
|
name: "ikon.client.pickContacts",
|
|
15572
15581
|
description: "Launch the native contact picker when available",
|
|
15573
15582
|
returnType: { kind: "string", nullable: !0 },
|
|
15574
15583
|
parameters: [{ name: "multiple", type: { kind: "boolean", nullable: !0 }, description: "Allow multiple contacts" }]
|
|
15575
15584
|
};
|
|
15576
|
-
async function
|
|
15585
|
+
async function ul(e) {
|
|
15577
15586
|
if (typeof navigator > "u")
|
|
15578
15587
|
return null;
|
|
15579
15588
|
const l = navigator, i = l.contacts?.select;
|
|
@@ -15592,33 +15601,33 @@ async function al(e) {
|
|
|
15592
15601
|
return null;
|
|
15593
15602
|
}
|
|
15594
15603
|
}
|
|
15595
|
-
const
|
|
15604
|
+
const fl = {
|
|
15596
15605
|
name: "ikon.client.getLanguage",
|
|
15597
15606
|
description: "Get the browser language preference",
|
|
15598
15607
|
returnType: { kind: "string" }
|
|
15599
15608
|
};
|
|
15600
|
-
function
|
|
15609
|
+
function wl() {
|
|
15601
15610
|
return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
|
|
15602
15611
|
}
|
|
15603
|
-
const
|
|
15612
|
+
const hl = {
|
|
15604
15613
|
name: "ikon.client.getTimezone",
|
|
15605
15614
|
description: "Get the browser timezone (IANA format)",
|
|
15606
15615
|
returnType: { kind: "string" }
|
|
15607
15616
|
};
|
|
15608
|
-
function
|
|
15617
|
+
function Il() {
|
|
15609
15618
|
try {
|
|
15610
15619
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
15611
15620
|
} catch {
|
|
15612
15621
|
return "UTC";
|
|
15613
15622
|
}
|
|
15614
15623
|
}
|
|
15615
|
-
const
|
|
15624
|
+
const pl = {
|
|
15616
15625
|
name: "ikon.client.copyToClipboard",
|
|
15617
15626
|
description: "Copy text to clipboard",
|
|
15618
15627
|
returnType: { kind: "boolean" },
|
|
15619
15628
|
parameters: [{ name: "text", type: { kind: "string" }, description: "Text to copy" }]
|
|
15620
15629
|
};
|
|
15621
|
-
async function
|
|
15630
|
+
async function Tl(e) {
|
|
15622
15631
|
if (typeof navigator > "u" || !navigator.clipboard || typeof e != "string")
|
|
15623
15632
|
return !1;
|
|
15624
15633
|
try {
|
|
@@ -15627,15 +15636,15 @@ async function Il(e) {
|
|
|
15627
15636
|
return !1;
|
|
15628
15637
|
}
|
|
15629
15638
|
}
|
|
15630
|
-
const
|
|
15639
|
+
const Fl = {
|
|
15631
15640
|
name: "ikon.client.getUrl",
|
|
15632
15641
|
description: "Get the current browser URL path and query string",
|
|
15633
15642
|
returnType: { kind: "string", nullable: !0 }
|
|
15634
15643
|
};
|
|
15635
|
-
function
|
|
15644
|
+
function bl() {
|
|
15636
15645
|
return typeof window > "u" ? null : window.location.pathname + window.location.search;
|
|
15637
15646
|
}
|
|
15638
|
-
const
|
|
15647
|
+
const ml = {
|
|
15639
15648
|
name: "ikon.client.setUrl",
|
|
15640
15649
|
description: "Update the browser URL without triggering a page reload",
|
|
15641
15650
|
returnType: { kind: "boolean" },
|
|
@@ -15644,7 +15653,7 @@ const Fl = {
|
|
|
15644
15653
|
{ name: "replace", type: { kind: "boolean", nullable: !0 }, description: "If true, replaces current history entry instead of adding new one" }
|
|
15645
15654
|
]
|
|
15646
15655
|
};
|
|
15647
|
-
function
|
|
15656
|
+
function yl(e, l) {
|
|
15648
15657
|
if (typeof window > "u" || !window.history || typeof e != "string")
|
|
15649
15658
|
return !1;
|
|
15650
15659
|
const i = e.trim();
|
|
@@ -15656,13 +15665,13 @@ function ml(e, l) {
|
|
|
15656
15665
|
return !1;
|
|
15657
15666
|
}
|
|
15658
15667
|
}
|
|
15659
|
-
const
|
|
15668
|
+
const El = {
|
|
15660
15669
|
name: "ikon.client.vibrate",
|
|
15661
15670
|
description: "Trigger haptic feedback on supported devices",
|
|
15662
15671
|
returnType: { kind: "boolean" },
|
|
15663
15672
|
parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
|
|
15664
15673
|
};
|
|
15665
|
-
function
|
|
15674
|
+
function Nl(e) {
|
|
15666
15675
|
if (typeof navigator > "u" || !navigator.vibrate || typeof e != "string")
|
|
15667
15676
|
return !1;
|
|
15668
15677
|
try {
|
|
@@ -15672,7 +15681,7 @@ function yl(e) {
|
|
|
15672
15681
|
return !1;
|
|
15673
15682
|
}
|
|
15674
15683
|
}
|
|
15675
|
-
const
|
|
15684
|
+
const gl = {
|
|
15676
15685
|
name: "ikon.client.playSound",
|
|
15677
15686
|
description: "Play audio from a URL",
|
|
15678
15687
|
returnType: { kind: "boolean" },
|
|
@@ -15681,7 +15690,7 @@ const El = {
|
|
|
15681
15690
|
{ name: "volume", type: { kind: "number", nullable: !0 }, description: "Volume level from 0.0 to 1.0" }
|
|
15682
15691
|
]
|
|
15683
15692
|
};
|
|
15684
|
-
async function
|
|
15693
|
+
async function Ml(e, l) {
|
|
15685
15694
|
if (typeof window > "u" || typeof Audio > "u" || typeof e != "string" || !e.trim())
|
|
15686
15695
|
return !1;
|
|
15687
15696
|
try {
|
|
@@ -15691,7 +15700,7 @@ async function Nl(e, l) {
|
|
|
15691
15700
|
return !1;
|
|
15692
15701
|
}
|
|
15693
15702
|
}
|
|
15694
|
-
const
|
|
15703
|
+
const kl = {
|
|
15695
15704
|
name: "ikon.client.showNotification",
|
|
15696
15705
|
description: "Show a browser notification (requests permission if needed)",
|
|
15697
15706
|
returnType: { kind: "boolean" },
|
|
@@ -15701,7 +15710,7 @@ const gl = {
|
|
|
15701
15710
|
{ name: "icon", type: { kind: "string", nullable: !0 }, description: "URL of notification icon" }
|
|
15702
15711
|
]
|
|
15703
15712
|
};
|
|
15704
|
-
async function
|
|
15713
|
+
async function Sl(e, l, i) {
|
|
15705
15714
|
if (typeof window > "u" || !("Notification" in window) || typeof e != "string" || !e.trim())
|
|
15706
15715
|
return !1;
|
|
15707
15716
|
try {
|
|
@@ -15714,12 +15723,12 @@ async function Ml(e, l, i) {
|
|
|
15714
15723
|
return !1;
|
|
15715
15724
|
}
|
|
15716
15725
|
}
|
|
15717
|
-
const
|
|
15726
|
+
const Pl = {
|
|
15718
15727
|
name: "ikon.client.requestFullscreen",
|
|
15719
15728
|
description: "Enter fullscreen mode",
|
|
15720
15729
|
returnType: { kind: "boolean" }
|
|
15721
15730
|
};
|
|
15722
|
-
async function
|
|
15731
|
+
async function Cl() {
|
|
15723
15732
|
if (typeof document > "u" || !document.documentElement)
|
|
15724
15733
|
return !1;
|
|
15725
15734
|
try {
|
|
@@ -15729,12 +15738,12 @@ async function Sl() {
|
|
|
15729
15738
|
return !1;
|
|
15730
15739
|
}
|
|
15731
15740
|
}
|
|
15732
|
-
const
|
|
15741
|
+
const _l = {
|
|
15733
15742
|
name: "ikon.client.exitFullscreen",
|
|
15734
15743
|
description: "Exit fullscreen mode",
|
|
15735
15744
|
returnType: { kind: "boolean" }
|
|
15736
15745
|
};
|
|
15737
|
-
function
|
|
15746
|
+
function Ol() {
|
|
15738
15747
|
if (typeof document > "u")
|
|
15739
15748
|
return !1;
|
|
15740
15749
|
try {
|
|
@@ -15744,7 +15753,7 @@ function Cl() {
|
|
|
15744
15753
|
return !1;
|
|
15745
15754
|
}
|
|
15746
15755
|
}
|
|
15747
|
-
const
|
|
15756
|
+
const Vl = {
|
|
15748
15757
|
name: "ikon.client.downloadFile",
|
|
15749
15758
|
description: "Trigger a file download",
|
|
15750
15759
|
returnType: { kind: "boolean" },
|
|
@@ -15753,7 +15762,7 @@ const _l = {
|
|
|
15753
15762
|
{ name: "filename", type: { kind: "string", nullable: !0 }, description: "Suggested filename for the download" }
|
|
15754
15763
|
]
|
|
15755
15764
|
};
|
|
15756
|
-
function
|
|
15765
|
+
function Ll(e, l) {
|
|
15757
15766
|
if (typeof document > "u" || typeof e != "string" || !e.trim())
|
|
15758
15767
|
return !1;
|
|
15759
15768
|
try {
|
|
@@ -15764,13 +15773,13 @@ function Ol(e, l) {
|
|
|
15764
15773
|
}
|
|
15765
15774
|
}
|
|
15766
15775
|
let ce = null;
|
|
15767
|
-
const
|
|
15776
|
+
const Dl = {
|
|
15768
15777
|
name: "ikon.client.keepScreenAwake",
|
|
15769
15778
|
description: "Prevent or allow the screen to sleep",
|
|
15770
15779
|
returnType: { kind: "boolean" },
|
|
15771
15780
|
parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
|
|
15772
15781
|
};
|
|
15773
|
-
async function
|
|
15782
|
+
async function vl(e) {
|
|
15774
15783
|
if (typeof navigator > "u" || !("wakeLock" in navigator))
|
|
15775
15784
|
return !1;
|
|
15776
15785
|
try {
|
|
@@ -15779,15 +15788,15 @@ async function Ll(e) {
|
|
|
15779
15788
|
return !1;
|
|
15780
15789
|
}
|
|
15781
15790
|
}
|
|
15782
|
-
const
|
|
15791
|
+
const jl = {
|
|
15783
15792
|
name: "ikon.client.getVisibility",
|
|
15784
15793
|
description: "Get the current page visibility state",
|
|
15785
15794
|
returnType: { kind: "string", nullable: !0 }
|
|
15786
15795
|
};
|
|
15787
|
-
function
|
|
15796
|
+
function Hl() {
|
|
15788
15797
|
return typeof document > "u" ? null : document.visibilityState || null;
|
|
15789
15798
|
}
|
|
15790
|
-
const
|
|
15799
|
+
const xl = {
|
|
15791
15800
|
name: "ikon.client.scrollTo",
|
|
15792
15801
|
description: "Scroll the page to a specific position",
|
|
15793
15802
|
returnType: { kind: "boolean" },
|
|
@@ -15797,7 +15806,7 @@ const jl = {
|
|
|
15797
15806
|
{ name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
|
|
15798
15807
|
]
|
|
15799
15808
|
};
|
|
15800
|
-
function
|
|
15809
|
+
function Wl(e, l, i) {
|
|
15801
15810
|
if (typeof window > "u" || typeof e != "number" || typeof l != "number")
|
|
15802
15811
|
return !1;
|
|
15803
15812
|
try {
|
|
@@ -15810,12 +15819,12 @@ function Hl(e, l, i) {
|
|
|
15810
15819
|
return !1;
|
|
15811
15820
|
}
|
|
15812
15821
|
}
|
|
15813
|
-
const
|
|
15822
|
+
const Rl = {
|
|
15814
15823
|
name: "ikon.client.getBatteryLevel",
|
|
15815
15824
|
description: "Get the current battery level (0-100)",
|
|
15816
15825
|
returnType: { kind: "number", nullable: !0 }
|
|
15817
15826
|
};
|
|
15818
|
-
async function
|
|
15827
|
+
async function Gl() {
|
|
15819
15828
|
if (typeof navigator > "u" || !("getBattery" in navigator))
|
|
15820
15829
|
return null;
|
|
15821
15830
|
try {
|
|
@@ -15825,19 +15834,18 @@ async function Wl() {
|
|
|
15825
15834
|
return null;
|
|
15826
15835
|
}
|
|
15827
15836
|
}
|
|
15828
|
-
const
|
|
15837
|
+
const Kl = {
|
|
15829
15838
|
name: "ikon.client.getNetworkType",
|
|
15830
15839
|
description: "Get the current network connection type",
|
|
15831
15840
|
returnType: { kind: "string", nullable: !0 }
|
|
15832
15841
|
};
|
|
15833
|
-
function
|
|
15842
|
+
function Jl() {
|
|
15834
15843
|
if (typeof navigator > "u")
|
|
15835
15844
|
return null;
|
|
15836
15845
|
const e = navigator.connection;
|
|
15837
15846
|
return e && (e.effectiveType || e.type) || null;
|
|
15838
15847
|
}
|
|
15839
|
-
const
|
|
15840
|
-
{ definition: el, handler: rl },
|
|
15848
|
+
const $l = [
|
|
15841
15849
|
{ definition: tl, handler: ol },
|
|
15842
15850
|
{ definition: nl, handler: ll },
|
|
15843
15851
|
{ definition: il, handler: sl },
|
|
@@ -15846,8 +15854,8 @@ const Kl = [
|
|
|
15846
15854
|
{ definition: fl, handler: wl },
|
|
15847
15855
|
{ definition: hl, handler: Il },
|
|
15848
15856
|
{ definition: pl, handler: Tl },
|
|
15849
|
-
{ definition: Fl, handler:
|
|
15850
|
-
{ definition:
|
|
15857
|
+
{ definition: Fl, handler: bl },
|
|
15858
|
+
{ definition: ml, handler: yl },
|
|
15851
15859
|
{ definition: El, handler: Nl },
|
|
15852
15860
|
{ definition: gl, handler: Ml },
|
|
15853
15861
|
{ definition: kl, handler: Sl },
|
|
@@ -15857,16 +15865,17 @@ const Kl = [
|
|
|
15857
15865
|
{ definition: Dl, handler: vl },
|
|
15858
15866
|
{ definition: jl, handler: Hl },
|
|
15859
15867
|
{ definition: xl, handler: Wl },
|
|
15860
|
-
{ definition: Rl, handler: Gl }
|
|
15868
|
+
{ definition: Rl, handler: Gl },
|
|
15869
|
+
{ definition: Kl, handler: Jl }
|
|
15861
15870
|
];
|
|
15862
|
-
function
|
|
15863
|
-
const l =
|
|
15871
|
+
function zl(e) {
|
|
15872
|
+
const l = $l.map(({ definition: i, handler: s }) => e.register(i, s));
|
|
15864
15873
|
return () => l.forEach((i) => i());
|
|
15865
15874
|
}
|
|
15866
15875
|
function Bo() {
|
|
15867
15876
|
return typeof window < "u" && typeof navigator < "u";
|
|
15868
15877
|
}
|
|
15869
|
-
const
|
|
15878
|
+
const Yl = new Uint8Array(0);
|
|
15870
15879
|
function ve(e) {
|
|
15871
15880
|
switch (e.kind) {
|
|
15872
15881
|
case "array":
|
|
@@ -15916,7 +15925,7 @@ function Ao(e, l) {
|
|
|
15916
15925
|
}
|
|
15917
15926
|
return i;
|
|
15918
15927
|
}
|
|
15919
|
-
function
|
|
15928
|
+
function Fn(e, l) {
|
|
15920
15929
|
if (e === void 0)
|
|
15921
15930
|
return "null";
|
|
15922
15931
|
if (e === null) {
|
|
@@ -15926,9 +15935,9 @@ function Tn(e, l) {
|
|
|
15926
15935
|
}
|
|
15927
15936
|
return JSON.stringify(e);
|
|
15928
15937
|
}
|
|
15929
|
-
function
|
|
15938
|
+
function Xl(e, l) {
|
|
15930
15939
|
const i = (e.parameters ?? []).map((a) => {
|
|
15931
|
-
const c = ve(a.type), f = Object.prototype.hasOwnProperty.call(a, "defaultValue"), w = f ?
|
|
15940
|
+
const c = ve(a.type), f = Object.prototype.hasOwnProperty.call(a, "defaultValue"), w = f ? Fn(a.defaultValue, c) : "";
|
|
15932
15941
|
return {
|
|
15933
15942
|
name: a.name,
|
|
15934
15943
|
descriptor: c,
|
|
@@ -15953,7 +15962,7 @@ function zl(e, l) {
|
|
|
15953
15962
|
TypeName: pe(a.descriptor),
|
|
15954
15963
|
HasDefaultValue: a.hasDefaultValue,
|
|
15955
15964
|
DefaultValueJson: a.defaultValueJson,
|
|
15956
|
-
DefaultValueData:
|
|
15965
|
+
DefaultValueData: Yl,
|
|
15957
15966
|
IsEnumerable: !1,
|
|
15958
15967
|
EnumerableItemTypeName: "",
|
|
15959
15968
|
Description: a.description ?? ""
|
|
@@ -15967,11 +15976,11 @@ function zl(e, l) {
|
|
|
15967
15976
|
returnType: s
|
|
15968
15977
|
};
|
|
15969
15978
|
}
|
|
15970
|
-
const Uo = z("FunctionRegistry"),
|
|
15971
|
-
function
|
|
15979
|
+
const Uo = z("FunctionRegistry"), Ql = new Uint8Array(0);
|
|
15980
|
+
function Zl(e) {
|
|
15972
15981
|
return !e || typeof e != "object" ? !1 : e.data instanceof Uint8Array;
|
|
15973
15982
|
}
|
|
15974
|
-
class
|
|
15983
|
+
class ql {
|
|
15975
15984
|
functions = /* @__PURE__ */ new Map();
|
|
15976
15985
|
config = null;
|
|
15977
15986
|
isConnected = !1;
|
|
@@ -15993,7 +16002,7 @@ class Ql {
|
|
|
15993
16002
|
* If already connected, sends registration to server immediately.
|
|
15994
16003
|
*/
|
|
15995
16004
|
register(l, i) {
|
|
15996
|
-
const s =
|
|
16005
|
+
const s = Xl(l, i);
|
|
15997
16006
|
return this.functions.set(l.name, s), this.isConnected && this.config && this.sendRegistration(s), () => this.unregister(l.name);
|
|
15998
16007
|
}
|
|
15999
16008
|
/**
|
|
@@ -16054,7 +16063,7 @@ class Ql {
|
|
|
16054
16063
|
* Handle an incoming function call.
|
|
16055
16064
|
*/
|
|
16056
16065
|
handleFunctionCall(l, i) {
|
|
16057
|
-
const s =
|
|
16066
|
+
const s = qe.fromProtocolMessage(l), d = this.functions.get(s.FunctionName);
|
|
16058
16067
|
if (!d) {
|
|
16059
16068
|
Uo.warn(`Received call for unknown function: ${s.FunctionName}`), this.sendError(s.CallId, s.InstanceId, i, new Error(`Unknown function: ${s.FunctionName}`));
|
|
16060
16069
|
return;
|
|
@@ -16072,9 +16081,9 @@ class Ql {
|
|
|
16072
16081
|
t === void 0 || t === "" ? o.hasDefaultValue ? d.push(Ao(o.defaultValueJson, o.descriptor)) : d.push(void 0) : d.push(Ao(t, o.descriptor));
|
|
16073
16082
|
}
|
|
16074
16083
|
const a = await l.handler(...d);
|
|
16075
|
-
let c = a, f =
|
|
16076
|
-
|
|
16077
|
-
const w =
|
|
16084
|
+
let c = a, f = Ql;
|
|
16085
|
+
Zl(a) && (c = a.value, f = new Uint8Array(a.data));
|
|
16086
|
+
const w = Fn(c, l.returnType);
|
|
16078
16087
|
this.sendResult(i.CallId, i.InstanceId, s, l, w, f);
|
|
16079
16088
|
} catch (d) {
|
|
16080
16089
|
Uo.error(`Function ${i.FunctionName} execution failed:`, d), this.sendError(i.CallId, i.InstanceId, s, d instanceof Error ? d : new Error(String(d)));
|
|
@@ -16132,7 +16141,7 @@ class Ql {
|
|
|
16132
16141
|
this.config.sendProtocolMessage(a);
|
|
16133
16142
|
}
|
|
16134
16143
|
}
|
|
16135
|
-
function
|
|
16144
|
+
function Bl(e, l) {
|
|
16136
16145
|
return { value: e, data: l };
|
|
16137
16146
|
}
|
|
16138
16147
|
function Ke(e) {
|
|
@@ -16148,7 +16157,7 @@ const Ge = {
|
|
|
16148
16157
|
StartAudioCapture: "ikon.client.startAudioCapture",
|
|
16149
16158
|
StopCapture: "ikon.client.stopCapture",
|
|
16150
16159
|
CaptureImage: "ikon.client.captureImage"
|
|
16151
|
-
},
|
|
16160
|
+
}, Al = {
|
|
16152
16161
|
name: Ge.StartVideoCapture,
|
|
16153
16162
|
description: "Start camera or screen capture and stream video frames to the server",
|
|
16154
16163
|
returnType: { kind: "string" },
|
|
@@ -16156,26 +16165,26 @@ const Ge = {
|
|
|
16156
16165
|
{ name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
|
|
16157
16166
|
{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
|
|
16158
16167
|
]
|
|
16159
|
-
},
|
|
16168
|
+
}, Ul = {
|
|
16160
16169
|
name: Ge.StartAudioCapture,
|
|
16161
16170
|
description: "Start microphone capture and stream audio frames to the server",
|
|
16162
16171
|
returnType: { kind: "string" },
|
|
16163
16172
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
16164
|
-
},
|
|
16173
|
+
}, ei = {
|
|
16165
16174
|
name: Ge.StopCapture,
|
|
16166
16175
|
description: "Stop a previously started capture by captureId",
|
|
16167
16176
|
returnType: { kind: "boolean" },
|
|
16168
16177
|
parameters: [{ name: "captureId", type: { kind: "string" }, description: "Capture ID to stop" }]
|
|
16169
|
-
},
|
|
16178
|
+
}, ri = {
|
|
16170
16179
|
name: Ge.CaptureImage,
|
|
16171
16180
|
description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
|
|
16172
16181
|
returnType: { kind: "string" },
|
|
16173
16182
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
16174
16183
|
};
|
|
16175
|
-
function
|
|
16184
|
+
function ti(e, l) {
|
|
16176
16185
|
const i = [];
|
|
16177
16186
|
return i.push(
|
|
16178
|
-
e.register(
|
|
16187
|
+
e.register(Al, async (s, d) => {
|
|
16179
16188
|
const a = l.mediaCapture;
|
|
16180
16189
|
if (!a)
|
|
16181
16190
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -16183,7 +16192,7 @@ function ei(e, l) {
|
|
|
16183
16192
|
return ((typeof s == "string" && s.trim().toLowerCase() === "screen" ? "screen" : "camera") === "screen" ? await a.video.startScreen({ userGesture: !1, options: c, constraints: c?.constraints }) : await a.video.startCamera({ userGesture: !1, options: c, constraints: c?.constraints })).captureId;
|
|
16184
16193
|
})
|
|
16185
16194
|
), i.push(
|
|
16186
|
-
e.register(
|
|
16195
|
+
e.register(Ul, async (s) => {
|
|
16187
16196
|
const d = l.mediaCapture;
|
|
16188
16197
|
if (!d)
|
|
16189
16198
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -16191,7 +16200,7 @@ function ei(e, l) {
|
|
|
16191
16200
|
return (await d.audio.startMic({ userGesture: !1, options: a, constraints: a?.constraints })).captureId;
|
|
16192
16201
|
})
|
|
16193
16202
|
), i.push(
|
|
16194
|
-
e.register(
|
|
16203
|
+
e.register(ei, async (s) => {
|
|
16195
16204
|
const d = l.mediaCapture;
|
|
16196
16205
|
if (!d || typeof s != "string" || !s.trim())
|
|
16197
16206
|
return !1;
|
|
@@ -16199,7 +16208,7 @@ function ei(e, l) {
|
|
|
16199
16208
|
return a || c;
|
|
16200
16209
|
})
|
|
16201
16210
|
), i.push(
|
|
16202
|
-
e.register(
|
|
16211
|
+
e.register(ri, async (s) => {
|
|
16203
16212
|
const d = l.mediaCapture;
|
|
16204
16213
|
if (!d)
|
|
16205
16214
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -16211,16 +16220,16 @@ function ei(e, l) {
|
|
|
16211
16220
|
width: a.width,
|
|
16212
16221
|
height: a.height
|
|
16213
16222
|
}), f = JSON.stringify({ mime: c.mime, width: c.width, height: c.height });
|
|
16214
|
-
return
|
|
16223
|
+
return Bl(f, c.data);
|
|
16215
16224
|
})
|
|
16216
16225
|
), () => {
|
|
16217
16226
|
for (const s of i)
|
|
16218
16227
|
s();
|
|
16219
16228
|
};
|
|
16220
16229
|
}
|
|
16221
|
-
const
|
|
16230
|
+
const oi = globalThis;
|
|
16222
16231
|
function Ee() {
|
|
16223
|
-
if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" ||
|
|
16232
|
+
if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" || oi.crossOriginIsolated === !1)
|
|
16224
16233
|
return !1;
|
|
16225
16234
|
try {
|
|
16226
16235
|
new SharedArrayBuffer(1);
|
|
@@ -16229,24 +16238,33 @@ function Ee() {
|
|
|
16229
16238
|
}
|
|
16230
16239
|
return !0;
|
|
16231
16240
|
}
|
|
16232
|
-
function
|
|
16241
|
+
function bn(e) {
|
|
16233
16242
|
return typeof AudioWorkletNode != "function" ? !1 : typeof e.audioWorklet?.addModule == "function";
|
|
16234
16243
|
}
|
|
16235
|
-
|
|
16244
|
+
function ni(e) {
|
|
16245
|
+
return new Worker(
|
|
16246
|
+
"/assets/audio-worker-Ci3tYX2B.js",
|
|
16247
|
+
{
|
|
16248
|
+
type: "module",
|
|
16249
|
+
name: e?.name
|
|
16250
|
+
}
|
|
16251
|
+
);
|
|
16252
|
+
}
|
|
16253
|
+
const x = z("IkonAudioPlayback"), li = () => {
|
|
16236
16254
|
const e = globalThis.navigator;
|
|
16237
16255
|
if (!e) return !1;
|
|
16238
16256
|
const l = e.platform ?? e.userAgentData?.platform ?? "", i = e.userAgent ?? "", s = e.maxTouchPoints, d = /iPad|iPhone|iPod/.test(l), a = /iPad|iPhone|iPod/.test(i), c = l === "MacIntel" && typeof s == "number" && s > 1;
|
|
16239
16257
|
return d || a || c;
|
|
16240
|
-
},
|
|
16258
|
+
}, ii = {
|
|
16241
16259
|
enabled: !0
|
|
16242
16260
|
}, Je = {
|
|
16243
16261
|
enabled: !1,
|
|
16244
16262
|
statusInterval: 5
|
|
16245
|
-
}, ue = 48e3, J = 2,
|
|
16263
|
+
}, ue = 48e3, J = 2, si = 2, en = 512;
|
|
16246
16264
|
function fe(e) {
|
|
16247
16265
|
return e instanceof Error ? `${e.name}: ${e.message}` : String(e);
|
|
16248
16266
|
}
|
|
16249
|
-
function
|
|
16267
|
+
function di(e) {
|
|
16250
16268
|
return `
|
|
16251
16269
|
// Jitter buffer constants
|
|
16252
16270
|
const OUTPUT_SAMPLE_RATE_HZ = ${e.outputSampleRateHz};
|
|
@@ -16286,7 +16304,7 @@ class RingBuffer {
|
|
|
16286
16304
|
return this.storage.length;
|
|
16287
16305
|
}
|
|
16288
16306
|
|
|
16289
|
-
|
|
16307
|
+
availableRead() {
|
|
16290
16308
|
const read = Atomics.load(this.readWrite, 0);
|
|
16291
16309
|
const write = Atomics.load(this.readWrite, 1);
|
|
16292
16310
|
if (write >= read) return write - read;
|
|
@@ -16294,7 +16312,7 @@ class RingBuffer {
|
|
|
16294
16312
|
}
|
|
16295
16313
|
|
|
16296
16314
|
pop(target) {
|
|
16297
|
-
const readable = Math.min(this.
|
|
16315
|
+
const readable = Math.min(this.availableRead(), target.length);
|
|
16298
16316
|
if (readable <= 0) return 0;
|
|
16299
16317
|
|
|
16300
16318
|
let read = Atomics.load(this.readWrite, 0);
|
|
@@ -16310,7 +16328,7 @@ class RingBuffer {
|
|
|
16310
16328
|
}
|
|
16311
16329
|
|
|
16312
16330
|
skip(count) {
|
|
16313
|
-
const readable = Math.min(this.
|
|
16331
|
+
const readable = Math.min(this.availableRead(), count);
|
|
16314
16332
|
if (readable <= 0) return 0;
|
|
16315
16333
|
|
|
16316
16334
|
let read = Atomics.load(this.readWrite, 0);
|
|
@@ -16554,11 +16572,6 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
|
|
|
16554
16572
|
if (typeof data.frameSizeInterleavedSamples === 'number' && data.frameSizeInterleavedSamples > 0) {
|
|
16555
16573
|
stream.frameSamplesPerChannel = Math.max(1, Math.round(data.frameSizeInterleavedSamples / this.channels));
|
|
16556
16574
|
}
|
|
16557
|
-
|
|
16558
|
-
// Mark stream as ending if this is the last frame
|
|
16559
|
-
if (data.isLast) {
|
|
16560
|
-
stream.streamEnding = true;
|
|
16561
|
-
}
|
|
16562
16575
|
return;
|
|
16563
16576
|
}
|
|
16564
16577
|
};
|
|
@@ -16566,7 +16579,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
|
|
|
16566
16579
|
|
|
16567
16580
|
availableSamples(streamId) {
|
|
16568
16581
|
const ring = this.ringBuffers.get(streamId);
|
|
16569
|
-
if (ring) return ring.
|
|
16582
|
+
if (ring) return ring.availableRead();
|
|
16570
16583
|
const q = this.queueBuffers.get(streamId);
|
|
16571
16584
|
if (q) return q.available();
|
|
16572
16585
|
return 0;
|
|
@@ -16838,9 +16851,8 @@ class Ir {
|
|
|
16838
16851
|
client;
|
|
16839
16852
|
config;
|
|
16840
16853
|
enabled = !1;
|
|
16841
|
-
prepared = !1;
|
|
16842
16854
|
stateUnsubscribe = null;
|
|
16843
|
-
isIos =
|
|
16855
|
+
isIos = li();
|
|
16844
16856
|
recreateOnNextResume = !1;
|
|
16845
16857
|
boundVisibilityChange = null;
|
|
16846
16858
|
unlockHandler = null;
|
|
@@ -16864,19 +16876,6 @@ class Ir {
|
|
|
16864
16876
|
constructor(l, i) {
|
|
16865
16877
|
this.client = l, this.config = i ?? {};
|
|
16866
16878
|
}
|
|
16867
|
-
/**
|
|
16868
|
-
* Prepare the audio pipeline without attempting to start playback.
|
|
16869
|
-
*
|
|
16870
|
-
* This is meant to reduce time-to-first-audio by:
|
|
16871
|
-
* - creating the AudioContext (it may remain suspended)
|
|
16872
|
-
* - loading the AudioWorklet module (if supported)
|
|
16873
|
-
* - starting the decode worker when the client is connected
|
|
16874
|
-
*
|
|
16875
|
-
* Prewarming does not trigger user-gesture prompts and does not call resume().
|
|
16876
|
-
*/
|
|
16877
|
-
async prepare() {
|
|
16878
|
-
this.prepared = !0, this.ensureStateSubscription(), await this.ensureAudioGraph(void 0, { promptForUnlock: !1 }), await this.ensureWorkers();
|
|
16879
|
-
}
|
|
16880
16879
|
/**
|
|
16881
16880
|
* Enable or disable audio playback.
|
|
16882
16881
|
*
|
|
@@ -16891,7 +16890,7 @@ class Ir {
|
|
|
16891
16890
|
} catch {
|
|
16892
16891
|
}
|
|
16893
16892
|
if (l === this.enabled) {
|
|
16894
|
-
l && await this.ensureAudioGraph(i, { promptForUnlock: !0 });
|
|
16893
|
+
l && (await this.ensureAudioGraph(i, { promptForUnlock: !0 }), await this.ensureWorkers());
|
|
16895
16894
|
return;
|
|
16896
16895
|
}
|
|
16897
16896
|
if (this.enabled = l, this.ensureStateSubscription(), !l) {
|
|
@@ -16916,13 +16915,13 @@ class Ir {
|
|
|
16916
16915
|
* Dispose of resources. After calling this, the instance should not be reused.
|
|
16917
16916
|
*/
|
|
16918
16917
|
dispose() {
|
|
16919
|
-
this.enabled = !1, this.
|
|
16918
|
+
this.enabled = !1, this.activeStreams.clear(), this.removeUnlockHandler(), this.removeVisibilityHandler(), this.stateUnsubscribe?.(), this.stateUnsubscribe = null, this.stopAudioGraph(), this.stopWorkers();
|
|
16920
16919
|
}
|
|
16921
16920
|
resolveOutputConfig() {
|
|
16922
16921
|
const l = this.config.output ?? {};
|
|
16923
16922
|
return {
|
|
16924
16923
|
multiStreamNormalization: {
|
|
16925
|
-
enabled: l.multiStreamNormalization?.enabled ??
|
|
16924
|
+
enabled: l.multiStreamNormalization?.enabled ?? ii.enabled
|
|
16926
16925
|
},
|
|
16927
16926
|
diagnostics: {
|
|
16928
16927
|
enabled: l.diagnostics?.enabled ?? Je.enabled,
|
|
@@ -16948,19 +16947,21 @@ class Ir {
|
|
|
16948
16947
|
this.outputSampleRateHz = this.audioContext.sampleRate || ue, this.outputSampleRateHz !== ue && x.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${ue}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
|
|
16949
16948
|
}
|
|
16950
16949
|
const s = this.audioContext, d = this.resolveOutputConfig();
|
|
16951
|
-
if ((this.config.threading?.preferAudioWorklet ?? !0) &&
|
|
16950
|
+
if ((this.config.threading?.preferAudioWorklet ?? !0) && bn(s)) {
|
|
16952
16951
|
await this.ensureAudioWorklet(s, d, l, i);
|
|
16953
16952
|
return;
|
|
16954
16953
|
}
|
|
16955
|
-
this.ensureScriptProcessor(s, d);
|
|
16954
|
+
this.ensureScriptProcessor(s, d), await this.resumeAudioContextIfPossible(s, l, i), this.rebindWorkerTransportIfNeeded();
|
|
16956
16955
|
}
|
|
16957
16956
|
attachAudioContextHealthHandlers(l) {
|
|
16958
16957
|
l.__ikonAudioHealthAttached !== !0 && (Object.defineProperty(l, "__ikonAudioHealthAttached", { value: !0, enumerable: !1 }), l.onstatechange = () => {
|
|
16959
|
-
this.recoverAudioContext({ reason: "statechange" });
|
|
16960
|
-
}, this.attachVisibilityHandler()
|
|
16958
|
+
this.enabled && this.recoverAudioContext({ reason: "statechange" });
|
|
16959
|
+
}, this.attachVisibilityHandler());
|
|
16961
16960
|
}
|
|
16962
16961
|
attachVisibilityHandler() {
|
|
16963
16962
|
this.boundVisibilityChange || typeof document > "u" || (this.boundVisibilityChange = () => {
|
|
16963
|
+
if (!this.enabled)
|
|
16964
|
+
return;
|
|
16964
16965
|
if (document.visibilityState === "visible") {
|
|
16965
16966
|
this.audioContext && this.getContextState(this.audioContext) !== "running" && this.recoverAudioContext({ reason: "visibilityVisible" });
|
|
16966
16967
|
return;
|
|
@@ -16975,7 +16976,7 @@ class Ir {
|
|
|
16975
16976
|
return l?.state ?? "suspended";
|
|
16976
16977
|
}
|
|
16977
16978
|
addUnlockHandler() {
|
|
16978
|
-
if (this.awaitingUnlock || typeof document > "u")
|
|
16979
|
+
if (!this.enabled || this.awaitingUnlock || typeof document > "u")
|
|
16979
16980
|
return;
|
|
16980
16981
|
this.awaitingUnlock = !0, this.unlockHandler = () => {
|
|
16981
16982
|
const i = this.audioContext;
|
|
@@ -17037,7 +17038,7 @@ class Ir {
|
|
|
17037
17038
|
} catch {
|
|
17038
17039
|
}
|
|
17039
17040
|
this.workletModuleKey = a, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(
|
|
17040
|
-
new Blob([
|
|
17041
|
+
new Blob([di({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: J })], { type: "text/javascript" })
|
|
17041
17042
|
);
|
|
17042
17043
|
}
|
|
17043
17044
|
this.workletReady || (this.workletReady = l.audioWorklet.addModule(this.workletModuleUrl).catch((h) => {
|
|
@@ -17104,8 +17105,8 @@ class Ir {
|
|
|
17104
17105
|
I.totalSamples > 0 && (t += 1), this.readFromFallbackQueue(I, d);
|
|
17105
17106
|
for (let N = 0; N < h; N++)
|
|
17106
17107
|
for (let F = 0; F < w; F++) {
|
|
17107
|
-
const
|
|
17108
|
-
o[F][N] +=
|
|
17108
|
+
const m = d[N * w + F] ?? 0;
|
|
17109
|
+
o[F][N] += m;
|
|
17109
17110
|
}
|
|
17110
17111
|
I.ending && I.totalSamples <= 0 && n.push(u);
|
|
17111
17112
|
}
|
|
@@ -17125,18 +17126,21 @@ class Ir {
|
|
|
17125
17126
|
}
|
|
17126
17127
|
}, a.connect(l.destination), this.scriptProcessorNode = a, this.ensureScriptProcessorDiagnostics(i);
|
|
17127
17128
|
}
|
|
17129
|
+
compactFallbackQueue(l) {
|
|
17130
|
+
l.headIndex > 32 && l.headIndex > l.chunks.length / 2 && (l.chunks = l.chunks.slice(l.headIndex), l.headIndex = 0);
|
|
17131
|
+
}
|
|
17128
17132
|
skipFromFallbackQueue(l, i) {
|
|
17129
17133
|
if (i <= 0)
|
|
17130
17134
|
return;
|
|
17131
17135
|
let s = i;
|
|
17132
|
-
for (; s > 0 && l.chunks.length
|
|
17133
|
-
const d = l.chunks[
|
|
17134
|
-
l.offset += c, l.totalSamples -= c, s -= c, l.offset >= d.length && (l.
|
|
17136
|
+
for (; s > 0 && l.headIndex < l.chunks.length; ) {
|
|
17137
|
+
const d = l.chunks[l.headIndex], a = d.length - l.offset, c = Math.min(a, s);
|
|
17138
|
+
l.offset += c, l.totalSamples -= c, s -= c, l.offset >= d.length && (l.headIndex += 1, l.offset = 0);
|
|
17135
17139
|
}
|
|
17136
|
-
l.totalSamples < 0 && (l.totalSamples = 0);
|
|
17140
|
+
l.totalSamples < 0 && (l.totalSamples = 0), this.compactFallbackQueue(l);
|
|
17137
17141
|
}
|
|
17138
17142
|
trimFallbackQueue(l) {
|
|
17139
|
-
const i = this.outputSampleRateHz * J *
|
|
17143
|
+
const i = this.outputSampleRateHz * J * si, s = l.totalSamples - i;
|
|
17140
17144
|
s <= 0 || this.skipFromFallbackQueue(l, s);
|
|
17141
17145
|
}
|
|
17142
17146
|
stopScriptProcessorDiagnostics() {
|
|
@@ -17162,11 +17166,11 @@ class Ir {
|
|
|
17162
17166
|
}
|
|
17163
17167
|
readFromFallbackQueue(l, i) {
|
|
17164
17168
|
let s = 0;
|
|
17165
|
-
for (; s < i.length && l.chunks.length
|
|
17166
|
-
const d = l.chunks[
|
|
17167
|
-
i.set(d.subarray(l.offset, l.offset + c), s), s += c, l.offset += c, l.totalSamples = Math.max(0, l.totalSamples - c), l.offset >= d.length && (l.
|
|
17169
|
+
for (; s < i.length && l.headIndex < l.chunks.length; ) {
|
|
17170
|
+
const d = l.chunks[l.headIndex], a = d.length - l.offset, c = Math.min(a, i.length - s);
|
|
17171
|
+
i.set(d.subarray(l.offset, l.offset + c), s), s += c, l.offset += c, l.totalSamples = Math.max(0, l.totalSamples - c), l.offset >= d.length && (l.headIndex += 1, l.offset = 0);
|
|
17168
17172
|
}
|
|
17169
|
-
s < i.length && i.fill(0, s);
|
|
17173
|
+
s < i.length && i.fill(0, s), this.compactFallbackQueue(l);
|
|
17170
17174
|
}
|
|
17171
17175
|
async resumeAudioContextIfPossible(l, i, s) {
|
|
17172
17176
|
if (this.getContextState(l) === "running") {
|
|
@@ -17204,13 +17208,13 @@ class Ir {
|
|
|
17204
17208
|
}), await this.recoveryTask;
|
|
17205
17209
|
}
|
|
17206
17210
|
async recoverAudioContextInternal(l) {
|
|
17207
|
-
if (!this.enabled
|
|
17211
|
+
if (!this.enabled)
|
|
17208
17212
|
return;
|
|
17209
17213
|
const i = this.activeStreams.size > 0, s = this.audioContext;
|
|
17210
17214
|
if (!s) {
|
|
17211
17215
|
if (!i)
|
|
17212
17216
|
return;
|
|
17213
|
-
await this.ensureAudioGraph(void 0, { promptForUnlock: !
|
|
17217
|
+
await this.ensureAudioGraph(void 0, { promptForUnlock: !0 });
|
|
17214
17218
|
return;
|
|
17215
17219
|
}
|
|
17216
17220
|
const d = this.getContextState(s);
|
|
@@ -17269,16 +17273,12 @@ class Ir {
|
|
|
17269
17273
|
}
|
|
17270
17274
|
const l = this.client.createProtocolMessagePort({ opcodeGroupsMask: j.GROUP_AUDIO });
|
|
17271
17275
|
if (!l) {
|
|
17272
|
-
|
|
17276
|
+
this.enabled && x.debug("Audio pipeline waiting for client connection");
|
|
17273
17277
|
return;
|
|
17274
17278
|
}
|
|
17275
17279
|
this.protocolPort = l;
|
|
17276
17280
|
try {
|
|
17277
|
-
this.audioWorker = new
|
|
17278
|
-
/* @vite-ignore */
|
|
17279
|
-
"/assets/audio-worker-CdScgwWe.js",
|
|
17280
|
-
import.meta.url
|
|
17281
|
-
), { type: "module" });
|
|
17281
|
+
this.audioWorker = new ni();
|
|
17282
17282
|
} catch (r) {
|
|
17283
17283
|
x.warn(`Failed to create audio worker: ${fe(r)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
17284
17284
|
return;
|
|
@@ -17296,7 +17296,7 @@ class Ir {
|
|
|
17296
17296
|
preferWebCodecs: a
|
|
17297
17297
|
};
|
|
17298
17298
|
i.postMessage(c), i.postMessage({ type: "attachProtocolPort", port: l.port }, [l.port]);
|
|
17299
|
-
const f = this.audioWorkletNode ? "AudioWorklet" : "ScriptProcessor", w = d ? "SharedArrayBuffer" : "MessagePort", o = a && typeof AudioDecoder < "u" ? "WebCodecs" : "WASM Opus";
|
|
17299
|
+
const f = this.audioWorkletNode ? "AudioWorklet" : "ScriptProcessor", w = d ? "SharedArrayBuffer" : "MessagePort", o = a && typeof AudioDecoder < "u" ? "WebCodecs (when supported)" : "WASM Opus (fallback)";
|
|
17300
17300
|
x.debug(
|
|
17301
17301
|
`Audio initialized: renderer=${f}, transport=${w}, decoder=${o}, output=${this.outputSampleRateHz}Hz/${J}ch`
|
|
17302
17302
|
);
|
|
@@ -17305,11 +17305,11 @@ class Ir {
|
|
|
17305
17305
|
if (l.type === "streamBegin") {
|
|
17306
17306
|
this.activeStreams.add(l.streamId);
|
|
17307
17307
|
const i = this.audioContext;
|
|
17308
|
-
if (i && this.getContextState(i) !== "running" && this.recoverAudioContext({ reason: "streamBegin" }), this.audioWorkletNode) {
|
|
17308
|
+
if (this.enabled && i && this.getContextState(i) !== "running" && this.recoverAudioContext({ reason: "streamBegin" }), this.audioWorkletNode) {
|
|
17309
17309
|
this.postToWorklet({ type: "streamBegin", streamId: l.streamId, sharedArrayBuffer: l.sharedArrayBuffer });
|
|
17310
17310
|
return;
|
|
17311
17311
|
}
|
|
17312
|
-
this.fallbackQueues.set(l.streamId, { chunks: [], offset: 0, totalSamples: 0, ending: !1 });
|
|
17312
|
+
this.fallbackQueues.set(l.streamId, { chunks: [], headIndex: 0, offset: 0, totalSamples: 0, ending: !1 });
|
|
17313
17313
|
return;
|
|
17314
17314
|
}
|
|
17315
17315
|
if (l.type === "streamEnd") {
|
|
@@ -17322,7 +17322,7 @@ class Ir {
|
|
|
17322
17322
|
this.postToWorklet({ type: "streamEnd", streamId: l.streamId });
|
|
17323
17323
|
return;
|
|
17324
17324
|
}
|
|
17325
|
-
this.
|
|
17325
|
+
this.activeStreams.delete(l.streamId), this.activeStreams.size === 0 && this.removeUnlockHandler();
|
|
17326
17326
|
return;
|
|
17327
17327
|
}
|
|
17328
17328
|
if (l.type === "pcm") {
|
|
@@ -17353,15 +17353,28 @@ class Ir {
|
|
|
17353
17353
|
if (!this.audioWorkletNode) {
|
|
17354
17354
|
if (this.scriptProcessorNode)
|
|
17355
17355
|
return;
|
|
17356
|
-
this.
|
|
17356
|
+
this.enqueuePendingWorkletMessage(l);
|
|
17357
17357
|
return;
|
|
17358
17358
|
}
|
|
17359
17359
|
try {
|
|
17360
17360
|
this.audioWorkletNode.port.postMessage(l, i ?? []);
|
|
17361
17361
|
} catch {
|
|
17362
|
-
this.
|
|
17362
|
+
this.enqueuePendingWorkletMessage(l);
|
|
17363
17363
|
}
|
|
17364
17364
|
}
|
|
17365
|
+
enqueuePendingWorkletMessage(l) {
|
|
17366
|
+
if (l.type === "streamBegin") {
|
|
17367
|
+
const i = this.pendingWorkletMessages.findIndex((s) => s.type === "streamBegin" && s.streamId === l.streamId);
|
|
17368
|
+
i >= 0 && this.pendingWorkletMessages.splice(i, 1);
|
|
17369
|
+
}
|
|
17370
|
+
if (this.pendingWorkletMessages.push(l), !(this.pendingWorkletMessages.length <= en))
|
|
17371
|
+
for (; !(this.pendingWorkletMessages.length <= en); ) {
|
|
17372
|
+
const i = this.pendingWorkletMessages.findIndex((s) => s.type !== "streamBegin");
|
|
17373
|
+
if (i < 0)
|
|
17374
|
+
break;
|
|
17375
|
+
this.pendingWorkletMessages.splice(i, 1);
|
|
17376
|
+
}
|
|
17377
|
+
}
|
|
17365
17378
|
stopAudioWorklet() {
|
|
17366
17379
|
if (this.audioWorkletNode) {
|
|
17367
17380
|
try {
|
|
@@ -17411,14 +17424,14 @@ class Ir {
|
|
|
17411
17424
|
}
|
|
17412
17425
|
this.audioWorker = null;
|
|
17413
17426
|
}
|
|
17414
|
-
this.protocolPort && (this.protocolPort.close(), this.protocolPort = null)
|
|
17415
|
-
|
|
17416
|
-
|
|
17427
|
+
if (this.protocolPort && (this.protocolPort.close(), this.protocolPort = null), this.audioWorkletNode)
|
|
17428
|
+
for (const i of l)
|
|
17429
|
+
this.postToWorklet({ type: "streamEnd", streamId: i });
|
|
17417
17430
|
this.activeStreams.clear(), this.fallbackQueues.clear(), this.removeUnlockHandler();
|
|
17418
17431
|
}
|
|
17419
17432
|
ensureStateSubscription() {
|
|
17420
17433
|
this.stateUnsubscribe || (this.stateUnsubscribe = this.client.subscribeToState((l) => {
|
|
17421
|
-
if (
|
|
17434
|
+
if (this.enabled) {
|
|
17422
17435
|
if (l === "connected" || l === "reconnecting") {
|
|
17423
17436
|
this.ensureWorkers();
|
|
17424
17437
|
return;
|
|
@@ -17428,11 +17441,20 @@ class Ir {
|
|
|
17428
17441
|
}));
|
|
17429
17442
|
}
|
|
17430
17443
|
}
|
|
17444
|
+
function ai(e) {
|
|
17445
|
+
return new Worker(
|
|
17446
|
+
"/assets/video-worker-BoOfB8qz.js",
|
|
17447
|
+
{
|
|
17448
|
+
type: "module",
|
|
17449
|
+
name: e?.name
|
|
17450
|
+
}
|
|
17451
|
+
);
|
|
17452
|
+
}
|
|
17431
17453
|
const ee = z("IkonVideoPlayback");
|
|
17432
17454
|
function $e(e) {
|
|
17433
17455
|
return e instanceof Error ? `${e.name}: ${e.message}` : String(e);
|
|
17434
17456
|
}
|
|
17435
|
-
class
|
|
17457
|
+
class ci {
|
|
17436
17458
|
client;
|
|
17437
17459
|
config;
|
|
17438
17460
|
enabled = !0;
|
|
@@ -17522,11 +17544,7 @@ class ii {
|
|
|
17522
17544
|
}
|
|
17523
17545
|
let l;
|
|
17524
17546
|
try {
|
|
17525
|
-
l = new
|
|
17526
|
-
/* @vite-ignore */
|
|
17527
|
-
"/assets/video-worker-BoOfB8qz.js",
|
|
17528
|
-
import.meta.url
|
|
17529
|
-
), { type: "module" });
|
|
17547
|
+
l = new ai();
|
|
17530
17548
|
} catch (i) {
|
|
17531
17549
|
ee.warn(`Failed to create video worker: ${$e(i)}`);
|
|
17532
17550
|
return;
|
|
@@ -17664,11 +17682,11 @@ class ii {
|
|
|
17664
17682
|
}));
|
|
17665
17683
|
}
|
|
17666
17684
|
}
|
|
17667
|
-
class
|
|
17685
|
+
class ui {
|
|
17668
17686
|
audio;
|
|
17669
17687
|
video;
|
|
17670
17688
|
constructor(l, i) {
|
|
17671
|
-
this.audio = new Ir(l, i?.audio), this.video = new
|
|
17689
|
+
this.audio = new Ir(l, i?.audio), this.video = new ci(l, i?.video);
|
|
17672
17690
|
}
|
|
17673
17691
|
/**
|
|
17674
17692
|
* Releases media resources (workers, audio graph, decoders).
|
|
@@ -17679,7 +17697,7 @@ class si {
|
|
|
17679
17697
|
this.audio.dispose(), this.video.dispose();
|
|
17680
17698
|
}
|
|
17681
17699
|
}
|
|
17682
|
-
class
|
|
17700
|
+
class fi {
|
|
17683
17701
|
static getStorageForCapacity(l, i) {
|
|
17684
17702
|
const s = Int32Array.BYTES_PER_ELEMENT * 2, d = i.BYTES_PER_ELEMENT * l;
|
|
17685
17703
|
return new SharedArrayBuffer(s + d);
|
|
@@ -17733,12 +17751,21 @@ class di {
|
|
|
17733
17751
|
return s = (s + i) % this.capacity, Atomics.store(this.readWrite, 0, s), i;
|
|
17734
17752
|
}
|
|
17735
17753
|
}
|
|
17736
|
-
|
|
17737
|
-
|
|
17754
|
+
function wi(e) {
|
|
17755
|
+
return new Worker(
|
|
17756
|
+
"/assets/audio-capture-worker-C5hNMTF7.js",
|
|
17757
|
+
{
|
|
17758
|
+
type: "module",
|
|
17759
|
+
name: e?.name
|
|
17760
|
+
}
|
|
17761
|
+
);
|
|
17762
|
+
}
|
|
17763
|
+
const hi = z("IkonAudioCapture");
|
|
17764
|
+
function Ii() {
|
|
17738
17765
|
const e = globalThis.crypto;
|
|
17739
17766
|
return e?.randomUUID ? e.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
17740
17767
|
}
|
|
17741
|
-
function
|
|
17768
|
+
function pi() {
|
|
17742
17769
|
return `
|
|
17743
17770
|
class RingBuffer {
|
|
17744
17771
|
static getStorageForCapacity(capacity, type) {
|
|
@@ -17849,7 +17876,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
|
|
|
17849
17876
|
registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
|
|
17850
17877
|
`;
|
|
17851
17878
|
}
|
|
17852
|
-
class
|
|
17879
|
+
class Ti {
|
|
17853
17880
|
constructor(l) {
|
|
17854
17881
|
this.client = l;
|
|
17855
17882
|
}
|
|
@@ -17868,14 +17895,10 @@ class fi {
|
|
|
17868
17895
|
ensureWorker() {
|
|
17869
17896
|
if (this.worker)
|
|
17870
17897
|
return this.worker;
|
|
17871
|
-
const l = new
|
|
17872
|
-
/* @vite-ignore */
|
|
17873
|
-
"/assets/audio-capture-worker-C5hNMTF7.js",
|
|
17874
|
-
import.meta.url
|
|
17875
|
-
), { type: "module" });
|
|
17898
|
+
const l = new wi();
|
|
17876
17899
|
return this.worker = l, l.addEventListener("message", (i) => {
|
|
17877
17900
|
const s = i.data;
|
|
17878
|
-
s?.type === "error" &&
|
|
17901
|
+
s?.type === "error" && hi.warn(`Audio capture worker error: ${s.error?.name ?? "Error"} ${s.error?.message ?? ""}`);
|
|
17879
17902
|
}), l;
|
|
17880
17903
|
}
|
|
17881
17904
|
ensureSendPort() {
|
|
@@ -17905,9 +17928,9 @@ class fi {
|
|
|
17905
17928
|
return await navigator.mediaDevices.getUserMedia({ audio: l.constraints ?? !0 });
|
|
17906
17929
|
}
|
|
17907
17930
|
async ensureWorklet(l) {
|
|
17908
|
-
if (!
|
|
17931
|
+
if (!bn(l))
|
|
17909
17932
|
throw new Error("AudioWorklet is not supported in this browser");
|
|
17910
|
-
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
17933
|
+
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([pi()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== l) && (this.workletContext = l, this.workletReady = l.audioWorklet.addModule(this.workletModuleUrl));
|
|
17911
17934
|
try {
|
|
17912
17935
|
await this.workletReady;
|
|
17913
17936
|
} catch (i) {
|
|
@@ -17923,13 +17946,13 @@ class fi {
|
|
|
17923
17946
|
if (!a)
|
|
17924
17947
|
throw d.getTracks().forEach((F) => F.stop()), new Error("No audio track available");
|
|
17925
17948
|
await this.ensureWorklet(s);
|
|
17926
|
-
const c =
|
|
17949
|
+
const c = Ii(), f = this.allocateTrackId(), w = s.createMediaStreamSource(d), h = s.createGain();
|
|
17927
17950
|
h.gain.value = 0, h.connect(s.destination);
|
|
17928
17951
|
const t = Ee() ? "sab" : "pcm";
|
|
17929
17952
|
let n;
|
|
17930
17953
|
if (t === "sab") {
|
|
17931
17954
|
const F = Math.floor(s.sampleRate * 2);
|
|
17932
|
-
n =
|
|
17955
|
+
n = fi.getStorageForCapacity(F, Float32Array);
|
|
17933
17956
|
}
|
|
17934
17957
|
const u = this.ensureWorker();
|
|
17935
17958
|
u.postMessage({
|
|
@@ -17954,9 +17977,9 @@ class fi {
|
|
|
17954
17977
|
}
|
|
17955
17978
|
});
|
|
17956
17979
|
w.connect(I), I.connect(h), t === "pcm" && (I.port.onmessage = (F) => {
|
|
17957
|
-
const
|
|
17958
|
-
if (!(!
|
|
17959
|
-
const T =
|
|
17980
|
+
const m = F.data;
|
|
17981
|
+
if (!(!m || typeof m != "object") && m.type === "pcm" && m.pcm instanceof Float32Array) {
|
|
17982
|
+
const T = m.pcm;
|
|
17960
17983
|
u.postMessage({ type: "pcm", captureId: c, pcm: T }, [T.buffer]);
|
|
17961
17984
|
}
|
|
17962
17985
|
});
|
|
@@ -18031,7 +18054,7 @@ class fi {
|
|
|
18031
18054
|
}
|
|
18032
18055
|
}
|
|
18033
18056
|
}
|
|
18034
|
-
async function
|
|
18057
|
+
async function Fi(e, l) {
|
|
18035
18058
|
const i = l.mime ?? "image/jpeg", s = l.quality ?? 0.92;
|
|
18036
18059
|
if (typeof OffscreenCanvas < "u" && e instanceof OffscreenCanvas)
|
|
18037
18060
|
try {
|
|
@@ -18049,7 +18072,7 @@ async function wi(e, l) {
|
|
|
18049
18072
|
);
|
|
18050
18073
|
});
|
|
18051
18074
|
}
|
|
18052
|
-
class
|
|
18075
|
+
class bi {
|
|
18053
18076
|
async acquireCameraStream(l) {
|
|
18054
18077
|
if (!navigator.mediaDevices)
|
|
18055
18078
|
throw new Error("Media devices are not available in this environment");
|
|
@@ -18086,7 +18109,7 @@ class hi {
|
|
|
18086
18109
|
if (!o)
|
|
18087
18110
|
throw new Error("2D canvas context unavailable");
|
|
18088
18111
|
o.drawImage(d, 0, 0, f, w);
|
|
18089
|
-
const r = await
|
|
18112
|
+
const r = await Fi(h, l), t = await r.arrayBuffer();
|
|
18090
18113
|
return {
|
|
18091
18114
|
mime: r.type || l.mime || "image/jpeg",
|
|
18092
18115
|
width: f,
|
|
@@ -18113,18 +18136,27 @@ class hi {
|
|
|
18113
18136
|
}
|
|
18114
18137
|
}
|
|
18115
18138
|
}
|
|
18116
|
-
|
|
18117
|
-
|
|
18139
|
+
function mi(e) {
|
|
18140
|
+
return new Worker(
|
|
18141
|
+
"/assets/video-capture-worker-OBl3bsvx.js",
|
|
18142
|
+
{
|
|
18143
|
+
type: "module",
|
|
18144
|
+
name: e?.name
|
|
18145
|
+
}
|
|
18146
|
+
);
|
|
18147
|
+
}
|
|
18148
|
+
const rn = z("IkonVideoCapture");
|
|
18149
|
+
function yi() {
|
|
18118
18150
|
const e = globalThis.crypto;
|
|
18119
18151
|
return e?.randomUUID ? e.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
18120
18152
|
}
|
|
18121
|
-
function
|
|
18153
|
+
function Ei() {
|
|
18122
18154
|
const e = globalThis.MediaStreamTrackProcessor;
|
|
18123
18155
|
if (!e)
|
|
18124
18156
|
throw new Error("MediaStreamTrackProcessor is not available in this browser");
|
|
18125
18157
|
return e;
|
|
18126
18158
|
}
|
|
18127
|
-
class
|
|
18159
|
+
class Ni {
|
|
18128
18160
|
constructor(l) {
|
|
18129
18161
|
this.client = l;
|
|
18130
18162
|
}
|
|
@@ -18140,14 +18172,10 @@ class Ti {
|
|
|
18140
18172
|
ensureWorker() {
|
|
18141
18173
|
if (this.worker)
|
|
18142
18174
|
return this.worker;
|
|
18143
|
-
const l = new
|
|
18144
|
-
/* @vite-ignore */
|
|
18145
|
-
"/assets/video-capture-worker-OBl3bsvx.js",
|
|
18146
|
-
import.meta.url
|
|
18147
|
-
), { type: "module" });
|
|
18175
|
+
const l = new mi();
|
|
18148
18176
|
return this.worker = l, l.addEventListener("message", (i) => {
|
|
18149
18177
|
const s = i.data;
|
|
18150
|
-
s?.type === "error" &&
|
|
18178
|
+
s?.type === "error" && rn.warn(`Video capture worker error: ${s.error?.name ?? "Error"} ${s.error?.message ?? ""}`);
|
|
18151
18179
|
}), l;
|
|
18152
18180
|
}
|
|
18153
18181
|
ensurePorts() {
|
|
@@ -18176,10 +18204,10 @@ class Ti {
|
|
|
18176
18204
|
if (!i)
|
|
18177
18205
|
throw new Error("Cannot start video capture before client is connected");
|
|
18178
18206
|
this.ensurePorts();
|
|
18179
|
-
const s =
|
|
18207
|
+
const s = yi(), d = await this.getMediaStream(l), a = d.getVideoTracks()[0];
|
|
18180
18208
|
if (!a)
|
|
18181
18209
|
throw d.getTracks().forEach((I) => I.stop()), new Error("No video track available");
|
|
18182
|
-
const c = a.getSettings(), f = c.width ?? l.options?.width ?? 1280, w = c.height ?? l.options?.height ?? 720, h =
|
|
18210
|
+
const c = a.getSettings(), f = c.width ?? l.options?.width ?? 1280, w = c.height ?? l.options?.height ?? 720, h = Ei(), r = new h({ track: a }).readable.getReader(), t = this.allocateTrackId(), n = this.ensureWorker();
|
|
18183
18211
|
n.postMessage({
|
|
18184
18212
|
type: "start",
|
|
18185
18213
|
captureId: s,
|
|
@@ -18254,18 +18282,18 @@ class Ti {
|
|
|
18254
18282
|
a && (s += 1, i.postMessage({ type: "frame", captureId: l.captureId, frame: a, frameNumber: s }, [a]));
|
|
18255
18283
|
}
|
|
18256
18284
|
} catch (d) {
|
|
18257
|
-
l.stopped ||
|
|
18285
|
+
l.stopped || rn.warn(`Video capture frame pump failed: ${d}`);
|
|
18258
18286
|
} finally {
|
|
18259
18287
|
await l.stop();
|
|
18260
18288
|
}
|
|
18261
18289
|
}
|
|
18262
18290
|
}
|
|
18263
|
-
class
|
|
18291
|
+
class gi {
|
|
18264
18292
|
audio;
|
|
18265
18293
|
video;
|
|
18266
18294
|
image;
|
|
18267
18295
|
constructor(l) {
|
|
18268
|
-
this.audio = new
|
|
18296
|
+
this.audio = new Ti(l), this.video = new Ni(l), this.image = new bi();
|
|
18269
18297
|
}
|
|
18270
18298
|
dispose() {
|
|
18271
18299
|
this.audio.dispose(), this.video.dispose();
|
|
@@ -18274,16 +18302,16 @@ class Fi {
|
|
|
18274
18302
|
const mn = /* @__PURE__ */ new Map();
|
|
18275
18303
|
for (const [e, l] of Object.entries(j))
|
|
18276
18304
|
typeof l == "number" && mn.set(l, e);
|
|
18277
|
-
function
|
|
18305
|
+
function tn(e) {
|
|
18278
18306
|
return mn.get(e) ?? `UNKNOWN_${e}`;
|
|
18279
18307
|
}
|
|
18280
|
-
const
|
|
18308
|
+
const on = {
|
|
18281
18309
|
[K.WebTransport]: 0,
|
|
18282
18310
|
[K.WebSocket]: 1,
|
|
18283
18311
|
[K.WebTransportProxy]: 2,
|
|
18284
18312
|
[K.WebSocketProxy]: 3
|
|
18285
18313
|
}, ze = "ikon_endpoint_type";
|
|
18286
|
-
class
|
|
18314
|
+
class Mi {
|
|
18287
18315
|
isLocal;
|
|
18288
18316
|
workingEndpointType = null;
|
|
18289
18317
|
constructor(l) {
|
|
@@ -18298,7 +18326,7 @@ class mi {
|
|
|
18298
18326
|
if (this.isLocal)
|
|
18299
18327
|
return i;
|
|
18300
18328
|
const s = [...i].sort((d, a) => {
|
|
18301
|
-
const c =
|
|
18329
|
+
const c = on[d] ?? 999, f = on[a] ?? 999;
|
|
18302
18330
|
return c - f;
|
|
18303
18331
|
});
|
|
18304
18332
|
if (this.workingEndpointType !== null && l.has(this.workingEndpointType)) {
|
|
@@ -18345,7 +18373,7 @@ class mi {
|
|
|
18345
18373
|
}
|
|
18346
18374
|
}
|
|
18347
18375
|
const v = z("IkonClient");
|
|
18348
|
-
class
|
|
18376
|
+
class Ji {
|
|
18349
18377
|
channelManager = null;
|
|
18350
18378
|
protocolWorker = null;
|
|
18351
18379
|
workerManagerState = null;
|
|
@@ -18397,22 +18425,22 @@ class Hi {
|
|
|
18397
18425
|
return this._mediaCapture;
|
|
18398
18426
|
}
|
|
18399
18427
|
constructor(l) {
|
|
18400
|
-
this.config = l, this.slowConnectionThresholdMs = l.timeouts?.slowConnectionThresholdMs ??
|
|
18428
|
+
this.config = l, this.slowConnectionThresholdMs = l.timeouts?.slowConnectionThresholdMs ?? Jn, this.connectionTimeoutMs = l.timeouts?.connectionTimeoutMs ?? $n;
|
|
18401
18429
|
const i = [l.local, l.apiKey, l.sessionToken].filter(Boolean).length;
|
|
18402
18430
|
if (i === 0)
|
|
18403
18431
|
throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
|
|
18404
18432
|
if (i > 1)
|
|
18405
18433
|
throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
|
|
18406
|
-
if (this.endpointSelector = new
|
|
18434
|
+
if (this.endpointSelector = new Mi({
|
|
18407
18435
|
local: l.local
|
|
18408
|
-
}), this._functionRegistry = new
|
|
18436
|
+
}), this._functionRegistry = new ql(), Bo() && !l.disableBrowserFunctions && (this.unregisterBrowserFunctions = zl(this._functionRegistry)), l.media) {
|
|
18409
18437
|
const s = l.media.audio ? {
|
|
18410
18438
|
output: l.media.audio.output,
|
|
18411
18439
|
threading: l.media.audio.threading
|
|
18412
18440
|
} : void 0, d = l.media.video ? { threading: l.media.video.threading } : void 0;
|
|
18413
|
-
this._media = new
|
|
18441
|
+
this._media = new ui(this, { audio: s, video: d }), l.media.audio?.enabled && this._media.audio.setEnabled(!0), l.media.video?.enabled && this._media.video.prepare();
|
|
18414
18442
|
}
|
|
18415
|
-
Bo() && (this._mediaCapture = new
|
|
18443
|
+
Bo() && (this._mediaCapture = new gi(this), this.unregisterMediaCaptureFunctions = ti(this._functionRegistry, this));
|
|
18416
18444
|
}
|
|
18417
18445
|
_lastError = void 0;
|
|
18418
18446
|
/**
|
|
@@ -18493,7 +18521,7 @@ class Hi {
|
|
|
18493
18521
|
sendProtocolMessage(l) {
|
|
18494
18522
|
if (this.config.debug?.logSentMessages) {
|
|
18495
18523
|
const i = U(l), s = i.targetIds.length === 0 ? "all" : `[${i.targetIds.join(", ")}]`;
|
|
18496
|
-
v.debug(`Sent ${
|
|
18524
|
+
v.debug(`Sent ${tn(i.opcode)} ${i.senderId} -> ${s}`);
|
|
18497
18525
|
}
|
|
18498
18526
|
if (this.protocolWorker) {
|
|
18499
18527
|
const i = l.byteOffset === 0 && l.byteLength === l.buffer.byteLength ? l.buffer : l.slice().buffer;
|
|
@@ -18648,11 +18676,11 @@ class Hi {
|
|
|
18648
18676
|
async authenticate() {
|
|
18649
18677
|
const l = this.abortController?.signal;
|
|
18650
18678
|
if (this.config.local)
|
|
18651
|
-
return
|
|
18679
|
+
return An(this.config.local, l);
|
|
18652
18680
|
if (this.config.apiKey)
|
|
18653
|
-
return
|
|
18681
|
+
return Un(this.config.apiKey, l);
|
|
18654
18682
|
if (this.config.sessionToken)
|
|
18655
|
-
return
|
|
18683
|
+
return el(this.config.sessionToken, l);
|
|
18656
18684
|
throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
|
|
18657
18685
|
}
|
|
18658
18686
|
/**
|
|
@@ -18662,7 +18690,7 @@ class Hi {
|
|
|
18662
18690
|
const i = Ne(l), s = ye(l);
|
|
18663
18691
|
if (this.config.debug?.logReceivedMessages) {
|
|
18664
18692
|
const d = U(l);
|
|
18665
|
-
v.debug(`Received ${d.senderId} -> ${
|
|
18693
|
+
v.debug(`Received ${d.senderId} -> ${tn(i)}`);
|
|
18666
18694
|
}
|
|
18667
18695
|
if (this._functionRegistry.handleProtocolMessage(l, i)) {
|
|
18668
18696
|
this.notifyMessageSubscribers(l, i, s);
|
|
@@ -18754,11 +18782,7 @@ class Hi {
|
|
|
18754
18782
|
}
|
|
18755
18783
|
let d;
|
|
18756
18784
|
try {
|
|
18757
|
-
d = new
|
|
18758
|
-
/* @vite-ignore */
|
|
18759
|
-
"/assets/protocol-worker-DZqyPqA2.js",
|
|
18760
|
-
import.meta.url
|
|
18761
|
-
), { type: "module" });
|
|
18785
|
+
d = new Vn();
|
|
18762
18786
|
} catch (o) {
|
|
18763
18787
|
v.warn(`Failed to create protocol worker, falling back to main thread: ${o}`), await this.connectProtocolOnMainThread(l);
|
|
18764
18788
|
return;
|
|
@@ -18805,7 +18829,7 @@ class Hi {
|
|
|
18805
18829
|
}
|
|
18806
18830
|
}
|
|
18807
18831
|
async connectProtocolOnMainThread(l) {
|
|
18808
|
-
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new
|
|
18832
|
+
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new Kn({
|
|
18809
18833
|
sessionId: this._sessionId,
|
|
18810
18834
|
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? Yo,
|
|
18811
18835
|
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? Xo,
|
|
@@ -18936,117 +18960,117 @@ class Hi {
|
|
|
18936
18960
|
}
|
|
18937
18961
|
}
|
|
18938
18962
|
}
|
|
18939
|
-
function
|
|
18963
|
+
function $i(e) {
|
|
18940
18964
|
return e === "connecting" || e === "connectingSlow" || e === "reconnecting";
|
|
18941
18965
|
}
|
|
18942
|
-
function
|
|
18966
|
+
function zi(e) {
|
|
18943
18967
|
return e === "connected";
|
|
18944
18968
|
}
|
|
18945
|
-
function
|
|
18969
|
+
function Yi(e) {
|
|
18946
18970
|
return e === "offline" || e === "offlineError" || e === "idle";
|
|
18947
18971
|
}
|
|
18948
|
-
function
|
|
18972
|
+
function Xi(e) {
|
|
18949
18973
|
return e === "offlineError";
|
|
18950
18974
|
}
|
|
18951
|
-
const
|
|
18952
|
-
let $ = [], rr =
|
|
18953
|
-
function
|
|
18954
|
-
e.level <
|
|
18975
|
+
const yn = 1e3, En = dn.INFO;
|
|
18976
|
+
let $ = [], rr = yn, Nn = En, tr = null;
|
|
18977
|
+
function ki(e) {
|
|
18978
|
+
e.level < Nn || ($.push(e), $.length > rr && ($ = $.slice(-rr)));
|
|
18955
18979
|
}
|
|
18956
|
-
function
|
|
18957
|
-
rr = e?.maxBufferSize ??
|
|
18980
|
+
function Si(e) {
|
|
18981
|
+
rr = e?.maxBufferSize ?? yn, Nn = e?.minLevel ?? En, $ = [], vn(ki);
|
|
18958
18982
|
}
|
|
18959
|
-
function
|
|
18983
|
+
function Qi(e) {
|
|
18960
18984
|
tr = e;
|
|
18961
18985
|
}
|
|
18962
|
-
function
|
|
18986
|
+
function Zi() {
|
|
18963
18987
|
return $;
|
|
18964
18988
|
}
|
|
18965
|
-
function
|
|
18989
|
+
function Pi() {
|
|
18966
18990
|
const e = $;
|
|
18967
18991
|
return $ = [], e;
|
|
18968
18992
|
}
|
|
18969
|
-
function
|
|
18993
|
+
function qi() {
|
|
18970
18994
|
if (!tr || $.length === 0)
|
|
18971
18995
|
return 0;
|
|
18972
|
-
const e =
|
|
18996
|
+
const e = Pi();
|
|
18973
18997
|
return tr(e), e.length;
|
|
18974
18998
|
}
|
|
18975
|
-
function
|
|
18999
|
+
function Bi() {
|
|
18976
19000
|
$ = [];
|
|
18977
19001
|
}
|
|
18978
|
-
function
|
|
19002
|
+
function Ai() {
|
|
18979
19003
|
return $.length;
|
|
18980
19004
|
}
|
|
18981
|
-
|
|
19005
|
+
Si();
|
|
18982
19006
|
export {
|
|
18983
19007
|
H as AuthenticationError,
|
|
18984
|
-
|
|
18985
|
-
|
|
18986
|
-
|
|
19008
|
+
Gn as Channel,
|
|
19009
|
+
Kn as ChannelManager,
|
|
19010
|
+
_i as ChannelNotFoundError,
|
|
18987
19011
|
te as ClientReady,
|
|
18988
19012
|
He as ClientType,
|
|
18989
19013
|
ar as ConnectionError,
|
|
18990
19014
|
xe as ContextType,
|
|
18991
|
-
|
|
19015
|
+
Mi as EndpointSelector,
|
|
18992
19016
|
K as EntrypointType,
|
|
18993
|
-
|
|
19017
|
+
ql as FunctionRegistry,
|
|
18994
19018
|
Be as GlobalState,
|
|
18995
|
-
|
|
18996
|
-
|
|
18997
|
-
|
|
19019
|
+
xi as IKON_AUTH_BASE_URL,
|
|
19020
|
+
qo as IKON_AUTH_URL_DEV,
|
|
19021
|
+
Zo as IKON_AUTH_URL_PROD,
|
|
18998
19022
|
Le as IKON_BACKEND_URL_DEV,
|
|
18999
19023
|
Ue as IKON_BACKEND_URL_PROD,
|
|
19000
|
-
|
|
19024
|
+
Ti as IkonAudioCapture,
|
|
19001
19025
|
Ir as IkonAudioPlayback,
|
|
19002
|
-
|
|
19003
|
-
|
|
19004
|
-
|
|
19005
|
-
|
|
19006
|
-
|
|
19007
|
-
|
|
19026
|
+
Ji as IkonClient,
|
|
19027
|
+
bi as IkonImageCapture,
|
|
19028
|
+
ui as IkonMedia,
|
|
19029
|
+
gi as IkonMediaCapture,
|
|
19030
|
+
Ni as IkonVideoCapture,
|
|
19031
|
+
ci as IkonVideoPlayback,
|
|
19008
19032
|
cr as KeepaliveTimeoutError,
|
|
19009
|
-
|
|
19010
|
-
|
|
19011
|
-
|
|
19033
|
+
dn as LogLevel,
|
|
19034
|
+
Ln as MaxRetriesExceededError,
|
|
19035
|
+
Vi as NoChannelsError,
|
|
19012
19036
|
j as Opcode,
|
|
19013
|
-
|
|
19014
|
-
|
|
19037
|
+
Dn as ProvisioningTimeoutError,
|
|
19038
|
+
Oi as SpaceNotFoundError,
|
|
19015
19039
|
A as TransportError,
|
|
19016
19040
|
Re as UserType,
|
|
19017
|
-
|
|
19018
|
-
|
|
19019
|
-
|
|
19041
|
+
Ci as asProtocolMessage,
|
|
19042
|
+
ji as clearDeviceId,
|
|
19043
|
+
Bi as clearLogBuffer,
|
|
19020
19044
|
z as createLogger,
|
|
19021
|
-
|
|
19022
|
-
|
|
19023
|
-
|
|
19024
|
-
|
|
19025
|
-
|
|
19026
|
-
|
|
19027
|
-
|
|
19028
|
-
|
|
19029
|
-
|
|
19030
|
-
|
|
19045
|
+
Gi as deriveAuthUrl,
|
|
19046
|
+
Ri as deriveBackendType,
|
|
19047
|
+
Wi as deriveBackendUrl,
|
|
19048
|
+
Hi as extractUserIdFromToken,
|
|
19049
|
+
qi as flushLogs,
|
|
19050
|
+
Zi as getBufferedLogs,
|
|
19051
|
+
Ai as getLogBufferSize,
|
|
19052
|
+
Di as getLogLevel,
|
|
19053
|
+
vi as getLogSink,
|
|
19054
|
+
tn as getOpcodeName,
|
|
19031
19055
|
fr as getOrCreateDeviceId,
|
|
19032
|
-
|
|
19033
|
-
|
|
19056
|
+
Si as initializeLogSink,
|
|
19057
|
+
bn as isAudioWorkletSupported,
|
|
19034
19058
|
Bo as isBrowserEnvironment,
|
|
19035
19059
|
wr as isCloudEnvironment,
|
|
19036
|
-
|
|
19037
|
-
|
|
19038
|
-
|
|
19039
|
-
|
|
19060
|
+
zi as isConnected,
|
|
19061
|
+
$i as isConnecting,
|
|
19062
|
+
Xi as isError,
|
|
19063
|
+
Yi as isOffline,
|
|
19040
19064
|
Ee as isSharedArrayBufferSupported,
|
|
19041
|
-
|
|
19042
|
-
|
|
19065
|
+
an as isWebTransportSupported,
|
|
19066
|
+
Ki as parseUrlParams,
|
|
19043
19067
|
Ne as readOpcode,
|
|
19044
19068
|
ye as readOpcodeGroup,
|
|
19045
19069
|
U as readProtocolMessageHeaders,
|
|
19046
|
-
|
|
19047
|
-
|
|
19048
|
-
|
|
19049
|
-
|
|
19050
|
-
|
|
19051
|
-
|
|
19070
|
+
zl as registerBrowserFunctions,
|
|
19071
|
+
Li as setLogLevel,
|
|
19072
|
+
vn as setLogSink,
|
|
19073
|
+
Qi as setSendLogsCallback,
|
|
19074
|
+
Pi as takeBufferedLogs,
|
|
19075
|
+
Bl as withResultData
|
|
19052
19076
|
};
|