@ikonai/sdk 0.0.36 → 0.0.38
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/assets/{audio-capture-worker-CiEMOS9I.js → audio-capture-worker-Bnqb8-xb.js} +357 -237
- package/assets/{audio-playback-worker-WI7y4bo8.js → audio-playback-worker-CXmAFv0O.js} +125 -152
- package/assets/index-C-9F_--I.js +186 -0
- package/assets/index-C3ZAK5YF.js +170 -0
- package/assets/libopus-BBY7KH2-.js +169 -0
- package/assets/libopus-simd-CQXMVirP.js +169 -0
- package/client/ikon-client-config.d.ts +54 -55
- package/index.d.ts +3 -3
- package/index.js +498 -468
- package/media/audio-constants.d.ts +5 -0
- package/media/ikon-audio-capture.d.ts +12 -1
- package/media/ikon-audio-playback.d.ts +8 -9
- package/media/ikon-media-capture.d.ts +5 -2
- package/media/ikon-media.d.ts +8 -0
- package/media/index.d.ts +3 -2
- package/package.json +1 -1
- package/assets/index-CvFH-Dkf.js +0 -650
- /package/utils/{logSink.d.ts → log-sink.d.ts} +0 -0
package/index.js
CHANGED
|
@@ -9,31 +9,31 @@ function ce(t) {
|
|
|
9
9
|
function oe(t) {
|
|
10
10
|
return ce(t) & 4294901760;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const e =
|
|
12
|
+
function re(t) {
|
|
13
|
+
const e = ne(t), r = new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
14
14
|
if (e.length < 27)
|
|
15
15
|
throw new Error("Protocol payload too short");
|
|
16
|
-
const n = r.getUint32(0, !0), s = r.getUint32(4, !0), i = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), c = r.getUint32(20, !0), l = r.getUint8(24),
|
|
16
|
+
const n = r.getUint32(0, !0), s = r.getUint32(4, !0), i = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), c = r.getUint32(20, !0), l = r.getUint8(24), p = r.getUint8(25), d = r.getUint8(26);
|
|
17
17
|
if (27 + c * 4 > e.length)
|
|
18
18
|
throw new Error("Protocol header exceeds payload length");
|
|
19
|
-
const
|
|
19
|
+
const f = [];
|
|
20
20
|
let E = 27;
|
|
21
|
-
for (let
|
|
22
|
-
|
|
21
|
+
for (let _ = 0; _ < c; _++)
|
|
22
|
+
f.push(r.getUint32(E, !0)), E += 4;
|
|
23
23
|
return {
|
|
24
24
|
length: n,
|
|
25
25
|
opcode: s,
|
|
26
26
|
senderId: i,
|
|
27
27
|
trackId: o,
|
|
28
28
|
sequenceId: a,
|
|
29
|
-
targetIds:
|
|
29
|
+
targetIds: f,
|
|
30
30
|
payloadVersion: l,
|
|
31
|
-
payloadType:
|
|
31
|
+
payloadType: p,
|
|
32
32
|
flags: d
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
function De(t, e, r) {
|
|
36
|
-
const n =
|
|
36
|
+
const n = ne(t), s = re(n);
|
|
37
37
|
if (e !== void 0 && s.opcode !== e)
|
|
38
38
|
throw new Error(`Unexpected opcode ${s.opcode}`);
|
|
39
39
|
if (r !== void 0 && s.payloadVersion !== r)
|
|
@@ -43,21 +43,21 @@ function De(t, e, r) {
|
|
|
43
43
|
const i = 27 + s.targetIds.length * 4;
|
|
44
44
|
return n.subarray(i, s.length);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], l = s?.payloadType ?? 8,
|
|
48
|
-
|
|
46
|
+
function F(t, e, r, n, s) {
|
|
47
|
+
const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], l = s?.payloadType ?? 8, p = 27 + c.length * 4, d = p + e.length, h = new Uint8Array(d), f = new DataView(h.buffer);
|
|
48
|
+
f.setUint32(0, d, !0), f.setUint32(4, t >>> 0, !0), f.setUint32(8, n >>> 0, !0), f.setUint32(12, i >>> 0, !0), f.setUint32(16, o >>> 0, !0), f.setUint32(20, c.length >>> 0, !0), f.setUint8(24, r & 255), f.setUint8(25, l & 255), f.setUint8(26, a & 255);
|
|
49
49
|
let E = 27;
|
|
50
|
-
for (let
|
|
51
|
-
|
|
52
|
-
return
|
|
50
|
+
for (let _ = 0; _ < c.length; _++)
|
|
51
|
+
f.setUint32(E, c[_] >>> 0, !0), E += 4;
|
|
52
|
+
return h.set(e, p), h;
|
|
53
53
|
}
|
|
54
|
-
var
|
|
54
|
+
var b = /* @__PURE__ */ ((t) => (t[t.Null = 1] = "Null", t[t.Bool = 2] = "Bool", t[t.Int32 = 3] = "Int32", t[t.Int64 = 4] = "Int64", t[t.UInt32 = 5] = "UInt32", t[t.UInt64 = 6] = "UInt64", t[t.Float32 = 7] = "Float32", t[t.Float64 = 8] = "Float64", t[t.Array = 9] = "Array", t[t.Dict = 10] = "Dict", t[t.Object = 11] = "Object", t[t.String = 12] = "String", t[t.Binary = 13] = "Binary", t[t.Guid = 14] = "Guid", t))(b || {});
|
|
55
55
|
const lt = 161, ut = 162, le = new TextEncoder(), Mr = new TextDecoder("utf-8", { fatal: !0 });
|
|
56
|
-
class
|
|
56
|
+
class U {
|
|
57
57
|
constructor(e = 1) {
|
|
58
58
|
this.version = e, this.buffer.writeByte(lt), this.buffer.writeVarUInt(e >>> 0);
|
|
59
59
|
}
|
|
60
|
-
buffer = new
|
|
60
|
+
buffer = new ee();
|
|
61
61
|
closed = !1;
|
|
62
62
|
cached;
|
|
63
63
|
writeInt32Field(e, r) {
|
|
@@ -82,7 +82,7 @@ class k {
|
|
|
82
82
|
this.writeFixedField(e, 2, () => this.buffer.writeByte(r ? 1 : 0));
|
|
83
83
|
}
|
|
84
84
|
writeGuidField(e, r) {
|
|
85
|
-
const n = r instanceof
|
|
85
|
+
const n = r instanceof I ? r.asBytes() : r;
|
|
86
86
|
if (n.length !== 16)
|
|
87
87
|
throw new Error("Guid payload must be 16 bytes");
|
|
88
88
|
this.writeFixedField(e, 14, () => this.buffer.writeBytes(n));
|
|
@@ -95,7 +95,7 @@ class k {
|
|
|
95
95
|
this.writeVariableField(e, 13, r);
|
|
96
96
|
}
|
|
97
97
|
writeObjectField(e, r, n) {
|
|
98
|
-
const s = new
|
|
98
|
+
const s = new U(r);
|
|
99
99
|
n(s);
|
|
100
100
|
const i = s.finish();
|
|
101
101
|
this.writeVariableField(e, 11, i);
|
|
@@ -129,7 +129,7 @@ class Ie {
|
|
|
129
129
|
constructor(e) {
|
|
130
130
|
this.elementType = e;
|
|
131
131
|
}
|
|
132
|
-
payload = new
|
|
132
|
+
payload = new ee();
|
|
133
133
|
count = 0;
|
|
134
134
|
writeInt32(e) {
|
|
135
135
|
this.ensureElementType(
|
|
@@ -178,7 +178,7 @@ class Ie {
|
|
|
178
178
|
14
|
|
179
179
|
/* Guid */
|
|
180
180
|
), this.count++;
|
|
181
|
-
const r = e instanceof
|
|
181
|
+
const r = e instanceof I ? e.asBytes() : e;
|
|
182
182
|
if (r.length !== 16)
|
|
183
183
|
throw new Error("Guid payload must be 16 bytes");
|
|
184
184
|
this.payload.writeBytes(r);
|
|
@@ -202,7 +202,7 @@ class Ie {
|
|
|
202
202
|
11
|
|
203
203
|
/* Object */
|
|
204
204
|
), this.count++;
|
|
205
|
-
const n = new
|
|
205
|
+
const n = new U(e);
|
|
206
206
|
r(n);
|
|
207
207
|
const s = n.finish();
|
|
208
208
|
this.payload.writeVarUInt(s.length), this.payload.writeBytes(s);
|
|
@@ -228,19 +228,19 @@ class Ie {
|
|
|
228
228
|
this.payload.writeBytes(i);
|
|
229
229
|
}
|
|
230
230
|
finish() {
|
|
231
|
-
const e = new
|
|
231
|
+
const e = new ee();
|
|
232
232
|
return e.writeByte(ue(this.elementType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
|
|
233
233
|
}
|
|
234
234
|
ensureElementType(e) {
|
|
235
235
|
if (this.elementType !== e)
|
|
236
|
-
throw new Error(`Array element type is ${
|
|
236
|
+
throw new Error(`Array element type is ${b[this.elementType]}, expected ${b[e]}`);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
class Oe {
|
|
240
240
|
constructor(e, r) {
|
|
241
241
|
this.keyType = e, this.valueType = r, ve(e);
|
|
242
242
|
}
|
|
243
|
-
payload = new
|
|
243
|
+
payload = new ee();
|
|
244
244
|
count = 0;
|
|
245
245
|
entryOpen = !1;
|
|
246
246
|
beginEntry() {
|
|
@@ -253,7 +253,7 @@ class Oe {
|
|
|
253
253
|
finish() {
|
|
254
254
|
if (this.entryOpen)
|
|
255
255
|
throw new Error("Dictionary entry not completed");
|
|
256
|
-
const e = new
|
|
256
|
+
const e = new ee();
|
|
257
257
|
return e.writeByte(ue(this.keyType)), e.writeByte(ue(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
|
|
258
258
|
}
|
|
259
259
|
}
|
|
@@ -311,7 +311,7 @@ class Lr {
|
|
|
311
311
|
14
|
|
312
312
|
/* Guid */
|
|
313
313
|
);
|
|
314
|
-
const r = e instanceof
|
|
314
|
+
const r = e instanceof I ? e.asBytes() : e;
|
|
315
315
|
if (r.length !== 16)
|
|
316
316
|
throw new Error("Guid payload must be 16 bytes");
|
|
317
317
|
this.payload.writeBytes(r), this.keyWritten = !0;
|
|
@@ -377,7 +377,7 @@ class Lr {
|
|
|
377
377
|
14
|
|
378
378
|
/* Guid */
|
|
379
379
|
);
|
|
380
|
-
const r = e instanceof
|
|
380
|
+
const r = e instanceof I ? e.asBytes() : e;
|
|
381
381
|
if (r.length !== 16)
|
|
382
382
|
throw new Error("Guid payload must be 16 bytes");
|
|
383
383
|
this.payload.writeBytes(r), this.valueWritten = !0;
|
|
@@ -407,7 +407,7 @@ class Lr {
|
|
|
407
407
|
11
|
|
408
408
|
/* Object */
|
|
409
409
|
);
|
|
410
|
-
const n = new
|
|
410
|
+
const n = new U(e);
|
|
411
411
|
r(n);
|
|
412
412
|
const s = n.finish();
|
|
413
413
|
this.payload.writeVarUInt(s.length), this.payload.writeBytes(s), this.valueWritten = !0;
|
|
@@ -441,27 +441,27 @@ class Lr {
|
|
|
441
441
|
}
|
|
442
442
|
ensureKeyType(e) {
|
|
443
443
|
if (this.keyType !== e)
|
|
444
|
-
throw new Error(`Dictionary key type is ${
|
|
444
|
+
throw new Error(`Dictionary key type is ${b[this.keyType]}, expected ${b[e]}`);
|
|
445
445
|
}
|
|
446
446
|
ensureValueType(e) {
|
|
447
447
|
if (this.valueType !== e)
|
|
448
|
-
throw new Error(`Dictionary value type is ${
|
|
448
|
+
throw new Error(`Dictionary value type is ${b[this.valueType]}, expected ${b[e]}`);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
class
|
|
451
|
+
class j {
|
|
452
452
|
constructor(e, r, n) {
|
|
453
453
|
this.buffer = e, this.version = r, this.offset = n, this.end = e.length - 1;
|
|
454
454
|
}
|
|
455
455
|
offset;
|
|
456
456
|
end;
|
|
457
457
|
static create(e) {
|
|
458
|
-
const r =
|
|
458
|
+
const r = ne(e);
|
|
459
459
|
if (r.length < 2)
|
|
460
460
|
throw new Error("Teleport payload too short");
|
|
461
461
|
if (r[0] !== lt || r[r.length - 1] !== ut)
|
|
462
462
|
throw new Error("Teleport object missing markers");
|
|
463
|
-
const n = { offset: 1 }, s =
|
|
464
|
-
return new
|
|
463
|
+
const n = { offset: 1 }, s = k(r, n, "InvalidLength");
|
|
464
|
+
return new j(r, s, n.offset);
|
|
465
465
|
}
|
|
466
466
|
next() {
|
|
467
467
|
if (this.offset >= this.end)
|
|
@@ -473,18 +473,18 @@ class $ {
|
|
|
473
473
|
const r = this.buffer[this.offset++], n = r >> 4 & 15;
|
|
474
474
|
if ((r & 15) !== 0)
|
|
475
475
|
throw new Error("Teleport field flags must be zero");
|
|
476
|
-
const s =
|
|
476
|
+
const s = $(n);
|
|
477
477
|
let i;
|
|
478
478
|
if (s >= 0)
|
|
479
|
-
|
|
479
|
+
C(this.buffer, this.offset, s), i = this.buffer.subarray(this.offset, this.offset + s), this.offset += s;
|
|
480
480
|
else {
|
|
481
|
-
const o = { offset: this.offset }, a =
|
|
482
|
-
|
|
481
|
+
const o = { offset: this.offset }, a = k(this.buffer, o, "InvalidLength");
|
|
482
|
+
C(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
|
|
483
483
|
}
|
|
484
484
|
return new vr(e, n, i);
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
class
|
|
487
|
+
class v {
|
|
488
488
|
constructor(e, r) {
|
|
489
489
|
this.type = e, this.payload = r;
|
|
490
490
|
}
|
|
@@ -552,13 +552,13 @@ class L {
|
|
|
552
552
|
return this.ensureType(
|
|
553
553
|
14
|
|
554
554
|
/* Guid */
|
|
555
|
-
),
|
|
555
|
+
), I.fromBytes(this.payload);
|
|
556
556
|
}
|
|
557
557
|
asObject() {
|
|
558
558
|
return this.ensureType(
|
|
559
559
|
11
|
|
560
560
|
/* Object */
|
|
561
|
-
),
|
|
561
|
+
), j.create(this.payload);
|
|
562
562
|
}
|
|
563
563
|
asArray() {
|
|
564
564
|
return this.ensureType(
|
|
@@ -574,10 +574,10 @@ class L {
|
|
|
574
574
|
}
|
|
575
575
|
ensureType(e) {
|
|
576
576
|
if (this.type !== e)
|
|
577
|
-
throw new Error(`Teleport value has type ${
|
|
577
|
+
throw new Error(`Teleport value has type ${b[this.type]}, expected ${b[e]}`);
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
|
-
class vr extends
|
|
580
|
+
class vr extends v {
|
|
581
581
|
constructor(e, r, n) {
|
|
582
582
|
super(r, n), this.fieldId = e;
|
|
583
583
|
}
|
|
@@ -598,10 +598,10 @@ class Me {
|
|
|
598
598
|
if (this.elementType = r >> 4 & 15, (r & 15) !== 0)
|
|
599
599
|
throw new Error("Array flags must be zero");
|
|
600
600
|
const n = { offset: 1 };
|
|
601
|
-
this.count =
|
|
601
|
+
this.count = k(e, n, "ArrayMalformed"), this.offset = n.offset;
|
|
602
602
|
}
|
|
603
603
|
static create(e) {
|
|
604
|
-
return new Me(
|
|
604
|
+
return new Me(ne(e));
|
|
605
605
|
}
|
|
606
606
|
next() {
|
|
607
607
|
if (this.index >= this.count) {
|
|
@@ -622,38 +622,38 @@ class Me {
|
|
|
622
622
|
case 4:
|
|
623
623
|
case 6:
|
|
624
624
|
case 14: {
|
|
625
|
-
const e =
|
|
626
|
-
|
|
625
|
+
const e = $(this.elementType);
|
|
626
|
+
C(this.payload, this.offset, e);
|
|
627
627
|
const r = this.payload.subarray(this.offset, this.offset + e);
|
|
628
|
-
return this.offset += e, new
|
|
628
|
+
return this.offset += e, new Q(this.elementType, r);
|
|
629
629
|
}
|
|
630
630
|
case 12:
|
|
631
631
|
case 13: {
|
|
632
|
-
const e = { offset: this.offset }, r =
|
|
633
|
-
|
|
632
|
+
const e = { offset: this.offset }, r = k(this.payload, e, "ArrayMalformed");
|
|
633
|
+
C(this.payload, e.offset, r);
|
|
634
634
|
const n = this.payload.subarray(e.offset, e.offset + r);
|
|
635
|
-
return this.offset = e.offset + r, new
|
|
635
|
+
return this.offset = e.offset + r, new Q(this.elementType, n);
|
|
636
636
|
}
|
|
637
637
|
case 11: {
|
|
638
|
-
const e = { offset: this.offset }, r =
|
|
639
|
-
|
|
638
|
+
const e = { offset: this.offset }, r = k(this.payload, e, "ArrayMalformed");
|
|
639
|
+
C(this.payload, e.offset, r);
|
|
640
640
|
const n = this.payload.subarray(e.offset, e.offset + r);
|
|
641
|
-
return this.offset = e.offset + r, new
|
|
641
|
+
return this.offset = e.offset + r, new Q(11, n);
|
|
642
642
|
}
|
|
643
643
|
case 9: {
|
|
644
644
|
const e = Fe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
645
|
-
return this.offset += e, new
|
|
645
|
+
return this.offset += e, new Q(9, r);
|
|
646
646
|
}
|
|
647
647
|
case 10: {
|
|
648
648
|
const e = Pe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
649
|
-
return this.offset += e, new
|
|
649
|
+
return this.offset += e, new Q(10, r);
|
|
650
650
|
}
|
|
651
651
|
default:
|
|
652
|
-
throw new Error(`Unsupported array element type ${
|
|
652
|
+
throw new Error(`Unsupported array element type ${b[this.elementType]}`);
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
}
|
|
656
|
-
class
|
|
656
|
+
class Q extends v {
|
|
657
657
|
constructor(e, r) {
|
|
658
658
|
super(e, r);
|
|
659
659
|
}
|
|
@@ -672,10 +672,10 @@ class Le {
|
|
|
672
672
|
throw new Error("Dictionary key/value flags must be zero");
|
|
673
673
|
ve(this.keyType);
|
|
674
674
|
const r = { offset: 2 };
|
|
675
|
-
this.count =
|
|
675
|
+
this.count = k(e, r, "DictMalformed"), this.offset = r.offset;
|
|
676
676
|
}
|
|
677
677
|
static create(e) {
|
|
678
|
-
return new Le(
|
|
678
|
+
return new Le(ne(e));
|
|
679
679
|
}
|
|
680
680
|
next() {
|
|
681
681
|
if (this.index >= this.count) {
|
|
@@ -687,17 +687,17 @@ class Le {
|
|
|
687
687
|
return this.index++, new Fr(e, r);
|
|
688
688
|
}
|
|
689
689
|
readKey() {
|
|
690
|
-
const e =
|
|
690
|
+
const e = $(this.keyType);
|
|
691
691
|
if (e >= 0) {
|
|
692
|
-
|
|
692
|
+
C(this.payload, this.offset, e);
|
|
693
693
|
const r = this.payload.subarray(this.offset, this.offset + e);
|
|
694
|
-
return this.offset += e, new
|
|
694
|
+
return this.offset += e, new v(this.keyType, r);
|
|
695
695
|
}
|
|
696
696
|
if (this.keyType === 12 || this.keyType === 13) {
|
|
697
|
-
const r = { offset: this.offset }, n =
|
|
698
|
-
|
|
697
|
+
const r = { offset: this.offset }, n = k(this.payload, r, "DictMalformed");
|
|
698
|
+
C(this.payload, r.offset, n);
|
|
699
699
|
const s = this.payload.subarray(r.offset, r.offset + n);
|
|
700
|
-
return this.offset = r.offset + n, new
|
|
700
|
+
return this.offset = r.offset + n, new v(this.keyType, s);
|
|
701
701
|
}
|
|
702
702
|
throw new Error("Unsupported dictionary key type");
|
|
703
703
|
}
|
|
@@ -705,24 +705,24 @@ class Le {
|
|
|
705
705
|
switch (this.valueType) {
|
|
706
706
|
case 12:
|
|
707
707
|
case 13: {
|
|
708
|
-
const e = { offset: this.offset }, r =
|
|
709
|
-
|
|
708
|
+
const e = { offset: this.offset }, r = k(this.payload, e, "DictMalformed");
|
|
709
|
+
C(this.payload, e.offset, r);
|
|
710
710
|
const n = this.payload.subarray(e.offset, e.offset + r);
|
|
711
|
-
return this.offset = e.offset + r, new
|
|
711
|
+
return this.offset = e.offset + r, new v(this.valueType, n);
|
|
712
712
|
}
|
|
713
713
|
case 11: {
|
|
714
|
-
const e = { offset: this.offset }, r =
|
|
715
|
-
|
|
714
|
+
const e = { offset: this.offset }, r = k(this.payload, e, "DictMalformed");
|
|
715
|
+
C(this.payload, e.offset, r);
|
|
716
716
|
const n = this.payload.subarray(e.offset, e.offset + r);
|
|
717
|
-
return this.offset = e.offset + r, new
|
|
717
|
+
return this.offset = e.offset + r, new v(11, n);
|
|
718
718
|
}
|
|
719
719
|
case 9: {
|
|
720
720
|
const e = Fe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
721
|
-
return this.offset += e, new
|
|
721
|
+
return this.offset += e, new v(9, r);
|
|
722
722
|
}
|
|
723
723
|
case 10: {
|
|
724
724
|
const e = Pe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
725
|
-
return this.offset += e, new
|
|
725
|
+
return this.offset += e, new v(10, r);
|
|
726
726
|
}
|
|
727
727
|
case 3:
|
|
728
728
|
case 5:
|
|
@@ -733,13 +733,13 @@ class Le {
|
|
|
733
733
|
case 6:
|
|
734
734
|
case 14:
|
|
735
735
|
case 1: {
|
|
736
|
-
const e =
|
|
737
|
-
|
|
736
|
+
const e = $(this.valueType);
|
|
737
|
+
C(this.payload, this.offset, e);
|
|
738
738
|
const r = this.payload.subarray(this.offset, this.offset + e);
|
|
739
|
-
return this.offset += e, new
|
|
739
|
+
return this.offset += e, new v(this.valueType, r);
|
|
740
740
|
}
|
|
741
741
|
default:
|
|
742
|
-
throw new Error(`Unsupported dictionary value type ${
|
|
742
|
+
throw new Error(`Unsupported dictionary value type ${b[this.valueType]}`);
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
}
|
|
@@ -748,7 +748,7 @@ class Fr {
|
|
|
748
748
|
this.key = e, this.value = r;
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
class
|
|
751
|
+
class I {
|
|
752
752
|
constructor(e) {
|
|
753
753
|
this.bytes = e;
|
|
754
754
|
}
|
|
@@ -758,19 +758,19 @@ class m {
|
|
|
758
758
|
const r = e.replace(/-/g, "");
|
|
759
759
|
if (r.length !== 32)
|
|
760
760
|
throw new Error("Guid string must be 32 hex characters");
|
|
761
|
-
const n = new Uint8Array(16), s =
|
|
762
|
-
|
|
761
|
+
const n = new Uint8Array(16), s = I.parseHexSlice(r, 0, 8), i = I.parseHexSlice(r, 8, 4), o = I.parseHexSlice(r, 12, 4);
|
|
762
|
+
I.writeUInt32LE(n, 0, s), I.writeUInt16LE(n, 4, i), I.writeUInt16LE(n, 6, o);
|
|
763
763
|
for (let a = 0; a < 8; a++)
|
|
764
|
-
n[8 + a] =
|
|
765
|
-
return new
|
|
764
|
+
n[8 + a] = I.parseHexSlice(r, 16 + a * 2, 2);
|
|
765
|
+
return new I(n);
|
|
766
766
|
}
|
|
767
767
|
static fromBytes(e) {
|
|
768
768
|
if (e.length !== 16)
|
|
769
769
|
throw new Error("Guid byte array must be 16 bytes");
|
|
770
|
-
return new
|
|
770
|
+
return new I(Uint8Array.from(e));
|
|
771
771
|
}
|
|
772
772
|
static createZero() {
|
|
773
|
-
return new
|
|
773
|
+
return new I(new Uint8Array(16));
|
|
774
774
|
}
|
|
775
775
|
static createRandom() {
|
|
776
776
|
const e = new Uint8Array(16), r = globalThis.crypto;
|
|
@@ -779,14 +779,14 @@ class m {
|
|
|
779
779
|
else
|
|
780
780
|
for (let n = 0; n < e.length; n++)
|
|
781
781
|
e[n] = Math.floor(Math.random() * 256);
|
|
782
|
-
return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, new
|
|
782
|
+
return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, new I(e);
|
|
783
783
|
}
|
|
784
784
|
toString() {
|
|
785
785
|
const e = this.bytes;
|
|
786
786
|
return [
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
787
|
+
I.toHex(I.readUInt32LE(e, 0), 8),
|
|
788
|
+
I.toHex(I.readUInt16LE(e, 4), 4),
|
|
789
|
+
I.toHex(I.readUInt16LE(e, 6), 4),
|
|
790
790
|
Ye(e.subarray(8, 10)),
|
|
791
791
|
Ye(e.subarray(10, 16))
|
|
792
792
|
].join("-");
|
|
@@ -818,7 +818,7 @@ class m {
|
|
|
818
818
|
return (e >>> 0).toString(16).padStart(r, "0");
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
|
-
class
|
|
821
|
+
class ee {
|
|
822
822
|
bytes = [];
|
|
823
823
|
writeByte(e) {
|
|
824
824
|
this.bytes.push(e & 255);
|
|
@@ -859,7 +859,7 @@ class Z {
|
|
|
859
859
|
return Uint8Array.from(this.bytes);
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function k(t, e, r) {
|
|
863
863
|
if (e.offset >= t.length)
|
|
864
864
|
throw new Error(r);
|
|
865
865
|
let n = 0, s = 0, i = 0;
|
|
@@ -886,7 +886,7 @@ function ue(t, e = 0) {
|
|
|
886
886
|
function Br(t) {
|
|
887
887
|
return t === 12 || t === 13 || t === 9 || t === 11 || t === 10;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function $(t) {
|
|
890
890
|
switch (t) {
|
|
891
891
|
case 3:
|
|
892
892
|
case 5:
|
|
@@ -910,7 +910,7 @@ function ve(t) {
|
|
|
910
910
|
if (t === 9 || t === 11 || t === 10 || t === 1)
|
|
911
911
|
throw new Error("Dictionary keys must be primitive Teleport types");
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function C(t, e, r) {
|
|
914
914
|
if (e < 0 || r < 0 || e + r > t.length)
|
|
915
915
|
throw new Error("Teleport payload exceeds bounds");
|
|
916
916
|
}
|
|
@@ -923,10 +923,10 @@ function Fe(t, e) {
|
|
|
923
923
|
const r = t[e], n = r >> 4 & 15;
|
|
924
924
|
if ((r & 15) !== 0)
|
|
925
925
|
throw new Error("Array flags must be zero");
|
|
926
|
-
const s = { offset: e + 1 }, i =
|
|
926
|
+
const s = { offset: e + 1 }, i = k(t, s, "ArrayMalformed"), o = $(n);
|
|
927
927
|
if (o >= 0) {
|
|
928
928
|
const c = o * i;
|
|
929
|
-
return
|
|
929
|
+
return C(t, s.offset, c), s.offset + c - e;
|
|
930
930
|
}
|
|
931
931
|
let a = s.offset;
|
|
932
932
|
for (let c = 0; c < i; c++)
|
|
@@ -940,44 +940,44 @@ function Pe(t, e) {
|
|
|
940
940
|
if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
|
|
941
941
|
throw new Error("Dictionary key/value flags must be zero");
|
|
942
942
|
ve(r);
|
|
943
|
-
const s = { offset: e + 2 }, i =
|
|
943
|
+
const s = { offset: e + 2 }, i = k(t, s, "DictMalformed");
|
|
944
944
|
let o = s.offset;
|
|
945
945
|
for (let a = 0; a < i; a++)
|
|
946
946
|
o = ye(r, t, o, "DictMalformed"), o = ye(n, t, o, "DictMalformed");
|
|
947
947
|
return o - e;
|
|
948
948
|
}
|
|
949
949
|
function ye(t, e, r, n) {
|
|
950
|
-
const s =
|
|
950
|
+
const s = $(t);
|
|
951
951
|
if (s >= 0)
|
|
952
|
-
return
|
|
952
|
+
return C(e, r, s), r + s;
|
|
953
953
|
switch (t) {
|
|
954
954
|
case 12:
|
|
955
955
|
case 13: {
|
|
956
|
-
const i = { offset: r }, o =
|
|
957
|
-
return
|
|
956
|
+
const i = { offset: r }, o = k(e, i, n);
|
|
957
|
+
return C(e, i.offset, o), i.offset + o;
|
|
958
958
|
}
|
|
959
959
|
case 11: {
|
|
960
|
-
const i = { offset: r }, o =
|
|
961
|
-
return
|
|
960
|
+
const i = { offset: r }, o = k(e, i, n);
|
|
961
|
+
return C(e, i.offset, o), i.offset + o;
|
|
962
962
|
}
|
|
963
963
|
case 9:
|
|
964
964
|
return r + Fe(e, r);
|
|
965
965
|
case 10:
|
|
966
966
|
return r + Pe(e, r);
|
|
967
967
|
default:
|
|
968
|
-
throw new Error(`Unsupported Teleport type ${
|
|
968
|
+
throw new Error(`Unsupported Teleport type ${b[t]}`);
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
971
|
function Ye(t) {
|
|
972
972
|
return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function ne(t) {
|
|
975
975
|
return t instanceof Uint8Array ? t : new Uint8Array(t);
|
|
976
976
|
}
|
|
977
|
-
var dt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(dt || {}), K = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(K || {}), j = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(j || {}), b = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(b || {}), Y = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(Y || {}), ht = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(ht || {}), z = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(z || {}), ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Hevc = 2] = "Hevc", t[t.Vp8 = 3] = "Vp8", t))(ft || {}), Be = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(Be || {}), _ = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(_ || {});
|
|
977
|
+
var dt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(dt || {}), Y = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(Y || {}), z = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(z || {}), R = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(R || {}), X = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(X || {}), ht = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(ht || {}), J = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(J || {}), ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Hevc = 2] = "Hevc", t[t.Vp8 = 3] = "Vp8", t))(ft || {}), Be = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(Be || {}), T = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(T || {});
|
|
978
978
|
const pt = 1, xr = 1048637, Wr = 727023925, Vr = 3395085689;
|
|
979
979
|
function Hr(t) {
|
|
980
|
-
const e = new
|
|
980
|
+
const e = new U(pt);
|
|
981
981
|
return $r(t, e), e.finish();
|
|
982
982
|
}
|
|
983
983
|
function $r(t, e) {
|
|
@@ -985,7 +985,7 @@ function $r(t, e) {
|
|
|
985
985
|
}
|
|
986
986
|
function Kr(t, e, r) {
|
|
987
987
|
const n = Hr(t);
|
|
988
|
-
return
|
|
988
|
+
return F(xr, n, pt, e, r);
|
|
989
989
|
}
|
|
990
990
|
const jr = 467348717, Yr = 972460562, zr = 1911490601, Xr = 2603556958, Jr = 3609695522, Qr = 4094837378, qr = 4257460908;
|
|
991
991
|
function Zr(t) {
|
|
@@ -993,7 +993,7 @@ function Zr(t) {
|
|
|
993
993
|
return Et(e), e;
|
|
994
994
|
}
|
|
995
995
|
function Et(t) {
|
|
996
|
-
return t.ParameterIndex = 0, t.TypeName = "", t.ValueJson = "", t.ValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.EnumerationId =
|
|
996
|
+
return t.ParameterIndex = 0, t.TypeName = "", t.ValueJson = "", t.ValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.EnumerationId = I.fromBytes(new Uint8Array(16)), t;
|
|
997
997
|
}
|
|
998
998
|
function en(t, e) {
|
|
999
999
|
const r = e ?? Zr();
|
|
@@ -1089,7 +1089,7 @@ function Ae(t) {
|
|
|
1089
1089
|
return _t(e), e;
|
|
1090
1090
|
}
|
|
1091
1091
|
function _t(t) {
|
|
1092
|
-
return t.ContextType =
|
|
1092
|
+
return t.ContextType = z.Unknown, t.UserType = J.Unknown, t.PayloadType = X.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = Y.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Be.Unknown, t;
|
|
1093
1093
|
}
|
|
1094
1094
|
function Ne(t, e) {
|
|
1095
1095
|
const r = e ?? Ae();
|
|
@@ -1236,7 +1236,7 @@ function Hn(t) {
|
|
|
1236
1236
|
return Tt(e), e;
|
|
1237
1237
|
}
|
|
1238
1238
|
function Tt(t) {
|
|
1239
|
-
return t.Type =
|
|
1239
|
+
return t.Type = R.None, t.Uri = "", t.OpcodeGroupsFromServer = T.NONE, t.OpcodeGroupsToServer = T.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t;
|
|
1240
1240
|
}
|
|
1241
1241
|
function $n(t, e) {
|
|
1242
1242
|
const r = e ?? Hn();
|
|
@@ -1292,7 +1292,7 @@ function St(t) {
|
|
|
1292
1292
|
return t.ClientContext = Ae(), t.ServerContext = Ae(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.PrimaryUserId = "", t.ChannelTemplateId = "", t;
|
|
1293
1293
|
}
|
|
1294
1294
|
function ss(t, e) {
|
|
1295
|
-
const r =
|
|
1295
|
+
const r = j.create(t);
|
|
1296
1296
|
return is(r, e);
|
|
1297
1297
|
}
|
|
1298
1298
|
function is(t, e) {
|
|
@@ -1375,7 +1375,7 @@ function us(t) {
|
|
|
1375
1375
|
return ds(e), t && Object.assign(e, t), e;
|
|
1376
1376
|
}
|
|
1377
1377
|
function ds(t) {
|
|
1378
|
-
return t.ServerSessionId = "", t.ContextType =
|
|
1378
|
+
return t.ServerSessionId = "", t.ContextType = z.Unknown, t.UserType = J.Unknown, t.PayloadType = X.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = T.NONE, t.OpcodeGroupsToServer = T.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = Y.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Be.Unknown, t;
|
|
1379
1379
|
}
|
|
1380
1380
|
const wt = 1, hs = 1048632, fs = 3748161056, ps = 4289118421;
|
|
1381
1381
|
function Es(t) {
|
|
@@ -1383,10 +1383,10 @@ function Es(t) {
|
|
|
1383
1383
|
return Is(e), t && Object.assign(e, t), e;
|
|
1384
1384
|
}
|
|
1385
1385
|
function Is(t) {
|
|
1386
|
-
return t.CallId =
|
|
1386
|
+
return t.CallId = I.fromBytes(new Uint8Array(16)), t.InstanceId = I.fromBytes(new Uint8Array(16)), t;
|
|
1387
1387
|
}
|
|
1388
1388
|
function ms(t) {
|
|
1389
|
-
const e = new
|
|
1389
|
+
const e = new U(wt);
|
|
1390
1390
|
return _s(t, e), e.finish();
|
|
1391
1391
|
}
|
|
1392
1392
|
function _s(t, e) {
|
|
@@ -1394,7 +1394,7 @@ function _s(t, e) {
|
|
|
1394
1394
|
}
|
|
1395
1395
|
function Ts(t, e, r) {
|
|
1396
1396
|
const n = ms(t);
|
|
1397
|
-
return
|
|
1397
|
+
return F(hs, n, wt, e, r);
|
|
1398
1398
|
}
|
|
1399
1399
|
const Ss = 1, ws = 1048601, ys = 112005851, As = 814454131, Ns = 976255570, gs = 1123310456, Cs = 2885165957, bs = 3748161056, Rs = 4289118421;
|
|
1400
1400
|
function ks(t) {
|
|
@@ -1402,10 +1402,10 @@ function ks(t) {
|
|
|
1402
1402
|
return yt(e), e;
|
|
1403
1403
|
}
|
|
1404
1404
|
function yt(t) {
|
|
1405
|
-
return t.FunctionId =
|
|
1405
|
+
return t.FunctionId = I.fromBytes(new Uint8Array(16)), t.CallId = I.fromBytes(new Uint8Array(16)), t.InstanceId = I.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ClientBackendToken = "", t.Scopes = [], t;
|
|
1406
1406
|
}
|
|
1407
1407
|
function Us(t, e) {
|
|
1408
|
-
const r =
|
|
1408
|
+
const r = j.create(t);
|
|
1409
1409
|
return Ds(r, e);
|
|
1410
1410
|
}
|
|
1411
1411
|
function Ds(t, e) {
|
|
@@ -1505,10 +1505,10 @@ function Ys(t) {
|
|
|
1505
1505
|
return zs(e), t && Object.assign(e, t), e;
|
|
1506
1506
|
}
|
|
1507
1507
|
function zs(t) {
|
|
1508
|
-
return t.CallId =
|
|
1508
|
+
return t.CallId = I.fromBytes(new Uint8Array(16)), t.InstanceId = I.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
|
|
1509
1509
|
}
|
|
1510
1510
|
function Xs(t) {
|
|
1511
|
-
const e = new
|
|
1511
|
+
const e = new U(Nt);
|
|
1512
1512
|
return Js(t, e), e.finish();
|
|
1513
1513
|
}
|
|
1514
1514
|
function Js(t, e) {
|
|
@@ -1516,7 +1516,7 @@ function Js(t, e) {
|
|
|
1516
1516
|
}
|
|
1517
1517
|
function Qs(t, e, r) {
|
|
1518
1518
|
const n = Xs(t);
|
|
1519
|
-
return
|
|
1519
|
+
return F(Ws, n, Nt, e, r);
|
|
1520
1520
|
}
|
|
1521
1521
|
const Ge = 1, qs = 1048600, gt = 703025676, Ct = 814454131, bt = 972460562, Rt = 976255570, kt = 1368629611, Ut = 1479280922, Dt = 1533537016, Ot = 2274386296, Mt = 2603556958, Lt = 2885165957, vt = 3568439632;
|
|
1522
1522
|
function Zs(t) {
|
|
@@ -1524,14 +1524,14 @@ function Zs(t) {
|
|
|
1524
1524
|
return Ft(e), e;
|
|
1525
1525
|
}
|
|
1526
1526
|
function Ft(t) {
|
|
1527
|
-
return t.FunctionId =
|
|
1527
|
+
return t.FunctionId = I.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ResultTypeName = "", t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.IsCancellable = !1, t.Description = "", t.LlmInlineResult = !1, t.LlmCallOnlyOnce = !1, t.RequiresInstance = !1, t;
|
|
1528
1528
|
}
|
|
1529
1529
|
function ei(t) {
|
|
1530
|
-
const e = new
|
|
1530
|
+
const e = new U(Ge);
|
|
1531
1531
|
return Pt(t, e), e.finish();
|
|
1532
1532
|
}
|
|
1533
1533
|
function Pt(t, e) {
|
|
1534
|
-
e.writeStringField(gt, t.ResultTypeName), e.writeStringField(Ct, t.FunctionName), e.writeStringField(bt, t.EnumerableItemTypeName), e.writeGuidField(Rt, t.FunctionId), e.writeStringField(kt, t.Description), e.writeBoolField(Ut, t.IsCancellable), e.writeBoolField(Dt, t.RequiresInstance), e.writeBoolField(Ot, t.LlmInlineResult), e.writeBoolField(Mt, t.IsEnumerable), e.writeArrayField(Lt,
|
|
1534
|
+
e.writeStringField(gt, t.ResultTypeName), e.writeStringField(Ct, t.FunctionName), e.writeStringField(bt, t.EnumerableItemTypeName), e.writeGuidField(Rt, t.FunctionId), e.writeStringField(kt, t.Description), e.writeBoolField(Ut, t.IsCancellable), e.writeBoolField(Dt, t.RequiresInstance), e.writeBoolField(Ot, t.LlmInlineResult), e.writeBoolField(Mt, t.IsEnumerable), e.writeArrayField(Lt, b.Object, (r) => {
|
|
1535
1535
|
for (const n of t.Parameters)
|
|
1536
1536
|
r.writeObject(ii, (s) => {
|
|
1537
1537
|
ai(n, s);
|
|
@@ -1605,7 +1605,7 @@ function ri(t, e) {
|
|
|
1605
1605
|
}
|
|
1606
1606
|
function ni(t, e, r) {
|
|
1607
1607
|
const n = ei(t);
|
|
1608
|
-
return
|
|
1608
|
+
return F(qs, n, Ge, e, r);
|
|
1609
1609
|
}
|
|
1610
1610
|
function si(t) {
|
|
1611
1611
|
const e = [];
|
|
@@ -1689,11 +1689,11 @@ function fi(t) {
|
|
|
1689
1689
|
return t.Functions = [], t;
|
|
1690
1690
|
}
|
|
1691
1691
|
function pi(t) {
|
|
1692
|
-
const e = new
|
|
1692
|
+
const e = new U(zt);
|
|
1693
1693
|
return Ei(t, e), e.finish();
|
|
1694
1694
|
}
|
|
1695
1695
|
function Ei(t, e) {
|
|
1696
|
-
e.writeArrayField(di,
|
|
1696
|
+
e.writeArrayField(di, b.Object, (r) => {
|
|
1697
1697
|
for (const n of t.Functions)
|
|
1698
1698
|
r.writeObject(Ge, (s) => {
|
|
1699
1699
|
Pt(n, s);
|
|
@@ -1702,7 +1702,7 @@ function Ei(t, e) {
|
|
|
1702
1702
|
}
|
|
1703
1703
|
function Ii(t, e, r) {
|
|
1704
1704
|
const n = pi(t);
|
|
1705
|
-
return
|
|
1705
|
+
return F(ui, n, zt, e, r);
|
|
1706
1706
|
}
|
|
1707
1707
|
const Xt = 1, mi = 1048602, _i = 349453957, Ti = 703025676, Si = 3403385840, wi = 3748161056, yi = 4289118421;
|
|
1708
1708
|
function Ai(t) {
|
|
@@ -1710,10 +1710,10 @@ function Ai(t) {
|
|
|
1710
1710
|
return Ni(e), t && Object.assign(e, t), e;
|
|
1711
1711
|
}
|
|
1712
1712
|
function Ni(t) {
|
|
1713
|
-
return t.CallId =
|
|
1713
|
+
return t.CallId = I.fromBytes(new Uint8Array(16)), t.InstanceId = I.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
|
|
1714
1714
|
}
|
|
1715
1715
|
function gi(t) {
|
|
1716
|
-
const e = new
|
|
1716
|
+
const e = new U(Xt);
|
|
1717
1717
|
return Ci(t, e), e.finish();
|
|
1718
1718
|
}
|
|
1719
1719
|
function Ci(t, e) {
|
|
@@ -1721,18 +1721,18 @@ function Ci(t, e) {
|
|
|
1721
1721
|
}
|
|
1722
1722
|
function bi(t, e, r) {
|
|
1723
1723
|
const n = gi(t);
|
|
1724
|
-
return
|
|
1724
|
+
return F(mi, n, Xt, e, r);
|
|
1725
1725
|
}
|
|
1726
1726
|
const Jt = 1, Ri = 65549;
|
|
1727
1727
|
function ze(t) {
|
|
1728
1728
|
return {};
|
|
1729
1729
|
}
|
|
1730
1730
|
function ki(t) {
|
|
1731
|
-
return new
|
|
1731
|
+
return new U(Jt).finish();
|
|
1732
1732
|
}
|
|
1733
1733
|
function Xe(t, e, r) {
|
|
1734
1734
|
const n = ki();
|
|
1735
|
-
return
|
|
1735
|
+
return F(Ri, n, Jt, e, r);
|
|
1736
1736
|
}
|
|
1737
1737
|
const Ui = 3167053791, Di = 3342364356, Oi = 3612929027;
|
|
1738
1738
|
function Qt(t) {
|
|
@@ -1844,7 +1844,7 @@ function nr(t) {
|
|
|
1844
1844
|
return t.Clients = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelInstanceId = "", t.FirstUserId = "", t.ChannelUrl = "", t.ChannelId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.SessionId = "", t.Functions = /* @__PURE__ */ Object.create(null), t;
|
|
1845
1845
|
}
|
|
1846
1846
|
function uo(t, e) {
|
|
1847
|
-
const r =
|
|
1847
|
+
const r = j.create(t);
|
|
1848
1848
|
return ho(r, e);
|
|
1849
1849
|
}
|
|
1850
1850
|
function ho(t, e) {
|
|
@@ -2159,22 +2159,22 @@ function lr(t) {
|
|
|
2159
2159
|
return {};
|
|
2160
2160
|
}
|
|
2161
2161
|
function Qo(t) {
|
|
2162
|
-
return new
|
|
2162
|
+
return new U(cr).finish();
|
|
2163
2163
|
}
|
|
2164
2164
|
function ur(t, e, r) {
|
|
2165
2165
|
const n = Qo();
|
|
2166
|
-
return
|
|
2166
|
+
return F(Jo, n, cr, e, r);
|
|
2167
2167
|
}
|
|
2168
2168
|
const dr = 1, qo = 8388612;
|
|
2169
2169
|
function Zo(t) {
|
|
2170
2170
|
return {};
|
|
2171
2171
|
}
|
|
2172
2172
|
function ea(t) {
|
|
2173
|
-
return new
|
|
2173
|
+
return new U(dr).finish();
|
|
2174
2174
|
}
|
|
2175
2175
|
function ta(t, e, r) {
|
|
2176
2176
|
const n = ea();
|
|
2177
|
-
return
|
|
2177
|
+
return F(qo, n, dr, e, r);
|
|
2178
2178
|
}
|
|
2179
2179
|
function ra(t) {
|
|
2180
2180
|
return new Worker(
|
|
@@ -2190,17 +2190,17 @@ class xe extends Error {
|
|
|
2190
2190
|
super(e), this.cause = r, this.name = "ConnectionError";
|
|
2191
2191
|
}
|
|
2192
2192
|
}
|
|
2193
|
-
class
|
|
2193
|
+
class w extends xe {
|
|
2194
2194
|
constructor(e, r) {
|
|
2195
2195
|
super(e, r), this.name = "AuthenticationError";
|
|
2196
2196
|
}
|
|
2197
2197
|
}
|
|
2198
|
-
class
|
|
2198
|
+
class x extends xe {
|
|
2199
2199
|
constructor(e, r) {
|
|
2200
2200
|
super(e, r), this.name = "TransportError";
|
|
2201
2201
|
}
|
|
2202
2202
|
}
|
|
2203
|
-
class We extends
|
|
2203
|
+
class We extends x {
|
|
2204
2204
|
constructor(e) {
|
|
2205
2205
|
super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
|
|
2206
2206
|
}
|
|
@@ -2210,22 +2210,22 @@ class na extends xe {
|
|
|
2210
2210
|
super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
|
|
2211
2211
|
}
|
|
2212
2212
|
}
|
|
2213
|
-
class sa extends
|
|
2213
|
+
class sa extends w {
|
|
2214
2214
|
constructor(e) {
|
|
2215
2215
|
super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
|
-
class ll extends
|
|
2218
|
+
class ll extends w {
|
|
2219
2219
|
constructor(e) {
|
|
2220
2220
|
super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
|
|
2221
2221
|
}
|
|
2222
2222
|
}
|
|
2223
|
-
class ul extends
|
|
2223
|
+
class ul extends w {
|
|
2224
2224
|
constructor(e) {
|
|
2225
2225
|
super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
|
|
2226
2226
|
}
|
|
2227
2227
|
}
|
|
2228
|
-
class dl extends
|
|
2228
|
+
class dl extends w {
|
|
2229
2229
|
constructor() {
|
|
2230
2230
|
super("No channels available in this space"), this.name = "NoChannelsError";
|
|
2231
2231
|
}
|
|
@@ -2295,7 +2295,7 @@ function se(t, e, r, n) {
|
|
|
2295
2295
|
}
|
|
2296
2296
|
}
|
|
2297
2297
|
}
|
|
2298
|
-
function
|
|
2298
|
+
function L(t) {
|
|
2299
2299
|
return {
|
|
2300
2300
|
debug(e, ...r) {
|
|
2301
2301
|
se(0, t, e, r);
|
|
@@ -2311,7 +2311,7 @@ function O(t) {
|
|
|
2311
2311
|
}
|
|
2312
2312
|
};
|
|
2313
2313
|
}
|
|
2314
|
-
const ie =
|
|
2314
|
+
const ie = L("WebSocketTransport"), ca = 1e4;
|
|
2315
2315
|
class la {
|
|
2316
2316
|
ws = null;
|
|
2317
2317
|
keepaliveTimeout = null;
|
|
@@ -2331,26 +2331,26 @@ class la {
|
|
|
2331
2331
|
try {
|
|
2332
2332
|
this.ws = new WebSocket(e), this.ws.binaryType = "arraybuffer";
|
|
2333
2333
|
} catch (l) {
|
|
2334
|
-
s(new
|
|
2334
|
+
s(new x(`Failed to create WebSocket: ${l}`, l instanceof Error ? l : void 0));
|
|
2335
2335
|
return;
|
|
2336
2336
|
}
|
|
2337
2337
|
let i = !1, o = !1;
|
|
2338
2338
|
const a = () => {
|
|
2339
2339
|
clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
|
|
2340
2340
|
}, c = setTimeout(() => {
|
|
2341
|
-
o || (o = !0, a(), this.ws?.close(), s(new
|
|
2341
|
+
o || (o = !0, a(), this.ws?.close(), s(new x("WebSocket connection timeout")));
|
|
2342
2342
|
}, ca);
|
|
2343
2343
|
this.ws.onopen = () => {
|
|
2344
2344
|
i = !0, clearTimeout(c), this.ws.send(r), this.resetKeepaliveTimeout(), o || (o = !0, n());
|
|
2345
2345
|
}, this.ws.onerror = () => {
|
|
2346
|
-
clearTimeout(c), ie.error("WebSocket error"), o || (o = !0, a(), s(new
|
|
2346
|
+
clearTimeout(c), ie.error("WebSocket error"), o || (o = !0, a(), s(new x("WebSocket connection failed")));
|
|
2347
2347
|
}, this.ws.onclose = (l) => {
|
|
2348
2348
|
if (this.clearKeepaliveTimeout(), !i && !o) {
|
|
2349
|
-
o = !0, a(), s(new
|
|
2349
|
+
o = !0, a(), s(new x("WebSocket connection closed before opening"));
|
|
2350
2350
|
return;
|
|
2351
2351
|
}
|
|
2352
|
-
const
|
|
2353
|
-
this.callbacks.onClose(
|
|
2352
|
+
const p = l.wasClean && (l.code === 1e3 || l.code === 1001), d = l.code === 1e3 || l.code === 1001, h = l.reason || `code=${l.code}`;
|
|
2353
|
+
this.callbacks.onClose(h, p, d);
|
|
2354
2354
|
}, this.ws.onmessage = (l) => {
|
|
2355
2355
|
this.handleProtocolMessage(new Uint8Array(l.data));
|
|
2356
2356
|
};
|
|
@@ -2370,7 +2370,7 @@ class la {
|
|
|
2370
2370
|
}
|
|
2371
2371
|
handleProtocolMessage(e) {
|
|
2372
2372
|
try {
|
|
2373
|
-
if (
|
|
2373
|
+
if (re(e).opcode === T.KEEPALIVE_REQUEST) {
|
|
2374
2374
|
this.send(this.getKeepaliveResponse()), this.resetKeepaliveTimeout();
|
|
2375
2375
|
return;
|
|
2376
2376
|
}
|
|
@@ -2388,7 +2388,7 @@ class la {
|
|
|
2388
2388
|
this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
|
|
2389
2389
|
}
|
|
2390
2390
|
}
|
|
2391
|
-
const
|
|
2391
|
+
const B = L("WebTransportTransport"), Je = 4, ua = 65536;
|
|
2392
2392
|
function pr() {
|
|
2393
2393
|
return typeof WebTransport < "u";
|
|
2394
2394
|
}
|
|
@@ -2419,24 +2419,24 @@ class da {
|
|
|
2419
2419
|
}
|
|
2420
2420
|
async connect(e, r) {
|
|
2421
2421
|
if (!pr())
|
|
2422
|
-
throw new
|
|
2422
|
+
throw new x("WebTransport is not supported in this browser");
|
|
2423
2423
|
try {
|
|
2424
|
-
this.transport = new WebTransport(e), await this.transport.ready,
|
|
2424
|
+
this.transport = new WebTransport(e), await this.transport.ready, B.debug(`Connected to WebTransport entrypoint: ${e}`), this.transport.closed.then(() => {
|
|
2425
2425
|
this.handleClose("Connection closed", !0);
|
|
2426
2426
|
}).catch((n) => {
|
|
2427
|
-
|
|
2427
|
+
B.error("WebTransport connection closed with error:", n), this.handleClose(n.message || "Connection error", !1);
|
|
2428
2428
|
}), this.stream = await this.transport.createBidirectionalStream(), this.reader = this.stream.readable.getReader(), this.writer = this.stream.writable.getWriter(), await this.writer.write(r), this.resetKeepaliveTimeout(), this.startReadLoop();
|
|
2429
2429
|
} catch (n) {
|
|
2430
|
-
throw this.cleanup(), new
|
|
2430
|
+
throw this.cleanup(), new x(`Failed to connect WebTransport: ${n}`, n instanceof Error ? n : void 0);
|
|
2431
2431
|
}
|
|
2432
2432
|
}
|
|
2433
2433
|
send(e) {
|
|
2434
2434
|
if (!this.writer) {
|
|
2435
|
-
|
|
2435
|
+
B.warn("Cannot send: WebTransport not connected");
|
|
2436
2436
|
return;
|
|
2437
2437
|
}
|
|
2438
2438
|
this.writer.write(e).catch((r) => {
|
|
2439
|
-
|
|
2439
|
+
B.error("Failed to send protocol message:", r), this.callbacks.onError(r instanceof Error ? r : new Error(String(r)));
|
|
2440
2440
|
});
|
|
2441
2441
|
}
|
|
2442
2442
|
close() {
|
|
@@ -2456,7 +2456,7 @@ class da {
|
|
|
2456
2456
|
e && (this.appendToBuffer(e), this.processBufferedMessages());
|
|
2457
2457
|
}
|
|
2458
2458
|
} catch (e) {
|
|
2459
|
-
this.readLoopActive && (
|
|
2459
|
+
this.readLoopActive && (B.error("Read loop error:", e), this.callbacks.onError(e instanceof Error ? e : new Error(String(e))));
|
|
2460
2460
|
}
|
|
2461
2461
|
}
|
|
2462
2462
|
}
|
|
@@ -2497,7 +2497,7 @@ class da {
|
|
|
2497
2497
|
for (; this.receiveBufferLength >= Je; ) {
|
|
2498
2498
|
const r = e.getUint32(this.receiveBufferOffset, !0);
|
|
2499
2499
|
if (r < Je) {
|
|
2500
|
-
|
|
2500
|
+
B.error(`Invalid message length: ${r}`), this.callbacks.onError(new Error(`Invalid protocol message length: ${r}`)), this.receiveBufferOffset = 0, this.receiveBufferLength = 0;
|
|
2501
2501
|
return;
|
|
2502
2502
|
}
|
|
2503
2503
|
if (this.receiveBufferLength < r)
|
|
@@ -2512,13 +2512,13 @@ class da {
|
|
|
2512
2512
|
*/
|
|
2513
2513
|
handleProtocolMessage(e) {
|
|
2514
2514
|
try {
|
|
2515
|
-
if (
|
|
2515
|
+
if (re(e).opcode === T.KEEPALIVE_REQUEST) {
|
|
2516
2516
|
this.send(this.getKeepaliveResponse()), this.resetKeepaliveTimeout();
|
|
2517
2517
|
return;
|
|
2518
2518
|
}
|
|
2519
2519
|
this.resetKeepaliveTimeout(), this.callbacks.onProtocolMessage(e);
|
|
2520
2520
|
} catch (r) {
|
|
2521
|
-
|
|
2521
|
+
B.error("Failed to process protocol message:", r), this.callbacks.onError(r instanceof Error ? r : new Error(String(r)));
|
|
2522
2522
|
}
|
|
2523
2523
|
}
|
|
2524
2524
|
/**
|
|
@@ -2532,7 +2532,7 @@ class da {
|
|
|
2532
2532
|
*/
|
|
2533
2533
|
resetKeepaliveTimeout() {
|
|
2534
2534
|
this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
|
|
2535
|
-
|
|
2535
|
+
B.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new We(this.keepaliveTimeoutMs)), this.close();
|
|
2536
2536
|
}, this.keepaliveTimeoutMs);
|
|
2537
2537
|
}
|
|
2538
2538
|
/**
|
|
@@ -2554,7 +2554,7 @@ class da {
|
|
|
2554
2554
|
}
|
|
2555
2555
|
}
|
|
2556
2556
|
}
|
|
2557
|
-
const
|
|
2557
|
+
const q = L("Channel");
|
|
2558
2558
|
class ha {
|
|
2559
2559
|
state = "disconnected";
|
|
2560
2560
|
transport = null;
|
|
@@ -2597,7 +2597,7 @@ class ha {
|
|
|
2597
2597
|
try {
|
|
2598
2598
|
await this.connectTransport(), this.setState("connected");
|
|
2599
2599
|
} catch (e) {
|
|
2600
|
-
throw
|
|
2600
|
+
throw q.error("Channel connection failed:", e), this.setState("disconnected"), e;
|
|
2601
2601
|
}
|
|
2602
2602
|
}
|
|
2603
2603
|
/**
|
|
@@ -2611,7 +2611,7 @@ class ha {
|
|
|
2611
2611
|
*/
|
|
2612
2612
|
send(e) {
|
|
2613
2613
|
if (!this.transport?.isConnected) {
|
|
2614
|
-
|
|
2614
|
+
q.warn("Cannot send: channel not connected");
|
|
2615
2615
|
return;
|
|
2616
2616
|
}
|
|
2617
2617
|
this.transport.send(e);
|
|
@@ -2630,18 +2630,18 @@ class ha {
|
|
|
2630
2630
|
}
|
|
2631
2631
|
};
|
|
2632
2632
|
switch (e.Type) {
|
|
2633
|
-
case
|
|
2634
|
-
case
|
|
2633
|
+
case R.WebSocket:
|
|
2634
|
+
case R.WebSocketProxy:
|
|
2635
2635
|
this.transport = new la(r);
|
|
2636
2636
|
break;
|
|
2637
|
-
case
|
|
2638
|
-
case
|
|
2637
|
+
case R.WebTransport:
|
|
2638
|
+
case R.WebTransportProxy:
|
|
2639
2639
|
if (!pr())
|
|
2640
2640
|
throw new Error("WebTransport is not supported in this browser");
|
|
2641
2641
|
this.transport = new da(r);
|
|
2642
2642
|
break;
|
|
2643
2643
|
default:
|
|
2644
|
-
throw new Error(`Unsupported entrypoint type: ${
|
|
2644
|
+
throw new Error(`Unsupported entrypoint type: ${R[e.Type]}`);
|
|
2645
2645
|
}
|
|
2646
2646
|
await this.transport.connect(e.Uri, e.AuthTicket);
|
|
2647
2647
|
}
|
|
@@ -2651,13 +2651,13 @@ class ha {
|
|
|
2651
2651
|
handleProtocolMessage(e) {
|
|
2652
2652
|
try {
|
|
2653
2653
|
const r = e;
|
|
2654
|
-
if (ce(r) ===
|
|
2655
|
-
|
|
2654
|
+
if (ce(r) === T.CORE_ON_SERVER_STOPPING) {
|
|
2655
|
+
q.debug("Received server stopping message"), this.setState("stopped"), this.transport?.close();
|
|
2656
2656
|
return;
|
|
2657
2657
|
}
|
|
2658
2658
|
this.config.onProtocolMessage?.(r);
|
|
2659
2659
|
} catch (r) {
|
|
2660
|
-
|
|
2660
|
+
q.error("Failed to handle protocol message:", r), this.config.onError?.(r instanceof Error ? r : new Error(String(r)));
|
|
2661
2661
|
}
|
|
2662
2662
|
}
|
|
2663
2663
|
/**
|
|
@@ -2670,7 +2670,7 @@ class ha {
|
|
|
2670
2670
|
* Handle transport error.
|
|
2671
2671
|
*/
|
|
2672
2672
|
handleError(e) {
|
|
2673
|
-
|
|
2673
|
+
q.error("Channel error:", e), this.config.onError?.(e), e instanceof We && this.handleClose("Keepalive timeout", !1);
|
|
2674
2674
|
}
|
|
2675
2675
|
/**
|
|
2676
2676
|
* Update and notify state change.
|
|
@@ -2679,7 +2679,7 @@ class ha {
|
|
|
2679
2679
|
this.state !== e && (this.state = e, this.config.onStateChange?.(e));
|
|
2680
2680
|
}
|
|
2681
2681
|
}
|
|
2682
|
-
const
|
|
2682
|
+
const G = L("ChannelManager");
|
|
2683
2683
|
class fa {
|
|
2684
2684
|
channels = /* @__PURE__ */ new Map();
|
|
2685
2685
|
// keyed by opcode group
|
|
@@ -2730,7 +2730,7 @@ class fa {
|
|
|
2730
2730
|
s.send(e);
|
|
2731
2731
|
return;
|
|
2732
2732
|
}
|
|
2733
|
-
|
|
2733
|
+
G.warn("No channel found for message");
|
|
2734
2734
|
}
|
|
2735
2735
|
/**
|
|
2736
2736
|
* Send a protocol message to all channels (for broadcast messages).
|
|
@@ -2761,10 +2761,10 @@ class fa {
|
|
|
2761
2761
|
await this.connectAllChannels(i), this.config.endpointSelector?.rememberWorkingType(s), this.config.onRememberWorkingType?.(s), this.activeType = s, this.reconnectAttempts = 0, this.setState("connected");
|
|
2762
2762
|
return;
|
|
2763
2763
|
} catch (o) {
|
|
2764
|
-
|
|
2764
|
+
G.warn(`Failed to connect using ${R[s]}: ${o}`), this.disconnectAll();
|
|
2765
2765
|
}
|
|
2766
2766
|
}
|
|
2767
|
-
throw
|
|
2767
|
+
throw G.error("All endpoint types failed"), e || this.setState("offline"), new Error("Failed to connect using any endpoint type");
|
|
2768
2768
|
}
|
|
2769
2769
|
/**
|
|
2770
2770
|
* Connect all channels for a given endpoint type in parallel.
|
|
@@ -2824,10 +2824,10 @@ class fa {
|
|
|
2824
2824
|
handleChannelClose(e, r, n, s) {
|
|
2825
2825
|
if (!(this.state === "idle" || this.state === "stopped" || this.state === "offline")) {
|
|
2826
2826
|
if (n || s) {
|
|
2827
|
-
|
|
2827
|
+
G.debug("Channel closed by server"), this.shouldReconnect = !1, this.disconnectAll(), this.setState("stopped");
|
|
2828
2828
|
return;
|
|
2829
2829
|
}
|
|
2830
|
-
this.state === "connected" && (
|
|
2830
|
+
this.state === "connected" && (G.error("Channel closed unexpectedly, attempting reconnect"), this.disconnectAll(), this.attemptReconnect());
|
|
2831
2831
|
}
|
|
2832
2832
|
}
|
|
2833
2833
|
/**
|
|
@@ -2837,16 +2837,16 @@ class fa {
|
|
|
2837
2837
|
if (!this.shouldReconnect)
|
|
2838
2838
|
return;
|
|
2839
2839
|
if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
|
|
2840
|
-
|
|
2840
|
+
G.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new na(this.config.maxReconnectAttempts));
|
|
2841
2841
|
return;
|
|
2842
2842
|
}
|
|
2843
2843
|
this.setState("reconnecting"), this.reconnectAttempts++;
|
|
2844
2844
|
const e = this.config.reconnectBackoffMs * Math.pow(2, this.reconnectAttempts - 1);
|
|
2845
|
-
if (
|
|
2845
|
+
if (G.info(`Reconnecting in ${e}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await hr(e, this.abortController?.signal), !!this.shouldReconnect)
|
|
2846
2846
|
try {
|
|
2847
2847
|
await this.connectInternal(!0);
|
|
2848
2848
|
} catch (r) {
|
|
2849
|
-
|
|
2849
|
+
G.error("Reconnect failed:", r), await this.attemptReconnect();
|
|
2850
2850
|
}
|
|
2851
2851
|
}
|
|
2852
2852
|
/**
|
|
@@ -2945,7 +2945,7 @@ function $e() {
|
|
|
2945
2945
|
}
|
|
2946
2946
|
return !0;
|
|
2947
2947
|
}
|
|
2948
|
-
const pe =
|
|
2948
|
+
const pe = L("Authenticator"), K = T.GROUP_CORE | T.GROUP_KEEPALIVE | T.GROUP_EVENTS | T.GROUP_ACTIONS | T.GROUP_UI | T.GROUP_AUDIO | T.GROUP_VIDEO, ma = 1e3, _a = 5e3;
|
|
2949
2949
|
async function Ta(t) {
|
|
2950
2950
|
try {
|
|
2951
2951
|
const e = await fetch(`${fe}/users/me`, {
|
|
@@ -2978,7 +2978,7 @@ async function Tr(t, e, r, n, s, i, o) {
|
|
|
2978
2978
|
}, l = await fetch(a, _r(c, i, o));
|
|
2979
2979
|
if (!l.ok) {
|
|
2980
2980
|
const d = await l.text().catch(() => "Unknown error");
|
|
2981
|
-
throw new
|
|
2981
|
+
throw new w(`Failed to request channel: ${l.status} ${d}`);
|
|
2982
2982
|
}
|
|
2983
2983
|
return await l.json();
|
|
2984
2984
|
}
|
|
@@ -2986,7 +2986,7 @@ async function Sa(t, e, r, n) {
|
|
|
2986
2986
|
const s = `${t}/rooms/connect`, i = await fetch(s, _r(e, r, n));
|
|
2987
2987
|
if (!i.ok) {
|
|
2988
2988
|
const o = await i.text().catch(() => "Unknown error");
|
|
2989
|
-
throw new
|
|
2989
|
+
throw new w(`Backend connect failed: ${i.status} ${o}`);
|
|
2990
2990
|
}
|
|
2991
2991
|
return i.json();
|
|
2992
2992
|
}
|
|
@@ -2995,7 +2995,7 @@ async function Sr(t, e, r, n, s) {
|
|
|
2995
2995
|
let o = ma;
|
|
2996
2996
|
for (; ; ) {
|
|
2997
2997
|
if (s?.aborted)
|
|
2998
|
-
throw new
|
|
2998
|
+
throw new w("Connection aborted");
|
|
2999
2999
|
if (Date.now() - i >= r)
|
|
3000
3000
|
throw new sa(r);
|
|
3001
3001
|
const c = await Sa(t, e, n, s), l = c.state?.toLowerCase();
|
|
@@ -3005,14 +3005,14 @@ async function Sr(t, e, r, n, s) {
|
|
|
3005
3005
|
await hr(o, s), o = Math.min(o * 1.5, _a);
|
|
3006
3006
|
continue;
|
|
3007
3007
|
}
|
|
3008
|
-
throw new
|
|
3008
|
+
throw new w(`Unexpected channel state: ${c.state}`);
|
|
3009
3009
|
}
|
|
3010
3010
|
}
|
|
3011
3011
|
async function Ke(t, e) {
|
|
3012
3012
|
const r = await fetch(t, { signal: e });
|
|
3013
3013
|
if (!r.ok) {
|
|
3014
3014
|
const o = await r.text().catch(() => "Unknown error");
|
|
3015
|
-
throw new
|
|
3015
|
+
throw new w(`Failed to connect: ${r.status} ${o}`);
|
|
3016
3016
|
}
|
|
3017
3017
|
const n = await r.arrayBuffer(), s = new Uint8Array(n);
|
|
3018
3018
|
return { authResponse: as(s) };
|
|
@@ -3021,9 +3021,9 @@ function wa(t, e) {
|
|
|
3021
3021
|
return us({
|
|
3022
3022
|
ServerSessionId: "",
|
|
3023
3023
|
// Server will fill this in
|
|
3024
|
-
ContextType:
|
|
3025
|
-
UserType:
|
|
3026
|
-
PayloadType:
|
|
3024
|
+
ContextType: z.Browser,
|
|
3025
|
+
UserType: J.Human,
|
|
3026
|
+
PayloadType: X.Teleport,
|
|
3027
3027
|
IsInternal: !1,
|
|
3028
3028
|
Description: t.description ?? "Ikon SDK TypeScript",
|
|
3029
3029
|
UserId: e,
|
|
@@ -3032,8 +3032,8 @@ function wa(t, e) {
|
|
|
3032
3032
|
VersionId: t.versionId ?? "1.0.0",
|
|
3033
3033
|
InstallId: t.installId ?? "",
|
|
3034
3034
|
Locale: t.locale ?? (typeof navigator < "u" ? navigator.language : "en-US"),
|
|
3035
|
-
OpcodeGroupsFromServer: t.opcodeGroupsFromServer ??
|
|
3036
|
-
OpcodeGroupsToServer: t.opcodeGroupsToServer ??
|
|
3035
|
+
OpcodeGroupsFromServer: t.opcodeGroupsFromServer ?? K,
|
|
3036
|
+
OpcodeGroupsToServer: t.opcodeGroupsToServer ?? K,
|
|
3037
3037
|
ProtocolVersion: 1,
|
|
3038
3038
|
HasInput: !1,
|
|
3039
3039
|
ChannelLocale: "",
|
|
@@ -3041,7 +3041,7 @@ function wa(t, e) {
|
|
|
3041
3041
|
AuthSessionId: "local",
|
|
3042
3042
|
ReceiveAllMessages: !1,
|
|
3043
3043
|
UserAgent: typeof navigator < "u" ? navigator.userAgent : "",
|
|
3044
|
-
ClientType:
|
|
3044
|
+
ClientType: Y.DesktopWeb,
|
|
3045
3045
|
Parameters: t.parameters ?? {}
|
|
3046
3046
|
});
|
|
3047
3047
|
}
|
|
@@ -3087,18 +3087,18 @@ async function Aa(t, e) {
|
|
|
3087
3087
|
signal: e
|
|
3088
3088
|
});
|
|
3089
3089
|
if (!c.ok) {
|
|
3090
|
-
const
|
|
3091
|
-
throw new
|
|
3090
|
+
const h = await c.text().catch(() => "Unknown error");
|
|
3091
|
+
throw new w(`Failed to get connect token: ${c.status} ${h}`);
|
|
3092
3092
|
}
|
|
3093
|
-
const
|
|
3094
|
-
if (!
|
|
3095
|
-
throw new
|
|
3096
|
-
const d = `${r}/connect?token=${encodeURIComponent(
|
|
3093
|
+
const p = (await c.json()).token;
|
|
3094
|
+
if (!p)
|
|
3095
|
+
throw new w("Server did not return a token");
|
|
3096
|
+
const d = `${r}/connect?token=${encodeURIComponent(p)}`;
|
|
3097
3097
|
return Ke(d, e);
|
|
3098
3098
|
}
|
|
3099
3099
|
async function Na(t, e) {
|
|
3100
3100
|
if (t.sessionId && t.channelKey)
|
|
3101
|
-
throw new
|
|
3101
|
+
throw new w("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3102
3102
|
const r = Ir(t.backendType);
|
|
3103
3103
|
pe.debug(`Authenticating with cloud server: ${r}, space ID: ${t.spaceId}`);
|
|
3104
3104
|
const n = await fetch(`${r}/auth/api-key`, {
|
|
@@ -3114,12 +3114,12 @@ async function Na(t, e) {
|
|
|
3114
3114
|
signal: e
|
|
3115
3115
|
});
|
|
3116
3116
|
if (!n.ok) {
|
|
3117
|
-
const
|
|
3118
|
-
throw new
|
|
3117
|
+
const h = await n.text().catch(() => "Unknown error");
|
|
3118
|
+
throw new w(`API key authentication failed: ${n.status} ${h}`);
|
|
3119
3119
|
}
|
|
3120
3120
|
const i = (await n.json()).token;
|
|
3121
3121
|
if (!i)
|
|
3122
|
-
throw new
|
|
3122
|
+
throw new w("Backend did not return a token");
|
|
3123
3123
|
const o = await fetch(`${r}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
|
|
3124
3124
|
method: "GET",
|
|
3125
3125
|
headers: {
|
|
@@ -3128,37 +3128,37 @@ async function Na(t, e) {
|
|
|
3128
3128
|
signal: e
|
|
3129
3129
|
});
|
|
3130
3130
|
if (!o.ok) {
|
|
3131
|
-
const
|
|
3132
|
-
throw new
|
|
3131
|
+
const h = await o.text().catch(() => "Unknown error");
|
|
3132
|
+
throw new w(`Failed to get or create profile: ${o.status} ${h}`);
|
|
3133
3133
|
}
|
|
3134
3134
|
const c = {
|
|
3135
3135
|
code: (await Tr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e)).code,
|
|
3136
|
-
contextType:
|
|
3137
|
-
userType: t.userType ??
|
|
3138
|
-
clientType: t.clientType ??
|
|
3139
|
-
payloadType:
|
|
3136
|
+
contextType: z.Plugin,
|
|
3137
|
+
userType: t.userType ?? J.Human,
|
|
3138
|
+
clientType: t.clientType ?? Y.DesktopWeb,
|
|
3139
|
+
payloadType: X.Teleport,
|
|
3140
3140
|
description: t.description ?? "Ikon SDK TypeScript",
|
|
3141
3141
|
deviceId: t.deviceId ?? He(),
|
|
3142
3142
|
productId: t.productId ?? "",
|
|
3143
3143
|
versionId: t.versionId ?? "",
|
|
3144
3144
|
installId: t.installId ?? "",
|
|
3145
3145
|
locale: t.locale ?? (typeof navigator < "u" ? navigator.language : "en-US"),
|
|
3146
|
-
opcodeGroupsFromServer: t.opcodeGroupsFromServer ??
|
|
3147
|
-
opcodeGroupsToServer: t.opcodeGroupsToServer ??
|
|
3146
|
+
opcodeGroupsFromServer: t.opcodeGroupsFromServer ?? K,
|
|
3147
|
+
opcodeGroupsToServer: t.opcodeGroupsToServer ?? K,
|
|
3148
3148
|
protocolVersion: 1,
|
|
3149
3149
|
userAgent: typeof navigator < "u" ? navigator.userAgent : "",
|
|
3150
3150
|
launchParams: t.parameters,
|
|
3151
3151
|
hash: t.sessionId,
|
|
3152
3152
|
waitForRunning: !0
|
|
3153
|
-
}, l = t.provisioningTimeoutMs ?? Er,
|
|
3154
|
-
if (!
|
|
3155
|
-
throw new
|
|
3156
|
-
const d =
|
|
3153
|
+
}, l = t.provisioningTimeoutMs ?? Er, p = await Sr(r, c, l, i, e);
|
|
3154
|
+
if (!p.configuration?.url)
|
|
3155
|
+
throw new w("Backend did not return a connect URL");
|
|
3156
|
+
const d = p.configuration.url;
|
|
3157
3157
|
return Ke(d, e);
|
|
3158
3158
|
}
|
|
3159
3159
|
async function ga(t, e) {
|
|
3160
3160
|
if (t.sessionId && t.channelKey)
|
|
3161
|
-
throw new
|
|
3161
|
+
throw new w("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3162
3162
|
const r = Ir(t.backendType), n = t.token;
|
|
3163
3163
|
pe.debug(`Authenticating with session token to: ${r}, space ID: ${t.spaceId}`);
|
|
3164
3164
|
const s = await fetch(`${r}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
|
|
@@ -3169,23 +3169,23 @@ async function ga(t, e) {
|
|
|
3169
3169
|
signal: e
|
|
3170
3170
|
});
|
|
3171
3171
|
if (!s.ok) {
|
|
3172
|
-
const
|
|
3173
|
-
throw new
|
|
3172
|
+
const p = await s.text().catch(() => "Unknown error");
|
|
3173
|
+
throw new w(`Failed to get or create profile: ${s.status} ${p}`);
|
|
3174
3174
|
}
|
|
3175
3175
|
const o = {
|
|
3176
3176
|
code: (await Tr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, n, e)).code,
|
|
3177
|
-
contextType:
|
|
3178
|
-
userType:
|
|
3179
|
-
clientType:
|
|
3180
|
-
payloadType:
|
|
3177
|
+
contextType: z.Browser,
|
|
3178
|
+
userType: J.Human,
|
|
3179
|
+
clientType: Y.DesktopWeb,
|
|
3180
|
+
payloadType: X.Teleport,
|
|
3181
3181
|
description: t.description ?? "Ikon SDK TypeScript",
|
|
3182
3182
|
deviceId: t.deviceId ?? He(),
|
|
3183
3183
|
productId: t.productId ?? "",
|
|
3184
3184
|
versionId: t.versionId ?? "",
|
|
3185
3185
|
installId: t.installId ?? "",
|
|
3186
3186
|
locale: t.locale ?? (typeof navigator < "u" ? navigator.language : "en-US"),
|
|
3187
|
-
opcodeGroupsFromServer: t.opcodeGroupsFromServer ??
|
|
3188
|
-
opcodeGroupsToServer: t.opcodeGroupsToServer ??
|
|
3187
|
+
opcodeGroupsFromServer: t.opcodeGroupsFromServer ?? K,
|
|
3188
|
+
opcodeGroupsToServer: t.opcodeGroupsToServer ?? K,
|
|
3189
3189
|
protocolVersion: 1,
|
|
3190
3190
|
userAgent: typeof navigator < "u" ? navigator.userAgent : "",
|
|
3191
3191
|
launchParams: t.parameters,
|
|
@@ -3193,7 +3193,7 @@ async function ga(t, e) {
|
|
|
3193
3193
|
waitForRunning: !0
|
|
3194
3194
|
}, a = t.provisioningTimeoutMs ?? Er, c = await Sr(r, o, a, n, e);
|
|
3195
3195
|
if (!c.configuration?.url)
|
|
3196
|
-
throw new
|
|
3196
|
+
throw new w("Backend did not return a connect URL");
|
|
3197
3197
|
const l = c.configuration.url;
|
|
3198
3198
|
return Ke(l, e);
|
|
3199
3199
|
}
|
|
@@ -3482,7 +3482,7 @@ function sc(t, e) {
|
|
|
3482
3482
|
return !1;
|
|
3483
3483
|
}
|
|
3484
3484
|
}
|
|
3485
|
-
let
|
|
3485
|
+
let Z = null;
|
|
3486
3486
|
const ic = {
|
|
3487
3487
|
name: "ikon.client.keepScreenAwake",
|
|
3488
3488
|
description: "Prevent or allow the screen to sleep",
|
|
@@ -3493,7 +3493,7 @@ async function oc(t) {
|
|
|
3493
3493
|
if (typeof navigator > "u" || !("wakeLock" in navigator))
|
|
3494
3494
|
return !1;
|
|
3495
3495
|
try {
|
|
3496
|
-
return !!t ?
|
|
3496
|
+
return !!t ? Z || (Z = await navigator.wakeLock.request("screen")) : Z && (await Z.release(), Z = null), !0;
|
|
3497
3497
|
} catch {
|
|
3498
3498
|
return !1;
|
|
3499
3499
|
}
|
|
@@ -3608,7 +3608,7 @@ function Ee(t) {
|
|
|
3608
3608
|
};
|
|
3609
3609
|
}
|
|
3610
3610
|
}
|
|
3611
|
-
function
|
|
3611
|
+
function te(t) {
|
|
3612
3612
|
switch (t.kind) {
|
|
3613
3613
|
case "boolean":
|
|
3614
3614
|
return "System.Boolean";
|
|
@@ -3617,9 +3617,9 @@ function ee(t) {
|
|
|
3617
3617
|
case "string":
|
|
3618
3618
|
return "System.String";
|
|
3619
3619
|
case "array":
|
|
3620
|
-
return `System.Collections.Generic.List\`1[${
|
|
3620
|
+
return `System.Collections.Generic.List\`1[${te(t.element)}]`;
|
|
3621
3621
|
case "dictionary":
|
|
3622
|
-
return `System.Collections.Generic.Dictionary\`2[${t.keyType === "int" ? "System.Int32" : "System.String"},${
|
|
3622
|
+
return `System.Collections.Generic.Dictionary\`2[${t.keyType === "int" ? "System.Int32" : "System.String"},${te(t.value)}]`;
|
|
3623
3623
|
default:
|
|
3624
3624
|
return t;
|
|
3625
3625
|
}
|
|
@@ -3656,12 +3656,12 @@ function _c(t, e) {
|
|
|
3656
3656
|
description: i.description
|
|
3657
3657
|
};
|
|
3658
3658
|
}), n = Ee(t.returnType), s = {
|
|
3659
|
-
FunctionId:
|
|
3659
|
+
FunctionId: I.createRandom(),
|
|
3660
3660
|
FunctionName: t.name,
|
|
3661
3661
|
Description: t.description ?? "",
|
|
3662
3662
|
LlmInlineResult: t.llmInlineResult ?? !1,
|
|
3663
3663
|
LlmCallOnlyOnce: t.llmCallOnlyOnce ?? !1,
|
|
3664
|
-
ResultTypeName:
|
|
3664
|
+
ResultTypeName: te(n),
|
|
3665
3665
|
IsEnumerable: !1,
|
|
3666
3666
|
EnumerableItemTypeName: "",
|
|
3667
3667
|
IsCancellable: !1,
|
|
@@ -3669,7 +3669,7 @@ function _c(t, e) {
|
|
|
3669
3669
|
Parameters: r.map((i, o) => ({
|
|
3670
3670
|
ParameterIndex: o,
|
|
3671
3671
|
ParameterName: i.name,
|
|
3672
|
-
TypeName:
|
|
3672
|
+
TypeName: te(i.descriptor),
|
|
3673
3673
|
HasDefaultValue: i.hasDefaultValue,
|
|
3674
3674
|
DefaultValueJson: i.defaultValueJson,
|
|
3675
3675
|
DefaultValueData: mc,
|
|
@@ -3686,7 +3686,7 @@ function _c(t, e) {
|
|
|
3686
3686
|
returnType: n
|
|
3687
3687
|
};
|
|
3688
3688
|
}
|
|
3689
|
-
const st =
|
|
3689
|
+
const st = L("FunctionRegistry"), Tc = new Uint8Array(0);
|
|
3690
3690
|
function Sc(t) {
|
|
3691
3691
|
return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
|
|
3692
3692
|
}
|
|
@@ -3744,8 +3744,8 @@ class wc {
|
|
|
3744
3744
|
* Returns true if the message was handled.
|
|
3745
3745
|
*/
|
|
3746
3746
|
handleProtocolMessage(e, r) {
|
|
3747
|
-
if (r ===
|
|
3748
|
-
const n =
|
|
3747
|
+
if (r === T.ACTION_FUNCTION_CALL) {
|
|
3748
|
+
const n = re(e);
|
|
3749
3749
|
return this.handleFunctionCall(e, n.senderId), !0;
|
|
3750
3750
|
}
|
|
3751
3751
|
return !1;
|
|
@@ -3787,8 +3787,8 @@ class wc {
|
|
|
3787
3787
|
try {
|
|
3788
3788
|
const s = [];
|
|
3789
3789
|
for (let l = 0; l < e.parameters.length; l++) {
|
|
3790
|
-
const
|
|
3791
|
-
|
|
3790
|
+
const p = e.parameters[l], h = r.Parameters?.[l]?.ValueJson;
|
|
3791
|
+
h === void 0 || h === "" ? p.hasDefaultValue ? s.push(nt(p.defaultValueJson, p.descriptor)) : s.push(void 0) : s.push(nt(h, p.descriptor));
|
|
3792
3792
|
}
|
|
3793
3793
|
const i = await e.handler(...s);
|
|
3794
3794
|
let o = i, a = Tc;
|
|
@@ -3818,7 +3818,7 @@ class wc {
|
|
|
3818
3818
|
Ai({
|
|
3819
3819
|
CallId: e,
|
|
3820
3820
|
InstanceId: r,
|
|
3821
|
-
ResultTypeName:
|
|
3821
|
+
ResultTypeName: te(s.returnType),
|
|
3822
3822
|
ResultJson: i,
|
|
3823
3823
|
ResultData: o
|
|
3824
3824
|
}),
|
|
@@ -3949,14 +3949,14 @@ function Nr(t) {
|
|
|
3949
3949
|
}
|
|
3950
3950
|
function kc(t) {
|
|
3951
3951
|
return new Worker(
|
|
3952
|
-
"" + new URL("assets/audio-playback-worker-
|
|
3952
|
+
"" + new URL("assets/audio-playback-worker-CXmAFv0O.js", import.meta.url).href,
|
|
3953
3953
|
{
|
|
3954
3954
|
type: "module",
|
|
3955
3955
|
name: t?.name
|
|
3956
3956
|
}
|
|
3957
3957
|
);
|
|
3958
3958
|
}
|
|
3959
|
-
const Te = 48e3,
|
|
3959
|
+
const Te = 48e3, D = 2, gr = 1500, it = 512, Uc = "playback", Dc = 120, Oc = 300, Mc = 4, Lc = 200, vc = 100, Fc = 8e3, Pc = 10, Cr = 100, Re = 50, br = 128, Bc = 20, Gc = !0, A = L("IkonAudioPlayback"), xc = () => {
|
|
3960
3960
|
if (typeof navigator > "u" || typeof window > "u")
|
|
3961
3961
|
return !1;
|
|
3962
3962
|
const t = navigator.userAgent, e = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
@@ -3965,7 +3965,7 @@ const Te = 48e3, U = 2, gr = 1500, it = 512, Uc = "playback", Dc = 120, Oc = 300
|
|
|
3965
3965
|
enabled: !1,
|
|
3966
3966
|
statusIntervalMs: 1e3
|
|
3967
3967
|
};
|
|
3968
|
-
function
|
|
3968
|
+
function V(t) {
|
|
3969
3969
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
3970
3970
|
}
|
|
3971
3971
|
function Wc(t) {
|
|
@@ -4908,9 +4908,16 @@ class je {
|
|
|
4908
4908
|
silentAudioElement = null;
|
|
4909
4909
|
fallbackQueues = /* @__PURE__ */ new Map();
|
|
4910
4910
|
activeStreams = /* @__PURE__ */ new Set();
|
|
4911
|
+
mediaSessionConfig = null;
|
|
4911
4912
|
constructor(e, r) {
|
|
4912
4913
|
this.client = e, this.config = r ?? {}, A.debug(`Audio playback initialized, isMobile=${this.isMobile}`);
|
|
4913
4914
|
}
|
|
4915
|
+
/**
|
|
4916
|
+
* Set Media Session metadata for OS-level media controls (lock screen, notifications).
|
|
4917
|
+
*/
|
|
4918
|
+
setMediaSession(e) {
|
|
4919
|
+
this.mediaSessionConfig = e;
|
|
4920
|
+
}
|
|
4914
4921
|
/**
|
|
4915
4922
|
* Enable or disable audio playback.
|
|
4916
4923
|
*
|
|
@@ -5004,16 +5011,16 @@ class je {
|
|
|
5004
5011
|
} catch (l) {
|
|
5005
5012
|
try {
|
|
5006
5013
|
this.audioContext = new AudioContext({ latencyHint: c });
|
|
5007
|
-
} catch (
|
|
5014
|
+
} catch (p) {
|
|
5008
5015
|
try {
|
|
5009
5016
|
this.audioContext = new AudioContext();
|
|
5010
5017
|
} catch (d) {
|
|
5011
|
-
A.warn(`Failed to create AudioContext: ${
|
|
5018
|
+
A.warn(`Failed to create AudioContext: ${V(d)}`), this.audioContext = null;
|
|
5012
5019
|
return;
|
|
5013
5020
|
}
|
|
5014
|
-
A.debug(`AudioContext latencyHint unsupported: ${
|
|
5021
|
+
A.debug(`AudioContext latencyHint unsupported: ${V(p)}`);
|
|
5015
5022
|
}
|
|
5016
|
-
A.debug(`AudioContext sample rate request unsupported: ${
|
|
5023
|
+
A.debug(`AudioContext sample rate request unsupported: ${V(l)}`);
|
|
5017
5024
|
}
|
|
5018
5025
|
this.outputSampleRateHz = this.audioContext.sampleRate || Te, this.outputSampleRateHz !== a && A.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
|
|
5019
5026
|
}
|
|
@@ -5068,9 +5075,9 @@ class je {
|
|
|
5068
5075
|
setupMediaSession() {
|
|
5069
5076
|
if (!(typeof document > "u")) {
|
|
5070
5077
|
if (!this.silentAudioElement) {
|
|
5071
|
-
const s = new ArrayBuffer(882044), i = new DataView(s), o = (l,
|
|
5072
|
-
for (let d = 0; d <
|
|
5073
|
-
i.setUint8(l + d,
|
|
5078
|
+
const s = new ArrayBuffer(882044), i = new DataView(s), o = (l, p) => {
|
|
5079
|
+
for (let d = 0; d < p.length; d++)
|
|
5080
|
+
i.setUint8(l + d, p.charCodeAt(d));
|
|
5074
5081
|
};
|
|
5075
5082
|
o(0, "RIFF"), i.setUint32(4, 36 + 441e3 * 2, !0), o(8, "WAVE"), o(12, "fmt "), i.setUint32(16, 16, !0), i.setUint16(20, 1, !0), i.setUint16(22, 1, !0), i.setUint32(24, 44100, !0), i.setUint32(28, 44100 * 2, !0), i.setUint16(32, 2, !0), i.setUint16(34, 16, !0), o(36, "data"), i.setUint32(40, 441e3 * 2, !0);
|
|
5076
5083
|
const a = new Blob([s], { type: "audio/wav" }), c = URL.createObjectURL(a);
|
|
@@ -5078,7 +5085,7 @@ class je {
|
|
|
5078
5085
|
});
|
|
5079
5086
|
}
|
|
5080
5087
|
if ("mediaSession" in navigator) {
|
|
5081
|
-
const e = this.
|
|
5088
|
+
const e = this.mediaSessionConfig ?? {};
|
|
5082
5089
|
navigator.mediaSession.metadata = new MediaMetadata({
|
|
5083
5090
|
title: e.title || "Audio",
|
|
5084
5091
|
artist: e.artist || "Ikon AI App"
|
|
@@ -5171,17 +5178,17 @@ class je {
|
|
|
5171
5178
|
await this.resumeWithTimeout(e), this.getContextState(e) === "running" && this.removeUnlockHandler();
|
|
5172
5179
|
} catch {
|
|
5173
5180
|
}
|
|
5174
|
-
const i = `${this.outputSampleRateHz}_${
|
|
5181
|
+
const i = `${this.outputSampleRateHz}_${D}`;
|
|
5175
5182
|
if (!this.workletModuleUrl || this.workletModuleKey !== i) {
|
|
5176
5183
|
if (this.workletModuleUrl)
|
|
5177
5184
|
try {
|
|
5178
5185
|
URL.revokeObjectURL(this.workletModuleUrl);
|
|
5179
5186
|
} catch {
|
|
5180
5187
|
}
|
|
5181
|
-
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([Wc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels:
|
|
5188
|
+
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([Wc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: D })], { type: "text/javascript" }));
|
|
5182
5189
|
}
|
|
5183
|
-
this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((
|
|
5184
|
-
throw A.warn(`Failed to load AudioWorklet module, falling back: ${
|
|
5190
|
+
this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((p) => {
|
|
5191
|
+
throw A.warn(`Failed to load AudioWorklet module, falling back: ${V(p)}`), p;
|
|
5185
5192
|
}));
|
|
5186
5193
|
try {
|
|
5187
5194
|
await this.workletReady;
|
|
@@ -5194,32 +5201,32 @@ class je {
|
|
|
5194
5201
|
this.audioWorkletNode = new AudioWorkletNode(e, "ikon-audio-player", {
|
|
5195
5202
|
numberOfInputs: 0,
|
|
5196
5203
|
numberOfOutputs: 1,
|
|
5197
|
-
outputChannelCount: [
|
|
5204
|
+
outputChannelCount: [D],
|
|
5198
5205
|
processorOptions: {
|
|
5199
5206
|
outputAudioConfig: { diagnostics: r },
|
|
5200
5207
|
useSharedArrayBuffer: a,
|
|
5201
|
-
outputChannels:
|
|
5208
|
+
outputChannels: D
|
|
5202
5209
|
}
|
|
5203
|
-
}), this.audioWorkletNode.port.onmessage = (
|
|
5204
|
-
const d =
|
|
5210
|
+
}), this.audioWorkletNode.port.onmessage = (p) => {
|
|
5211
|
+
const d = p.data;
|
|
5205
5212
|
if (!(!d || typeof d != "object")) {
|
|
5206
5213
|
if (d.type === "stats") {
|
|
5207
5214
|
if (!r.enabled)
|
|
5208
5215
|
return;
|
|
5209
|
-
const
|
|
5210
|
-
A.debug(`[Audio] stream=${
|
|
5216
|
+
const h = d;
|
|
5217
|
+
A.debug(`[Audio] stream=${h.streamId.substring(0, 8)} state=${h.state} buffer=${h.bufferMs.toFixed(0)}ms target=${h.targetMs.toFixed(0)}ms jitter=${h.jitterMs.toFixed(1)}ms underrun=${h.underrunCount} drop=${h.dropCount}`);
|
|
5211
5218
|
return;
|
|
5212
5219
|
}
|
|
5213
5220
|
if (d.type === "streamDrained" && "streamId" in d && typeof d.streamId == "string") {
|
|
5214
|
-
const
|
|
5215
|
-
this.activeStreams.delete(
|
|
5221
|
+
const h = d.streamId;
|
|
5222
|
+
this.activeStreams.delete(h), this.activeStreams.size === 0 && this.removeUnlockHandler();
|
|
5216
5223
|
return;
|
|
5217
5224
|
}
|
|
5218
5225
|
}
|
|
5219
5226
|
}, this.audioWorkletNode.connect(e.destination), this.stopScriptProcessorDiagnostics(), await this.resumeAudioContextIfPossible(e, n, s), this.rebindWorkerTransportIfNeeded();
|
|
5220
5227
|
const c = this.pendingWorkletMessages.splice(0);
|
|
5221
|
-
for (const
|
|
5222
|
-
this.postToWorklet(
|
|
5228
|
+
for (const p of c)
|
|
5229
|
+
this.postToWorklet(p);
|
|
5223
5230
|
const l = this.getContextState(e) === "running";
|
|
5224
5231
|
this.notifyPlaybackActive(l);
|
|
5225
5232
|
}
|
|
@@ -5227,61 +5234,61 @@ class je {
|
|
|
5227
5234
|
if (this.scriptProcessorNode)
|
|
5228
5235
|
return;
|
|
5229
5236
|
this.stopAudioWorklet(), this.pendingWorkletMessages = [];
|
|
5230
|
-
const n = 1024, s = new Float32Array(n *
|
|
5231
|
-
d.onaudioprocess = (
|
|
5232
|
-
const
|
|
5233
|
-
for (let
|
|
5234
|
-
const u =
|
|
5235
|
-
u.fill(0), l[
|
|
5236
|
-
}
|
|
5237
|
-
let
|
|
5238
|
-
|
|
5239
|
-
for (const [
|
|
5240
|
-
u.totalSamples > 0 && (
|
|
5241
|
-
for (let
|
|
5237
|
+
const n = 1024, s = new Float32Array(n * D), i = Math.round(this.outputSampleRateHz * Cr / 1e3), o = Math.round(this.outputSampleRateHz * Re / 1e3), a = 1 / i, c = 1 / o, l = new Array(D), p = [], d = e.createScriptProcessor(n, 0, D);
|
|
5238
|
+
d.onaudioprocess = (h) => {
|
|
5239
|
+
const f = h.outputBuffer, E = f.numberOfChannels, _ = f.length;
|
|
5240
|
+
for (let m = 0; m < E; m++) {
|
|
5241
|
+
const u = f.getChannelData(m);
|
|
5242
|
+
u.fill(0), l[m] = u;
|
|
5243
|
+
}
|
|
5244
|
+
let N = 0;
|
|
5245
|
+
p.length = 0;
|
|
5246
|
+
for (const [m, u] of this.fallbackQueues.entries()) {
|
|
5247
|
+
u.totalSamples > 0 && (N += 1), (u.ending || u.inputDrained) && u.fadeDirection !== "out" && u.totalSamples / E * 1e3 / this.outputSampleRateHz <= Re * 2 && (u.fadeDirection = "out"), this.readFromFallbackQueue(u, s), (u.totalSamples > 0 || !u.hasLastOut) && ((!u.lastOut || u.lastOut.length !== s.length) && (u.lastOut = new Float32Array(s.length)), u.lastOut.set(s), u.hasLastOut = !0);
|
|
5248
|
+
for (let g = 0; g < _; g++) {
|
|
5242
5249
|
u.fadeDirection === "in" ? (u.fadeGain = Math.min(1, u.fadeGain + a), u.fadeGain >= 1 && (u.fadeDirection = "none")) : u.fadeDirection === "out" && (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none"));
|
|
5243
|
-
for (let
|
|
5244
|
-
const
|
|
5245
|
-
l[
|
|
5250
|
+
for (let P = 0; P < E; P++) {
|
|
5251
|
+
const O = s[g * E + P];
|
|
5252
|
+
l[P][g] += O * u.fadeGain;
|
|
5246
5253
|
}
|
|
5247
5254
|
}
|
|
5248
|
-
const
|
|
5249
|
-
if (
|
|
5255
|
+
const y = u.ending || u.inputDrained;
|
|
5256
|
+
if (y && u.totalSamples <= 0) {
|
|
5250
5257
|
if (u.fadeDirection === "out" && u.fadeGain > 1e-3) {
|
|
5251
|
-
for (let
|
|
5258
|
+
for (let g = 0; g < _; g++)
|
|
5252
5259
|
if (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 1e-3) {
|
|
5253
5260
|
u.fadeGain = 0, u.fadeDirection = "none";
|
|
5254
5261
|
break;
|
|
5255
5262
|
}
|
|
5256
5263
|
}
|
|
5257
|
-
u.fadeGain <= 1e-3 && u.ending &&
|
|
5258
|
-
} else if (!
|
|
5264
|
+
u.fadeGain <= 1e-3 && u.ending && p.push(m);
|
|
5265
|
+
} else if (!y && u.totalSamples <= 0 && u.hasLastOut && u.lastOut && u.fadeGain > 1e-3) {
|
|
5259
5266
|
u.fadeDirection = "out", u.underrunPending = !0;
|
|
5260
|
-
const
|
|
5261
|
-
for (let
|
|
5267
|
+
const g = u.lastOut, P = _ - 1;
|
|
5268
|
+
for (let O = 0; O < _; O++) {
|
|
5262
5269
|
u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none");
|
|
5263
|
-
for (let
|
|
5264
|
-
const Or =
|
|
5265
|
-
l[
|
|
5270
|
+
for (let W = 0; W < E; W++) {
|
|
5271
|
+
const Or = g[P * E + W];
|
|
5272
|
+
l[W][O] += Or * u.fadeGain;
|
|
5266
5273
|
}
|
|
5267
5274
|
}
|
|
5268
5275
|
}
|
|
5269
5276
|
}
|
|
5270
|
-
if (
|
|
5271
|
-
for (const
|
|
5272
|
-
this.fallbackQueues.delete(
|
|
5277
|
+
if (p.length > 0) {
|
|
5278
|
+
for (const m of p)
|
|
5279
|
+
this.fallbackQueues.delete(m), this.activeStreams.delete(m);
|
|
5273
5280
|
this.activeStreams.size === 0 && this.removeUnlockHandler();
|
|
5274
5281
|
}
|
|
5275
|
-
if (
|
|
5276
|
-
const
|
|
5277
|
-
for (let u = 0; u <
|
|
5278
|
-
for (let
|
|
5279
|
-
l[
|
|
5282
|
+
if (N > 1) {
|
|
5283
|
+
const m = 1 / Math.sqrt(N);
|
|
5284
|
+
for (let u = 0; u < _; u++)
|
|
5285
|
+
for (let y = 0; y < E; y++)
|
|
5286
|
+
l[y][u] *= m;
|
|
5280
5287
|
}
|
|
5281
|
-
for (let
|
|
5288
|
+
for (let m = 0; m < _; m++)
|
|
5282
5289
|
for (let u = 0; u < E; u++) {
|
|
5283
|
-
const
|
|
5284
|
-
l[u][
|
|
5290
|
+
const y = l[u][m];
|
|
5291
|
+
l[u][m] = y > 1 ? 1 : y < -1 ? -1 : y;
|
|
5285
5292
|
}
|
|
5286
5293
|
}, d.connect(e.destination), this.scriptProcessorNode = d, this.ensureScriptProcessorDiagnostics(r);
|
|
5287
5294
|
}
|
|
@@ -5303,7 +5310,7 @@ class je {
|
|
|
5303
5310
|
e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
|
|
5304
5311
|
}
|
|
5305
5312
|
trimFallbackQueue(e) {
|
|
5306
|
-
const r = Math.floor(this.outputSampleRateHz *
|
|
5313
|
+
const r = Math.floor(this.outputSampleRateHz * D * gr / 1e3), n = e.totalSamples - r;
|
|
5307
5314
|
n <= 0 || this.skipFromFallbackQueue(e, n);
|
|
5308
5315
|
}
|
|
5309
5316
|
stopScriptProcessorDiagnostics() {
|
|
@@ -5322,7 +5329,7 @@ class je {
|
|
|
5322
5329
|
for (const [n, s] of this.fallbackQueues.entries()) {
|
|
5323
5330
|
if (s.totalSamples <= 0)
|
|
5324
5331
|
continue;
|
|
5325
|
-
const o = s.totalSamples /
|
|
5332
|
+
const o = s.totalSamples / D * 1e3 / this.outputSampleRateHz;
|
|
5326
5333
|
A.debug(`[Audio] stream=${n.substring(0, 8)} buffer=${o.toFixed(0)}ms renderer=ScriptProcessor`);
|
|
5327
5334
|
}
|
|
5328
5335
|
}, r);
|
|
@@ -5350,7 +5357,7 @@ class je {
|
|
|
5350
5357
|
try {
|
|
5351
5358
|
await this.resumeWithTimeout(e), this.removeUnlockHandler();
|
|
5352
5359
|
} catch (o) {
|
|
5353
|
-
A.warn(`Failed to resume AudioContext: ${
|
|
5360
|
+
A.warn(`Failed to resume AudioContext: ${V(o)}`), this.addUnlockHandler();
|
|
5354
5361
|
}
|
|
5355
5362
|
}
|
|
5356
5363
|
async recoverAudioContext(e) {
|
|
@@ -5405,7 +5412,7 @@ class je {
|
|
|
5405
5412
|
type: "rebind",
|
|
5406
5413
|
transport: s,
|
|
5407
5414
|
outputSampleRate: this.outputSampleRateHz,
|
|
5408
|
-
outputChannels:
|
|
5415
|
+
outputChannels: D
|
|
5409
5416
|
});
|
|
5410
5417
|
} catch {
|
|
5411
5418
|
}
|
|
@@ -5417,7 +5424,7 @@ class je {
|
|
|
5417
5424
|
A.warn("Audio decode worker unavailable (Workers not supported)");
|
|
5418
5425
|
return;
|
|
5419
5426
|
}
|
|
5420
|
-
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask:
|
|
5427
|
+
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: T.GROUP_AUDIO });
|
|
5421
5428
|
if (!e) {
|
|
5422
5429
|
this.enabled && A.debug("Audio pipeline waiting for client connection");
|
|
5423
5430
|
return;
|
|
@@ -5426,24 +5433,24 @@ class je {
|
|
|
5426
5433
|
try {
|
|
5427
5434
|
this.audioWorker = new kc();
|
|
5428
5435
|
} catch (d) {
|
|
5429
|
-
A.warn(`Failed to create audio worker: ${
|
|
5436
|
+
A.warn(`Failed to create audio worker: ${V(d)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
5430
5437
|
return;
|
|
5431
5438
|
}
|
|
5432
5439
|
const r = this.audioWorker;
|
|
5433
5440
|
r.addEventListener("message", (d) => this.onAudioWorkerMessage(d.data)), r.addEventListener("error", (d) => {
|
|
5434
|
-
const
|
|
5435
|
-
A.error(`Audio worker failed: ${
|
|
5441
|
+
const h = [d.message, d.filename, d.lineno, d.colno].filter((f) => f != null && String(f).length > 0);
|
|
5442
|
+
A.error(`Audio worker failed: ${h.join(" ")}`.trim());
|
|
5436
5443
|
});
|
|
5437
5444
|
const s = (this.config.threading?.preferSharedArrayBuffer ?? !0) && !!this.audioWorkletNode && ae(), i = this.config.threading?.preferWebCodecs ?? !0, o = {
|
|
5438
5445
|
type: "configure",
|
|
5439
5446
|
transport: s ? "sab" : "pcm",
|
|
5440
5447
|
outputSampleRate: this.outputSampleRateHz,
|
|
5441
|
-
outputChannels:
|
|
5448
|
+
outputChannels: D,
|
|
5442
5449
|
preferWebCodecs: i
|
|
5443
5450
|
};
|
|
5444
5451
|
r.postMessage(o), r.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
|
|
5445
|
-
const a = this.audioWorkletNode ? "AudioWorklet" : "ScriptProcessor", c = s ? "SharedArrayBuffer" : "MessagePort",
|
|
5446
|
-
A.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${
|
|
5452
|
+
const a = this.audioWorkletNode ? "AudioWorklet" : "ScriptProcessor", c = s ? "SharedArrayBuffer" : "MessagePort", p = i && typeof AudioDecoder < "u" ? "WebCodecs" : "WASM Opus";
|
|
5453
|
+
A.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${p}, output=${this.outputSampleRateHz}Hz/${D}ch`);
|
|
5447
5454
|
}
|
|
5448
5455
|
onAudioWorkerMessage(e) {
|
|
5449
5456
|
if (e.type === "streamBegin") {
|
|
@@ -5598,7 +5605,7 @@ function Vc(t) {
|
|
|
5598
5605
|
}
|
|
5599
5606
|
);
|
|
5600
5607
|
}
|
|
5601
|
-
const
|
|
5608
|
+
const H = L("IkonVideoPlayback");
|
|
5602
5609
|
function Se(t) {
|
|
5603
5610
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
5604
5611
|
}
|
|
@@ -5677,19 +5684,19 @@ class Hc {
|
|
|
5677
5684
|
if (!this.enabled || this.worker || !this.hasDemand())
|
|
5678
5685
|
return;
|
|
5679
5686
|
if (typeof Worker > "u") {
|
|
5680
|
-
|
|
5687
|
+
H.warn("Video decode worker unavailable (Workers not supported)");
|
|
5681
5688
|
return;
|
|
5682
5689
|
}
|
|
5683
5690
|
let e;
|
|
5684
5691
|
try {
|
|
5685
5692
|
e = new Vc();
|
|
5686
5693
|
} catch (r) {
|
|
5687
|
-
|
|
5694
|
+
H.warn(`Failed to create video worker: ${Se(r)}`);
|
|
5688
5695
|
return;
|
|
5689
5696
|
}
|
|
5690
5697
|
this.worker = e, e.addEventListener("message", (r) => this.onWorkerMessage(r.data)), e.addEventListener("error", (r) => {
|
|
5691
5698
|
const n = [r.message, r.filename, r.lineno, r.colno].filter((s) => s != null && String(s).length > 0);
|
|
5692
|
-
|
|
5699
|
+
H.error(`Video worker failed: ${n.join(" ")}`.trim());
|
|
5693
5700
|
}), e.postMessage({ type: "configure" }), e.postMessage({ type: "setEnabled", enabled: this.enabled }), this.syncAllStreamsToWorker();
|
|
5694
5701
|
}
|
|
5695
5702
|
onWorkerMessage(e) {
|
|
@@ -5718,7 +5725,7 @@ class Hc {
|
|
|
5718
5725
|
this.requestIdrForStream(e.streamId);
|
|
5719
5726
|
return;
|
|
5720
5727
|
}
|
|
5721
|
-
e.type === "error" &&
|
|
5728
|
+
e.type === "error" && H.warn(`Video worker error: ${e.error.message}`);
|
|
5722
5729
|
}
|
|
5723
5730
|
}
|
|
5724
5731
|
syncAllStreamsToWorker() {
|
|
@@ -5735,7 +5742,7 @@ class Hc {
|
|
|
5735
5742
|
const n = r.canvas.transferControlToOffscreen();
|
|
5736
5743
|
this.worker.postMessage({ type: "attachSurface", streamId: e, canvas: n }, [n]), r.attachedToWorker = !0;
|
|
5737
5744
|
} catch (n) {
|
|
5738
|
-
|
|
5745
|
+
H.warn(`Failed to attach offscreen canvas for stream ${e}: ${Se(n)}`), r.mode = "bitmap";
|
|
5739
5746
|
try {
|
|
5740
5747
|
this.worker.postMessage({ type: "watchStream", streamId: e }), r.attachedToWorker = !0;
|
|
5741
5748
|
} catch {
|
|
@@ -5778,13 +5785,13 @@ class Hc {
|
|
|
5778
5785
|
ensureProtocolPort() {
|
|
5779
5786
|
if (!this.worker || this.protocolPort)
|
|
5780
5787
|
return;
|
|
5781
|
-
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask:
|
|
5788
|
+
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: T.GROUP_VIDEO });
|
|
5782
5789
|
if (e) {
|
|
5783
5790
|
this.protocolPort = e;
|
|
5784
5791
|
try {
|
|
5785
5792
|
this.worker.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
|
|
5786
5793
|
} catch (r) {
|
|
5787
|
-
|
|
5794
|
+
H.warn(`Failed to attach video protocol port: ${Se(r)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
5788
5795
|
}
|
|
5789
5796
|
}
|
|
5790
5797
|
}
|
|
@@ -5820,7 +5827,7 @@ class $c {
|
|
|
5820
5827
|
audio;
|
|
5821
5828
|
video;
|
|
5822
5829
|
constructor(e, r) {
|
|
5823
|
-
this.audio = new je(e, r?.audio), this.video = new Hc(e, r?.video);
|
|
5830
|
+
this.audio = new je(e, r?.audio), this.video = new Hc(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
|
|
5824
5831
|
}
|
|
5825
5832
|
/**
|
|
5826
5833
|
* Releases media resources (workers, audio graph, decoders).
|
|
@@ -5887,14 +5894,14 @@ class Kc {
|
|
|
5887
5894
|
}
|
|
5888
5895
|
function jc(t) {
|
|
5889
5896
|
return new Worker(
|
|
5890
|
-
"" + new URL("assets/audio-capture-worker-
|
|
5897
|
+
"" + new URL("assets/audio-capture-worker-Bnqb8-xb.js", import.meta.url).href,
|
|
5891
5898
|
{
|
|
5892
5899
|
type: "module",
|
|
5893
5900
|
name: t?.name
|
|
5894
5901
|
}
|
|
5895
5902
|
);
|
|
5896
5903
|
}
|
|
5897
|
-
const Yc =
|
|
5904
|
+
const Yc = L("IkonAudioCapture");
|
|
5898
5905
|
function zc() {
|
|
5899
5906
|
const t = globalThis.crypto;
|
|
5900
5907
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
@@ -6029,8 +6036,8 @@ registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
|
|
|
6029
6036
|
`;
|
|
6030
6037
|
}
|
|
6031
6038
|
class Jc {
|
|
6032
|
-
constructor(e) {
|
|
6033
|
-
this.client = e;
|
|
6039
|
+
constructor(e, r) {
|
|
6040
|
+
this.client = e, this.config = r ?? {};
|
|
6034
6041
|
}
|
|
6035
6042
|
worker = null;
|
|
6036
6043
|
sendPort = null;
|
|
@@ -6040,6 +6047,7 @@ class Jc {
|
|
|
6040
6047
|
audioContext = null;
|
|
6041
6048
|
nextTrackId = 1;
|
|
6042
6049
|
captures = /* @__PURE__ */ new Map();
|
|
6050
|
+
config;
|
|
6043
6051
|
allocateTrackId() {
|
|
6044
6052
|
const e = this.nextTrackId;
|
|
6045
6053
|
return this.nextTrackId += 1, e;
|
|
@@ -6061,7 +6069,7 @@ class Jc {
|
|
|
6061
6069
|
throw new Error("Cannot start audio capture before client is connected");
|
|
6062
6070
|
const r = this.ensureWorker();
|
|
6063
6071
|
if (!this.sendPort) {
|
|
6064
|
-
const n = this.client.createProtocolSendPort({ opcodeGroupsMask:
|
|
6072
|
+
const n = this.client.createProtocolSendPort({ opcodeGroupsMask: T.GROUP_AUDIO });
|
|
6065
6073
|
if (!n)
|
|
6066
6074
|
throw new Error("Failed to create protocol send port for audio capture");
|
|
6067
6075
|
this.sendPort = n, r.postMessage({ type: "attachSendPort", port: n.port }, [n.port]);
|
|
@@ -6104,15 +6112,15 @@ class Jc {
|
|
|
6104
6112
|
this.ensureSendPort();
|
|
6105
6113
|
const n = await this.ensureAudioContext(), s = await this.acquireMicrophoneStream(e), i = s.getAudioTracks()[0];
|
|
6106
6114
|
if (!i)
|
|
6107
|
-
throw s.getTracks().forEach((
|
|
6115
|
+
throw s.getTracks().forEach((m) => m.stop()), new Error("No audio track available");
|
|
6108
6116
|
await this.ensureWorklet(n);
|
|
6109
6117
|
const o = zc(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), l = n.createGain();
|
|
6110
6118
|
l.gain.value = 0, l.connect(n.destination);
|
|
6111
|
-
const
|
|
6112
|
-
let
|
|
6113
|
-
if (
|
|
6114
|
-
const
|
|
6115
|
-
|
|
6119
|
+
const h = ae() ? "sab" : "pcm";
|
|
6120
|
+
let f;
|
|
6121
|
+
if (h === "sab") {
|
|
6122
|
+
const m = Math.floor(n.sampleRate * 2);
|
|
6123
|
+
f = Kc.getStorageForCapacity(m, Float32Array);
|
|
6116
6124
|
}
|
|
6117
6125
|
const E = this.ensureWorker();
|
|
6118
6126
|
E.postMessage({
|
|
@@ -6122,52 +6130,69 @@ class Jc {
|
|
|
6122
6130
|
trackId: a,
|
|
6123
6131
|
sampleRate: n.sampleRate,
|
|
6124
6132
|
channels: 1,
|
|
6125
|
-
options:
|
|
6126
|
-
|
|
6127
|
-
|
|
6133
|
+
options: {
|
|
6134
|
+
...e.options,
|
|
6135
|
+
preferWebCodecs: this.config.threading?.preferWebCodecs
|
|
6136
|
+
},
|
|
6137
|
+
transport: h,
|
|
6138
|
+
sharedArrayBuffer: f
|
|
6139
|
+
}), await new Promise((m, u) => {
|
|
6140
|
+
const y = setTimeout(() => {
|
|
6141
|
+
E.removeEventListener("message", g), u(new Error("Audio capture worker start timeout"));
|
|
6142
|
+
}, 1e4), g = (P) => {
|
|
6143
|
+
const O = P.data;
|
|
6144
|
+
if (O?.type === "started" && O.captureId === o)
|
|
6145
|
+
clearTimeout(y), E.removeEventListener("message", g), m();
|
|
6146
|
+
else if (O?.type === "error" && O.captureId === o) {
|
|
6147
|
+
clearTimeout(y), E.removeEventListener("message", g);
|
|
6148
|
+
const W = O.error;
|
|
6149
|
+
u(new Error(W?.message ?? "Audio capture failed to start"));
|
|
6150
|
+
}
|
|
6151
|
+
};
|
|
6152
|
+
E.addEventListener("message", g);
|
|
6128
6153
|
});
|
|
6129
|
-
const
|
|
6154
|
+
const _ = new AudioWorkletNode(n, "ikon-audio-capture", {
|
|
6130
6155
|
numberOfInputs: 1,
|
|
6131
6156
|
numberOfOutputs: 1,
|
|
6132
6157
|
outputChannelCount: [1],
|
|
6133
6158
|
processorOptions: {
|
|
6134
|
-
transport:
|
|
6159
|
+
transport: h,
|
|
6135
6160
|
channels: 1,
|
|
6136
|
-
sharedArrayBuffer:
|
|
6161
|
+
sharedArrayBuffer: f
|
|
6137
6162
|
}
|
|
6138
6163
|
});
|
|
6139
|
-
c.connect(
|
|
6140
|
-
const u =
|
|
6164
|
+
c.connect(_), _.connect(l), h === "pcm" && (_.port.onmessage = (m) => {
|
|
6165
|
+
const u = m.data;
|
|
6141
6166
|
if (!(!u || typeof u != "object") && u.type === "pcm" && u.pcm instanceof Float32Array) {
|
|
6142
|
-
const
|
|
6143
|
-
E.postMessage({ type: "pcm", captureId: o, pcm:
|
|
6167
|
+
const y = u.pcm;
|
|
6168
|
+
E.postMessage({ type: "pcm", captureId: o, pcm: y }, [y.buffer]);
|
|
6144
6169
|
}
|
|
6145
6170
|
});
|
|
6146
|
-
const
|
|
6171
|
+
const N = {
|
|
6147
6172
|
captureId: o,
|
|
6148
6173
|
trackId: a,
|
|
6149
6174
|
stream: s,
|
|
6150
6175
|
track: i,
|
|
6151
6176
|
ctx: n,
|
|
6152
6177
|
source: c,
|
|
6153
|
-
worklet:
|
|
6178
|
+
worklet: _,
|
|
6154
6179
|
gain: l,
|
|
6155
6180
|
stopped: !1,
|
|
6156
6181
|
startSegment: () => {
|
|
6157
|
-
|
|
6182
|
+
N.stopped || E.postMessage({ type: "startSegment", captureId: o });
|
|
6158
6183
|
},
|
|
6159
6184
|
endSegment: () => {
|
|
6160
|
-
|
|
6185
|
+
N.stopped || E.postMessage({ type: "endSegment", captureId: o });
|
|
6161
6186
|
},
|
|
6162
6187
|
stop: async () => {
|
|
6163
|
-
if (!
|
|
6164
|
-
|
|
6188
|
+
if (!N.stopped) {
|
|
6189
|
+
N.stopped = !0, this.captures.delete(o);
|
|
6165
6190
|
try {
|
|
6166
6191
|
c.disconnect();
|
|
6167
6192
|
} catch {
|
|
6168
6193
|
}
|
|
6169
6194
|
try {
|
|
6170
|
-
|
|
6195
|
+
_.disconnect();
|
|
6171
6196
|
} catch {
|
|
6172
6197
|
}
|
|
6173
6198
|
try {
|
|
@@ -6175,7 +6200,7 @@ class Jc {
|
|
|
6175
6200
|
} catch {
|
|
6176
6201
|
}
|
|
6177
6202
|
try {
|
|
6178
|
-
s.getTracks().forEach((
|
|
6203
|
+
s.getTracks().forEach((m) => m.stop());
|
|
6179
6204
|
} catch {
|
|
6180
6205
|
}
|
|
6181
6206
|
E.postMessage({ type: "stop", captureId: o });
|
|
@@ -6183,8 +6208,8 @@ class Jc {
|
|
|
6183
6208
|
}
|
|
6184
6209
|
};
|
|
6185
6210
|
return i.addEventListener("ended", () => {
|
|
6186
|
-
|
|
6187
|
-
}), this.captures.set(o,
|
|
6211
|
+
N.stop();
|
|
6212
|
+
}), this.captures.set(o, N), { captureId: o, startSegment: N.startSegment, endSegment: N.endSegment, stop: N.stop };
|
|
6188
6213
|
}
|
|
6189
6214
|
async stop(e) {
|
|
6190
6215
|
const r = this.captures.get(e);
|
|
@@ -6263,9 +6288,9 @@ class qc {
|
|
|
6263
6288
|
} catch {
|
|
6264
6289
|
}
|
|
6265
6290
|
try {
|
|
6266
|
-
await new Promise((
|
|
6267
|
-
const
|
|
6268
|
-
s.addEventListener("loadedmetadata",
|
|
6291
|
+
await new Promise((f, E) => {
|
|
6292
|
+
const _ = () => f(), N = () => E(new Error("Failed to load video element"));
|
|
6293
|
+
s.addEventListener("loadedmetadata", _, { once: !0 }), s.addEventListener("error", N, { once: !0 });
|
|
6269
6294
|
});
|
|
6270
6295
|
try {
|
|
6271
6296
|
await s.play();
|
|
@@ -6276,19 +6301,19 @@ class qc {
|
|
|
6276
6301
|
if (typeof OffscreenCanvas < "u")
|
|
6277
6302
|
l = new OffscreenCanvas(a, c);
|
|
6278
6303
|
else {
|
|
6279
|
-
const
|
|
6280
|
-
|
|
6304
|
+
const f = document.createElement("canvas");
|
|
6305
|
+
f.width = a, f.height = c, l = f;
|
|
6281
6306
|
}
|
|
6282
|
-
const
|
|
6283
|
-
if (!
|
|
6307
|
+
const p = l.getContext("2d", { alpha: !1 });
|
|
6308
|
+
if (!p)
|
|
6284
6309
|
throw new Error("2D canvas context unavailable");
|
|
6285
|
-
|
|
6286
|
-
const d = await Qc(l, e),
|
|
6310
|
+
p.drawImage(s, 0, 0, a, c);
|
|
6311
|
+
const d = await Qc(l, e), h = await d.arrayBuffer();
|
|
6287
6312
|
return {
|
|
6288
6313
|
mime: d.type || e.mime || "image/jpeg",
|
|
6289
6314
|
width: a,
|
|
6290
6315
|
height: c,
|
|
6291
|
-
data: new Uint8Array(
|
|
6316
|
+
data: new Uint8Array(h)
|
|
6292
6317
|
};
|
|
6293
6318
|
} finally {
|
|
6294
6319
|
try {
|
|
@@ -6319,7 +6344,7 @@ function Zc(t) {
|
|
|
6319
6344
|
}
|
|
6320
6345
|
);
|
|
6321
6346
|
}
|
|
6322
|
-
const at =
|
|
6347
|
+
const at = L("IkonVideoCapture");
|
|
6323
6348
|
function el() {
|
|
6324
6349
|
const t = globalThis.crypto;
|
|
6325
6350
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
@@ -6360,13 +6385,13 @@ class rl {
|
|
|
6360
6385
|
throw new Error("Cannot start video capture before client is connected");
|
|
6361
6386
|
const r = this.ensureWorker();
|
|
6362
6387
|
if (!this.sendPort) {
|
|
6363
|
-
const n = this.client.createProtocolSendPort({ opcodeGroupsMask:
|
|
6388
|
+
const n = this.client.createProtocolSendPort({ opcodeGroupsMask: T.GROUP_VIDEO });
|
|
6364
6389
|
if (!n)
|
|
6365
6390
|
throw new Error("Failed to create protocol send port for video capture");
|
|
6366
6391
|
this.sendPort = n, r.postMessage({ type: "attachSendPort", port: n.port }, [n.port]);
|
|
6367
6392
|
}
|
|
6368
6393
|
if (!this.protocolPort) {
|
|
6369
|
-
const n = this.client.createProtocolMessagePort({ opcodeGroupsMask:
|
|
6394
|
+
const n = this.client.createProtocolMessagePort({ opcodeGroupsMask: T.GROUP_VIDEO });
|
|
6370
6395
|
n && (this.protocolPort = n, r.postMessage({ type: "attachProtocolPort", port: n.port }, [n.port]));
|
|
6371
6396
|
}
|
|
6372
6397
|
}
|
|
@@ -6383,21 +6408,21 @@ class rl {
|
|
|
6383
6408
|
this.ensurePorts();
|
|
6384
6409
|
const n = el(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
|
|
6385
6410
|
if (!i)
|
|
6386
|
-
throw s.getTracks().forEach((
|
|
6387
|
-
const o = i.getSettings(), a = o.width ?? e.options?.width ?? 1280, c = o.height ?? e.options?.height ?? 720, l = tl(), d = new l({ track: i }).readable.getReader(),
|
|
6388
|
-
|
|
6411
|
+
throw s.getTracks().forEach((_) => _.stop()), new Error("No video track available");
|
|
6412
|
+
const o = i.getSettings(), a = o.width ?? e.options?.width ?? 1280, c = o.height ?? e.options?.height ?? 720, l = tl(), d = new l({ track: i }).readable.getReader(), h = this.allocateTrackId(), f = this.ensureWorker();
|
|
6413
|
+
f.postMessage({
|
|
6389
6414
|
type: "start",
|
|
6390
6415
|
captureId: n,
|
|
6391
6416
|
kind: e.source,
|
|
6392
6417
|
senderId: r,
|
|
6393
|
-
trackId:
|
|
6418
|
+
trackId: h,
|
|
6394
6419
|
width: a,
|
|
6395
6420
|
height: c,
|
|
6396
6421
|
options: e.options
|
|
6397
6422
|
});
|
|
6398
6423
|
const E = {
|
|
6399
6424
|
captureId: n,
|
|
6400
|
-
trackId:
|
|
6425
|
+
trackId: h,
|
|
6401
6426
|
stream: s,
|
|
6402
6427
|
track: i,
|
|
6403
6428
|
reader: d,
|
|
@@ -6410,10 +6435,10 @@ class rl {
|
|
|
6410
6435
|
} catch {
|
|
6411
6436
|
}
|
|
6412
6437
|
try {
|
|
6413
|
-
s.getTracks().forEach((
|
|
6438
|
+
s.getTracks().forEach((_) => _.stop());
|
|
6414
6439
|
} catch {
|
|
6415
6440
|
}
|
|
6416
|
-
|
|
6441
|
+
f.postMessage({ type: "stop", captureId: n });
|
|
6417
6442
|
}
|
|
6418
6443
|
}
|
|
6419
6444
|
};
|
|
@@ -6469,18 +6494,18 @@ class nl {
|
|
|
6469
6494
|
audio;
|
|
6470
6495
|
video;
|
|
6471
6496
|
image;
|
|
6472
|
-
constructor(e) {
|
|
6473
|
-
this.audio = new Jc(e), this.video = new rl(e), this.image = new qc();
|
|
6497
|
+
constructor(e, r) {
|
|
6498
|
+
this.audio = new Jc(e, r?.audio), this.video = new rl(e), this.image = new qc();
|
|
6474
6499
|
}
|
|
6475
6500
|
dispose() {
|
|
6476
6501
|
this.audio.dispose(), this.video.dispose();
|
|
6477
6502
|
}
|
|
6478
6503
|
}
|
|
6479
6504
|
const ct = {
|
|
6480
|
-
[
|
|
6481
|
-
[
|
|
6482
|
-
[
|
|
6483
|
-
[
|
|
6505
|
+
[R.WebTransport]: 0,
|
|
6506
|
+
[R.WebSocket]: 1,
|
|
6507
|
+
[R.WebTransportProxy]: 2,
|
|
6508
|
+
[R.WebSocketProxy]: 3
|
|
6484
6509
|
}, we = "ikon_endpoint_type";
|
|
6485
6510
|
class sl {
|
|
6486
6511
|
isLocal;
|
|
@@ -6537,13 +6562,13 @@ class sl {
|
|
|
6537
6562
|
const e = localStorage.getItem(we);
|
|
6538
6563
|
if (e !== null) {
|
|
6539
6564
|
const r = Number(e);
|
|
6540
|
-
|
|
6565
|
+
R[r] !== void 0 && (this.workingEndpointType = r);
|
|
6541
6566
|
}
|
|
6542
6567
|
} catch {
|
|
6543
6568
|
}
|
|
6544
6569
|
}
|
|
6545
6570
|
}
|
|
6546
|
-
const
|
|
6571
|
+
const S = L("IkonClient");
|
|
6547
6572
|
class yl {
|
|
6548
6573
|
channelManager = null;
|
|
6549
6574
|
protocolWorker = null;
|
|
@@ -6608,16 +6633,21 @@ class yl {
|
|
|
6608
6633
|
throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
|
|
6609
6634
|
if (this.endpointSelector = new sl({
|
|
6610
6635
|
local: e.local
|
|
6611
|
-
}), this._functionRegistry = new wc(), rt() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Ic(this._functionRegistry)), e.
|
|
6612
|
-
const n = e.
|
|
6613
|
-
threading: e.
|
|
6614
|
-
background: e.
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6636
|
+
}), this._functionRegistry = new wc(), rt() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Ic(this._functionRegistry)), e.audio || e.video) {
|
|
6637
|
+
const n = e.audio ? {
|
|
6638
|
+
threading: e.audio.threading,
|
|
6639
|
+
background: e.audio.background,
|
|
6640
|
+
diagnostics: e.audio.diagnostics
|
|
6641
|
+
} : void 0, s = e.video ? { threading: e.video.threading } : void 0;
|
|
6642
|
+
this._media = new $c(this, { audio: n, video: s, mediaSession: e.mediaSession }), e.audio?.enabled && this._media.audio.setEnabled(!0), e.video?.enabled && this._media.video.setEnabled(!0);
|
|
6643
|
+
}
|
|
6644
|
+
rt() && (this._mediaCapture = new nl(this, {
|
|
6645
|
+
audio: {
|
|
6646
|
+
threading: {
|
|
6647
|
+
preferWebCodecs: e.audio?.threading?.preferWebCodecs
|
|
6648
|
+
}
|
|
6649
|
+
}
|
|
6650
|
+
}), this.unregisterMediaCaptureFunctions = bc(this._functionRegistry, this));
|
|
6621
6651
|
}
|
|
6622
6652
|
_lastError = void 0;
|
|
6623
6653
|
/**
|
|
@@ -6661,30 +6691,30 @@ class yl {
|
|
|
6661
6691
|
async connect() {
|
|
6662
6692
|
if (this.currentState !== "idle")
|
|
6663
6693
|
throw new Error(`Cannot connect: already in state ${this.currentState}`);
|
|
6664
|
-
this._lastError = void 0, this.abortController = new AbortController(),
|
|
6694
|
+
this._lastError = void 0, this.abortController = new AbortController(), S.info("Connecting to Ikon server"), this.setState("connecting"), this.setupLifecycleHandlers(), this.slowConnectionTimer = setTimeout(() => {
|
|
6665
6695
|
this.currentState === "connecting" && this.setState("connectingSlow");
|
|
6666
6696
|
}, this.slowConnectionThresholdMs), this.connectionTimer = setTimeout(() => {
|
|
6667
|
-
(this.currentState === "connecting" || this.currentState === "connectingSlow") && (
|
|
6697
|
+
(this.currentState === "connecting" || this.currentState === "connectingSlow") && (S.error("Connection timeout"), this.abortController?.abort(), this.setState("offline"), this.config.onError?.(new Error("Connection timeout")));
|
|
6668
6698
|
}, this.connectionTimeoutMs);
|
|
6669
6699
|
try {
|
|
6670
6700
|
const e = await this.authenticate();
|
|
6671
|
-
this.authResponse = e.authResponse, this._sessionId = e.authResponse.ClientContext.SessionId,
|
|
6701
|
+
this.authResponse = e.authResponse, this._sessionId = e.authResponse.ClientContext.SessionId, S.info("Connected to Ikon server"), await this.connectProtocol(this.authResponse.Entrypoints);
|
|
6672
6702
|
} catch (e) {
|
|
6673
6703
|
if (e instanceof DOMException && e.name === "AbortError")
|
|
6674
6704
|
return;
|
|
6675
|
-
throw
|
|
6705
|
+
throw S.error("Connection failed:", e), this.clearTimers(), this.setState("offline"), this.config.onError?.(e instanceof Error ? e : new Error(String(e))), e;
|
|
6676
6706
|
}
|
|
6677
6707
|
}
|
|
6678
6708
|
/**
|
|
6679
6709
|
* Disconnect from the server.
|
|
6680
6710
|
*/
|
|
6681
6711
|
disconnect() {
|
|
6682
|
-
|
|
6712
|
+
S.info("Disconnecting from Ikon server"), this.clearTimers(), this.cleanupLifecycleHandlers(), this._mediaCapture?.dispose(), this.unregisterMediaCaptureFunctions && (this.unregisterMediaCaptureFunctions(), this.unregisterMediaCaptureFunctions = null), this.unregisterBrowserFunctions && (this.unregisterBrowserFunctions(), this.unregisterBrowserFunctions = null), this.abortController?.abort(), this.abortController = null, this.disconnectProtocol(), this.authResponse = null, this._sessionId = void 0, this._globalState = null, this._globalStateReceived = !1, this._channelsConnected = !1, this._joinedHandled = !1, this._functionRegistry.detach(), this.setState("idle");
|
|
6683
6713
|
}
|
|
6684
6714
|
sendActionCall(e, r) {
|
|
6685
6715
|
const n = Kr(
|
|
6686
6716
|
{
|
|
6687
|
-
ActionId:
|
|
6717
|
+
ActionId: I.fromString(e),
|
|
6688
6718
|
PayloadJson: r ?? "{}"
|
|
6689
6719
|
},
|
|
6690
6720
|
this._sessionId ?? 0
|
|
@@ -6705,7 +6735,7 @@ class yl {
|
|
|
6705
6735
|
this.channelManager.sendProtocolMessage(e);
|
|
6706
6736
|
return;
|
|
6707
6737
|
}
|
|
6708
|
-
|
|
6738
|
+
S.warn("Cannot send: not connected");
|
|
6709
6739
|
}
|
|
6710
6740
|
/**
|
|
6711
6741
|
* Create a MessagePort that receives raw protocol message buffers.
|
|
@@ -6743,7 +6773,7 @@ class yl {
|
|
|
6743
6773
|
s.start?.();
|
|
6744
6774
|
const i = this.subscribeToProtocolMessages(
|
|
6745
6775
|
(o) => {
|
|
6746
|
-
const a =
|
|
6776
|
+
const a = re(o), c = o.slice().buffer;
|
|
6747
6777
|
s.postMessage({ type: "protocol", message: c, headers: a }, [c]);
|
|
6748
6778
|
},
|
|
6749
6779
|
{ opcodeGroupsMask: e.opcodeGroupsMask }
|
|
@@ -6802,7 +6832,7 @@ class yl {
|
|
|
6802
6832
|
return;
|
|
6803
6833
|
this.channelManager?.sendProtocolMessage(c);
|
|
6804
6834
|
} catch (c) {
|
|
6805
|
-
|
|
6835
|
+
S.warn(`Failed to forward protocol send port message: ${c}`);
|
|
6806
6836
|
}
|
|
6807
6837
|
};
|
|
6808
6838
|
try {
|
|
@@ -6874,11 +6904,11 @@ class yl {
|
|
|
6874
6904
|
this.notifyMessageSubscribers(e, r, n);
|
|
6875
6905
|
return;
|
|
6876
6906
|
}
|
|
6877
|
-
if (r ===
|
|
6907
|
+
if (r === T.CORE_GLOBAL_STATE)
|
|
6878
6908
|
try {
|
|
6879
6909
|
this._globalState = po(e), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
|
|
6880
6910
|
} catch (s) {
|
|
6881
|
-
|
|
6911
|
+
S.error("Failed to parse GlobalState:", s);
|
|
6882
6912
|
}
|
|
6883
6913
|
this.notifyMessageSubscribers(e, r, n);
|
|
6884
6914
|
}
|
|
@@ -6903,7 +6933,7 @@ class yl {
|
|
|
6903
6933
|
}
|
|
6904
6934
|
s[a](e);
|
|
6905
6935
|
} catch (l) {
|
|
6906
|
-
|
|
6936
|
+
S.error("Message subscriber error:", l);
|
|
6907
6937
|
}
|
|
6908
6938
|
}
|
|
6909
6939
|
}
|
|
@@ -6920,7 +6950,7 @@ class yl {
|
|
|
6920
6950
|
this.currentState === "connected" && this.setState("reconnecting");
|
|
6921
6951
|
break;
|
|
6922
6952
|
case "stopped":
|
|
6923
|
-
|
|
6953
|
+
S.info("Ikon server has stopped"), this.clearTimers(), this.setState("offline");
|
|
6924
6954
|
break;
|
|
6925
6955
|
case "offline":
|
|
6926
6956
|
this.currentState !== "idle" && (this.clearTimers(), this.setState("offline"));
|
|
@@ -6945,7 +6975,7 @@ class yl {
|
|
|
6945
6975
|
try {
|
|
6946
6976
|
r(e);
|
|
6947
6977
|
} catch (n) {
|
|
6948
|
-
|
|
6978
|
+
S.error("State subscriber error:", n);
|
|
6949
6979
|
}
|
|
6950
6980
|
this.config.onConnectionStateChange?.(e);
|
|
6951
6981
|
}
|
|
@@ -6955,59 +6985,59 @@ class yl {
|
|
|
6955
6985
|
* Use this for unrecoverable SDK internal errors.
|
|
6956
6986
|
*/
|
|
6957
6987
|
setErrorState(e) {
|
|
6958
|
-
|
|
6988
|
+
S.error("SDK error, going offline:", e), this._lastError = e, this.clearTimers(), this.cleanupLifecycleHandlers(), this.disconnectProtocol(), this.currentState = "offlineError", this.config.onConnectionStateChange?.("offlineError"), this.config.onError?.(e);
|
|
6959
6989
|
}
|
|
6960
6990
|
async connectProtocol(e) {
|
|
6961
|
-
if (
|
|
6991
|
+
if (typeof Worker > "u") {
|
|
6962
6992
|
await this.connectProtocolOnMainThread(e);
|
|
6963
6993
|
return;
|
|
6964
6994
|
}
|
|
6965
|
-
let
|
|
6995
|
+
let r;
|
|
6966
6996
|
try {
|
|
6967
|
-
|
|
6968
|
-
} catch (
|
|
6969
|
-
|
|
6997
|
+
r = new ra();
|
|
6998
|
+
} catch (c) {
|
|
6999
|
+
S.warn(`Failed to create protocol worker, falling back to main thread: ${c}`), await this.connectProtocolOnMainThread(e);
|
|
6970
7000
|
return;
|
|
6971
7001
|
}
|
|
6972
|
-
this.channelManager = null, this.protocolWorker =
|
|
6973
|
-
const
|
|
6974
|
-
const
|
|
6975
|
-
const
|
|
6976
|
-
if (
|
|
6977
|
-
const
|
|
6978
|
-
this.handleProtocolMessage(
|
|
7002
|
+
this.channelManager = null, this.protocolWorker = r, this.workerManagerState = "idle";
|
|
7003
|
+
const n = new Promise((c, l) => {
|
|
7004
|
+
const p = (d) => {
|
|
7005
|
+
const h = d.data;
|
|
7006
|
+
if (h?.type === "protocol" && h.message instanceof ArrayBuffer) {
|
|
7007
|
+
const f = new Uint8Array(h.message);
|
|
7008
|
+
this.handleProtocolMessage(f);
|
|
6979
7009
|
return;
|
|
6980
7010
|
}
|
|
6981
|
-
if (
|
|
6982
|
-
const
|
|
6983
|
-
this.workerManagerState =
|
|
6984
|
-
const
|
|
6985
|
-
|
|
7011
|
+
if (h?.type === "state") {
|
|
7012
|
+
const f = h.state;
|
|
7013
|
+
this.workerManagerState = f;
|
|
7014
|
+
const E = h.activeType;
|
|
7015
|
+
E !== void 0 && this.endpointSelector.rememberWorkingType(E), this.handleChannelManagerStateChange(f), f === "connected" && c();
|
|
6986
7016
|
return;
|
|
6987
7017
|
}
|
|
6988
|
-
if (
|
|
6989
|
-
const
|
|
6990
|
-
|
|
7018
|
+
if (h?.type === "error") {
|
|
7019
|
+
const f = h.error, E = new Error(String(f?.message ?? "Worker error"));
|
|
7020
|
+
E.name = String(f?.name ?? "Error"), l(E);
|
|
6991
7021
|
}
|
|
6992
7022
|
};
|
|
6993
|
-
|
|
6994
|
-
const
|
|
6995
|
-
|
|
7023
|
+
r.addEventListener("message", p), r.addEventListener("error", (d) => {
|
|
7024
|
+
const h = [d.message, d.filename, d.lineno, d.colno].filter((f) => f != null && String(f).length > 0);
|
|
7025
|
+
l(new Error(`Protocol worker failed: ${h.join(" ")}`.trim()));
|
|
6996
7026
|
});
|
|
6997
|
-
}),
|
|
6998
|
-
this.updateWorkerInterestMask(), this.config.debug?.devtools &&
|
|
7027
|
+
}), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ?? Qe, o = this.config.timeouts?.reconnectBackoffMs ?? qe, a = this.config.timeouts?.maxReconnectAttempts ?? Ze;
|
|
7028
|
+
this.updateWorkerInterestMask(), this.config.debug?.devtools && r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({
|
|
6999
7029
|
type: "connect",
|
|
7000
7030
|
sessionId: this._sessionId,
|
|
7001
7031
|
entrypoints: e,
|
|
7002
|
-
orderedEndpointTypes:
|
|
7003
|
-
keepaliveTimeoutMs:
|
|
7004
|
-
reconnectBackoffMs:
|
|
7005
|
-
maxReconnectAttempts:
|
|
7032
|
+
orderedEndpointTypes: s,
|
|
7033
|
+
keepaliveTimeoutMs: i,
|
|
7034
|
+
reconnectBackoffMs: o,
|
|
7035
|
+
maxReconnectAttempts: a
|
|
7006
7036
|
});
|
|
7007
7037
|
try {
|
|
7008
|
-
await
|
|
7009
|
-
} catch (
|
|
7010
|
-
|
|
7038
|
+
await n;
|
|
7039
|
+
} catch (c) {
|
|
7040
|
+
S.warn(`Protocol worker connect failed, falling back to main thread: ${c}`), this.disconnectProtocol(), await this.connectProtocolOnMainThread(e);
|
|
7011
7041
|
}
|
|
7012
7042
|
}
|
|
7013
7043
|
async connectProtocolOnMainThread(e) {
|
|
@@ -7053,7 +7083,7 @@ class yl {
|
|
|
7053
7083
|
this.protocolWorker.postMessage({ type: "setInterest", opcodeGroupsMask: void 0 });
|
|
7054
7084
|
return;
|
|
7055
7085
|
}
|
|
7056
|
-
let e =
|
|
7086
|
+
let e = T.GROUP_CORE | T.GROUP_ACTIONS;
|
|
7057
7087
|
for (const [, r] of this.messageSubscribers.entries()) {
|
|
7058
7088
|
if (!r || r.opcodeGroupsMask === void 0) {
|
|
7059
7089
|
this.protocolWorker.postMessage({ type: "setInterest", opcodeGroupsMask: void 0 });
|
|
@@ -7089,14 +7119,14 @@ class yl {
|
|
|
7089
7119
|
* Close connection cleanly to avoid orphaned connections on the server.
|
|
7090
7120
|
*/
|
|
7091
7121
|
handleBeforeUnload() {
|
|
7092
|
-
|
|
7122
|
+
S.debug("Page unloading, closing connection..."), this.disconnect();
|
|
7093
7123
|
}
|
|
7094
7124
|
/**
|
|
7095
7125
|
* Handle page hide event (mobile-friendly, bfcache compatible).
|
|
7096
7126
|
* Only disconnect if page is actually being unloaded (not persisted).
|
|
7097
7127
|
*/
|
|
7098
7128
|
handlePageHide(e) {
|
|
7099
|
-
e.persisted || (
|
|
7129
|
+
e.persisted || (S.debug("Page hidden (not persisted), closing connection..."), this.disconnect());
|
|
7100
7130
|
}
|
|
7101
7131
|
/**
|
|
7102
7132
|
* Handle visibility change event.
|
|
@@ -7112,10 +7142,10 @@ class yl {
|
|
|
7112
7142
|
*/
|
|
7113
7143
|
checkConnectionHealth() {
|
|
7114
7144
|
if (this.protocolWorker) {
|
|
7115
|
-
this.currentState === "connected" && this.workerManagerState !== "connected" && (
|
|
7145
|
+
this.currentState === "connected" && this.workerManagerState !== "connected" && (S.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
|
|
7116
7146
|
return;
|
|
7117
7147
|
}
|
|
7118
|
-
this.channelManager && this.currentState === "connected" && this.channelManager.managerState !== "connected" && (
|
|
7148
|
+
this.channelManager && this.currentState === "connected" && this.channelManager.managerState !== "connected" && (S.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
|
|
7119
7149
|
}
|
|
7120
7150
|
/**
|
|
7121
7151
|
* Try to handle joined state - only proceeds if both channels are connected and GlobalState is received.
|
|
@@ -7136,7 +7166,7 @@ class yl {
|
|
|
7136
7166
|
const e = Xe(ze(), this._sessionId ?? 0);
|
|
7137
7167
|
this.sendProtocolMessage(e);
|
|
7138
7168
|
} catch (e) {
|
|
7139
|
-
|
|
7169
|
+
S.error("onJoined callback error:", e);
|
|
7140
7170
|
const r = Xe(ze(), this._sessionId ?? 0);
|
|
7141
7171
|
this.sendProtocolMessage(r);
|
|
7142
7172
|
}
|
|
@@ -7155,52 +7185,52 @@ function Cl(t) {
|
|
|
7155
7185
|
return t === "offlineError";
|
|
7156
7186
|
}
|
|
7157
7187
|
const Rr = /* @__PURE__ */ new Map();
|
|
7158
|
-
for (const [t, e] of Object.entries(
|
|
7188
|
+
for (const [t, e] of Object.entries(T))
|
|
7159
7189
|
typeof e == "number" && Rr.set(e, t);
|
|
7160
7190
|
function bl(t) {
|
|
7161
7191
|
return Rr.get(t) ?? `UNKNOWN_${t}`;
|
|
7162
7192
|
}
|
|
7163
7193
|
const kr = 1e3, Ur = fr.INFO;
|
|
7164
|
-
let
|
|
7194
|
+
let M = [], ke = kr, Dr = Ur, Ue = null;
|
|
7165
7195
|
function il(t) {
|
|
7166
|
-
t.level < Dr || (
|
|
7196
|
+
t.level < Dr || (M.push(t), M.length > ke && (M = M.slice(-ke)));
|
|
7167
7197
|
}
|
|
7168
7198
|
function ol(t) {
|
|
7169
|
-
ke = t?.maxBufferSize ?? kr, Dr = t?.minLevel ?? Ur,
|
|
7199
|
+
ke = t?.maxBufferSize ?? kr, Dr = t?.minLevel ?? Ur, M = [], ia(il);
|
|
7170
7200
|
}
|
|
7171
7201
|
function Rl(t) {
|
|
7172
7202
|
Ue = t;
|
|
7173
7203
|
}
|
|
7174
7204
|
function kl() {
|
|
7175
|
-
return
|
|
7205
|
+
return M;
|
|
7176
7206
|
}
|
|
7177
7207
|
function al() {
|
|
7178
|
-
const t =
|
|
7179
|
-
return
|
|
7208
|
+
const t = M;
|
|
7209
|
+
return M = [], t;
|
|
7180
7210
|
}
|
|
7181
7211
|
function Ul() {
|
|
7182
|
-
if (!Ue ||
|
|
7212
|
+
if (!Ue || M.length === 0)
|
|
7183
7213
|
return 0;
|
|
7184
7214
|
const t = al();
|
|
7185
7215
|
return Ue(t), t.length;
|
|
7186
7216
|
}
|
|
7187
7217
|
function Dl() {
|
|
7188
|
-
|
|
7218
|
+
M = [];
|
|
7189
7219
|
}
|
|
7190
7220
|
function Ol() {
|
|
7191
|
-
return
|
|
7221
|
+
return M.length;
|
|
7192
7222
|
}
|
|
7193
7223
|
ol();
|
|
7194
7224
|
export {
|
|
7195
|
-
|
|
7225
|
+
w as AuthenticationError,
|
|
7196
7226
|
ha as Channel,
|
|
7197
7227
|
fa as ChannelManager,
|
|
7198
7228
|
ll as ChannelNotFoundError,
|
|
7199
|
-
|
|
7229
|
+
Y as ClientType,
|
|
7200
7230
|
xe as ConnectionError,
|
|
7201
|
-
|
|
7231
|
+
z as ContextType,
|
|
7202
7232
|
sl as EndpointSelector,
|
|
7203
|
-
|
|
7233
|
+
R as EntrypointType,
|
|
7204
7234
|
wc as FunctionRegistry,
|
|
7205
7235
|
ml as IKON_AUTH_BASE_URL,
|
|
7206
7236
|
tt as IKON_AUTH_URL_DEV,
|
|
@@ -7219,15 +7249,15 @@ export {
|
|
|
7219
7249
|
fr as LogLevel,
|
|
7220
7250
|
na as MaxRetriesExceededError,
|
|
7221
7251
|
dl as NoChannelsError,
|
|
7222
|
-
|
|
7252
|
+
T as Opcode,
|
|
7223
7253
|
sa as ProvisioningTimeoutError,
|
|
7224
7254
|
ul as SpaceNotFoundError,
|
|
7225
|
-
|
|
7226
|
-
|
|
7255
|
+
x as TransportError,
|
|
7256
|
+
J as UserType,
|
|
7227
7257
|
cl as asProtocolMessage,
|
|
7228
7258
|
El as clearDeviceId,
|
|
7229
7259
|
Dl as clearLogBuffer,
|
|
7230
|
-
|
|
7260
|
+
L as createLogger,
|
|
7231
7261
|
Sl as deriveAuthUrl,
|
|
7232
7262
|
Tl as deriveBackendType,
|
|
7233
7263
|
_l as deriveBackendUrl,
|
|
@@ -7252,7 +7282,7 @@ export {
|
|
|
7252
7282
|
wl as parseUrlParams,
|
|
7253
7283
|
ce as readOpcode,
|
|
7254
7284
|
oe as readOpcodeGroup,
|
|
7255
|
-
|
|
7285
|
+
re as readProtocolMessageHeaders,
|
|
7256
7286
|
Ic as registerBrowserFunctions,
|
|
7257
7287
|
hl as setLogLevel,
|
|
7258
7288
|
ia as setLogSink,
|