@ikonai/sdk 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,4 +1,7 @@
1
- function pl(t) {
1
+ const Wr = {
2
+ Compressed: 8
3
+ };
4
+ function _l(t) {
2
5
  return t;
3
6
  }
4
7
  function ue(t) {
@@ -13,7 +16,7 @@ function ne(t) {
13
16
  const e = se(t), r = new DataView(e.buffer, e.byteOffset, e.byteLength);
14
17
  if (e.length < 27)
15
18
  throw new Error("Protocol payload too short");
16
- const n = r.getUint32(0, !0), s = r.getUint32(4, !0), i = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), c = r.getUint32(20, !0), u = r.getUint8(24), f = r.getUint8(25), d = r.getUint8(26);
19
+ const n = r.getUint32(0, !0), s = r.getUint32(4, !0), i = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), c = r.getUint32(20, !0), l = r.getUint8(24), f = r.getUint8(25), d = r.getUint8(26);
17
20
  if (27 + c * 4 > e.length)
18
21
  throw new Error("Protocol header exceeds payload length");
19
22
  const E = [];
@@ -27,30 +30,49 @@ function ne(t) {
27
30
  trackId: o,
28
31
  sequenceId: a,
29
32
  targetIds: E,
30
- payloadVersion: u,
33
+ payloadVersion: l,
31
34
  payloadType: f,
32
35
  flags: d
33
36
  };
34
37
  }
35
- function Me(t, e, r) {
38
+ async function Le(t, e, r) {
36
39
  const n = se(t), s = ne(n);
37
40
  if (e !== void 0 && s.opcode !== e)
38
41
  throw new Error(`Unexpected opcode ${s.opcode}`);
39
42
  if (s.payloadType !== 8)
40
43
  throw new Error(`Unexpected payload type ${s.payloadType}`);
41
44
  const i = 27 + s.targetIds.length * 4;
42
- return n.subarray(i, s.length);
45
+ let o = n.subarray(i, s.length);
46
+ return (s.flags & Wr.Compressed) !== 0 && (o = await Hr(o)), o;
43
47
  }
44
48
  function F(t, e, r, n, s) {
45
- const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], u = s?.payloadType ?? 8, f = 27 + c.length * 4, d = f + e.length, h = new Uint8Array(d), E = new DataView(h.buffer);
46
- E.setUint32(0, d, !0), E.setUint32(4, t >>> 0, !0), E.setUint32(8, n >>> 0, !0), E.setUint32(12, i >>> 0, !0), E.setUint32(16, o >>> 0, !0), E.setUint32(20, c.length >>> 0, !0), E.setUint8(24, r & 255), E.setUint8(25, u & 255), E.setUint8(26, a & 255);
49
+ const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], l = s?.payloadType ?? 8, f = 27 + c.length * 4, d = f + e.length, h = new Uint8Array(d), E = new DataView(h.buffer);
50
+ E.setUint32(0, d, !0), E.setUint32(4, t >>> 0, !0), E.setUint32(8, n >>> 0, !0), E.setUint32(12, i >>> 0, !0), E.setUint32(16, o >>> 0, !0), E.setUint32(20, c.length >>> 0, !0), E.setUint8(24, r & 255), E.setUint8(25, l & 255), E.setUint8(26, a & 255);
47
51
  let m = 27;
48
52
  for (let I = 0; I < c.length; I++)
49
53
  E.setUint32(m, c[I] >>> 0, !0), m += 4;
50
54
  return h.set(e, f), h;
51
55
  }
56
+ async function Hr(t) {
57
+ if (typeof DecompressionStream > "u")
58
+ throw new Error("DecompressionStream not supported");
59
+ const e = new DecompressionStream("gzip"), r = e.writable.getWriter(), n = new Uint8Array(t);
60
+ r.write(n), r.close();
61
+ const s = e.readable.getReader(), i = [];
62
+ let o = 0;
63
+ for (; ; ) {
64
+ const { done: l, value: f } = await s.read();
65
+ if (l) break;
66
+ i.push(f), o += f.length;
67
+ }
68
+ const a = new Uint8Array(o);
69
+ let c = 0;
70
+ for (let l = 0; l < i.length; l++)
71
+ a.set(i[l], c), c += i[l].length;
72
+ return a;
73
+ }
52
74
  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 || {});
