@ikonai/sdk 0.0.40 → 0.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,13 +1,13 @@
1
- function cl(t) {
1
+ function ll(t) {
2
2
  return t;
3
3
  }
4
- function ce(t) {
4
+ function le(t) {
5
5
  if (t.length < 8)
6
6
  throw new Error("Protocol message too short");
7
7
  return (t[4] | t[5] << 8 | t[6] << 16 | t[7] << 24) >>> 0;
8
8
  }
9
- function oe(t) {
10
- return ce(t) & 4294901760;
9
+ function ae(t) {
10
+ return le(t) & 4294901760;
11
11
  }
12
12
  function re(t) {
13
13
  const e = ne(t), r = new DataView(e.buffer, e.byteOffset, e.byteLength);
@@ -43,7 +43,7 @@ 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 F(t, e, r, n, s) {
46
+ function P(t, e, r, n, s) {
47
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
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;
@@ -52,10 +52,10 @@ function F(t, e, r, n, s) {
52
52
  return h.set(e, p), h;
53
53
  }
54
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
- const lt = 161, ut = 162, le = new TextEncoder(), Mr = new TextDecoder("utf-8", { fatal: !0 });
55
+ const ut = 161, dt = 162, ue = new TextEncoder(), Lr = new TextDecoder("utf-8", { fatal: !0 });
56
56
  class U {
57
57
  constructor(e = 1) {
58
- this.version = e, this.buffer.writeByte(lt), this.buffer.writeVarUInt(e >>> 0);
58
+ this.version = e, this.buffer.writeByte(ut), this.buffer.writeVarUInt(e >>> 0);
59
59
  }
60
60
  buffer = new ee();
61
61
  closed = !1;
@@ -88,7 +88,7 @@ class U {
88
88
  this.writeFixedField(e, 14, () => this.buffer.writeBytes(n));
89
89
  }
90
90
  writeStringField(e, r) {
91
- const n = le.encode(r ?? "");
91
+ const n = ue.encode(r ?? "");
92
92
  this.writeVariableField(e, 12, n);
93
93
  }
94
94
  writeBinaryField(e, r) {
@@ -101,7 +101,7 @@ class U {
101
101
  this.writeVariableField(e, 11, i);
102
102
  }
103
103
  writeArrayField(e, r, n) {
104
- const s = new Ie(r);
104
+ const s = new me(r);
105
105
  n(s);
106
106
  const i = s.finish();
107
107
  this.writeVariableField(e, 9, i);
@@ -113,7 +113,7 @@ class U {
113
113
  this.writeVariableField(e, 10, o);
114
114
  }
115
115
  finish() {
116
- return this.closed || (this.buffer.writeByte(ut), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
116
+ return this.closed || (this.buffer.writeByte(dt), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
117
117
  }
118
118
  writeFixedField(e, r, n) {
119
119
  this.writeFieldHeader(e, r, 0), n();
@@ -122,10 +122,10 @@ class U {
122
122
  this.writeFieldHeader(e, r, n.length), this.buffer.writeBytes(n);
123
123
  }
124
124
  writeFieldHeader(e, r, n) {
125
- this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(ue(r)), Br(r) && this.buffer.writeVarUInt(n >>> 0);
125
+ this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(de(r)), Gr(r) && this.buffer.writeVarUInt(n >>> 0);
126
126
  }
127
127
  }
128
- class Ie {
128
+ class me {
129
129
  constructor(e) {
130
130
  this.elementType = e;
131
131
  }
@@ -188,7 +188,7 @@ class Ie {
188
188
  12
189
189
  /* String */
190
190
  ), this.count++;
191
- const r = le.encode(e ?? "");
191
+ const r = ue.encode(e ?? "");
192
192
  this.payload.writeVarUInt(r.length), this.payload.writeBytes(r);
193
193
  }
194
194
  writeBinary(e) {
@@ -212,7 +212,7 @@ class Ie {
212
212
  9
213
213
  /* Array */
214
214
  ), this.count++;
215
- const n = new Ie(e);
215
+ const n = new me(e);
216
216
  r(n);
217
217
  const s = n.finish();
218
218
  this.payload.writeBytes(s);
@@ -229,7 +229,7 @@ class Ie {
229
229
  }
230
230
  finish() {
231
231
  const e = new ee();
232
- return e.writeByte(ue(this.elementType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
232
+ return e.writeByte(de(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)
@@ -238,7 +238,7 @@ class Ie {
238
238
  }
239
239
  class Oe {
240
240
  constructor(e, r) {
241
- this.keyType = e, this.valueType = r, ve(e);
241
+ this.keyType = e, this.valueType = r, Le(e);
242
242
  }
243
243
  payload = new ee();
244
244
  count = 0;
@@ -246,7 +246,7 @@ class Oe {
246
246
  beginEntry() {
247
247
  if (this.entryOpen)
248
248
  throw new Error("Previous dictionary entry not completed");
249
- return this.count++, this.entryOpen = !0, new Lr(this.keyType, this.valueType, this.payload, () => {
249
+ return this.count++, this.entryOpen = !0, new Pr(this.keyType, this.valueType, this.payload, () => {
250
250
  this.entryOpen = !1;
251
251
  });
252
252
  }
@@ -254,10 +254,10 @@ class Oe {
254
254
  if (this.entryOpen)
255
255
  throw new Error("Dictionary entry not completed");
256
256
  const e = new ee();
257
- return e.writeByte(ue(this.keyType)), e.writeByte(ue(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
257
+ return e.writeByte(de(this.keyType)), e.writeByte(de(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
258
258
  }
259
259
  }
260
- class Lr {
260
+ class Pr {
261
261
  constructor(e, r, n, s) {
262
262
  this.keyType = e, this.valueType = r, this.payload = n, this.onComplete = s;
263
263
  }
@@ -321,7 +321,7 @@ class Lr {
321
321
  12
322
322
  /* String */
323
323
  );
324
- const r = le.encode(e ?? "");
324
+ const r = ue.encode(e ?? "");
325
325
  this.payload.writeVarUInt(r.length), this.payload.writeBytes(r), this.keyWritten = !0;
326
326
  }
327
327
  writeKeyBinary(e) {
@@ -399,7 +399,7 @@ class Lr {
399
399
  12
400
400
  /* String */
401
401
  );
402
- const r = le.encode(e ?? "");
402
+ const r = ue.encode(e ?? "");
403
403
  this.payload.writeVarUInt(r.length), this.payload.writeBytes(r), this.valueWritten = !0;
404
404
  }
405
405
  writeValueObject(e, r) {
@@ -417,7 +417,7 @@ class Lr {
417
417
  9
418
418
  /* Array */
419
419
  );
420
- const n = new Ie(e);
420
+ const n = new me(e);
421
421
  r(n);
422
422
  const s = n.finish();
423
423
  this.payload.writeBytes(s), this.valueWritten = !0;
@@ -448,7 +448,7 @@ class Lr {
448
448
  throw new Error(`Dictionary value type is ${b[this.valueType]}, expected ${b[e]}`);
449
449
  }
450
450
  }
451
- class j {
451
+ class Y {
452
452
  constructor(e, r, n) {
453
453
  this.buffer = e, this.version = r, this.offset = n, this.end = e.length - 1;
454
454
  }
@@ -458,17 +458,17 @@ class j {
458
458
  const r = ne(e);
459
459
  if (r.length < 2)
460
460
  throw new Error("Teleport payload too short");
461
- if (r[0] !== lt || r[r.length - 1] !== ut)
461
+ if (r[0] !== ut || r[r.length - 1] !== dt)
462
462
  throw new Error("Teleport object missing markers");
463
463
  const n = { offset: 1 }, s = k(r, n, "InvalidLength");
464
- return new j(r, s, n.offset);
464
+ return new Y(r, s, n.offset);
465
465
  }
466
466
  next() {
467
467
  if (this.offset >= this.end)
468
468
  return null;
469
469
  if (this.offset + 5 > this.buffer.length)
470
470
  throw new Error("Teleport object truncated");
471
- const e = Gr(this.buffer, this.offset);
471
+ const e = Wr(this.buffer, this.offset);
472
472
  this.offset += 4;
473
473
  const r = this.buffer[this.offset++], n = r >> 4 & 15;
474
474
  if ((r & 15) !== 0)
@@ -481,10 +481,10 @@ class j {
481
481
  const o = { offset: this.offset }, a = k(this.buffer, o, "InvalidLength");
482
482
  C(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
483
483
  }
484
- return new vr(e, n, i);
484
+ return new Fr(e, n, i);
485
485
  }
486
486
  }
487
- class v {
487
+ class L {
488
488
  constructor(e, r) {
489
489
  this.type = e, this.payload = r;
490
490
  }
@@ -546,7 +546,7 @@ class v {
546
546
  return this.ensureType(
547
547
  12
548
548
  /* String */
549
- ), Mr.decode(this.payload);
549
+ ), Lr.decode(this.payload);
550
550
  }
551
551
  asGuid() {
552
552
  return this.ensureType(
@@ -558,7 +558,7 @@ class v {
558
558
  return this.ensureType(
559
559
  11
560
560
  /* Object */
561
- ), j.create(this.payload);
561
+ ), Y.create(this.payload);
562
562
  }
563
563
  asArray() {
564
564
  return this.ensureType(
@@ -570,14 +570,14 @@ class v {
570
570
  return this.ensureType(
571
571
  10
572
572
  /* Dict */
573
- ), Le.create(this.payload);
573
+ ), ve.create(this.payload);
574
574
  }
575
575
  ensureType(e) {
576
576
  if (this.type !== e)
577
577
  throw new Error(`Teleport value has type ${b[this.type]}, expected ${b[e]}`);
578
578
  }
579
579
  }
580
- class vr extends v {
580
+ class Fr extends L {
581
581
  constructor(e, r, n) {
582
582
  super(r, n), this.fieldId = e;
583
583
  }
@@ -641,11 +641,11 @@ class Me {
641
641
  return this.offset = e.offset + r, new Q(11, n);
642
642
  }
643
643
  case 9: {
644
- const e = Fe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
644
+ const e = Pe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
645
645
  return this.offset += e, new Q(9, r);
646
646
  }
647
647
  case 10: {
648
- const e = Pe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
648
+ const e = Fe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
649
649
  return this.offset += e, new Q(10, r);
650
650
  }
651
651
  default:
@@ -653,12 +653,12 @@ class Me {
653
653
  }
654
654
  }
655
655
  }
656
- class Q extends v {
656
+ class Q extends L {
657
657
  constructor(e, r) {
658
658
  super(e, r);
659
659
  }
660
660
  }
661
- class Le {
661
+ class ve {
662
662
  payload;
663
663
  keyType;
664
664
  valueType;
@@ -670,12 +670,12 @@ class Le {
670
670
  throw new Error("Dictionary payload too short");
671
671
  if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
672
672
  throw new Error("Dictionary key/value flags must be zero");
673
- ve(this.keyType);
673
+ Le(this.keyType);
674
674
  const r = { offset: 2 };
675
675
  this.count = k(e, r, "DictMalformed"), this.offset = r.offset;
676
676
  }
677
677
  static create(e) {
678
- return new Le(ne(e));
678
+ return new ve(ne(e));
679
679
  }
680
680
  next() {
681
681
  if (this.index >= this.count) {
@@ -684,20 +684,20 @@ class Le {
684
684
  return null;
685
685
  }
686
686
  const e = this.readKey(), r = this.readValue();
687
- return this.index++, new Fr(e, r);
687
+ return this.index++, new Br(e, r);
688
688
  }
689
689
  readKey() {
690
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 v(this.keyType, r);
694
+ return this.offset += e, new L(this.keyType, r);
695
695
  }
696
696
  if (this.keyType === 12 || this.keyType === 13) {
697
697
  const r = { offset: this.offset }, n = k(this.payload, r, "DictMalformed");
698
698
  C(this.payload, r.offset, n);
699
699
  const s = this.payload.subarray(r.offset, r.offset + n);
700
- return this.offset = r.offset + n, new v(this.keyType, s);
700
+ return this.offset = r.offset + n, new L(this.keyType, s);
701
701
  }
702
702
  throw new Error("Unsupported dictionary key type");
703
703
  }
@@ -708,21 +708,21 @@ class Le {
708
708
  const e = { offset: this.offset }, r = k(this.payload, e, "DictMalformed");
709
709
  C(this.payload, e.offset, r);
710
710
  const n = this.payload.subarray(e.offset, e.offset + r);
711
- return this.offset = e.offset + r, new v(this.valueType, n);
711
+ return this.offset = e.offset + r, new L(this.valueType, n);
712
712
  }
713
713
  case 11: {
714
714
  const e = { offset: this.offset }, r = k(this.payload, e, "DictMalformed");
715
715
  C(this.payload, e.offset, r);
716
716
  const n = this.payload.subarray(e.offset, e.offset + r);
717
- return this.offset = e.offset + r, new v(11, n);
717
+ return this.offset = e.offset + r, new L(11, n);
718
718
  }
719
719
  case 9: {
720
- const e = Fe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
721
- return this.offset += e, new v(9, r);
720
+ const e = Pe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
721
+ return this.offset += e, new L(9, r);
722
722
  }
723
723
  case 10: {
724
- const e = Pe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
725
- return this.offset += e, new v(10, r);
724
+ const e = Fe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
725
+ return this.offset += e, new L(10, r);
726
726
  }
727
727
  case 3:
728
728
  case 5:
@@ -736,14 +736,14 @@ class Le {
736
736
  const e = $(this.valueType);
737
737
  C(this.payload, this.offset, e);
738
738
  const r = this.payload.subarray(this.offset, this.offset + e);
739
- return this.offset += e, new v(this.valueType, r);
739
+ return this.offset += e, new L(this.valueType, r);
740
740
  }
741
741
  default:
742
742
  throw new Error(`Unsupported dictionary value type ${b[this.valueType]}`);
743
743
  }
744
744
  }
745
745
  }
746
- class Fr {
746
+ class Br {
747
747
  constructor(e, r) {
748
748
  this.key = e, this.value = r;
749
749
  }
@@ -787,8 +787,8 @@ class I {
787
787
  I.toHex(I.readUInt32LE(e, 0), 8),
788
788
  I.toHex(I.readUInt16LE(e, 4), 4),
789
789
  I.toHex(I.readUInt16LE(e, 6), 4),
790
- Ye(e.subarray(8, 10)),
791
- Ye(e.subarray(10, 16))
790
+ je(e.subarray(8, 10)),
791
+ je(e.subarray(10, 16))
792
792
  ].join("-");
793
793
  }
794
794
  asBytes() {
@@ -866,7 +866,7 @@ function k(t, e, r) {
866
866
  for (; e.offset < t.length; ) {
867
867
  const o = t[e.offset++];
868
868
  if (i++, n |= (o & 127) << s, (o & 128) === 0) {
869
- if (i !== Pr(n))
869
+ if (i !== xr(n))
870
870
  throw new Error("Teleport VarUInt is not canonical");
871
871
  return n >>> 0;
872
872
  }
@@ -875,15 +875,15 @@ function k(t, e, r) {
875
875
  }
876
876
  throw new Error(r);
877
877
  }
878
- function Pr(t) {
878
+ function xr(t) {
879
879
  return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
880
880
  }
881
- function ue(t, e = 0) {
881
+ function de(t, e = 0) {
882
882
  if ((e & 240) !== 0)
883
883
  throw new Error("Teleport flags must fit into 4 bits");
884
884
  return (t & 15) << 4 | e & 15;
885
885
  }
886
- function Br(t) {
886
+ function Gr(t) {
887
887
  return t === 12 || t === 13 || t === 9 || t === 11 || t === 10;
888
888
  }
889
889
  function $(t) {
@@ -906,7 +906,7 @@ function $(t) {
906
906
  return -1;
907
907
  }
908
908
  }
909
- function ve(t) {
909
+ function Le(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
  }
@@ -914,10 +914,10 @@ 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
  }
917
- function Gr(t, e) {
917
+ function Wr(t, e) {
918
918
  return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
919
919
  }
920
- function Fe(t, e) {
920
+ function Pe(t, e) {
921
921
  if (e >= t.length)
922
922
  throw new Error("Array payload exceeds bounds");
923
923
  const r = t[e], n = r >> 4 & 15;
@@ -933,13 +933,13 @@ function Fe(t, e) {
933
933
  a = ye(n, t, a, "ArrayMalformed");
934
934
  return a - e;
935
935
  }
936
- function Pe(t, e) {
936
+ function Fe(t, e) {
937
937
  if (e + 2 > t.length)
938
938
  throw new Error("Dictionary payload too short");
939
939
  const r = t[e] >> 4 & 15, n = t[e + 1] >> 4 & 15;
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
- ve(r);
942
+ Le(r);
943
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++)
@@ -961,267 +961,267 @@ function ye(t, e, r, n) {
961
961
  return C(e, i.offset, o), i.offset + o;
962
962
  }
963
963
  case 9:
964
- return r + Fe(e, r);
965
- case 10:
966
964
  return r + Pe(e, r);
965
+ case 10:
966
+ return r + Fe(e, r);
967
967
  default:
968
968
  throw new Error(`Unsupported Teleport type ${b[t]}`);
969
969
  }
970
970
  }
971
- function Ye(t) {
971
+ function je(t) {
972
972
  return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
973
973
  }
974
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 || {}), 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
- const pt = 1, xr = 1048637, Wr = 727023925, Vr = 3395085689;
979
- function Hr(t) {
980
- const e = new U(pt);
981
- return $r(t, e), e.finish();
977
+ var ht = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ht || {}), j = /* @__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))(j || {}), 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 || {}), ft = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(ft || {}), J = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(J || {}), pt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Hevc = 2] = "Hevc", t[t.Vp8 = 3] = "Vp8", t))(pt || {}), 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
+ const Et = 1, Vr = 1048637, Hr = 727023925, $r = 3395085689;
979
+ function Kr(t) {
980
+ const e = new U(Et);
981
+ return Yr(t, e), e.finish();
982
982
  }
983
- function $r(t, e) {
984
- e.writeGuidField(Wr, t.ActionId), e.writeStringField(Vr, t.PayloadJson);
983
+ function Yr(t, e) {
984
+ e.writeGuidField(Hr, t.ActionId), e.writeStringField($r, t.PayloadJson);
985
985
  }
986
- function Kr(t, e, r) {
987
- const n = Hr(t);
988
- return F(xr, n, pt, e, r);
986
+ function jr(t, e, r) {
987
+ const n = Kr(t);
988
+ return P(Vr, n, Et, e, r);
989
989
  }
990
- const jr = 467348717, Yr = 972460562, zr = 1911490601, Xr = 2603556958, Jr = 3609695522, Qr = 4094837378, qr = 4257460908;
991
- function Zr(t) {
990
+ const zr = 467348717, Xr = 972460562, Jr = 1911490601, Qr = 2603556958, qr = 3609695522, Zr = 4094837378, en = 4257460908;
991
+ function tn(t) {
992
992
  const e = {};
993
- return Et(e), e;
993
+ return It(e), e;
994
994
  }
995
- function Et(t) {
995
+ function It(t) {
996
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
- function en(t, e) {
999
- const r = e ?? Zr();
1000
- return Et(r), tn(t, r), r;
998
+ function rn(t, e) {
999
+ const r = e ?? tn();
1000
+ return It(r), nn(t, r), r;
1001
1001
  }
1002
- function tn(t, e) {
1002
+ function nn(t, e) {
1003
1003
  let r;
1004
1004
  for (; (r = t.next()) !== null; )
1005
1005
  switch (r.fieldId) {
1006
- case jr: {
1006
+ case zr: {
1007
1007
  if (r.isNull) throw new Error();
1008
1008
  e.EnumerationId = r.asGuid();
1009
1009
  break;
1010
1010
  }
1011
- case Yr: {
1011
+ case Xr: {
1012
1012
  if (r.isNull) throw new Error();
1013
1013
  e.EnumerableItemTypeName = r.asString();
1014
1014
  break;
1015
1015
  }
1016
- case zr: {
1016
+ case Jr: {
1017
1017
  if (r.isNull) throw new Error();
1018
1018
  e.ValueJson = r.asString();
1019
1019
  break;
1020
1020
  }
1021
- case Xr: {
1021
+ case Qr: {
1022
1022
  if (r.isNull) throw new Error();
1023
1023
  e.IsEnumerable = r.asBool();
1024
1024
  break;
1025
1025
  }
1026
- case Jr: {
1026
+ case qr: {
1027
1027
  if (r.isNull) throw new Error();
1028
1028
  e.TypeName = r.asString();
1029
1029
  break;
1030
1030
  }
1031
- case Qr: {
1031
+ case Zr: {
1032
1032
  if (r.isNull) throw new Error();
1033
1033
  e.ValueData = r.asBinary();
1034
1034
  break;
1035
1035
  }
1036
- case qr: {
1036
+ case en: {
1037
1037
  if (r.isNull) throw new Error();
1038
1038
  e.ParameterIndex = r.asInt32();
1039
1039
  break;
1040
1040
  }
1041
1041
  }
1042
1042
  }
1043
- const rn = 1368629611, nn = 2431514951, sn = 2914494629, on = 3284746250, an = 4101844078;
1044
- function It(t) {
1043
+ const sn = 1368629611, on = 2431514951, an = 2914494629, cn = 3284746250, ln = 4101844078;
1044
+ function mt(t) {
1045
1045
  const e = {};
1046
- return mt(e), e;
1046
+ return _t(e), e;
1047
1047
  }
1048
- function mt(t) {
1049
- return t.Description = "", t.Codec = dt.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t;
1048
+ function _t(t) {
1049
+ return t.Description = "", t.Codec = ht.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t;
1050
1050
  }
1051
- function cn(t, e) {
1052
- const r = e ?? It();
1053
- return mt(r), ln(t, r), r;
1051
+ function un(t, e) {
1052
+ const r = e ?? mt();
1053
+ return _t(r), dn(t, r), r;
1054
1054
  }
1055
- function ln(t, e) {
1055
+ function dn(t, e) {
1056
1056
  let r;
1057
1057
  for (; (r = t.next()) !== null; )
1058
1058
  switch (r.fieldId) {
1059
- case rn: {
1059
+ case sn: {
1060
1060
  if (r.isNull) throw new Error();
1061
1061
  e.Description = r.asString();
1062
1062
  break;
1063
1063
  }
1064
- case nn: {
1064
+ case on: {
1065
1065
  if (r.isNull) throw new Error();
1066
1066
  e.Channels = r.asInt32();
1067
1067
  break;
1068
1068
  }
1069
- case sn: {
1069
+ case an: {
1070
1070
  if (r.isNull) throw new Error();
1071
1071
  e.BitDepth = r.asInt32();
1072
1072
  break;
1073
1073
  }
1074
- case on: {
1074
+ case cn: {
1075
1075
  if (r.isNull) throw new Error();
1076
1076
  e.Codec = r.asInt32();
1077
1077
  break;
1078
1078
  }
1079
- case an: {
1079
+ case ln: {
1080
1080
  if (r.isNull) throw new Error();
1081
1081
  e.SampleRate = r.asInt32();
1082
1082
  break;
1083
1083
  }
1084
1084
  }
1085
1085
  }
1086
- const un = 76337612, dn = 185396121, hn = 388632637, fn = 417197284, pn = 469070965, En = 470595159, In = 781727218, mn = 834078886, _n = 1043273762, Tn = 1236999138, Sn = 1368629611, wn = 1715899485, yn = 1942830531, An = 1999510636, Nn = 2079864626, gn = 2142346422, Cn = 2598291686, bn = 2719718823, Rn = 2810953526, kn = 2840065720, Un = 2885165957, Dn = 3586157513, On = 3717933110, Mn = 4062655306;
1086
+ const hn = 76337612, fn = 185396121, pn = 388632637, En = 417197284, In = 469070965, mn = 470595159, _n = 781727218, Tn = 834078886, Sn = 1043273762, wn = 1236999138, yn = 1368629611, An = 1715899485, Nn = 1942830531, gn = 1999510636, Cn = 2079864626, bn = 2142346422, Rn = 2598291686, kn = 2719718823, Un = 2810953526, Dn = 2840065720, On = 2885165957, Mn = 3586157513, vn = 3717933110, Ln = 4062655306;
1087
1087
  function Ae(t) {
1088
1088
  const e = {};
1089
- return _t(e), e;
1089
+ return Tt(e), e;
1090
1090
  }
1091
- function _t(t) {
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;
1091
+ function Tt(t) {
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 = j.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();
1096
- return _t(r), Ln(t, r), r;
1096
+ return Tt(r), Pn(t, r), r;
1097
1097
  }
1098
- function Ln(t, e) {
1098
+ function Pn(t, e) {
1099
1099
  let r;
1100
1100
  for (; (r = t.next()) !== null; )
1101
1101
  switch (r.fieldId) {
1102
- case un: {
1102
+ case hn: {
1103
1103
  if (r.isNull) throw new Error();
1104
1104
  e.DeviceId = r.asString();
1105
1105
  break;
1106
1106
  }
1107
- case dn: {
1107
+ case fn: {
1108
1108
  if (r.isNull) throw new Error();
1109
1109
  e.InstallId = r.asString();
1110
1110
  break;
1111
1111
  }
1112
- case hn: {
1112
+ case pn: {
1113
1113
  if (r.isNull) throw new Error();
1114
1114
  e.UserAgent = r.asString();
1115
1115
  break;
1116
1116
  }
1117
- case fn: {
1117
+ case En: {
1118
1118
  if (r.isNull) throw new Error();
1119
1119
  e.ContextType = r.asInt32();
1120
1120
  break;
1121
1121
  }
1122
- case pn: {
1122
+ case In: {
1123
1123
  if (r.isNull) throw new Error();
1124
1124
  e.HasInput = r.asBool();
1125
1125
  break;
1126
1126
  }
1127
- case En: {
1127
+ case mn: {
1128
1128
  if (r.isNull) throw new Error();
1129
1129
  e.UserType = r.asInt32();
1130
1130
  break;
1131
1131
  }
1132
- case In: {
1132
+ case _n: {
1133
1133
  if (r.isNull) throw new Error();
1134
1134
  e.UserId = r.asString();
1135
1135
  break;
1136
1136
  }
1137
- case mn: {
1137
+ case Tn: {
1138
1138
  if (r.isNull) throw new Error();
1139
1139
  e.ProductId = r.asString();
1140
1140
  break;
1141
1141
  }
1142
- case _n: {
1142
+ case Sn: {
1143
1143
  if (r.isNull) throw new Error();
1144
1144
  e.AuthSessionId = r.asString();
1145
1145
  break;
1146
1146
  }
1147
- case Tn: {
1147
+ case wn: {
1148
1148
  if (r.isNull) throw new Error();
1149
1149
  e.ReceiveAllMessages = r.asBool();
1150
1150
  break;
1151
1151
  }
1152
- case Sn: {
1152
+ case yn: {
1153
1153
  if (r.isNull) throw new Error();
1154
1154
  e.Description = r.asString();
1155
1155
  break;
1156
1156
  }
1157
- case wn: {
1157
+ case An: {
1158
1158
  if (r.isNull) throw new Error();
1159
1159
  e.Locale = r.asString();
1160
1160
  break;
1161
1161
  }
1162
- case yn: {
1162
+ case Nn: {
1163
1163
  if (r.isNull) throw new Error();
1164
1164
  e.SdkType = r.asInt32();
1165
1165
  break;
1166
1166
  }
1167
- case An: {
1167
+ case gn: {
1168
1168
  if (r.isNull) throw new Error();
1169
1169
  e.SessionId = r.asInt32();
1170
1170
  break;
1171
1171
  }
1172
- case Nn: {
1172
+ case Cn: {
1173
1173
  if (r.isNull) throw new Error();
1174
1174
  e.PreciseJoinedAt = r.asUInt64();
1175
1175
  break;
1176
1176
  }
1177
- case gn: {
1177
+ case bn: {
1178
1178
  if (r.isNull) throw new Error();
1179
1179
  e.PayloadType = r.asInt32();
1180
1180
  break;
1181
1181
  }
1182
- case Cn: {
1182
+ case Rn: {
1183
1183
  if (r.isNull) throw new Error();
1184
1184
  e.VersionId = r.asString();
1185
1185
  break;
1186
1186
  }
1187
- case bn: {
1187
+ case kn: {
1188
1188
  if (r.isNull) throw new Error();
1189
1189
  e.UniqueSessionId = r.asString();
1190
1190
  break;
1191
1191
  }
1192
- case Rn: {
1192
+ case Un: {
1193
1193
  if (r.isNull) throw new Error();
1194
1194
  e.ClientType = r.asInt32();
1195
1195
  break;
1196
1196
  }
1197
- case kn: {
1197
+ case Dn: {
1198
1198
  if (r.isNull) throw new Error();
1199
1199
  e.IsReady = r.asBool();
1200
1200
  break;
1201
1201
  }
1202
- case Un: {
1202
+ case On: {
1203
1203
  if (r.isNull) throw new Error();
1204
- e.Parameters = vn(r.asDictionary());
1204
+ e.Parameters = Fn(r.asDictionary());
1205
1205
  break;
1206
1206
  }
1207
- case Dn: {
1207
+ case Mn: {
1208
1208
  if (r.isNull) throw new Error();
1209
1209
  e.IsInternal = r.asBool();
1210
1210
  break;
1211
1211
  }
1212
- case On: {
1212
+ case vn: {
1213
1213
  if (r.isNull) throw new Error();
1214
1214
  e.ChannelLocale = r.asString();
1215
1215
  break;
1216
1216
  }
1217
- case Mn: {
1217
+ case Ln: {
1218
1218
  if (r.isNull) throw new Error();
1219
1219
  e.EmbeddedSpaceId = r.asString();
1220
1220
  break;
1221
1221
  }
1222
1222
  }
1223
1223
  }
1224
- function vn(t) {
1224
+ function Fn(t) {
1225
1225
  const e = /* @__PURE__ */ Object.create(null);
1226
1226
  let r;
1227
1227
  for (; (r = t.next()) !== null; ) {
@@ -1230,138 +1230,138 @@ function vn(t) {
1230
1230
  }
1231
1231
  return e;
1232
1232
  }
1233
- const Fn = 746516514, Pn = 877841741, Bn = 1175184220, Gn = 1368629611, xn = 2341021724, Wn = 3167053791, Vn = 3686066300;
1234
- function Hn(t) {
1233
+ const Bn = 746516514, xn = 877841741, Gn = 1175184220, Wn = 1368629611, Vn = 2341021724, Hn = 3167053791, $n = 3686066300;
1234
+ function Kn(t) {
1235
1235
  const e = {};
1236
- return Tt(e), e;
1236
+ return St(e), e;
1237
1237
  }
1238
- function Tt(t) {
1238
+ function St(t) {
1239
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
- function $n(t, e) {
1242
- const r = e ?? Hn();
1243
- return Tt(r), Kn(t, r), r;
1241
+ function Yn(t, e) {
1242
+ const r = e ?? Kn();
1243
+ return St(r), jn(t, r), r;
1244
1244
  }
1245
- function Kn(t, e) {
1245
+ function jn(t, e) {
1246
1246
  let r;
1247
1247
  for (; (r = t.next()) !== null; )
1248
1248
  switch (r.fieldId) {
1249
- case Fn: {
1249
+ case Bn: {
1250
1250
  if (r.isNull) throw new Error();
1251
1251
  e.AuthTicket = r.asBinary();
1252
1252
  break;
1253
1253
  }
1254
- case Pn: {
1254
+ case xn: {
1255
1255
  if (r.isNull) throw new Error();
1256
1256
  e.Priority = r.asInt32();
1257
1257
  break;
1258
1258
  }
1259
- case Bn: {
1259
+ case Gn: {
1260
1260
  if (r.isNull) throw new Error();
1261
1261
  e.OpcodeGroupsFromServer = r.asInt32();
1262
1262
  break;
1263
1263
  }
1264
- case Gn: {
1264
+ case Wn: {
1265
1265
  if (r.isNull) throw new Error();
1266
1266
  e.Description = r.asString();
1267
1267
  break;
1268
1268
  }
1269
- case xn: {
1269
+ case Vn: {
1270
1270
  if (r.isNull) throw new Error();
1271
1271
  e.Uri = r.asString();
1272
1272
  break;
1273
1273
  }
1274
- case Wn: {
1274
+ case Hn: {
1275
1275
  if (r.isNull) throw new Error();
1276
1276
  e.Type = r.asInt32();
1277
1277
  break;
1278
1278
  }
1279
- case Vn: {
1279
+ case $n: {
1280
1280
  if (r.isNull) throw new Error();
1281
1281
  e.OpcodeGroupsToServer = r.asInt32();
1282
1282
  break;
1283
1283
  }
1284
1284
  }
1285
1285
  }
1286
- const jn = 5, Yn = 65537, zn = 166277978, Xn = 1482635149, Jn = 1559330978, Qn = 2802434353, qn = 3085883711, Zn = 3669484338, es = 3707543140, ts = 3712281496, rs = 4160646707;
1287
- function ns(t) {
1286
+ const zn = 5, Xn = 65537, Jn = 166277978, Qn = 1482635149, qn = 1559330978, Zn = 2802434353, es = 3085883711, ts = 3669484338, rs = 3707543140, ns = 3712281496, ss = 4160646707;
1287
+ function is(t) {
1288
1288
  const e = {};
1289
- return St(e), e;
1289
+ return wt(e), e;
1290
1290
  }
1291
- function St(t) {
1291
+ function wt(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
- function ss(t, e) {
1295
- const r = j.create(t);
1296
- return is(r, e);
1294
+ function os(t, e) {
1295
+ const r = Y.create(t);
1296
+ return as(r, e);
1297
1297
  }
1298
- function is(t, e) {
1299
- const r = e ?? ns();
1300
- return St(r), os(t, r), r;
1298
+ function as(t, e) {
1299
+ const r = e ?? is();
1300
+ return wt(r), cs(t, r), r;
1301
1301
  }
1302
- function os(t, e) {
1302
+ function cs(t, e) {
1303
1303
  let r;
1304
1304
  for (; (r = t.next()) !== null; )
1305
1305
  switch (r.fieldId) {
1306
- case zn: {
1306
+ case Jn: {
1307
1307
  if (r.isNull) throw new Error();
1308
1308
  e.CertHash = r.asString();
1309
1309
  break;
1310
1310
  }
1311
- case Xn: {
1311
+ case Qn: {
1312
1312
  if (r.isNull) throw new Error();
1313
- e.Entrypoints = cs(r.asArray());
1313
+ e.Entrypoints = us(r.asArray());
1314
1314
  break;
1315
1315
  }
1316
- case Jn: {
1316
+ case qn: {
1317
1317
  if (r.isNull) throw new Error();
1318
1318
  e.ChannelId = r.asString();
1319
1319
  break;
1320
1320
  }
1321
- case Qn: {
1321
+ case Zn: {
1322
1322
  if (r.isNull) throw new Error();
1323
1323
  e.ClientContext = Ne(r.asObject());
1324
1324
  break;
1325
1325
  }
1326
- case qn: {
1326
+ case es: {
1327
1327
  if (r.isNull) throw new Error();
1328
1328
  e.ServerContext = Ne(r.asObject());
1329
1329
  break;
1330
1330
  }
1331
- case Zn: {
1331
+ case ts: {
1332
1332
  if (r.isNull) throw new Error();
1333
- e.FeatureFlags = ls(r.asDictionary());
1333
+ e.FeatureFlags = ds(r.asDictionary());
1334
1334
  break;
1335
1335
  }
1336
- case es: {
1336
+ case rs: {
1337
1337
  if (r.isNull) throw new Error();
1338
1338
  e.SpaceId = r.asString();
1339
1339
  break;
1340
1340
  }
1341
- case ts: {
1341
+ case ns: {
1342
1342
  if (r.isNull) throw new Error();
1343
1343
  e.PrimaryUserId = r.asString();
1344
1344
  break;
1345
1345
  }
1346
- case rs: {
1346
+ case ss: {
1347
1347
  if (r.isNull) throw new Error();
1348
1348
  e.ChannelTemplateId = r.asString();
1349
1349
  break;
1350
1350
  }
1351
1351
  }
1352
1352
  }
1353
- function as(t, e) {
1354
- const r = De(t, Yn, jn);
1355
- return ss(r, e);
1353
+ function ls(t, e) {
1354
+ const r = De(t, Xn, zn);
1355
+ return os(r, e);
1356
1356
  }
1357
- function cs(t) {
1357
+ function us(t) {
1358
1358
  const e = [];
1359
1359
  let r;
1360
1360
  for (; (r = t.next()) !== null; )
1361
- e.push($n(r.asObject()));
1361
+ e.push(Yn(r.asObject()));
1362
1362
  return e;
1363
1363
  }
1364
- function ls(t) {
1364
+ function ds(t) {
1365
1365
  const e = /* @__PURE__ */ Object.create(null);
1366
1366
  let r;
1367
1367
  for (; (r = t.next()) !== null; ) {
@@ -1370,270 +1370,270 @@ function ls(t) {
1370
1370
  }
1371
1371
  return e;
1372
1372
  }
1373
- function us(t) {
1373
+ function hs(t) {
1374
1374
  const e = {};
1375
- return ds(e), t && Object.assign(e, t), e;
1375
+ return fs(e), t && Object.assign(e, t), e;
1376
1376
  }
1377
- function ds(t) {
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;
1377
+ function fs(t) {
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 = j.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Be.Unknown, t;
1379
1379
  }
1380
- const wt = 1, hs = 1048632, fs = 3748161056, ps = 4289118421;
1381
- function Es(t) {
1380
+ const yt = 1, ps = 1048632, Es = 3748161056, Is = 4289118421;
1381
+ function ms(t) {
1382
1382
  const e = {};
1383
- return Is(e), t && Object.assign(e, t), e;
1383
+ return _s(e), t && Object.assign(e, t), e;
1384
1384
  }
1385
- function Is(t) {
1385
+ function _s(t) {
1386
1386
  return t.CallId = I.fromBytes(new Uint8Array(16)), t.InstanceId = I.fromBytes(new Uint8Array(16)), t;
1387
1387
  }
1388
- function ms(t) {
1389
- const e = new U(wt);
1390
- return _s(t, e), e.finish();
1388
+ function Ts(t) {
1389
+ const e = new U(yt);
1390
+ return Ss(t, e), e.finish();
1391
1391
  }
1392
- function _s(t, e) {
1393
- e.writeGuidField(fs, t.CallId), e.writeGuidField(ps, t.InstanceId);
1392
+ function Ss(t, e) {
1393
+ e.writeGuidField(Es, t.CallId), e.writeGuidField(Is, t.InstanceId);
1394
1394
  }
1395
- function Ts(t, e, r) {
1396
- const n = ms(t);
1397
- return F(hs, n, wt, e, r);
1395
+ function ws(t, e, r) {
1396
+ const n = Ts(t);
1397
+ return P(ps, n, yt, e, r);
1398
1398
  }
1399
- const Ss = 1, ws = 1048601, ys = 112005851, As = 814454131, Ns = 976255570, gs = 1123310456, Cs = 2885165957, bs = 3748161056, Rs = 4289118421;
1400
- function ks(t) {
1399
+ const ys = 1, As = 1048601, Ns = 112005851, gs = 814454131, Cs = 976255570, bs = 1123310456, Rs = 2885165957, ks = 3748161056, Us = 4289118421;
1400
+ function Ds(t) {
1401
1401
  const e = {};
1402
- return yt(e), e;
1402
+ return At(e), e;
1403
1403
  }
1404
- function yt(t) {
1404
+ function At(t) {
1405
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
- function Us(t, e) {
1408
- const r = j.create(t);
1409
- return Ds(r, e);
1407
+ function Os(t, e) {
1408
+ const r = Y.create(t);
1409
+ return Ms(r, e);
1410
1410
  }
1411
- function Ds(t, e) {
1412
- const r = e ?? ks();
1413
- return yt(r), Os(t, r), r;
1411
+ function Ms(t, e) {
1412
+ const r = e ?? Ds();
1413
+ return At(r), vs(t, r), r;
1414
1414
  }
1415
- function Os(t, e) {
1415
+ function vs(t, e) {
1416
1416
  let r;
1417
1417
  for (; (r = t.next()) !== null; )
1418
1418
  switch (r.fieldId) {
1419
- case ys: {
1419
+ case Ns: {
1420
1420
  if (r.isNull) throw new Error();
1421
- e.Scopes = Ls(r.asArray());
1421
+ e.Scopes = Ps(r.asArray());
1422
1422
  break;
1423
1423
  }
1424
- case As: {
1424
+ case gs: {
1425
1425
  if (r.isNull) throw new Error();
1426
1426
  e.FunctionName = r.asString();
1427
1427
  break;
1428
1428
  }
1429
- case Ns: {
1429
+ case Cs: {
1430
1430
  if (r.isNull) throw new Error();
1431
1431
  e.FunctionId = r.asGuid();
1432
1432
  break;
1433
1433
  }
1434
- case gs: {
1434
+ case bs: {
1435
1435
  if (r.isNull) throw new Error();
1436
1436
  e.ClientBackendToken = r.asString();
1437
1437
  break;
1438
1438
  }
1439
- case Cs: {
1439
+ case Rs: {
1440
1440
  if (r.isNull) throw new Error();
1441
- e.Parameters = vs(r.asArray());
1441
+ e.Parameters = Fs(r.asArray());
1442
1442
  break;
1443
1443
  }
1444
- case bs: {
1444
+ case ks: {
1445
1445
  if (r.isNull) throw new Error();
1446
1446
  e.CallId = r.asGuid();
1447
1447
  break;
1448
1448
  }
1449
- case Rs: {
1449
+ case Us: {
1450
1450
  if (r.isNull) throw new Error();
1451
1451
  e.InstanceId = r.asGuid();
1452
1452
  break;
1453
1453
  }
1454
1454
  }
1455
1455
  }
1456
- function Ms(t, e) {
1457
- const r = De(t, ws, Ss);
1458
- return Us(r, e);
1456
+ function Ls(t, e) {
1457
+ const r = De(t, As, ys);
1458
+ return Os(r, e);
1459
1459
  }
1460
- function Ls(t) {
1460
+ function Ps(t) {
1461
1461
  const e = [];
1462
1462
  let r;
1463
1463
  for (; (r = t.next()) !== null; )
1464
- e.push(Gs(r.asObject()));
1464
+ e.push(Ws(r.asObject()));
1465
1465
  return e;
1466
1466
  }
1467
- function vs(t) {
1467
+ function Fs(t) {
1468
1468
  const e = [];
1469
1469
  let r;
1470
1470
  for (; (r = t.next()) !== null; )
1471
- e.push(en(r.asObject()));
1471
+ e.push(rn(r.asObject()));
1472
1472
  return e;
1473
1473
  }
1474
- const Fs = 2994044322, Ps = 3167053791;
1475
- function Bs(t) {
1474
+ const Bs = 2994044322, xs = 3167053791;
1475
+ function Gs(t) {
1476
1476
  const e = {};
1477
- return At(e), e;
1477
+ return Nt(e), e;
1478
1478
  }
1479
- function At(t) {
1479
+ function Nt(t) {
1480
1480
  return t.Type = "", t.Id = "", t;
1481
1481
  }
1482
- function Gs(t, e) {
1483
- const r = e ?? Bs();
1484
- return At(r), xs(t, r), r;
1482
+ function Ws(t, e) {
1483
+ const r = e ?? Gs();
1484
+ return Nt(r), Vs(t, r), r;
1485
1485
  }
1486
- function xs(t, e) {
1486
+ function Vs(t, e) {
1487
1487
  let r;
1488
1488
  for (; (r = t.next()) !== null; )
1489
1489
  switch (r.fieldId) {
1490
- case Fs: {
1490
+ case Bs: {
1491
1491
  if (r.isNull) throw new Error();
1492
1492
  e.Id = r.asString();
1493
1493
  break;
1494
1494
  }
1495
- case Ps: {
1495
+ case xs: {
1496
1496
  if (r.isNull) throw new Error();
1497
1497
  e.Type = r.asString();
1498
1498
  break;
1499
1499
  }
1500
1500
  }
1501
1501
  }
1502
- const Nt = 1, Ws = 1048631, Vs = 2205234621, Hs = 2838554230, $s = 3748161056, Ks = 4194102057, js = 4289118421;
1503
- function Ys(t) {
1502
+ const gt = 1, Hs = 1048631, $s = 2205234621, Ks = 2838554230, Ys = 3748161056, js = 4194102057, zs = 4289118421;
1503
+ function Xs(t) {
1504
1504
  const e = {};
1505
- return zs(e), t && Object.assign(e, t), e;
1505
+ return Js(e), t && Object.assign(e, t), e;
1506
1506
  }
1507
- function zs(t) {
1507
+ function Js(t) {
1508
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
- function Xs(t) {
1511
- const e = new U(Nt);
1512
- return Js(t, e), e.finish();
1510
+ function Qs(t) {
1511
+ const e = new U(gt);
1512
+ return qs(t, e), e.finish();
1513
1513
  }
1514
- function Js(t, e) {
1515
- e.writeStringField(Vs, t.ErrorTypeName), e.writeStringField(Hs, t.ErrorMessage), e.writeGuidField($s, t.CallId), e.writeStringField(Ks, t.StackTrace), e.writeGuidField(js, t.InstanceId);
1514
+ function qs(t, e) {
1515
+ e.writeStringField($s, t.ErrorTypeName), e.writeStringField(Ks, t.ErrorMessage), e.writeGuidField(Ys, t.CallId), e.writeStringField(js, t.StackTrace), e.writeGuidField(zs, t.InstanceId);
1516
1516
  }
1517
- function Qs(t, e, r) {
1518
- const n = Xs(t);
1519
- return F(Ws, n, Nt, e, r);
1517
+ function Zs(t, e, r) {
1518
+ const n = Qs(t);
1519
+ return P(Hs, n, gt, e, r);
1520
1520
  }
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
- function Zs(t) {
1521
+ const xe = 1, ei = 1048600, Ct = 703025676, bt = 814454131, Rt = 972460562, kt = 976255570, Ut = 1368629611, Dt = 1479280922, Ot = 1533537016, Mt = 2274386296, vt = 2603556958, Lt = 2885165957, Pt = 3568439632;
1522
+ function ti(t) {
1523
1523
  const e = {};
1524
1524
  return Ft(e), e;
1525
1525
  }
1526
1526
  function Ft(t) {
1527
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
- function ei(t) {
1530
- const e = new U(Ge);
1531
- return Pt(t, e), e.finish();
1529
+ function ri(t) {
1530
+ const e = new U(xe);
1531
+ return Bt(t, e), e.finish();
1532
1532
  }
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, b.Object, (r) => {
1533
+ function Bt(t, e) {
1534
+ e.writeStringField(Ct, t.ResultTypeName), e.writeStringField(bt, t.FunctionName), e.writeStringField(Rt, t.EnumerableItemTypeName), e.writeGuidField(kt, t.FunctionId), e.writeStringField(Ut, t.Description), e.writeBoolField(Dt, t.IsCancellable), e.writeBoolField(Ot, t.RequiresInstance), e.writeBoolField(Mt, t.LlmInlineResult), e.writeBoolField(vt, t.IsEnumerable), e.writeArrayField(Lt, b.Object, (r) => {
1535
1535
  for (const n of t.Parameters)
1536
- r.writeObject(ii, (s) => {
1537
- ai(n, s);
1536
+ r.writeObject(ai, (s) => {
1537
+ li(n, s);
1538
1538
  });
1539
- }), e.writeBoolField(vt, t.LlmCallOnlyOnce);
1539
+ }), e.writeBoolField(Pt, t.LlmCallOnlyOnce);
1540
1540
  }
1541
- function ti(t, e) {
1542
- const r = e ?? Zs();
1543
- return Ft(r), ri(t, r), r;
1541
+ function ni(t, e) {
1542
+ const r = e ?? ti();
1543
+ return Ft(r), si(t, r), r;
1544
1544
  }
1545
- function ri(t, e) {
1545
+ function si(t, e) {
1546
1546
  let r;
1547
1547
  for (; (r = t.next()) !== null; )
1548
1548
  switch (r.fieldId) {
1549
- case gt: {
1549
+ case Ct: {
1550
1550
  if (r.isNull) throw new Error();
1551
1551
  e.ResultTypeName = r.asString();
1552
1552
  break;
1553
1553
  }
1554
- case Ct: {
1554
+ case bt: {
1555
1555
  if (r.isNull) throw new Error();
1556
1556
  e.FunctionName = r.asString();
1557
1557
  break;
1558
1558
  }
1559
- case bt: {
1559
+ case Rt: {
1560
1560
  if (r.isNull) throw new Error();
1561
1561
  e.EnumerableItemTypeName = r.asString();
1562
1562
  break;
1563
1563
  }
1564
- case Rt: {
1564
+ case kt: {
1565
1565
  if (r.isNull) throw new Error();
1566
1566
  e.FunctionId = r.asGuid();
1567
1567
  break;
1568
1568
  }
1569
- case kt: {
1569
+ case Ut: {
1570
1570
  if (r.isNull) throw new Error();
1571
1571
  e.Description = r.asString();
1572
1572
  break;
1573
1573
  }
1574
- case Ut: {
1574
+ case Dt: {
1575
1575
  if (r.isNull) throw new Error();
1576
1576
  e.IsCancellable = r.asBool();
1577
1577
  break;
1578
1578
  }
1579
- case Dt: {
1579
+ case Ot: {
1580
1580
  if (r.isNull) throw new Error();
1581
1581
  e.RequiresInstance = r.asBool();
1582
1582
  break;
1583
1583
  }
1584
- case Ot: {
1584
+ case Mt: {
1585
1585
  if (r.isNull) throw new Error();
1586
1586
  e.LlmInlineResult = r.asBool();
1587
1587
  break;
1588
1588
  }
1589
- case Mt: {
1589
+ case vt: {
1590
1590
  if (r.isNull) throw new Error();
1591
1591
  e.IsEnumerable = r.asBool();
1592
1592
  break;
1593
1593
  }
1594
1594
  case Lt: {
1595
1595
  if (r.isNull) throw new Error();
1596
- e.Parameters = si(r.asArray());
1596
+ e.Parameters = oi(r.asArray());
1597
1597
  break;
1598
1598
  }
1599
- case vt: {
1599
+ case Pt: {
1600
1600
  if (r.isNull) throw new Error();
1601
1601
  e.LlmCallOnlyOnce = r.asBool();
1602
1602
  break;
1603
1603
  }
1604
1604
  }
1605
1605
  }
1606
- function ni(t, e, r) {
1607
- const n = ei(t);
1608
- return F(qs, n, Ge, e, r);
1606
+ function ii(t, e, r) {
1607
+ const n = ri(t);
1608
+ return P(ei, n, xe, e, r);
1609
1609
  }
1610
- function si(t) {
1610
+ function oi(t) {
1611
1611
  const e = [];
1612
1612
  let r;
1613
1613
  for (; (r = t.next()) !== null; )
1614
- e.push(ci(r.asObject()));
1614
+ e.push(ui(r.asObject()));
1615
1615
  return e;
1616
1616
  }
1617
- const ii = 1, Bt = 607861992, Gt = 894485888, xt = 972460562, Wt = 1368629611, Vt = 1883521406, Ht = 2603556958, $t = 3609695522, Kt = 4075263697, jt = 4257460908;
1618
- function oi(t) {
1617
+ const ai = 1, xt = 607861992, Gt = 894485888, Wt = 972460562, Vt = 1368629611, Ht = 1883521406, $t = 2603556958, Kt = 3609695522, Yt = 4075263697, jt = 4257460908;
1618
+ function ci(t) {
1619
1619
  const e = {};
1620
- return Yt(e), e;
1620
+ return zt(e), e;
1621
1621
  }
1622
- function Yt(t) {
1622
+ function zt(t) {
1623
1623
  return t.ParameterIndex = 0, t.ParameterName = "", t.TypeName = "", t.HasDefaultValue = !1, t.DefaultValueJson = "", t.DefaultValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.Description = "", t;
1624
1624
  }
1625
- function ai(t, e) {
1626
- e.writeBoolField(Bt, t.HasDefaultValue), e.writeStringField(Gt, t.DefaultValueJson), e.writeStringField(xt, t.EnumerableItemTypeName), e.writeStringField(Wt, t.Description), e.writeBinaryField(Vt, t.DefaultValueData), e.writeBoolField(Ht, t.IsEnumerable), e.writeStringField($t, t.TypeName), e.writeStringField(Kt, t.ParameterName), e.writeInt32Field(jt, t.ParameterIndex | 0);
1625
+ function li(t, e) {
1626
+ e.writeBoolField(xt, t.HasDefaultValue), e.writeStringField(Gt, t.DefaultValueJson), e.writeStringField(Wt, t.EnumerableItemTypeName), e.writeStringField(Vt, t.Description), e.writeBinaryField(Ht, t.DefaultValueData), e.writeBoolField($t, t.IsEnumerable), e.writeStringField(Kt, t.TypeName), e.writeStringField(Yt, t.ParameterName), e.writeInt32Field(jt, t.ParameterIndex | 0);
1627
1627
  }
1628
- function ci(t, e) {
1629
- const r = e ?? oi();
1630
- return Yt(r), li(t, r), r;
1628
+ function ui(t, e) {
1629
+ const r = e ?? ci();
1630
+ return zt(r), di(t, r), r;
1631
1631
  }
1632
- function li(t, e) {
1632
+ function di(t, e) {
1633
1633
  let r;
1634
1634
  for (; (r = t.next()) !== null; )
1635
1635
  switch (r.fieldId) {
1636
- case Bt: {
1636
+ case xt: {
1637
1637
  if (r.isNull) throw new Error();
1638
1638
  e.HasDefaultValue = r.asBool();
1639
1639
  break;
@@ -1643,32 +1643,32 @@ function li(t, e) {
1643
1643
  e.DefaultValueJson = r.asString();
1644
1644
  break;
1645
1645
  }
1646
- case xt: {
1646
+ case Wt: {
1647
1647
  if (r.isNull) throw new Error();
1648
1648
  e.EnumerableItemTypeName = r.asString();
1649
1649
  break;
1650
1650
  }
1651
- case Wt: {
1651
+ case Vt: {
1652
1652
  if (r.isNull) throw new Error();
1653
1653
  e.Description = r.asString();
1654
1654
  break;
1655
1655
  }
1656
- case Vt: {
1656
+ case Ht: {
1657
1657
  if (r.isNull) throw new Error();
1658
1658
  e.DefaultValueData = r.asBinary();
1659
1659
  break;
1660
1660
  }
1661
- case Ht: {
1661
+ case $t: {
1662
1662
  if (r.isNull) throw new Error();
1663
1663
  e.IsEnumerable = r.asBool();
1664
1664
  break;
1665
1665
  }
1666
- case $t: {
1666
+ case Kt: {
1667
1667
  if (r.isNull) throw new Error();
1668
1668
  e.TypeName = r.asString();
1669
1669
  break;
1670
1670
  }
1671
- case Kt: {
1671
+ case Yt: {
1672
1672
  if (r.isNull) throw new Error();
1673
1673
  e.ParameterName = r.asString();
1674
1674
  break;
@@ -1680,268 +1680,268 @@ function li(t, e) {
1680
1680
  }
1681
1681
  }
1682
1682
  }
1683
- const zt = 1, ui = 1048638, di = 3678477544;
1684
- function hi(t) {
1683
+ const Xt = 1, hi = 1048638, fi = 3678477544;
1684
+ function pi(t) {
1685
1685
  const e = {};
1686
- return fi(e), t && Object.assign(e, t), e;
1686
+ return Ei(e), t && Object.assign(e, t), e;
1687
1687
  }
1688
- function fi(t) {
1688
+ function Ei(t) {
1689
1689
  return t.Functions = [], t;
1690
1690
  }
1691
- function pi(t) {
1692
- const e = new U(zt);
1693
- return Ei(t, e), e.finish();
1691
+ function Ii(t) {
1692
+ const e = new U(Xt);
1693
+ return mi(t, e), e.finish();
1694
1694
  }
1695
- function Ei(t, e) {
1696
- e.writeArrayField(di, b.Object, (r) => {
1695
+ function mi(t, e) {
1696
+ e.writeArrayField(fi, b.Object, (r) => {
1697
1697
  for (const n of t.Functions)
1698
- r.writeObject(Ge, (s) => {
1699
- Pt(n, s);
1698
+ r.writeObject(xe, (s) => {
1699
+ Bt(n, s);
1700
1700
  });
1701
1701
  });
1702
1702
  }
1703
- function Ii(t, e, r) {
1704
- const n = pi(t);
1705
- return F(ui, n, zt, e, r);
1703
+ function _i(t, e, r) {
1704
+ const n = Ii(t);
1705
+ return P(hi, n, Xt, e, r);
1706
1706
  }
1707
- const Xt = 1, mi = 1048602, _i = 349453957, Ti = 703025676, Si = 3403385840, wi = 3748161056, yi = 4289118421;
1708
- function Ai(t) {
1707
+ const Jt = 1, Ti = 1048602, Si = 349453957, wi = 703025676, yi = 3403385840, Ai = 3748161056, Ni = 4289118421;
1708
+ function gi(t) {
1709
1709
  const e = {};
1710
- return Ni(e), t && Object.assign(e, t), e;
1710
+ return Ci(e), t && Object.assign(e, t), e;
1711
1711
  }
1712
- function Ni(t) {
1712
+ function Ci(t) {
1713
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
- function gi(t) {
1716
- const e = new U(Xt);
1717
- return Ci(t, e), e.finish();
1715
+ function bi(t) {
1716
+ const e = new U(Jt);
1717
+ return Ri(t, e), e.finish();
1718
1718
  }
1719
- function Ci(t, e) {
1720
- e.writeBinaryField(_i, t.ResultData), e.writeStringField(Ti, t.ResultTypeName), e.writeStringField(Si, t.ResultJson), e.writeGuidField(wi, t.CallId), e.writeGuidField(yi, t.InstanceId);
1719
+ function Ri(t, e) {
1720
+ e.writeBinaryField(Si, t.ResultData), e.writeStringField(wi, t.ResultTypeName), e.writeStringField(yi, t.ResultJson), e.writeGuidField(Ai, t.CallId), e.writeGuidField(Ni, t.InstanceId);
1721
1721
  }
1722
- function bi(t, e, r) {
1723
- const n = gi(t);
1724
- return F(mi, n, Xt, e, r);
1722
+ function ki(t, e, r) {
1723
+ const n = bi(t);
1724
+ return P(Ti, n, Jt, e, r);
1725
1725
  }
1726
- const Jt = 1, Ri = 65549;
1726
+ const Qt = 1, Ui = 65549;
1727
1727
  function ze(t) {
1728
1728
  return {};
1729
1729
  }
1730
- function ki(t) {
1731
- return new U(Jt).finish();
1730
+ function Di(t) {
1731
+ return new U(Qt).finish();
1732
1732
  }
1733
1733
  function Xe(t, e, r) {
1734
- const n = ki();
1735
- return F(Ri, n, Jt, e, r);
1736
- }
1737
- const Ui = 3167053791, Di = 3342364356, Oi = 3612929027;
1738
- function Qt(t) {
1739
- const e = {};
1740
- return qt(e), e;
1734
+ const n = Di();
1735
+ return P(Ui, n, Qt, e, r);
1741
1736
  }
1737
+ const Oi = 3167053791, Mi = 3342364356, vi = 3612929027;
1742
1738
  function qt(t) {
1743
- return t.Category = "", t.Type = ht.Face, t.FaceBlendshapes = [], t;
1739
+ const e = {};
1740
+ return Zt(e), e;
1744
1741
  }
1745
- function Mi(t, e) {
1746
- const r = e ?? Qt();
1747
- return qt(r), Li(t, r), r;
1742
+ function Zt(t) {
1743
+ return t.Category = "", t.Type = ft.Face, t.FaceBlendshapes = [], t;
1748
1744
  }
1749
1745
  function Li(t, e) {
1746
+ const r = e ?? qt();
1747
+ return Zt(r), Pi(t, r), r;
1748
+ }
1749
+ function Pi(t, e) {
1750
1750
  let r;
1751
1751
  for (; (r = t.next()) !== null; )
1752
1752
  switch (r.fieldId) {
1753
- case Ui: {
1753
+ case Oi: {
1754
1754
  if (r.isNull) throw new Error();
1755
1755
  e.Type = r.asInt32();
1756
1756
  break;
1757
1757
  }
1758
- case Di: {
1758
+ case Mi: {
1759
1759
  if (r.isNull) throw new Error();
1760
- e.FaceBlendshapes = vi(r.asArray());
1760
+ e.FaceBlendshapes = Fi(r.asArray());
1761
1761
  break;
1762
1762
  }
1763
- case Oi: {
1763
+ case vi: {
1764
1764
  if (r.isNull) throw new Error();
1765
1765
  e.Category = r.asString();
1766
1766
  break;
1767
1767
  }
1768
1768
  }
1769
1769
  }
1770
- function vi(t) {
1770
+ function Fi(t) {
1771
1771
  const e = [];
1772
1772
  let r;
1773
1773
  for (; (r = t.next()) !== null; )
1774
1774
  e.push(r.asString());
1775
1775
  return e;
1776
1776
  }
1777
- const Fi = 3612929027;
1778
- function Zt(t) {
1777
+ const Bi = 3612929027;
1778
+ function er(t) {
1779
1779
  const e = {};
1780
- return er(e), e;
1780
+ return tr(e), e;
1781
1781
  }
1782
- function er(t) {
1782
+ function tr(t) {
1783
1783
  return t.Category = "", t;
1784
1784
  }
1785
- function Pi(t, e) {
1786
- const r = e ?? Zt();
1787
- return er(r), Bi(t, r), r;
1785
+ function xi(t, e) {
1786
+ const r = e ?? er();
1787
+ return tr(r), Gi(t, r), r;
1788
1788
  }
1789
- function Bi(t, e) {
1789
+ function Gi(t, e) {
1790
1790
  let r;
1791
1791
  for (; (r = t.next()) !== null; )
1792
1792
  switch (r.fieldId) {
1793
- case Fi: {
1793
+ case Bi: {
1794
1794
  if (r.isNull) throw new Error();
1795
1795
  e.Category = r.asString();
1796
1796
  break;
1797
1797
  }
1798
1798
  }
1799
1799
  }
1800
- const Gi = 1368629611, xi = 2950031986, Wi = 3284746250, Vi = 4065070594;
1801
- function tr(t) {
1800
+ const Wi = 1368629611, Vi = 2950031986, Hi = 3284746250, $i = 4065070594;
1801
+ function rr(t) {
1802
1802
  const e = {};
1803
- return rr(e), e;
1803
+ return nr(e), e;
1804
1804
  }
1805
- function rr(t) {
1806
- return t.Description = "", t.Codec = ft.H264, t.Width = 0, t.Height = 0, t;
1805
+ function nr(t) {
1806
+ return t.Description = "", t.Codec = pt.H264, t.Width = 0, t.Height = 0, t;
1807
1807
  }
1808
- function Hi(t, e) {
1809
- const r = e ?? tr();
1810
- return rr(r), $i(t, r), r;
1808
+ function Ki(t, e) {
1809
+ const r = e ?? rr();
1810
+ return nr(r), Yi(t, r), r;
1811
1811
  }
1812
- function $i(t, e) {
1812
+ function Yi(t, e) {
1813
1813
  let r;
1814
1814
  for (; (r = t.next()) !== null; )
1815
1815
  switch (r.fieldId) {
1816
- case Gi: {
1816
+ case Wi: {
1817
1817
  if (r.isNull) throw new Error();
1818
1818
  e.Description = r.asString();
1819
1819
  break;
1820
1820
  }
1821
- case xi: {
1821
+ case Vi: {
1822
1822
  if (r.isNull) throw new Error();
1823
1823
  e.Height = r.asInt32();
1824
1824
  break;
1825
1825
  }
1826
- case Wi: {
1826
+ case Hi: {
1827
1827
  if (r.isNull) throw new Error();
1828
1828
  e.Codec = r.asInt32();
1829
1829
  break;
1830
1830
  }
1831
- case Vi: {
1831
+ case $i: {
1832
1832
  if (r.isNull) throw new Error();
1833
1833
  e.Width = r.asInt32();
1834
1834
  break;
1835
1835
  }
1836
1836
  }
1837
1837
  }
1838
- const Ki = 3, ji = 65539, Yi = 693643444, zi = 1144553441, Xi = 1497620243, Ji = 1559330978, Qi = 1999510636, qi = 2277643855, Zi = 2469008121, eo = 3219210453, to = 3678477544, ro = 3696445035, no = 3707543140, so = 3712281496, io = 3823842552, oo = 3895362455, ao = 3897397815, co = 4225107827;
1839
- function lo(t) {
1838
+ const ji = 3, zi = 65539, Xi = 693643444, Ji = 1144553441, Qi = 1497620243, qi = 1559330978, Zi = 1999510636, eo = 2277643855, to = 2469008121, ro = 3219210453, no = 3678477544, so = 3696445035, io = 3707543140, oo = 3712281496, ao = 3823842552, co = 3895362455, lo = 3897397815, uo = 4225107827;
1839
+ function ho(t) {
1840
1840
  const e = {};
1841
- return nr(e), e;
1841
+ return sr(e), e;
1842
1842
  }
1843
- function nr(t) {
1843
+ function sr(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
- function uo(t, e) {
1847
- const r = j.create(t);
1848
- return ho(r, e);
1846
+ function fo(t, e) {
1847
+ const r = Y.create(t);
1848
+ return po(r, e);
1849
1849
  }
1850
- function ho(t, e) {
1851
- const r = e ?? lo();
1852
- return nr(r), fo(t, r), r;
1850
+ function po(t, e) {
1851
+ const r = e ?? ho();
1852
+ return sr(r), Eo(t, r), r;
1853
1853
  }
1854
- function fo(t, e) {
1854
+ function Eo(t, e) {
1855
1855
  let r;
1856
1856
  for (; (r = t.next()) !== null; )
1857
1857
  switch (r.fieldId) {
1858
- case Yi: {
1858
+ case Xi: {
1859
1859
  if (r.isNull) throw new Error();
1860
1860
  e.FirstUserId = r.asString();
1861
1861
  break;
1862
1862
  }
1863
- case zi: {
1863
+ case Ji: {
1864
1864
  if (r.isNull) throw new Error();
1865
- e.Clients = Eo(r.asDictionary());
1865
+ e.Clients = mo(r.asDictionary());
1866
1866
  break;
1867
1867
  }
1868
- case Xi: {
1868
+ case Qi: {
1869
1869
  if (r.isNull) throw new Error();
1870
- e.TrackingStreams = Io(r.asDictionary());
1870
+ e.TrackingStreams = _o(r.asDictionary());
1871
1871
  break;
1872
1872
  }
1873
- case Ji: {
1873
+ case qi: {
1874
1874
  if (r.isNull) throw new Error();
1875
1875
  e.ChannelId = r.asString();
1876
1876
  break;
1877
1877
  }
1878
- case Qi: {
1878
+ case Zi: {
1879
1879
  if (r.isNull) throw new Error();
1880
1880
  e.SessionId = r.asString();
1881
1881
  break;
1882
1882
  }
1883
- case qi: {
1883
+ case eo: {
1884
1884
  if (r.isNull) throw new Error();
1885
1885
  e.ChannelUrl = r.asString();
1886
1886
  break;
1887
1887
  }
1888
- case Zi: {
1888
+ case to: {
1889
1889
  if (r.isNull) throw new Error();
1890
1890
  e.ChannelName = r.asString();
1891
1891
  break;
1892
1892
  }
1893
- case eo: {
1893
+ case ro: {
1894
1894
  if (r.isNull) throw new Error();
1895
1895
  e.OrganisationName = r.asString();
1896
1896
  break;
1897
1897
  }
1898
- case to: {
1898
+ case no: {
1899
1899
  if (r.isNull) throw new Error();
1900
- e.Functions = mo(r.asDictionary());
1900
+ e.Functions = To(r.asDictionary());
1901
1901
  break;
1902
1902
  }
1903
- case ro: {
1903
+ case so: {
1904
1904
  if (r.isNull) throw new Error();
1905
- e.UIStreams = _o(r.asDictionary());
1905
+ e.UIStreams = So(r.asDictionary());
1906
1906
  break;
1907
1907
  }
1908
- case no: {
1908
+ case io: {
1909
1909
  if (r.isNull) throw new Error();
1910
1910
  e.SpaceId = r.asString();
1911
1911
  break;
1912
1912
  }
1913
- case so: {
1913
+ case oo: {
1914
1914
  if (r.isNull) throw new Error();
1915
1915
  e.PrimaryUserId = r.asString();
1916
1916
  break;
1917
1917
  }
1918
- case io: {
1918
+ case ao: {
1919
1919
  if (r.isNull) throw new Error();
1920
1920
  e.ChannelInstanceId = r.asString();
1921
1921
  break;
1922
1922
  }
1923
- case oo: {
1923
+ case co: {
1924
1924
  if (r.isNull) throw new Error();
1925
- e.AudioStreams = To(r.asDictionary());
1925
+ e.AudioStreams = wo(r.asDictionary());
1926
1926
  break;
1927
1927
  }
1928
- case ao: {
1928
+ case lo: {
1929
1929
  if (r.isNull) throw new Error();
1930
- e.VideoStreams = So(r.asDictionary());
1930
+ e.VideoStreams = yo(r.asDictionary());
1931
1931
  break;
1932
1932
  }
1933
- case co: {
1933
+ case uo: {
1934
1934
  if (r.isNull) throw new Error();
1935
1935
  e.SpaceName = r.asString();
1936
1936
  break;
1937
1937
  }
1938
1938
  }
1939
1939
  }
1940
- function po(t, e) {
1941
- const r = De(t, ji, Ki);
1942
- return uo(r, e);
1940
+ function Io(t, e) {
1941
+ const r = De(t, zi, ji);
1942
+ return fo(r, e);
1943
1943
  }
1944
- function Eo(t) {
1944
+ function mo(t) {
1945
1945
  const e = /* @__PURE__ */ Object.create(null);
1946
1946
  let r;
1947
1947
  for (; (r = t.next()) !== null; ) {
@@ -1950,233 +1950,233 @@ function Eo(t) {
1950
1950
  }
1951
1951
  return e;
1952
1952
  }
1953
- function Io(t) {
1953
+ function _o(t) {
1954
1954
  const e = /* @__PURE__ */ Object.create(null);
1955
1955
  let r;
1956
1956
  for (; (r = t.next()) !== null; ) {
1957
1957
  const n = r.key.asString();
1958
- e[n] = zo(r.value.asObject());
1958
+ e[n] = Jo(r.value.asObject());
1959
1959
  }
1960
1960
  return e;
1961
1961
  }
1962
- function mo(t) {
1962
+ function To(t) {
1963
1963
  const e = /* @__PURE__ */ Object.create(null);
1964
1964
  let r;
1965
1965
  for (; (r = t.next()) !== null; ) {
1966
1966
  const n = r.key.asInt32();
1967
- e[n] = wo(r.value.asArray());
1967
+ e[n] = Ao(r.value.asArray());
1968
1968
  }
1969
1969
  return e;
1970
1970
  }
1971
- function _o(t) {
1971
+ function So(t) {
1972
1972
  const e = /* @__PURE__ */ Object.create(null);
1973
1973
  let r;
1974
1974
  for (; (r = t.next()) !== null; ) {
1975
1975
  const n = r.key.asString();
1976
- e[n] = bo(r.value.asObject());
1976
+ e[n] = ko(r.value.asObject());
1977
1977
  }
1978
1978
  return e;
1979
1979
  }
1980
- function To(t) {
1980
+ function wo(t) {
1981
1981
  const e = /* @__PURE__ */ Object.create(null);
1982
1982
  let r;
1983
1983
  for (; (r = t.next()) !== null; ) {
1984
1984
  const n = r.key.asString();
1985
- e[n] = Lo(r.value.asObject());
1985
+ e[n] = Po(r.value.asObject());
1986
1986
  }
1987
1987
  return e;
1988
1988
  }
1989
- function So(t) {
1989
+ function yo(t) {
1990
1990
  const e = /* @__PURE__ */ Object.create(null);
1991
1991
  let r;
1992
1992
  for (; (r = t.next()) !== null; ) {
1993
1993
  const n = r.key.asString();
1994
- e[n] = Wo(r.value.asObject());
1994
+ e[n] = Ho(r.value.asObject());
1995
1995
  }
1996
1996
  return e;
1997
1997
  }
1998
- function wo(t) {
1998
+ function Ao(t) {
1999
1999
  const e = [];
2000
2000
  let r;
2001
2001
  for (; (r = t.next()) !== null; )
2002
- e.push(ti(r.asObject()));
2002
+ e.push(ni(r.asObject()));
2003
2003
  return e;
2004
2004
  }
2005
- const yo = 161083277, Ao = 325678206, No = 3469892363, go = 3645544153;
2006
- function Co(t) {
2005
+ const No = 161083277, go = 325678206, Co = 3469892363, bo = 3645544153;
2006
+ function Ro(t) {
2007
2007
  const e = {};
2008
- return sr(e), e;
2008
+ return ir(e), e;
2009
2009
  }
2010
- function sr(t) {
2011
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Zt(), t;
2010
+ function ir(t) {
2011
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = er(), t;
2012
2012
  }
2013
- function bo(t, e) {
2014
- const r = e ?? Co();
2015
- return sr(r), Ro(t, r), r;
2013
+ function ko(t, e) {
2014
+ const r = e ?? Ro();
2015
+ return ir(r), Uo(t, r), r;
2016
2016
  }
2017
- function Ro(t, e) {
2017
+ function Uo(t, e) {
2018
2018
  let r;
2019
2019
  for (; (r = t.next()) !== null; )
2020
2020
  switch (r.fieldId) {
2021
- case yo: {
2021
+ case No: {
2022
2022
  if (r.isNull) throw new Error();
2023
2023
  e.StreamId = r.asString();
2024
2024
  break;
2025
2025
  }
2026
- case Ao: {
2026
+ case go: {
2027
2027
  if (r.isNull) throw new Error();
2028
2028
  e.ClientSessionId = r.asInt32();
2029
2029
  break;
2030
2030
  }
2031
- case No: {
2031
+ case Co: {
2032
2032
  if (r.isNull) throw new Error();
2033
2033
  e.TrackId = r.asInt32();
2034
2034
  break;
2035
2035
  }
2036
- case go: {
2036
+ case bo: {
2037
2037
  if (r.isNull) throw new Error();
2038
- e.Info = Pi(r.asObject());
2038
+ e.Info = xi(r.asObject());
2039
2039
  break;
2040
2040
  }
2041
2041
  }
2042
2042
  }
2043
- const ko = 161083277, Uo = 325678206, Do = 3469892363, Oo = 3645544153;
2044
- function Mo(t) {
2043
+ const Do = 161083277, Oo = 325678206, Mo = 3469892363, vo = 3645544153;
2044
+ function Lo(t) {
2045
2045
  const e = {};
2046
- return ir(e), e;
2046
+ return or(e), e;
2047
2047
  }
2048
- function ir(t) {
2049
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = It(), t;
2048
+ function or(t) {
2049
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = mt(), t;
2050
2050
  }
2051
- function Lo(t, e) {
2052
- const r = e ?? Mo();
2053
- return ir(r), vo(t, r), r;
2051
+ function Po(t, e) {
2052
+ const r = e ?? Lo();
2053
+ return or(r), Fo(t, r), r;
2054
2054
  }
2055
- function vo(t, e) {
2055
+ function Fo(t, e) {
2056
2056
  let r;
2057
2057
  for (; (r = t.next()) !== null; )
2058
2058
  switch (r.fieldId) {
2059
- case ko: {
2059
+ case Do: {
2060
2060
  if (r.isNull) throw new Error();
2061
2061
  e.StreamId = r.asString();
2062
2062
  break;
2063
2063
  }
2064
- case Uo: {
2064
+ case Oo: {
2065
2065
  if (r.isNull) throw new Error();
2066
2066
  e.ClientSessionId = r.asInt32();
2067
2067
  break;
2068
2068
  }
2069
- case Do: {
2069
+ case Mo: {
2070
2070
  if (r.isNull) throw new Error();
2071
2071
  e.TrackId = r.asInt32();
2072
2072
  break;
2073
2073
  }
2074
- case Oo: {
2074
+ case vo: {
2075
2075
  if (r.isNull) throw new Error();
2076
- e.Info = cn(r.asObject());
2076
+ e.Info = un(r.asObject());
2077
2077
  break;
2078
2078
  }
2079
2079
  }
2080
2080
  }
2081
- const Fo = 161083277, Po = 325678206, Bo = 3469892363, Go = 3645544153;
2082
- function xo(t) {
2081
+ const Bo = 161083277, xo = 325678206, Go = 3469892363, Wo = 3645544153;
2082
+ function Vo(t) {
2083
2083
  const e = {};
2084
- return or(e), e;
2084
+ return ar(e), e;
2085
2085
  }
2086
- function or(t) {
2087
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = tr(), t;
2086
+ function ar(t) {
2087
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = rr(), t;
2088
2088
  }
2089
- function Wo(t, e) {
2090
- const r = e ?? xo();
2091
- return or(r), Vo(t, r), r;
2089
+ function Ho(t, e) {
2090
+ const r = e ?? Vo();
2091
+ return ar(r), $o(t, r), r;
2092
2092
  }
2093
- function Vo(t, e) {
2093
+ function $o(t, e) {
2094
2094
  let r;
2095
2095
  for (; (r = t.next()) !== null; )
2096
2096
  switch (r.fieldId) {
2097
- case Fo: {
2097
+ case Bo: {
2098
2098
  if (r.isNull) throw new Error();
2099
2099
  e.StreamId = r.asString();
2100
2100
  break;
2101
2101
  }
2102
- case Po: {
2102
+ case xo: {
2103
2103
  if (r.isNull) throw new Error();
2104
2104
  e.ClientSessionId = r.asInt32();
2105
2105
  break;
2106
2106
  }
2107
- case Bo: {
2107
+ case Go: {
2108
2108
  if (r.isNull) throw new Error();
2109
2109
  e.TrackId = r.asInt32();
2110
2110
  break;
2111
2111
  }
2112
- case Go: {
2112
+ case Wo: {
2113
2113
  if (r.isNull) throw new Error();
2114
- e.Info = Hi(r.asObject());
2114
+ e.Info = Ki(r.asObject());
2115
2115
  break;
2116
2116
  }
2117
2117
  }
2118
2118
  }
2119
- const Ho = 161083277, $o = 325678206, Ko = 3469892363, jo = 3645544153;
2120
- function Yo(t) {
2119
+ const Ko = 161083277, Yo = 325678206, jo = 3469892363, zo = 3645544153;
2120
+ function Xo(t) {
2121
2121
  const e = {};
2122
- return ar(e), e;
2122
+ return cr(e), e;
2123
2123
  }
2124
- function ar(t) {
2125
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Qt(), t;
2124
+ function cr(t) {
2125
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = qt(), t;
2126
2126
  }
2127
- function zo(t, e) {
2128
- const r = e ?? Yo();
2129
- return ar(r), Xo(t, r), r;
2127
+ function Jo(t, e) {
2128
+ const r = e ?? Xo();
2129
+ return cr(r), Qo(t, r), r;
2130
2130
  }
2131
- function Xo(t, e) {
2131
+ function Qo(t, e) {
2132
2132
  let r;
2133
2133
  for (; (r = t.next()) !== null; )
2134
2134
  switch (r.fieldId) {
2135
- case Ho: {
2135
+ case Ko: {
2136
2136
  if (r.isNull) throw new Error();
2137
2137
  e.StreamId = r.asString();
2138
2138
  break;
2139
2139
  }
2140
- case $o: {
2140
+ case Yo: {
2141
2141
  if (r.isNull) throw new Error();
2142
2142
  e.ClientSessionId = r.asInt32();
2143
2143
  break;
2144
2144
  }
2145
- case Ko: {
2145
+ case jo: {
2146
2146
  if (r.isNull) throw new Error();
2147
2147
  e.TrackId = r.asInt32();
2148
2148
  break;
2149
2149
  }
2150
- case jo: {
2150
+ case zo: {
2151
2151
  if (r.isNull) throw new Error();
2152
- e.Info = Mi(r.asObject());
2152
+ e.Info = Li(r.asObject());
2153
2153
  break;
2154
2154
  }
2155
2155
  }
2156
2156
  }
2157
- const cr = 1, Jo = 131074;
2158
- function lr(t) {
2157
+ const lr = 1, qo = 131074;
2158
+ function ur(t) {
2159
2159
  return {};
2160
2160
  }
2161
- function Qo(t) {
2162
- return new U(cr).finish();
2161
+ function Zo(t) {
2162
+ return new U(lr).finish();
2163
2163
  }
2164
- function ur(t, e, r) {
2165
- const n = Qo();
2166
- return F(Jo, n, cr, e, r);
2164
+ function dr(t, e, r) {
2165
+ const n = Zo();
2166
+ return P(qo, n, lr, e, r);
2167
2167
  }
2168
- const dr = 1, qo = 8388612;
2169
- function Zo(t) {
2168
+ const hr = 1, ea = 8388612;
2169
+ function ta(t) {
2170
2170
  return {};
2171
2171
  }
2172
- function ea(t) {
2173
- return new U(dr).finish();
2172
+ function ra(t) {
2173
+ return new U(hr).finish();
2174
2174
  }
2175
- function ta(t, e, r) {
2176
- const n = ea();
2177
- return F(qo, n, dr, e, r);
2175
+ function na(t, e, r) {
2176
+ const n = ra();
2177
+ return P(ea, n, hr, e, r);
2178
2178
  }
2179
- function ra(t) {
2179
+ function sa(t) {
2180
2180
  return new Worker(
2181
2181
  "" + new URL("assets/protocol-worker-E7o-6_bZ.js", import.meta.url).href,
2182
2182
  {
@@ -2185,52 +2185,52 @@ function ra(t) {
2185
2185
  }
2186
2186
  );
2187
2187
  }
2188
- class xe extends Error {
2188
+ class Ge extends Error {
2189
2189
  constructor(e, r) {
2190
2190
  super(e), this.cause = r, this.name = "ConnectionError";
2191
2191
  }
2192
2192
  }
2193
- class w extends xe {
2193
+ class w extends Ge {
2194
2194
  constructor(e, r) {
2195
2195
  super(e, r), this.name = "AuthenticationError";
2196
2196
  }
2197
2197
  }
2198
- class x extends xe {
2198
+ class G extends Ge {
2199
2199
  constructor(e, r) {
2200
2200
  super(e, r), this.name = "TransportError";
2201
2201
  }
2202
2202
  }
2203
- class We extends x {
2203
+ class We extends G {
2204
2204
  constructor(e) {
2205
2205
  super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
2206
2206
  }
2207
2207
  }
2208
- class na extends xe {
2208
+ class ia extends Ge {
2209
2209
  constructor(e) {
2210
2210
  super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
2211
2211
  }
2212
2212
  }
2213
- class sa extends w {
2213
+ class oa 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 w {
2218
+ class ul extends w {
2219
2219
  constructor(e) {
2220
2220
  super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
2221
2221
  }
2222
2222
  }
2223
- class ul extends w {
2223
+ class dl 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 w {
2228
+ class hl extends w {
2229
2229
  constructor() {
2230
2230
  super("No channels available in this space"), this.name = "NoChannelsError";
2231
2231
  }
2232
2232
  }
2233
- function hr(t, e) {
2233
+ function fr(t, e) {
2234
2234
  return new Promise((r, n) => {
2235
2235
  const s = () => {
2236
2236
  clearTimeout(i), n(new Error("Aborted"));
@@ -2244,33 +2244,33 @@ function hr(t, e) {
2244
2244
  e?.addEventListener("abort", s, { once: !0 });
2245
2245
  });
2246
2246
  }
2247
- var fr = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.NONE = 4] = "NONE", t))(fr || {});
2248
- let Ve = 1, de = null;
2249
- function hl(t) {
2247
+ var pr = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.NONE = 4] = "NONE", t))(pr || {});
2248
+ let Ve = 1, he = null;
2249
+ function fl(t) {
2250
2250
  Ve = t;
2251
2251
  }
2252
- function fl() {
2252
+ function pl() {
2253
2253
  return Ve;
2254
2254
  }
2255
- function ia(t) {
2256
- de = t;
2255
+ function aa(t) {
2256
+ he = t;
2257
2257
  }
2258
- function pl() {
2259
- return de;
2258
+ function El() {
2259
+ return he;
2260
2260
  }
2261
- const oa = {
2261
+ const ca = {
2262
2262
  0: "DEBUG",
2263
2263
  1: "INFO",
2264
2264
  2: "WARN",
2265
2265
  3: "ERROR",
2266
2266
  4: "NONE"
2267
2267
  };
2268
- function aa(t, e) {
2268
+ function la(t, e) {
2269
2269
  return `[${t}] ${e}`;
2270
2270
  }
2271
2271
  function se(t, e, r, n) {
2272
- const s = (/* @__PURE__ */ new Date()).toISOString(), i = oa[t];
2273
- if (de && de({
2272
+ const s = (/* @__PURE__ */ new Date()).toISOString(), i = ca[t];
2273
+ if (he && he({
2274
2274
  timestamp: s,
2275
2275
  level: t,
2276
2276
  levelName: i,
@@ -2278,7 +2278,7 @@ function se(t, e, r, n) {
2278
2278
  message: r,
2279
2279
  args: n
2280
2280
  }), Ve <= t) {
2281
- const o = aa(e, r);
2281
+ const o = la(e, r);
2282
2282
  switch (t) {
2283
2283
  case 0:
2284
2284
  console.debug(o, ...n);
@@ -2295,7 +2295,7 @@ function se(t, e, r, n) {
2295
2295
  }
2296
2296
  }
2297
2297
  }
2298
- function L(t) {
2298
+ function v(t) {
2299
2299
  return {
2300
2300
  debug(e, ...r) {
2301
2301
  se(0, t, e, r);
@@ -2311,8 +2311,8 @@ function L(t) {
2311
2311
  }
2312
2312
  };
2313
2313
  }
2314
- const ie = L("WebSocketTransport"), ca = 1e4;
2315
- class la {
2314
+ const ie = v("WebSocketTransport"), ua = 1e4;
2315
+ class da {
2316
2316
  ws = null;
2317
2317
  keepaliveTimeout = null;
2318
2318
  // Pre-allocated keepalive response message to avoid allocation per keepalive
@@ -2331,22 +2331,22 @@ class la {
2331
2331
  try {
2332
2332
  this.ws = new WebSocket(e), this.ws.binaryType = "arraybuffer";
2333
2333
  } catch (l) {
2334
- s(new x(`Failed to create WebSocket: ${l}`, l instanceof Error ? l : void 0));
2334
+ s(new G(`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 x("WebSocket connection timeout")));
2342
- }, ca);
2341
+ o || (o = !0, a(), this.ws?.close(), s(new G("WebSocket connection timeout")));
2342
+ }, ua);
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 x("WebSocket connection failed")));
2346
+ clearTimeout(c), ie.error("WebSocket error"), o || (o = !0, a(), s(new G("WebSocket connection failed")));
2347
2347
  }, this.ws.onclose = (l) => {
2348
2348
  if (this.clearKeepaliveTimeout(), !i && !o) {
2349
- o = !0, a(), s(new x("WebSocket connection closed before opening"));
2349
+ o = !0, a(), s(new G("WebSocket connection closed before opening"));
2350
2350
  return;
2351
2351
  }
2352
2352
  const p = l.wasClean && (l.code === 1e3 || l.code === 1001), d = l.code === 1e3 || l.code === 1001, h = l.reason || `code=${l.code}`;
@@ -2366,7 +2366,7 @@ class la {
2366
2366
  * Get or create a cached keepalive response message.
2367
2367
  */
2368
2368
  getKeepaliveResponse() {
2369
- return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = ur(lr(), this.sessionId)), this.keepaliveResponseMessage;
2369
+ return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = dr(ur(), this.sessionId)), this.keepaliveResponseMessage;
2370
2370
  }
2371
2371
  handleProtocolMessage(e) {
2372
2372
  try {
@@ -2388,11 +2388,11 @@ class la {
2388
2388
  this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
2389
2389
  }
2390
2390
  }
2391
- const B = L("WebTransportTransport"), Je = 4, ua = 65536;
2392
- function pr() {
2391
+ const B = v("WebTransportTransport"), Je = 4, ha = 65536;
2392
+ function Er() {
2393
2393
  return typeof WebTransport < "u";
2394
2394
  }
2395
- class da {
2395
+ class fa {
2396
2396
  transport = null;
2397
2397
  stream = null;
2398
2398
  reader = null;
@@ -2400,7 +2400,7 @@ class da {
2400
2400
  keepaliveTimeout = null;
2401
2401
  readLoopActive = !1;
2402
2402
  // Grow-only receive buffer with offset/length tracking to minimize allocations
2403
- receiveBuffer = new Uint8Array(ua);
2403
+ receiveBuffer = new Uint8Array(ha);
2404
2404
  receiveBufferOffset = 0;
2405
2405
  receiveBufferLength = 0;
2406
2406
  // Cached DataView to avoid allocation per message
@@ -2418,8 +2418,8 @@ class da {
2418
2418
  return this.transport !== null && this.writer !== null;
2419
2419
  }
2420
2420
  async connect(e, r) {
2421
- if (!pr())
2422
- throw new x("WebTransport is not supported in this browser");
2421
+ if (!Er())
2422
+ throw new G("WebTransport is not supported in this browser");
2423
2423
  try {
2424
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);
@@ -2427,7 +2427,7 @@ class da {
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 x(`Failed to connect WebTransport: ${n}`, n instanceof Error ? n : void 0);
2430
+ throw this.cleanup(), new G(`Failed to connect WebTransport: ${n}`, n instanceof Error ? n : void 0);
2431
2431
  }
2432
2432
  }
2433
2433
  send(e) {
@@ -2485,7 +2485,7 @@ class da {
2485
2485
  * Get or create a cached keepalive response message.
2486
2486
  */
2487
2487
  getKeepaliveResponse() {
2488
- return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = ur(lr(), this.sessionId)), this.keepaliveResponseMessage;
2488
+ return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = dr(ur(), this.sessionId)), this.keepaliveResponseMessage;
2489
2489
  }
2490
2490
  /**
2491
2491
  * Process complete messages from the receive buffer.
@@ -2554,8 +2554,8 @@ class da {
2554
2554
  }
2555
2555
  }
2556
2556
  }
2557
- const q = L("Channel");
2558
- class ha {
2557
+ const q = v("Channel");
2558
+ class pa {
2559
2559
  state = "disconnected";
2560
2560
  transport = null;
2561
2561
  config;
@@ -2632,13 +2632,13 @@ class ha {
2632
2632
  switch (e.Type) {
2633
2633
  case R.WebSocket:
2634
2634
  case R.WebSocketProxy:
2635
- this.transport = new la(r);
2635
+ this.transport = new da(r);
2636
2636
  break;
2637
2637
  case R.WebTransport:
2638
2638
  case R.WebTransportProxy:
2639
- if (!pr())
2639
+ if (!Er())
2640
2640
  throw new Error("WebTransport is not supported in this browser");
2641
- this.transport = new da(r);
2641
+ this.transport = new fa(r);
2642
2642
  break;
2643
2643
  default:
2644
2644
  throw new Error(`Unsupported entrypoint type: ${R[e.Type]}`);
@@ -2651,7 +2651,7 @@ class ha {
2651
2651
  handleProtocolMessage(e) {
2652
2652
  try {
2653
2653
  const r = e;
2654
- if (ce(r) === T.CORE_ON_SERVER_STOPPING) {
2654
+ if (le(r) === T.CORE_ON_SERVER_STOPPING) {
2655
2655
  q.debug("Received server stopping message"), this.setState("stopped"), this.transport?.close();
2656
2656
  return;
2657
2657
  }
@@ -2679,8 +2679,8 @@ class ha {
2679
2679
  this.state !== e && (this.state = e, this.config.onStateChange?.(e));
2680
2680
  }
2681
2681
  }
2682
- const G = L("ChannelManager");
2683
- class fa {
2682
+ const x = v("ChannelManager");
2683
+ class Ea {
2684
2684
  channels = /* @__PURE__ */ new Map();
2685
2685
  // keyed by opcode group
2686
2686
  activeType = null;
@@ -2724,13 +2724,13 @@ class fa {
2724
2724
  * The opcode group is extracted from the message automatically.
2725
2725
  */
2726
2726
  sendProtocolMessage(e) {
2727
- const r = oe(e);
2727
+ const r = ae(e);
2728
2728
  for (const [n, s] of this.channels)
2729
2729
  if (n & r) {
2730
2730
  s.send(e);
2731
2731
  return;
2732
2732
  }
2733
- G.warn("No channel found for message");
2733
+ x.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
- G.warn(`Failed to connect using ${R[s]}: ${o}`), this.disconnectAll();
2764
+ x.warn(`Failed to connect using ${R[s]}: ${o}`), this.disconnectAll();
2765
2765
  }
2766
2766
  }
2767
- throw G.error("All endpoint types failed"), e || this.setState("offline"), new Error("Failed to connect using any endpoint type");
2767
+ throw x.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.
@@ -2782,7 +2782,7 @@ class fa {
2782
2782
  * Connect a single channel.
2783
2783
  */
2784
2784
  async connectChannel(e) {
2785
- const r = new ha({
2785
+ const r = new pa({
2786
2786
  entrypoint: e,
2787
2787
  sessionId: this.config.sessionId,
2788
2788
  keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
@@ -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
- G.debug("Channel closed by server"), this.shouldReconnect = !1, this.disconnectAll(), this.setState("stopped");
2827
+ x.debug("Channel closed by server"), this.shouldReconnect = !1, this.disconnectAll(), this.setState("stopped");
2828
2828
  return;
2829
2829
  }
2830
- this.state === "connected" && (G.error("Channel closed unexpectedly, attempting reconnect"), this.disconnectAll(), this.attemptReconnect());
2830
+ this.state === "connected" && (x.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
- G.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new na(this.config.maxReconnectAttempts));
2840
+ x.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new ia(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 (G.info(`Reconnecting in ${e}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await hr(e, this.abortController?.signal), !!this.shouldReconnect)
2845
+ if (x.info(`Reconnecting in ${e}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await fr(e, this.abortController?.signal), !!this.shouldReconnect)
2846
2846
  try {
2847
2847
  await this.connectInternal(!0);
2848
2848
  } catch (r) {
2849
- G.error("Reconnect failed:", r), await this.attemptReconnect();
2849
+ x.error("Reconnect failed:", r), await this.attemptReconnect();
2850
2850
  }
2851
2851
  }
2852
2852
  /**
@@ -2864,7 +2864,7 @@ class fa {
2864
2864
  this.state !== e && (this.state = e, this.config.onStateChange?.(e));
2865
2865
  }
2866
2866
  }
2867
- const pa = 5e3, Ea = 3e4, Qe = 35e3, qe = 500, Ze = 6, Er = 6e4, ge = "ikon_device_id";
2867
+ const Ia = 5e3, ma = 3e4, Qe = 35e3, qe = 500, Ze = 6, Ir = 6e4, ge = "ikon_device_id";
2868
2868
  function He() {
2869
2869
  if (typeof window > "u" || typeof localStorage > "u")
2870
2870
  return crypto.randomUUID();
@@ -2875,14 +2875,14 @@ function He() {
2875
2875
  return crypto.randomUUID();
2876
2876
  }
2877
2877
  }
2878
- function El() {
2878
+ function Il() {
2879
2879
  if (!(typeof localStorage > "u"))
2880
2880
  try {
2881
2881
  localStorage.removeItem(ge);
2882
2882
  } catch {
2883
2883
  }
2884
2884
  }
2885
- function Il(t) {
2885
+ function ml(t) {
2886
2886
  try {
2887
2887
  const e = t.split(".");
2888
2888
  return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
@@ -2890,26 +2890,26 @@ function Il(t) {
2890
2890
  return null;
2891
2891
  }
2892
2892
  }
2893
- const he = {}, Ce = "https://api.prod.ikon.live", fe = "https://api.dev.ikon.live", et = "https://auth.ikonai.com", tt = "https://auth.dev.ikonai.com", ml = "https://auth.ikonai.com";
2894
- function Ir(t) {
2895
- return t === "development" ? fe : Ce;
2896
- }
2897
- function _l() {
2898
- const t = typeof import.meta < "u" ? he?.VITE_IKON_BACKEND_URL : void 0;
2899
- return t || (typeof window > "u" ? Ce : !$e() || window.location.hostname.includes(".dev.") ? fe : Ce);
2893
+ const fe = {}, Ce = "https://api.prod.ikon.live", pe = "https://api.dev.ikon.live", et = "https://auth.ikonai.com", tt = "https://auth.dev.ikonai.com", _l = "https://auth.ikonai.com";
2894
+ function mr(t) {
2895
+ return t === "development" ? pe : Ce;
2900
2896
  }
2901
2897
  function Tl() {
2902
- const t = typeof import.meta < "u" ? he?.VITE_IKON_BACKEND_TYPE : void 0;
2898
+ const t = typeof import.meta < "u" ? fe?.VITE_IKON_BACKEND_URL : void 0;
2899
+ return t || (typeof window > "u" ? Ce : !$e() || window.location.hostname.includes(".dev.") ? pe : Ce);
2900
+ }
2901
+ function Sl() {
2902
+ const t = typeof import.meta < "u" ? fe?.VITE_IKON_BACKEND_TYPE : void 0;
2903
2903
  if (t === "development" || t === "production")
2904
2904
  return t;
2905
- const e = typeof import.meta < "u" ? he?.VITE_IKON_BACKEND_URL : void 0;
2905
+ const e = typeof import.meta < "u" ? fe?.VITE_IKON_BACKEND_URL : void 0;
2906
2906
  return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : $e() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
2907
2907
  }
2908
- function Sl() {
2909
- const t = typeof import.meta < "u" ? he?.VITE_IKON_AUTH_URL : void 0;
2908
+ function wl() {
2909
+ const t = typeof import.meta < "u" ? fe?.VITE_IKON_AUTH_URL : void 0;
2910
2910
  return t || (typeof window > "u" ? et : !$e() || window.location.hostname.includes(".dev.") ? tt : et);
2911
2911
  }
2912
- function mr() {
2912
+ function _r() {
2913
2913
  if (typeof window > "u")
2914
2914
  return {};
2915
2915
  const t = new URLSearchParams(window.location.search), e = {};
@@ -2917,8 +2917,8 @@ function mr() {
2917
2917
  e[r] = n;
2918
2918
  return e;
2919
2919
  }
2920
- const Ia = ["ikon_token", "ikon_provider", "error"];
2921
- function wl() {
2920
+ const _a = ["ikon_token", "ikon_provider", "error"];
2921
+ function yl() {
2922
2922
  if (typeof window > "u")
2923
2923
  return { parameters: {} };
2924
2924
  const t = window.location.pathname;
@@ -2928,9 +2928,9 @@ function wl() {
2928
2928
  const s = t.match(/^\/c\/([^/]+)/);
2929
2929
  if (s && (r = decodeURIComponent(s[1])), e && r)
2930
2930
  throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
2931
- const i = mr(), o = {};
2931
+ const i = _r(), o = {};
2932
2932
  for (const [a, c] of Object.entries(i))
2933
- Ia.includes(a) || (o[a] = c);
2933
+ _a.includes(a) || (o[a] = c);
2934
2934
  return { sessionId: e, channelKey: r, parameters: o };
2935
2935
  }
2936
2936
  function $e() {
@@ -2945,10 +2945,10 @@ function $e() {
2945
2945
  }
2946
2946
  return !0;
2947
2947
  }
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
- async function Ta(t) {
2948
+ const Ee = v("Authenticator"), K = T.GROUP_CORE | T.GROUP_KEEPALIVE | T.GROUP_EVENTS | T.GROUP_ACTIONS | T.GROUP_UI | T.GROUP_AUDIO | T.GROUP_VIDEO, Ta = 1e3, Sa = 5e3;
2949
+ async function wa(t) {
2950
2950
  try {
2951
- const e = await fetch(`${fe}/users/me`, {
2951
+ const e = await fetch(`${pe}/users/me`, {
2952
2952
  credentials: "include",
2953
2953
  signal: t
2954
2954
  });
@@ -2957,7 +2957,7 @@ async function Ta(t) {
2957
2957
  return;
2958
2958
  }
2959
2959
  }
2960
- function _r(t, e, r) {
2960
+ function Tr(t, e, r) {
2961
2961
  const n = {
2962
2962
  method: "POST",
2963
2963
  headers: {
@@ -2969,40 +2969,40 @@ function _r(t, e, r) {
2969
2969
  };
2970
2970
  return e || (n.credentials = "include"), n;
2971
2971
  }
2972
- async function Tr(t, e, r, n, s, i, o) {
2972
+ async function Sr(t, e, r, n, s, i, o) {
2973
2973
  const a = `${t}/rooms`, c = {
2974
2974
  space: e,
2975
2975
  ...r ? { key: r } : {},
2976
2976
  ...n && Object.keys(n).length > 0 ? { params: n } : {},
2977
2977
  ...s ? { hash: s } : {}
2978
- }, l = await fetch(a, _r(c, i, o));
2978
+ }, l = await fetch(a, Tr(c, i, o));
2979
2979
  if (!l.ok) {
2980
2980
  const d = await l.text().catch(() => "Unknown error");
2981
2981
  throw new w(`Failed to request channel: ${l.status} ${d}`);
2982
2982
  }
2983
2983
  return await l.json();
2984
2984
  }
2985
- async function Sa(t, e, r, n) {
2986
- const s = `${t}/rooms/connect`, i = await fetch(s, _r(e, r, n));
2985
+ async function ya(t, e, r, n) {
2986
+ const s = `${t}/rooms/connect`, i = await fetch(s, Tr(e, r, n));
2987
2987
  if (!i.ok) {
2988
2988
  const o = await i.text().catch(() => "Unknown error");
2989
2989
  throw new w(`Backend connect failed: ${i.status} ${o}`);
2990
2990
  }
2991
2991
  return i.json();
2992
2992
  }
2993
- async function Sr(t, e, r, n, s) {
2993
+ async function wr(t, e, r, n, s) {
2994
2994
  const i = Date.now();
2995
- let o = ma;
2995
+ let o = Ta;
2996
2996
  for (; ; ) {
2997
2997
  if (s?.aborted)
2998
2998
  throw new w("Connection aborted");
2999
2999
  if (Date.now() - i >= r)
3000
- throw new sa(r);
3001
- const c = await Sa(t, e, n, s), l = c.state?.toLowerCase();
3000
+ throw new oa(r);
3001
+ const c = await ya(t, e, n, s), l = c.state?.toLowerCase();
3002
3002
  if (l === "running")
3003
3003
  return c;
3004
3004
  if (l === "provisioning") {
3005
- await hr(o, s), o = Math.min(o * 1.5, _a);
3005
+ await fr(o, s), o = Math.min(o * 1.5, Sa);
3006
3006
  continue;
3007
3007
  }
3008
3008
  throw new w(`Unexpected channel state: ${c.state}`);
@@ -3015,10 +3015,10 @@ async function Ke(t, e) {
3015
3015
  throw new w(`Failed to connect: ${r.status} ${o}`);
3016
3016
  }
3017
3017
  const n = await r.arrayBuffer(), s = new Uint8Array(n);
3018
- return { authResponse: as(s) };
3018
+ return { authResponse: ls(s) };
3019
3019
  }
3020
- function wa(t, e) {
3021
- return us({
3020
+ function Aa(t, e) {
3021
+ return hs({
3022
3022
  ServerSessionId: "",
3023
3023
  // Server will fill this in
3024
3024
  ContextType: z.Browser,
@@ -3041,11 +3041,11 @@ function wa(t, e) {
3041
3041
  AuthSessionId: "local",
3042
3042
  ReceiveAllMessages: !1,
3043
3043
  UserAgent: typeof navigator < "u" ? navigator.userAgent : "",
3044
- ClientType: Y.DesktopWeb,
3044
+ ClientType: j.DesktopWeb,
3045
3045
  Parameters: t.parameters ?? {}
3046
3046
  });
3047
3047
  }
3048
- function ya(t) {
3048
+ function Na(t) {
3049
3049
  return {
3050
3050
  ServerSessionId: t.ServerSessionId,
3051
3051
  ContextType: t.ContextType,
@@ -3072,13 +3072,13 @@ function ya(t) {
3072
3072
  Parameters: t.Parameters
3073
3073
  };
3074
3074
  }
3075
- async function Aa(t, e) {
3075
+ async function ga(t, e) {
3076
3076
  const r = `https://${t.host}:${t.httpsPort}`;
3077
- pe.debug(`Authenticating with local server: ${r}`);
3078
- const s = { ...mr(), ...t.parameters };
3077
+ Ee.debug(`Authenticating with local server: ${r}`);
3078
+ const s = { ..._r(), ...t.parameters };
3079
3079
  let i = t.userId;
3080
- i || (i = await Ta(e), i || (i = "local", pe.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
3081
- const o = wa({ ...t, parameters: s }, i), a = ya(o), c = await fetch(`${r}/connect-token`, {
3080
+ i || (i = await wa(e), i || (i = "local", Ee.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
3081
+ const o = Aa({ ...t, parameters: s }, i), a = Na(o), c = await fetch(`${r}/connect-token`, {
3082
3082
  method: "POST",
3083
3083
  headers: {
3084
3084
  "Content-Type": "application/json"
@@ -3096,11 +3096,11 @@ async function Aa(t, e) {
3096
3096
  const d = `${r}/connect?token=${encodeURIComponent(p)}`;
3097
3097
  return Ke(d, e);
3098
3098
  }
3099
- async function Na(t, e) {
3099
+ async function Ca(t, e) {
3100
3100
  if (t.sessionId && t.channelKey)
3101
3101
  throw new w("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
3102
- const r = Ir(t.backendType);
3103
- pe.debug(`Authenticating with cloud server: ${r}, space ID: ${t.spaceId}`);
3102
+ const r = mr(t.backendType);
3103
+ Ee.debug(`Authenticating with cloud server: ${r}, space ID: ${t.spaceId}`);
3104
3104
  const n = await fetch(`${r}/auth/api-key`, {
3105
3105
  method: "POST",
3106
3106
  headers: {
@@ -3132,10 +3132,10 @@ async function Na(t, e) {
3132
3132
  throw new w(`Failed to get or create profile: ${o.status} ${h}`);
3133
3133
  }
3134
3134
  const c = {
3135
- code: (await Tr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e)).code,
3135
+ code: (await Sr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e)).code,
3136
3136
  contextType: z.Plugin,
3137
3137
  userType: t.userType ?? J.Human,
3138
- clientType: t.clientType ?? Y.DesktopWeb,
3138
+ clientType: t.clientType ?? j.DesktopWeb,
3139
3139
  payloadType: X.Teleport,
3140
3140
  description: t.description ?? "Ikon SDK TypeScript",
3141
3141
  deviceId: t.deviceId ?? He(),
@@ -3150,17 +3150,17 @@ async function Na(t, e) {
3150
3150
  launchParams: t.parameters,
3151
3151
  hash: t.sessionId,
3152
3152
  waitForRunning: !0
3153
- }, l = t.provisioningTimeoutMs ?? Er, p = await Sr(r, c, l, i, e);
3153
+ }, l = t.provisioningTimeoutMs ?? Ir, p = await wr(r, c, l, i, e);
3154
3154
  if (!p.configuration?.url)
3155
3155
  throw new w("Backend did not return a connect URL");
3156
3156
  const d = p.configuration.url;
3157
3157
  return Ke(d, e);
3158
3158
  }
3159
- async function ga(t, e) {
3159
+ async function ba(t, e) {
3160
3160
  if (t.sessionId && t.channelKey)
3161
3161
  throw new w("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
3162
- const r = Ir(t.backendType), n = t.token;
3163
- pe.debug(`Authenticating with session token to: ${r}, space ID: ${t.spaceId}`);
3162
+ const r = mr(t.backendType), n = t.token;
3163
+ Ee.debug(`Authenticating with session token to: ${r}, space ID: ${t.spaceId}`);
3164
3164
  const s = await fetch(`${r}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
3165
3165
  method: "GET",
3166
3166
  headers: {
@@ -3173,10 +3173,10 @@ async function ga(t, e) {
3173
3173
  throw new w(`Failed to get or create profile: ${s.status} ${p}`);
3174
3174
  }
3175
3175
  const o = {
3176
- code: (await Tr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, n, e)).code,
3176
+ code: (await Sr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, n, e)).code,
3177
3177
  contextType: z.Browser,
3178
3178
  userType: J.Human,
3179
- clientType: Y.DesktopWeb,
3179
+ clientType: j.DesktopWeb,
3180
3180
  payloadType: X.Teleport,
3181
3181
  description: t.description ?? "Ikon SDK TypeScript",
3182
3182
  deviceId: t.deviceId ?? He(),
@@ -3191,28 +3191,28 @@ async function ga(t, e) {
3191
3191
  launchParams: t.parameters,
3192
3192
  hash: t.sessionId,
3193
3193
  waitForRunning: !0
3194
- }, a = t.provisioningTimeoutMs ?? Er, c = await Sr(r, o, a, n, e);
3194
+ }, a = t.provisioningTimeoutMs ?? Ir, c = await wr(r, o, a, n, e);
3195
3195
  if (!c.configuration?.url)
3196
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
  }
3200
- const wr = "ikon.theme", be = "ikon.theme-user", Ca = "ikon.theme-change";
3201
- function yr(t) {
3200
+ const yr = "ikon.theme", be = "ikon.theme-user", Ra = "ikon.theme-change";
3201
+ function Ar(t) {
3202
3202
  typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
3203
3203
  }
3204
- const ba = {
3204
+ const ka = {
3205
3205
  name: "ikon.client.getTheme",
3206
3206
  description: "Get the currently selected client theme",
3207
3207
  returnType: { kind: "string", nullable: !0 }
3208
3208
  };
3209
- function Ra() {
3209
+ function Ua() {
3210
3210
  if (typeof window > "u" || !window.localStorage)
3211
3211
  return null;
3212
- const t = window.localStorage.getItem(be) ?? window.localStorage.getItem(wr) ?? "light";
3213
- return yr(t), t;
3212
+ const t = window.localStorage.getItem(be) ?? window.localStorage.getItem(yr) ?? "light";
3213
+ return Ar(t), t;
3214
3214
  }
3215
- const ka = {
3215
+ const Da = {
3216
3216
  name: "ikon.client.setTheme",
3217
3217
  description: "Update the client UI theme",
3218
3218
  returnType: { kind: "boolean" },
@@ -3221,21 +3221,21 @@ const ka = {
3221
3221
  { name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
3222
3222
  ]
3223
3223
  };
3224
- function Ua(t, e) {
3224
+ function Oa(t, e) {
3225
3225
  if (typeof window > "u" || !window.localStorage || typeof t != "string")
3226
3226
  return !1;
3227
3227
  const r = t.trim().toLowerCase();
3228
3228
  if (!r)
3229
3229
  return !1;
3230
3230
  const n = e === void 0 ? !0 : !!e, s = window.localStorage;
3231
- n ? s.setItem(be, r) : s.removeItem(be), s.setItem(wr, r);
3231
+ n ? s.setItem(be, r) : s.removeItem(be), s.setItem(yr, r);
3232
3232
  try {
3233
- window.dispatchEvent(new CustomEvent(Ca, { detail: { mode: r } }));
3233
+ window.dispatchEvent(new CustomEvent(Ra, { detail: { mode: r } }));
3234
3234
  } catch {
3235
3235
  }
3236
- return yr(r), !0;
3236
+ return Ar(r), !0;
3237
3237
  }
3238
- const Da = {
3238
+ const Ma = {
3239
3239
  name: "ikon.client.getLocation",
3240
3240
  description: "Retrieve the current geolocation coordinates from the browser",
3241
3241
  returnType: {
@@ -3245,7 +3245,7 @@ const Da = {
3245
3245
  nullable: !0
3246
3246
  }
3247
3247
  };
3248
- async function Oa() {
3248
+ async function va() {
3249
3249
  if (typeof navigator > "u" || !navigator.geolocation)
3250
3250
  return null;
3251
3251
  try {
@@ -3264,7 +3264,7 @@ async function Oa() {
3264
3264
  return null;
3265
3265
  }
3266
3266
  }
3267
- const Ma = {
3267
+ const La = {
3268
3268
  name: "ikon.client.share",
3269
3269
  description: "Open the Web Share dialog when supported",
3270
3270
  returnType: { kind: "boolean" },
@@ -3274,7 +3274,7 @@ const Ma = {
3274
3274
  { name: "url", type: { kind: "string", nullable: !0 }, description: "Share URL" }
3275
3275
  ]
3276
3276
  };
3277
- async function La(t, e, r) {
3277
+ async function Pa(t, e, r) {
3278
3278
  if (typeof navigator > "u" || typeof navigator.share != "function")
3279
3279
  return !1;
3280
3280
  const n = typeof t == "string" ? t.trim() : "", s = typeof e == "string" ? e.trim() : "", i = typeof r == "string" ? r.trim() : "", o = {};
@@ -3286,13 +3286,13 @@ async function La(t, e, r) {
3286
3286
  return !1;
3287
3287
  }
3288
3288
  }
3289
- const va = {
3289
+ const Fa = {
3290
3290
  name: "ikon.client.pickContacts",
3291
3291
  description: "Launch the native contact picker when available",
3292
3292
  returnType: { kind: "string", nullable: !0 },
3293
3293
  parameters: [{ name: "multiple", type: { kind: "boolean", nullable: !0 }, description: "Allow multiple contacts" }]
3294
3294
  };
3295
- async function Fa(t) {
3295
+ async function Ba(t) {
3296
3296
  if (typeof navigator > "u")
3297
3297
  return null;
3298
3298
  const e = navigator, r = e.contacts?.select;
@@ -3311,33 +3311,33 @@ async function Fa(t) {
3311
3311
  return null;
3312
3312
  }
3313
3313
  }
3314
- const Pa = {
3314
+ const xa = {
3315
3315
  name: "ikon.client.getLanguage",
3316
3316
  description: "Get the browser language preference",
3317
3317
  returnType: { kind: "string" }
3318
3318
  };
3319
- function Ba() {
3319
+ function Ga() {
3320
3320
  return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
3321
3321
  }
3322
- const Ga = {
3322
+ const Wa = {
3323
3323
  name: "ikon.client.getTimezone",
3324
3324
  description: "Get the browser timezone (IANA format)",
3325
3325
  returnType: { kind: "string" }
3326
3326
  };
3327
- function xa() {
3327
+ function Va() {
3328
3328
  try {
3329
3329
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
3330
3330
  } catch {
3331
3331
  return "UTC";
3332
3332
  }
3333
3333
  }
3334
- const Wa = {
3334
+ const Ha = {
3335
3335
  name: "ikon.client.copyToClipboard",
3336
3336
  description: "Copy text to clipboard",
3337
3337
  returnType: { kind: "boolean" },
3338
3338
  parameters: [{ name: "text", type: { kind: "string" }, description: "Text to copy" }]
3339
3339
  };
3340
- async function Va(t) {
3340
+ async function $a(t) {
3341
3341
  if (typeof navigator > "u" || !navigator.clipboard || typeof t != "string")
3342
3342
  return !1;
3343
3343
  try {
@@ -3346,15 +3346,15 @@ async function Va(t) {
3346
3346
  return !1;
3347
3347
  }
3348
3348
  }
3349
- const Ha = {
3349
+ const Ka = {
3350
3350
  name: "ikon.client.getUrl",
3351
3351
  description: "Get the current browser URL path and query string",
3352
3352
  returnType: { kind: "string", nullable: !0 }
3353
3353
  };
3354
- function $a() {
3354
+ function Ya() {
3355
3355
  return typeof window > "u" ? null : window.location.pathname + window.location.search;
3356
3356
  }
3357
- const Ka = {
3357
+ const ja = {
3358
3358
  name: "ikon.client.setUrl",
3359
3359
  description: "Update the browser URL without triggering a page reload",
3360
3360
  returnType: { kind: "boolean" },
@@ -3363,7 +3363,7 @@ const Ka = {
3363
3363
  { name: "replace", type: { kind: "boolean", nullable: !0 }, description: "If true, replaces current history entry instead of adding new one" }
3364
3364
  ]
3365
3365
  };
3366
- function ja(t, e) {
3366
+ function za(t, e) {
3367
3367
  if (typeof window > "u" || !window.history || typeof t != "string")
3368
3368
  return !1;
3369
3369
  const r = t.trim();
@@ -3375,13 +3375,13 @@ function ja(t, e) {
3375
3375
  return !1;
3376
3376
  }
3377
3377
  }
3378
- const Ya = {
3378
+ const Xa = {
3379
3379
  name: "ikon.client.vibrate",
3380
3380
  description: "Trigger haptic feedback on supported devices",
3381
3381
  returnType: { kind: "boolean" },
3382
3382
  parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
3383
3383
  };
3384
- function za(t) {
3384
+ function Ja(t) {
3385
3385
  if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
3386
3386
  return !1;
3387
3387
  try {
@@ -3391,7 +3391,7 @@ function za(t) {
3391
3391
  return !1;
3392
3392
  }
3393
3393
  }
3394
- const Xa = {
3394
+ const Qa = {
3395
3395
  name: "ikon.client.playSound",
3396
3396
  description: "Play audio from a URL",
3397
3397
  returnType: { kind: "boolean" },
@@ -3400,7 +3400,7 @@ const Xa = {
3400
3400
  { name: "volume", type: { kind: "number", nullable: !0 }, description: "Volume level from 0.0 to 1.0" }
3401
3401
  ]
3402
3402
  };
3403
- async function Ja(t, e) {
3403
+ async function qa(t, e) {
3404
3404
  if (typeof window > "u" || typeof Audio > "u" || typeof t != "string" || !t.trim())
3405
3405
  return !1;
3406
3406
  try {
@@ -3410,7 +3410,7 @@ async function Ja(t, e) {
3410
3410
  return !1;
3411
3411
  }
3412
3412
  }
3413
- const Qa = {
3413
+ const Za = {
3414
3414
  name: "ikon.client.showNotification",
3415
3415
  description: "Show a browser notification (requests permission if needed)",
3416
3416
  returnType: { kind: "boolean" },
@@ -3420,7 +3420,7 @@ const Qa = {
3420
3420
  { name: "icon", type: { kind: "string", nullable: !0 }, description: "URL of notification icon" }
3421
3421
  ]
3422
3422
  };
3423
- async function qa(t, e, r) {
3423
+ async function ec(t, e, r) {
3424
3424
  if (typeof window > "u" || !("Notification" in window) || typeof t != "string" || !t.trim())
3425
3425
  return !1;
3426
3426
  try {
@@ -3433,12 +3433,12 @@ async function qa(t, e, r) {
3433
3433
  return !1;
3434
3434
  }
3435
3435
  }
3436
- const Za = {
3436
+ const tc = {
3437
3437
  name: "ikon.client.requestFullscreen",
3438
3438
  description: "Enter fullscreen mode",
3439
3439
  returnType: { kind: "boolean" }
3440
3440
  };
3441
- async function ec() {
3441
+ async function rc() {
3442
3442
  if (typeof document > "u" || !document.documentElement)
3443
3443
  return !1;
3444
3444
  try {
@@ -3448,12 +3448,12 @@ async function ec() {
3448
3448
  return !1;
3449
3449
  }
3450
3450
  }
3451
- const tc = {
3451
+ const nc = {
3452
3452
  name: "ikon.client.exitFullscreen",
3453
3453
  description: "Exit fullscreen mode",
3454
3454
  returnType: { kind: "boolean" }
3455
3455
  };
3456
- function rc() {
3456
+ function sc() {
3457
3457
  if (typeof document > "u")
3458
3458
  return !1;
3459
3459
  try {
@@ -3463,7 +3463,7 @@ function rc() {
3463
3463
  return !1;
3464
3464
  }
3465
3465
  }
3466
- const nc = {
3466
+ const ic = {
3467
3467
  name: "ikon.client.downloadFile",
3468
3468
  description: "Trigger a file download",
3469
3469
  returnType: { kind: "boolean" },
@@ -3472,7 +3472,7 @@ const nc = {
3472
3472
  { name: "filename", type: { kind: "string", nullable: !0 }, description: "Suggested filename for the download" }
3473
3473
  ]
3474
3474
  };
3475
- function sc(t, e) {
3475
+ function oc(t, e) {
3476
3476
  if (typeof document > "u" || typeof t != "string" || !t.trim())
3477
3477
  return !1;
3478
3478
  try {
@@ -3483,13 +3483,13 @@ function sc(t, e) {
3483
3483
  }
3484
3484
  }
3485
3485
  let Z = null;
3486
- const ic = {
3486
+ const ac = {
3487
3487
  name: "ikon.client.keepScreenAwake",
3488
3488
  description: "Prevent or allow the screen to sleep",
3489
3489
  returnType: { kind: "boolean" },
3490
3490
  parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
3491
3491
  };
3492
- async function oc(t) {
3492
+ async function cc(t) {
3493
3493
  if (typeof navigator > "u" || !("wakeLock" in navigator))
3494
3494
  return !1;
3495
3495
  try {
@@ -3498,15 +3498,15 @@ async function oc(t) {
3498
3498
  return !1;
3499
3499
  }
3500
3500
  }
3501
- const ac = {
3501
+ const lc = {
3502
3502
  name: "ikon.client.getVisibility",
3503
3503
  description: "Get the current page visibility state",
3504
3504
  returnType: { kind: "string", nullable: !0 }
3505
3505
  };
3506
- function cc() {
3506
+ function uc() {
3507
3507
  return typeof document > "u" ? null : document.visibilityState || null;
3508
3508
  }
3509
- const lc = {
3509
+ const dc = {
3510
3510
  name: "ikon.client.scrollTo",
3511
3511
  description: "Scroll the page to a specific position",
3512
3512
  returnType: { kind: "boolean" },
@@ -3516,7 +3516,7 @@ const lc = {
3516
3516
  { name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
3517
3517
  ]
3518
3518
  };
3519
- function uc(t, e, r) {
3519
+ function hc(t, e, r) {
3520
3520
  if (typeof window > "u" || typeof t != "number" || typeof e != "number")
3521
3521
  return !1;
3522
3522
  try {
@@ -3529,12 +3529,12 @@ function uc(t, e, r) {
3529
3529
  return !1;
3530
3530
  }
3531
3531
  }
3532
- const dc = {
3532
+ const fc = {
3533
3533
  name: "ikon.client.getBatteryLevel",
3534
3534
  description: "Get the current battery level (0-100)",
3535
3535
  returnType: { kind: "number", nullable: !0 }
3536
3536
  };
3537
- async function hc() {
3537
+ async function pc() {
3538
3538
  if (typeof navigator > "u" || !("getBattery" in navigator))
3539
3539
  return null;
3540
3540
  try {
@@ -3544,29 +3544,28 @@ async function hc() {
3544
3544
  return null;
3545
3545
  }
3546
3546
  }
3547
- const fc = {
3547
+ const Ec = {
3548
3548
  name: "ikon.client.getNetworkType",
3549
3549
  description: "Get the current network connection type",
3550
3550
  returnType: { kind: "string", nullable: !0 }
3551
3551
  };
3552
- function pc() {
3552
+ function Ic() {
3553
3553
  if (typeof navigator > "u")
3554
3554
  return null;
3555
3555
  const t = navigator.connection;
3556
3556
  return t && (t.effectiveType || t.type) || null;
3557
3557
  }
3558
- const Ec = [
3559
- { definition: ba, handler: Ra },
3558
+ const mc = [
3560
3559
  { definition: ka, handler: Ua },
3561
3560
  { definition: Da, handler: Oa },
3562
- { definition: Ma, handler: La },
3563
- { definition: va, handler: Fa },
3564
- { definition: Pa, handler: Ba },
3565
- { definition: Ga, handler: xa },
3561
+ { definition: Ma, handler: va },
3562
+ { definition: La, handler: Pa },
3563
+ { definition: Fa, handler: Ba },
3564
+ { definition: xa, handler: Ga },
3566
3565
  { definition: Wa, handler: Va },
3567
3566
  { definition: Ha, handler: $a },
3568
- { definition: Ka, handler: ja },
3569
- { definition: Ya, handler: za },
3567
+ { definition: Ka, handler: Ya },
3568
+ { definition: ja, handler: za },
3570
3569
  { definition: Xa, handler: Ja },
3571
3570
  { definition: Qa, handler: qa },
3572
3571
  { definition: Za, handler: ec },
@@ -3576,29 +3575,30 @@ const Ec = [
3576
3575
  { definition: ac, handler: cc },
3577
3576
  { definition: lc, handler: uc },
3578
3577
  { definition: dc, handler: hc },
3579
- { definition: fc, handler: pc }
3578
+ { definition: fc, handler: pc },
3579
+ { definition: Ec, handler: Ic }
3580
3580
  ];
3581
- function Ic(t) {
3582
- const e = Ec.map(({ definition: r, handler: n }) => t.register(r, n));
3581
+ function _c(t) {
3582
+ const e = mc.map(({ definition: r, handler: n }) => t.register(r, n));
3583
3583
  return () => e.forEach((r) => r());
3584
3584
  }
3585
3585
  function rt() {
3586
3586
  return typeof window < "u" && typeof navigator < "u";
3587
3587
  }
3588
- const mc = new Uint8Array(0);
3589
- function Ee(t) {
3588
+ const Tc = new Uint8Array(0);
3589
+ function Ie(t) {
3590
3590
  switch (t.kind) {
3591
3591
  case "array":
3592
3592
  return {
3593
3593
  kind: "array",
3594
- element: Ee(t.element),
3594
+ element: Ie(t.element),
3595
3595
  nullable: t.nullable ?? !1
3596
3596
  };
3597
3597
  case "dictionary":
3598
3598
  return {
3599
3599
  kind: "dictionary",
3600
3600
  keyType: t.keyType ?? "string",
3601
- value: Ee(t.value),
3601
+ value: Ie(t.value),
3602
3602
  nullable: t.nullable ?? !1
3603
3603
  };
3604
3604
  default:
@@ -3635,7 +3635,7 @@ function nt(t, e) {
3635
3635
  }
3636
3636
  return r;
3637
3637
  }
3638
- function Ar(t, e) {
3638
+ function Nr(t, e) {
3639
3639
  if (t === void 0)
3640
3640
  return "null";
3641
3641
  if (t === null) {
@@ -3645,9 +3645,9 @@ function Ar(t, e) {
3645
3645
  }
3646
3646
  return JSON.stringify(t);
3647
3647
  }
3648
- function _c(t, e) {
3648
+ function Sc(t, e) {
3649
3649
  const r = (t.parameters ?? []).map((i) => {
3650
- const o = Ee(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Ar(i.defaultValue, o) : "";
3650
+ const o = Ie(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Nr(i.defaultValue, o) : "";
3651
3651
  return {
3652
3652
  name: i.name,
3653
3653
  descriptor: o,
@@ -3655,7 +3655,7 @@ function _c(t, e) {
3655
3655
  defaultValueJson: c,
3656
3656
  description: i.description
3657
3657
  };
3658
- }), n = Ee(t.returnType), s = {
3658
+ }), n = Ie(t.returnType), s = {
3659
3659
  FunctionId: I.createRandom(),
3660
3660
  FunctionName: t.name,
3661
3661
  Description: t.description ?? "",
@@ -3672,7 +3672,7 @@ function _c(t, e) {
3672
3672
  TypeName: te(i.descriptor),
3673
3673
  HasDefaultValue: i.hasDefaultValue,
3674
3674
  DefaultValueJson: i.defaultValueJson,
3675
- DefaultValueData: mc,
3675
+ DefaultValueData: Tc,
3676
3676
  IsEnumerable: !1,
3677
3677
  EnumerableItemTypeName: "",
3678
3678
  Description: i.description ?? ""
@@ -3686,11 +3686,11 @@ function _c(t, e) {
3686
3686
  returnType: n
3687
3687
  };
3688
3688
  }
3689
- const st = L("FunctionRegistry"), Tc = new Uint8Array(0);
3690
- function Sc(t) {
3689
+ const st = v("FunctionRegistry"), wc = new Uint8Array(0);
3690
+ function yc(t) {
3691
3691
  return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
3692
3692
  }
3693
- class wc {
3693
+ class Ac {
3694
3694
  functions = /* @__PURE__ */ new Map();
3695
3695
  config = null;
3696
3696
  isConnected = !1;
@@ -3712,7 +3712,7 @@ class wc {
3712
3712
  * If already connected, sends registration to server immediately.
3713
3713
  */
3714
3714
  register(e, r) {
3715
- const n = _c(e, r);
3715
+ const n = Sc(e, r);
3716
3716
  return this.functions.set(e.name, n), this.isConnected && this.config && this.sendRegistration(n), () => this.unregister(e.name);
3717
3717
  }
3718
3718
  /**
@@ -3757,7 +3757,7 @@ class wc {
3757
3757
  sendAllRegistrations() {
3758
3758
  if (!this.config || this.functions.size === 0)
3759
3759
  return;
3760
- const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = hi({ Functions: e }), n = Ii(r, this.config.sessionId);
3760
+ const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = pi({ Functions: e }), n = _i(r, this.config.sessionId);
3761
3761
  this.config.sendProtocolMessage(n);
3762
3762
  }
3763
3763
  /**
@@ -3766,14 +3766,14 @@ class wc {
3766
3766
  sendRegistration(e) {
3767
3767
  if (!this.config)
3768
3768
  return;
3769
- const r = ni(e.registerPayload, this.config.sessionId);
3769
+ const r = ii(e.registerPayload, this.config.sessionId);
3770
3770
  this.config.sendProtocolMessage(r);
3771
3771
  }
3772
3772
  /**
3773
3773
  * Handle an incoming function call.
3774
3774
  */
3775
3775
  handleFunctionCall(e, r) {
3776
- const n = Ms(e), s = this.functions.get(n.FunctionName);
3776
+ const n = Ls(e), s = this.functions.get(n.FunctionName);
3777
3777
  if (!s) {
3778
3778
  st.warn(`Received call for unknown function: ${n.FunctionName}`), this.sendError(n.CallId, n.InstanceId, r, new Error(`Unknown function: ${n.FunctionName}`));
3779
3779
  return;
@@ -3791,9 +3791,9 @@ class wc {
3791
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
- let o = i, a = Tc;
3795
- Sc(i) && (o = i.value, a = new Uint8Array(i.data));
3796
- const c = Ar(o, e.returnType);
3794
+ let o = i, a = wc;
3795
+ yc(i) && (o = i.value, a = new Uint8Array(i.data));
3796
+ const c = Nr(o, e.returnType);
3797
3797
  this.sendResult(r.CallId, r.InstanceId, n, e, c, a);
3798
3798
  } catch (s) {
3799
3799
  st.error(`Function ${r.FunctionName} execution failed:`, s), this.sendError(r.CallId, r.InstanceId, n, s instanceof Error ? s : new Error(String(s)));
@@ -3805,7 +3805,7 @@ class wc {
3805
3805
  sendAck(e, r, n) {
3806
3806
  if (!this.config)
3807
3807
  return;
3808
- const s = Ts(Es({ CallId: e, InstanceId: r }), this.config.sessionId, { targetIds: [n] });
3808
+ const s = ws(ms({ CallId: e, InstanceId: r }), this.config.sessionId, { targetIds: [n] });
3809
3809
  this.config.sendProtocolMessage(s);
3810
3810
  }
3811
3811
  /**
@@ -3814,8 +3814,8 @@ class wc {
3814
3814
  sendResult(e, r, n, s, i, o) {
3815
3815
  if (!this.config)
3816
3816
  return;
3817
- const a = bi(
3818
- Ai({
3817
+ const a = ki(
3818
+ gi({
3819
3819
  CallId: e,
3820
3820
  InstanceId: r,
3821
3821
  ResultTypeName: te(s.returnType),
@@ -3833,8 +3833,8 @@ class wc {
3833
3833
  sendError(e, r, n, s) {
3834
3834
  if (!this.config)
3835
3835
  return;
3836
- const i = Qs(
3837
- Ys({
3836
+ const i = Zs(
3837
+ Xs({
3838
3838
  CallId: e,
3839
3839
  InstanceId: r,
3840
3840
  ErrorMessage: s.message,
@@ -3847,10 +3847,10 @@ class wc {
3847
3847
  this.config.sendProtocolMessage(i);
3848
3848
  }
3849
3849
  }
3850
- function yc(t, e) {
3850
+ function Nc(t, e) {
3851
3851
  return { value: t, data: e };
3852
3852
  }
3853
- function _e(t) {
3853
+ function Te(t) {
3854
3854
  if (!(typeof t != "string" || !t.trim()))
3855
3855
  try {
3856
3856
  return JSON.parse(t);
@@ -3858,55 +3858,55 @@ function _e(t) {
3858
3858
  return;
3859
3859
  }
3860
3860
  }
3861
- const me = {
3861
+ const _e = {
3862
3862
  StartVideoCapture: "ikon.client.startVideoCapture",
3863
3863
  StartAudioCapture: "ikon.client.startAudioCapture",
3864
3864
  StopCapture: "ikon.client.stopCapture",
3865
3865
  CaptureImage: "ikon.client.captureImage"
3866
- }, Ac = {
3867
- name: me.StartVideoCapture,
3866
+ }, gc = {
3867
+ name: _e.StartVideoCapture,
3868
3868
  description: "Start camera or screen capture and stream video frames to the server",
3869
3869
  returnType: { kind: "string" },
3870
3870
  parameters: [
3871
3871
  { name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
3872
3872
  { name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
3873
3873
  ]
3874
- }, Nc = {
3875
- name: me.StartAudioCapture,
3874
+ }, Cc = {
3875
+ name: _e.StartAudioCapture,
3876
3876
  description: "Start microphone capture and stream audio frames to the server",
3877
3877
  returnType: { kind: "string" },
3878
3878
  parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
3879
- }, gc = {
3880
- name: me.StopCapture,
3879
+ }, bc = {
3880
+ name: _e.StopCapture,
3881
3881
  description: "Stop a previously started capture by captureId",
3882
3882
  returnType: { kind: "boolean" },
3883
3883
  parameters: [{ name: "captureId", type: { kind: "string" }, description: "Capture ID to stop" }]
3884
- }, Cc = {
3885
- name: me.CaptureImage,
3884
+ }, Rc = {
3885
+ name: _e.CaptureImage,
3886
3886
  description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
3887
3887
  returnType: { kind: "string" },
3888
3888
  parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
3889
3889
  };
3890
- function bc(t, e) {
3890
+ function kc(t, e) {
3891
3891
  const r = [];
3892
3892
  return r.push(
3893
- t.register(Ac, async (n, s) => {
3893
+ t.register(gc, async (n, s) => {
3894
3894
  const i = e.mediaCapture;
3895
3895
  if (!i)
3896
3896
  throw new Error("Media capture is not available in this environment");
3897
- const o = _e(s);
3897
+ const o = Te(s);
3898
3898
  return ((typeof n == "string" && n.trim().toLowerCase() === "screen" ? "screen" : "camera") === "screen" ? await i.video.startScreen({ userGesture: !1, options: o, constraints: o?.constraints }) : await i.video.startCamera({ userGesture: !1, options: o, constraints: o?.constraints })).captureId;
3899
3899
  })
3900
3900
  ), r.push(
3901
- t.register(Nc, async (n) => {
3901
+ t.register(Cc, async (n) => {
3902
3902
  const s = e.mediaCapture;
3903
3903
  if (!s)
3904
3904
  throw new Error("Media capture is not available in this environment");
3905
- const i = _e(n);
3905
+ const i = Te(n);
3906
3906
  return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).captureId;
3907
3907
  })
3908
3908
  ), r.push(
3909
- t.register(gc, async (n) => {
3909
+ t.register(bc, async (n) => {
3910
3910
  const s = e.mediaCapture;
3911
3911
  if (!s || typeof n != "string" || !n.trim())
3912
3912
  return !1;
@@ -3914,11 +3914,11 @@ function bc(t, e) {
3914
3914
  return i || o;
3915
3915
  })
3916
3916
  ), r.push(
3917
- t.register(Cc, async (n) => {
3917
+ t.register(Rc, async (n) => {
3918
3918
  const s = e.mediaCapture;
3919
3919
  if (!s)
3920
3920
  throw new Error("Media capture is not available in this environment");
3921
- const i = _e(n) ?? {}, o = await s.image.captureFromCamera({
3921
+ const i = Te(n) ?? {}, o = await s.image.captureFromCamera({
3922
3922
  userGesture: !1,
3923
3923
  constraints: i.constraints,
3924
3924
  mime: i.mime,
@@ -3926,16 +3926,21 @@ function bc(t, e) {
3926
3926
  width: i.width,
3927
3927
  height: i.height
3928
3928
  }), a = JSON.stringify({ mime: o.mime, width: o.width, height: o.height });
3929
- return yc(a, o.data);
3929
+ return Nc(a, o.data);
3930
3930
  })
3931
3931
  ), () => {
3932
3932
  for (const n of r)
3933
3933
  n();
3934
3934
  };
3935
3935
  }
3936
- const Rc = globalThis;
3937
- function ae() {
3938
- if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" || Rc.crossOriginIsolated === !1)
3936
+ const gr = () => {
3937
+ if (typeof navigator > "u")
3938
+ return !1;
3939
+ const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
3940
+ return e || r;
3941
+ }, Uc = globalThis;
3942
+ function ce() {
3943
+ if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" || Uc.crossOriginIsolated === !1)
3939
3944
  return !1;
3940
3945
  try {
3941
3946
  new SharedArrayBuffer(1);
@@ -3944,43 +3949,43 @@ function ae() {
3944
3949
  }
3945
3950
  return !0;
3946
3951
  }
3947
- function Nr(t) {
3952
+ function Cr(t) {
3948
3953
  return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
3949
3954
  }
3950
- function kc(t) {
3955
+ function Dc(t) {
3951
3956
  return new Worker(
3952
- "" + new URL("assets/audio-playback-worker-CXmAFv0O.js", import.meta.url).href,
3957
+ "" + new URL("assets/audio-playback-worker-CYoIqiGJ.js", import.meta.url).href,
3953
3958
  {
3954
3959
  type: "module",
3955
3960
  name: t?.name
3956
3961
  }
3957
3962
  );
3958
3963
  }
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 = () => {
3964
+ const oe = 48e3, D = 2, br = 1500, it = 512, ot = "playback", Oc = 120, Mc = 300, vc = 4, Lc = 200, Pc = 100, Fc = 8e3, Bc = 10, Rr = 100, Re = 50, kr = 128, xc = 20, Gc = !0, N = v("IkonAudioPlayback"), Wc = () => {
3960
3965
  if (typeof navigator > "u" || typeof window > "u")
3961
3966
  return !1;
3962
3967
  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;
3963
3968
  return e || r;
3964
- }, ot = {
3969
+ }, at = {
3965
3970
  enabled: !1,
3966
3971
  statusIntervalMs: 1e3
3967
3972
  };
3968
3973
  function V(t) {
3969
3974
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
3970
3975
  }
3971
- function Wc(t) {
3976
+ function Vc(t) {
3972
3977
  return `
3973
3978
  // Audio buffer constants
3974
3979
  const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
3975
3980
  const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
3976
- const BUFFER_TARGET_MIN_MS = ${Dc};
3977
- const BUFFER_TARGET_MAX_MS = ${Oc};
3978
- const JITTER_MULTIPLIER = ${Mc};
3979
- const LOCAL_BUFFER_MAX_MS = ${gr};
3981
+ const BUFFER_TARGET_MIN_MS = ${Oc};
3982
+ const BUFFER_TARGET_MAX_MS = ${Mc};
3983
+ const JITTER_MULTIPLIER = ${vc};
3984
+ const LOCAL_BUFFER_MAX_MS = ${br};
3980
3985
  const CONTROL_PERIOD_MS = ${Lc};
3981
- const UNDERRUN_JUMP_MS = ${vc};
3986
+ const UNDERRUN_JUMP_MS = ${Pc};
3982
3987
  const STABLE_TIME_TO_DECREASE_MS = ${Fc};
3983
- const DECREASE_STEP_MS = ${Pc};
3988
+ const DECREASE_STEP_MS = ${Bc};
3984
3989
  const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
3985
3990
 
3986
3991
  // Pre-computed reciprocals for division-free calculations
@@ -3988,7 +3993,7 @@ const INV_OUTPUT_SAMPLE_RATE_HZ = 1 / OUTPUT_SAMPLE_RATE_HZ;
3988
3993
  const MS_PER_SAMPLE = 1000 * INV_OUTPUT_SAMPLE_RATE_HZ;
3989
3994
 
3990
3995
  // Fade envelope constants
3991
- const FADE_IN_DURATION_MS = ${Cr};
3996
+ const FADE_IN_DURATION_MS = ${Rr};
3992
3997
  const FADE_OUT_DURATION_MS = ${Re};
3993
3998
  const FADE_IN_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_IN_DURATION_MS / 1000);
3994
3999
  const FADE_OUT_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_OUT_DURATION_MS / 1000);
@@ -3996,10 +4001,10 @@ const FADE_IN_INCREMENT = 1.0 / FADE_IN_DURATION_SAMPLES;
3996
4001
  const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
3997
4002
 
3998
4003
  // Render quantum size (standard Web Audio API value)
3999
- const RENDER_QUANTUM_SIZE = ${br};
4004
+ const RENDER_QUANTUM_SIZE = ${kr};
4000
4005
 
4001
4006
  // Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
4002
- const BUFFER_REDUCTION_CROSSFADE_MS = ${Bc};
4007
+ const BUFFER_REDUCTION_CROSSFADE_MS = ${xc};
4003
4008
  const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
4004
4009
  const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
4005
4010
 
@@ -4881,12 +4886,12 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
4881
4886
  registerProcessor('ikon-audio-player', IkonAudioPlayerProcessor);
4882
4887
  `;
4883
4888
  }
4884
- class je {
4889
+ class Ye {
4885
4890
  client;
4886
4891
  config;
4887
4892
  enabled = !1;
4888
4893
  stateUnsubscribe = null;
4889
- isMobile = xc();
4894
+ isMobile = Wc();
4890
4895
  boundVisibilityChange = null;
4891
4896
  boundPageHide = null;
4892
4897
  unlockHandler = null;
@@ -4895,7 +4900,7 @@ class je {
4895
4900
  /** Timeout for AudioContext.resume() - normally resolves instantly, but some browsers hang indefinitely */
4896
4901
  static RESUME_TIMEOUT_MS = 100;
4897
4902
  audioContext = null;
4898
- outputSampleRateHz = Te;
4903
+ outputSampleRateHz = oe;
4899
4904
  audioWorkletNode = null;
4900
4905
  scriptProcessorNode = null;
4901
4906
  scriptDiagnosticsTimer = null;
@@ -4910,7 +4915,7 @@ class je {
4910
4915
  activeStreams = /* @__PURE__ */ new Set();
4911
4916
  mediaSessionConfig = null;
4912
4917
  constructor(e, r) {
4913
- this.client = e, this.config = r ?? {}, A.debug(`Audio playback initialized, isMobile=${this.isMobile}`);
4918
+ this.client = e, this.config = r ?? {}, N.debug(`Audio playback initialized, isMobile=${this.isMobile}`);
4914
4919
  }
4915
4920
  /**
4916
4921
  * Set Media Session metadata for OS-level media controls (lock screen, notifications).
@@ -4981,6 +4986,41 @@ class je {
4981
4986
  const e = this.getContextState(this.audioContext) === "running";
4982
4987
  this.notifyPlaybackActive(e);
4983
4988
  }
4989
+ /**
4990
+ * Request recovery of the AudioContext. Call this when external factors
4991
+ * (like audio capture stopping on iOS) may have disrupted playback.
4992
+ *
4993
+ * IMPORTANT: On iOS, this must be called synchronously from a user gesture handler
4994
+ * (e.g., button click/release) to ensure the AudioContext can be recreated.
4995
+ */
4996
+ requestRecovery() {
4997
+ if (this.enabled && gr() && this.audioContext) {
4998
+ this.stopAudioGraph();
4999
+ try {
5000
+ const e = new AudioContext({
5001
+ sampleRate: oe,
5002
+ latencyHint: ot
5003
+ });
5004
+ this.audioContext = e, this.outputSampleRateHz = e.sampleRate, e.resume(), this.setupAudioGraphAfterRecreate();
5005
+ } catch {
5006
+ this.addUnlockHandler();
5007
+ }
5008
+ return;
5009
+ }
5010
+ }
5011
+ /**
5012
+ * Set up audio worklet after recreating AudioContext on iOS.
5013
+ */
5014
+ async setupAudioGraphAfterRecreate() {
5015
+ if (!this.audioContext)
5016
+ return;
5017
+ const e = this.audioContext, r = this.resolveDiagnosticsConfig();
5018
+ try {
5019
+ await this.ensureAudioWorklet(e, r, void 0, { promptForUnlock: !1 });
5020
+ } catch {
5021
+ this.ensureScriptProcessor(e, r);
5022
+ }
5023
+ }
4984
5024
  /**
4985
5025
  * Dispose of resources. After calling this, the instance should not be reused.
4986
5026
  */
@@ -4990,8 +5030,8 @@ class je {
4990
5030
  resolveDiagnosticsConfig() {
4991
5031
  const e = this.config.diagnostics ?? {};
4992
5032
  return {
4993
- enabled: e.enabled ?? ot.enabled,
4994
- statusIntervalMs: e.statusIntervalMs ?? ot.statusIntervalMs
5033
+ enabled: e.enabled ?? at.enabled,
5034
+ statusIntervalMs: e.statusIntervalMs ?? at.statusIntervalMs
4995
5035
  };
4996
5036
  }
4997
5037
  resolveBackgroundConfig() {
@@ -5005,7 +5045,7 @@ class je {
5005
5045
  if (typeof window > "u")
5006
5046
  return;
5007
5047
  if (!this.audioContext) {
5008
- const a = Te, c = Uc;
5048
+ const a = oe, c = ot;
5009
5049
  try {
5010
5050
  this.audioContext = new AudioContext({ sampleRate: a, latencyHint: c });
5011
5051
  } catch (l) {
@@ -5015,17 +5055,17 @@ class je {
5015
5055
  try {
5016
5056
  this.audioContext = new AudioContext();
5017
5057
  } catch (d) {
5018
- A.warn(`Failed to create AudioContext: ${V(d)}`), this.audioContext = null;
5058
+ N.warn(`Failed to create AudioContext: ${V(d)}`), this.audioContext = null;
5019
5059
  return;
5020
5060
  }
5021
- A.debug(`AudioContext latencyHint unsupported: ${V(p)}`);
5061
+ N.debug(`AudioContext latencyHint unsupported: ${V(p)}`);
5022
5062
  }
5023
- A.debug(`AudioContext sample rate request unsupported: ${V(l)}`);
5063
+ N.debug(`AudioContext sample rate request unsupported: ${V(l)}`);
5024
5064
  }
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);
5065
+ this.outputSampleRateHz = this.audioContext.sampleRate || oe, this.outputSampleRateHz !== a && N.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
5026
5066
  }
5027
5067
  const n = this.audioContext, s = this.resolveDiagnosticsConfig();
5028
- if ((this.config.threading?.preferAudioWorklet ?? !0) && Nr(n)) {
5068
+ if ((this.config.performance?.preferAudioWorklet ?? !0) && Cr(n)) {
5029
5069
  await this.ensureAudioWorklet(n, s, e, r);
5030
5070
  return;
5031
5071
  }
@@ -5164,7 +5204,7 @@ class je {
5164
5204
  */
5165
5205
  async resumeWithTimeout(e) {
5166
5206
  const r = e.resume(), n = new Promise((s, i) => {
5167
- setTimeout(() => i(new Error("AudioContext.resume() timed out")), je.RESUME_TIMEOUT_MS);
5207
+ setTimeout(() => i(new Error("AudioContext.resume() timed out")), Ye.RESUME_TIMEOUT_MS);
5168
5208
  });
5169
5209
  await Promise.race([r, n]);
5170
5210
  }
@@ -5185,10 +5225,10 @@ class je {
5185
5225
  URL.revokeObjectURL(this.workletModuleUrl);
5186
5226
  } catch {
5187
5227
  }
5188
- this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([Wc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: D })], { type: "text/javascript" }));
5228
+ this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([Vc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: D })], { type: "text/javascript" }));
5189
5229
  }
5190
5230
  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;
5231
+ throw N.warn(`Failed to load AudioWorklet module, falling back: ${V(p)}`), p;
5192
5232
  }));
5193
5233
  try {
5194
5234
  await this.workletReady;
@@ -5197,7 +5237,7 @@ class je {
5197
5237
  return;
5198
5238
  }
5199
5239
  this.stopScriptProcessor();
5200
- const a = (this.config.threading?.preferSharedArrayBuffer ?? !0) && ae();
5240
+ const a = (this.config.performance?.preferSharedArrayBuffer ?? !0) && ce();
5201
5241
  this.audioWorkletNode = new AudioWorkletNode(e, "ikon-audio-player", {
5202
5242
  numberOfInputs: 0,
5203
5243
  numberOfOutputs: 1,
@@ -5214,7 +5254,7 @@ class je {
5214
5254
  if (!r.enabled)
5215
5255
  return;
5216
5256
  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}`);
5257
+ N.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}`);
5218
5258
  return;
5219
5259
  }
5220
5260
  if (d.type === "streamDrained" && "streamId" in d && typeof d.streamId == "string") {
@@ -5234,26 +5274,26 @@ class je {
5234
5274
  if (this.scriptProcessorNode)
5235
5275
  return;
5236
5276
  this.stopAudioWorklet(), this.pendingWorkletMessages = [];
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);
5277
+ const n = 1024, s = new Float32Array(n * D), i = Math.round(this.outputSampleRateHz * Rr / 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
5278
  d.onaudioprocess = (h) => {
5239
5279
  const f = h.outputBuffer, E = f.numberOfChannels, _ = f.length;
5240
5280
  for (let m = 0; m < E; m++) {
5241
5281
  const u = f.getChannelData(m);
5242
5282
  u.fill(0), l[m] = u;
5243
5283
  }
5244
- let N = 0;
5284
+ let y = 0;
5245
5285
  p.length = 0;
5246
5286
  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);
5287
+ u.totalSamples > 0 && (y += 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
5288
  for (let g = 0; g < _; g++) {
5249
5289
  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"));
5250
- for (let P = 0; P < E; P++) {
5251
- const O = s[g * E + P];
5252
- l[P][g] += O * u.fadeGain;
5290
+ for (let F = 0; F < E; F++) {
5291
+ const O = s[g * E + F];
5292
+ l[F][g] += O * u.fadeGain;
5253
5293
  }
5254
5294
  }
5255
- const y = u.ending || u.inputDrained;
5256
- if (y && u.totalSamples <= 0) {
5295
+ const A = u.ending || u.inputDrained;
5296
+ if (A && u.totalSamples <= 0) {
5257
5297
  if (u.fadeDirection === "out" && u.fadeGain > 1e-3) {
5258
5298
  for (let g = 0; g < _; g++)
5259
5299
  if (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 1e-3) {
@@ -5262,14 +5302,14 @@ class je {
5262
5302
  }
5263
5303
  }
5264
5304
  u.fadeGain <= 1e-3 && u.ending && p.push(m);
5265
- } else if (!y && u.totalSamples <= 0 && u.hasLastOut && u.lastOut && u.fadeGain > 1e-3) {
5305
+ } else if (!A && u.totalSamples <= 0 && u.hasLastOut && u.lastOut && u.fadeGain > 1e-3) {
5266
5306
  u.fadeDirection = "out", u.underrunPending = !0;
5267
- const g = u.lastOut, P = _ - 1;
5307
+ const g = u.lastOut, F = _ - 1;
5268
5308
  for (let O = 0; O < _; O++) {
5269
5309
  u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none");
5270
5310
  for (let W = 0; W < E; W++) {
5271
- const Or = g[P * E + W];
5272
- l[W][O] += Or * u.fadeGain;
5311
+ const vr = g[F * E + W];
5312
+ l[W][O] += vr * u.fadeGain;
5273
5313
  }
5274
5314
  }
5275
5315
  }
@@ -5279,16 +5319,16 @@ class je {
5279
5319
  this.fallbackQueues.delete(m), this.activeStreams.delete(m);
5280
5320
  this.activeStreams.size === 0 && this.removeUnlockHandler();
5281
5321
  }
5282
- if (N > 1) {
5283
- const m = 1 / Math.sqrt(N);
5322
+ if (y > 1) {
5323
+ const m = 1 / Math.sqrt(y);
5284
5324
  for (let u = 0; u < _; u++)
5285
- for (let y = 0; y < E; y++)
5286
- l[y][u] *= m;
5325
+ for (let A = 0; A < E; A++)
5326
+ l[A][u] *= m;
5287
5327
  }
5288
5328
  for (let m = 0; m < _; m++)
5289
5329
  for (let u = 0; u < E; u++) {
5290
- const y = l[u][m];
5291
- l[u][m] = y > 1 ? 1 : y < -1 ? -1 : y;
5330
+ const A = l[u][m];
5331
+ l[u][m] = A > 1 ? 1 : A < -1 ? -1 : A;
5292
5332
  }
5293
5333
  }, d.connect(e.destination), this.scriptProcessorNode = d, this.ensureScriptProcessorDiagnostics(r);
5294
5334
  }
@@ -5310,7 +5350,7 @@ class je {
5310
5350
  e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
5311
5351
  }
5312
5352
  trimFallbackQueue(e) {
5313
- const r = Math.floor(this.outputSampleRateHz * D * gr / 1e3), n = e.totalSamples - r;
5353
+ const r = Math.floor(this.outputSampleRateHz * D * br / 1e3), n = e.totalSamples - r;
5314
5354
  n <= 0 || this.skipFromFallbackQueue(e, n);
5315
5355
  }
5316
5356
  stopScriptProcessorDiagnostics() {
@@ -5330,7 +5370,7 @@ class je {
5330
5370
  if (s.totalSamples <= 0)
5331
5371
  continue;
5332
5372
  const o = s.totalSamples / D * 1e3 / this.outputSampleRateHz;
5333
- A.debug(`[Audio] stream=${n.substring(0, 8)} buffer=${o.toFixed(0)}ms renderer=ScriptProcessor`);
5373
+ N.debug(`[Audio] stream=${n.substring(0, 8)} buffer=${o.toFixed(0)}ms renderer=ScriptProcessor`);
5334
5374
  }
5335
5375
  }, r);
5336
5376
  }
@@ -5357,7 +5397,7 @@ class je {
5357
5397
  try {
5358
5398
  await this.resumeWithTimeout(e), this.removeUnlockHandler();
5359
5399
  } catch (o) {
5360
- A.warn(`Failed to resume AudioContext: ${V(o)}`), this.addUnlockHandler();
5400
+ N.warn(`Failed to resume AudioContext: ${V(o)}`), this.addUnlockHandler();
5361
5401
  }
5362
5402
  }
5363
5403
  async recoverAudioContext(e) {
@@ -5398,7 +5438,7 @@ class je {
5398
5438
  return;
5399
5439
  }
5400
5440
  } catch (i) {
5401
- A.debug(`AudioContext resume failed or timed out (${e.reason}): ${i}`);
5441
+ N.debug(`AudioContext resume failed or timed out (${e.reason}): ${i}`);
5402
5442
  }
5403
5443
  this.addUnlockHandler();
5404
5444
  }
@@ -5406,7 +5446,7 @@ class je {
5406
5446
  rebindWorkerTransportIfNeeded() {
5407
5447
  if (!this.audioWorker || !this.audioContext)
5408
5448
  return;
5409
- const s = (this.config.threading?.preferSharedArrayBuffer ?? !0) && !!this.audioWorkletNode && ae() ? "sab" : "pcm";
5449
+ const s = (this.config.performance?.preferSharedArrayBuffer ?? !0) && !!this.audioWorkletNode && ce() ? "sab" : "pcm";
5410
5450
  try {
5411
5451
  this.audioWorker.postMessage({
5412
5452
  type: "rebind",
@@ -5421,27 +5461,27 @@ class je {
5421
5461
  if (this.audioWorker)
5422
5462
  return;
5423
5463
  if (typeof Worker > "u") {
5424
- A.warn("Audio decode worker unavailable (Workers not supported)");
5464
+ N.warn("Audio decode worker unavailable (Workers not supported)");
5425
5465
  return;
5426
5466
  }
5427
5467
  const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: T.GROUP_AUDIO });
5428
5468
  if (!e) {
5429
- this.enabled && A.debug("Audio pipeline waiting for client connection");
5469
+ this.enabled && N.debug("Audio pipeline waiting for client connection");
5430
5470
  return;
5431
5471
  }
5432
5472
  this.protocolPort = e;
5433
5473
  try {
5434
- this.audioWorker = new kc();
5474
+ this.audioWorker = new Dc();
5435
5475
  } catch (d) {
5436
- A.warn(`Failed to create audio worker: ${V(d)}`), this.protocolPort.close(), this.protocolPort = null;
5476
+ N.warn(`Failed to create audio worker: ${V(d)}`), this.protocolPort.close(), this.protocolPort = null;
5437
5477
  return;
5438
5478
  }
5439
5479
  const r = this.audioWorker;
5440
5480
  r.addEventListener("message", (d) => this.onAudioWorkerMessage(d.data)), r.addEventListener("error", (d) => {
5441
5481
  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());
5482
+ N.error(`Audio worker failed: ${h.join(" ")}`.trim());
5443
5483
  });
5444
- const s = (this.config.threading?.preferSharedArrayBuffer ?? !0) && !!this.audioWorkletNode && ae(), i = this.config.threading?.preferWebCodecs ?? !0, o = {
5484
+ const s = (this.config.performance?.preferSharedArrayBuffer ?? !0) && !!this.audioWorkletNode && ce(), i = this.config.performance?.preferWebCodecs ?? !0, o = {
5445
5485
  type: "configure",
5446
5486
  transport: s ? "sab" : "pcm",
5447
5487
  outputSampleRate: this.outputSampleRateHz,
@@ -5450,7 +5490,7 @@ class je {
5450
5490
  };
5451
5491
  r.postMessage(o), r.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
5452
5492
  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`);
5493
+ N.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${p}, output=${this.outputSampleRateHz}Hz/${D}ch`);
5454
5494
  }
5455
5495
  onAudioWorkerMessage(e) {
5456
5496
  if (e.type === "streamBegin") {
@@ -5499,7 +5539,7 @@ class je {
5499
5539
  });
5500
5540
  return;
5501
5541
  }
5502
- e.type === "error" && A.warn(`Audio worker error${e.streamId ? ` (stream ${e.streamId})` : ""}: ${e.error.message}`);
5542
+ e.type === "error" && N.warn(`Audio worker error${e.streamId ? ` (stream ${e.streamId})` : ""}: ${e.error.message}`);
5503
5543
  }
5504
5544
  postToWorklet(e, r) {
5505
5545
  if (!this.audioWorkletNode) {
@@ -5596,7 +5636,7 @@ class je {
5596
5636
  }));
5597
5637
  }
5598
5638
  }
5599
- function Vc(t) {
5639
+ function Hc(t) {
5600
5640
  return new Worker(
5601
5641
  "" + new URL("assets/video-playback-worker-CIuL9Crw.js", import.meta.url).href,
5602
5642
  {
@@ -5605,11 +5645,11 @@ function Vc(t) {
5605
5645
  }
5606
5646
  );
5607
5647
  }
5608
- const H = L("IkonVideoPlayback");
5648
+ const H = v("IkonVideoPlayback");
5609
5649
  function Se(t) {
5610
5650
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
5611
5651
  }
5612
- class Hc {
5652
+ class $c {
5613
5653
  client;
5614
5654
  config;
5615
5655
  enabled = !0;
@@ -5675,7 +5715,7 @@ class Hc {
5675
5715
  this.enabled = !1, this.stateUnsubscribe?.(), this.stateUnsubscribe = null, this.surfaces.clear(), this.stopWorker();
5676
5716
  }
5677
5717
  canUseOffscreenCanvas(e) {
5678
- return this.config.threading?.preferOffscreenCanvas ?? !0 ? "transferControlToOffscreen" in e && typeof e.transferControlToOffscreen == "function" : !1;
5718
+ return this.config.performance?.preferOffscreenCanvas ?? !0 ? "transferControlToOffscreen" in e && typeof e.transferControlToOffscreen == "function" : !1;
5679
5719
  }
5680
5720
  hasDemand() {
5681
5721
  return this.surfaces.size > 0;
@@ -5689,7 +5729,7 @@ class Hc {
5689
5729
  }
5690
5730
  let e;
5691
5731
  try {
5692
- e = new Vc();
5732
+ e = new Hc();
5693
5733
  } catch (r) {
5694
5734
  H.warn(`Failed to create video worker: ${Se(r)}`);
5695
5735
  return;
@@ -5760,7 +5800,7 @@ class Hc {
5760
5800
  const r = this.parseStreamId(e);
5761
5801
  if (!r)
5762
5802
  return;
5763
- const n = ta(Zo(), this.client.sessionId ?? 0, {
5803
+ const n = na(ta(), this.client.sessionId ?? 0, {
5764
5804
  trackId: r.trackId,
5765
5805
  targetIds: [r.senderId]
5766
5806
  });
@@ -5823,11 +5863,11 @@ class Hc {
5823
5863
  }));
5824
5864
  }
5825
5865
  }
5826
- class $c {
5866
+ class Kc {
5827
5867
  audio;
5828
5868
  video;
5829
5869
  constructor(e, r) {
5830
- this.audio = new je(e, r?.audio), this.video = new Hc(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
5870
+ this.audio = new Ye(e, r?.audio), this.video = new $c(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
5831
5871
  }
5832
5872
  /**
5833
5873
  * Releases media resources (workers, audio graph, decoders).
@@ -5838,7 +5878,7 @@ class $c {
5838
5878
  this.audio.dispose(), this.video.dispose();
5839
5879
  }
5840
5880
  }
5841
- class Kc {
5881
+ class Yc {
5842
5882
  static getStorageForCapacity(e, r) {
5843
5883
  const n = Int32Array.BYTES_PER_ELEMENT * 2, s = r.BYTES_PER_ELEMENT * e;
5844
5884
  return new SharedArrayBuffer(n + s);
@@ -5894,19 +5934,19 @@ class Kc {
5894
5934
  }
5895
5935
  function jc(t) {
5896
5936
  return new Worker(
5897
- "" + new URL("assets/audio-capture-worker-Bnqb8-xb.js", import.meta.url).href,
5937
+ "" + new URL("assets/audio-capture-worker-zx_Os6ad.js", import.meta.url).href,
5898
5938
  {
5899
5939
  type: "module",
5900
5940
  name: t?.name
5901
5941
  }
5902
5942
  );
5903
5943
  }
5904
- const Yc = L("IkonAudioCapture");
5905
- function zc() {
5944
+ const zc = v("IkonAudioCapture");
5945
+ function Xc() {
5906
5946
  const t = globalThis.crypto;
5907
5947
  return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
5908
5948
  }
5909
- function Xc() {
5949
+ function Jc() {
5910
5950
  return `
5911
5951
  class RingBuffer {
5912
5952
  static getStorageForCapacity(capacity, type) {
@@ -5963,7 +6003,7 @@ class RingBuffer {
5963
6003
  }
5964
6004
  }
5965
6005
 
5966
- const RENDER_QUANTUM_SIZE = ${br};
6006
+ const RENDER_QUANTUM_SIZE = ${kr};
5967
6007
 
5968
6008
  class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
5969
6009
  constructor(options) {
@@ -6035,7 +6075,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
6035
6075
  registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
6036
6076
  `;
6037
6077
  }
6038
- class Jc {
6078
+ class Qc {
6039
6079
  constructor(e, r) {
6040
6080
  this.client = e, this.config = r ?? {};
6041
6081
  }
@@ -6060,7 +6100,7 @@ class Jc {
6060
6100
  const n = r.data;
6061
6101
  if (n?.type === "error") {
6062
6102
  const s = n.error;
6063
- Yc.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
6103
+ zc.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
6064
6104
  }
6065
6105
  }), e;
6066
6106
  }
@@ -6096,9 +6136,9 @@ class Jc {
6096
6136
  return await navigator.mediaDevices.getUserMedia({ audio: n });
6097
6137
  }
6098
6138
  async ensureWorklet(e) {
6099
- if (!Nr(e))
6139
+ if (!Cr(e))
6100
6140
  throw new Error("AudioWorklet is not supported in this browser");
6101
- this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([Xc()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
6141
+ this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([Jc()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
6102
6142
  try {
6103
6143
  await this.workletReady;
6104
6144
  } catch (r) {
@@ -6114,13 +6154,13 @@ class Jc {
6114
6154
  if (!i)
6115
6155
  throw s.getTracks().forEach((m) => m.stop()), new Error("No audio track available");
6116
6156
  await this.ensureWorklet(n);
6117
- const o = zc(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), l = n.createGain();
6157
+ const o = Xc(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), l = n.createGain();
6118
6158
  l.gain.value = 0, l.connect(n.destination);
6119
- const h = ae() ? "sab" : "pcm";
6159
+ const h = ce() ? "sab" : "pcm";
6120
6160
  let f;
6121
6161
  if (h === "sab") {
6122
6162
  const m = Math.floor(n.sampleRate * 2);
6123
- f = Kc.getStorageForCapacity(m, Float32Array);
6163
+ f = Yc.getStorageForCapacity(m, Float32Array);
6124
6164
  }
6125
6165
  const E = this.ensureWorker();
6126
6166
  E.postMessage({
@@ -6132,19 +6172,19 @@ class Jc {
6132
6172
  channels: 1,
6133
6173
  options: {
6134
6174
  ...e.options,
6135
- preferWebCodecs: this.config.threading?.preferWebCodecs
6175
+ preferWebCodecs: this.config.performance?.preferWebCodecs
6136
6176
  },
6137
6177
  transport: h,
6138
6178
  sharedArrayBuffer: f
6139
6179
  }), await new Promise((m, u) => {
6140
- const y = setTimeout(() => {
6180
+ const A = setTimeout(() => {
6141
6181
  E.removeEventListener("message", g), u(new Error("Audio capture worker start timeout"));
6142
- }, 1e4), g = (P) => {
6143
- const O = P.data;
6182
+ }, 1e4), g = (F) => {
6183
+ const O = F.data;
6144
6184
  if (O?.type === "started" && O.captureId === o)
6145
- clearTimeout(y), E.removeEventListener("message", g), m();
6185
+ clearTimeout(A), E.removeEventListener("message", g), m();
6146
6186
  else if (O?.type === "error" && O.captureId === o) {
6147
- clearTimeout(y), E.removeEventListener("message", g);
6187
+ clearTimeout(A), E.removeEventListener("message", g);
6148
6188
  const W = O.error;
6149
6189
  u(new Error(W?.message ?? "Audio capture failed to start"));
6150
6190
  }
@@ -6164,11 +6204,11 @@ class Jc {
6164
6204
  c.connect(_), _.connect(l), h === "pcm" && (_.port.onmessage = (m) => {
6165
6205
  const u = m.data;
6166
6206
  if (!(!u || typeof u != "object") && u.type === "pcm" && u.pcm instanceof Float32Array) {
6167
- const y = u.pcm;
6168
- E.postMessage({ type: "pcm", captureId: o, pcm: y }, [y.buffer]);
6207
+ const A = u.pcm;
6208
+ E.postMessage({ type: "pcm", captureId: o, pcm: A }, [A.buffer]);
6169
6209
  }
6170
6210
  });
6171
- const N = {
6211
+ const y = {
6172
6212
  captureId: o,
6173
6213
  trackId: a,
6174
6214
  stream: s,
@@ -6179,14 +6219,14 @@ class Jc {
6179
6219
  gain: l,
6180
6220
  stopped: !1,
6181
6221
  startSegment: () => {
6182
- N.stopped || E.postMessage({ type: "startSegment", captureId: o });
6222
+ y.stopped || E.postMessage({ type: "startSegment", captureId: o });
6183
6223
  },
6184
6224
  endSegment: () => {
6185
- N.stopped || E.postMessage({ type: "endSegment", captureId: o });
6225
+ y.stopped || (E.postMessage({ type: "endSegment", captureId: o }), gr() && y.stop());
6186
6226
  },
6187
6227
  stop: async () => {
6188
- if (!N.stopped) {
6189
- N.stopped = !0, this.captures.delete(o);
6228
+ if (!y.stopped) {
6229
+ y.stopped = !0, this.captures.delete(o);
6190
6230
  try {
6191
6231
  c.disconnect();
6192
6232
  } catch {
@@ -6208,8 +6248,16 @@ class Jc {
6208
6248
  }
6209
6249
  };
6210
6250
  return i.addEventListener("ended", () => {
6211
- N.stop();
6212
- }), this.captures.set(o, N), { captureId: o, startSegment: N.startSegment, endSegment: N.endSegment, stop: N.stop };
6251
+ y.stop();
6252
+ }), this.captures.set(o, y), {
6253
+ captureId: o,
6254
+ get isActive() {
6255
+ return !y.stopped;
6256
+ },
6257
+ startSegment: y.startSegment,
6258
+ endSegment: y.endSegment,
6259
+ stop: y.stop
6260
+ };
6213
6261
  }
6214
6262
  async stop(e) {
6215
6263
  const r = this.captures.get(e);
@@ -6253,7 +6301,7 @@ class Jc {
6253
6301
  }
6254
6302
  }
6255
6303
  }
6256
- async function Qc(t, e) {
6304
+ async function qc(t, e) {
6257
6305
  const r = e.mime ?? "image/jpeg", n = e.quality ?? 0.92;
6258
6306
  if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
6259
6307
  try {
@@ -6271,7 +6319,7 @@ async function Qc(t, e) {
6271
6319
  );
6272
6320
  });
6273
6321
  }
6274
- class qc {
6322
+ class Zc {
6275
6323
  async acquireCameraStream(e) {
6276
6324
  if (!navigator.mediaDevices)
6277
6325
  throw new Error("Media devices are not available in this environment");
@@ -6289,8 +6337,8 @@ class qc {
6289
6337
  }
6290
6338
  try {
6291
6339
  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 });
6340
+ const _ = () => f(), y = () => E(new Error("Failed to load video element"));
6341
+ s.addEventListener("loadedmetadata", _, { once: !0 }), s.addEventListener("error", y, { once: !0 });
6294
6342
  });
6295
6343
  try {
6296
6344
  await s.play();
@@ -6308,7 +6356,7 @@ class qc {
6308
6356
  if (!p)
6309
6357
  throw new Error("2D canvas context unavailable");
6310
6358
  p.drawImage(s, 0, 0, a, c);
6311
- const d = await Qc(l, e), h = await d.arrayBuffer();
6359
+ const d = await qc(l, e), h = await d.arrayBuffer();
6312
6360
  return {
6313
6361
  mime: d.type || e.mime || "image/jpeg",
6314
6362
  width: a,
@@ -6335,7 +6383,7 @@ class qc {
6335
6383
  }
6336
6384
  }
6337
6385
  }
6338
- function Zc(t) {
6386
+ function el(t) {
6339
6387
  return new Worker(
6340
6388
  "" + new URL("assets/video-capture-worker-CTRX9PKp.js", import.meta.url).href,
6341
6389
  {
@@ -6344,18 +6392,18 @@ function Zc(t) {
6344
6392
  }
6345
6393
  );
6346
6394
  }
6347
- const at = L("IkonVideoCapture");
6348
- function el() {
6395
+ const ct = v("IkonVideoCapture");
6396
+ function tl() {
6349
6397
  const t = globalThis.crypto;
6350
6398
  return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
6351
6399
  }
6352
- function tl() {
6400
+ function rl() {
6353
6401
  const t = globalThis.MediaStreamTrackProcessor;
6354
6402
  if (!t)
6355
6403
  throw new Error("MediaStreamTrackProcessor is not available in this browser");
6356
6404
  return t;
6357
6405
  }
6358
- class rl {
6406
+ class nl {
6359
6407
  constructor(e) {
6360
6408
  this.client = e;
6361
6409
  }
@@ -6371,12 +6419,12 @@ class rl {
6371
6419
  ensureWorker() {
6372
6420
  if (this.worker)
6373
6421
  return this.worker;
6374
- const e = new Zc();
6422
+ const e = new el();
6375
6423
  return this.worker = e, e.addEventListener("message", (r) => {
6376
6424
  const n = r.data;
6377
6425
  if (n?.type === "error") {
6378
6426
  const s = n.error;
6379
- at.warn(`Video capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
6427
+ ct.warn(`Video capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
6380
6428
  }
6381
6429
  }), e;
6382
6430
  }
@@ -6406,10 +6454,10 @@ class rl {
6406
6454
  if (!r)
6407
6455
  throw new Error("Cannot start video capture before client is connected");
6408
6456
  this.ensurePorts();
6409
- const n = el(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
6457
+ const n = tl(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
6410
6458
  if (!i)
6411
6459
  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();
6460
+ const o = i.getSettings(), a = o.width ?? e.options?.width ?? 1280, c = o.height ?? e.options?.height ?? 720, l = rl(), d = new l({ track: i }).readable.getReader(), h = this.allocateTrackId(), f = this.ensureWorker();
6413
6461
  f.postMessage({
6414
6462
  type: "start",
6415
6463
  captureId: n,
@@ -6484,30 +6532,30 @@ class rl {
6484
6532
  i && (n += 1, r.postMessage({ type: "frame", captureId: e.captureId, frame: i, frameNumber: n }, [i]));
6485
6533
  }
6486
6534
  } catch (s) {
6487
- e.stopped || at.warn(`Video capture frame pump failed: ${s}`);
6535
+ e.stopped || ct.warn(`Video capture frame pump failed: ${s}`);
6488
6536
  } finally {
6489
6537
  await e.stop();
6490
6538
  }
6491
6539
  }
6492
6540
  }
6493
- class nl {
6541
+ class sl {
6494
6542
  audio;
6495
6543
  video;
6496
6544
  image;
6497
6545
  constructor(e, r) {
6498
- this.audio = new Jc(e, r?.audio), this.video = new rl(e), this.image = new qc();
6546
+ this.audio = new Qc(e, r?.audio), this.video = new nl(e), this.image = new Zc();
6499
6547
  }
6500
6548
  dispose() {
6501
6549
  this.audio.dispose(), this.video.dispose();
6502
6550
  }
6503
6551
  }
6504
- const ct = {
6552
+ const lt = {
6505
6553
  [R.WebTransport]: 0,
6506
6554
  [R.WebSocket]: 1,
6507
6555
  [R.WebTransportProxy]: 2,
6508
6556
  [R.WebSocketProxy]: 3
6509
6557
  }, we = "ikon_endpoint_type";
6510
- class sl {
6558
+ class il {
6511
6559
  isLocal;
6512
6560
  workingEndpointType = null;
6513
6561
  constructor(e) {
@@ -6522,7 +6570,7 @@ class sl {
6522
6570
  if (this.isLocal)
6523
6571
  return r;
6524
6572
  const n = [...r].sort((s, i) => {
6525
- const o = ct[s] ?? 999, a = ct[i] ?? 999;
6573
+ const o = lt[s] ?? 999, a = lt[i] ?? 999;
6526
6574
  return o - a;
6527
6575
  });
6528
6576
  if (this.workingEndpointType !== null && e.has(this.workingEndpointType)) {
@@ -6568,8 +6616,8 @@ class sl {
6568
6616
  }
6569
6617
  }
6570
6618
  }
6571
- const S = L("IkonClient");
6572
- class yl {
6619
+ const S = v("IkonClient");
6620
+ class Al {
6573
6621
  channelManager = null;
6574
6622
  protocolWorker = null;
6575
6623
  workerManagerState = null;
@@ -6625,29 +6673,29 @@ class yl {
6625
6673
  return this._mediaCapture;
6626
6674
  }
6627
6675
  constructor(e) {
6628
- this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? pa, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? Ea;
6676
+ this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? Ia, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? ma;
6629
6677
  const r = [e.local, e.apiKey, e.sessionToken].filter(Boolean).length;
6630
6678
  if (r === 0)
6631
6679
  throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
6632
6680
  if (r > 1)
6633
6681
  throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
6634
- if (this.endpointSelector = new sl({
6682
+ if (this.endpointSelector = new il({
6635
6683
  local: e.local
6636
- }), this._functionRegistry = new wc(), rt() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Ic(this._functionRegistry)), e.audio || e.video) {
6684
+ }), this._functionRegistry = new Ac(), rt() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = _c(this._functionRegistry)), e.audio || e.video) {
6637
6685
  const n = e.audio ? {
6638
- threading: e.audio.threading,
6686
+ performance: e.audio.performance,
6639
6687
  background: e.audio.background,
6640
6688
  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);
6689
+ } : void 0, s = e.video ? { performance: e.video.performance } : void 0;
6690
+ this._media = new Kc(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
6691
  }
6644
- rt() && (this._mediaCapture = new nl(this, {
6692
+ rt() && (this._mediaCapture = new sl(this, {
6645
6693
  audio: {
6646
- threading: {
6647
- preferWebCodecs: e.audio?.threading?.preferWebCodecs
6694
+ performance: {
6695
+ preferWebCodecs: e.audio?.performance?.preferWebCodecs
6648
6696
  }
6649
6697
  }
6650
- }), this.unregisterMediaCaptureFunctions = bc(this._functionRegistry, this));
6698
+ }), this.unregisterMediaCaptureFunctions = kc(this._functionRegistry, this));
6651
6699
  }
6652
6700
  _lastError = void 0;
6653
6701
  /**
@@ -6712,7 +6760,7 @@ class yl {
6712
6760
  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");
6713
6761
  }
6714
6762
  sendActionCall(e, r) {
6715
- const n = Kr(
6763
+ const n = jr(
6716
6764
  {
6717
6765
  ActionId: I.fromString(e),
6718
6766
  PayloadJson: r ?? "{}"
@@ -6828,7 +6876,7 @@ class yl {
6828
6876
  if (!(!a || typeof a != "object") && !(a.type !== "send" || !(a.message instanceof ArrayBuffer)))
6829
6877
  try {
6830
6878
  const c = new Uint8Array(a.message);
6831
- if ((oe(c) & e.opcodeGroupsMask) === 0)
6879
+ if ((ae(c) & e.opcodeGroupsMask) === 0)
6832
6880
  return;
6833
6881
  this.channelManager?.sendProtocolMessage(c);
6834
6882
  } catch (c) {
@@ -6888,25 +6936,25 @@ class yl {
6888
6936
  async authenticate() {
6889
6937
  const e = this.abortController?.signal;
6890
6938
  if (this.config.local)
6891
- return Aa(this.config.local, e);
6939
+ return ga(this.config.local, e);
6892
6940
  if (this.config.apiKey)
6893
- return Na(this.config.apiKey, e);
6941
+ return Ca(this.config.apiKey, e);
6894
6942
  if (this.config.sessionToken)
6895
- return ga(this.config.sessionToken, e);
6943
+ return ba(this.config.sessionToken, e);
6896
6944
  throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
6897
6945
  }
6898
6946
  /**
6899
6947
  * Handle incoming protocol message from channel manager.
6900
6948
  */
6901
6949
  handleProtocolMessage(e) {
6902
- const r = ce(e), n = oe(e);
6950
+ const r = le(e), n = ae(e);
6903
6951
  if (this._functionRegistry.handleProtocolMessage(e, r)) {
6904
6952
  this.notifyMessageSubscribers(e, r, n);
6905
6953
  return;
6906
6954
  }
6907
6955
  if (r === T.CORE_GLOBAL_STATE)
6908
6956
  try {
6909
- this._globalState = po(e), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
6957
+ this._globalState = Io(e), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
6910
6958
  } catch (s) {
6911
6959
  S.error("Failed to parse GlobalState:", s);
6912
6960
  }
@@ -6923,10 +6971,10 @@ class yl {
6923
6971
  const c = i[a];
6924
6972
  try {
6925
6973
  if (c) {
6926
- if (c.opcodeGroupsMask !== void 0 && ((n ?? oe(e)) & c.opcodeGroupsMask) === 0)
6974
+ if (c.opcodeGroupsMask !== void 0 && ((n ?? ae(e)) & c.opcodeGroupsMask) === 0)
6927
6975
  continue;
6928
6976
  if (c.opcodes && c.opcodes.length > 0) {
6929
- const l = r ?? ce(e);
6977
+ const l = r ?? le(e);
6930
6978
  if (!c.opcodes.includes(l))
6931
6979
  continue;
6932
6980
  }
@@ -6994,7 +7042,7 @@ class yl {
6994
7042
  }
6995
7043
  let r;
6996
7044
  try {
6997
- r = new ra();
7045
+ r = new sa();
6998
7046
  } catch (c) {
6999
7047
  S.warn(`Failed to create protocol worker, falling back to main thread: ${c}`), await this.connectProtocolOnMainThread(e);
7000
7048
  return;
@@ -7041,7 +7089,7 @@ class yl {
7041
7089
  }
7042
7090
  }
7043
7091
  async connectProtocolOnMainThread(e) {
7044
- this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new fa({
7092
+ this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new Ea({
7045
7093
  sessionId: this._sessionId,
7046
7094
  keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? Qe,
7047
7095
  reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? qe,
@@ -7172,121 +7220,121 @@ class yl {
7172
7220
  }
7173
7221
  }
7174
7222
  }
7175
- function Al(t) {
7223
+ function Nl(t) {
7176
7224
  return t === "connecting" || t === "connectingSlow" || t === "reconnecting";
7177
7225
  }
7178
- function Nl(t) {
7226
+ function gl(t) {
7179
7227
  return t === "connected";
7180
7228
  }
7181
- function gl(t) {
7229
+ function Cl(t) {
7182
7230
  return t === "offline" || t === "offlineError" || t === "idle";
7183
7231
  }
7184
- function Cl(t) {
7232
+ function bl(t) {
7185
7233
  return t === "offlineError";
7186
7234
  }
7187
- const Rr = /* @__PURE__ */ new Map();
7235
+ const Ur = /* @__PURE__ */ new Map();
7188
7236
  for (const [t, e] of Object.entries(T))
7189
- typeof e == "number" && Rr.set(e, t);
7190
- function bl(t) {
7191
- return Rr.get(t) ?? `UNKNOWN_${t}`;
7192
- }
7193
- const kr = 1e3, Ur = fr.INFO;
7194
- let M = [], ke = kr, Dr = Ur, Ue = null;
7195
- function il(t) {
7196
- t.level < Dr || (M.push(t), M.length > ke && (M = M.slice(-ke)));
7237
+ typeof e == "number" && Ur.set(e, t);
7238
+ function Rl(t) {
7239
+ return Ur.get(t) ?? `UNKNOWN_${t}`;
7197
7240
  }
7241
+ const Dr = 1e3, Or = pr.INFO;
7242
+ let M = [], ke = Dr, Mr = Or, Ue = null;
7198
7243
  function ol(t) {
7199
- ke = t?.maxBufferSize ?? kr, Dr = t?.minLevel ?? Ur, M = [], ia(il);
7244
+ t.level < Mr || (M.push(t), M.length > ke && (M = M.slice(-ke)));
7200
7245
  }
7201
- function Rl(t) {
7246
+ function al(t) {
7247
+ ke = t?.maxBufferSize ?? Dr, Mr = t?.minLevel ?? Or, M = [], aa(ol);
7248
+ }
7249
+ function kl(t) {
7202
7250
  Ue = t;
7203
7251
  }
7204
- function kl() {
7252
+ function Ul() {
7205
7253
  return M;
7206
7254
  }
7207
- function al() {
7255
+ function cl() {
7208
7256
  const t = M;
7209
7257
  return M = [], t;
7210
7258
  }
7211
- function Ul() {
7259
+ function Dl() {
7212
7260
  if (!Ue || M.length === 0)
7213
7261
  return 0;
7214
- const t = al();
7262
+ const t = cl();
7215
7263
  return Ue(t), t.length;
7216
7264
  }
7217
- function Dl() {
7265
+ function Ol() {
7218
7266
  M = [];
7219
7267
  }
7220
- function Ol() {
7268
+ function Ml() {
7221
7269
  return M.length;
7222
7270
  }
7223
- ol();
7271
+ al();
7224
7272
  export {
7225
7273
  w as AuthenticationError,
7226
- ha as Channel,
7227
- fa as ChannelManager,
7228
- ll as ChannelNotFoundError,
7229
- Y as ClientType,
7230
- xe as ConnectionError,
7274
+ pa as Channel,
7275
+ Ea as ChannelManager,
7276
+ ul as ChannelNotFoundError,
7277
+ j as ClientType,
7278
+ Ge as ConnectionError,
7231
7279
  z as ContextType,
7232
- sl as EndpointSelector,
7280
+ il as EndpointSelector,
7233
7281
  R as EntrypointType,
7234
- wc as FunctionRegistry,
7235
- ml as IKON_AUTH_BASE_URL,
7282
+ Ac as FunctionRegistry,
7283
+ _l as IKON_AUTH_BASE_URL,
7236
7284
  tt as IKON_AUTH_URL_DEV,
7237
7285
  et as IKON_AUTH_URL_PROD,
7238
- fe as IKON_BACKEND_URL_DEV,
7286
+ pe as IKON_BACKEND_URL_DEV,
7239
7287
  Ce as IKON_BACKEND_URL_PROD,
7240
- Jc as IkonAudioCapture,
7241
- je as IkonAudioPlayback,
7242
- yl as IkonClient,
7243
- qc as IkonImageCapture,
7244
- $c as IkonMedia,
7245
- nl as IkonMediaCapture,
7246
- rl as IkonVideoCapture,
7247
- Hc as IkonVideoPlayback,
7288
+ Qc as IkonAudioCapture,
7289
+ Ye as IkonAudioPlayback,
7290
+ Al as IkonClient,
7291
+ Zc as IkonImageCapture,
7292
+ Kc as IkonMedia,
7293
+ sl as IkonMediaCapture,
7294
+ nl as IkonVideoCapture,
7295
+ $c as IkonVideoPlayback,
7248
7296
  We as KeepaliveTimeoutError,
7249
- fr as LogLevel,
7250
- na as MaxRetriesExceededError,
7251
- dl as NoChannelsError,
7297
+ pr as LogLevel,
7298
+ ia as MaxRetriesExceededError,
7299
+ hl as NoChannelsError,
7252
7300
  T as Opcode,
7253
- sa as ProvisioningTimeoutError,
7254
- ul as SpaceNotFoundError,
7255
- x as TransportError,
7301
+ oa as ProvisioningTimeoutError,
7302
+ dl as SpaceNotFoundError,
7303
+ G as TransportError,
7256
7304
  J as UserType,
7257
- cl as asProtocolMessage,
7258
- El as clearDeviceId,
7259
- Dl as clearLogBuffer,
7260
- L as createLogger,
7261
- Sl as deriveAuthUrl,
7262
- Tl as deriveBackendType,
7263
- _l as deriveBackendUrl,
7264
- Il as extractUserIdFromToken,
7265
- Ul as flushLogs,
7266
- kl as getBufferedLogs,
7267
- Ol as getLogBufferSize,
7268
- fl as getLogLevel,
7269
- pl as getLogSink,
7270
- bl as getOpcodeName,
7305
+ ll as asProtocolMessage,
7306
+ Il as clearDeviceId,
7307
+ Ol as clearLogBuffer,
7308
+ v as createLogger,
7309
+ wl as deriveAuthUrl,
7310
+ Sl as deriveBackendType,
7311
+ Tl as deriveBackendUrl,
7312
+ ml as extractUserIdFromToken,
7313
+ Dl as flushLogs,
7314
+ Ul as getBufferedLogs,
7315
+ Ml as getLogBufferSize,
7316
+ pl as getLogLevel,
7317
+ El as getLogSink,
7318
+ Rl as getOpcodeName,
7271
7319
  He as getOrCreateDeviceId,
7272
- ol as initializeLogSink,
7273
- Nr as isAudioWorkletSupported,
7320
+ al as initializeLogSink,
7321
+ Cr as isAudioWorkletSupported,
7274
7322
  rt as isBrowserEnvironment,
7275
7323
  $e as isCloudEnvironment,
7276
- Nl as isConnected,
7277
- Al as isConnecting,
7278
- Cl as isError,
7279
- gl as isOffline,
7280
- ae as isSharedArrayBufferSupported,
7281
- pr as isWebTransportSupported,
7282
- wl as parseUrlParams,
7283
- ce as readOpcode,
7284
- oe as readOpcodeGroup,
7324
+ gl as isConnected,
7325
+ Nl as isConnecting,
7326
+ bl as isError,
7327
+ Cl as isOffline,
7328
+ ce as isSharedArrayBufferSupported,
7329
+ Er as isWebTransportSupported,
7330
+ yl as parseUrlParams,
7331
+ le as readOpcode,
7332
+ ae as readOpcodeGroup,
7285
7333
  re as readProtocolMessageHeaders,
7286
- Ic as registerBrowserFunctions,
7287
- hl as setLogLevel,
7288
- ia as setLogSink,
7289
- Rl as setSendLogsCallback,
7290
- al as takeBufferedLogs,
7291
- yc as withResultData
7334
+ _c as registerBrowserFunctions,
7335
+ fl as setLogLevel,
7336
+ aa as setLogSink,
7337
+ kl as setSendLogsCallback,
7338
+ cl as takeBufferedLogs,
7339
+ Nc as withResultData
7292
7340
  };