53
- const ht = 161, dt = 162, he = new TextEncoder(), xr = new TextDecoder("utf-8", { fatal: !0 });
75
+ const ht = 161, dt = 162, he = new TextEncoder(), Kr = new TextDecoder("utf-8", { fatal: !0 });
54
76
  class D {
55
77
  constructor(e = 1) {
56
78
  this.version = e, this.buffer.writeByte(ht), this.buffer.writeVarUInt(e >>> 0);
@@ -105,7 +127,7 @@ class D {
105
127
  this.writeVariableField(e, 9, i);
106
128
  }
107
129
  writeDictionaryField(e, r, n, s) {
108
- const i = new Oe(r, n);
130
+ const i = new ve(r, n);
109
131
  s(i);
110
132
  const o = i.finish();
111
133
  this.writeVariableField(e, 10, o);
@@ -120,7 +142,7 @@ class D {
120
142
  this.writeFieldHeader(e, r, n.length), this.buffer.writeBytes(n);
121
143
  }
122
144
  writeFieldHeader(e, r, n) {
123
- this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(de(r)), Kr(r) && this.buffer.writeVarUInt(n >>> 0);
145
+ this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(de(r)), Xr(r) && this.buffer.writeVarUInt(n >>> 0);
124
146
  }
125
147
  }
126
148
  class _e {
@@ -220,7 +242,7 @@ class _e {
220
242
  10
221
243
  /* Dict */
222
244
  ), this.count++;
223
- const s = new Oe(e, r);
245
+ const s = new ve(e, r);
224
246
  n(s);
225
247
  const i = s.finish();
226
248
  this.payload.writeBytes(i);
@@ -234,9 +256,9 @@ class _e {
234
256
  throw new Error(`Array element type is ${b[this.elementType]}, expected ${b[e]}`);
235
257
  }
236
258
  }
237
- class Oe {
259
+ class ve {
238
260
  constructor(e, r) {
239
- this.keyType = e, this.valueType = r, Pe(e);
261
+ this.keyType = e, this.valueType = r, Be(e);
240
262
  }
241
263
  payload = new H();
242
264
  count = 0;
@@ -244,7 +266,7 @@ class Oe {
244
266
  beginEntry() {
245
267
  if (this.entryOpen)
246
268
  throw new Error("Previous dictionary entry not completed");
247
- return this.count++, this.entryOpen = !0, new Vr(this.keyType, this.valueType, this.payload, () => {
269
+ return this.count++, this.entryOpen = !0, new $r(this.keyType, this.valueType, this.payload, () => {
248
270
  this.entryOpen = !1;
249
271
  });
250
272
  }
@@ -255,7 +277,7 @@ class Oe {
255
277
  return e.writeByte(de(this.keyType)), e.writeByte(de(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
256
278
  }
257
279
  }
258
- class Vr {
280
+ class $r {
259
281
  constructor(e, r, n, s) {
260
282
  this.keyType = e, this.valueType = r, this.payload = n, this.onComplete = s;
261
283
  }
@@ -425,7 +447,7 @@ class Vr {
425
447
  10
426
448
  /* Dict */
427
449
  );
428
- const s = new Oe(e, r);
450
+ const s = new ve(e, r);
429
451
  n(s);
430
452
  const i = s.finish();
431
453
  this.payload.writeBytes(i), this.valueWritten = !0;
@@ -466,7 +488,7 @@ class z {
466
488
  return null;
467
489
  if (this.offset + 5 > this.buffer.length)
468
490
  throw new Error("Teleport object truncated");
469
- const e = Yr(this.buffer, this.offset);
491
+ const e = Jr(this.buffer, this.offset);
470
492
  this.offset += 4;
471
493
  const r = this.buffer[this.offset++], n = r >> 4 & 15;
472
494
  if ((r & 15) !== 0)
@@ -479,7 +501,7 @@ class z {
479
501
  const o = { offset: this.offset }, a = U(this.buffer, o, "InvalidLength");
480
502
  C(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
481
503
  }
482
- return new Wr(e, n, i);
504
+ return new Yr(e, n, i);
483
505
  }
484
506
  }
485
507
  class P {
@@ -544,7 +566,7 @@ class P {
544
566
  return this.ensureType(
545
567
  12
546
568
  /* String */
547
- ), xr.decode(this.payload);
569
+ ), Kr.decode(this.payload);
548
570
  }
549
571
  asGuid() {
550
572
  return this.ensureType(
@@ -562,20 +584,20 @@ class P {
562
584
  return this.ensureType(
563
585
  9
564
586
  /* Array */
565
- ), Le.create(this.payload);
587
+ ), Pe.create(this.payload);
566
588
  }
567
589
  asDictionary() {
568
590
  return this.ensureType(
569
591
  10
570
592
  /* Dict */
571
- ), ve.create(this.payload);
593
+ ), Fe.create(this.payload);
572
594
  }
573
595
  ensureType(e) {
574
596
  if (this.type !== e)
575
597
  throw new Error(`Teleport value has type ${b[this.type]}, expected ${b[e]}`);
576
598
  }
577
599
  }
578
- class Wr extends P {
600
+ class Yr extends P {
579
601
  constructor(e, r, n) {
580
602
  super(r, n), this.fieldId = e;
581
603
  }
@@ -583,7 +605,7 @@ class Wr extends P {
583
605
  return this.type === 1;
584
606
  }
585
607
  }
586
- class Le {
608
+ class Pe {
587
609
  payload;
588
610
  elementType;
589
611
  count;
@@ -599,7 +621,7 @@ class Le {
599
621
  this.count = U(e, n, "ArrayMalformed"), this.offset = n.offset;
600
622
  }
601
623
  static create(e) {
602
- return new Le(se(e));
624
+ return new Pe(se(e));
603
625
  }
604
626
  next() {
605
627
  if (this.index >= this.count) {
@@ -639,11 +661,11 @@ class Le {
639
661
  return this.offset = e.offset + r, new q(11, n);
640
662
  }
641
663
  case 9: {
642
- const e = Fe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
664
+ const e = xe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
643
665
  return this.offset += e, new q(9, r);
644
666
  }
645
667
  case 10: {
646
- const e = Be(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
668
+ const e = Ge(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
647
669
  return this.offset += e, new q(10, r);
648
670
  }
649
671
  default:
@@ -656,7 +678,7 @@ class q extends P {
656
678
  super(e, r);
657
679
  }
658
680
  }
659
- class ve {
681
+ class Fe {
660
682
  payload;
661
683
  keyType;
662
684
  valueType;
@@ -668,12 +690,12 @@ class ve {
668
690
  throw new Error("Dictionary payload too short");
669
691
  if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
670
692
  throw new Error("Dictionary key/value flags must be zero");
671
- Pe(this.keyType);
693
+ Be(this.keyType);
672
694
  const r = { offset: 2 };
673
695
  this.count = U(e, r, "DictMalformed"), this.offset = r.offset;
674
696
  }
675
697
  static create(e) {
676
- return new ve(se(e));
698
+ return new Fe(se(e));
677
699
  }
678
700
  next() {
679
701
  if (this.index >= this.count) {
@@ -682,7 +704,7 @@ class ve {
682
704
  return null;
683
705
  }
684
706
  const e = this.readKey(), r = this.readValue();
685
- return this.index++, new Hr(e, r);
707
+ return this.index++, new jr(e, r);
686
708
  }
687
709
  readKey() {
688
710
  const e = Y(this.keyType);
@@ -715,11 +737,11 @@ class ve {
715
737
  return this.offset = e.offset + r, new P(11, n);
716
738
  }
717
739
  case 9: {
718
- const e = Fe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
740
+ const e = xe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
719
741
  return this.offset += e, new P(9, r);
720
742
  }
721
743
  case 10: {
722
- const e = Be(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
744
+ const e = Ge(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
723
745
  return this.offset += e, new P(10, r);
724
746
  }
725
747
  case 3:
@@ -741,7 +763,7 @@ class ve {
741
763
  }
742
764
  }
743
765
  }
744
- class Hr {
766
+ class jr {
745
767
  constructor(e, r) {
746
768
  this.key = e, this.value = r;
747
769
  }
@@ -785,8 +807,8 @@ class _ {
785
807
  _.toHex(_.readUInt32LE(e, 0), 8),
786
808
  _.toHex(_.readUInt16LE(e, 4), 4),
787
809
  _.toHex(_.readUInt16LE(e, 6), 4),
788
- ze(e.subarray(8, 10)),
789
- ze(e.subarray(10, 16))
810
+ Xe(e.subarray(8, 10)),
811
+ Xe(e.subarray(10, 16))
790
812
  ].join("-");
791
813
  }
792
814
  asBytes() {
@@ -875,7 +897,7 @@ function U(t, e, r) {
875
897
  for (; e.offset < t.length; ) {
876
898
  const o = t[e.offset++];
877
899
  if (i++, n |= (o & 127) << s, (o & 128) === 0) {
878
- if (i !== $r(n))
900
+ if (i !== zr(n))
879
901
  throw new Error("Teleport VarUInt is not canonical");
880
902
  return n >>> 0;
881
903
  }
@@ -884,7 +906,7 @@ function U(t, e, r) {
884
906
  }
885
907
  throw new Error(r);
886
908
  }
887
- function $r(t) {
909
+ function zr(t) {
888
910
  return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
889
911
  }
890
912
  function de(t, e = 0) {
@@ -892,7 +914,7 @@ function de(t, e = 0) {
892
914
  throw new Error("Teleport flags must fit into 4 bits");
893
915
  return (t & 15) << 4 | e & 15;
894
916
  }
895
- function Kr(t) {
917
+ function Xr(t) {
896
918
  return t === 12 || t === 13 || t === 9 || t === 11 || t === 10;
897
919
  }
898
920
  function Y(t) {
@@ -915,7 +937,7 @@ function Y(t) {
915
937
  return -1;
916
938
  }
917
939
  }
918
- function Pe(t) {
940
+ function Be(t) {
919
941
  if (t === 9 || t === 11 || t === 10 || t === 1)
920
942
  throw new Error("Dictionary keys must be primitive Teleport types");
921
943
  }
@@ -923,10 +945,10 @@ function C(t, e, r) {
923
945
  if (e < 0 || r < 0 || e + r > t.length)
924
946
  throw new Error("Teleport payload exceeds bounds");
925
947
  }
926
- function Yr(t, e) {
948
+ function Jr(t, e) {
927
949
  return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
928
950
  }
929
- function Fe(t, e) {
951
+ function xe(t, e) {
930
952
  if (e >= t.length)
931
953
  throw new Error("Array payload exceeds bounds");
932
954
  const r = t[e], n = r >> 4 & 15;
@@ -939,23 +961,23 @@ function Fe(t, e) {
939
961
  }
940
962
  let a = s.offset;
941
963
  for (let c = 0; c < i; c++)
942
- a = ye(n, t, a, "ArrayMalformed");
964
+ a = ge(n, t, a, "ArrayMalformed");
943
965
  return a - e;
944
966
  }
945
- function Be(t, e) {
967
+ function Ge(t, e) {
946
968
  if (e + 2 > t.length)
947
969
  throw new Error("Dictionary payload too short");
948
970
  const r = t[e] >> 4 & 15, n = t[e + 1] >> 4 & 15;
949
971
  if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
950
972
  throw new Error("Dictionary key/value flags must be zero");
951
- Pe(r);
973
+ Be(r);
952
974
  const s = { offset: e + 2 }, i = U(t, s, "DictMalformed");
953
975
  let o = s.offset;
954
976
  for (let a = 0; a < i; a++)
955
- o = ye(r, t, o, "DictMalformed"), o = ye(n, t, o, "DictMalformed");
977
+ o = ge(r, t, o, "DictMalformed"), o = ge(n, t, o, "DictMalformed");
956
978
  return o - e;
957
979
  }
958
- function ye(t, e, r, n) {
980
+ function ge(t, e, r, n) {
959
981
  const s = Y(t);
960
982
  if (s >= 0)
961
983
  return C(e, r, s), r + s;
@@ -970,322 +992,322 @@ function ye(t, e, r, n) {
970
992
  return C(e, i.offset, o), i.offset + o;
971
993
  }
972
994
  case 9:
973
- return r + Fe(e, r);
995
+ return r + xe(e, r);
974
996
  case 10:
975
- return r + Be(e, r);
997
+ return r + Ge(e, r);
976
998
  default:
977
999
  throw new Error(`Unsupported Teleport type ${b[t]}`);
978
1000
  }
979
1001
  }
980
- function ze(t) {
1002
+ function Xe(t) {
981
1003
  return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
982
1004
  }
983
1005
  function se(t) {
984
1006
  return t instanceof Uint8Array ? t : new Uint8Array(t);
985
1007
  }
986
- var ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ft || {}), X = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(X || {}), J = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(J || {}), k = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(k || {}), Q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(Q || {}), Et = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(Et || {}), Z = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Z || {}), pt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(pt || {}), Ge = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(Ge || {}), S = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.ANALYTICS_DEVTOOLS_CONSOLE_OUTPUT = 524297] = "ANALYTICS_DEVTOOLS_CONSOLE_OUTPUT", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(S || {});
987
- const It = 1, jr = 1048637, zr = 727023925, Xr = 3395085689;
988
- function Jr(t) {
989
- const e = new D(It);
990
- return Qr(t, e), e.finish();
1008
+ var ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ft || {}), X = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(X || {}), J = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(J || {}), k = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(k || {}), Q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(Q || {}), Et = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(Et || {}), Z = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Z || {}), pt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(pt || {}), Ve = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(Ve || {}), It = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(It || {}), mt = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(mt || {}), S = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(S || {});
1009
+ const _t = 1, Qr = 1048637, Zr = 727023925, qr = 3395085689;
1010
+ function en(t) {
1011
+ const e = new D(_t);
1012
+ return tn(t, e), e.finish();
991
1013
  }
992
- function Qr(t, e) {
993
- e.writeGuidField(zr, t.ActionId), e.writeStringField(Xr, t.PayloadJson);
1014
+ function tn(t, e) {
1015
+ e.writeGuidField(Zr, t.ActionId), e.writeStringField(qr, t.PayloadJson);
994
1016
  }
995
- function Zr(t, e, r) {
996
- const n = Jr(t);
997
- return F(jr, n, It, e, r);
1017
+ function rn(t, e, r) {
1018
+ const n = en(t);
1019
+ return F(Qr, n, _t, e, r);
998
1020
  }
999
- const qr = 467348717, en = 972460562, tn = 1911490601, rn = 2603556958, nn = 3609695522, sn = 4094837378, on = 4257460908;
1000
- function an(t) {
1021
+ const nn = 467348717, sn = 972460562, on = 1911490601, an = 2603556958, cn = 3609695522, ln = 4094837378, un = 4257460908;
1022
+ function hn(t) {
1001
1023
  const e = {};
1002
- return mt(e), e;
1024
+ return Tt(e), e;
1003
1025
  }
1004
- function mt(t) {
1026
+ function Tt(t) {
1005
1027
  return t.ParameterIndex = 0, t.TypeName = "", t.ValueJson = "", t.ValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.EnumerationId = _.fromBytes(new Uint8Array(16)), t;
1006
1028
  }
1007
- function cn(t, e) {
1008
- const r = e ?? an();
1009
- return mt(r), ln(t, r), r;
1029
+ function dn(t, e) {
1030
+ const r = e ?? hn();
1031
+ return Tt(r), fn(t, r), r;
1010
1032
  }
1011
- function ln(t, e) {
1033
+ function fn(t, e) {
1012
1034
  let r;
1013
1035
  for (; (r = t.next()) !== null; )
1014
1036
  switch (r.fieldId) {
1015
- case qr: {
1037
+ case nn: {
1016
1038
  if (r.isNull) throw new Error();
1017
1039
  e.EnumerationId = r.asGuid();
1018
1040
  break;
1019
1041
  }
1020
- case en: {
1042
+ case sn: {
1021
1043
  if (r.isNull) throw new Error();
1022
1044
  e.EnumerableItemTypeName = r.asString();
1023
1045
  break;
1024
1046
  }
1025
- case tn: {
1047
+ case on: {
1026
1048
  if (r.isNull) throw new Error();
1027
1049
  e.ValueJson = r.asString();
1028
1050
  break;
1029
1051
  }
1030
- case rn: {
1052
+ case an: {
1031
1053
  if (r.isNull) throw new Error();
1032
1054
  e.IsEnumerable = r.asBool();
1033
1055
  break;
1034
1056
  }
1035
- case nn: {
1057
+ case cn: {
1036
1058
  if (r.isNull) throw new Error();
1037
1059
  e.TypeName = r.asString();
1038
1060
  break;
1039
1061
  }
1040
- case sn: {
1062
+ case ln: {
1041
1063
  if (r.isNull) throw new Error();
1042
1064
  e.ValueData = r.asBinary();
1043
1065
  break;
1044
1066
  }
1045
- case on: {
1067
+ case un: {
1046
1068
  if (r.isNull) throw new Error();
1047
1069
  e.ParameterIndex = r.asInt32();
1048
1070
  break;
1049
1071
  }
1050
1072
  }
1051
1073
  }
1052
- const un = 265814330, hn = 1368629611, dn = 2431514951, fn = 2914494629, En = 3284746250, pn = 4101844078;
1053
- function _t(t) {
1074
+ const En = 265814330, pn = 1368629611, In = 2431514951, mn = 2914494629, _n = 3284746250, Tn = 4101844078;
1075
+ function St(t) {
1054
1076
  const e = {};
1055
- return Tt(e), e;
1077
+ return wt(e), e;
1056
1078
  }
1057
- function Tt(t) {
1079
+ function wt(t) {
1058
1080
  return t.Description = "", t.Codec = ft.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t.ShapeSets = void 0, t;
1059
1081
  }
1060
- function In(t, e) {
1061
- const r = e ?? _t();
1062
- return Tt(r), mn(t, r), r;
1082
+ function Sn(t, e) {
1083
+ const r = e ?? St();
1084
+ return wt(r), wn(t, r), r;
1063
1085
  }
1064
- function mn(t, e) {
1086
+ function wn(t, e) {
1065
1087
  let r;
1066
1088
  for (; (r = t.next()) !== null; )
1067
1089
  switch (r.fieldId) {
1068
- case un: {
1090
+ case En: {
1069
1091
  if (r.isNull) {
1070
1092
  e.ShapeSets = void 0;
1071
1093
  break;
1072
1094
  }
1073
- e.ShapeSets = _n(r.asArray());
1095
+ e.ShapeSets = An(r.asArray());
1074
1096
  break;
1075
1097
  }
1076
- case hn: {
1098
+ case pn: {
1077
1099
  if (r.isNull) throw new Error();
1078
1100
  e.Description = r.asString();
1079
1101
  break;
1080
1102
  }
1081
- case dn: {
1103
+ case In: {
1082
1104
  if (r.isNull) throw new Error();
1083
1105
  e.Channels = r.asInt32();
1084
1106
  break;
1085
1107
  }
1086
- case fn: {
1108
+ case mn: {
1087
1109
  if (r.isNull) throw new Error();
1088
1110
  e.BitDepth = r.asInt32();
1089
1111
  break;
1090
1112
  }
1091
- case En: {
1113
+ case _n: {
1092
1114
  if (r.isNull) throw new Error();
1093
1115
  e.Codec = r.asInt32();
1094
1116
  break;
1095
1117
  }
1096
- case pn: {
1118
+ case Tn: {
1097
1119
  if (r.isNull) throw new Error();
1098
1120
  e.SampleRate = r.asInt32();
1099
1121
  break;
1100
1122
  }
1101
1123
  }
1102
1124
  }
1103
- function _n(t) {
1125
+ function An(t) {
1104
1126
  const e = [];
1105
1127
  let r;
1106
1128
  for (; (r = t.next()) !== null; )
1107
- e.push(yn(r.asObject()));
1129
+ e.push(bn(r.asObject()));
1108
1130
  return e;
1109
1131
  }
1110
- const Tn = 1107713536, Sn = 1154362099, wn = 1185721362;
1111
- function An(t) {
1132
+ const yn = 1107713536, Nn = 1154362099, gn = 1185721362;
1133
+ function Cn(t) {
1112
1134
  const e = {};
1113
- return St(e), e;
1135
+ return At(e), e;
1114
1136
  }
1115
- function St(t) {
1137
+ function At(t) {
1116
1138
  return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
1117
1139
  }
1118
- function yn(t, e) {
1119
- const r = e ?? An();
1120
- return St(r), Nn(t, r), r;
1140
+ function bn(t, e) {
1141
+ const r = e ?? Cn();
1142
+ return At(r), Rn(t, r), r;
1121
1143
  }
1122
- function Nn(t, e) {
1144
+ function Rn(t, e) {
1123
1145
  let r;
1124
1146
  for (; (r = t.next()) !== null; )
1125
1147
  switch (r.fieldId) {
1126
- case Tn: {
1148
+ case yn: {
1127
1149
  if (r.isNull) throw new Error();
1128
1150
  e.Name = r.asString();
1129
1151
  break;
1130
1152
  }
1131
- case Sn: {
1153
+ case Nn: {
1132
1154
  if (r.isNull) throw new Error();
1133
1155
  e.SetId = r.asUInt32();
1134
1156
  break;
1135
1157
  }
1136
- case wn: {
1158
+ case gn: {
1137
1159
  if (r.isNull) throw new Error();
1138
- e.ShapeNames = gn(r.asArray());
1160
+ e.ShapeNames = kn(r.asArray());
1139
1161
  break;
1140
1162
  }
1141
1163
  }
1142
1164
  }
1143
- function gn(t) {
1165
+ function kn(t) {
1144
1166
  const e = [];
1145
1167
  let r;
1146
1168
  for (; (r = t.next()) !== null; )
1147
1169
  e.push(r.asString());
1148
1170
  return e;
1149
1171
  }
1150
- const Cn = 76337612, bn = 185396121, Rn = 388632637, kn = 417197284, Un = 469070965, Dn = 470595159, Mn = 781727218, On = 834078886, Ln = 1043273762, vn = 1236999138, Pn = 1368629611, Fn = 1715899485, Bn = 1942830531, Gn = 1999510636, xn = 2079864626, Vn = 2142346422, Wn = 2598291686, Hn = 2719718823, $n = 2810953526, Kn = 2840065720, Yn = 2885165957, jn = 3586157513, zn = 3717933110, Xn = 4062655306;
1151
- function Ne(t) {
1172
+ const Un = 76337612, Dn = 185396121, Mn = 388632637, On = 417197284, Ln = 469070965, vn = 470595159, Pn = 781727218, Fn = 834078886, Bn = 1043273762, xn = 1236999138, Gn = 1368629611, Vn = 1715899485, Wn = 1942830531, Hn = 1999510636, Kn = 2079864626, $n = 2142346422, Yn = 2598291686, jn = 2719718823, zn = 2810953526, Xn = 2840065720, Jn = 2885165957, Qn = 3586157513, Zn = 3717933110, qn = 4062655306;
1173
+ function Ce(t) {
1152
1174
  const e = {};
1153
- return wt(e), e;
1175
+ return yt(e), e;
1154
1176
  }
1155
- function wt(t) {
1156
- return t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = X.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ge.Unknown, t;
1177
+ function yt(t) {
1178
+ return t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = X.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ve.Unknown, t;
1157
1179
  }
1158
- function ge(t, e) {
1159
- const r = e ?? Ne();
1160
- return wt(r), Jn(t, r), r;
1180
+ function be(t, e) {
1181
+ const r = e ?? Ce();
1182
+ return yt(r), es(t, r), r;
1161
1183
  }
1162
- function Jn(t, e) {
1184
+ function es(t, e) {
1163
1185
  let r;
1164
1186
  for (; (r = t.next()) !== null; )
1165
1187
  switch (r.fieldId) {
1166
- case Cn: {
1188
+ case Un: {
1167
1189
  if (r.isNull) throw new Error();
1168
1190
  e.DeviceId = r.asString();
1169
1191
  break;
1170
1192
  }
1171
- case bn: {
1193
+ case Dn: {
1172
1194
  if (r.isNull) throw new Error();
1173
1195
  e.InstallId = r.asString();
1174
1196
  break;
1175
1197
  }
1176
- case Rn: {
1198
+ case Mn: {
1177
1199
  if (r.isNull) throw new Error();
1178
1200
  e.UserAgent = r.asString();
1179
1201
  break;
1180
1202
  }
1181
- case kn: {
1203
+ case On: {
1182
1204
  if (r.isNull) throw new Error();
1183
1205
  e.ContextType = r.asInt32();
1184
1206
  break;
1185
1207
  }
1186
- case Un: {
1208
+ case Ln: {
1187
1209
  if (r.isNull) throw new Error();
1188
1210
  e.HasInput = r.asBool();
1189
1211
  break;
1190
1212
  }
1191
- case Dn: {
1213
+ case vn: {
1192
1214
  if (r.isNull) throw new Error();
1193
1215
  e.UserType = r.asInt32();
1194
1216
  break;
1195
1217
  }
1196
- case Mn: {
1218
+ case Pn: {
1197
1219
  if (r.isNull) throw new Error();
1198
1220
  e.UserId = r.asString();
1199
1221
  break;
1200
1222
  }
1201
- case On: {
1223
+ case Fn: {
1202
1224
  if (r.isNull) throw new Error();
1203
1225
  e.ProductId = r.asString();
1204
1226
  break;
1205
1227
  }
1206
- case Ln: {
1228
+ case Bn: {
1207
1229
  if (r.isNull) throw new Error();
1208
1230
  e.AuthSessionId = r.asString();
1209
1231
  break;
1210
1232
  }
1211
- case vn: {
1233
+ case xn: {
1212
1234
  if (r.isNull) throw new Error();
1213
1235
  e.ReceiveAllMessages = r.asBool();
1214
1236
  break;
1215
1237
  }
1216
- case Pn: {
1238
+ case Gn: {
1217
1239
  if (r.isNull) throw new Error();
1218
1240
  e.Description = r.asString();
1219
1241
  break;
1220
1242
  }
1221
- case Fn: {
1243
+ case Vn: {
1222
1244
  if (r.isNull) throw new Error();
1223
1245
  e.Locale = r.asString();
1224
1246
  break;
1225
1247
  }
1226
- case Bn: {
1248
+ case Wn: {
1227
1249
  if (r.isNull) throw new Error();
1228
1250
  e.SdkType = r.asInt32();
1229
1251
  break;
1230
1252
  }
1231
- case Gn: {
1253
+ case Hn: {
1232
1254
  if (r.isNull) throw new Error();
1233
1255
  e.SessionId = r.asInt32();
1234
1256
  break;
1235
1257
  }
1236
- case xn: {
1258
+ case Kn: {
1237
1259
  if (r.isNull) throw new Error();
1238
1260
  e.PreciseJoinedAt = r.asUInt64();
1239
1261
  break;
1240
1262
  }
1241
- case Vn: {
1263
+ case $n: {
1242
1264
  if (r.isNull) throw new Error();
1243
1265
  e.PayloadType = r.asInt32();
1244
1266
  break;
1245
1267
  }
1246
- case Wn: {
1268
+ case Yn: {
1247
1269
  if (r.isNull) throw new Error();
1248
1270
  e.VersionId = r.asString();
1249
1271
  break;
1250
1272
  }
1251
- case Hn: {
1273
+ case jn: {
1252
1274
  if (r.isNull) throw new Error();
1253
1275
  e.UniqueSessionId = r.asString();
1254
1276
  break;
1255
1277
  }
1256
- case $n: {
1278
+ case zn: {
1257
1279
  if (r.isNull) throw new Error();
1258
1280
  e.ClientType = r.asInt32();
1259
1281
  break;
1260
1282
  }
1261
- case Kn: {
1283
+ case Xn: {
1262
1284
  if (r.isNull) throw new Error();
1263
1285
  e.IsReady = r.asBool();
1264
1286
  break;
1265
1287
  }
1266
- case Yn: {
1288
+ case Jn: {
1267
1289
  if (r.isNull) throw new Error();
1268
- e.Parameters = Qn(r.asDictionary());
1290
+ e.Parameters = ts(r.asDictionary());
1269
1291
  break;
1270
1292
  }
1271
- case jn: {
1293
+ case Qn: {
1272
1294
  if (r.isNull) throw new Error();
1273
1295
  e.IsInternal = r.asBool();
1274
1296
  break;
1275
1297
  }
1276
- case zn: {
1298
+ case Zn: {
1277
1299
  if (r.isNull) throw new Error();
1278
1300
  e.ChannelLocale = r.asString();
1279
1301
  break;
1280
1302
  }
1281
- case Xn: {
1303
+ case qn: {
1282
1304
  if (r.isNull) throw new Error();
1283
1305
  e.EmbeddedSpaceId = r.asString();
1284
1306
  break;
1285
1307
  }
1286
1308
  }
1287
1309
  }
1288
- function Qn(t) {
1310
+ function ts(t) {
1289
1311
  const e = /* @__PURE__ */ Object.create(null);
1290
1312
  let r;
1291
1313
  for (; (r = t.next()) !== null; ) {
@@ -1294,138 +1316,138 @@ function Qn(t) {
1294
1316
  }
1295
1317
  return e;
1296
1318
  }
1297
- const Zn = 746516514, qn = 877841741, es = 1175184220, ts = 1368629611, rs = 2341021724, ns = 3167053791, ss = 3686066300;
1298
- function is(t) {
1319
+ const rs = 746516514, ns = 877841741, ss = 1175184220, is = 1368629611, os = 2341021724, as = 3167053791, cs = 3686066300;
1320
+ function ls(t) {
1299
1321
  const e = {};
1300
- return At(e), e;
1322
+ return Nt(e), e;
1301
1323
  }
1302
- function At(t) {
1324
+ function Nt(t) {
1303
1325
  return t.Type = k.None, t.Uri = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t;
1304
1326
  }
1305
- function os(t, e) {
1306
- const r = e ?? is();
1307
- return At(r), as(t, r), r;
1327
+ function us(t, e) {
1328
+ const r = e ?? ls();
1329
+ return Nt(r), hs(t, r), r;
1308
1330
  }
1309
- function as(t, e) {
1331
+ function hs(t, e) {
1310
1332
  let r;
1311
1333
  for (; (r = t.next()) !== null; )
1312
1334
  switch (r.fieldId) {
1313
- case Zn: {
1335
+ case rs: {
1314
1336
  if (r.isNull) throw new Error();
1315
1337
  e.AuthTicket = r.asBinary();
1316
1338
  break;
1317
1339
  }
1318
- case qn: {
1340
+ case ns: {
1319
1341
  if (r.isNull) throw new Error();
1320
1342
  e.Priority = r.asInt32();
1321
1343
  break;
1322
1344
  }
1323
- case es: {
1345
+ case ss: {
1324
1346
  if (r.isNull) throw new Error();
1325
1347
  e.OpcodeGroupsFromServer = r.asInt32();
1326
1348
  break;
1327
1349
  }
1328
- case ts: {
1350
+ case is: {
1329
1351
  if (r.isNull) throw new Error();
1330
1352
  e.Description = r.asString();
1331
1353
  break;
1332
1354
  }
1333
- case rs: {
1355
+ case os: {
1334
1356
  if (r.isNull) throw new Error();
1335
1357
  e.Uri = r.asString();
1336
1358
  break;
1337
1359
  }
1338
- case ns: {
1360
+ case as: {
1339
1361
  if (r.isNull) throw new Error();
1340
1362
  e.Type = r.asInt32();
1341
1363
  break;
1342
1364
  }
1343
- case ss: {
1365
+ case cs: {
1344
1366
  if (r.isNull) throw new Error();
1345
1367
  e.OpcodeGroupsToServer = r.asInt32();
1346
1368
  break;
1347
1369
  }
1348
1370
  }
1349
1371
  }
1350
- const cs = 65537, ls = 166277978, us = 1482635149, hs = 1559330978, ds = 2802434353, fs = 3085883711, Es = 3669484338, ps = 3707543140, Is = 3712281496, ms = 4160646707;
1351
- function _s(t) {
1372
+ const ds = 65537, fs = 166277978, Es = 1482635149, ps = 1559330978, Is = 2802434353, ms = 3085883711, _s = 3669484338, Ts = 3707543140, Ss = 3712281496, ws = 3823842552;
1373
+ function As(t) {
1352
1374
  const e = {};
1353
- return yt(e), e;
1375
+ return gt(e), e;
1354
1376
  }
1355
- function yt(t) {
1356
- return t.ClientContext = Ne(), t.ServerContext = Ne(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.PrimaryUserId = "", t.ChannelTemplateId = "", t;
1377
+ function gt(t) {
1378
+ return t.ClientContext = Ce(), t.ServerContext = Ce(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.ChannelInstanceId = "", t.PrimaryUserId = "", t;
1357
1379
  }
1358
- function Ts(t, e) {
1380
+ function ys(t, e) {
1359
1381
  const r = z.create(t);
1360
- return Ss(r, e);
1382
+ return Ns(r, e);
1361
1383
  }
1362
- function Ss(t, e) {
1363
- const r = e ?? _s();
1364
- return yt(r), ws(t, r), r;
1384
+ function Ns(t, e) {
1385
+ const r = e ?? As();
1386
+ return gt(r), gs(t, r), r;
1365
1387
  }
1366
- function ws(t, e) {
1388
+ function gs(t, e) {
1367
1389
  let r;
1368
1390
  for (; (r = t.next()) !== null; )
1369
1391
  switch (r.fieldId) {
1370
- case ls: {
1392
+ case fs: {
1371
1393
  if (r.isNull) throw new Error();
1372
1394
  e.CertHash = r.asString();
1373
1395
  break;
1374
1396
  }
1375
- case us: {
1397
+ case Es: {
1376
1398
  if (r.isNull) throw new Error();
1377
- e.Entrypoints = ys(r.asArray());
1399
+ e.Entrypoints = bs(r.asArray());
1378
1400
  break;
1379
1401
  }
1380
- case hs: {
1402
+ case ps: {
1381
1403
  if (r.isNull) throw new Error();
1382
1404
  e.ChannelId = r.asString();
1383
1405
  break;
1384
1406
  }
1385
- case ds: {
1407
+ case Is: {
1386
1408
  if (r.isNull) throw new Error();
1387
- e.ClientContext = ge(r.asObject());
1409
+ e.ClientContext = be(r.asObject());
1388
1410
  break;
1389
1411
  }
1390
- case fs: {
1412
+ case ms: {
1391
1413
  if (r.isNull) throw new Error();
1392
- e.ServerContext = ge(r.asObject());
1414
+ e.ServerContext = be(r.asObject());
1393
1415
  break;
1394
1416
  }
1395
- case Es: {
1417
+ case _s: {
1396
1418
  if (r.isNull) throw new Error();
1397
- e.FeatureFlags = Ns(r.asDictionary());
1419
+ e.FeatureFlags = Rs(r.asDictionary());
1398
1420
  break;
1399
1421
  }
1400
- case ps: {
1422
+ case Ts: {
1401
1423
  if (r.isNull) throw new Error();
1402
1424
  e.SpaceId = r.asString();
1403
1425
  break;
1404
1426
  }
1405
- case Is: {
1427
+ case Ss: {
1406
1428
  if (r.isNull) throw new Error();
1407
1429
  e.PrimaryUserId = r.asString();
1408
1430
  break;
1409
1431
  }
1410
- case ms: {
1432
+ case ws: {
1411
1433
  if (r.isNull) throw new Error();
1412
- e.ChannelTemplateId = r.asString();
1434
+ e.ChannelInstanceId = r.asString();
1413
1435
  break;
1414
1436
  }
1415
1437
  }
1416
1438
  }
1417
- function As(t, e) {
1418
- const r = Me(t, cs);
1419
- return Ts(r, e);
1439
+ async function Cs(t, e) {
1440
+ const r = await Le(t, ds);
1441
+ return ys(r, e);
1420
1442
  }
1421
- function ys(t) {
1443
+ function bs(t) {
1422
1444
  const e = [];
1423
1445
  let r;
1424
1446
  for (; (r = t.next()) !== null; )
1425
- e.push(os(r.asObject()));
1447
+ e.push(us(r.asObject()));
1426
1448
  return e;
1427
1449
  }
1428
- function Ns(t) {
1450
+ function Rs(t) {
1429
1451
  const e = /* @__PURE__ */ Object.create(null);
1430
1452
  let r;
1431
1453
  for (; (r = t.next()) !== null; ) {
@@ -1434,907 +1456,897 @@ function Ns(t) {
1434
1456
  }
1435
1457
  return e;
1436
1458
  }
1437
- function gs(t) {
1459
+ function ks(t) {
1438
1460
  const e = {};
1439
- return Cs(e), t && Object.assign(e, t), e;
1440
- }
1441
- function Cs(t) {
1442
- return t.ServerSessionId = "", t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = X.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ge.Unknown, t;
1461
+ return Us(e), t && Object.assign(e, t), e;
1443
1462
  }
1444
- const Nt = 1, bs = 1048632, Rs = 3748161056, ks = 4289118421;
1445
1463
  function Us(t) {
1464
+ return t.ServerSessionId = "", t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = X.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ve.Unknown, t;
1465
+ }
1466
+ const Ct = 1, Ds = 1048632, Ms = 3748161056, Os = 4289118421;
1467
+ function Ls(t) {
1446
1468
  const e = {};
1447
- return Ds(e), t && Object.assign(e, t), e;
1469
+ return vs(e), t && Object.assign(e, t), e;
1448
1470
  }
1449
- function Ds(t) {
1471
+ function vs(t) {
1450
1472
  return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t;
1451
1473
  }
1452
- function Ms(t) {
1453
- const e = new D(Nt);
1454
- return Os(t, e), e.finish();
1474
+ function Ps(t) {
1475
+ const e = new D(Ct);
1476
+ return Fs(t, e), e.finish();
1455
1477
  }
1456
- function Os(t, e) {
1457
- e.writeGuidField(Rs, t.CallId), e.writeGuidField(ks, t.InstanceId);
1478
+ function Fs(t, e) {
1479
+ e.writeGuidField(Ms, t.CallId), e.writeGuidField(Os, t.InstanceId);
1458
1480
  }
1459
- function Ls(t, e, r) {
1460
- const n = Ms(t);
1461
- return F(bs, n, Nt, e, r);
1481
+ function Bs(t, e, r) {
1482
+ const n = Ps(t);
1483
+ return F(Ds, n, Ct, e, r);
1462
1484
  }
1463
- const vs = 1048601, Ps = 112005851, Fs = 814454131, Bs = 976255570, Gs = 1123310456, xs = 2885165957, Vs = 3748161056, Ws = 4289118421;
1464
- function Hs(t) {
1485
+ const xs = 1048601, Gs = 112005851, Vs = 814454131, Ws = 976255570, Hs = 1123310456, Ks = 2885165957, $s = 3748161056, Ys = 4289118421;
1486
+ function js(t) {
1465
1487
  const e = {};
1466
- return gt(e), e;
1488
+ return bt(e), e;
1467
1489
  }
1468
- function gt(t) {
1490
+ function bt(t) {
1469
1491
  return t.FunctionId = _.fromBytes(new Uint8Array(16)), t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ClientBackendToken = "", t.Scopes = [], t;
1470
1492
  }
1471
- function $s(t, e) {
1493
+ function zs(t, e) {
1472
1494
  const r = z.create(t);
1473
- return Ks(r, e);
1495
+ return Xs(r, e);
1474
1496
  }
1475
- function Ks(t, e) {
1476
- const r = e ?? Hs();
1477
- return gt(r), Ys(t, r), r;
1497
+ function Xs(t, e) {
1498
+ const r = e ?? js();
1499
+ return bt(r), Js(t, r), r;
1478
1500
  }
1479
- function Ys(t, e) {
1501
+ function Js(t, e) {
1480
1502
  let r;
1481
1503
  for (; (r = t.next()) !== null; )
1482
1504
  switch (r.fieldId) {
1483
- case Ps: {
1505
+ case Gs: {
1484
1506
  if (r.isNull) throw new Error();
1485
- e.Scopes = zs(r.asArray());
1507
+ e.Scopes = Zs(r.asArray());
1486
1508
  break;
1487
1509
  }
1488
- case Fs: {
1510
+ case Vs: {
1489
1511
  if (r.isNull) throw new Error();
1490
1512
  e.FunctionName = r.asString();
1491
1513
  break;
1492
1514
  }
1493
- case Bs: {
1515
+ case Ws: {
1494
1516
  if (r.isNull) throw new Error();
1495
1517
  e.FunctionId = r.asGuid();
1496
1518
  break;
1497
1519
  }
1498
- case Gs: {
1520
+ case Hs: {
1499
1521
  if (r.isNull) throw new Error();
1500
1522
  e.ClientBackendToken = r.asString();
1501
1523
  break;
1502
1524
  }
1503
- case xs: {
1525
+ case Ks: {
1504
1526
  if (r.isNull) throw new Error();
1505
- e.Parameters = Xs(r.asArray());
1527
+ e.Parameters = qs(r.asArray());
1506
1528
  break;
1507
1529
  }
1508
- case Vs: {
1530
+ case $s: {
1509
1531
  if (r.isNull) throw new Error();
1510
1532
  e.CallId = r.asGuid();
1511
1533
  break;
1512
1534
  }
1513
- case Ws: {
1535
+ case Ys: {
1514
1536
  if (r.isNull) throw new Error();
1515
1537
  e.InstanceId = r.asGuid();
1516
1538
  break;
1517
1539
  }
1518
1540
  }
1519
1541
  }
1520
- function js(t, e) {
1521
- const r = Me(t, vs);
1522
- return $s(r, e);
1542
+ async function Qs(t, e) {
1543
+ const r = await Le(t, xs);
1544
+ return zs(r, e);
1523
1545
  }
1524
- function zs(t) {
1546
+ function Zs(t) {
1525
1547
  const e = [];
1526
1548
  let r;
1527
1549
  for (; (r = t.next()) !== null; )
1528
- e.push(qs(r.asObject()));
1550
+ e.push(ni(r.asObject()));
1529
1551
  return e;
1530
1552
  }
1531
- function Xs(t) {
1553
+ function qs(t) {
1532
1554
  const e = [];
1533
1555
  let r;
1534
1556
  for (; (r = t.next()) !== null; )
1535
- e.push(cn(r.asObject()));
1557
+ e.push(dn(r.asObject()));
1536
1558
  return e;
1537
1559
  }
1538
- const Js = 2994044322, Qs = 3167053791;
1539
- function Zs(t) {
1560
+ const ei = 2994044322, ti = 3167053791;
1561
+ function ri(t) {
1540
1562
  const e = {};
1541
- return Ct(e), e;
1563
+ return Rt(e), e;
1542
1564
  }
1543
- function Ct(t) {
1565
+ function Rt(t) {
1544
1566
  return t.Type = "", t.Id = "", t;
1545
1567
  }
1546
- function qs(t, e) {
1547
- const r = e ?? Zs();
1548
- return Ct(r), ei(t, r), r;
1568
+ function ni(t, e) {
1569
+ const r = e ?? ri();
1570
+ return Rt(r), si(t, r), r;
1549
1571
  }
1550
- function ei(t, e) {
1572
+ function si(t, e) {
1551
1573
  let r;
1552
1574
  for (; (r = t.next()) !== null; )
1553
1575
  switch (r.fieldId) {
1554
- case Js: {
1576
+ case ei: {
1555
1577
  if (r.isNull) throw new Error();
1556
1578
  e.Id = r.asString();
1557
1579
  break;
1558
1580
  }
1559
- case Qs: {
1581
+ case ti: {
1560
1582
  if (r.isNull) throw new Error();
1561
1583
  e.Type = r.asString();
1562
1584
  break;
1563
1585
  }
1564
1586
  }
1565
1587
  }
1566
- const bt = 1, ti = 1048631, ri = 2205234621, ni = 2838554230, si = 3748161056, ii = 4194102057, oi = 4289118421;
1567
- function ai(t) {
1588
+ const kt = 1, ii = 1048631, oi = 2205234621, ai = 2838554230, ci = 3748161056, li = 4194102057, ui = 4289118421;
1589
+ function hi(t) {
1568
1590
  const e = {};
1569
- return ci(e), t && Object.assign(e, t), e;
1591
+ return di(e), t && Object.assign(e, t), e;
1570
1592
  }
1571
- function ci(t) {
1593
+ function di(t) {
1572
1594
  return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
1573
1595
  }
1574
- function li(t) {
1575
- const e = new D(bt);
1576
- return ui(t, e), e.finish();
1596
+ function fi(t) {
1597
+ const e = new D(kt);
1598
+ return Ei(t, e), e.finish();
1577
1599
  }
1578
- function ui(t, e) {
1579
- e.writeStringField(ri, t.ErrorTypeName), e.writeStringField(ni, t.ErrorMessage), e.writeGuidField(si, t.CallId), e.writeStringField(ii, t.StackTrace), e.writeGuidField(oi, t.InstanceId);
1600
+ function Ei(t, e) {
1601
+ e.writeStringField(oi, t.ErrorTypeName), e.writeStringField(ai, t.ErrorMessage), e.writeGuidField(ci, t.CallId), e.writeStringField(li, t.StackTrace), e.writeGuidField(ui, t.InstanceId);
1580
1602
  }
1581
- function hi(t, e, r) {
1582
- const n = li(t);
1583
- return F(ti, n, bt, e, r);
1603
+ function pi(t, e, r) {
1604
+ const n = fi(t);
1605
+ return F(ii, n, kt, e, r);
1584
1606
  }
1585
- const xe = 1, di = 1048600, Rt = 703025676, kt = 814454131, Ut = 972460562, Dt = 976255570, Mt = 1368629611, Ot = 1479280922, Lt = 1533537016, vt = 2274386296, Pt = 2603556958, Ft = 2885165957, Bt = 3568439632;
1586
- function fi(t) {
1607
+ const We = 1, Ii = 1048600, Ut = 703025676, Dt = 814454131, Mt = 972460562, Ot = 976255570, Lt = 1368629611, vt = 1479280922, Pt = 1533537016, Ft = 2274386296, Bt = 2603556958, xt = 2885165957, Gt = 3568439632;
1608
+ function mi(t) {
1587
1609
  const e = {};
1588
- return Gt(e), e;
1610
+ return Vt(e), e;
1589
1611
  }
1590
- function Gt(t) {
1612
+ function Vt(t) {
1591
1613
  return t.FunctionId = _.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;
1592
1614
  }
1593
- function Ei(t) {
1594
- const e = new D(xe);
1595
- return xt(t, e), e.finish();
1615
+ function _i(t) {
1616
+ const e = new D(We);
1617
+ return Wt(t, e), e.finish();
1596
1618
  }
1597
- function xt(t, e) {
1598
- e.writeStringField(Rt, t.ResultTypeName), e.writeStringField(kt, t.FunctionName), e.writeStringField(Ut, t.EnumerableItemTypeName), e.writeGuidField(Dt, t.FunctionId), e.writeStringField(Mt, t.Description), e.writeBoolField(Ot, t.IsCancellable), e.writeBoolField(Lt, t.RequiresInstance), e.writeBoolField(vt, t.LlmInlineResult), e.writeBoolField(Pt, t.IsEnumerable), e.writeArrayField(Ft, b.Object, (r) => {
1619
+ function Wt(t, e) {
1620
+ e.writeStringField(Ut, t.ResultTypeName), e.writeStringField(Dt, t.FunctionName), e.writeStringField(Mt, t.EnumerableItemTypeName), e.writeGuidField(Ot, t.FunctionId), e.writeStringField(Lt, t.Description), e.writeBoolField(vt, t.IsCancellable), e.writeBoolField(Pt, t.RequiresInstance), e.writeBoolField(Ft, t.LlmInlineResult), e.writeBoolField(Bt, t.IsEnumerable), e.writeArrayField(xt, b.Object, (r) => {
1599
1621
  for (const n of t.Parameters)
1600
- r.writeObject(Ti, (s) => {
1601
- wi(n, s);
1622
+ r.writeObject(yi, (s) => {
1623
+ gi(n, s);
1602
1624
  });
1603
- }), e.writeBoolField(Bt, t.LlmCallOnlyOnce);
1625
+ }), e.writeBoolField(Gt, t.LlmCallOnlyOnce);
1604
1626
  }
1605
- function pi(t, e) {
1606
- const r = e ?? fi();
1607
- return Gt(r), Ii(t, r), r;
1627
+ function Ti(t, e) {
1628
+ const r = e ?? mi();
1629
+ return Vt(r), Si(t, r), r;
1608
1630
  }
1609
- function Ii(t, e) {
1631
+ function Si(t, e) {
1610
1632
  let r;
1611
1633
  for (; (r = t.next()) !== null; )
1612
1634
  switch (r.fieldId) {
1613
- case Rt: {
1635
+ case Ut: {
1614
1636
  if (r.isNull) throw new Error();
1615
1637
  e.ResultTypeName = r.asString();
1616
1638
  break;
1617
1639
  }
1618
- case kt: {
1640
+ case Dt: {
1619
1641
  if (r.isNull) throw new Error();
1620
1642
  e.FunctionName = r.asString();
1621
1643
  break;
1622
1644
  }
1623
- case Ut: {
1645
+ case Mt: {
1624
1646
  if (r.isNull) throw new Error();
1625
1647
  e.EnumerableItemTypeName = r.asString();
1626
1648
  break;
1627
1649
  }
1628
- case Dt: {
1650
+ case Ot: {
1629
1651
  if (r.isNull) throw new Error();
1630
1652
  e.FunctionId = r.asGuid();
1631
1653
  break;
1632
1654
  }
1633
- case Mt: {
1655
+ case Lt: {
1634
1656
  if (r.isNull) throw new Error();
1635
1657
  e.Description = r.asString();
1636
1658
  break;
1637
1659
  }
1638
- case Ot: {
1660
+ case vt: {
1639
1661
  if (r.isNull) throw new Error();
1640
1662
  e.IsCancellable = r.asBool();
1641
1663
  break;
1642
1664
  }
1643
- case Lt: {
1665
+ case Pt: {
1644
1666
  if (r.isNull) throw new Error();
1645
1667
  e.RequiresInstance = r.asBool();
1646
1668
  break;
1647
1669
  }
1648
- case vt: {
1670
+ case Ft: {
1649
1671
  if (r.isNull) throw new Error();
1650
1672
  e.LlmInlineResult = r.asBool();
1651
1673
  break;
1652
1674
  }
1653
- case Pt: {
1675
+ case Bt: {
1654
1676
  if (r.isNull) throw new Error();
1655
1677
  e.IsEnumerable = r.asBool();
1656
1678
  break;
1657
1679
  }
1658
- case Ft: {
1680
+ case xt: {
1659
1681
  if (r.isNull) throw new Error();
1660
- e.Parameters = _i(r.asArray());
1682
+ e.Parameters = Ai(r.asArray());
1661
1683
  break;
1662
1684
  }
1663
- case Bt: {
1685
+ case Gt: {
1664
1686
  if (r.isNull) throw new Error();
1665
1687
  e.LlmCallOnlyOnce = r.asBool();
1666
1688
  break;
1667
1689
  }
1668
1690
  }
1669
1691
  }
1670
- function mi(t, e, r) {
1671
- const n = Ei(t);
1672
- return F(di, n, xe, e, r);
1692
+ function wi(t, e, r) {
1693
+ const n = _i(t);
1694
+ return F(Ii, n, We, e, r);
1673
1695
  }
1674
- function _i(t) {
1696
+ function Ai(t) {
1675
1697
  const e = [];
1676
1698
  let r;
1677
1699
  for (; (r = t.next()) !== null; )
1678
- e.push(Ai(r.asObject()));
1700
+ e.push(Ci(r.asObject()));
1679
1701
  return e;
1680
1702
  }
1681
- const Ti = 1, Vt = 607861992, Wt = 894485888, Ht = 972460562, $t = 1368629611, Kt = 1883521406, Yt = 2603556958, jt = 3609695522, zt = 4075263697, Xt = 4257460908;
1682
- function Si(t) {
1703
+ const yi = 1, Ht = 607861992, Kt = 894485888, $t = 972460562, Yt = 1368629611, jt = 1883521406, zt = 2603556958, Xt = 3609695522, Jt = 4075263697, Qt = 4257460908;
1704
+ function Ni(t) {
1683
1705
  const e = {};
1684
- return Jt(e), e;
1706
+ return Zt(e), e;
1685
1707
  }
1686
- function Jt(t) {
1708
+ function Zt(t) {
1687
1709
  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;
1688
1710
  }
1689
- function wi(t, e) {
1690
- e.writeBoolField(Vt, t.HasDefaultValue), e.writeStringField(Wt, t.DefaultValueJson), e.writeStringField(Ht, t.EnumerableItemTypeName), e.writeStringField($t, t.Description), e.writeBinaryField(Kt, t.DefaultValueData), e.writeBoolField(Yt, t.IsEnumerable), e.writeStringField(jt, t.TypeName), e.writeStringField(zt, t.ParameterName), e.writeInt32Field(Xt, t.ParameterIndex | 0);
1711
+ function gi(t, e) {
1712
+ e.writeBoolField(Ht, t.HasDefaultValue), e.writeStringField(Kt, t.DefaultValueJson), e.writeStringField($t, t.EnumerableItemTypeName), e.writeStringField(Yt, t.Description), e.writeBinaryField(jt, t.DefaultValueData), e.writeBoolField(zt, t.IsEnumerable), e.writeStringField(Xt, t.TypeName), e.writeStringField(Jt, t.ParameterName), e.writeInt32Field(Qt, t.ParameterIndex | 0);
1691
1713
  }
1692
- function Ai(t, e) {
1693
- const r = e ?? Si();
1694
- return Jt(r), yi(t, r), r;
1714
+ function Ci(t, e) {
1715
+ const r = e ?? Ni();
1716
+ return Zt(r), bi(t, r), r;
1695
1717
  }
1696
- function yi(t, e) {
1718
+ function bi(t, e) {
1697
1719
  let r;
1698
1720
  for (; (r = t.next()) !== null; )
1699
1721
  switch (r.fieldId) {
1700
- case Vt: {
1722
+ case Ht: {
1701
1723
  if (r.isNull) throw new Error();
1702
1724
  e.HasDefaultValue = r.asBool();
1703
1725
  break;
1704
1726
  }
1705
- case Wt: {
1727
+ case Kt: {
1706
1728
  if (r.isNull) throw new Error();
1707
1729
  e.DefaultValueJson = r.asString();
1708
1730
  break;
1709
1731
  }
1710
- case Ht: {
1732
+ case $t: {
1711
1733
  if (r.isNull) throw new Error();
1712
1734
  e.EnumerableItemTypeName = r.asString();
1713
1735
  break;
1714
1736
  }
1715
- case $t: {
1737
+ case Yt: {
1716
1738
  if (r.isNull) throw new Error();
1717
1739
  e.Description = r.asString();
1718
1740
  break;
1719
1741
  }
1720
- case Kt: {
1742
+ case jt: {
1721
1743
  if (r.isNull) throw new Error();
1722
1744
  e.DefaultValueData = r.asBinary();
1723
1745
  break;
1724
1746
  }
1725
- case Yt: {
1747
+ case zt: {
1726
1748
  if (r.isNull) throw new Error();
1727
1749
  e.IsEnumerable = r.asBool();
1728
1750
  break;
1729
1751
  }
1730
- case jt: {
1752
+ case Xt: {
1731
1753
  if (r.isNull) throw new Error();
1732
1754
  e.TypeName = r.asString();
1733
1755
  break;
1734
1756
  }
1735
- case zt: {
1757
+ case Jt: {
1736
1758
  if (r.isNull) throw new Error();
1737
1759
  e.ParameterName = r.asString();
1738
1760
  break;
1739
1761
  }
1740
- case Xt: {
1762
+ case Qt: {
1741
1763
  if (r.isNull) throw new Error();
1742
1764
  e.ParameterIndex = r.asInt32();
1743
1765
  break;
1744
1766
  }
1745
1767
  }
1746
1768
  }
1747
- const Qt = 1, Ni = 1048638, gi = 3678477544;
1748
- function Ci(t) {
1769
+ const qt = 1, Ri = 1048638, ki = 3678477544;
1770
+ function Ui(t) {
1749
1771
  const e = {};
1750
- return bi(e), t && Object.assign(e, t), e;
1772
+ return Di(e), t && Object.assign(e, t), e;
1751
1773
  }
1752
- function bi(t) {
1774
+ function Di(t) {
1753
1775
  return t.Functions = [], t;
1754
1776
  }
1755
- function Ri(t) {
1756
- const e = new D(Qt);
1757
- return ki(t, e), e.finish();
1777
+ function Mi(t) {
1778
+ const e = new D(qt);
1779
+ return Oi(t, e), e.finish();
1758
1780
  }
1759
- function ki(t, e) {
1760
- e.writeArrayField(gi, b.Object, (r) => {
1781
+ function Oi(t, e) {
1782
+ e.writeArrayField(ki, b.Object, (r) => {
1761
1783
  for (const n of t.Functions)
1762
- r.writeObject(xe, (s) => {
1763
- xt(n, s);
1784
+ r.writeObject(We, (s) => {
1785
+ Wt(n, s);
1764
1786
  });
1765
1787
  });
1766
1788
  }
1767
- function Ui(t, e, r) {
1768
- const n = Ri(t);
1769
- return F(Ni, n, Qt, e, r);
1789
+ function Li(t, e, r) {
1790
+ const n = Mi(t);
1791
+ return F(Ri, n, qt, e, r);
1770
1792
  }
1771
- const Zt = 1, Di = 1048602, Mi = 349453957, Oi = 703025676, Li = 3403385840, vi = 3748161056, Pi = 4289118421;
1772
- function Fi(t) {
1793
+ const er = 1, vi = 1048602, Pi = 349453957, Fi = 703025676, Bi = 3403385840, xi = 3748161056, Gi = 4289118421;
1794
+ function Vi(t) {
1773
1795
  const e = {};
1774
- return Bi(e), t && Object.assign(e, t), e;
1796
+ return Wi(e), t && Object.assign(e, t), e;
1775
1797
  }
1776
- function Bi(t) {
1798
+ function Wi(t) {
1777
1799
  return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
1778
1800
  }
1779
- function Gi(t) {
1780
- const e = new D(Zt);
1781
- return xi(t, e), e.finish();
1801
+ function Hi(t) {
1802
+ const e = new D(er);
1803
+ return Ki(t, e), e.finish();
1782
1804
  }
1783
- function xi(t, e) {
1784
- e.writeBinaryField(Mi, t.ResultData), e.writeStringField(Oi, t.ResultTypeName), e.writeStringField(Li, t.ResultJson), e.writeGuidField(vi, t.CallId), e.writeGuidField(Pi, t.InstanceId);
1805
+ function Ki(t, e) {
1806
+ e.writeBinaryField(Pi, t.ResultData), e.writeStringField(Fi, t.ResultTypeName), e.writeStringField(Bi, t.ResultJson), e.writeGuidField(xi, t.CallId), e.writeGuidField(Gi, t.InstanceId);
1785
1807
  }
1786
- function Vi(t, e, r) {
1787
- const n = Gi(t);
1788
- return F(Di, n, Zt, e, r);
1808
+ function $i(t, e, r) {
1809
+ const n = Hi(t);
1810
+ return F(vi, n, er, e, r);
1789
1811
  }
1790
- const qt = 1, Wi = 65549;
1791
- function Xe(t) {
1812
+ const tr = 1, Yi = 65549;
1813
+ function Je(t) {
1792
1814
  return {};
1793
1815
  }
1794
- function Hi(t) {
1795
- return new D(qt).finish();
1816
+ function ji(t) {
1817
+ return new D(tr).finish();
1796
1818
  }
1797
- function Je(t, e, r) {
1798
- const n = Hi();
1799
- return F(Wi, n, qt, e, r);
1819
+ function Qe(t, e, r) {
1820
+ const n = ji();
1821
+ return F(Yi, n, tr, e, r);
1800
1822
  }
1801
- const $i = 3167053791, Ki = 3342364356, Yi = 3612929027;
1802
- function er(t) {
1823
+ const zi = 3167053791, Xi = 3342364356, Ji = 3612929027;
1824
+ function rr(t) {
1803
1825
  const e = {};
1804
- return tr(e), e;
1826
+ return nr(e), e;
1805
1827
  }
1806
- function tr(t) {
1828
+ function nr(t) {
1807
1829
  return t.Category = "", t.Type = Et.Face, t.FaceBlendshapes = [], t;
1808
1830
  }
1809
- function ji(t, e) {
1810
- const r = e ?? er();
1811
- return tr(r), zi(t, r), r;
1831
+ function Qi(t, e) {
1832
+ const r = e ?? rr();
1833
+ return nr(r), Zi(t, r), r;
1812
1834
  }
1813
- function zi(t, e) {
1835
+ function Zi(t, e) {
1814
1836
  let r;
1815
1837
  for (; (r = t.next()) !== null; )
1816
1838
  switch (r.fieldId) {
1817
- case $i: {
1839
+ case zi: {
1818
1840
  if (r.isNull) throw new Error();
1819
1841
  e.Type = r.asInt32();
1820
1842
  break;
1821
1843
  }
1822
- case Ki: {
1844
+ case Xi: {
1823
1845
  if (r.isNull) throw new Error();
1824
- e.FaceBlendshapes = Xi(r.asArray());
1846
+ e.FaceBlendshapes = qi(r.asArray());
1825
1847
  break;
1826
1848
  }
1827
- case Yi: {
1849
+ case Ji: {
1828
1850
  if (r.isNull) throw new Error();
1829
1851
  e.Category = r.asString();
1830
1852
  break;
1831
1853
  }
1832
1854
  }
1833
1855
  }
1834
- function Xi(t) {
1856
+ function qi(t) {
1835
1857
  const e = [];
1836
1858
  let r;
1837
1859
  for (; (r = t.next()) !== null; )
1838
1860
  e.push(r.asString());
1839
1861
  return e;
1840
1862
  }
1841
- const Ji = 3612929027;
1842
- function rr(t) {
1863
+ const eo = 3612929027;
1864
+ function sr(t) {
1843
1865
  const e = {};
1844
- return nr(e), e;
1866
+ return ir(e), e;
1845
1867
  }
1846
- function nr(t) {
1868
+ function ir(t) {
1847
1869
  return t.Category = "", t;
1848
1870
  }
1849
- function Qi(t, e) {
1850
- const r = e ?? rr();
1851
- return nr(r), Zi(t, r), r;
1871
+ function to(t, e) {
1872
+ const r = e ?? sr();
1873
+ return ir(r), ro(t, r), r;
1852
1874
  }
1853
- function Zi(t, e) {
1875
+ function ro(t, e) {
1854
1876
  let r;
1855
1877
  for (; (r = t.next()) !== null; )
1856
1878
  switch (r.fieldId) {
1857
- case Ji: {
1879
+ case eo: {
1858
1880
  if (r.isNull) throw new Error();
1859
1881
  e.Category = r.asString();
1860
1882
  break;
1861
1883
  }
1862
1884
  }
1863
1885
  }
1864
- const qi = 164808083, eo = 1368629611, to = 2739413426, ro = 2768375929, no = 2950031986, so = 3284746250, io = 4065070594;
1865
- function sr(t) {
1886
+ const no = 164808083, so = 1368629611, io = 2739413426, oo = 2768375929, ao = 2950031986, co = 3284746250, lo = 4065070594;
1887
+ function or(t) {
1866
1888
  const e = {};
1867
- return ir(e), e;
1889
+ return ar(e), e;
1868
1890
  }
1869
- function ir(t) {
1891
+ function ar(t) {
1870
1892
  return t.Description = "", t.Codec = pt.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
1871
1893
  }
1872
- function oo(t, e) {
1873
- const r = e ?? sr();
1874
- return ir(r), ao(t, r), r;
1894
+ function uo(t, e) {
1895
+ const r = e ?? or();
1896
+ return ar(r), ho(t, r), r;
1875
1897
  }
1876
- function ao(t, e) {
1898
+ function ho(t, e) {
1877
1899
  let r;
1878
1900
  for (; (r = t.next()) !== null; )
1879
1901
  switch (r.fieldId) {
1880
- case qi: {
1902
+ case no: {
1881
1903
  if (r.isNull) throw new Error();
1882
1904
  e.Framerate = r.asInt32();
1883
1905
  break;
1884
1906
  }
1885
- case eo: {
1907
+ case so: {
1886
1908
  if (r.isNull) throw new Error();
1887
1909
  e.Description = r.asString();
1888
1910
  break;
1889
1911
  }
1890
- case to: {
1912
+ case io: {
1891
1913
  if (r.isNull) throw new Error();
1892
1914
  e.IsHardwareAccelerated = r.asBool();
1893
1915
  break;
1894
1916
  }
1895
- case ro: {
1917
+ case oo: {
1896
1918
  if (r.isNull) throw new Error();
1897
1919
  e.Bitrate = r.asInt32();
1898
1920
  break;
1899
1921
  }
1900
- case no: {
1922
+ case ao: {
1901
1923
  if (r.isNull) throw new Error();
1902
1924
  e.Height = r.asInt32();
1903
1925
  break;
1904
1926
  }
1905
- case so: {
1927
+ case co: {
1906
1928
  if (r.isNull) throw new Error();
1907
1929
  e.Codec = r.asInt32();
1908
1930
  break;
1909
1931
  }
1910
- case io: {
1932
+ case lo: {
1911
1933
  if (r.isNull) throw new Error();
1912
1934
  e.Width = r.asInt32();
1913
1935
  break;
1914
1936
  }
1915
1937
  }
1916
1938
  }
1917
- const co = 65539, lo = 414670648, uo = 693643444, ho = 1144553441, fo = 1497620243, Eo = 1559330978, po = 1999510636, Io = 2277643855, mo = 2469008121, _o = 3042922213, To = 3219210453, So = 3504054055, wo = 3642827795, Ao = 3678477544, yo = 3696445035, No = 3707543140, go = 3712281496, Co = 3748214980, bo = 3823842552, Ro = 3895362455, ko = 3897397815, Uo = 4225107827;
1918
- function Do(t) {
1939
+ const fo = 65539, Eo = 693643444, po = 1144553441, Io = 1497620243, mo = 1559330978, _o = 1976546434, To = 1999510636, So = 2277643855, wo = 2469008121, Ao = 3042922213, yo = 3064612128, No = 3219210453, go = 3504054055, Co = 3678477544, bo = 3696445035, Ro = 3707543140, ko = 3712281496, Uo = 3895362455, Do = 3897397815, Mo = 4225107827;
1940
+ function Oo(t) {
1919
1941
  const e = {};
1920
- return or(e), e;
1942
+ return cr(e), e;
1921
1943
  }
1922
- function or(t) {
1923
- return t.Clients = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelInstanceId = "", t.FirstUserId = "", t.ChannelUrl = "", t.ChannelId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.SessionId = "", t.RunnerType = "", t.BootType = "", t.PublicAccess = !1, t.DebugMode = !1, t.IsGitSource = !1, t.Functions = /* @__PURE__ */ Object.create(null), t;
1944
+ function cr(t) {
1945
+ return t.Clients = /* @__PURE__ */ Object.create(null), t.Functions = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.SessionId = "", t.ChannelUrl = "", t.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = It.Local, t.AppSourceType = mt.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
1924
1946
  }
1925
- function Mo(t, e) {
1947
+ function Lo(t, e) {
1926
1948
  const r = z.create(t);
1927
- return Oo(r, e);
1949
+ return vo(r, e);
1928
1950
  }
1929
- function Oo(t, e) {
1930
- const r = e ?? Do();
1931
- return or(r), Lo(t, r), r;
1951
+ function vo(t, e) {
1952
+ const r = e ?? Oo();
1953
+ return cr(r), Po(t, r), r;
1932
1954
  }
1933
- function Lo(t, e) {
1955
+ function Po(t, e) {
1934
1956
  let r;
1935
1957
  for (; (r = t.next()) !== null; )
1936
1958
  switch (r.fieldId) {
1937
- case lo: {
1938
- if (r.isNull) throw new Error();
1939
- e.IsGitSource = r.asBool();
1940
- break;
1941
- }
1942
- case uo: {
1943
- if (r.isNull) throw new Error();
1944
- e.FirstUserId = r.asString();
1945
- break;
1946
- }
1947
- case ho: {
1948
- if (r.isNull) throw new Error();
1949
- e.Clients = Po(r.asDictionary());
1950
- break;
1951
- }
1952
- case fo: {
1953
- if (r.isNull) throw new Error();
1954
- e.TrackingStreams = Fo(r.asDictionary());
1955
- break;
1956
- }
1957
1959
  case Eo: {
1958
1960
  if (r.isNull) throw new Error();
1959
- e.ChannelId = r.asString();
1961
+ e.FirstUserId = r.asString();
1960
1962
  break;
1961
1963
  }
1962
1964
  case po: {
1963
1965
  if (r.isNull) throw new Error();
1964
- e.SessionId = r.asString();
1966
+ e.Clients = Bo(r.asDictionary());
1965
1967
  break;
1966
1968
  }
1967
1969
  case Io: {
1968
1970
  if (r.isNull) throw new Error();
1969
- e.ChannelUrl = r.asString();
1971
+ e.TrackingStreams = xo(r.asDictionary());
1970
1972
  break;
1971
1973
  }
1972
1974
  case mo: {
1973
1975
  if (r.isNull) throw new Error();
1974
- e.ChannelName = r.asString();
1976
+ e.ChannelId = r.asString();
1975
1977
  break;
1976
1978
  }
1977
1979
  case _o: {
1978
1980
  if (r.isNull) throw new Error();
1979
- e.PublicAccess = r.asBool();
1981
+ e.AppSourceType = r.asInt32();
1980
1982
  break;
1981
1983
  }
1982
1984
  case To: {
1983
1985
  if (r.isNull) throw new Error();
1984
- e.OrganisationName = r.asString();
1986
+ e.SessionId = r.asString();
1985
1987
  break;
1986
1988
  }
1987
1989
  case So: {
1988
1990
  if (r.isNull) throw new Error();
1989
- e.DebugMode = r.asBool();
1991
+ e.ChannelUrl = r.asString();
1990
1992
  break;
1991
1993
  }
1992
1994
  case wo: {
1993
1995
  if (r.isNull) throw new Error();
1994
- e.RunnerType = r.asString();
1996
+ e.ChannelName = r.asString();
1995
1997
  break;
1996
1998
  }
1997
1999
  case Ao: {
1998
2000
  if (r.isNull) throw new Error();
1999
- e.Functions = Bo(r.asDictionary());
2001
+ e.PublicAccess = r.asBool();
2000
2002
  break;
2001
2003
  }
2002
2004
  case yo: {
2003
2005
  if (r.isNull) throw new Error();
2004
- e.UIStreams = Go(r.asDictionary());
2006
+ e.ServerRunType = r.asInt32();
2005
2007
  break;
2006
2008
  }
2007
2009
  case No: {
2008
2010
  if (r.isNull) throw new Error();
2009
- e.SpaceId = r.asString();
2011
+ e.OrganisationName = r.asString();
2010
2012
  break;
2011
2013
  }
2012
2014
  case go: {
2013
2015
  if (r.isNull) throw new Error();
2014
- e.PrimaryUserId = r.asString();
2016
+ e.DebugMode = r.asBool();
2015
2017
  break;
2016
2018
  }
2017
2019
  case Co: {
2018
2020
  if (r.isNull) throw new Error();
2019
- e.BootType = r.asString();
2021
+ e.Functions = Go(r.asDictionary());
2020
2022
  break;
2021
2023
  }
2022
2024
  case bo: {
2023
2025
  if (r.isNull) throw new Error();
2024
- e.ChannelInstanceId = r.asString();
2026
+ e.UIStreams = Vo(r.asDictionary());
2025
2027
  break;
2026
2028
  }
2027
2029
  case Ro: {
2028
2030
  if (r.isNull) throw new Error();
2029
- e.AudioStreams = xo(r.asDictionary());
2031
+ e.SpaceId = r.asString();
2030
2032
  break;
2031
2033
  }
2032
2034
  case ko: {
2033
2035
  if (r.isNull) throw new Error();
2034
- e.VideoStreams = Vo(r.asDictionary());
2036
+ e.PrimaryUserId = r.asString();
2035
2037
  break;
2036
2038
  }
2037
2039
  case Uo: {
2040
+ if (r.isNull) throw new Error();
2041
+ e.AudioStreams = Wo(r.asDictionary());
2042
+ break;
2043
+ }
2044
+ case Do: {
2045
+ if (r.isNull) throw new Error();
2046
+ e.VideoStreams = Ho(r.asDictionary());
2047
+ break;
2048
+ }
2049
+ case Mo: {
2038
2050
  if (r.isNull) throw new Error();
2039
2051
  e.SpaceName = r.asString();
2040
2052
  break;
2041
2053
  }
2042
2054
  }
2043
2055
  }
2044
- function vo(t, e) {
2045
- const r = Me(t, co);
2046
- return Mo(r, e);
2056
+ async function Fo(t, e) {
2057
+ const r = await Le(t, fo);
2058
+ return Lo(r, e);
2047
2059
  }
2048
- function Po(t) {
2060
+ function Bo(t) {
2049
2061
  const e = /* @__PURE__ */ Object.create(null);
2050
2062
  let r;
2051
2063
  for (; (r = t.next()) !== null; ) {
2052
2064
  const n = r.key.asInt32();
2053
- e[n] = ge(r.value.asObject());
2065
+ e[n] = be(r.value.asObject());
2054
2066
  }
2055
2067
  return e;
2056
2068
  }
2057
- function Fo(t) {
2069
+ function xo(t) {
2058
2070
  const e = /* @__PURE__ */ Object.create(null);
2059
2071
  let r;
2060
2072
  for (; (r = t.next()) !== null; ) {
2061
2073
  const n = r.key.asString();
2062
- e[n] = pa(r.value.asObject());
2074
+ e[n] = ma(r.value.asObject());
2063
2075
  }
2064
2076
  return e;
2065
2077
  }
2066
- function Bo(t) {
2078
+ function Go(t) {
2067
2079
  const e = /* @__PURE__ */ Object.create(null);
2068
2080
  let r;
2069
2081
  for (; (r = t.next()) !== null; ) {
2070
2082
  const n = r.key.asInt32();
2071
- e[n] = Wo(r.value.asArray());
2083
+ e[n] = Ko(r.value.asArray());
2072
2084
  }
2073
2085
  return e;
2074
2086
  }
2075
- function Go(t) {
2087
+ function Vo(t) {
2076
2088
  const e = /* @__PURE__ */ Object.create(null);
2077
2089
  let r;
2078
2090
  for (; (r = t.next()) !== null; ) {
2079
2091
  const n = r.key.asString();
2080
- e[n] = zo(r.value.asObject());
2092
+ e[n] = Jo(r.value.asObject());
2081
2093
  }
2082
2094
  return e;
2083
2095
  }
2084
- function xo(t) {
2096
+ function Wo(t) {
2085
2097
  const e = /* @__PURE__ */ Object.create(null);
2086
2098
  let r;
2087
2099
  for (; (r = t.next()) !== null; ) {
2088
2100
  const n = r.key.asString();
2089
- e[n] = ta(r.value.asObject());
2101
+ e[n] = na(r.value.asObject());
2090
2102
  }
2091
2103
  return e;
2092
2104
  }
2093
- function Vo(t) {
2105
+ function Ho(t) {
2094
2106
  const e = /* @__PURE__ */ Object.create(null);
2095
2107
  let r;
2096
2108
  for (; (r = t.next()) !== null; ) {
2097
2109
  const n = r.key.asString();
2098
- e[n] = ca(r.value.asObject());
2110
+ e[n] = ua(r.value.asObject());
2099
2111
  }
2100
2112
  return e;
2101
2113
  }
2102
- function Wo(t) {
2114
+ function Ko(t) {
2103
2115
  const e = [];
2104
2116
  let r;
2105
2117
  for (; (r = t.next()) !== null; )
2106
- e.push(pi(r.asObject()));
2118
+ e.push(Ti(r.asObject()));
2107
2119
  return e;
2108
2120
  }
2109
- const Ho = 161083277, $o = 325678206, Ko = 3469892363, Yo = 3645544153;
2110
- function jo(t) {
2121
+ const $o = 161083277, Yo = 325678206, jo = 3469892363, zo = 3645544153;
2122
+ function Xo(t) {
2111
2123
  const e = {};
2112
- return ar(e), e;
2124
+ return lr(e), e;
2113
2125
  }
2114
- function ar(t) {
2115
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = rr(), t;
2126
+ function lr(t) {
2127
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = sr(), t;
2116
2128
  }
2117
- function zo(t, e) {
2118
- const r = e ?? jo();
2119
- return ar(r), Xo(t, r), r;
2129
+ function Jo(t, e) {
2130
+ const r = e ?? Xo();
2131
+ return lr(r), Qo(t, r), r;
2120
2132
  }
2121
- function Xo(t, e) {
2133
+ function Qo(t, e) {
2122
2134
  let r;
2123
2135
  for (; (r = t.next()) !== null; )
2124
2136
  switch (r.fieldId) {
2125
- case Ho: {
2137
+ case $o: {
2126
2138
  if (r.isNull) throw new Error();
2127
2139
  e.StreamId = r.asString();
2128
2140
  break;
2129
2141
  }
2130
- case $o: {
2142
+ case Yo: {
2131
2143
  if (r.isNull) throw new Error();
2132
2144
  e.ClientSessionId = r.asInt32();
2133
2145
  break;
2134
2146
  }
2135
- case Ko: {
2147
+ case jo: {
2136
2148
  if (r.isNull) throw new Error();
2137
2149
  e.TrackId = r.asInt32();
2138
2150
  break;
2139
2151
  }
2140
- case Yo: {
2152
+ case zo: {
2141
2153
  if (r.isNull) throw new Error();
2142
- e.Info = Qi(r.asObject());
2154
+ e.Info = to(r.asObject());
2143
2155
  break;
2144
2156
  }
2145
2157
  }
2146
2158
  }
2147
- const Jo = 161083277, Qo = 325678206, Zo = 3469892363, qo = 3645544153;
2148
- function ea(t) {
2159
+ const Zo = 161083277, qo = 325678206, ea = 3469892363, ta = 3645544153;
2160
+ function ra(t) {
2149
2161
  const e = {};
2150
- return cr(e), e;
2162
+ return ur(e), e;
2151
2163
  }
2152
- function cr(t) {
2153
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = _t(), t;
2164
+ function ur(t) {
2165
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = St(), t;
2154
2166
  }
2155
- function ta(t, e) {
2156
- const r = e ?? ea();
2157
- return cr(r), ra(t, r), r;
2167
+ function na(t, e) {
2168
+ const r = e ?? ra();
2169
+ return ur(r), sa(t, r), r;
2158
2170
  }
2159
- function ra(t, e) {
2171
+ function sa(t, e) {
2160
2172
  let r;
2161
2173
  for (; (r = t.next()) !== null; )
2162
2174
  switch (r.fieldId) {
2163
- case Jo: {
2175
+ case Zo: {
2164
2176
  if (r.isNull) throw new Error();
2165
2177
  e.StreamId = r.asString();
2166
2178
  break;
2167
2179
  }
2168
- case Qo: {
2180
+ case qo: {
2169
2181
  if (r.isNull) throw new Error();
2170
2182
  e.ClientSessionId = r.asInt32();
2171
2183
  break;
2172
2184
  }
2173
- case Zo: {
2185
+ case ea: {
2174
2186
  if (r.isNull) throw new Error();
2175
2187
  e.TrackId = r.asInt32();
2176
2188
  break;
2177
2189
  }
2178
- case qo: {
2190
+ case ta: {
2179
2191
  if (r.isNull) throw new Error();
2180
- e.Info = In(r.asObject());
2192
+ e.Info = Sn(r.asObject());
2181
2193
  break;
2182
2194
  }
2183
2195
  }
2184
2196
  }
2185
- const na = 161083277, sa = 325678206, ia = 3469892363, oa = 3645544153;
2186
- function aa(t) {
2197
+ const ia = 161083277, oa = 325678206, aa = 3469892363, ca = 3645544153;
2198
+ function la(t) {
2187
2199
  const e = {};
2188
- return lr(e), e;
2200
+ return hr(e), e;
2189
2201
  }
2190
- function lr(t) {
2191
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = sr(), t;
2202
+ function hr(t) {
2203
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = or(), t;
2192
2204
  }
2193
- function ca(t, e) {
2194
- const r = e ?? aa();
2195
- return lr(r), la(t, r), r;
2205
+ function ua(t, e) {
2206
+ const r = e ?? la();
2207
+ return hr(r), ha(t, r), r;
2196
2208
  }
2197
- function la(t, e) {
2209
+ function ha(t, e) {
2198
2210
  let r;
2199
2211
  for (; (r = t.next()) !== null; )
2200
2212
  switch (r.fieldId) {
2201
- case na: {
2213
+ case ia: {
2202
2214
  if (r.isNull) throw new Error();
2203
2215
  e.StreamId = r.asString();
2204
2216
  break;
2205
2217
  }
2206
- case sa: {
2218
+ case oa: {
2207
2219
  if (r.isNull) throw new Error();
2208
2220
  e.ClientSessionId = r.asInt32();
2209
2221
  break;
2210
2222
  }
2211
- case ia: {
2223
+ case aa: {
2212
2224
  if (r.isNull) throw new Error();
2213
2225
  e.TrackId = r.asInt32();
2214
2226
  break;
2215
2227
  }
2216
- case oa: {
2228
+ case ca: {
2217
2229
  if (r.isNull) throw new Error();
2218
- e.Info = oo(r.asObject());
2230
+ e.Info = uo(r.asObject());
2219
2231
  break;
2220
2232
  }
2221
2233
  }
2222
2234
  }
2223
- const ua = 161083277, ha = 325678206, da = 3469892363, fa = 3645544153;
2224
- function Ea(t) {
2235
+ const da = 161083277, fa = 325678206, Ea = 3469892363, pa = 3645544153;
2236
+ function Ia(t) {
2225
2237
  const e = {};
2226
- return ur(e), e;
2238
+ return dr(e), e;
2227
2239
  }
2228
- function ur(t) {
2229
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = er(), t;
2240
+ function dr(t) {
2241
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = rr(), t;
2230
2242
  }
2231
- function pa(t, e) {
2232
- const r = e ?? Ea();
2233
- return ur(r), Ia(t, r), r;
2243
+ function ma(t, e) {
2244
+ const r = e ?? Ia();
2245
+ return dr(r), _a(t, r), r;
2234
2246
  }
2235
- function Ia(t, e) {
2247
+ function _a(t, e) {
2236
2248
  let r;
2237
2249
  for (; (r = t.next()) !== null; )
2238
2250
  switch (r.fieldId) {
2239
- case ua: {
2251
+ case da: {
2240
2252
  if (r.isNull) throw new Error();
2241
2253
  e.StreamId = r.asString();
2242
2254
  break;
2243
2255
  }
2244
- case ha: {
2256
+ case fa: {
2245
2257
  if (r.isNull) throw new Error();
2246
2258
  e.ClientSessionId = r.asInt32();
2247
2259
  break;
2248
2260
  }
2249
- case da: {
2261
+ case Ea: {
2250
2262
  if (r.isNull) throw new Error();
2251
2263
  e.TrackId = r.asInt32();
2252
2264
  break;
2253
2265
  }
2254
- case fa: {
2266
+ case pa: {
2255
2267
  if (r.isNull) throw new Error();
2256
- e.Info = ji(r.asObject());
2268
+ e.Info = Qi(r.asObject());
2257
2269
  break;
2258
2270
  }
2259
2271
  }
2260
2272
  }
2261
- const hr = 1, ma = 131074;
2262
- function dr(t) {
2273
+ const fr = 1, Ta = 131074;
2274
+ function Er(t) {
2263
2275
  return {};
2264
2276
  }
2265
- function _a(t) {
2266
- return new D(hr).finish();
2277
+ function Sa(t) {
2278
+ return new D(fr).finish();
2267
2279
  }
2268
- function fr(t, e, r) {
2269
- const n = _a();
2270
- return F(ma, n, hr, e, r);
2280
+ function pr(t, e, r) {
2281
+ const n = Sa();
2282
+ return F(Ta, n, fr, e, r);
2271
2283
  }
2272
- const Er = 1, Ta = 8388612;
2273
- function Sa(t) {
2284
+ const Ir = 1, wa = 8388612;
2285
+ function Aa(t) {
2274
2286
  return {};
2275
2287
  }
2276
- function wa(t) {
2277
- return new D(Er).finish();
2288
+ function ya(t) {
2289
+ return new D(Ir).finish();
2278
2290
  }
2279
- function Aa(t, e, r) {
2280
- const n = wa();
2281
- return F(Ta, n, Er, e, r);
2291
+ function Na(t, e, r) {
2292
+ const n = ya();
2293
+ return F(wa, n, Ir, e, r);
2282
2294
  }
2283
- function ya(t) {
2295
+ function ga(t) {
2284
2296
  return new Worker(
2285
- "" + new URL("assets/protocol-worker-BnPqA34K.js", import.meta.url).href,
2297
+ "" + new URL("assets/protocol-worker-DIKCgk1A.js", import.meta.url).href,
2286
2298
  {
2287
2299
  type: "module",
2288
2300
  name: t?.name
2289
2301
  }
2290
2302
  );
2291
2303
  }
2292
- class Ve extends Error {
2304
+ class He extends Error {
2293
2305
  constructor(e, r) {
2294
2306
  super(e), this.cause = r, this.name = "ConnectionError";
2295
2307
  }
2296
2308
  }
2297
- class y extends Ve {
2309
+ class y extends He {
2298
2310
  constructor(e, r) {
2299
2311
  super(e, r), this.name = "AuthenticationError";
2300
2312
  }
2301
2313
  }
2302
- class W extends Ve {
2314
+ class W extends He {
2303
2315
  constructor(e, r) {
2304
2316
  super(e, r), this.name = "TransportError";
2305
2317
  }
2306
2318
  }
2307
- class We extends W {
2319
+ class Ke extends W {
2308
2320
  constructor(e) {
2309
2321
  super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
2310
2322
  }
2311
2323
  }
2312
- class Na extends Ve {
2324
+ class Ca extends He {
2313
2325
  constructor(e) {
2314
2326
  super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
2315
2327
  }
2316
2328
  }
2317
- class ga extends y {
2329
+ class ba extends y {
2318
2330
  constructor(e) {
2319
2331
  super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
2320
2332
  }
2321
2333
  }
2322
- class Il extends y {
2334
+ class Tl extends y {
2323
2335
  constructor(e) {
2324
2336
  super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
2325
2337
  }
2326
2338
  }
2327
- class ml extends y {
2339
+ class Sl extends y {
2328
2340
  constructor(e) {
2329
2341
  super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
2330
2342
  }
2331
2343
  }
2332
- class _l extends y {
2344
+ class wl extends y {
2333
2345
  constructor() {
2334
2346
  super("No channels available in this space"), this.name = "NoChannelsError";
2335
2347
  }
2336
2348
  }
2337
- function pr(t, e) {
2349
+ function mr(t, e) {
2338
2350
  return new Promise((r, n) => {
2339
2351
  const s = () => {
2340
2352
  clearTimeout(i), n(new Error("Aborted"));
@@ -2348,32 +2360,32 @@ function pr(t, e) {
2348
2360
  e?.addEventListener("abort", s, { once: !0 });
2349
2361
  });
2350
2362
  }
2351
- var Ir = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.NONE = 4] = "NONE", t))(Ir || {});
2352
- let He = 1, fe = null;
2353
- function Tl(t) {
2354
- He = t;
2363
+ var _r = /* @__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))(_r || {});
2364
+ let $e = 1, fe = null;
2365
+ function Al(t) {
2366
+ $e = t;
2355
2367
  }
2356
- function Sl() {
2357
- return He;
2368
+ function yl() {
2369
+ return $e;
2358
2370
  }
2359
- function Ca(t) {
2371
+ function Ra(t) {
2360
2372
  fe = t;
2361
2373
  }
2362
- function wl() {
2374
+ function Nl() {
2363
2375
  return fe;
2364
2376
  }
2365
- const ba = {
2377
+ const ka = {
2366
2378
  0: "DEBUG",
2367
2379
  1: "INFO",
2368
2380
  2: "WARN",
2369
2381
  3: "ERROR",
2370
2382
  4: "NONE"
2371
2383
  };
2372
- function Ra(t, e) {
2384
+ function Ua(t, e) {
2373
2385
  return `[${t}] ${e}`;
2374
2386
  }
2375
2387
  function ie(t, e, r, n) {
2376
- const s = (/* @__PURE__ */ new Date()).toISOString(), i = ba[t];
2388
+ const s = (/* @__PURE__ */ new Date()).toISOString(), i = ka[t];
2377
2389
  if (fe && fe({
2378
2390
  timestamp: s,
2379
2391
  level: t,
@@ -2381,8 +2393,8 @@ function ie(t, e, r, n) {
2381
2393
  component: e,
2382
2394
  message: r,
2383
2395
  args: n
2384
- }), He <= t) {
2385
- const o = Ra(e, r);
2396
+ }), $e <= t) {
2397
+ const o = Ua(e, r);
2386
2398
  switch (t) {
2387
2399
  case 0:
2388
2400
  console.debug(o, ...n);
@@ -2415,8 +2427,8 @@ function L(t) {
2415
2427
  }
2416
2428
  };
2417
2429
  }
2418
- const oe = L("WebSocketTransport"), ka = 1e4;
2419
- class Ua {
2430
+ const oe = L("WebSocketTransport"), Da = 1e4;
2431
+ class Ma {
2420
2432
  ws = null;
2421
2433
  keepaliveTimeout = null;
2422
2434
  // Pre-allocated keepalive response message to avoid allocation per keepalive
@@ -2434,8 +2446,8 @@ class Ua {
2434
2446
  return new Promise((n, s) => {
2435
2447
  try {
2436
2448
  this.ws = new WebSocket(e), this.ws.binaryType = "arraybuffer";
2437
- } catch (u) {
2438
- s(new W(`Failed to create WebSocket: ${u}`, u instanceof Error ? u : void 0));
2449
+ } catch (l) {
2450
+ s(new W(`Failed to create WebSocket: ${l}`, l instanceof Error ? l : void 0));
2439
2451
  return;
2440
2452
  }
2441
2453
  let i = !1, o = !1;
@@ -2443,20 +2455,20 @@ class Ua {
2443
2455
  clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
2444
2456
  }, c = setTimeout(() => {
2445
2457
  o || (o = !0, a(), this.ws?.close(), s(new W("WebSocket connection timeout")));
2446
- }, ka);
2458
+ }, Da);
2447
2459
  this.ws.onopen = () => {
2448
2460
  i = !0, clearTimeout(c), this.ws.send(r), this.resetKeepaliveTimeout(), o || (o = !0, n());
2449
2461
  }, this.ws.onerror = () => {
2450
2462
  clearTimeout(c), oe.error("WebSocket error"), o || (o = !0, a(), s(new W("WebSocket connection failed")));
2451
- }, this.ws.onclose = (u) => {
2463
+ }, this.ws.onclose = (l) => {
2452
2464
  if (this.clearKeepaliveTimeout(), !i && !o) {
2453
2465
  o = !0, a(), s(new W("WebSocket connection closed before opening"));
2454
2466
  return;
2455
2467
  }
2456
- const f = u.wasClean && (u.code === 1e3 || u.code === 1001), d = u.code === 1e3 || u.code === 1001, h = u.reason || `code=${u.code}`;
2468
+ const f = l.wasClean && (l.code === 1e3 || l.code === 1001), d = l.code === 1e3 || l.code === 1001, h = l.reason || `code=${l.code}`;
2457
2469
  this.callbacks.onClose(h, f, d);
2458
- }, this.ws.onmessage = (u) => {
2459
- this.handleProtocolMessage(new Uint8Array(u.data));
2470
+ }, this.ws.onmessage = (l) => {
2471
+ this.handleProtocolMessage(new Uint8Array(l.data));
2460
2472
  };
2461
2473
  });
2462
2474
  }
@@ -2470,7 +2482,7 @@ class Ua {
2470
2482
  * Get or create a cached keepalive response message.
2471
2483
  */
2472
2484
  getKeepaliveResponse() {
2473
- return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = fr(dr(), this.sessionId)), this.keepaliveResponseMessage;
2485
+ return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = pr(Er(), this.sessionId)), this.keepaliveResponseMessage;
2474
2486
  }
2475
2487
  handleProtocolMessage(e) {
2476
2488
  try {
@@ -2485,18 +2497,18 @@ class Ua {
2485
2497
  }
2486
2498
  resetKeepaliveTimeout() {
2487
2499
  this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
2488
- oe.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new We(this.keepaliveTimeoutMs)), this.close();
2500
+ oe.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new Ke(this.keepaliveTimeoutMs)), this.close();
2489
2501
  }, this.keepaliveTimeoutMs);
2490
2502
  }
2491
2503
  clearKeepaliveTimeout() {
2492
2504
  this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
2493
2505
  }
2494
2506
  }
2495
- const B = L("WebTransportTransport"), Qe = 4, Da = 65536;
2496
- function mr() {
2507
+ const B = L("WebTransportTransport"), Ze = 4, Oa = 65536;
2508
+ function Tr() {
2497
2509
  return typeof WebTransport < "u";
2498
2510
  }
2499
- class Ma {
2511
+ class La {
2500
2512
  transport = null;
2501
2513
  stream = null;
2502
2514
  reader = null;
@@ -2504,7 +2516,7 @@ class Ma {
2504
2516
  keepaliveTimeout = null;
2505
2517
  readLoopActive = !1;
2506
2518
  // Grow-only receive buffer with offset/length tracking to minimize allocations
2507
- receiveBuffer = new Uint8Array(Da);
2519
+ receiveBuffer = new Uint8Array(Oa);
2508
2520
  receiveBufferOffset = 0;
2509
2521
  receiveBufferLength = 0;
2510
2522
  // Cached DataView to avoid allocation per message
@@ -2522,7 +2534,7 @@ class Ma {
2522
2534
  return this.transport !== null && this.writer !== null;
2523
2535
  }
2524
2536
  async connect(e, r) {
2525
- if (!mr())
2537
+ if (!Tr())
2526
2538
  throw new W("WebTransport is not supported in this browser");
2527
2539
  try {
2528
2540
  this.transport = new WebTransport(e), await this.transport.ready, B.debug(`Connected to WebTransport entrypoint: ${e}`), this.transport.closed.then(() => {
@@ -2589,7 +2601,7 @@ class Ma {
2589
2601
  * Get or create a cached keepalive response message.
2590
2602
  */
2591
2603
  getKeepaliveResponse() {
2592
- return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = fr(dr(), this.sessionId)), this.keepaliveResponseMessage;
2604
+ return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = pr(Er(), this.sessionId)), this.keepaliveResponseMessage;
2593
2605
  }
2594
2606
  /**
2595
2607
  * Process complete messages from the receive buffer.
@@ -2598,9 +2610,9 @@ class Ma {
2598
2610
  */
2599
2611
  processBufferedMessages() {
2600
2612
  const e = this.getReceiveDataView();
2601
- for (; this.receiveBufferLength >= Qe; ) {
2613
+ for (; this.receiveBufferLength >= Ze; ) {
2602
2614
  const r = e.getUint32(this.receiveBufferOffset, !0);
2603
- if (r < Qe) {
2615
+ if (r < Ze) {
2604
2616
  B.error(`Invalid message length: ${r}`), this.callbacks.onError(new Error(`Invalid protocol message length: ${r}`)), this.receiveBufferOffset = 0, this.receiveBufferLength = 0;
2605
2617
  return;
2606
2618
  }
@@ -2636,7 +2648,7 @@ class Ma {
2636
2648
  */
2637
2649
  resetKeepaliveTimeout() {
2638
2650
  this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
2639
- B.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new We(this.keepaliveTimeoutMs)), this.close();
2651
+ B.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new Ke(this.keepaliveTimeoutMs)), this.close();
2640
2652
  }, this.keepaliveTimeoutMs);
2641
2653
  }
2642
2654
  /**
@@ -2659,7 +2671,7 @@ class Ma {
2659
2671
  }
2660
2672
  }
2661
2673
  const ee = L("Channel");
2662
- class Oa {
2674
+ class va {
2663
2675
  state = "disconnected";
2664
2676
  transport = null;
2665
2677
  config;
@@ -2736,13 +2748,13 @@ class Oa {
2736
2748
  switch (e.Type) {
2737
2749
  case k.WebSocket:
2738
2750
  case k.WebSocketProxy:
2739
- this.transport = new Ua(r);
2751
+ this.transport = new Ma(r);
2740
2752
  break;
2741
2753
  case k.WebTransport:
2742
2754
  case k.WebTransportProxy:
2743
- if (!mr())
2755
+ if (!Tr())
2744
2756
  throw new Error("WebTransport is not supported in this browser");
2745
- this.transport = new Ma(r);
2757
+ this.transport = new La(r);
2746
2758
  break;
2747
2759
  default:
2748
2760
  throw new Error(`Unsupported entrypoint type: ${k[e.Type]}`);
@@ -2774,7 +2786,7 @@ class Oa {
2774
2786
  * Handle transport error.
2775
2787
  */
2776
2788
  handleError(e) {
2777
- ee.error("Channel error:", e), this.config.onError?.(e), e instanceof We && this.handleClose("Keepalive timeout", !1);
2789
+ ee.error("Channel error:", e), this.config.onError?.(e), e instanceof Ke && this.handleClose("Keepalive timeout", !1);
2778
2790
  }
2779
2791
  /**
2780
2792
  * Update and notify state change.
@@ -2783,8 +2795,8 @@ class Oa {
2783
2795
  this.state !== e && (this.state = e, this.config.onStateChange?.(e));
2784
2796
  }
2785
2797
  }
2786
- const G = L("ChannelManager");
2787
- class La {
2798
+ const x = L("ChannelManager");
2799
+ class Pa {
2788
2800
  channels = /* @__PURE__ */ new Map();
2789
2801
  // keyed by opcode group
2790
2802
  activeType = null;
@@ -2834,7 +2846,7 @@ class La {
2834
2846
  s.send(e);
2835
2847
  return;
2836
2848
  }
2837
- G.warn("No channel found for message");
2849
+ x.warn("No channel found for message");
2838
2850
  }
2839
2851
  /**
2840
2852
  * Send a protocol message to all channels (for broadcast messages).
@@ -2865,10 +2877,10 @@ class La {
2865
2877
  await this.connectAllChannels(i), this.config.endpointSelector?.rememberWorkingType(s), this.config.onRememberWorkingType?.(s), this.activeType = s, this.reconnectAttempts = 0, this.setState("connected");
2866
2878
  return;
2867
2879
  } catch (o) {
2868
- G.warn(`Failed to connect using ${k[s]}: ${o}`), this.disconnectAll();
2880
+ x.warn(`Failed to connect using ${k[s]}: ${o}`), this.disconnectAll();
2869
2881
  }
2870
2882
  }
2871
- throw G.error("All endpoint types failed"), e || this.setState("offline"), new Error("Failed to connect using any endpoint type");
2883
+ throw x.error("All endpoint types failed"), e || this.setState("offline"), new Error("Failed to connect using any endpoint type");
2872
2884
  }
2873
2885
  /**
2874
2886
  * Connect all channels for a given endpoint type in parallel.
@@ -2886,7 +2898,7 @@ class La {
2886
2898
  * Connect a single channel.
2887
2899
  */
2888
2900
  async connectChannel(e) {
2889
- const r = new Oa({
2901
+ const r = new va({
2890
2902
  entrypoint: e,
2891
2903
  sessionId: this.config.sessionId,
2892
2904
  keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
@@ -2928,10 +2940,10 @@ class La {
2928
2940
  handleChannelClose(e, r, n, s) {
2929
2941
  if (!(this.state === "idle" || this.state === "stopped" || this.state === "offline")) {
2930
2942
  if (n || s) {
2931
- G.debug("Channel closed by server"), this.shouldReconnect = !1, this.disconnectAll(), this.setState("stopped");
2943
+ x.debug("Channel closed by server"), this.shouldReconnect = !1, this.disconnectAll(), this.setState("stopped");
2932
2944
  return;
2933
2945
  }
2934
- this.state === "connected" && (G.error("Channel closed unexpectedly, attempting reconnect"), this.disconnectAll(), this.attemptReconnect());
2946
+ this.state === "connected" && (x.error("Channel closed unexpectedly, attempting reconnect"), this.disconnectAll(), this.attemptReconnect());
2935
2947
  }
2936
2948
  }
2937
2949
  /**
@@ -2941,16 +2953,16 @@ class La {
2941
2953
  if (!this.shouldReconnect)
2942
2954
  return;
2943
2955
  if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
2944
- G.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Na(this.config.maxReconnectAttempts));
2956
+ x.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Ca(this.config.maxReconnectAttempts));
2945
2957
  return;
2946
2958
  }
2947
2959
  this.setState("reconnecting"), this.reconnectAttempts++;
2948
2960
  const e = this.config.reconnectBackoffMs * Math.pow(2, this.reconnectAttempts - 1);
2949
- if (G.info(`Reconnecting in ${e}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await pr(e, this.abortController?.signal), !!this.shouldReconnect)
2961
+ if (x.info(`Reconnecting in ${e}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await mr(e, this.abortController?.signal), !!this.shouldReconnect)
2950
2962
  try {
2951
2963
  await this.connectInternal(!0);
2952
2964
  } catch (r) {
2953
- G.error("Reconnect failed:", r), await this.attemptReconnect();
2965
+ x.error("Reconnect failed:", r), await this.attemptReconnect();
2954
2966
  }
2955
2967
  }
2956
2968
  /**
@@ -2968,25 +2980,25 @@ class La {
2968
2980
  this.state !== e && (this.state = e, this.config.onStateChange?.(e));
2969
2981
  }
2970
2982
  }
2971
- const va = 5e3, Pa = 3e4, Ze = 35e3, qe = 500, et = 6, _r = 6e4, Ce = "ikon_device_id";
2972
- function $e() {
2983
+ const Fa = 5e3, Ba = 3e4, qe = 35e3, et = 500, tt = 6, Sr = 6e4, Re = "ikon_device_id";
2984
+ function Ye() {
2973
2985
  if (typeof window > "u" || typeof localStorage > "u")
2974
2986
  return crypto.randomUUID();
2975
2987
  try {
2976
- let t = localStorage.getItem(Ce);
2977
- return t || (t = crypto.randomUUID(), localStorage.setItem(Ce, t)), t;
2988
+ let t = localStorage.getItem(Re);
2989
+ return t || (t = crypto.randomUUID(), localStorage.setItem(Re, t)), t;
2978
2990
  } catch {
2979
2991
  return crypto.randomUUID();
2980
2992
  }
2981
2993
  }
2982
- function Al() {
2994
+ function gl() {
2983
2995
  if (!(typeof localStorage > "u"))
2984
2996
  try {
2985
- localStorage.removeItem(Ce);
2997
+ localStorage.removeItem(Re);
2986
2998
  } catch {
2987
2999
  }
2988
3000
  }
2989
- function yl(t) {
3001
+ function Cl(t) {
2990
3002
  try {
2991
3003
  const e = t.split(".");
2992
3004
  return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
@@ -2994,26 +3006,26 @@ function yl(t) {
2994
3006
  return null;
2995
3007
  }
2996
3008
  }
2997
- const Ee = {}, be = "https://api.prod.ikon.live", pe = "https://api.dev.ikon.live", tt = "https://auth.ikonai.com", rt = "https://auth.dev.ikonai.com", Nl = "https://auth.ikonai.com";
2998
- function Tr(t) {
2999
- return t === "development" ? pe : be;
3009
+ const Ee = {}, ke = "https://api.prod.ikon.live", pe = "https://api.dev.ikon.live", rt = "https://auth.ikonai.com", nt = "https://auth.dev.ikonai.com", bl = "https://auth.ikonai.com";
3010
+ function wr(t) {
3011
+ return t === "development" ? pe : ke;
3000
3012
  }
3001
- function gl() {
3013
+ function Rl() {
3002
3014
  const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
3003
- return t || (typeof window > "u" ? be : !Ke() || window.location.hostname.includes(".dev.") ? pe : be);
3015
+ return t || (typeof window > "u" ? ke : !je() || window.location.hostname.includes(".dev.") ? pe : ke);
3004
3016
  }
3005
- function Cl() {
3017
+ function kl() {
3006
3018
  const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_TYPE : void 0;
3007
3019
  if (t === "development" || t === "production")
3008
3020
  return t;
3009
3021
  const e = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
3010
- return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : Ke() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
3022
+ return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : je() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
3011
3023
  }
3012
- function bl() {
3024
+ function Ul() {
3013
3025
  const t = typeof import.meta < "u" ? Ee?.VITE_IKON_AUTH_URL : void 0;
3014
- return t || (typeof window > "u" ? tt : !Ke() || window.location.hostname.includes(".dev.") ? rt : tt);
3026
+ return t || (typeof window > "u" ? rt : !je() || window.location.hostname.includes(".dev.") ? nt : rt);
3015
3027
  }
3016
- function Sr() {
3028
+ function Ar() {
3017
3029
  if (typeof window > "u")
3018
3030
  return {};
3019
3031
  const t = new URLSearchParams(window.location.search), e = {};
@@ -3021,8 +3033,8 @@ function Sr() {
3021
3033
  e[r] = n;
3022
3034
  return e;
3023
3035
  }
3024
- const Fa = ["ikon_token", "ikon_provider", "error"];
3025
- function Rl() {
3036
+ const xa = ["ikon_token", "ikon_provider", "error"];
3037
+ function Dl() {
3026
3038
  if (typeof window > "u")
3027
3039
  return { parameters: {} };
3028
3040
  const t = window.location.pathname;
@@ -3032,12 +3044,12 @@ function Rl() {
3032
3044
  const s = t.match(/^\/c\/([^/]+)/);
3033
3045
  if (s && (r = decodeURIComponent(s[1])), e && r)
3034
3046
  throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
3035
- const i = Sr(), o = {};
3047
+ const i = Ar(), o = {};
3036
3048
  for (const [a, c] of Object.entries(i))
3037
- Fa.includes(a) || (o[a] = c);
3049
+ xa.includes(a) || (o[a] = c);
3038
3050
  return { sessionId: e, channelKey: r, parameters: o };
3039
3051
  }
3040
- function Ke() {
3052
+ function je() {
3041
3053
  if (typeof window > "u") return !1;
3042
3054
  const t = window.location.hostname;
3043
3055
  if (t === "localhost" || t === "127.0.0.1" || t === "::1" || t.startsWith("10.") || t.startsWith("192.168."))
@@ -3049,8 +3061,8 @@ function Ke() {
3049
3061
  }
3050
3062
  return !0;
3051
3063
  }
3052
- const Ie = L("Authenticator"), j = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO, Ba = 1e3, Ga = 5e3;
3053
- async function xa(t) {
3064
+ const Ie = L("Authenticator"), j = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO | S.GROUP_ANALYTICS, Ga = 1e3, Va = 5e3;
3065
+ async function Wa(t) {
3054
3066
  try {
3055
3067
  const e = await fetch(`${pe}/users/me`, {
3056
3068
  credentials: "include",
@@ -3061,7 +3073,7 @@ async function xa(t) {
3061
3073
  return;
3062
3074
  }
3063
3075
  }
3064
- function wr(t, e, r) {
3076
+ function yr(t, e, r) {
3065
3077
  const n = {
3066
3078
  method: "POST",
3067
3079
  headers: {
@@ -3073,56 +3085,56 @@ function wr(t, e, r) {
3073
3085
  };
3074
3086
  return e || (n.credentials = "include"), n;
3075
3087
  }
3076
- async function Ar(t, e, r, n, s, i, o) {
3088
+ async function Nr(t, e, r, n, s, i, o) {
3077
3089
  const a = `${t}/rooms`, c = {
3078
3090
  space: e,
3079
3091
  ...r ? { key: r } : {},
3080
3092
  ...n && Object.keys(n).length > 0 ? { params: n } : {},
3081
3093
  ...s ? { hash: s } : {}
3082
- }, u = await fetch(a, wr(c, i, o));
3083
- if (!u.ok) {
3084
- const d = await u.text().catch(() => "Unknown error");
3085
- throw new y(`Failed to request channel: ${u.status} ${d}`);
3094
+ }, l = await fetch(a, yr(c, i, o));
3095
+ if (!l.ok) {
3096
+ const d = await l.text().catch(() => "Unknown error");
3097
+ throw new y(`Failed to request channel: ${l.status} ${d}`);
3086
3098
  }
3087
- return await u.json();
3099
+ return await l.json();
3088
3100
  }
3089
- async function Va(t, e, r, n) {
3090
- const s = `${t}/rooms/connect`, i = await fetch(s, wr(e, r, n));
3101
+ async function Ha(t, e, r, n) {
3102
+ const s = `${t}/rooms/connect`, i = await fetch(s, yr(e, r, n));
3091
3103
  if (!i.ok) {
3092
3104
  const o = await i.text().catch(() => "Unknown error");
3093
3105
  throw new y(`Backend connect failed: ${i.status} ${o}`);
3094
3106
  }
3095
3107
  return i.json();
3096
3108
  }
3097
- async function yr(t, e, r, n, s) {
3109
+ async function gr(t, e, r, n, s) {
3098
3110
  const i = Date.now();
3099
- let o = Ba;
3111
+ let o = Ga;
3100
3112
  for (; ; ) {
3101
3113
  if (s?.aborted)
3102
3114
  throw new y("Connection aborted");
3103
3115
  if (Date.now() - i >= r)
3104
- throw new ga(r);
3105
- const c = await Va(t, e, n, s), u = c.state?.toLowerCase();
3106
- if (u === "running")
3116
+ throw new ba(r);
3117
+ const c = await Ha(t, e, n, s), l = c.state?.toLowerCase();
3118
+ if (l === "running")
3107
3119
  return c;
3108
- if (u === "provisioning") {
3109
- await pr(o, s), o = Math.min(o * 1.5, Ga);
3120
+ if (l === "provisioning") {
3121
+ await mr(o, s), o = Math.min(o * 1.5, Va);
3110
3122
  continue;
3111
3123
  }
3112
3124
  throw new y(`Unexpected channel state: ${c.state}`);
3113
3125
  }
3114
3126
  }
3115
- async function Ye(t, e) {
3127
+ async function Te(t, e) {
3116
3128
  const r = await fetch(t, { signal: e });
3117
3129
  if (!r.ok) {
3118
3130
  const o = await r.text().catch(() => "Unknown error");
3119
3131
  throw new y(`Failed to connect: ${r.status} ${o}`);
3120
3132
  }
3121
3133
  const n = await r.arrayBuffer(), s = new Uint8Array(n);
3122
- return { authResponse: As(s) };
3134
+ return { authResponse: await Cs(s) };
3123
3135
  }
3124
- function Wa(t, e) {
3125
- return gs({
3136
+ function Ka(t, e) {
3137
+ return ks({
3126
3138
  ServerSessionId: "",
3127
3139
  // Server will fill this in
3128
3140
  ContextType: J.Browser,
@@ -3131,7 +3143,7 @@ function Wa(t, e) {
3131
3143
  IsInternal: !1,
3132
3144
  Description: t.description ?? "Ikon SDK TypeScript",
3133
3145
  UserId: e,
3134
- DeviceId: t.deviceId ?? $e(),
3146
+ DeviceId: t.deviceId ?? Ye(),
3135
3147
  ProductId: t.productId ?? "ikon-sdk",
3136
3148
  VersionId: t.versionId ?? "1.0.0",
3137
3149
  InstallId: t.installId ?? "",
@@ -3149,7 +3161,7 @@ function Wa(t, e) {
3149
3161
  Parameters: t.parameters ?? {}
3150
3162
  });
3151
3163
  }
3152
- function Ha(t) {
3164
+ function $a(t) {
3153
3165
  return {
3154
3166
  ServerSessionId: t.ServerSessionId,
3155
3167
  ContextType: t.ContextType,
@@ -3176,13 +3188,13 @@ function Ha(t) {
3176
3188
  Parameters: t.Parameters
3177
3189
  };
3178
3190
  }
3179
- async function $a(t, e) {
3191
+ async function Ya(t, e) {
3180
3192
  const r = `https://${t.host}:${t.httpsPort}`;
3181
3193
  Ie.debug(`Authenticating with local server: ${r}`);
3182
- const s = { ...Sr(), ...t.parameters };
3194
+ const s = { ...Ar(), ...t.parameters };
3183
3195
  let i = t.userId;
3184
- i || (i = await xa(e), i || (i = "local", Ie.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
3185
- const o = Wa({ ...t, parameters: s }, i), a = Ha(o), c = await fetch(`${r}/connect-token`, {
3196
+ i || (i = await Wa(e), i || (i = "local", Ie.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
3197
+ const o = Ka({ ...t, parameters: s }, i), a = $a(o), c = await fetch(`${r}/connect-token`, {
3186
3198
  method: "POST",
3187
3199
  headers: {
3188
3200
  "Content-Type": "application/json"
@@ -3198,12 +3210,12 @@ async function $a(t, e) {
3198
3210
  if (!f)
3199
3211
  throw new y("Server did not return a token");
3200
3212
  const d = `${r}/connect?token=${encodeURIComponent(f)}`;
3201
- return Ye(d, e);
3213
+ return Te(d, e);
3202
3214
  }
3203
- async function Ka(t, e) {
3215
+ async function ja(t, e) {
3204
3216
  if (t.sessionId && t.channelKey)
3205
3217
  throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
3206
- const r = Tr(t.backendType);
3218
+ const r = wr(t.backendType);
3207
3219
  Ie.debug(`Authenticating with cloud server: ${r}, space ID: ${t.spaceId}`);
3208
3220
  const n = await fetch(`${r}/auth/api-key`, {
3209
3221
  method: "POST",
@@ -3236,13 +3248,13 @@ async function Ka(t, e) {
3236
3248
  throw new y(`Failed to get or create profile: ${o.status} ${h}`);
3237
3249
  }
3238
3250
  const c = {
3239
- code: (await Ar(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e)).code,
3251
+ code: (await Nr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e)).code,
3240
3252
  contextType: J.Plugin,
3241
3253
  userType: t.userType ?? Z.Human,
3242
3254
  clientType: t.clientType ?? X.DesktopWeb,
3243
3255
  payloadType: Q.Teleport,
3244
3256
  description: t.description ?? "Ikon SDK TypeScript",
3245
- deviceId: t.deviceId ?? $e(),
3257
+ deviceId: t.deviceId ?? Ye(),
3246
3258
  productId: t.productId ?? "",
3247
3259
  versionId: t.versionId ?? "",
3248
3260
  installId: t.installId ?? "",
@@ -3254,16 +3266,16 @@ async function Ka(t, e) {
3254
3266
  launchParams: t.parameters,
3255
3267
  hash: t.sessionId,
3256
3268
  waitForRunning: !0
3257
- }, u = t.provisioningTimeoutMs ?? _r, f = await yr(r, c, u, i, e);
3269
+ }, l = t.provisioningTimeoutMs ?? Sr, f = await gr(r, c, l, i, e);
3258
3270
  if (!f.configuration?.url)
3259
3271
  throw new y("Backend did not return a connect URL");
3260
3272
  const d = f.configuration.url;
3261
- return Ye(d, e);
3273
+ return Te(d, e);
3262
3274
  }
3263
- async function Ya(t, e) {
3275
+ async function za(t, e) {
3264
3276
  if (t.sessionId && t.channelKey)
3265
3277
  throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
3266
- const r = Tr(t.backendType), n = t.token;
3278
+ const r = wr(t.backendType), n = t.token;
3267
3279
  Ie.debug(`Authenticating with session token to: ${r}, space ID: ${t.spaceId}`);
3268
3280
  const s = await fetch(`${r}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
3269
3281
  method: "GET",
@@ -3277,13 +3289,13 @@ async function Ya(t, e) {
3277
3289
  throw new y(`Failed to get or create profile: ${s.status} ${f}`);
3278
3290
  }
3279
3291
  const o = {
3280
- code: (await Ar(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, n, e)).code,
3292
+ code: (await Nr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, n, e)).code,
3281
3293
  contextType: J.Browser,
3282
3294
  userType: Z.Human,
3283
3295
  clientType: X.DesktopWeb,
3284
3296
  payloadType: Q.Teleport,
3285
3297
  description: t.description ?? "Ikon SDK TypeScript",
3286
- deviceId: t.deviceId ?? $e(),
3298
+ deviceId: t.deviceId ?? Ye(),
3287
3299
  productId: t.productId ?? "",
3288
3300
  versionId: t.versionId ?? "",
3289
3301
  installId: t.installId ?? "",
@@ -3295,28 +3307,28 @@ async function Ya(t, e) {
3295
3307
  launchParams: t.parameters,
3296
3308
  hash: t.sessionId,
3297
3309
  waitForRunning: !0
3298
- }, a = t.provisioningTimeoutMs ?? _r, c = await yr(r, o, a, n, e);
3310
+ }, a = t.provisioningTimeoutMs ?? Sr, c = await gr(r, o, a, n, e);
3299
3311
  if (!c.configuration?.url)
3300
3312
  throw new y("Backend did not return a connect URL");
3301
- const u = c.configuration.url;
3302
- return Ye(u, e);
3313
+ const l = c.configuration.url;
3314
+ return Te(l, e);
3303
3315
  }
3304
- const Nr = "ikon.theme", Re = "ikon.theme-user", ja = "ikon.theme-change";
3305
- function gr(t) {
3316
+ const Cr = "ikon.theme", Ue = "ikon.theme-user", Xa = "ikon.theme-change";
3317
+ function br(t) {
3306
3318
  typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
3307
3319
  }
3308
- const za = {
3320
+ const Ja = {
3309
3321
  name: "ikon.client.getTheme",
3310
3322
  description: "Get the currently selected client theme",
3311
3323
  returnType: { kind: "string", nullable: !0 }
3312
3324
  };
3313
- function Xa() {
3325
+ function Qa() {
3314
3326
  if (typeof window > "u" || !window.localStorage)
3315
3327
  return null;
3316
- const t = window.localStorage.getItem(Re) ?? window.localStorage.getItem(Nr) ?? "light";
3317
- return gr(t), t;
3328
+ const t = window.localStorage.getItem(Ue) ?? window.localStorage.getItem(Cr) ?? "light";
3329
+ return br(t), t;
3318
3330
  }
3319
- const Ja = {
3331
+ const Za = {
3320
3332
  name: "ikon.client.setTheme",
3321
3333
  description: "Update the client UI theme",
3322
3334
  returnType: { kind: "boolean" },
@@ -3325,49 +3337,49 @@ const Ja = {
3325
3337
  { name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
3326
3338
  ]
3327
3339
  };
3328
- function Qa(t, e) {
3340
+ function qa(t, e) {
3329
3341
  if (typeof window > "u" || !window.localStorage || typeof t != "string")
3330
3342
  return !1;
3331
3343
  const r = t.trim().toLowerCase();
3332
3344
  if (!r)
3333
3345
  return !1;
3334
3346
  const n = e === void 0 ? !0 : !!e, s = window.localStorage;
3335
- n ? s.setItem(Re, r) : s.removeItem(Re), s.setItem(Nr, r);
3347
+ n ? s.setItem(Ue, r) : s.removeItem(Ue), s.setItem(Cr, r);
3336
3348
  try {
3337
- window.dispatchEvent(new CustomEvent(ja, { detail: { mode: r } }));
3349
+ window.dispatchEvent(new CustomEvent(Xa, { detail: { mode: r } }));
3338
3350
  } catch {
3339
3351
  }
3340
- return gr(r), !0;
3352
+ return br(r), !0;
3341
3353
  }
3342
- const Za = {
3354
+ const ec = {
3343
3355
  name: "ikon.client.getLanguage",
3344
3356
  description: "Get the browser language preference",
3345
3357
  returnType: { kind: "string" }
3346
3358
  };
3347
- function qa() {
3359
+ function tc() {
3348
3360
  return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
3349
3361
  }
3350
- const ec = {
3362
+ const rc = {
3351
3363
  name: "ikon.client.getTimezone",
3352
3364
  description: "Get the browser timezone (IANA format)",
3353
3365
  returnType: { kind: "string" }
3354
3366
  };
3355
- function tc() {
3367
+ function nc() {
3356
3368
  try {
3357
3369
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
3358
3370
  } catch {
3359
3371
  return "UTC";
3360
3372
  }
3361
3373
  }
3362
- const rc = {
3374
+ const sc = {
3363
3375
  name: "ikon.client.getUrl",
3364
3376
  description: "Get the current browser URL path and query string",
3365
3377
  returnType: { kind: "string", nullable: !0 }
3366
3378
  };
3367
- function nc() {
3379
+ function ic() {
3368
3380
  return typeof window > "u" ? null : window.location.pathname + window.location.search;
3369
3381
  }
3370
- const sc = {
3382
+ const oc = {
3371
3383
  name: "ikon.client.setUrl",
3372
3384
  description: "Update the browser URL without triggering a page reload",
3373
3385
  returnType: { kind: "boolean" },
@@ -3376,7 +3388,7 @@ const sc = {
3376
3388
  { name: "replace", type: { kind: "boolean", nullable: !0 }, description: "If true, replaces current history entry instead of adding new one" }
3377
3389
  ]
3378
3390
  };
3379
- function ic(t, e) {
3391
+ function ac(t, e) {
3380
3392
  if (typeof window > "u" || !window.history || typeof t != "string")
3381
3393
  return !1;
3382
3394
  const r = t.trim();
@@ -3388,13 +3400,13 @@ function ic(t, e) {
3388
3400
  return !1;
3389
3401
  }
3390
3402
  }
3391
- const oc = {
3403
+ const cc = {
3392
3404
  name: "ikon.client.vibrate",
3393
3405
  description: "Trigger haptic feedback on supported devices",
3394
3406
  returnType: { kind: "boolean" },
3395
3407
  parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
3396
3408
  };
3397
- function ac(t) {
3409
+ function lc(t) {
3398
3410
  if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
3399
3411
  return !1;
3400
3412
  try {
@@ -3405,13 +3417,13 @@ function ac(t) {
3405
3417
  }
3406
3418
  }
3407
3419
  let te = null;
3408
- const cc = {
3420
+ const uc = {
3409
3421
  name: "ikon.client.keepScreenAwake",
3410
3422
  description: "Prevent or allow the screen to sleep",
3411
3423
  returnType: { kind: "boolean" },
3412
3424
  parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
3413
3425
  };
3414
- async function lc(t) {
3426
+ async function hc(t) {
3415
3427
  if (typeof navigator > "u" || !("wakeLock" in navigator))
3416
3428
  return !1;
3417
3429
  try {
@@ -3420,15 +3432,15 @@ async function lc(t) {
3420
3432
  return !1;
3421
3433
  }
3422
3434
  }
3423
- const uc = {
3435
+ const dc = {
3424
3436
  name: "ikon.client.getVisibility",
3425
3437
  description: "Get the current page visibility state",
3426
3438
  returnType: { kind: "string", nullable: !0 }
3427
3439
  };
3428
- function hc() {
3440
+ function fc() {
3429
3441
  return typeof document > "u" ? null : document.visibilityState || null;
3430
3442
  }
3431
- const dc = {
3443
+ const Ec = {
3432
3444
  name: "ikon.client.scrollTo",
3433
3445
  description: "Scroll the page to a specific position",
3434
3446
  returnType: { kind: "boolean" },
@@ -3438,7 +3450,7 @@ const dc = {
3438
3450
  { name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
3439
3451
  ]
3440
3452
  };
3441
- function fc(t, e, r) {
3453
+ function pc(t, e, r) {
3442
3454
  if (typeof window > "u" || typeof t != "number" || typeof e != "number")
3443
3455
  return !1;
3444
3456
  try {
@@ -3451,12 +3463,12 @@ function fc(t, e, r) {
3451
3463
  return !1;
3452
3464
  }
3453
3465
  }
3454
- const Ec = {
3466
+ const Ic = {
3455
3467
  name: "ikon.client.getBatteryLevel",
3456
3468
  description: "Get the current battery level (0-100)",
3457
3469
  returnType: { kind: "number", nullable: !0 }
3458
3470
  };
3459
- async function pc() {
3471
+ async function mc() {
3460
3472
  if (typeof navigator > "u" || !("getBattery" in navigator))
3461
3473
  return null;
3462
3474
  try {
@@ -3466,19 +3478,18 @@ async function pc() {
3466
3478
  return null;
3467
3479
  }
3468
3480
  }
3469
- const Ic = {
3481
+ const _c = {
3470
3482
  name: "ikon.client.getNetworkType",
3471
3483
  description: "Get the current network connection type",
3472
3484
  returnType: { kind: "string", nullable: !0 }
3473
3485
  };
3474
- function mc() {
3486
+ function Tc() {
3475
3487
  if (typeof navigator > "u")
3476
3488
  return null;
3477
3489
  const t = navigator.connection;
3478
3490
  return t && (t.effectiveType || t.type) || null;
3479
3491
  }
3480
- const _c = [
3481
- { definition: za, handler: Xa },
3492
+ const Sc = [
3482
3493
  { definition: Ja, handler: Qa },
3483
3494
  { definition: Za, handler: qa },
3484
3495
  { definition: ec, handler: tc },
@@ -3489,16 +3500,17 @@ const _c = [
3489
3500
  { definition: uc, handler: hc },
3490
3501
  { definition: dc, handler: fc },
3491
3502
  { definition: Ec, handler: pc },
3492
- { definition: Ic, handler: mc }
3503
+ { definition: Ic, handler: mc },
3504
+ { definition: _c, handler: Tc }
3493
3505
  ];
3494
- function Tc(t) {
3495
- const e = _c.map(({ definition: r, handler: n }) => t.register(r, n));
3506
+ function wc(t) {
3507
+ const e = Sc.map(({ definition: r, handler: n }) => t.register(r, n));
3496
3508
  return () => e.forEach((r) => r());
3497
3509
  }
3498
- function nt() {
3510
+ function st() {
3499
3511
  return typeof window < "u" && typeof navigator < "u";
3500
3512
  }
3501
- const Sc = new Uint8Array(0);
3513
+ const Ac = new Uint8Array(0);
3502
3514
  function me(t) {
3503
3515
  switch (t.kind) {
3504
3516
  case "array":
@@ -3537,7 +3549,7 @@ function re(t) {
3537
3549
  return t;
3538
3550
  }
3539
3551
  }
3540
- function st(t, e) {
3552
+ function it(t, e) {
3541
3553
  if (t === void 0 || t === "")
3542
3554
  return;
3543
3555
  const r = JSON.parse(t);
@@ -3548,7 +3560,7 @@ function st(t, e) {
3548
3560
  }
3549
3561
  return r;
3550
3562
  }
3551
- function Cr(t, e) {
3563
+ function Rr(t, e) {
3552
3564
  if (t === void 0)
3553
3565
  return "null";
3554
3566
  if (t === null) {
@@ -3558,9 +3570,9 @@ function Cr(t, e) {
3558
3570
  }
3559
3571
  return JSON.stringify(t);
3560
3572
  }
3561
- function wc(t, e) {
3573
+ function yc(t, e) {
3562
3574
  const r = (t.parameters ?? []).map((i) => {
3563
- const o = me(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Cr(i.defaultValue, o) : "";
3575
+ const o = me(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Rr(i.defaultValue, o) : "";
3564
3576
  return {
3565
3577
  name: i.name,
3566
3578
  descriptor: o,
@@ -3585,7 +3597,7 @@ function wc(t, e) {
3585
3597
  TypeName: re(i.descriptor),
3586
3598
  HasDefaultValue: i.hasDefaultValue,
3587
3599
  DefaultValueJson: i.defaultValueJson,
3588
- DefaultValueData: Sc,
3600
+ DefaultValueData: Ac,
3589
3601
  IsEnumerable: !1,
3590
3602
  EnumerableItemTypeName: "",
3591
3603
  Description: i.description ?? ""
@@ -3599,11 +3611,11 @@ function wc(t, e) {
3599
3611
  returnType: n
3600
3612
  };
3601
3613
  }
3602
- const it = L("FunctionRegistry"), Ac = new Uint8Array(0);
3603
- function yc(t) {
3614
+ const we = L("FunctionRegistry"), Nc = new Uint8Array(0);
3615
+ function gc(t) {
3604
3616
  return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
3605
3617
  }
3606
- class Nc {
3618
+ class Cc {
3607
3619
  functions = /* @__PURE__ */ new Map();
3608
3620
  config = null;
3609
3621
  isConnected = !1;
@@ -3625,7 +3637,7 @@ class Nc {
3625
3637
  * If already connected, sends registration to server immediately.
3626
3638
  */
3627
3639
  register(e, r) {
3628
- const n = wc(e, r);
3640
+ const n = yc(e, r);
3629
3641
  return this.functions.set(e.name, n), this.isConnected && this.config && this.sendRegistration(n), () => this.unregister(e.name);
3630
3642
  }
3631
3643
  /**
@@ -3659,7 +3671,9 @@ class Nc {
3659
3671
  handleProtocolMessage(e, r) {
3660
3672
  if (r === S.ACTION_FUNCTION_CALL) {
3661
3673
  const n = ne(e);
3662
- return this.handleFunctionCall(e, n.senderId), !0;
3674
+ return this.handleFunctionCall(e, n.senderId).catch((s) => {
3675
+ we.error("Failed to handle function call:", s);
3676
+ }), !0;
3663
3677
  }
3664
3678
  return !1;
3665
3679
  }
@@ -3670,7 +3684,7 @@ class Nc {
3670
3684
  sendAllRegistrations() {
3671
3685
  if (!this.config || this.functions.size === 0)
3672
3686
  return;
3673
- const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = Ci({ Functions: e }), n = Ui(r, this.config.sessionId);
3687
+ const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = Ui({ Functions: e }), n = Li(r, this.config.sessionId);
3674
3688
  this.config.sendProtocolMessage(n);
3675
3689
  }
3676
3690
  /**
@@ -3679,16 +3693,16 @@ class Nc {
3679
3693
  sendRegistration(e) {
3680
3694
  if (!this.config)
3681
3695
  return;
3682
- const r = mi(e.registerPayload, this.config.sessionId);
3696
+ const r = wi(e.registerPayload, this.config.sessionId);
3683
3697
  this.config.sendProtocolMessage(r);
3684
3698
  }
3685
3699
  /**
3686
3700
  * Handle an incoming function call.
3687
3701
  */
3688
- handleFunctionCall(e, r) {
3689
- const n = js(e), s = this.functions.get(n.FunctionName);
3702
+ async handleFunctionCall(e, r) {
3703
+ const n = await Qs(e), s = this.functions.get(n.FunctionName);
3690
3704
  if (!s) {
3691
- it.warn(`Received call for unknown function: ${n.FunctionName}`), this.sendError(n.CallId, n.InstanceId, r, new Error(`Unknown function: ${n.FunctionName}`));
3705
+ we.warn(`Received call for unknown function: ${n.FunctionName}`), this.sendError(n.CallId, n.InstanceId, r, new Error(`Unknown function: ${n.FunctionName}`));
3692
3706
  return;
3693
3707
  }
3694
3708
  this.sendAck(n.CallId, n.InstanceId, r), this.executeFunction(s, n, r);
@@ -3699,17 +3713,17 @@ class Nc {
3699
3713
  async executeFunction(e, r, n) {
3700
3714
  try {
3701
3715
  const s = [];
3702
- for (let u = 0; u < e.parameters.length; u++) {
3703
- const f = e.parameters[u], h = r.Parameters?.[u]?.ValueJson;
3704
- h === void 0 || h === "" ? f.hasDefaultValue ? s.push(st(f.defaultValueJson, f.descriptor)) : s.push(void 0) : s.push(st(h, f.descriptor));
3716
+ for (let l = 0; l < e.parameters.length; l++) {
3717
+ const f = e.parameters[l], h = r.Parameters?.[l]?.ValueJson;
3718
+ h === void 0 || h === "" ? f.hasDefaultValue ? s.push(it(f.defaultValueJson, f.descriptor)) : s.push(void 0) : s.push(it(h, f.descriptor));
3705
3719
  }
3706
3720
  const i = await e.handler(...s);
3707
- let o = i, a = Ac;
3708
- yc(i) && (o = i.value, a = new Uint8Array(i.data));
3709
- const c = Cr(o, e.returnType);
3721
+ let o = i, a = Nc;
3722
+ gc(i) && (o = i.value, a = new Uint8Array(i.data));
3723
+ const c = Rr(o, e.returnType);
3710
3724
  this.sendResult(r.CallId, r.InstanceId, n, e, c, a);
3711
3725
  } catch (s) {
3712
- it.error(`Function ${r.FunctionName} execution failed:`, s), this.sendError(r.CallId, r.InstanceId, n, s instanceof Error ? s : new Error(String(s)));
3726
+ we.error(`Function ${r.FunctionName} execution failed:`, s), this.sendError(r.CallId, r.InstanceId, n, s instanceof Error ? s : new Error(String(s)));
3713
3727
  }
3714
3728
  }
3715
3729
  /**
@@ -3718,7 +3732,7 @@ class Nc {
3718
3732
  sendAck(e, r, n) {
3719
3733
  if (!this.config)
3720
3734
  return;
3721
- const s = Ls(Us({ CallId: e, InstanceId: r }), this.config.sessionId, { targetIds: [n] });
3735
+ const s = Bs(Ls({ CallId: e, InstanceId: r }), this.config.sessionId, { targetIds: [n] });
3722
3736
  this.config.sendProtocolMessage(s);
3723
3737
  }
3724
3738
  /**
@@ -3727,8 +3741,8 @@ class Nc {
3727
3741
  sendResult(e, r, n, s, i, o) {
3728
3742
  if (!this.config)
3729
3743
  return;
3730
- const a = Vi(
3731
- Fi({
3744
+ const a = $i(
3745
+ Vi({
3732
3746
  CallId: e,
3733
3747
  InstanceId: r,
3734
3748
  ResultTypeName: re(s.returnType),
@@ -3746,8 +3760,8 @@ class Nc {
3746
3760
  sendError(e, r, n, s) {
3747
3761
  if (!this.config)
3748
3762
  return;
3749
- const i = hi(
3750
- ai({
3763
+ const i = pi(
3764
+ hi({
3751
3765
  CallId: e,
3752
3766
  InstanceId: r,
3753
3767
  ErrorMessage: s.message,
@@ -3760,10 +3774,10 @@ class Nc {
3760
3774
  this.config.sendProtocolMessage(i);
3761
3775
  }
3762
3776
  }
3763
- function gc(t, e) {
3777
+ function bc(t, e) {
3764
3778
  return { value: t, data: e };
3765
3779
  }
3766
- function Se(t) {
3780
+ function Ae(t) {
3767
3781
  if (!(typeof t != "string" || !t.trim()))
3768
3782
  try {
3769
3783
  return JSON.parse(t);
@@ -3771,55 +3785,55 @@ function Se(t) {
3771
3785
  return;
3772
3786
  }
3773
3787
  }
3774
- const Te = {
3788
+ const Se = {
3775
3789
  StartVideoCapture: "ikon.client.startVideoCapture",
3776
3790
  StartAudioCapture: "ikon.client.startAudioCapture",
3777
3791
  StopCapture: "ikon.client.stopCapture",
3778
3792
  CaptureImage: "ikon.client.captureImage"
3779
- }, Cc = {
3780
- name: Te.StartVideoCapture,
3793
+ }, Rc = {
3794
+ name: Se.StartVideoCapture,
3781
3795
  description: "Start camera or screen capture and stream video frames to the server",
3782
3796
  returnType: { kind: "string" },
3783
3797
  parameters: [
3784
3798
  { name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
3785
3799
  { name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
3786
3800
  ]
3787
- }, bc = {
3788
- name: Te.StartAudioCapture,
3801
+ }, kc = {
3802
+ name: Se.StartAudioCapture,
3789
3803
  description: "Start microphone capture and stream audio frames to the server",
3790
3804
  returnType: { kind: "string" },
3791
3805
  parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
3792
- }, Rc = {
3793
- name: Te.StopCapture,
3806
+ }, Uc = {
3807
+ name: Se.StopCapture,
3794
3808
  description: "Stop a previously started capture by captureId",
3795
3809
  returnType: { kind: "boolean" },
3796
3810
  parameters: [{ name: "captureId", type: { kind: "string" }, description: "Capture ID to stop" }]
3797
- }, kc = {
3798
- name: Te.CaptureImage,
3811
+ }, Dc = {
3812
+ name: Se.CaptureImage,
3799
3813
  description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
3800
3814
  returnType: { kind: "string" },
3801
3815
  parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
3802
3816
  };
3803
- function Uc(t, e) {
3817
+ function Mc(t, e) {
3804
3818
  const r = [];
3805
3819
  return r.push(
3806
- t.register(Cc, async (n, s) => {
3820
+ t.register(Rc, async (n, s) => {
3807
3821
  const i = e.mediaCapture;
3808
3822
  if (!i)
3809
3823
  throw new Error("Media capture is not available in this environment");
3810
- const o = Se(s);
3824
+ const o = Ae(s);
3811
3825
  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;
3812
3826
  })
3813
3827
  ), r.push(
3814
- t.register(bc, async (n) => {
3828
+ t.register(kc, async (n) => {
3815
3829
  const s = e.mediaCapture;
3816
3830
  if (!s)
3817
3831
  throw new Error("Media capture is not available in this environment");
3818
- const i = Se(n);
3832
+ const i = Ae(n);
3819
3833
  return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).captureId;
3820
3834
  })
3821
3835
  ), r.push(
3822
- t.register(Rc, async (n) => {
3836
+ t.register(Uc, async (n) => {
3823
3837
  const s = e.mediaCapture;
3824
3838
  if (!s || typeof n != "string" || !n.trim())
3825
3839
  return !1;
@@ -3827,11 +3841,11 @@ function Uc(t, e) {
3827
3841
  return i || o;
3828
3842
  })
3829
3843
  ), r.push(
3830
- t.register(kc, async (n) => {
3844
+ t.register(Dc, async (n) => {
3831
3845
  const s = e.mediaCapture;
3832
3846
  if (!s)
3833
3847
  throw new Error("Media capture is not available in this environment");
3834
- const i = Se(n) ?? {}, o = await s.image.captureFromCamera({
3848
+ const i = Ae(n) ?? {}, o = await s.image.captureFromCamera({
3835
3849
  userGesture: !1,
3836
3850
  constraints: i.constraints,
3837
3851
  mime: i.mime,
@@ -3839,21 +3853,21 @@ function Uc(t, e) {
3839
3853
  width: i.width,
3840
3854
  height: i.height
3841
3855
  }), a = JSON.stringify({ mime: o.mime, width: o.width, height: o.height });
3842
- return gc(a, o.data);
3856
+ return bc(a, o.data);
3843
3857
  })
3844
3858
  ), () => {
3845
3859
  for (const n of r)
3846
3860
  n();
3847
3861
  };
3848
3862
  }
3849
- const br = () => {
3863
+ const kr = () => {
3850
3864
  if (typeof navigator > "u")
3851
3865
  return !1;
3852
3866
  const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
3853
3867
  return e || r;
3854
- }, Dc = globalThis;
3868
+ }, Oc = globalThis;
3855
3869
  function le() {
3856
- if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" || Dc.crossOriginIsolated === !1)
3870
+ if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" || Oc.crossOriginIsolated === !1)
3857
3871
  return !1;
3858
3872
  try {
3859
3873
  new SharedArrayBuffer(1);
@@ -3862,19 +3876,19 @@ function le() {
3862
3876
  }
3863
3877
  return !0;
3864
3878
  }
3865
- function Rr(t) {
3879
+ function Ur(t) {
3866
3880
  return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
3867
3881
  }
3868
- function Mc(t) {
3882
+ function Lc(t) {
3869
3883
  return new Worker(
3870
- "" + new URL("assets/audio-playback-worker-CGBVb9zd.js", import.meta.url).href,
3884
+ "" + new URL("assets/audio-playback-worker-DPybcm1k.js", import.meta.url).href,
3871
3885
  {
3872
3886
  type: "module",
3873
3887
  name: t?.name
3874
3888
  }
3875
3889
  );
3876
3890
  }
3877
- const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback", Oc = 120, Lc = 300, vc = 4, Pc = 200, Fc = 100, Bc = 8e3, Gc = 10, Ur = 100, ke = 50, Dr = 128, xc = 20, Vc = !0, x = 1500, Wc = -20, Hc = -100, $c = 200, g = L("IkonAudioPlayback"), Kc = () => {
3891
+ const ae = 48e3, R = 2, Dr = 1500, ot = 512, at = "playback", vc = 120, Pc = 300, Fc = 4, Bc = 200, xc = 100, Gc = 8e3, Vc = 10, Mr = 100, De = 50, Or = 128, Wc = 20, Hc = !0, G = 1500, Kc = -20, $c = -100, Yc = 200, g = L("IkonAudioPlayback"), jc = () => {
3878
3892
  if (typeof navigator > "u" || typeof window > "u")
3879
3893
  return !1;
3880
3894
  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;
@@ -3883,22 +3897,22 @@ const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback", Oc = 120, Lc = 300
3883
3897
  enabled: !1,
3884
3898
  statusIntervalMs: 1e3
3885
3899
  };
3886
- function K(t) {
3900
+ function $(t) {
3887
3901
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
3888
3902
  }
3889
- function Yc(t) {
3903
+ function zc(t) {
3890
3904
  return `
3891
3905
  // Audio buffer constants
3892
3906
  const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
3893
3907
  const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
3894
- const BUFFER_TARGET_MIN_MS = ${Oc};
3895
- const BUFFER_TARGET_MAX_MS = ${Lc};
3896
- const JITTER_MULTIPLIER = ${vc};
3897
- const LOCAL_BUFFER_MAX_MS = ${kr};
3898
- const CONTROL_PERIOD_MS = ${Pc};
3899
- const UNDERRUN_JUMP_MS = ${Fc};
3900
- const STABLE_TIME_TO_DECREASE_MS = ${Bc};
3901
- const DECREASE_STEP_MS = ${Gc};
3908
+ const BUFFER_TARGET_MIN_MS = ${vc};
3909
+ const BUFFER_TARGET_MAX_MS = ${Pc};
3910
+ const JITTER_MULTIPLIER = ${Fc};
3911
+ const LOCAL_BUFFER_MAX_MS = ${Dr};
3912
+ const CONTROL_PERIOD_MS = ${Bc};
3913
+ const UNDERRUN_JUMP_MS = ${xc};
3914
+ const STABLE_TIME_TO_DECREASE_MS = ${Gc};
3915
+ const DECREASE_STEP_MS = ${Vc};
3902
3916
  const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
3903
3917
 
3904
3918
  // Pre-computed reciprocals for division-free calculations
@@ -3906,18 +3920,18 @@ const INV_OUTPUT_SAMPLE_RATE_HZ = 1 / OUTPUT_SAMPLE_RATE_HZ;
3906
3920
  const MS_PER_SAMPLE = 1000 * INV_OUTPUT_SAMPLE_RATE_HZ;
3907
3921
 
3908
3922
  // Fade envelope constants
3909
- const FADE_IN_DURATION_MS = ${Ur};
3910
- const FADE_OUT_DURATION_MS = ${ke};
3923
+ const FADE_IN_DURATION_MS = ${Mr};
3924
+ const FADE_OUT_DURATION_MS = ${De};
3911
3925
  const FADE_IN_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_IN_DURATION_MS / 1000);
3912
3926
  const FADE_OUT_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_OUT_DURATION_MS / 1000);
3913
3927
  const FADE_IN_INCREMENT = 1.0 / FADE_IN_DURATION_SAMPLES;
3914
3928
  const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
3915
3929
 
3916
3930
  // Render quantum size (standard Web Audio API value)
3917
- const RENDER_QUANTUM_SIZE = ${Dr};
3931
+ const RENDER_QUANTUM_SIZE = ${Or};
3918
3932
 
3919
3933
  // Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
3920
- const BUFFER_REDUCTION_CROSSFADE_MS = ${xc};
3934
+ const BUFFER_REDUCTION_CROSSFADE_MS = ${Wc};
3921
3935
  const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
3922
3936
  const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
3923
3937
 
@@ -4128,7 +4142,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
4128
4142
  this.statsIntervalSamples = Math.max(1, Math.round((OUTPUT_SAMPLE_RATE_HZ * statusIntervalMs) / 1000));
4129
4143
 
4130
4144
  // Normalization config (hardcoded)
4131
- this.normalizationEnabled = ${Vc};
4145
+ this.normalizationEnabled = ${Hc};
4132
4146
 
4133
4147
  // Stream states for audio buffer
4134
4148
  this.streams = new Map();
@@ -4799,12 +4813,12 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
4799
4813
  registerProcessor('ikon-audio-player', IkonAudioPlayerProcessor);
4800
4814
  `;
4801
4815
  }
4802
- class je {
4816
+ class ze {
4803
4817
  client;
4804
4818
  config;
4805
4819
  enabled = !1;
4806
4820
  stateUnsubscribe = null;
4807
- isMobile = Kc();
4821
+ isMobile = jc();
4808
4822
  boundVisibilityChange = null;
4809
4823
  boundPageHide = null;
4810
4824
  unlockHandler = null;
@@ -4915,7 +4929,7 @@ class je {
4915
4929
  * (e.g., button click/release) to ensure the AudioContext can be recreated.
4916
4930
  */
4917
4931
  requestRecovery() {
4918
- if (this.enabled && br() && this.audioContext) {
4932
+ if (this.enabled && kr() && this.audioContext) {
4919
4933
  this.stopAudioGraph();
4920
4934
  try {
4921
4935
  const e = new AudioContext({
@@ -5016,11 +5030,11 @@ class je {
5016
5030
  const o = r - i.playbackStartContextTime;
5017
5031
  if (o < 0)
5018
5032
  continue;
5019
- const a = o * n * s, c = i.frames, u = i.count, d = (i.head - u + x) % x;
5033
+ const a = o * n * s, c = i.frames, l = i.count, d = (i.head - l + G) % G;
5020
5034
  let h = null, E = null;
5021
- for (let l = 0; l < u; l++) {
5022
- const N = (d + l) % x, w = c[N], v = w.samplePosition + Math.max(w.frameSamples, 1);
5023
- if (w.samplePosition <= a && (h = w), v > a && !E && (E = w, w.samplePosition <= a))
5035
+ for (let u = 0; u < l; u++) {
5036
+ const N = (d + u) % G, A = c[N], v = A.samplePosition + Math.max(A.frameSamples, 1);
5037
+ if (A.samplePosition <= a && (h = A), v > a && !E && (E = A, A.samplePosition <= a))
5024
5038
  break;
5025
5039
  }
5026
5040
  if (!h)
@@ -5032,8 +5046,8 @@ class je {
5032
5046
  return this._visemeResult.mouthOpenY = h.mouthOpenY, this._visemeResult.mouthForm = h.mouthForm, this._visemeResult;
5033
5047
  const I = h.samplePosition, T = Math.max(h.frameSamples, 1), p = I + T;
5034
5048
  if (h !== E && E.samplePosition > h.samplePosition && p > I) {
5035
- const l = Math.min(1, Math.max(0, (a - I) / (p - I)));
5036
- this._visemeResult.mouthOpenY = h.mouthOpenY + l * (E.mouthOpenY - h.mouthOpenY), this._visemeResult.mouthForm = h.mouthForm + l * (E.mouthForm - h.mouthForm);
5049
+ const u = Math.min(1, Math.max(0, (a - I) / (p - I)));
5050
+ this._visemeResult.mouthOpenY = h.mouthOpenY + u * (E.mouthOpenY - h.mouthOpenY), this._visemeResult.mouthForm = h.mouthForm + u * (E.mouthForm - h.mouthForm);
5037
5051
  } else
5038
5052
  this._visemeResult.mouthOpenY = h.mouthOpenY, this._visemeResult.mouthForm = h.mouthForm;
5039
5053
  return this._visemeResult;
@@ -5061,24 +5075,24 @@ class je {
5061
5075
  const a = ae, c = at;
5062
5076
  try {
5063
5077
  this.audioContext = new AudioContext({ sampleRate: a, latencyHint: c });
5064
- } catch (u) {
5078
+ } catch (l) {
5065
5079
  try {
5066
5080
  this.audioContext = new AudioContext({ latencyHint: c });
5067
5081
  } catch (f) {
5068
5082
  try {
5069
5083
  this.audioContext = new AudioContext();
5070
5084
  } catch (d) {
5071
- g.warn(`Failed to create AudioContext: ${K(d)}`), this.audioContext = null;
5085
+ g.warn(`Failed to create AudioContext: ${$(d)}`), this.audioContext = null;
5072
5086
  return;
5073
5087
  }
5074
- g.debug(`AudioContext latencyHint unsupported: ${K(f)}`);
5088
+ g.debug(`AudioContext latencyHint unsupported: ${$(f)}`);
5075
5089
  }
5076
- g.debug(`AudioContext sample rate request unsupported: ${K(u)}`);
5090
+ g.debug(`AudioContext sample rate request unsupported: ${$(l)}`);
5077
5091
  }
5078
5092
  this.outputSampleRateHz = this.audioContext.sampleRate || ae, this.outputSampleRateHz !== a && g.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
5079
5093
  }
5080
5094
  const n = this.audioContext, s = this.resolveDiagnosticsConfig();
5081
- if ((this.config.performance?.preferAudioWorklet ?? !0) && Rr(n)) {
5095
+ if ((this.config.performance?.preferAudioWorklet ?? !0) && Ur(n)) {
5082
5096
  await this.ensureAudioWorklet(n, s, e, r);
5083
5097
  return;
5084
5098
  }
@@ -5128,9 +5142,9 @@ class je {
5128
5142
  setupMediaSession() {
5129
5143
  if (!(typeof document > "u")) {
5130
5144
  if (!this.silentAudioElement) {
5131
- const s = new ArrayBuffer(882044), i = new DataView(s), o = (u, f) => {
5145
+ const s = new ArrayBuffer(882044), i = new DataView(s), o = (l, f) => {
5132
5146
  for (let d = 0; d < f.length; d++)
5133
- i.setUint8(u + d, f.charCodeAt(d));
5147
+ i.setUint8(l + d, f.charCodeAt(d));
5134
5148
  };
5135
5149
  o(0, "RIFF"), i.setUint32(4, 36 + 441e3 * 2, !0), o(8, "WAVE"), o(12, "fmt "), i.setUint32(16, 16, !0), i.setUint16(20, 1, !0), i.setUint16(22, 1, !0), i.setUint32(24, 44100, !0), i.setUint32(28, 44100 * 2, !0), i.setUint16(32, 2, !0), i.setUint16(34, 16, !0), o(36, "data"), i.setUint32(40, 441e3 * 2, !0);
5136
5150
  const a = new Blob([s], { type: "audio/wav" }), c = URL.createObjectURL(a);
@@ -5217,7 +5231,7 @@ class je {
5217
5231
  */
5218
5232
  async resumeWithTimeout(e) {
5219
5233
  const r = e.resume(), n = new Promise((s, i) => {
5220
- setTimeout(() => i(new Error("AudioContext.resume() timed out")), je.RESUME_TIMEOUT_MS);
5234
+ setTimeout(() => i(new Error("AudioContext.resume() timed out")), ze.RESUME_TIMEOUT_MS);
5221
5235
  });
5222
5236
  await Promise.race([r, n]);
5223
5237
  }
@@ -5238,10 +5252,10 @@ class je {
5238
5252
  URL.revokeObjectURL(this.workletModuleUrl);
5239
5253
  } catch {
5240
5254
  }
5241
- this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([Yc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: R })], { type: "text/javascript" }));
5255
+ this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([zc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: R })], { type: "text/javascript" }));
5242
5256
  }
5243
5257
  this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((f) => {
5244
- throw g.warn(`Failed to load AudioWorklet module, falling back: ${K(f)}`), f;
5258
+ throw g.warn(`Failed to load AudioWorklet module, falling back: ${$(f)}`), f;
5245
5259
  }));
5246
5260
  try {
5247
5261
  await this.workletReady;
@@ -5280,49 +5294,49 @@ class je {
5280
5294
  const c = this.pendingWorkletMessages.splice(0);
5281
5295
  for (const f of c)
5282
5296
  this.postToWorklet(f);
5283
- const u = this.getContextState(e) === "running";
5284
- this.notifyPlaybackActive(u);
5297
+ const l = this.getContextState(e) === "running";
5298
+ this.notifyPlaybackActive(l);
5285
5299
  }
5286
5300
  ensureScriptProcessor(e, r) {
5287
5301
  if (this.scriptProcessorNode)
5288
5302
  return;
5289
5303
  this.stopAudioWorklet(), this.pendingWorkletMessages = [];
5290
- const n = 1024, s = new Float32Array(n * R), i = Math.round(this.outputSampleRateHz * Ur / 1e3), o = Math.round(this.outputSampleRateHz * ke / 1e3), a = 1 / i, c = 1 / o, u = new Array(R), f = [], d = e.createScriptProcessor(n, 0, R);
5304
+ const n = 1024, s = new Float32Array(n * R), i = Math.round(this.outputSampleRateHz * Mr / 1e3), o = Math.round(this.outputSampleRateHz * De / 1e3), a = 1 / i, c = 1 / o, l = new Array(R), f = [], d = e.createScriptProcessor(n, 0, R);
5291
5305
  d.onaudioprocess = (h) => {
5292
5306
  const E = h.outputBuffer, m = E.numberOfChannels, I = E.length;
5293
5307
  for (let p = 0; p < m; p++) {
5294
- const l = E.getChannelData(p);
5295
- l.fill(0), u[p] = l;
5308
+ const u = E.getChannelData(p);
5309
+ u.fill(0), l[p] = u;
5296
5310
  }
5297
5311
  let T = 0;
5298
5312
  f.length = 0;
5299
- for (const [p, l] of this.fallbackQueues.entries()) {
5300
- l.totalSamples > 0 && (T += 1), (l.ending || l.inputDrained) && l.fadeDirection !== "out" && l.totalSamples / m * 1e3 / this.outputSampleRateHz <= ke * 2 && (l.fadeDirection = "out"), this.readFromFallbackQueue(l, s), (l.totalSamples > 0 || !l.hasLastOut) && ((!l.lastOut || l.lastOut.length !== s.length) && (l.lastOut = new Float32Array(s.length)), l.lastOut.set(s), l.hasLastOut = !0);
5301
- for (let w = 0; w < I; w++) {
5302
- l.fadeDirection === "in" ? (l.fadeGain = Math.min(1, l.fadeGain + a), l.fadeGain >= 1 && (l.fadeDirection = "none")) : l.fadeDirection === "out" && (l.fadeGain = Math.max(0, l.fadeGain - c), l.fadeGain <= 0 && (l.fadeDirection = "none"));
5313
+ for (const [p, u] of this.fallbackQueues.entries()) {
5314
+ u.totalSamples > 0 && (T += 1), (u.ending || u.inputDrained) && u.fadeDirection !== "out" && u.totalSamples / m * 1e3 / this.outputSampleRateHz <= De * 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);
5315
+ for (let A = 0; A < I; A++) {
5316
+ 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"));
5303
5317
  for (let v = 0; v < m; v++) {
5304
- const M = s[w * m + v];
5305
- u[v][w] += M * l.fadeGain;
5318
+ const M = s[A * m + v];
5319
+ l[v][A] += M * u.fadeGain;
5306
5320
  }
5307
5321
  }
5308
- const N = l.ending || l.inputDrained;
5309
- if (N && l.totalSamples <= 0) {
5310
- if (l.fadeDirection === "out" && l.fadeGain > 1e-3) {
5311
- for (let w = 0; w < I; w++)
5312
- if (l.fadeGain = Math.max(0, l.fadeGain - c), l.fadeGain <= 1e-3) {
5313
- l.fadeGain = 0, l.fadeDirection = "none";
5322
+ const N = u.ending || u.inputDrained;
5323
+ if (N && u.totalSamples <= 0) {
5324
+ if (u.fadeDirection === "out" && u.fadeGain > 1e-3) {
5325
+ for (let A = 0; A < I; A++)
5326
+ if (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 1e-3) {
5327
+ u.fadeGain = 0, u.fadeDirection = "none";
5314
5328
  break;
5315
5329
  }
5316
5330
  }
5317
- l.fadeGain <= 1e-3 && l.ending && f.push(p);
5318
- } else if (!N && l.totalSamples <= 0 && l.hasLastOut && l.lastOut && l.fadeGain > 1e-3) {
5319
- l.fadeDirection = "out", l.underrunPending = !0;
5320
- const w = l.lastOut, v = I - 1;
5331
+ u.fadeGain <= 1e-3 && u.ending && f.push(p);
5332
+ } else if (!N && u.totalSamples <= 0 && u.hasLastOut && u.lastOut && u.fadeGain > 1e-3) {
5333
+ u.fadeDirection = "out", u.underrunPending = !0;
5334
+ const A = u.lastOut, v = I - 1;
5321
5335
  for (let M = 0; M < I; M++) {
5322
- l.fadeGain = Math.max(0, l.fadeGain - c), l.fadeGain <= 0 && (l.fadeDirection = "none");
5323
- for (let $ = 0; $ < m; $++) {
5324
- const Gr = w[v * m + $];
5325
- u[$][M] += Gr * l.fadeGain;
5336
+ u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none");
5337
+ for (let K = 0; K < m; K++) {
5338
+ const Vr = A[v * m + K];
5339
+ l[K][M] += Vr * u.fadeGain;
5326
5340
  }
5327
5341
  }
5328
5342
  }
@@ -5334,14 +5348,14 @@ class je {
5334
5348
  }
5335
5349
  if (T > 1) {
5336
5350
  const p = 1 / Math.sqrt(T);
5337
- for (let l = 0; l < I; l++)
5351
+ for (let u = 0; u < I; u++)
5338
5352
  for (let N = 0; N < m; N++)
5339
- u[N][l] *= p;
5353
+ l[N][u] *= p;
5340
5354
  }
5341
5355
  for (let p = 0; p < I; p++)
5342
- for (let l = 0; l < m; l++) {
5343
- const N = u[l][p];
5344
- u[l][p] = N > 1 ? 1 : N < -1 ? -1 : N;
5356
+ for (let u = 0; u < m; u++) {
5357
+ const N = l[u][p];
5358
+ l[u][p] = N > 1 ? 1 : N < -1 ? -1 : N;
5345
5359
  }
5346
5360
  }, d.connect(e.destination), this.scriptProcessorNode = d, this.ensureScriptProcessorDiagnostics(r);
5347
5361
  }
@@ -5363,7 +5377,7 @@ class je {
5363
5377
  e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
5364
5378
  }
5365
5379
  trimFallbackQueue(e) {
5366
- const r = Math.floor(this.outputSampleRateHz * R * kr / 1e3), n = e.totalSamples - r;
5380
+ const r = Math.floor(this.outputSampleRateHz * R * Dr / 1e3), n = e.totalSamples - r;
5367
5381
  n <= 0 || this.skipFromFallbackQueue(e, n);
5368
5382
  }
5369
5383
  stopScriptProcessorDiagnostics() {
@@ -5410,7 +5424,7 @@ class je {
5410
5424
  try {
5411
5425
  await this.resumeWithTimeout(e), this.removeUnlockHandler();
5412
5426
  } catch (o) {
5413
- g.warn(`Failed to resume AudioContext: ${K(o)}`), this.addUnlockHandler();
5427
+ g.warn(`Failed to resume AudioContext: ${$(o)}`), this.addUnlockHandler();
5414
5428
  }
5415
5429
  }
5416
5430
  async recoverAudioContext(e) {
@@ -5484,9 +5498,9 @@ class je {
5484
5498
  }
5485
5499
  this.protocolPort = e;
5486
5500
  try {
5487
- this.audioWorker = new Mc();
5501
+ this.audioWorker = new Lc();
5488
5502
  } catch (d) {
5489
- g.warn(`Failed to create audio worker: ${K(d)}`), this.protocolPort.close(), this.protocolPort = null;
5503
+ g.warn(`Failed to create audio worker: ${$(d)}`), this.protocolPort.close(), this.protocolPort = null;
5490
5504
  return;
5491
5505
  }
5492
5506
  const r = this.audioWorker;
@@ -5508,8 +5522,8 @@ class je {
5508
5522
  onAudioWorkerMessage(e) {
5509
5523
  if (e.type === "streamBegin") {
5510
5524
  if (this.activeStreams.add(e.streamId), e.shapeSets && e.shapeSets.length > 0 && (this.streamShapeSets.set(e.streamId, e.shapeSets), this.currentShapeSetValues.set(e.streamId, /* @__PURE__ */ new Map()), e.shapeSets.some((s) => s.Name === "Viseme"))) {
5511
- const s = new Array(x);
5512
- for (let i = 0; i < x; i++)
5525
+ const s = new Array(G);
5526
+ for (let i = 0; i < G; i++)
5513
5527
  s[i] = { samplePosition: 0, frameSamples: 0, mouthOpenY: 0, mouthForm: 0 };
5514
5528
  this.visemeBuffers.set(e.streamId, {
5515
5529
  frames: s,
@@ -5568,14 +5582,14 @@ class je {
5568
5582
  s.epochTimestampSamples = e.timestampInterleavedSamples;
5569
5583
  const c = this.audioContext;
5570
5584
  if (c) {
5571
- const u = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), f = Wc + u * 1e3, d = Math.min($c, Math.max(Hc, f));
5585
+ const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), f = Kc + l * 1e3, d = Math.min(Yc, Math.max($c, f));
5572
5586
  s.playbackStartContextTime = c.currentTime + d / 1e3;
5573
5587
  }
5574
5588
  s.timingEstablished = !0;
5575
5589
  }
5576
5590
  if (e.frameSizeInterleavedSamples > 0) {
5577
5591
  const c = s.frames[s.head];
5578
- c.samplePosition = e.timestampInterleavedSamples - s.epochTimestampSamples, c.frameSamples = e.frameSizeInterleavedSamples, c.mouthOpenY = a.Values[0], c.mouthForm = a.Values[1], s.head = (s.head + 1) % x, s.count < x && s.count++;
5592
+ c.samplePosition = e.timestampInterleavedSamples - s.epochTimestampSamples, c.frameSamples = e.frameSizeInterleavedSamples, c.mouthOpenY = a.Values[0], c.mouthForm = a.Values[1], s.head = (s.head + 1) % G, s.count < G && s.count++;
5579
5593
  }
5580
5594
  }
5581
5595
  }
@@ -5691,9 +5705,9 @@ class je {
5691
5705
  }));
5692
5706
  }
5693
5707
  }
5694
- function jc(t) {
5708
+ function Xc(t) {
5695
5709
  return new Worker(
5696
- "" + new URL("assets/video-playback-worker-Dylqg54c.js", import.meta.url).href,
5710
+ "" + new URL("assets/video-playback-worker-qauTQ7Et.js", import.meta.url).href,
5697
5711
  {
5698
5712
  type: "module",
5699
5713
  name: t?.name
@@ -5701,10 +5715,10 @@ function jc(t) {
5701
5715
  );
5702
5716
  }
5703
5717
  const V = L("IkonVideoPlayback");
5704
- function we(t) {
5718
+ function ye(t) {
5705
5719
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
5706
5720
  }
5707
- class zc {
5721
+ class Jc {
5708
5722
  client;
5709
5723
  config;
5710
5724
  enabled = !0;
@@ -5779,9 +5793,9 @@ class zc {
5779
5793
  }
5780
5794
  let e;
5781
5795
  try {
5782
- e = new jc();
5796
+ e = new Xc();
5783
5797
  } catch (r) {
5784
- V.warn(`Failed to create video worker: ${we(r)}`);
5798
+ V.warn(`Failed to create video worker: ${ye(r)}`);
5785
5799
  return;
5786
5800
  }
5787
5801
  this.worker = e, e.addEventListener("message", (r) => this.onWorkerMessage(r.data)), e.addEventListener("error", (r) => {
@@ -5850,7 +5864,7 @@ class zc {
5850
5864
  const n = r.canvas.transferControlToOffscreen();
5851
5865
  this.worker.postMessage({ type: "attachSurface", streamId: e, canvas: n }, [n]), r.attachedToWorker = !0;
5852
5866
  } catch (n) {
5853
- V.warn(`Failed to attach offscreen canvas for stream ${e}: ${we(n)}`), r.mode = "bitmap", r.ctxBitmap = r.canvas.getContext("bitmaprenderer", { alpha: !1 }), r.ctxBitmap || (r.ctx2d = r.canvas.getContext("2d", { alpha: !1, desynchronized: !0 }));
5867
+ V.warn(`Failed to attach offscreen canvas for stream ${e}: ${ye(n)}`), r.mode = "bitmap", r.ctxBitmap = r.canvas.getContext("bitmaprenderer", { alpha: !1 }), r.ctxBitmap || (r.ctx2d = r.canvas.getContext("2d", { alpha: !1, desynchronized: !0 }));
5854
5868
  try {
5855
5869
  this.worker.postMessage({ type: "watchStream", streamId: e }), r.attachedToWorker = !0;
5856
5870
  } catch {
@@ -5868,7 +5882,7 @@ class zc {
5868
5882
  const r = this.parseStreamId(e);
5869
5883
  if (!r)
5870
5884
  return;
5871
- const n = Aa(Sa(), this.client.sessionId ?? 0, {
5885
+ const n = Na(Aa(), this.client.sessionId ?? 0, {
5872
5886
  trackId: r.trackId,
5873
5887
  targetIds: [r.senderId]
5874
5888
  });
@@ -5899,7 +5913,7 @@ class zc {
5899
5913
  try {
5900
5914
  this.worker.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
5901
5915
  } catch (r) {
5902
- V.warn(`Failed to attach video protocol port: ${we(r)}`), this.protocolPort.close(), this.protocolPort = null;
5916
+ V.warn(`Failed to attach video protocol port: ${ye(r)}`), this.protocolPort.close(), this.protocolPort = null;
5903
5917
  }
5904
5918
  }
5905
5919
  }
@@ -5928,11 +5942,11 @@ class zc {
5928
5942
  }));
5929
5943
  }
5930
5944
  }
5931
- class Xc {
5945
+ class Qc {
5932
5946
  audio;
5933
5947
  video;
5934
5948
  constructor(e, r) {
5935
- this.audio = new je(e, r?.audio), this.video = new zc(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
5949
+ this.audio = new ze(e, r?.audio), this.video = new Jc(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
5936
5950
  }
5937
5951
  /**
5938
5952
  * Releases media resources (workers, audio graph, decoders).
@@ -5943,7 +5957,7 @@ class Xc {
5943
5957
  this.audio.dispose(), this.video.dispose();
5944
5958
  }
5945
5959
  }
5946
- class Jc {
5960
+ class Zc {
5947
5961
  static getStorageForCapacity(e, r) {
5948
5962
  const n = Int32Array.BYTES_PER_ELEMENT * 2, s = r.BYTES_PER_ELEMENT * e;
5949
5963
  return new SharedArrayBuffer(n + s);
@@ -5997,7 +6011,7 @@ class Jc {
5997
6011
  return n = (n + r) % this.capacity, Atomics.store(this.readWrite, 0, n), r;
5998
6012
  }
5999
6013
  }
6000
- function Qc(t) {
6014
+ function qc(t) {
6001
6015
  return new Worker(
6002
6016
  "" + new URL("assets/audio-capture-worker-kpORDYGU.js", import.meta.url).href,
6003
6017
  {
@@ -6006,12 +6020,12 @@ function Qc(t) {
6006
6020
  }
6007
6021
  );
6008
6022
  }
6009
- const Zc = L("IkonAudioCapture");
6010
- function qc() {
6023
+ const el = L("IkonAudioCapture");
6024
+ function tl() {
6011
6025
  const t = globalThis.crypto;
6012
6026
  return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
6013
6027
  }
6014
- function el() {
6028
+ function rl() {
6015
6029
  return `
6016
6030
  class RingBuffer {
6017
6031
  static getStorageForCapacity(capacity, type) {
@@ -6068,7 +6082,7 @@ class RingBuffer {
6068
6082
  }
6069
6083
  }
6070
6084
 
6071
- const RENDER_QUANTUM_SIZE = ${Dr};
6085
+ const RENDER_QUANTUM_SIZE = ${Or};
6072
6086
 
6073
6087
  class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
6074
6088
  constructor(options) {
@@ -6140,7 +6154,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
6140
6154
  registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
6141
6155
  `;
6142
6156
  }
6143
- class tl {
6157
+ class nl {
6144
6158
  constructor(e, r) {
6145
6159
  this.client = e, this.config = r ?? {};
6146
6160
  }
@@ -6160,12 +6174,12 @@ class tl {
6160
6174
  ensureWorker() {
6161
6175
  if (this.worker)
6162
6176
  return this.worker;
6163
- const e = new Qc();
6177
+ const e = new qc();
6164
6178
  return this.worker = e, e.addEventListener("message", (r) => {
6165
6179
  const n = r.data;
6166
6180
  if (n?.type === "error") {
6167
6181
  const s = n.error;
6168
- Zc.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
6182
+ el.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
6169
6183
  }
6170
6184
  }), e;
6171
6185
  }
@@ -6201,9 +6215,9 @@ class tl {
6201
6215
  return await navigator.mediaDevices.getUserMedia({ audio: n });
6202
6216
  }
6203
6217
  async ensureWorklet(e) {
6204
- if (!Rr(e))
6218
+ if (!Ur(e))
6205
6219
  throw new Error("AudioWorklet is not supported in this browser");
6206
- this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([el()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
6220
+ this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([rl()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
6207
6221
  try {
6208
6222
  await this.workletReady;
6209
6223
  } catch (r) {
@@ -6219,13 +6233,13 @@ class tl {
6219
6233
  if (!i)
6220
6234
  throw s.getTracks().forEach((p) => p.stop()), new Error("No audio track available");
6221
6235
  await this.ensureWorklet(n);
6222
- const o = qc(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), u = n.createGain();
6223
- u.gain.value = 0, u.connect(n.destination);
6236
+ const o = tl(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), l = n.createGain();
6237
+ l.gain.value = 0, l.connect(n.destination);
6224
6238
  const h = le() ? "sab" : "pcm";
6225
6239
  let E;
6226
6240
  if (h === "sab") {
6227
6241
  const p = Math.floor(n.sampleRate * 2);
6228
- E = Jc.getStorageForCapacity(p, Float32Array);
6242
+ E = Zc.getStorageForCapacity(p, Float32Array);
6229
6243
  }
6230
6244
  const m = this.ensureWorker();
6231
6245
  m.postMessage({
@@ -6241,20 +6255,20 @@ class tl {
6241
6255
  },
6242
6256
  transport: h,
6243
6257
  sharedArrayBuffer: E
6244
- }), await new Promise((p, l) => {
6258
+ }), await new Promise((p, u) => {
6245
6259
  const N = setTimeout(() => {
6246
- m.removeEventListener("message", w), l(new Error("Audio capture worker start timeout"));
6247
- }, 1e4), w = (v) => {
6260
+ m.removeEventListener("message", A), u(new Error("Audio capture worker start timeout"));
6261
+ }, 1e4), A = (v) => {
6248
6262
  const M = v.data;
6249
6263
  if (M?.type === "started" && M.captureId === o)
6250
- clearTimeout(N), m.removeEventListener("message", w), p();
6264
+ clearTimeout(N), m.removeEventListener("message", A), p();
6251
6265
  else if (M?.type === "error" && M.captureId === o) {
6252
- clearTimeout(N), m.removeEventListener("message", w);
6253
- const $ = M.error;
6254
- l(new Error($?.message ?? "Audio capture failed to start"));
6266
+ clearTimeout(N), m.removeEventListener("message", A);
6267
+ const K = M.error;
6268
+ u(new Error(K?.message ?? "Audio capture failed to start"));
6255
6269
  }
6256
6270
  };
6257
- m.addEventListener("message", w);
6271
+ m.addEventListener("message", A);
6258
6272
  });
6259
6273
  const I = new AudioWorkletNode(n, "ikon-audio-capture", {
6260
6274
  numberOfInputs: 1,
@@ -6266,10 +6280,10 @@ class tl {
6266
6280
  sharedArrayBuffer: E
6267
6281
  }
6268
6282
  });
6269
- c.connect(I), I.connect(u), h === "pcm" && (I.port.onmessage = (p) => {
6270
- const l = p.data;
6271
- if (!(!l || typeof l != "object") && l.type === "pcm" && l.pcm instanceof Float32Array) {
6272
- const N = l.pcm;
6283
+ c.connect(I), I.connect(l), h === "pcm" && (I.port.onmessage = (p) => {
6284
+ const u = p.data;
6285
+ if (!(!u || typeof u != "object") && u.type === "pcm" && u.pcm instanceof Float32Array) {
6286
+ const N = u.pcm;
6273
6287
  m.postMessage({ type: "pcm", captureId: o, pcm: N }, [N.buffer]);
6274
6288
  }
6275
6289
  });
@@ -6281,13 +6295,13 @@ class tl {
6281
6295
  ctx: n,
6282
6296
  source: c,
6283
6297
  worklet: I,
6284
- gain: u,
6298
+ gain: l,
6285
6299
  stopped: !1,
6286
6300
  startSegment: () => {
6287
6301
  T.stopped || m.postMessage({ type: "startSegment", captureId: o });
6288
6302
  },
6289
6303
  endSegment: () => {
6290
- T.stopped || (m.postMessage({ type: "endSegment", captureId: o }), br() && T.stop());
6304
+ T.stopped || (m.postMessage({ type: "endSegment", captureId: o }), kr() && T.stop());
6291
6305
  },
6292
6306
  stop: async () => {
6293
6307
  if (!T.stopped) {
@@ -6301,7 +6315,7 @@ class tl {
6301
6315
  } catch {
6302
6316
  }
6303
6317
  try {
6304
- u.disconnect();
6318
+ l.disconnect();
6305
6319
  } catch {
6306
6320
  }
6307
6321
  try {
@@ -6366,9 +6380,9 @@ class tl {
6366
6380
  }
6367
6381
  }
6368
6382
  }
6369
- const Mr = 1280, Or = 720, rl = 30, Lr = "image/jpeg", nl = 0.92;
6370
- async function sl(t, e) {
6371
- const r = e.mime ?? Lr, n = e.quality ?? nl;
6383
+ const Lr = 1280, vr = 720, sl = 30, Pr = "image/jpeg", il = 0.92;
6384
+ async function ol(t, e) {
6385
+ const r = e.mime ?? Pr, n = e.quality ?? il;
6372
6386
  if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
6373
6387
  try {
6374
6388
  return await t.convertToBlob({ type: r, quality: n });
@@ -6385,7 +6399,7 @@ async function sl(t, e) {
6385
6399
  );
6386
6400
  });
6387
6401
  }
6388
- class il {
6402
+ class al {
6389
6403
  async acquireCameraStream(e) {
6390
6404
  if (!navigator.mediaDevices)
6391
6405
  throw new Error("Media devices are not available in this environment");
@@ -6410,21 +6424,21 @@ class il {
6410
6424
  await s.play();
6411
6425
  } catch {
6412
6426
  }
6413
- const i = s.videoWidth || (n.getSettings().width ?? Mr), o = s.videoHeight || (n.getSettings().height ?? Or), a = e.width ? Math.max(1, Math.floor(e.width)) : i, c = e.height ? Math.max(1, Math.floor(e.height)) : o;
6414
- let u;
6427
+ const i = s.videoWidth || (n.getSettings().width ?? Lr), o = s.videoHeight || (n.getSettings().height ?? vr), a = e.width ? Math.max(1, Math.floor(e.width)) : i, c = e.height ? Math.max(1, Math.floor(e.height)) : o;
6428
+ let l;
6415
6429
  if (typeof OffscreenCanvas < "u")
6416
- u = new OffscreenCanvas(a, c);
6430
+ l = new OffscreenCanvas(a, c);
6417
6431
  else {
6418
6432
  const E = document.createElement("canvas");
6419
- E.width = a, E.height = c, u = E;
6433
+ E.width = a, E.height = c, l = E;
6420
6434
  }
6421
- const f = u.getContext("2d", { alpha: !1 });
6435
+ const f = l.getContext("2d", { alpha: !1 });
6422
6436
  if (!f)
6423
6437
  throw new Error("2D canvas context unavailable");
6424
6438
  f.drawImage(s, 0, 0, a, c);
6425
- const d = await sl(u, e), h = await d.arrayBuffer();
6439
+ const d = await ol(l, e), h = await d.arrayBuffer();
6426
6440
  return {
6427
- mime: d.type || e.mime || Lr,
6441
+ mime: d.type || e.mime || Pr,
6428
6442
  width: a,
6429
6443
  height: c,
6430
6444
  data: new Uint8Array(h)
@@ -6449,9 +6463,9 @@ class il {
6449
6463
  }
6450
6464
  }
6451
6465
  }
6452
- function ol(t) {
6466
+ function cl(t) {
6453
6467
  return new Worker(
6454
- "" + new URL("assets/video-capture-worker-y4Nlx7f9.js", import.meta.url).href,
6468
+ "" + new URL("assets/video-capture-worker-DP3lFDjq.js", import.meta.url).href,
6455
6469
  {
6456
6470
  type: "module",
6457
6471
  name: t?.name
@@ -6459,17 +6473,17 @@ function ol(t) {
6459
6473
  );
6460
6474
  }
6461
6475
  const lt = L("IkonVideoCapture");
6462
- function al() {
6476
+ function ll() {
6463
6477
  const t = globalThis.crypto;
6464
6478
  return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
6465
6479
  }
6466
- function cl() {
6480
+ function ul() {
6467
6481
  const t = globalThis.MediaStreamTrackProcessor;
6468
6482
  if (!t)
6469
6483
  throw new Error("MediaStreamTrackProcessor is not available in this browser");
6470
6484
  return t;
6471
6485
  }
6472
- class ll {
6486
+ class hl {
6473
6487
  constructor(e) {
6474
6488
  this.client = e;
6475
6489
  }
@@ -6485,7 +6499,7 @@ class ll {
6485
6499
  ensureWorker() {
6486
6500
  if (this.worker)
6487
6501
  return this.worker;
6488
- const e = new ol();
6502
+ const e = new cl();
6489
6503
  return this.worker = e, e.addEventListener("message", (r) => {
6490
6504
  const n = r.data;
6491
6505
  if (n?.type === "error") {
@@ -6512,7 +6526,7 @@ class ll {
6512
6526
  async getMediaStream(e) {
6513
6527
  if (!navigator.mediaDevices)
6514
6528
  throw new Error("Media devices are not available in this environment");
6515
- const r = e.constraints ?? {}, n = e.options?.framerate ?? rl, s = {
6529
+ const r = e.constraints ?? {}, n = e.options?.framerate ?? sl, s = {
6516
6530
  ...r,
6517
6531
  frameRate: r.frameRate ?? { ideal: n }
6518
6532
  };
@@ -6523,10 +6537,10 @@ class ll {
6523
6537
  if (!r)
6524
6538
  throw new Error("Cannot start video capture before client is connected");
6525
6539
  this.ensurePorts();
6526
- const n = al(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
6540
+ const n = ll(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
6527
6541
  if (!i)
6528
6542
  throw s.getTracks().forEach((I) => I.stop()), new Error("No video track available");
6529
- const o = i.getSettings(), a = e.options?.width ?? o.width ?? Mr, c = e.options?.height ?? o.height ?? Or, u = cl(), d = new u({ track: i }).readable, h = this.allocateTrackId(), E = this.ensureWorker();
6543
+ const o = i.getSettings(), a = e.options?.width ?? o.width ?? Lr, c = e.options?.height ?? o.height ?? vr, l = ul(), d = new l({ track: i }).readable, h = this.allocateTrackId(), E = this.ensureWorker();
6530
6544
  E.postMessage(
6531
6545
  {
6532
6546
  type: "start",
@@ -6594,12 +6608,12 @@ class ll {
6594
6608
  this.protocolPort?.close(), this.protocolPort = null, this.sendPort?.close(), this.sendPort = null;
6595
6609
  }
6596
6610
  }
6597
- class ul {
6611
+ class dl {
6598
6612
  audio;
6599
6613
  video;
6600
6614
  image;
6601
6615
  constructor(e, r) {
6602
- this.audio = new tl(e, r?.audio), this.video = new ll(e), this.image = new il();
6616
+ this.audio = new nl(e, r?.audio), this.video = new hl(e), this.image = new al();
6603
6617
  }
6604
6618
  dispose() {
6605
6619
  this.audio.dispose(), this.video.dispose();
@@ -6610,8 +6624,8 @@ const ut = {
6610
6624
  [k.WebSocket]: 1,
6611
6625
  [k.WebTransportProxy]: 2,
6612
6626
  [k.WebSocketProxy]: 3
6613
- }, Ae = "ikon_endpoint_type";
6614
- class hl {
6627
+ }, Ne = "ikon_endpoint_type";
6628
+ class fl {
6615
6629
  isLocal;
6616
6630
  workingEndpointType = null;
6617
6631
  constructor(e) {
@@ -6643,7 +6657,7 @@ class hl {
6643
6657
  if (!this.isLocal) {
6644
6658
  this.workingEndpointType = e;
6645
6659
  try {
6646
- localStorage.setItem(Ae, String(e));
6660
+ localStorage.setItem(Ne, String(e));
6647
6661
  } catch {
6648
6662
  }
6649
6663
  }
@@ -6654,7 +6668,7 @@ class hl {
6654
6668
  clearRememberedType() {
6655
6669
  this.workingEndpointType = null;
6656
6670
  try {
6657
- localStorage.removeItem(Ae);
6671
+ localStorage.removeItem(Ne);
6658
6672
  } catch {
6659
6673
  }
6660
6674
  }
@@ -6663,7 +6677,7 @@ class hl {
6663
6677
  */
6664
6678
  loadRememberedType() {
6665
6679
  try {
6666
- const e = localStorage.getItem(Ae);
6680
+ const e = localStorage.getItem(Ne);
6667
6681
  if (e !== null) {
6668
6682
  const r = Number(e);
6669
6683
  k[r] !== void 0 && (this.workingEndpointType = r);
@@ -6672,8 +6686,11 @@ class hl {
6672
6686
  }
6673
6687
  }
6674
6688
  }
6675
- const A = L("IkonClient");
6676
- class kl {
6689
+ const w = L("IkonClient");
6690
+ function El() {
6691
+ return typeof __IKON_EXTERNAL_TOKEN__ < "u" && __IKON_EXTERNAL_TOKEN__;
6692
+ }
6693
+ class Ml {
6677
6694
  channelManager = null;
6678
6695
  protocolWorker = null;
6679
6696
  workerManagerState = null;
@@ -6710,6 +6727,9 @@ class kl {
6710
6727
  nextProtocolSendPortId = 1;
6711
6728
  _media;
6712
6729
  _mediaCapture = null;
6730
+ // External token mode
6731
+ _externalTokenMode = El();
6732
+ _externalTokenCleanup = null;
6713
6733
  /**
6714
6734
  * SDK-provided media pipelines (audio/video).
6715
6735
  *
@@ -6728,27 +6748,27 @@ class kl {
6728
6748
  return this._mediaCapture;
6729
6749
  }
6730
6750
  constructor(e) {
6731
- this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? va, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? Pa;
6751
+ this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? Fa, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? Ba;
6732
6752
  const r = [e.local, e.apiKey, e.sessionToken].filter(Boolean).length;
6733
6753
  if (r === 0)
6734
6754
  throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
6735
6755
  if (r > 1)
6736
6756
  throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
6737
- this.endpointSelector = new hl({
6757
+ this.endpointSelector = new fl({
6738
6758
  local: e.local
6739
- }), this._functionRegistry = new Nc(), nt() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Tc(this._functionRegistry));
6759
+ }), this._functionRegistry = new Cc(), st() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = wc(this._functionRegistry));
6740
6760
  const n = e.audio ? {
6741
6761
  performance: e.audio.performance,
6742
6762
  background: e.audio.background,
6743
6763
  diagnostics: e.audio.diagnostics
6744
6764
  } : void 0, s = e.video ? { performance: e.video.performance } : void 0;
6745
- this._media = new Xc(this, { audio: n, video: s, mediaSession: e.mediaSession }), this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0), nt() && (this._mediaCapture = new ul(this, {
6765
+ this._media = new Qc(this, { audio: n, video: s, mediaSession: e.mediaSession }), this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0), st() && (this._mediaCapture = new dl(this, {
6746
6766
  audio: {
6747
6767
  performance: {
6748
6768
  preferWebCodecs: e.audio?.performance?.preferWebCodecs
6749
6769
  }
6750
6770
  }
6751
- }), this.unregisterMediaCaptureFunctions = Uc(this._functionRegistry, this));
6771
+ }), this.unregisterMediaCaptureFunctions = Mc(this._functionRegistry, this));
6752
6772
  }
6753
6773
  _lastError = void 0;
6754
6774
  /**
@@ -6792,28 +6812,38 @@ class kl {
6792
6812
  async connect() {
6793
6813
  if (this.currentState !== "idle")
6794
6814
  throw new Error(`Cannot connect: already in state ${this.currentState}`);
6795
- this._lastError = void 0, this.abortController = new AbortController(), A.info("Connecting to Ikon server"), this.setState("connecting"), this.setupLifecycleHandlers(), this.slowConnectionTimer = setTimeout(() => {
6815
+ if (this.setupLifecycleHandlers(), this._externalTokenMode) {
6816
+ w.info("External token mode enabled, waiting for token from parent window"), this.setState("waitingForToken"), this._externalTokenCleanup = this.setupExternalTokenListener();
6817
+ return;
6818
+ }
6819
+ w.info("Connecting to Ikon server"), await this.executeConnection(() => this.authenticate());
6820
+ }
6821
+ /**
6822
+ * Execute the connection flow with the provided authentication function.
6823
+ */
6824
+ async executeConnection(e) {
6825
+ this._lastError = void 0, this.abortController = new AbortController(), this.setState("connecting"), this.slowConnectionTimer = setTimeout(() => {
6796
6826
  this.currentState === "connecting" && this.setState("connectingSlow");
6797
6827
  }, this.slowConnectionThresholdMs), this.connectionTimer = setTimeout(() => {
6798
- (this.currentState === "connecting" || this.currentState === "connectingSlow") && (A.error("Connection timeout"), this.abortController?.abort(), this.setState("offline"), this.config.onError?.(new Error("Connection timeout")));
6828
+ (this.currentState === "connecting" || this.currentState === "connectingSlow") && (w.error("Connection timeout"), this.abortController?.abort(), this.setState("offline"), this.config.onError?.(new Error("Connection timeout")));
6799
6829
  }, this.connectionTimeoutMs);
6800
6830
  try {
6801
- const e = await this.authenticate();
6802
- this.authResponse = e.authResponse, this._sessionId = e.authResponse.ClientContext.SessionId, A.info("Connected to Ikon server"), await this.connectProtocol(this.authResponse.Entrypoints);
6803
- } catch (e) {
6804
- if (e instanceof DOMException && e.name === "AbortError")
6831
+ const r = await e();
6832
+ this.authResponse = r.authResponse, this._sessionId = r.authResponse.ClientContext.SessionId, w.info("Authenticated to Ikon server"), await this.connectProtocol(this.authResponse.Entrypoints);
6833
+ } catch (r) {
6834
+ if (r instanceof DOMException && r.name === "AbortError")
6805
6835
  return;
6806
- throw A.error("Connection failed:", e), this.clearTimers(), this.setState("offline"), this.config.onError?.(e instanceof Error ? e : new Error(String(e))), e;
6836
+ throw w.error("Connection failed:", r), this.clearTimers(), this.setState("offline"), this.config.onError?.(r instanceof Error ? r : new Error(String(r))), r;
6807
6837
  }
6808
6838
  }
6809
6839
  /**
6810
6840
  * Disconnect from the server.
6811
6841
  */
6812
6842
  disconnect() {
6813
- A.info("Disconnecting from Ikon server"), this.clearTimers(), this.cleanupLifecycleHandlers(), this._mediaCapture?.dispose(), this.unregisterMediaCaptureFunctions && (this.unregisterMediaCaptureFunctions(), this.unregisterMediaCaptureFunctions = null), this.unregisterBrowserFunctions && (this.unregisterBrowserFunctions(), this.unregisterBrowserFunctions = null), this.abortController?.abort(), this.abortController = null, this.disconnectProtocol(), this.authResponse = null, this._sessionId = void 0, this._globalState = null, this._globalStateReceived = !1, this._channelsConnected = !1, this._joinedHandled = !1, this._functionRegistry.detach(), this.setState("idle");
6843
+ w.info("Disconnecting from Ikon server"), this.clearTimers(), this.cleanupLifecycleHandlers(), this._externalTokenCleanup && (this._externalTokenCleanup(), this._externalTokenCleanup = null), 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");
6814
6844
  }
6815
6845
  sendActionCall(e, r) {
6816
- const n = Zr(
6846
+ const n = rn(
6817
6847
  {
6818
6848
  ActionId: _.fromString(e),
6819
6849
  PayloadJson: r ?? "{}"
@@ -6836,7 +6866,7 @@ class kl {
6836
6866
  this.channelManager.sendProtocolMessage(e);
6837
6867
  return;
6838
6868
  }
6839
- A.warn("Cannot send: not connected");
6869
+ w.warn("Cannot send: not connected");
6840
6870
  }
6841
6871
  /**
6842
6872
  * Create a MessagePort that receives raw protocol message buffers.
@@ -6933,7 +6963,7 @@ class kl {
6933
6963
  return;
6934
6964
  this.channelManager?.sendProtocolMessage(c);
6935
6965
  } catch (c) {
6936
- A.warn(`Failed to forward protocol send port message: ${c}`);
6966
+ w.warn(`Failed to forward protocol send port message: ${c}`);
6937
6967
  }
6938
6968
  };
6939
6969
  try {
@@ -6989,11 +7019,11 @@ class kl {
6989
7019
  async authenticate() {
6990
7020
  const e = this.abortController?.signal;
6991
7021
  if (this.config.local)
6992
- return $a(this.config.local, e);
7022
+ return Ya(this.config.local, e);
6993
7023
  if (this.config.apiKey)
6994
- return Ka(this.config.apiKey, e);
7024
+ return ja(this.config.apiKey, e);
6995
7025
  if (this.config.sessionToken)
6996
- return Ya(this.config.sessionToken, e);
7026
+ return za(this.config.sessionToken, e);
6997
7027
  throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
6998
7028
  }
6999
7029
  /**
@@ -7005,13 +7035,11 @@ class kl {
7005
7035
  this.notifyMessageSubscribers(e, r, n);
7006
7036
  return;
7007
7037
  }
7008
- if (r === S.CORE_GLOBAL_STATE)
7009
- try {
7010
- this._globalState = vo(e), this._globalState.DebugMode && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
7011
- } catch (s) {
7012
- A.error("Failed to parse GlobalState:", s);
7013
- }
7014
- this.notifyMessageSubscribers(e, r, n);
7038
+ r === S.CORE_GLOBAL_STATE && Fo(e).then((s) => {
7039
+ this._globalState = s, this._globalState.DebugMode && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
7040
+ }).catch((s) => {
7041
+ w.error("Failed to parse GlobalState:", s);
7042
+ }), this.notifyMessageSubscribers(e, r, n);
7015
7043
  }
7016
7044
  /**
7017
7045
  * Notify config callback and message subscribers.
@@ -7027,14 +7055,14 @@ class kl {
7027
7055
  if (c.opcodeGroupsMask !== void 0 && ((n ?? ce(e)) & c.opcodeGroupsMask) === 0)
7028
7056
  continue;
7029
7057
  if (c.opcodes && c.opcodes.length > 0) {
7030
- const u = r ?? ue(e);
7031
- if (!c.opcodes.includes(u))
7058
+ const l = r ?? ue(e);
7059
+ if (!c.opcodes.includes(l))
7032
7060
  continue;
7033
7061
  }
7034
7062
  }
7035
7063
  s[a](e);
7036
- } catch (u) {
7037
- A.error("Message subscriber error:", u);
7064
+ } catch (l) {
7065
+ w.error("Message subscriber error:", l);
7038
7066
  }
7039
7067
  }
7040
7068
  }
@@ -7051,7 +7079,7 @@ class kl {
7051
7079
  this.currentState === "connected" && this.setState("reconnecting");
7052
7080
  break;
7053
7081
  case "stopped":
7054
- A.info("Ikon server has stopped"), this.clearTimers(), this.setState("offline");
7082
+ w.info("Ikon server has stopped"), this.clearTimers(), this.setState("offline");
7055
7083
  break;
7056
7084
  case "offline":
7057
7085
  this.currentState !== "idle" && (this.clearTimers(), this.setState("offline"));
@@ -7076,7 +7104,7 @@ class kl {
7076
7104
  try {
7077
7105
  r(e);
7078
7106
  } catch (n) {
7079
- A.error("State subscriber error:", n);
7107
+ w.error("State subscriber error:", n);
7080
7108
  }
7081
7109
  this.config.onConnectionStateChange?.(e);
7082
7110
  }
@@ -7086,7 +7114,7 @@ class kl {
7086
7114
  * Use this for unrecoverable SDK internal errors.
7087
7115
  */
7088
7116
  setErrorState(e) {
7089
- A.error("SDK error, going offline:", e), this._lastError = e, this.clearTimers(), this.cleanupLifecycleHandlers(), this.disconnectProtocol(), this.currentState = "offlineError", this.config.onConnectionStateChange?.("offlineError"), this.config.onError?.(e);
7117
+ w.error("SDK error, going offline:", e), this._lastError = e, this.clearTimers(), this.cleanupLifecycleHandlers(), this.disconnectProtocol(), this.currentState = "offlineError", this.config.onConnectionStateChange?.("offlineError"), this.config.onError?.(e);
7090
7118
  }
7091
7119
  async connectProtocol(e) {
7092
7120
  if (typeof Worker > "u") {
@@ -7095,9 +7123,9 @@ class kl {
7095
7123
  }
7096
7124
  let r;
7097
7125
  try {
7098
- r = new ya();
7126
+ r = new ga();
7099
7127
  } catch (h) {
7100
- A.warn(`Failed to create protocol worker, falling back to main thread: ${h}`), await this.connectProtocolOnMainThread(e);
7128
+ w.warn(`Failed to create protocol worker, falling back to main thread: ${h}`), await this.connectProtocolOnMainThread(e);
7101
7129
  return;
7102
7130
  }
7103
7131
  this.channelManager = null, this.protocolWorker = r, this.workerManagerState = "idle";
@@ -7112,25 +7140,25 @@ class kl {
7112
7140
  if (T?.type === "state") {
7113
7141
  const p = T.state;
7114
7142
  this.workerManagerState = p;
7115
- const l = T.activeType;
7116
- l !== void 0 && this.endpointSelector.rememberWorkingType(l), this.handleChannelManagerStateChange(p), p === "connected" && h();
7143
+ const u = T.activeType;
7144
+ u !== void 0 && this.endpointSelector.rememberWorkingType(u), this.handleChannelManagerStateChange(p), p === "connected" && h();
7117
7145
  return;
7118
7146
  }
7119
7147
  if (T?.type === "error") {
7120
- const p = T.error, l = new Error(String(p?.message ?? "Worker error"));
7121
- l.name = String(p?.name ?? "Error"), E(l);
7148
+ const p = T.error, u = new Error(String(p?.message ?? "Worker error"));
7149
+ u.name = String(p?.name ?? "Error"), E(u);
7122
7150
  }
7123
7151
  };
7124
7152
  r.addEventListener("message", m), r.addEventListener("error", (I) => {
7125
7153
  const T = [I.message, I.filename, I.lineno, I.colno].filter((p) => p != null && String(p).length > 0);
7126
7154
  E(new Error(`Protocol worker failed: ${T.join(" ")}`.trim()));
7127
7155
  });
7128
- }), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ?? Ze, o = this.config.timeouts?.reconnectBackoffMs ?? qe, a = this.config.timeouts?.maxReconnectAttempts ?? et;
7156
+ }), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ?? qe, o = this.config.timeouts?.reconnectBackoffMs ?? et, a = this.config.timeouts?.maxReconnectAttempts ?? tt;
7129
7157
  this.updateWorkerInterestMask();
7130
- const c = typeof window < "u" ? new URLSearchParams(window.location.search) : null, u = c?.get("devtools") === "true" || c?.get("debug") === "true";
7131
- u && typeof sessionStorage < "u" && sessionStorage.setItem("ikon:devtools", "true");
7158
+ const c = typeof window < "u" ? new URLSearchParams(window.location.search) : null, l = c?.get("devtools") === "true" || c?.get("debug") === "true";
7159
+ l && typeof sessionStorage < "u" && sessionStorage.setItem("ikon:devtools", "true");
7132
7160
  const f = typeof sessionStorage < "u" && sessionStorage.getItem("ikon:devtools") === "true";
7133
- (this.config.debug?.devtools || u || f) && r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({
7161
+ (this.config.debug?.devtools || l || f) && r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({
7134
7162
  type: "connect",
7135
7163
  sessionId: this._sessionId,
7136
7164
  entrypoints: e,
@@ -7142,15 +7170,15 @@ class kl {
7142
7170
  try {
7143
7171
  await n;
7144
7172
  } catch (h) {
7145
- A.warn(`Protocol worker connect failed, falling back to main thread: ${h}`), this.disconnectProtocol(), await this.connectProtocolOnMainThread(e);
7173
+ w.warn(`Protocol worker connect failed, falling back to main thread: ${h}`), this.disconnectProtocol(), await this.connectProtocolOnMainThread(e);
7146
7174
  }
7147
7175
  }
7148
7176
  async connectProtocolOnMainThread(e) {
7149
- this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new La({
7177
+ this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new Pa({
7150
7178
  sessionId: this._sessionId,
7151
- keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? Ze,
7152
- reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? qe,
7153
- maxReconnectAttempts: this.config.timeouts?.maxReconnectAttempts ?? et,
7179
+ keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? qe,
7180
+ reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? et,
7181
+ maxReconnectAttempts: this.config.timeouts?.maxReconnectAttempts ?? tt,
7154
7182
  endpointSelector: this.endpointSelector,
7155
7183
  onProtocolMessage: (r) => {
7156
7184
  this.handleProtocolMessage(r);
@@ -7224,14 +7252,14 @@ class kl {
7224
7252
  * Close connection cleanly to avoid orphaned connections on the server.
7225
7253
  */
7226
7254
  handleBeforeUnload() {
7227
- A.debug("Page unloading, closing connection..."), this.disconnect();
7255
+ w.debug("Page unloading, closing connection..."), this.disconnect();
7228
7256
  }
7229
7257
  /**
7230
7258
  * Handle page hide event (mobile-friendly, bfcache compatible).
7231
7259
  * Only disconnect if page is actually being unloaded (not persisted).
7232
7260
  */
7233
7261
  handlePageHide(e) {
7234
- e.persisted || (A.debug("Page hidden (not persisted), closing connection..."), this.disconnect());
7262
+ e.persisted || (w.debug("Page hidden (not persisted), closing connection..."), this.disconnect());
7235
7263
  }
7236
7264
  /**
7237
7265
  * Handle visibility change event.
@@ -7247,10 +7275,10 @@ class kl {
7247
7275
  */
7248
7276
  checkConnectionHealth() {
7249
7277
  if (this.protocolWorker) {
7250
- this.currentState === "connected" && this.workerManagerState !== "connected" && (A.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
7278
+ this.currentState === "connected" && this.workerManagerState !== "connected" && (w.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
7251
7279
  return;
7252
7280
  }
7253
- this.channelManager && this.currentState === "connected" && this.channelManager.managerState !== "connected" && (A.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
7281
+ this.channelManager && this.currentState === "connected" && this.channelManager.managerState !== "connected" && (w.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
7254
7282
  }
7255
7283
  /**
7256
7284
  * Try to handle joined state - only proceeds if both channels are connected and GlobalState is received.
@@ -7268,130 +7296,150 @@ class kl {
7268
7296
  sendProtocolMessage: (r) => this.sendProtocolMessage(r),
7269
7297
  sessionId: this._sessionId
7270
7298
  }), await this.config.onJoined?.();
7271
- const e = Je(Xe(), this._sessionId ?? 0);
7299
+ const e = Qe(Je(), this._sessionId ?? 0);
7272
7300
  this.sendProtocolMessage(e);
7273
7301
  } catch (e) {
7274
- A.error("onJoined callback error:", e);
7275
- const r = Je(Xe(), this._sessionId ?? 0);
7302
+ w.error("onJoined callback error:", e);
7303
+ const r = Qe(Je(), this._sessionId ?? 0);
7276
7304
  this.sendProtocolMessage(r);
7277
7305
  }
7278
7306
  }
7307
+ /**
7308
+ * Set up listener for external token from parent window.
7309
+ * Returns cleanup function to remove the listener.
7310
+ */
7311
+ setupExternalTokenListener() {
7312
+ const e = (r) => {
7313
+ r.data?.type === "IKON_PREVIEW_TOKEN" && typeof r.data.serverUrl == "string" && (w.info("Received external token from parent window"), this.handleExternalToken(r.data.serverUrl).catch((n) => {
7314
+ w.error("Failed to connect with external token:", n), this.config.onError?.(n instanceof Error ? n : new Error(String(n))), this.setState("offlineError");
7315
+ }));
7316
+ };
7317
+ return window.addEventListener("message", e), w.debug("External token listener registered"), () => {
7318
+ window.removeEventListener("message", e), w.debug("External token listener removed");
7319
+ };
7320
+ }
7321
+ /**
7322
+ * Handle external token injection from parent window.
7323
+ */
7324
+ async handleExternalToken(e) {
7325
+ w.info("Connecting with external token"), await this.executeConnection(() => Te(e, this.abortController.signal));
7326
+ }
7279
7327
  }
7280
- function Ul(t) {
7281
- return t === "connecting" || t === "connectingSlow" || t === "reconnecting";
7328
+ function Ol(t) {
7329
+ return t === "waitingForToken" || t === "connecting" || t === "connectingSlow" || t === "reconnecting";
7282
7330
  }
7283
- function Dl(t) {
7331
+ function Ll(t) {
7284
7332
  return t === "connected";
7285
7333
  }
7286
- function Ml(t) {
7334
+ function vl(t) {
7287
7335
  return t === "offline" || t === "offlineError" || t === "idle";
7288
7336
  }
7289
- function Ol(t) {
7337
+ function Pl(t) {
7290
7338
  return t === "offlineError";
7291
7339
  }
7292
- const vr = /* @__PURE__ */ new Map();
7340
+ const Fr = /* @__PURE__ */ new Map();
7293
7341
  for (const [t, e] of Object.entries(S))
7294
- typeof e == "number" && vr.set(e, t);
7295
- function Ll(t) {
7296
- return vr.get(t) ?? `UNKNOWN_${t}`;
7342
+ typeof e == "number" && Fr.set(e, t);
7343
+ function Fl(t) {
7344
+ return Fr.get(t) ?? `UNKNOWN_${t}`;
7297
7345
  }
7298
- const Pr = 1e3, Fr = Ir.INFO;
7299
- let O = [], Ue = Pr, Br = Fr, De = null;
7300
- function dl(t) {
7301
- t.level < Br || (O.push(t), O.length > Ue && (O = O.slice(-Ue)));
7346
+ const Br = 1e3, xr = _r.INFO;
7347
+ let O = [], Me = Br, Gr = xr, Oe = null;
7348
+ function pl(t) {
7349
+ t.level < Gr || (O.push(t), O.length > Me && (O = O.slice(-Me)));
7302
7350
  }
7303
- function fl(t) {
7304
- Ue = t?.maxBufferSize ?? Pr, Br = t?.minLevel ?? Fr, O = [], Ca(dl);
7351
+ function Il(t) {
7352
+ Me = t?.maxBufferSize ?? Br, Gr = t?.minLevel ?? xr, O = [], Ra(pl);
7305
7353
  }
7306
- function vl(t) {
7307
- De = t;
7354
+ function Bl(t) {
7355
+ Oe = t;
7308
7356
  }
7309
- function Pl() {
7357
+ function xl() {
7310
7358
  return O;
7311
7359
  }
7312
- function El() {
7360
+ function ml() {
7313
7361
  const t = O;
7314
7362
  return O = [], t;
7315
7363
  }
7316
- function Fl() {
7317
- if (!De || O.length === 0)
7364
+ function Gl() {
7365
+ if (!Oe || O.length === 0)
7318
7366
  return 0;
7319
- const t = El();
7320
- return De(t), t.length;
7367
+ const t = ml();
7368
+ return Oe(t), t.length;
7321
7369
  }
7322
- function Bl() {
7370
+ function Vl() {
7323
7371
  O = [];
7324
7372
  }
7325
- function Gl() {
7373
+ function Wl() {
7326
7374
  return O.length;
7327
7375
  }
7328
- fl();
7376
+ Il();
7329
7377
  export {
7330
7378
  y as AuthenticationError,
7331
- Oa as Channel,
7332
- La as ChannelManager,
7333
- Il as ChannelNotFoundError,
7379
+ va as Channel,
7380
+ Pa as ChannelManager,
7381
+ Tl as ChannelNotFoundError,
7334
7382
  X as ClientType,
7335
- Ve as ConnectionError,
7383
+ He as ConnectionError,
7336
7384
  J as ContextType,
7337
- hl as EndpointSelector,
7385
+ fl as EndpointSelector,
7338
7386
  k as EntrypointType,
7339
- Nc as FunctionRegistry,
7340
- Nl as IKON_AUTH_BASE_URL,
7341
- rt as IKON_AUTH_URL_DEV,
7342
- tt as IKON_AUTH_URL_PROD,
7387
+ Cc as FunctionRegistry,
7388
+ bl as IKON_AUTH_BASE_URL,
7389
+ nt as IKON_AUTH_URL_DEV,
7390
+ rt as IKON_AUTH_URL_PROD,
7343
7391
  pe as IKON_BACKEND_URL_DEV,
7344
- be as IKON_BACKEND_URL_PROD,
7345
- tl as IkonAudioCapture,
7346
- je as IkonAudioPlayback,
7347
- kl as IkonClient,
7348
- il as IkonImageCapture,
7349
- Xc as IkonMedia,
7350
- ul as IkonMediaCapture,
7351
- ll as IkonVideoCapture,
7352
- zc as IkonVideoPlayback,
7353
- We as KeepaliveTimeoutError,
7354
- Ir as LogLevel,
7355
- Na as MaxRetriesExceededError,
7356
- _l as NoChannelsError,
7392
+ ke as IKON_BACKEND_URL_PROD,
7393
+ nl as IkonAudioCapture,
7394
+ ze as IkonAudioPlayback,
7395
+ Ml as IkonClient,
7396
+ al as IkonImageCapture,
7397
+ Qc as IkonMedia,
7398
+ dl as IkonMediaCapture,
7399
+ hl as IkonVideoCapture,
7400
+ Jc as IkonVideoPlayback,
7401
+ Ke as KeepaliveTimeoutError,
7402
+ _r as LogLevel,
7403
+ Ca as MaxRetriesExceededError,
7404
+ wl as NoChannelsError,
7357
7405
  S as Opcode,
7358
- ga as ProvisioningTimeoutError,
7359
- ml as SpaceNotFoundError,
7406
+ ba as ProvisioningTimeoutError,
7407
+ Sl as SpaceNotFoundError,
7360
7408
  W as TransportError,
7361
7409
  Z as UserType,
7362
- pl as asProtocolMessage,
7363
- Al as clearDeviceId,
7364
- Bl as clearLogBuffer,
7410
+ _l as asProtocolMessage,
7411
+ gl as clearDeviceId,
7412
+ Vl as clearLogBuffer,
7365
7413
  L as createLogger,
7366
- bl as deriveAuthUrl,
7367
- Cl as deriveBackendType,
7368
- gl as deriveBackendUrl,
7369
- yl as extractUserIdFromToken,
7370
- Fl as flushLogs,
7371
- Pl as getBufferedLogs,
7372
- Gl as getLogBufferSize,
7373
- Sl as getLogLevel,
7374
- wl as getLogSink,
7375
- Ll as getOpcodeName,
7376
- $e as getOrCreateDeviceId,
7377
- fl as initializeLogSink,
7378
- Rr as isAudioWorkletSupported,
7379
- nt as isBrowserEnvironment,
7380
- Ke as isCloudEnvironment,
7381
- Dl as isConnected,
7382
- Ul as isConnecting,
7383
- Ol as isError,
7384
- Ml as isOffline,
7414
+ Ul as deriveAuthUrl,
7415
+ kl as deriveBackendType,
7416
+ Rl as deriveBackendUrl,
7417
+ Cl as extractUserIdFromToken,
7418
+ Gl as flushLogs,
7419
+ xl as getBufferedLogs,
7420
+ Wl as getLogBufferSize,
7421
+ yl as getLogLevel,
7422
+ Nl as getLogSink,
7423
+ Fl as getOpcodeName,
7424
+ Ye as getOrCreateDeviceId,
7425
+ Il as initializeLogSink,
7426
+ Ur as isAudioWorkletSupported,
7427
+ st as isBrowserEnvironment,
7428
+ je as isCloudEnvironment,
7429
+ Ll as isConnected,
7430
+ Ol as isConnecting,
7431
+ Pl as isError,
7432
+ vl as isOffline,
7385
7433
  le as isSharedArrayBufferSupported,
7386
- mr as isWebTransportSupported,
7387
- Rl as parseUrlParams,
7434
+ Tr as isWebTransportSupported,
7435
+ Dl as parseUrlParams,
7388
7436
  ue as readOpcode,
7389
7437
  ce as readOpcodeGroup,
7390
7438
  ne as readProtocolMessageHeaders,
7391
- Tc as registerBrowserFunctions,
7392
- Tl as setLogLevel,
7393
- Ca as setLogSink,
7394
- vl as setSendLogsCallback,
7395
- El as takeBufferedLogs,
7396
- gc as withResultData
7439
+ wc as registerBrowserFunctions,
7440
+ Al as setLogLevel,
7441
+ Ra as setLogSink,
7442
+ Bl as setSendLogsCallback,
7443
+ ml as takeBufferedLogs,
7444
+ bc as withResultData
7397
7445
  };