@ikonai/sdk 1.0.5 → 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,7 +1,7 @@
1
- const xr = {
1
+ const Wr = {
2
2
  Compressed: 8
3
3
  };
4
- function ml(t) {
4
+ function _l(t) {
5
5
  return t;
6
6
  }
7
7
  function ue(t) {
@@ -35,7 +35,7 @@ function ne(t) {
35
35
  flags: d
36
36
  };
37
37
  }
38
- async function Oe(t, e, r) {
38
+ async function Le(t, e, r) {
39
39
  const n = se(t), s = ne(n);
40
40
  if (e !== void 0 && s.opcode !== e)
41
41
  throw new Error(`Unexpected opcode ${s.opcode}`);
@@ -43,7 +43,7 @@ async function Oe(t, e, r) {
43
43
  throw new Error(`Unexpected payload type ${s.payloadType}`);
44
44
  const i = 27 + s.targetIds.length * 4;
45
45
  let o = n.subarray(i, s.length);
46
- return (s.flags & xr.Compressed) !== 0 && (o = await Vr(o)), o;
46
+ return (s.flags & Wr.Compressed) !== 0 && (o = await Hr(o)), o;
47
47
  }
48
48
  function F(t, e, r, n, s) {
49
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);
@@ -53,7 +53,7 @@ function F(t, e, r, n, s) {
53
53
  E.setUint32(m, c[I] >>> 0, !0), m += 4;
54
54
  return h.set(e, f), h;
55
55
  }
56
- async function Vr(t) {
56
+ async function Hr(t) {
57
57
  if (typeof DecompressionStream > "u")
58
58
  throw new Error("DecompressionStream not supported");
59
59
  const e = new DecompressionStream("gzip"), r = e.writable.getWriter(), n = new Uint8Array(t);
@@ -72,7 +72,7 @@ async function Vr(t) {
72
72
  return a;
73
73
  }
74
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 || {});
75
- const ht = 161, dt = 162, he = new TextEncoder(), Wr = new TextDecoder("utf-8", { fatal: !0 });
75
+ const ht = 161, dt = 162, he = new TextEncoder(), Kr = new TextDecoder("utf-8", { fatal: !0 });
76
76
  class D {
77
77
  constructor(e = 1) {
78
78
  this.version = e, this.buffer.writeByte(ht), this.buffer.writeVarUInt(e >>> 0);
@@ -127,7 +127,7 @@ class D {
127
127
  this.writeVariableField(e, 9, i);
128
128
  }
129
129
  writeDictionaryField(e, r, n, s) {
130
- const i = new Le(r, n);
130
+ const i = new ve(r, n);
131
131
  s(i);
132
132
  const o = i.finish();
133
133
  this.writeVariableField(e, 10, o);
@@ -142,7 +142,7 @@ class D {
142
142
  this.writeFieldHeader(e, r, n.length), this.buffer.writeBytes(n);
143
143
  }
144
144
  writeFieldHeader(e, r, n) {
145
- this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(de(r)), jr(r) && this.buffer.writeVarUInt(n >>> 0);
145
+ this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(de(r)), Xr(r) && this.buffer.writeVarUInt(n >>> 0);
146
146
  }
147
147
  }
148
148
  class _e {
@@ -242,7 +242,7 @@ class _e {
242
242
  10
243
243
  /* Dict */
244
244
  ), this.count++;
245
- const s = new Le(e, r);
245
+ const s = new ve(e, r);
246
246
  n(s);
247
247
  const i = s.finish();
248
248
  this.payload.writeBytes(i);
@@ -256,9 +256,9 @@ class _e {
256
256
  throw new Error(`Array element type is ${b[this.elementType]}, expected ${b[e]}`);
257
257
  }
258
258
  }
259
- class Le {
259
+ class ve {
260
260
  constructor(e, r) {
261
- this.keyType = e, this.valueType = r, Fe(e);
261
+ this.keyType = e, this.valueType = r, Be(e);
262
262
  }
263
263
  payload = new H();
264
264
  count = 0;
@@ -266,7 +266,7 @@ class Le {
266
266
  beginEntry() {
267
267
  if (this.entryOpen)
268
268
  throw new Error("Previous dictionary entry not completed");
269
- return this.count++, this.entryOpen = !0, new Hr(this.keyType, this.valueType, this.payload, () => {
269
+ return this.count++, this.entryOpen = !0, new $r(this.keyType, this.valueType, this.payload, () => {
270
270
  this.entryOpen = !1;
271
271
  });
272
272
  }
@@ -277,7 +277,7 @@ class Le {
277
277
  return e.writeByte(de(this.keyType)), e.writeByte(de(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
278
278
  }
279
279
  }
280
- class Hr {
280
+ class $r {
281
281
  constructor(e, r, n, s) {
282
282
  this.keyType = e, this.valueType = r, this.payload = n, this.onComplete = s;
283
283
  }
@@ -447,7 +447,7 @@ class Hr {
447
447
  10
448
448
  /* Dict */
449
449
  );
450
- const s = new Le(e, r);
450
+ const s = new ve(e, r);
451
451
  n(s);
452
452
  const i = s.finish();
453
453
  this.payload.writeBytes(i), this.valueWritten = !0;
@@ -488,7 +488,7 @@ class z {
488
488
  return null;
489
489
  if (this.offset + 5 > this.buffer.length)
490
490
  throw new Error("Teleport object truncated");
491
- const e = zr(this.buffer, this.offset);
491
+ const e = Jr(this.buffer, this.offset);
492
492
  this.offset += 4;
493
493
  const r = this.buffer[this.offset++], n = r >> 4 & 15;
494
494
  if ((r & 15) !== 0)
@@ -501,7 +501,7 @@ class z {
501
501
  const o = { offset: this.offset }, a = U(this.buffer, o, "InvalidLength");
502
502
  C(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
503
503
  }
504
- return new $r(e, n, i);
504
+ return new Yr(e, n, i);
505
505
  }
506
506
  }
507
507
  class P {
@@ -566,7 +566,7 @@ class P {
566
566
  return this.ensureType(
567
567
  12
568
568
  /* String */
569
- ), Wr.decode(this.payload);
569
+ ), Kr.decode(this.payload);
570
570
  }
571
571
  asGuid() {
572
572
  return this.ensureType(
@@ -584,20 +584,20 @@ class P {
584
584
  return this.ensureType(
585
585
  9
586
586
  /* Array */
587
- ), ve.create(this.payload);
587
+ ), Pe.create(this.payload);
588
588
  }
589
589
  asDictionary() {
590
590
  return this.ensureType(
591
591
  10
592
592
  /* Dict */
593
- ), Pe.create(this.payload);
593
+ ), Fe.create(this.payload);
594
594
  }
595
595
  ensureType(e) {
596
596
  if (this.type !== e)
597
597
  throw new Error(`Teleport value has type ${b[this.type]}, expected ${b[e]}`);
598
598
  }
599
599
  }
600
- class $r extends P {
600
+ class Yr extends P {
601
601
  constructor(e, r, n) {
602
602
  super(r, n), this.fieldId = e;
603
603
  }
@@ -605,7 +605,7 @@ class $r extends P {
605
605
  return this.type === 1;
606
606
  }
607
607
  }
608
- class ve {
608
+ class Pe {
609
609
  payload;
610
610
  elementType;
611
611
  count;
@@ -621,7 +621,7 @@ class ve {
621
621
  this.count = U(e, n, "ArrayMalformed"), this.offset = n.offset;
622
622
  }
623
623
  static create(e) {
624
- return new ve(se(e));
624
+ return new Pe(se(e));
625
625
  }
626
626
  next() {
627
627
  if (this.index >= this.count) {
@@ -661,7 +661,7 @@ class ve {
661
661
  return this.offset = e.offset + r, new q(11, n);
662
662
  }
663
663
  case 9: {
664
- const e = Be(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);
665
665
  return this.offset += e, new q(9, r);
666
666
  }
667
667
  case 10: {
@@ -678,7 +678,7 @@ class q extends P {
678
678
  super(e, r);
679
679
  }
680
680
  }
681
- class Pe {
681
+ class Fe {
682
682
  payload;
683
683
  keyType;
684
684
  valueType;
@@ -690,12 +690,12 @@ class Pe {
690
690
  throw new Error("Dictionary payload too short");
691
691
  if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
692
692
  throw new Error("Dictionary key/value flags must be zero");
693
- Fe(this.keyType);
693
+ Be(this.keyType);
694
694
  const r = { offset: 2 };
695
695
  this.count = U(e, r, "DictMalformed"), this.offset = r.offset;
696
696
  }
697
697
  static create(e) {
698
- return new Pe(se(e));
698
+ return new Fe(se(e));
699
699
  }
700
700
  next() {
701
701
  if (this.index >= this.count) {
@@ -704,7 +704,7 @@ class Pe {
704
704
  return null;
705
705
  }
706
706
  const e = this.readKey(), r = this.readValue();
707
- return this.index++, new Kr(e, r);
707
+ return this.index++, new jr(e, r);
708
708
  }
709
709
  readKey() {
710
710
  const e = Y(this.keyType);
@@ -737,7 +737,7 @@ class Pe {
737
737
  return this.offset = e.offset + r, new P(11, n);
738
738
  }
739
739
  case 9: {
740
- const e = Be(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);
741
741
  return this.offset += e, new P(9, r);
742
742
  }
743
743
  case 10: {
@@ -763,7 +763,7 @@ class Pe {
763
763
  }
764
764
  }
765
765
  }
766
- class Kr {
766
+ class jr {
767
767
  constructor(e, r) {
768
768
  this.key = e, this.value = r;
769
769
  }
@@ -897,7 +897,7 @@ function U(t, e, r) {
897
897
  for (; e.offset < t.length; ) {
898
898
  const o = t[e.offset++];
899
899
  if (i++, n |= (o & 127) << s, (o & 128) === 0) {
900
- if (i !== Yr(n))
900
+ if (i !== zr(n))
901
901
  throw new Error("Teleport VarUInt is not canonical");
902
902
  return n >>> 0;
903
903
  }
@@ -906,7 +906,7 @@ function U(t, e, r) {
906
906
  }
907
907
  throw new Error(r);
908
908
  }
909
- function Yr(t) {
909
+ function zr(t) {
910
910
  return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
911
911
  }
912
912
  function de(t, e = 0) {
@@ -914,7 +914,7 @@ function de(t, e = 0) {
914
914
  throw new Error("Teleport flags must fit into 4 bits");
915
915
  return (t & 15) << 4 | e & 15;
916
916
  }
917
- function jr(t) {
917
+ function Xr(t) {
918
918
  return t === 12 || t === 13 || t === 9 || t === 11 || t === 10;
919
919
  }
920
920
  function Y(t) {
@@ -937,7 +937,7 @@ function Y(t) {
937
937
  return -1;
938
938
  }
939
939
  }
940
- function Fe(t) {
940
+ function Be(t) {
941
941
  if (t === 9 || t === 11 || t === 10 || t === 1)
942
942
  throw new Error("Dictionary keys must be primitive Teleport types");
943
943
  }
@@ -945,10 +945,10 @@ function C(t, e, r) {
945
945
  if (e < 0 || r < 0 || e + r > t.length)
946
946
  throw new Error("Teleport payload exceeds bounds");
947
947
  }
948
- function zr(t, e) {
948
+ function Jr(t, e) {
949
949
  return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
950
950
  }
951
- function Be(t, e) {
951
+ function xe(t, e) {
952
952
  if (e >= t.length)
953
953
  throw new Error("Array payload exceeds bounds");
954
954
  const r = t[e], n = r >> 4 & 15;
@@ -961,7 +961,7 @@ function Be(t, e) {
961
961
  }
962
962
  let a = s.offset;
963
963
  for (let c = 0; c < i; c++)
964
- a = Ne(n, t, a, "ArrayMalformed");
964
+ a = ge(n, t, a, "ArrayMalformed");
965
965
  return a - e;
966
966
  }
967
967
  function Ge(t, e) {
@@ -970,14 +970,14 @@ function Ge(t, e) {
970
970
  const r = t[e] >> 4 & 15, n = t[e + 1] >> 4 & 15;
971
971
  if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
972
972
  throw new Error("Dictionary key/value flags must be zero");
973
- Fe(r);
973
+ Be(r);
974
974
  const s = { offset: e + 2 }, i = U(t, s, "DictMalformed");
975
975
  let o = s.offset;
976
976
  for (let a = 0; a < i; a++)
977
- o = Ne(r, t, o, "DictMalformed"), o = Ne(n, t, o, "DictMalformed");
977
+ o = ge(r, t, o, "DictMalformed"), o = ge(n, t, o, "DictMalformed");
978
978
  return o - e;
979
979
  }
980
- function Ne(t, e, r, n) {
980
+ function ge(t, e, r, n) {
981
981
  const s = Y(t);
982
982
  if (s >= 0)
983
983
  return C(e, r, s), r + s;
@@ -992,7 +992,7 @@ function Ne(t, e, r, n) {
992
992
  return C(e, i.offset, o), i.offset + o;
993
993
  }
994
994
  case 9:
995
- return r + Be(e, r);
995
+ return r + xe(e, r);
996
996
  case 10:
997
997
  return r + Ge(e, r);
998
998
  default:
@@ -1005,309 +1005,309 @@ function Xe(t) {
1005
1005
  function se(t) {
1006
1006
  return t instanceof Uint8Array ? t : new Uint8Array(t);
1007
1007
  }
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 || {}), xe = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(xe || {}), 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 It = 1, Xr = 1048637, Jr = 727023925, Qr = 3395085689;
1010
- function Zr(t) {
1011
- const e = new D(It);
1012
- 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();
1013
1013
  }
1014
- function qr(t, e) {
1015
- e.writeGuidField(Jr, t.ActionId), e.writeStringField(Qr, t.PayloadJson);
1014
+ function tn(t, e) {
1015
+ e.writeGuidField(Zr, t.ActionId), e.writeStringField(qr, t.PayloadJson);
1016
1016
  }
1017
- function en(t, e, r) {
1018
- const n = Zr(t);
1019
- return F(Xr, n, It, e, r);
1017
+ function rn(t, e, r) {
1018
+ const n = en(t);
1019
+ return F(Qr, n, _t, e, r);
1020
1020
  }
1021
- const tn = 467348717, rn = 972460562, nn = 1911490601, sn = 2603556958, on = 3609695522, an = 4094837378, cn = 4257460908;
1022
- function ln(t) {
1021
+ const nn = 467348717, sn = 972460562, on = 1911490601, an = 2603556958, cn = 3609695522, ln = 4094837378, un = 4257460908;
1022
+ function hn(t) {
1023
1023
  const e = {};
1024
- return mt(e), e;
1024
+ return Tt(e), e;
1025
1025
  }
1026
- function mt(t) {
1026
+ function Tt(t) {
1027
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;
1028
1028
  }
1029
- function un(t, e) {
1030
- const r = e ?? ln();
1031
- return mt(r), hn(t, r), r;
1029
+ function dn(t, e) {
1030
+ const r = e ?? hn();
1031
+ return Tt(r), fn(t, r), r;
1032
1032
  }
1033
- function hn(t, e) {
1033
+ function fn(t, e) {
1034
1034
  let r;
1035
1035
  for (; (r = t.next()) !== null; )
1036
1036
  switch (r.fieldId) {
1037
- case tn: {
1037
+ case nn: {
1038
1038
  if (r.isNull) throw new Error();
1039
1039
  e.EnumerationId = r.asGuid();
1040
1040
  break;
1041
1041
  }
1042
- case rn: {
1042
+ case sn: {
1043
1043
  if (r.isNull) throw new Error();
1044
1044
  e.EnumerableItemTypeName = r.asString();
1045
1045
  break;
1046
1046
  }
1047
- case nn: {
1047
+ case on: {
1048
1048
  if (r.isNull) throw new Error();
1049
1049
  e.ValueJson = r.asString();
1050
1050
  break;
1051
1051
  }
1052
- case sn: {
1052
+ case an: {
1053
1053
  if (r.isNull) throw new Error();
1054
1054
  e.IsEnumerable = r.asBool();
1055
1055
  break;
1056
1056
  }
1057
- case on: {
1057
+ case cn: {
1058
1058
  if (r.isNull) throw new Error();
1059
1059
  e.TypeName = r.asString();
1060
1060
  break;
1061
1061
  }
1062
- case an: {
1062
+ case ln: {
1063
1063
  if (r.isNull) throw new Error();
1064
1064
  e.ValueData = r.asBinary();
1065
1065
  break;
1066
1066
  }
1067
- case cn: {
1067
+ case un: {
1068
1068
  if (r.isNull) throw new Error();
1069
1069
  e.ParameterIndex = r.asInt32();
1070
1070
  break;
1071
1071
  }
1072
1072
  }
1073
1073
  }
1074
- const dn = 265814330, fn = 1368629611, En = 2431514951, pn = 2914494629, In = 3284746250, mn = 4101844078;
1075
- function _t(t) {
1074
+ const En = 265814330, pn = 1368629611, In = 2431514951, mn = 2914494629, _n = 3284746250, Tn = 4101844078;
1075
+ function St(t) {
1076
1076
  const e = {};
1077
- return Tt(e), e;
1077
+ return wt(e), e;
1078
1078
  }
1079
- function Tt(t) {
1079
+ function wt(t) {
1080
1080
  return t.Description = "", t.Codec = ft.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t.ShapeSets = void 0, t;
1081
1081
  }
1082
- function _n(t, e) {
1083
- const r = e ?? _t();
1084
- return Tt(r), Tn(t, r), r;
1082
+ function Sn(t, e) {
1083
+ const r = e ?? St();
1084
+ return wt(r), wn(t, r), r;
1085
1085
  }
1086
- function Tn(t, e) {
1086
+ function wn(t, e) {
1087
1087
  let r;
1088
1088
  for (; (r = t.next()) !== null; )
1089
1089
  switch (r.fieldId) {
1090
- case dn: {
1090
+ case En: {
1091
1091
  if (r.isNull) {
1092
1092
  e.ShapeSets = void 0;
1093
1093
  break;
1094
1094
  }
1095
- e.ShapeSets = Sn(r.asArray());
1095
+ e.ShapeSets = An(r.asArray());
1096
1096
  break;
1097
1097
  }
1098
- case fn: {
1098
+ case pn: {
1099
1099
  if (r.isNull) throw new Error();
1100
1100
  e.Description = r.asString();
1101
1101
  break;
1102
1102
  }
1103
- case En: {
1103
+ case In: {
1104
1104
  if (r.isNull) throw new Error();
1105
1105
  e.Channels = r.asInt32();
1106
1106
  break;
1107
1107
  }
1108
- case pn: {
1108
+ case mn: {
1109
1109
  if (r.isNull) throw new Error();
1110
1110
  e.BitDepth = r.asInt32();
1111
1111
  break;
1112
1112
  }
1113
- case In: {
1113
+ case _n: {
1114
1114
  if (r.isNull) throw new Error();
1115
1115
  e.Codec = r.asInt32();
1116
1116
  break;
1117
1117
  }
1118
- case mn: {
1118
+ case Tn: {
1119
1119
  if (r.isNull) throw new Error();
1120
1120
  e.SampleRate = r.asInt32();
1121
1121
  break;
1122
1122
  }
1123
1123
  }
1124
1124
  }
1125
- function Sn(t) {
1125
+ function An(t) {
1126
1126
  const e = [];
1127
1127
  let r;
1128
1128
  for (; (r = t.next()) !== null; )
1129
- e.push(gn(r.asObject()));
1129
+ e.push(bn(r.asObject()));
1130
1130
  return e;
1131
1131
  }
1132
- const wn = 1107713536, An = 1154362099, yn = 1185721362;
1133
- function Nn(t) {
1132
+ const yn = 1107713536, Nn = 1154362099, gn = 1185721362;
1133
+ function Cn(t) {
1134
1134
  const e = {};
1135
- return St(e), e;
1135
+ return At(e), e;
1136
1136
  }
1137
- function St(t) {
1137
+ function At(t) {
1138
1138
  return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
1139
1139
  }
1140
- function gn(t, e) {
1141
- const r = e ?? Nn();
1142
- return St(r), Cn(t, r), r;
1140
+ function bn(t, e) {
1141
+ const r = e ?? Cn();
1142
+ return At(r), Rn(t, r), r;
1143
1143
  }
1144
- function Cn(t, e) {
1144
+ function Rn(t, e) {
1145
1145
  let r;
1146
1146
  for (; (r = t.next()) !== null; )
1147
1147
  switch (r.fieldId) {
1148
- case wn: {
1148
+ case yn: {
1149
1149
  if (r.isNull) throw new Error();
1150
1150
  e.Name = r.asString();
1151
1151
  break;
1152
1152
  }
1153
- case An: {
1153
+ case Nn: {
1154
1154
  if (r.isNull) throw new Error();
1155
1155
  e.SetId = r.asUInt32();
1156
1156
  break;
1157
1157
  }
1158
- case yn: {
1158
+ case gn: {
1159
1159
  if (r.isNull) throw new Error();
1160
- e.ShapeNames = bn(r.asArray());
1160
+ e.ShapeNames = kn(r.asArray());
1161
1161
  break;
1162
1162
  }
1163
1163
  }
1164
1164
  }
1165
- function bn(t) {
1165
+ function kn(t) {
1166
1166
  const e = [];
1167
1167
  let r;
1168
1168
  for (; (r = t.next()) !== null; )
1169
1169
  e.push(r.asString());
1170
1170
  return e;
1171
1171
  }
1172
- const Rn = 76337612, kn = 185396121, Un = 388632637, Dn = 417197284, Mn = 469070965, On = 470595159, Ln = 781727218, vn = 834078886, Pn = 1043273762, Fn = 1236999138, Bn = 1368629611, Gn = 1715899485, xn = 1942830531, Vn = 1999510636, Wn = 2079864626, Hn = 2142346422, $n = 2598291686, Kn = 2719718823, Yn = 2810953526, jn = 2840065720, zn = 2885165957, Xn = 3586157513, Jn = 3717933110, Qn = 4062655306;
1173
- function ge(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) {
1174
1174
  const e = {};
1175
- return wt(e), e;
1175
+ return yt(e), e;
1176
1176
  }
1177
- function wt(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 = xe.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;
1179
1179
  }
1180
- function Ce(t, e) {
1181
- const r = e ?? ge();
1182
- return wt(r), Zn(t, r), r;
1180
+ function be(t, e) {
1181
+ const r = e ?? Ce();
1182
+ return yt(r), es(t, r), r;
1183
1183
  }
1184
- function Zn(t, e) {
1184
+ function es(t, e) {
1185
1185
  let r;
1186
1186
  for (; (r = t.next()) !== null; )
1187
1187
  switch (r.fieldId) {
1188
- case Rn: {
1188
+ case Un: {
1189
1189
  if (r.isNull) throw new Error();
1190
1190
  e.DeviceId = r.asString();
1191
1191
  break;
1192
1192
  }
1193
- case kn: {
1193
+ case Dn: {
1194
1194
  if (r.isNull) throw new Error();
1195
1195
  e.InstallId = r.asString();
1196
1196
  break;
1197
1197
  }
1198
- case Un: {
1198
+ case Mn: {
1199
1199
  if (r.isNull) throw new Error();
1200
1200
  e.UserAgent = r.asString();
1201
1201
  break;
1202
1202
  }
1203
- case Dn: {
1203
+ case On: {
1204
1204
  if (r.isNull) throw new Error();
1205
1205
  e.ContextType = r.asInt32();
1206
1206
  break;
1207
1207
  }
1208
- case Mn: {
1208
+ case Ln: {
1209
1209
  if (r.isNull) throw new Error();
1210
1210
  e.HasInput = r.asBool();
1211
1211
  break;
1212
1212
  }
1213
- case On: {
1213
+ case vn: {
1214
1214
  if (r.isNull) throw new Error();
1215
1215
  e.UserType = r.asInt32();
1216
1216
  break;
1217
1217
  }
1218
- case Ln: {
1218
+ case Pn: {
1219
1219
  if (r.isNull) throw new Error();
1220
1220
  e.UserId = r.asString();
1221
1221
  break;
1222
1222
  }
1223
- case vn: {
1223
+ case Fn: {
1224
1224
  if (r.isNull) throw new Error();
1225
1225
  e.ProductId = r.asString();
1226
1226
  break;
1227
1227
  }
1228
- case Pn: {
1228
+ case Bn: {
1229
1229
  if (r.isNull) throw new Error();
1230
1230
  e.AuthSessionId = r.asString();
1231
1231
  break;
1232
1232
  }
1233
- case Fn: {
1233
+ case xn: {
1234
1234
  if (r.isNull) throw new Error();
1235
1235
  e.ReceiveAllMessages = r.asBool();
1236
1236
  break;
1237
1237
  }
1238
- case Bn: {
1238
+ case Gn: {
1239
1239
  if (r.isNull) throw new Error();
1240
1240
  e.Description = r.asString();
1241
1241
  break;
1242
1242
  }
1243
- case Gn: {
1243
+ case Vn: {
1244
1244
  if (r.isNull) throw new Error();
1245
1245
  e.Locale = r.asString();
1246
1246
  break;
1247
1247
  }
1248
- case xn: {
1248
+ case Wn: {
1249
1249
  if (r.isNull) throw new Error();
1250
1250
  e.SdkType = r.asInt32();
1251
1251
  break;
1252
1252
  }
1253
- case Vn: {
1253
+ case Hn: {
1254
1254
  if (r.isNull) throw new Error();
1255
1255
  e.SessionId = r.asInt32();
1256
1256
  break;
1257
1257
  }
1258
- case Wn: {
1258
+ case Kn: {
1259
1259
  if (r.isNull) throw new Error();
1260
1260
  e.PreciseJoinedAt = r.asUInt64();
1261
1261
  break;
1262
1262
  }
1263
- case Hn: {
1263
+ case $n: {
1264
1264
  if (r.isNull) throw new Error();
1265
1265
  e.PayloadType = r.asInt32();
1266
1266
  break;
1267
1267
  }
1268
- case $n: {
1268
+ case Yn: {
1269
1269
  if (r.isNull) throw new Error();
1270
1270
  e.VersionId = r.asString();
1271
1271
  break;
1272
1272
  }
1273
- case Kn: {
1273
+ case jn: {
1274
1274
  if (r.isNull) throw new Error();
1275
1275
  e.UniqueSessionId = r.asString();
1276
1276
  break;
1277
1277
  }
1278
- case Yn: {
1278
+ case zn: {
1279
1279
  if (r.isNull) throw new Error();
1280
1280
  e.ClientType = r.asInt32();
1281
1281
  break;
1282
1282
  }
1283
- case jn: {
1283
+ case Xn: {
1284
1284
  if (r.isNull) throw new Error();
1285
1285
  e.IsReady = r.asBool();
1286
1286
  break;
1287
1287
  }
1288
- case zn: {
1288
+ case Jn: {
1289
1289
  if (r.isNull) throw new Error();
1290
- e.Parameters = qn(r.asDictionary());
1290
+ e.Parameters = ts(r.asDictionary());
1291
1291
  break;
1292
1292
  }
1293
- case Xn: {
1293
+ case Qn: {
1294
1294
  if (r.isNull) throw new Error();
1295
1295
  e.IsInternal = r.asBool();
1296
1296
  break;
1297
1297
  }
1298
- case Jn: {
1298
+ case Zn: {
1299
1299
  if (r.isNull) throw new Error();
1300
1300
  e.ChannelLocale = r.asString();
1301
1301
  break;
1302
1302
  }
1303
- case Qn: {
1303
+ case qn: {
1304
1304
  if (r.isNull) throw new Error();
1305
1305
  e.EmbeddedSpaceId = r.asString();
1306
1306
  break;
1307
1307
  }
1308
1308
  }
1309
1309
  }
1310
- function qn(t) {
1310
+ function ts(t) {
1311
1311
  const e = /* @__PURE__ */ Object.create(null);
1312
1312
  let r;
1313
1313
  for (; (r = t.next()) !== null; ) {
@@ -1316,138 +1316,138 @@ function qn(t) {
1316
1316
  }
1317
1317
  return e;
1318
1318
  }
1319
- const es = 746516514, ts = 877841741, rs = 1175184220, ns = 1368629611, ss = 2341021724, is = 3167053791, os = 3686066300;
1320
- function as(t) {
1319
+ const rs = 746516514, ns = 877841741, ss = 1175184220, is = 1368629611, os = 2341021724, as = 3167053791, cs = 3686066300;
1320
+ function ls(t) {
1321
1321
  const e = {};
1322
- return At(e), e;
1322
+ return Nt(e), e;
1323
1323
  }
1324
- function At(t) {
1324
+ function Nt(t) {
1325
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;
1326
1326
  }
1327
- function cs(t, e) {
1328
- const r = e ?? as();
1329
- return At(r), ls(t, r), r;
1327
+ function us(t, e) {
1328
+ const r = e ?? ls();
1329
+ return Nt(r), hs(t, r), r;
1330
1330
  }
1331
- function ls(t, e) {
1331
+ function hs(t, e) {
1332
1332
  let r;
1333
1333
  for (; (r = t.next()) !== null; )
1334
1334
  switch (r.fieldId) {
1335
- case es: {
1335
+ case rs: {
1336
1336
  if (r.isNull) throw new Error();
1337
1337
  e.AuthTicket = r.asBinary();
1338
1338
  break;
1339
1339
  }
1340
- case ts: {
1340
+ case ns: {
1341
1341
  if (r.isNull) throw new Error();
1342
1342
  e.Priority = r.asInt32();
1343
1343
  break;
1344
1344
  }
1345
- case rs: {
1345
+ case ss: {
1346
1346
  if (r.isNull) throw new Error();
1347
1347
  e.OpcodeGroupsFromServer = r.asInt32();
1348
1348
  break;
1349
1349
  }
1350
- case ns: {
1350
+ case is: {
1351
1351
  if (r.isNull) throw new Error();
1352
1352
  e.Description = r.asString();
1353
1353
  break;
1354
1354
  }
1355
- case ss: {
1355
+ case os: {
1356
1356
  if (r.isNull) throw new Error();
1357
1357
  e.Uri = r.asString();
1358
1358
  break;
1359
1359
  }
1360
- case is: {
1360
+ case as: {
1361
1361
  if (r.isNull) throw new Error();
1362
1362
  e.Type = r.asInt32();
1363
1363
  break;
1364
1364
  }
1365
- case os: {
1365
+ case cs: {
1366
1366
  if (r.isNull) throw new Error();
1367
1367
  e.OpcodeGroupsToServer = r.asInt32();
1368
1368
  break;
1369
1369
  }
1370
1370
  }
1371
1371
  }
1372
- const us = 65537, hs = 166277978, ds = 1482635149, fs = 1559330978, Es = 2802434353, ps = 3085883711, Is = 3669484338, ms = 3707543140, _s = 3712281496, Ts = 4160646707;
1373
- function Ss(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) {
1374
1374
  const e = {};
1375
- return yt(e), e;
1375
+ return gt(e), e;
1376
1376
  }
1377
- function yt(t) {
1378
- return t.ClientContext = ge(), t.ServerContext = ge(), 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;
1379
1379
  }
1380
- function ws(t, e) {
1380
+ function ys(t, e) {
1381
1381
  const r = z.create(t);
1382
- return As(r, e);
1382
+ return Ns(r, e);
1383
1383
  }
1384
- function As(t, e) {
1385
- const r = e ?? Ss();
1386
- return yt(r), ys(t, r), r;
1384
+ function Ns(t, e) {
1385
+ const r = e ?? As();
1386
+ return gt(r), gs(t, r), r;
1387
1387
  }
1388
- function ys(t, e) {
1388
+ function gs(t, e) {
1389
1389
  let r;
1390
1390
  for (; (r = t.next()) !== null; )
1391
1391
  switch (r.fieldId) {
1392
- case hs: {
1392
+ case fs: {
1393
1393
  if (r.isNull) throw new Error();
1394
1394
  e.CertHash = r.asString();
1395
1395
  break;
1396
1396
  }
1397
- case ds: {
1397
+ case Es: {
1398
1398
  if (r.isNull) throw new Error();
1399
- e.Entrypoints = gs(r.asArray());
1399
+ e.Entrypoints = bs(r.asArray());
1400
1400
  break;
1401
1401
  }
1402
- case fs: {
1402
+ case ps: {
1403
1403
  if (r.isNull) throw new Error();
1404
1404
  e.ChannelId = r.asString();
1405
1405
  break;
1406
1406
  }
1407
- case Es: {
1407
+ case Is: {
1408
1408
  if (r.isNull) throw new Error();
1409
- e.ClientContext = Ce(r.asObject());
1409
+ e.ClientContext = be(r.asObject());
1410
1410
  break;
1411
1411
  }
1412
- case ps: {
1412
+ case ms: {
1413
1413
  if (r.isNull) throw new Error();
1414
- e.ServerContext = Ce(r.asObject());
1414
+ e.ServerContext = be(r.asObject());
1415
1415
  break;
1416
1416
  }
1417
- case Is: {
1417
+ case _s: {
1418
1418
  if (r.isNull) throw new Error();
1419
- e.FeatureFlags = Cs(r.asDictionary());
1419
+ e.FeatureFlags = Rs(r.asDictionary());
1420
1420
  break;
1421
1421
  }
1422
- case ms: {
1422
+ case Ts: {
1423
1423
  if (r.isNull) throw new Error();
1424
1424
  e.SpaceId = r.asString();
1425
1425
  break;
1426
1426
  }
1427
- case _s: {
1427
+ case Ss: {
1428
1428
  if (r.isNull) throw new Error();
1429
1429
  e.PrimaryUserId = r.asString();
1430
1430
  break;
1431
1431
  }
1432
- case Ts: {
1432
+ case ws: {
1433
1433
  if (r.isNull) throw new Error();
1434
- e.ChannelTemplateId = r.asString();
1434
+ e.ChannelInstanceId = r.asString();
1435
1435
  break;
1436
1436
  }
1437
1437
  }
1438
1438
  }
1439
- async function Ns(t, e) {
1440
- const r = await Oe(t, us);
1441
- return ws(r, e);
1439
+ async function Cs(t, e) {
1440
+ const r = await Le(t, ds);
1441
+ return ys(r, e);
1442
1442
  }
1443
- function gs(t) {
1443
+ function bs(t) {
1444
1444
  const e = [];
1445
1445
  let r;
1446
1446
  for (; (r = t.next()) !== null; )
1447
- e.push(cs(r.asObject()));
1447
+ e.push(us(r.asObject()));
1448
1448
  return e;
1449
1449
  }
1450
- function Cs(t) {
1450
+ function Rs(t) {
1451
1451
  const e = /* @__PURE__ */ Object.create(null);
1452
1452
  let r;
1453
1453
  for (; (r = t.next()) !== null; ) {
@@ -1456,493 +1456,493 @@ function Cs(t) {
1456
1456
  }
1457
1457
  return e;
1458
1458
  }
1459
- function bs(t) {
1459
+ function ks(t) {
1460
1460
  const e = {};
1461
- return Rs(e), t && Object.assign(e, t), e;
1461
+ return Us(e), t && Object.assign(e, t), e;
1462
1462
  }
1463
- function Rs(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 = xe.Unknown, t;
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
1465
  }
1466
- const Nt = 1, ks = 1048632, Us = 3748161056, Ds = 4289118421;
1467
- function Ms(t) {
1466
+ const Ct = 1, Ds = 1048632, Ms = 3748161056, Os = 4289118421;
1467
+ function Ls(t) {
1468
1468
  const e = {};
1469
- return Os(e), t && Object.assign(e, t), e;
1469
+ return vs(e), t && Object.assign(e, t), e;
1470
1470
  }
1471
- function Os(t) {
1471
+ function vs(t) {
1472
1472
  return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t;
1473
1473
  }
1474
- function Ls(t) {
1475
- const e = new D(Nt);
1476
- return vs(t, e), e.finish();
1474
+ function Ps(t) {
1475
+ const e = new D(Ct);
1476
+ return Fs(t, e), e.finish();
1477
1477
  }
1478
- function vs(t, e) {
1479
- e.writeGuidField(Us, t.CallId), e.writeGuidField(Ds, t.InstanceId);
1478
+ function Fs(t, e) {
1479
+ e.writeGuidField(Ms, t.CallId), e.writeGuidField(Os, t.InstanceId);
1480
1480
  }
1481
- function Ps(t, e, r) {
1482
- const n = Ls(t);
1483
- return F(ks, n, Nt, e, r);
1481
+ function Bs(t, e, r) {
1482
+ const n = Ps(t);
1483
+ return F(Ds, n, Ct, e, r);
1484
1484
  }
1485
- const Fs = 1048601, Bs = 112005851, Gs = 814454131, xs = 976255570, Vs = 1123310456, Ws = 2885165957, Hs = 3748161056, $s = 4289118421;
1486
- function Ks(t) {
1485
+ const xs = 1048601, Gs = 112005851, Vs = 814454131, Ws = 976255570, Hs = 1123310456, Ks = 2885165957, $s = 3748161056, Ys = 4289118421;
1486
+ function js(t) {
1487
1487
  const e = {};
1488
- return gt(e), e;
1488
+ return bt(e), e;
1489
1489
  }
1490
- function gt(t) {
1490
+ function bt(t) {
1491
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;
1492
1492
  }
1493
- function Ys(t, e) {
1493
+ function zs(t, e) {
1494
1494
  const r = z.create(t);
1495
- return js(r, e);
1495
+ return Xs(r, e);
1496
1496
  }
1497
- function js(t, e) {
1498
- const r = e ?? Ks();
1499
- return gt(r), zs(t, r), r;
1497
+ function Xs(t, e) {
1498
+ const r = e ?? js();
1499
+ return bt(r), Js(t, r), r;
1500
1500
  }
1501
- function zs(t, e) {
1501
+ function Js(t, e) {
1502
1502
  let r;
1503
1503
  for (; (r = t.next()) !== null; )
1504
1504
  switch (r.fieldId) {
1505
- case Bs: {
1505
+ case Gs: {
1506
1506
  if (r.isNull) throw new Error();
1507
- e.Scopes = Js(r.asArray());
1507
+ e.Scopes = Zs(r.asArray());
1508
1508
  break;
1509
1509
  }
1510
- case Gs: {
1510
+ case Vs: {
1511
1511
  if (r.isNull) throw new Error();
1512
1512
  e.FunctionName = r.asString();
1513
1513
  break;
1514
1514
  }
1515
- case xs: {
1515
+ case Ws: {
1516
1516
  if (r.isNull) throw new Error();
1517
1517
  e.FunctionId = r.asGuid();
1518
1518
  break;
1519
1519
  }
1520
- case Vs: {
1520
+ case Hs: {
1521
1521
  if (r.isNull) throw new Error();
1522
1522
  e.ClientBackendToken = r.asString();
1523
1523
  break;
1524
1524
  }
1525
- case Ws: {
1525
+ case Ks: {
1526
1526
  if (r.isNull) throw new Error();
1527
- e.Parameters = Qs(r.asArray());
1527
+ e.Parameters = qs(r.asArray());
1528
1528
  break;
1529
1529
  }
1530
- case Hs: {
1530
+ case $s: {
1531
1531
  if (r.isNull) throw new Error();
1532
1532
  e.CallId = r.asGuid();
1533
1533
  break;
1534
1534
  }
1535
- case $s: {
1535
+ case Ys: {
1536
1536
  if (r.isNull) throw new Error();
1537
1537
  e.InstanceId = r.asGuid();
1538
1538
  break;
1539
1539
  }
1540
1540
  }
1541
1541
  }
1542
- async function Xs(t, e) {
1543
- const r = await Oe(t, Fs);
1544
- return Ys(r, e);
1542
+ async function Qs(t, e) {
1543
+ const r = await Le(t, xs);
1544
+ return zs(r, e);
1545
1545
  }
1546
- function Js(t) {
1546
+ function Zs(t) {
1547
1547
  const e = [];
1548
1548
  let r;
1549
1549
  for (; (r = t.next()) !== null; )
1550
- e.push(ti(r.asObject()));
1550
+ e.push(ni(r.asObject()));
1551
1551
  return e;
1552
1552
  }
1553
- function Qs(t) {
1553
+ function qs(t) {
1554
1554
  const e = [];
1555
1555
  let r;
1556
1556
  for (; (r = t.next()) !== null; )
1557
- e.push(un(r.asObject()));
1557
+ e.push(dn(r.asObject()));
1558
1558
  return e;
1559
1559
  }
1560
- const Zs = 2994044322, qs = 3167053791;
1561
- function ei(t) {
1560
+ const ei = 2994044322, ti = 3167053791;
1561
+ function ri(t) {
1562
1562
  const e = {};
1563
- return Ct(e), e;
1563
+ return Rt(e), e;
1564
1564
  }
1565
- function Ct(t) {
1565
+ function Rt(t) {
1566
1566
  return t.Type = "", t.Id = "", t;
1567
1567
  }
1568
- function ti(t, e) {
1569
- const r = e ?? ei();
1570
- return Ct(r), ri(t, r), r;
1568
+ function ni(t, e) {
1569
+ const r = e ?? ri();
1570
+ return Rt(r), si(t, r), r;
1571
1571
  }
1572
- function ri(t, e) {
1572
+ function si(t, e) {
1573
1573
  let r;
1574
1574
  for (; (r = t.next()) !== null; )
1575
1575
  switch (r.fieldId) {
1576
- case Zs: {
1576
+ case ei: {
1577
1577
  if (r.isNull) throw new Error();
1578
1578
  e.Id = r.asString();
1579
1579
  break;
1580
1580
  }
1581
- case qs: {
1581
+ case ti: {
1582
1582
  if (r.isNull) throw new Error();
1583
1583
  e.Type = r.asString();
1584
1584
  break;
1585
1585
  }
1586
1586
  }
1587
1587
  }
1588
- const bt = 1, ni = 1048631, si = 2205234621, ii = 2838554230, oi = 3748161056, ai = 4194102057, ci = 4289118421;
1589
- function li(t) {
1588
+ const kt = 1, ii = 1048631, oi = 2205234621, ai = 2838554230, ci = 3748161056, li = 4194102057, ui = 4289118421;
1589
+ function hi(t) {
1590
1590
  const e = {};
1591
- return ui(e), t && Object.assign(e, t), e;
1591
+ return di(e), t && Object.assign(e, t), e;
1592
1592
  }
1593
- function ui(t) {
1593
+ function di(t) {
1594
1594
  return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
1595
1595
  }
1596
- function hi(t) {
1597
- const e = new D(bt);
1598
- return di(t, e), e.finish();
1596
+ function fi(t) {
1597
+ const e = new D(kt);
1598
+ return Ei(t, e), e.finish();
1599
1599
  }
1600
- function di(t, e) {
1601
- e.writeStringField(si, t.ErrorTypeName), e.writeStringField(ii, t.ErrorMessage), e.writeGuidField(oi, t.CallId), e.writeStringField(ai, t.StackTrace), e.writeGuidField(ci, 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);
1602
1602
  }
1603
- function fi(t, e, r) {
1604
- const n = hi(t);
1605
- return F(ni, n, bt, e, r);
1603
+ function pi(t, e, r) {
1604
+ const n = fi(t);
1605
+ return F(ii, n, kt, e, r);
1606
1606
  }
1607
- const Ve = 1, Ei = 1048600, Rt = 703025676, kt = 814454131, Ut = 972460562, Dt = 976255570, Mt = 1368629611, Ot = 1479280922, Lt = 1533537016, vt = 2274386296, Pt = 2603556958, Ft = 2885165957, Bt = 3568439632;
1608
- function pi(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) {
1609
1609
  const e = {};
1610
- return Gt(e), e;
1610
+ return Vt(e), e;
1611
1611
  }
1612
- function Gt(t) {
1612
+ function Vt(t) {
1613
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;
1614
1614
  }
1615
- function Ii(t) {
1616
- const e = new D(Ve);
1617
- return xt(t, e), e.finish();
1615
+ function _i(t) {
1616
+ const e = new D(We);
1617
+ return Wt(t, e), e.finish();
1618
1618
  }
1619
- function xt(t, e) {
1620
- 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) => {
1621
1621
  for (const n of t.Parameters)
1622
- r.writeObject(wi, (s) => {
1623
- yi(n, s);
1622
+ r.writeObject(yi, (s) => {
1623
+ gi(n, s);
1624
1624
  });
1625
- }), e.writeBoolField(Bt, t.LlmCallOnlyOnce);
1625
+ }), e.writeBoolField(Gt, t.LlmCallOnlyOnce);
1626
1626
  }
1627
- function mi(t, e) {
1628
- const r = e ?? pi();
1629
- return Gt(r), _i(t, r), r;
1627
+ function Ti(t, e) {
1628
+ const r = e ?? mi();
1629
+ return Vt(r), Si(t, r), r;
1630
1630
  }
1631
- function _i(t, e) {
1631
+ function Si(t, e) {
1632
1632
  let r;
1633
1633
  for (; (r = t.next()) !== null; )
1634
1634
  switch (r.fieldId) {
1635
- case Rt: {
1635
+ case Ut: {
1636
1636
  if (r.isNull) throw new Error();
1637
1637
  e.ResultTypeName = r.asString();
1638
1638
  break;
1639
1639
  }
1640
- case kt: {
1640
+ case Dt: {
1641
1641
  if (r.isNull) throw new Error();
1642
1642
  e.FunctionName = r.asString();
1643
1643
  break;
1644
1644
  }
1645
- case Ut: {
1645
+ case Mt: {
1646
1646
  if (r.isNull) throw new Error();
1647
1647
  e.EnumerableItemTypeName = r.asString();
1648
1648
  break;
1649
1649
  }
1650
- case Dt: {
1650
+ case Ot: {
1651
1651
  if (r.isNull) throw new Error();
1652
1652
  e.FunctionId = r.asGuid();
1653
1653
  break;
1654
1654
  }
1655
- case Mt: {
1655
+ case Lt: {
1656
1656
  if (r.isNull) throw new Error();
1657
1657
  e.Description = r.asString();
1658
1658
  break;
1659
1659
  }
1660
- case Ot: {
1660
+ case vt: {
1661
1661
  if (r.isNull) throw new Error();
1662
1662
  e.IsCancellable = r.asBool();
1663
1663
  break;
1664
1664
  }
1665
- case Lt: {
1665
+ case Pt: {
1666
1666
  if (r.isNull) throw new Error();
1667
1667
  e.RequiresInstance = r.asBool();
1668
1668
  break;
1669
1669
  }
1670
- case vt: {
1670
+ case Ft: {
1671
1671
  if (r.isNull) throw new Error();
1672
1672
  e.LlmInlineResult = r.asBool();
1673
1673
  break;
1674
1674
  }
1675
- case Pt: {
1675
+ case Bt: {
1676
1676
  if (r.isNull) throw new Error();
1677
1677
  e.IsEnumerable = r.asBool();
1678
1678
  break;
1679
1679
  }
1680
- case Ft: {
1680
+ case xt: {
1681
1681
  if (r.isNull) throw new Error();
1682
- e.Parameters = Si(r.asArray());
1682
+ e.Parameters = Ai(r.asArray());
1683
1683
  break;
1684
1684
  }
1685
- case Bt: {
1685
+ case Gt: {
1686
1686
  if (r.isNull) throw new Error();
1687
1687
  e.LlmCallOnlyOnce = r.asBool();
1688
1688
  break;
1689
1689
  }
1690
1690
  }
1691
1691
  }
1692
- function Ti(t, e, r) {
1693
- const n = Ii(t);
1694
- return F(Ei, n, Ve, e, r);
1692
+ function wi(t, e, r) {
1693
+ const n = _i(t);
1694
+ return F(Ii, n, We, e, r);
1695
1695
  }
1696
- function Si(t) {
1696
+ function Ai(t) {
1697
1697
  const e = [];
1698
1698
  let r;
1699
1699
  for (; (r = t.next()) !== null; )
1700
- e.push(Ni(r.asObject()));
1700
+ e.push(Ci(r.asObject()));
1701
1701
  return e;
1702
1702
  }
1703
- const wi = 1, Vt = 607861992, Wt = 894485888, Ht = 972460562, $t = 1368629611, Kt = 1883521406, Yt = 2603556958, jt = 3609695522, zt = 4075263697, Xt = 4257460908;
1704
- function Ai(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) {
1705
1705
  const e = {};
1706
- return Jt(e), e;
1706
+ return Zt(e), e;
1707
1707
  }
1708
- function Jt(t) {
1708
+ function Zt(t) {
1709
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;
1710
1710
  }
1711
- function yi(t, e) {
1712
- 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);
1713
1713
  }
1714
- function Ni(t, e) {
1715
- const r = e ?? Ai();
1716
- return Jt(r), gi(t, r), r;
1714
+ function Ci(t, e) {
1715
+ const r = e ?? Ni();
1716
+ return Zt(r), bi(t, r), r;
1717
1717
  }
1718
- function gi(t, e) {
1718
+ function bi(t, e) {
1719
1719
  let r;
1720
1720
  for (; (r = t.next()) !== null; )
1721
1721
  switch (r.fieldId) {
1722
- case Vt: {
1722
+ case Ht: {
1723
1723
  if (r.isNull) throw new Error();
1724
1724
  e.HasDefaultValue = r.asBool();
1725
1725
  break;
1726
1726
  }
1727
- case Wt: {
1727
+ case Kt: {
1728
1728
  if (r.isNull) throw new Error();
1729
1729
  e.DefaultValueJson = r.asString();
1730
1730
  break;
1731
1731
  }
1732
- case Ht: {
1732
+ case $t: {
1733
1733
  if (r.isNull) throw new Error();
1734
1734
  e.EnumerableItemTypeName = r.asString();
1735
1735
  break;
1736
1736
  }
1737
- case $t: {
1737
+ case Yt: {
1738
1738
  if (r.isNull) throw new Error();
1739
1739
  e.Description = r.asString();
1740
1740
  break;
1741
1741
  }
1742
- case Kt: {
1742
+ case jt: {
1743
1743
  if (r.isNull) throw new Error();
1744
1744
  e.DefaultValueData = r.asBinary();
1745
1745
  break;
1746
1746
  }
1747
- case Yt: {
1747
+ case zt: {
1748
1748
  if (r.isNull) throw new Error();
1749
1749
  e.IsEnumerable = r.asBool();
1750
1750
  break;
1751
1751
  }
1752
- case jt: {
1752
+ case Xt: {
1753
1753
  if (r.isNull) throw new Error();
1754
1754
  e.TypeName = r.asString();
1755
1755
  break;
1756
1756
  }
1757
- case zt: {
1757
+ case Jt: {
1758
1758
  if (r.isNull) throw new Error();
1759
1759
  e.ParameterName = r.asString();
1760
1760
  break;
1761
1761
  }
1762
- case Xt: {
1762
+ case Qt: {
1763
1763
  if (r.isNull) throw new Error();
1764
1764
  e.ParameterIndex = r.asInt32();
1765
1765
  break;
1766
1766
  }
1767
1767
  }
1768
1768
  }
1769
- const Qt = 1, Ci = 1048638, bi = 3678477544;
1770
- function Ri(t) {
1769
+ const qt = 1, Ri = 1048638, ki = 3678477544;
1770
+ function Ui(t) {
1771
1771
  const e = {};
1772
- return ki(e), t && Object.assign(e, t), e;
1772
+ return Di(e), t && Object.assign(e, t), e;
1773
1773
  }
1774
- function ki(t) {
1774
+ function Di(t) {
1775
1775
  return t.Functions = [], t;
1776
1776
  }
1777
- function Ui(t) {
1778
- const e = new D(Qt);
1779
- return Di(t, e), e.finish();
1777
+ function Mi(t) {
1778
+ const e = new D(qt);
1779
+ return Oi(t, e), e.finish();
1780
1780
  }
1781
- function Di(t, e) {
1782
- e.writeArrayField(bi, b.Object, (r) => {
1781
+ function Oi(t, e) {
1782
+ e.writeArrayField(ki, b.Object, (r) => {
1783
1783
  for (const n of t.Functions)
1784
- r.writeObject(Ve, (s) => {
1785
- xt(n, s);
1784
+ r.writeObject(We, (s) => {
1785
+ Wt(n, s);
1786
1786
  });
1787
1787
  });
1788
1788
  }
1789
- function Mi(t, e, r) {
1790
- const n = Ui(t);
1791
- return F(Ci, n, Qt, e, r);
1789
+ function Li(t, e, r) {
1790
+ const n = Mi(t);
1791
+ return F(Ri, n, qt, e, r);
1792
1792
  }
1793
- const Zt = 1, Oi = 1048602, Li = 349453957, vi = 703025676, Pi = 3403385840, Fi = 3748161056, Bi = 4289118421;
1794
- function Gi(t) {
1793
+ const er = 1, vi = 1048602, Pi = 349453957, Fi = 703025676, Bi = 3403385840, xi = 3748161056, Gi = 4289118421;
1794
+ function Vi(t) {
1795
1795
  const e = {};
1796
- return xi(e), t && Object.assign(e, t), e;
1796
+ return Wi(e), t && Object.assign(e, t), e;
1797
1797
  }
1798
- function xi(t) {
1798
+ function Wi(t) {
1799
1799
  return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
1800
1800
  }
1801
- function Vi(t) {
1802
- const e = new D(Zt);
1803
- return Wi(t, e), e.finish();
1801
+ function Hi(t) {
1802
+ const e = new D(er);
1803
+ return Ki(t, e), e.finish();
1804
1804
  }
1805
- function Wi(t, e) {
1806
- e.writeBinaryField(Li, t.ResultData), e.writeStringField(vi, t.ResultTypeName), e.writeStringField(Pi, t.ResultJson), e.writeGuidField(Fi, t.CallId), e.writeGuidField(Bi, 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);
1807
1807
  }
1808
- function Hi(t, e, r) {
1809
- const n = Vi(t);
1810
- return F(Oi, n, Zt, e, r);
1808
+ function $i(t, e, r) {
1809
+ const n = Hi(t);
1810
+ return F(vi, n, er, e, r);
1811
1811
  }
1812
- const qt = 1, $i = 65549;
1812
+ const tr = 1, Yi = 65549;
1813
1813
  function Je(t) {
1814
1814
  return {};
1815
1815
  }
1816
- function Ki(t) {
1817
- return new D(qt).finish();
1816
+ function ji(t) {
1817
+ return new D(tr).finish();
1818
1818
  }
1819
1819
  function Qe(t, e, r) {
1820
- const n = Ki();
1821
- return F($i, n, qt, e, r);
1820
+ const n = ji();
1821
+ return F(Yi, n, tr, e, r);
1822
1822
  }
1823
- const Yi = 3167053791, ji = 3342364356, zi = 3612929027;
1824
- function er(t) {
1823
+ const zi = 3167053791, Xi = 3342364356, Ji = 3612929027;
1824
+ function rr(t) {
1825
1825
  const e = {};
1826
- return tr(e), e;
1826
+ return nr(e), e;
1827
1827
  }
1828
- function tr(t) {
1828
+ function nr(t) {
1829
1829
  return t.Category = "", t.Type = Et.Face, t.FaceBlendshapes = [], t;
1830
1830
  }
1831
- function Xi(t, e) {
1832
- const r = e ?? er();
1833
- return tr(r), Ji(t, r), r;
1831
+ function Qi(t, e) {
1832
+ const r = e ?? rr();
1833
+ return nr(r), Zi(t, r), r;
1834
1834
  }
1835
- function Ji(t, e) {
1835
+ function Zi(t, e) {
1836
1836
  let r;
1837
1837
  for (; (r = t.next()) !== null; )
1838
1838
  switch (r.fieldId) {
1839
- case Yi: {
1839
+ case zi: {
1840
1840
  if (r.isNull) throw new Error();
1841
1841
  e.Type = r.asInt32();
1842
1842
  break;
1843
1843
  }
1844
- case ji: {
1844
+ case Xi: {
1845
1845
  if (r.isNull) throw new Error();
1846
- e.FaceBlendshapes = Qi(r.asArray());
1846
+ e.FaceBlendshapes = qi(r.asArray());
1847
1847
  break;
1848
1848
  }
1849
- case zi: {
1849
+ case Ji: {
1850
1850
  if (r.isNull) throw new Error();
1851
1851
  e.Category = r.asString();
1852
1852
  break;
1853
1853
  }
1854
1854
  }
1855
1855
  }
1856
- function Qi(t) {
1856
+ function qi(t) {
1857
1857
  const e = [];
1858
1858
  let r;
1859
1859
  for (; (r = t.next()) !== null; )
1860
1860
  e.push(r.asString());
1861
1861
  return e;
1862
1862
  }
1863
- const Zi = 3612929027;
1864
- function rr(t) {
1863
+ const eo = 3612929027;
1864
+ function sr(t) {
1865
1865
  const e = {};
1866
- return nr(e), e;
1866
+ return ir(e), e;
1867
1867
  }
1868
- function nr(t) {
1868
+ function ir(t) {
1869
1869
  return t.Category = "", t;
1870
1870
  }
1871
- function qi(t, e) {
1872
- const r = e ?? rr();
1873
- return nr(r), eo(t, r), r;
1871
+ function to(t, e) {
1872
+ const r = e ?? sr();
1873
+ return ir(r), ro(t, r), r;
1874
1874
  }
1875
- function eo(t, e) {
1875
+ function ro(t, e) {
1876
1876
  let r;
1877
1877
  for (; (r = t.next()) !== null; )
1878
1878
  switch (r.fieldId) {
1879
- case Zi: {
1879
+ case eo: {
1880
1880
  if (r.isNull) throw new Error();
1881
1881
  e.Category = r.asString();
1882
1882
  break;
1883
1883
  }
1884
1884
  }
1885
1885
  }
1886
- const to = 164808083, ro = 1368629611, no = 2739413426, so = 2768375929, io = 2950031986, oo = 3284746250, ao = 4065070594;
1887
- function sr(t) {
1886
+ const no = 164808083, so = 1368629611, io = 2739413426, oo = 2768375929, ao = 2950031986, co = 3284746250, lo = 4065070594;
1887
+ function or(t) {
1888
1888
  const e = {};
1889
- return ir(e), e;
1889
+ return ar(e), e;
1890
1890
  }
1891
- function ir(t) {
1891
+ function ar(t) {
1892
1892
  return t.Description = "", t.Codec = pt.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
1893
1893
  }
1894
- function co(t, e) {
1895
- const r = e ?? sr();
1896
- return ir(r), lo(t, r), r;
1894
+ function uo(t, e) {
1895
+ const r = e ?? or();
1896
+ return ar(r), ho(t, r), r;
1897
1897
  }
1898
- function lo(t, e) {
1898
+ function ho(t, e) {
1899
1899
  let r;
1900
1900
  for (; (r = t.next()) !== null; )
1901
1901
  switch (r.fieldId) {
1902
- case to: {
1902
+ case no: {
1903
1903
  if (r.isNull) throw new Error();
1904
1904
  e.Framerate = r.asInt32();
1905
1905
  break;
1906
1906
  }
1907
- case ro: {
1907
+ case so: {
1908
1908
  if (r.isNull) throw new Error();
1909
1909
  e.Description = r.asString();
1910
1910
  break;
1911
1911
  }
1912
- case no: {
1912
+ case io: {
1913
1913
  if (r.isNull) throw new Error();
1914
1914
  e.IsHardwareAccelerated = r.asBool();
1915
1915
  break;
1916
1916
  }
1917
- case so: {
1917
+ case oo: {
1918
1918
  if (r.isNull) throw new Error();
1919
1919
  e.Bitrate = r.asInt32();
1920
1920
  break;
1921
1921
  }
1922
- case io: {
1922
+ case ao: {
1923
1923
  if (r.isNull) throw new Error();
1924
1924
  e.Height = r.asInt32();
1925
1925
  break;
1926
1926
  }
1927
- case oo: {
1927
+ case co: {
1928
1928
  if (r.isNull) throw new Error();
1929
1929
  e.Codec = r.asInt32();
1930
1930
  break;
1931
1931
  }
1932
- case ao: {
1932
+ case lo: {
1933
1933
  if (r.isNull) throw new Error();
1934
1934
  e.Width = r.asInt32();
1935
1935
  break;
1936
1936
  }
1937
1937
  }
1938
1938
  }
1939
- const uo = 65539, ho = 414670648, fo = 693643444, Eo = 1144553441, po = 1497620243, Io = 1559330978, mo = 1999510636, _o = 2277643855, To = 2469008121, So = 3042922213, wo = 3219210453, Ao = 3504054055, yo = 3642827795, No = 3678477544, go = 3696445035, Co = 3707543140, bo = 3712281496, Ro = 3748214980, ko = 3823842552, Uo = 3895362455, Do = 3897397815, Mo = 4225107827;
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
1940
  function Oo(t) {
1941
1941
  const e = {};
1942
- return or(e), e;
1942
+ return cr(e), e;
1943
1943
  }
1944
- function or(t) {
1945
- 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;
1946
1946
  }
1947
1947
  function Lo(t, e) {
1948
1948
  const r = z.create(t);
@@ -1950,100 +1950,90 @@ function Lo(t, e) {
1950
1950
  }
1951
1951
  function vo(t, e) {
1952
1952
  const r = e ?? Oo();
1953
- return or(r), Po(t, r), r;
1953
+ return cr(r), Po(t, r), r;
1954
1954
  }
1955
1955
  function Po(t, e) {
1956
1956
  let r;
1957
1957
  for (; (r = t.next()) !== null; )
1958
1958
  switch (r.fieldId) {
1959
- case ho: {
1960
- if (r.isNull) throw new Error();
1961
- e.IsGitSource = r.asBool();
1962
- break;
1963
- }
1964
- case fo: {
1965
- if (r.isNull) throw new Error();
1966
- e.FirstUserId = r.asString();
1967
- break;
1968
- }
1969
1959
  case Eo: {
1970
1960
  if (r.isNull) throw new Error();
1971
- e.Clients = Bo(r.asDictionary());
1961
+ e.FirstUserId = r.asString();
1972
1962
  break;
1973
1963
  }
1974
1964
  case po: {
1975
1965
  if (r.isNull) throw new Error();
1976
- e.TrackingStreams = Go(r.asDictionary());
1966
+ e.Clients = Bo(r.asDictionary());
1977
1967
  break;
1978
1968
  }
1979
1969
  case Io: {
1980
1970
  if (r.isNull) throw new Error();
1981
- e.ChannelId = r.asString();
1971
+ e.TrackingStreams = xo(r.asDictionary());
1982
1972
  break;
1983
1973
  }
1984
1974
  case mo: {
1985
1975
  if (r.isNull) throw new Error();
1986
- e.SessionId = r.asString();
1976
+ e.ChannelId = r.asString();
1987
1977
  break;
1988
1978
  }
1989
1979
  case _o: {
1990
1980
  if (r.isNull) throw new Error();
1991
- e.ChannelUrl = r.asString();
1981
+ e.AppSourceType = r.asInt32();
1992
1982
  break;
1993
1983
  }
1994
1984
  case To: {
1995
1985
  if (r.isNull) throw new Error();
1996
- e.ChannelName = r.asString();
1986
+ e.SessionId = r.asString();
1997
1987
  break;
1998
1988
  }
1999
1989
  case So: {
2000
1990
  if (r.isNull) throw new Error();
2001
- e.PublicAccess = r.asBool();
1991
+ e.ChannelUrl = r.asString();
2002
1992
  break;
2003
1993
  }
2004
1994
  case wo: {
2005
1995
  if (r.isNull) throw new Error();
2006
- e.OrganisationName = r.asString();
1996
+ e.ChannelName = r.asString();
2007
1997
  break;
2008
1998
  }
2009
1999
  case Ao: {
2010
2000
  if (r.isNull) throw new Error();
2011
- e.DebugMode = r.asBool();
2001
+ e.PublicAccess = r.asBool();
2012
2002
  break;
2013
2003
  }
2014
2004
  case yo: {
2015
2005
  if (r.isNull) throw new Error();
2016
- e.RunnerType = r.asString();
2006
+ e.ServerRunType = r.asInt32();
2017
2007
  break;
2018
2008
  }
2019
2009
  case No: {
2020
2010
  if (r.isNull) throw new Error();
2021
- e.Functions = xo(r.asDictionary());
2011
+ e.OrganisationName = r.asString();
2022
2012
  break;
2023
2013
  }
2024
2014
  case go: {
2025
2015
  if (r.isNull) throw new Error();
2026
- e.UIStreams = Vo(r.asDictionary());
2016
+ e.DebugMode = r.asBool();
2027
2017
  break;
2028
2018
  }
2029
2019
  case Co: {
2030
2020
  if (r.isNull) throw new Error();
2031
- e.SpaceId = r.asString();
2021
+ e.Functions = Go(r.asDictionary());
2032
2022
  break;
2033
2023
  }
2034
2024
  case bo: {
2035
2025
  if (r.isNull) throw new Error();
2036
- e.PrimaryUserId = r.asString();
2026
+ e.UIStreams = Vo(r.asDictionary());
2037
2027
  break;
2038
2028
  }
2039
2029
  case Ro: {
2040
2030
  if (r.isNull) throw new Error();
2041
- e.BootType = r.asString();
2031
+ e.SpaceId = r.asString();
2042
2032
  break;
2043
2033
  }
2044
2034
  case ko: {
2045
2035
  if (r.isNull) throw new Error();
2046
- e.ChannelInstanceId = r.asString();
2036
+ e.PrimaryUserId = r.asString();
2047
2037
  break;
2048
2038
  }
2049
2039
  case Uo: {
@@ -2064,7 +2054,7 @@ function Po(t, e) {
2064
2054
  }
2065
2055
  }
2066
2056
  async function Fo(t, e) {
2067
- const r = await Oe(t, uo);
2057
+ const r = await Le(t, fo);
2068
2058
  return Lo(r, e);
2069
2059
  }
2070
2060
  function Bo(t) {
@@ -2072,11 +2062,11 @@ function Bo(t) {
2072
2062
  let r;
2073
2063
  for (; (r = t.next()) !== null; ) {
2074
2064
  const n = r.key.asInt32();
2075
- e[n] = Ce(r.value.asObject());
2065
+ e[n] = be(r.value.asObject());
2076
2066
  }
2077
2067
  return e;
2078
2068
  }
2079
- function Go(t) {
2069
+ function xo(t) {
2080
2070
  const e = /* @__PURE__ */ Object.create(null);
2081
2071
  let r;
2082
2072
  for (; (r = t.next()) !== null; ) {
@@ -2085,12 +2075,12 @@ function Go(t) {
2085
2075
  }
2086
2076
  return e;
2087
2077
  }
2088
- function xo(t) {
2078
+ function Go(t) {
2089
2079
  const e = /* @__PURE__ */ Object.create(null);
2090
2080
  let r;
2091
2081
  for (; (r = t.next()) !== null; ) {
2092
2082
  const n = r.key.asInt32();
2093
- e[n] = $o(r.value.asArray());
2083
+ e[n] = Ko(r.value.asArray());
2094
2084
  }
2095
2085
  return e;
2096
2086
  }
@@ -2121,30 +2111,30 @@ function Ho(t) {
2121
2111
  }
2122
2112
  return e;
2123
2113
  }
2124
- function $o(t) {
2114
+ function Ko(t) {
2125
2115
  const e = [];
2126
2116
  let r;
2127
2117
  for (; (r = t.next()) !== null; )
2128
- e.push(mi(r.asObject()));
2118
+ e.push(Ti(r.asObject()));
2129
2119
  return e;
2130
2120
  }
2131
- const Ko = 161083277, Yo = 325678206, jo = 3469892363, zo = 3645544153;
2121
+ const $o = 161083277, Yo = 325678206, jo = 3469892363, zo = 3645544153;
2132
2122
  function Xo(t) {
2133
2123
  const e = {};
2134
- return ar(e), e;
2124
+ return lr(e), e;
2135
2125
  }
2136
- function ar(t) {
2137
- 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;
2138
2128
  }
2139
2129
  function Jo(t, e) {
2140
2130
  const r = e ?? Xo();
2141
- return ar(r), Qo(t, r), r;
2131
+ return lr(r), Qo(t, r), r;
2142
2132
  }
2143
2133
  function Qo(t, e) {
2144
2134
  let r;
2145
2135
  for (; (r = t.next()) !== null; )
2146
2136
  switch (r.fieldId) {
2147
- case Ko: {
2137
+ case $o: {
2148
2138
  if (r.isNull) throw new Error();
2149
2139
  e.StreamId = r.asString();
2150
2140
  break;
@@ -2161,7 +2151,7 @@ function Qo(t, e) {
2161
2151
  }
2162
2152
  case zo: {
2163
2153
  if (r.isNull) throw new Error();
2164
- e.Info = qi(r.asObject());
2154
+ e.Info = to(r.asObject());
2165
2155
  break;
2166
2156
  }
2167
2157
  }
@@ -2169,14 +2159,14 @@ function Qo(t, e) {
2169
2159
  const Zo = 161083277, qo = 325678206, ea = 3469892363, ta = 3645544153;
2170
2160
  function ra(t) {
2171
2161
  const e = {};
2172
- return cr(e), e;
2162
+ return ur(e), e;
2173
2163
  }
2174
- function cr(t) {
2175
- 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;
2176
2166
  }
2177
2167
  function na(t, e) {
2178
2168
  const r = e ?? ra();
2179
- return cr(r), sa(t, r), r;
2169
+ return ur(r), sa(t, r), r;
2180
2170
  }
2181
2171
  function sa(t, e) {
2182
2172
  let r;
@@ -2199,7 +2189,7 @@ function sa(t, e) {
2199
2189
  }
2200
2190
  case ta: {
2201
2191
  if (r.isNull) throw new Error();
2202
- e.Info = _n(r.asObject());
2192
+ e.Info = Sn(r.asObject());
2203
2193
  break;
2204
2194
  }
2205
2195
  }
@@ -2207,14 +2197,14 @@ function sa(t, e) {
2207
2197
  const ia = 161083277, oa = 325678206, aa = 3469892363, ca = 3645544153;
2208
2198
  function la(t) {
2209
2199
  const e = {};
2210
- return lr(e), e;
2200
+ return hr(e), e;
2211
2201
  }
2212
- function lr(t) {
2213
- 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;
2214
2204
  }
2215
2205
  function ua(t, e) {
2216
2206
  const r = e ?? la();
2217
- return lr(r), ha(t, r), r;
2207
+ return hr(r), ha(t, r), r;
2218
2208
  }
2219
2209
  function ha(t, e) {
2220
2210
  let r;
@@ -2237,7 +2227,7 @@ function ha(t, e) {
2237
2227
  }
2238
2228
  case ca: {
2239
2229
  if (r.isNull) throw new Error();
2240
- e.Info = co(r.asObject());
2230
+ e.Info = uo(r.asObject());
2241
2231
  break;
2242
2232
  }
2243
2233
  }
@@ -2245,14 +2235,14 @@ function ha(t, e) {
2245
2235
  const da = 161083277, fa = 325678206, Ea = 3469892363, pa = 3645544153;
2246
2236
  function Ia(t) {
2247
2237
  const e = {};
2248
- return ur(e), e;
2238
+ return dr(e), e;
2249
2239
  }
2250
- function ur(t) {
2251
- 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;
2252
2242
  }
2253
2243
  function ma(t, e) {
2254
2244
  const r = e ?? Ia();
2255
- return ur(r), _a(t, r), r;
2245
+ return dr(r), _a(t, r), r;
2256
2246
  }
2257
2247
  function _a(t, e) {
2258
2248
  let r;
@@ -2275,32 +2265,32 @@ function _a(t, e) {
2275
2265
  }
2276
2266
  case pa: {
2277
2267
  if (r.isNull) throw new Error();
2278
- e.Info = Xi(r.asObject());
2268
+ e.Info = Qi(r.asObject());
2279
2269
  break;
2280
2270
  }
2281
2271
  }
2282
2272
  }
2283
- const hr = 1, Ta = 131074;
2284
- function dr(t) {
2273
+ const fr = 1, Ta = 131074;
2274
+ function Er(t) {
2285
2275
  return {};
2286
2276
  }
2287
2277
  function Sa(t) {
2288
- return new D(hr).finish();
2278
+ return new D(fr).finish();
2289
2279
  }
2290
- function fr(t, e, r) {
2280
+ function pr(t, e, r) {
2291
2281
  const n = Sa();
2292
- return F(Ta, n, hr, e, r);
2282
+ return F(Ta, n, fr, e, r);
2293
2283
  }
2294
- const Er = 1, wa = 8388612;
2284
+ const Ir = 1, wa = 8388612;
2295
2285
  function Aa(t) {
2296
2286
  return {};
2297
2287
  }
2298
2288
  function ya(t) {
2299
- return new D(Er).finish();
2289
+ return new D(Ir).finish();
2300
2290
  }
2301
2291
  function Na(t, e, r) {
2302
2292
  const n = ya();
2303
- return F(wa, n, Er, e, r);
2293
+ return F(wa, n, Ir, e, r);
2304
2294
  }
2305
2295
  function ga(t) {
2306
2296
  return new Worker(
@@ -2311,27 +2301,27 @@ function ga(t) {
2311
2301
  }
2312
2302
  );
2313
2303
  }
2314
- class We extends Error {
2304
+ class He extends Error {
2315
2305
  constructor(e, r) {
2316
2306
  super(e), this.cause = r, this.name = "ConnectionError";
2317
2307
  }
2318
2308
  }
2319
- class y extends We {
2309
+ class y extends He {
2320
2310
  constructor(e, r) {
2321
2311
  super(e, r), this.name = "AuthenticationError";
2322
2312
  }
2323
2313
  }
2324
- class W extends We {
2314
+ class W extends He {
2325
2315
  constructor(e, r) {
2326
2316
  super(e, r), this.name = "TransportError";
2327
2317
  }
2328
2318
  }
2329
- class He extends W {
2319
+ class Ke extends W {
2330
2320
  constructor(e) {
2331
2321
  super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
2332
2322
  }
2333
2323
  }
2334
- class Ca extends We {
2324
+ class Ca extends He {
2335
2325
  constructor(e) {
2336
2326
  super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
2337
2327
  }
@@ -2341,22 +2331,22 @@ class ba extends y {
2341
2331
  super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
2342
2332
  }
2343
2333
  }
2344
- class _l extends y {
2334
+ class Tl extends y {
2345
2335
  constructor(e) {
2346
2336
  super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
2347
2337
  }
2348
2338
  }
2349
- class Tl extends y {
2339
+ class Sl extends y {
2350
2340
  constructor(e) {
2351
2341
  super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
2352
2342
  }
2353
2343
  }
2354
- class Sl extends y {
2344
+ class wl extends y {
2355
2345
  constructor() {
2356
2346
  super("No channels available in this space"), this.name = "NoChannelsError";
2357
2347
  }
2358
2348
  }
2359
- function pr(t, e) {
2349
+ function mr(t, e) {
2360
2350
  return new Promise((r, n) => {
2361
2351
  const s = () => {
2362
2352
  clearTimeout(i), n(new Error("Aborted"));
@@ -2370,18 +2360,18 @@ function pr(t, e) {
2370
2360
  e?.addEventListener("abort", s, { once: !0 });
2371
2361
  });
2372
2362
  }
2373
- 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 || {});
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 || {});
2374
2364
  let $e = 1, fe = null;
2375
- function wl(t) {
2365
+ function Al(t) {
2376
2366
  $e = t;
2377
2367
  }
2378
- function Al() {
2368
+ function yl() {
2379
2369
  return $e;
2380
2370
  }
2381
2371
  function Ra(t) {
2382
2372
  fe = t;
2383
2373
  }
2384
- function yl() {
2374
+ function Nl() {
2385
2375
  return fe;
2386
2376
  }
2387
2377
  const ka = {
@@ -2492,7 +2482,7 @@ class Ma {
2492
2482
  * Get or create a cached keepalive response message.
2493
2483
  */
2494
2484
  getKeepaliveResponse() {
2495
- return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = fr(dr(), this.sessionId)), this.keepaliveResponseMessage;
2485
+ return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = pr(Er(), this.sessionId)), this.keepaliveResponseMessage;
2496
2486
  }
2497
2487
  handleProtocolMessage(e) {
2498
2488
  try {
@@ -2507,7 +2497,7 @@ class Ma {
2507
2497
  }
2508
2498
  resetKeepaliveTimeout() {
2509
2499
  this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
2510
- oe.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new He(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();
2511
2501
  }, this.keepaliveTimeoutMs);
2512
2502
  }
2513
2503
  clearKeepaliveTimeout() {
@@ -2515,7 +2505,7 @@ class Ma {
2515
2505
  }
2516
2506
  }
2517
2507
  const B = L("WebTransportTransport"), Ze = 4, Oa = 65536;
2518
- function mr() {
2508
+ function Tr() {
2519
2509
  return typeof WebTransport < "u";
2520
2510
  }
2521
2511
  class La {
@@ -2544,7 +2534,7 @@ class La {
2544
2534
  return this.transport !== null && this.writer !== null;
2545
2535
  }
2546
2536
  async connect(e, r) {
2547
- if (!mr())
2537
+ if (!Tr())
2548
2538
  throw new W("WebTransport is not supported in this browser");
2549
2539
  try {
2550
2540
  this.transport = new WebTransport(e), await this.transport.ready, B.debug(`Connected to WebTransport entrypoint: ${e}`), this.transport.closed.then(() => {
@@ -2611,7 +2601,7 @@ class La {
2611
2601
  * Get or create a cached keepalive response message.
2612
2602
  */
2613
2603
  getKeepaliveResponse() {
2614
- return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = fr(dr(), this.sessionId)), this.keepaliveResponseMessage;
2604
+ return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = pr(Er(), this.sessionId)), this.keepaliveResponseMessage;
2615
2605
  }
2616
2606
  /**
2617
2607
  * Process complete messages from the receive buffer.
@@ -2658,7 +2648,7 @@ class La {
2658
2648
  */
2659
2649
  resetKeepaliveTimeout() {
2660
2650
  this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
2661
- B.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new He(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();
2662
2652
  }, this.keepaliveTimeoutMs);
2663
2653
  }
2664
2654
  /**
@@ -2762,7 +2752,7 @@ class va {
2762
2752
  break;
2763
2753
  case k.WebTransport:
2764
2754
  case k.WebTransportProxy:
2765
- if (!mr())
2755
+ if (!Tr())
2766
2756
  throw new Error("WebTransport is not supported in this browser");
2767
2757
  this.transport = new La(r);
2768
2758
  break;
@@ -2796,7 +2786,7 @@ class va {
2796
2786
  * Handle transport error.
2797
2787
  */
2798
2788
  handleError(e) {
2799
- ee.error("Channel error:", e), this.config.onError?.(e), e instanceof He && this.handleClose("Keepalive timeout", !1);
2789
+ ee.error("Channel error:", e), this.config.onError?.(e), e instanceof Ke && this.handleClose("Keepalive timeout", !1);
2800
2790
  }
2801
2791
  /**
2802
2792
  * Update and notify state change.
@@ -2805,7 +2795,7 @@ class va {
2805
2795
  this.state !== e && (this.state = e, this.config.onStateChange?.(e));
2806
2796
  }
2807
2797
  }
2808
- const G = L("ChannelManager");
2798
+ const x = L("ChannelManager");
2809
2799
  class Pa {
2810
2800
  channels = /* @__PURE__ */ new Map();
2811
2801
  // keyed by opcode group
@@ -2856,7 +2846,7 @@ class Pa {
2856
2846
  s.send(e);
2857
2847
  return;
2858
2848
  }
2859
- G.warn("No channel found for message");
2849
+ x.warn("No channel found for message");
2860
2850
  }
2861
2851
  /**
2862
2852
  * Send a protocol message to all channels (for broadcast messages).
@@ -2887,10 +2877,10 @@ class Pa {
2887
2877
  await this.connectAllChannels(i), this.config.endpointSelector?.rememberWorkingType(s), this.config.onRememberWorkingType?.(s), this.activeType = s, this.reconnectAttempts = 0, this.setState("connected");
2888
2878
  return;
2889
2879
  } catch (o) {
2890
- G.warn(`Failed to connect using ${k[s]}: ${o}`), this.disconnectAll();
2880
+ x.warn(`Failed to connect using ${k[s]}: ${o}`), this.disconnectAll();
2891
2881
  }
2892
2882
  }
2893
- 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");
2894
2884
  }
2895
2885
  /**
2896
2886
  * Connect all channels for a given endpoint type in parallel.
@@ -2950,10 +2940,10 @@ class Pa {
2950
2940
  handleChannelClose(e, r, n, s) {
2951
2941
  if (!(this.state === "idle" || this.state === "stopped" || this.state === "offline")) {
2952
2942
  if (n || s) {
2953
- 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");
2954
2944
  return;
2955
2945
  }
2956
- 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());
2957
2947
  }
2958
2948
  }
2959
2949
  /**
@@ -2963,16 +2953,16 @@ class Pa {
2963
2953
  if (!this.shouldReconnect)
2964
2954
  return;
2965
2955
  if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
2966
- G.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Ca(this.config.maxReconnectAttempts));
2956
+ x.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Ca(this.config.maxReconnectAttempts));
2967
2957
  return;
2968
2958
  }
2969
2959
  this.setState("reconnecting"), this.reconnectAttempts++;
2970
2960
  const e = this.config.reconnectBackoffMs * Math.pow(2, this.reconnectAttempts - 1);
2971
- 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)
2972
2962
  try {
2973
2963
  await this.connectInternal(!0);
2974
2964
  } catch (r) {
2975
- G.error("Reconnect failed:", r), await this.attemptReconnect();
2965
+ x.error("Reconnect failed:", r), await this.attemptReconnect();
2976
2966
  }
2977
2967
  }
2978
2968
  /**
@@ -2990,25 +2980,25 @@ class Pa {
2990
2980
  this.state !== e && (this.state = e, this.config.onStateChange?.(e));
2991
2981
  }
2992
2982
  }
2993
- const Fa = 5e3, Ba = 3e4, qe = 35e3, et = 500, tt = 6, _r = 6e4, be = "ikon_device_id";
2994
- function Ke() {
2983
+ const Fa = 5e3, Ba = 3e4, qe = 35e3, et = 500, tt = 6, Sr = 6e4, Re = "ikon_device_id";
2984
+ function Ye() {
2995
2985
  if (typeof window > "u" || typeof localStorage > "u")
2996
2986
  return crypto.randomUUID();
2997
2987
  try {
2998
- let t = localStorage.getItem(be);
2999
- return t || (t = crypto.randomUUID(), localStorage.setItem(be, t)), t;
2988
+ let t = localStorage.getItem(Re);
2989
+ return t || (t = crypto.randomUUID(), localStorage.setItem(Re, t)), t;
3000
2990
  } catch {
3001
2991
  return crypto.randomUUID();
3002
2992
  }
3003
2993
  }
3004
- function Nl() {
2994
+ function gl() {
3005
2995
  if (!(typeof localStorage > "u"))
3006
2996
  try {
3007
- localStorage.removeItem(be);
2997
+ localStorage.removeItem(Re);
3008
2998
  } catch {
3009
2999
  }
3010
3000
  }
3011
- function gl(t) {
3001
+ function Cl(t) {
3012
3002
  try {
3013
3003
  const e = t.split(".");
3014
3004
  return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
@@ -3016,26 +3006,26 @@ function gl(t) {
3016
3006
  return null;
3017
3007
  }
3018
3008
  }
3019
- const Ee = {}, Re = "https://api.prod.ikon.live", pe = "https://api.dev.ikon.live", rt = "https://auth.ikonai.com", nt = "https://auth.dev.ikonai.com", Cl = "https://auth.ikonai.com";
3020
- function Tr(t) {
3021
- return t === "development" ? pe : Re;
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;
3022
3012
  }
3023
- function bl() {
3013
+ function Rl() {
3024
3014
  const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
3025
- return t || (typeof window > "u" ? Re : !Ye() || window.location.hostname.includes(".dev.") ? pe : Re);
3015
+ return t || (typeof window > "u" ? ke : !je() || window.location.hostname.includes(".dev.") ? pe : ke);
3026
3016
  }
3027
- function Rl() {
3017
+ function kl() {
3028
3018
  const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_TYPE : void 0;
3029
3019
  if (t === "development" || t === "production")
3030
3020
  return t;
3031
3021
  const e = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
3032
- return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : Ye() ? 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";
3033
3023
  }
3034
- function kl() {
3024
+ function Ul() {
3035
3025
  const t = typeof import.meta < "u" ? Ee?.VITE_IKON_AUTH_URL : void 0;
3036
- return t || (typeof window > "u" ? rt : !Ye() || window.location.hostname.includes(".dev.") ? nt : rt);
3026
+ return t || (typeof window > "u" ? rt : !je() || window.location.hostname.includes(".dev.") ? nt : rt);
3037
3027
  }
3038
- function Sr() {
3028
+ function Ar() {
3039
3029
  if (typeof window > "u")
3040
3030
  return {};
3041
3031
  const t = new URLSearchParams(window.location.search), e = {};
@@ -3043,8 +3033,8 @@ function Sr() {
3043
3033
  e[r] = n;
3044
3034
  return e;
3045
3035
  }
3046
- const Ga = ["ikon_token", "ikon_provider", "error"];
3047
- function Ul() {
3036
+ const xa = ["ikon_token", "ikon_provider", "error"];
3037
+ function Dl() {
3048
3038
  if (typeof window > "u")
3049
3039
  return { parameters: {} };
3050
3040
  const t = window.location.pathname;
@@ -3054,12 +3044,12 @@ function Ul() {
3054
3044
  const s = t.match(/^\/c\/([^/]+)/);
3055
3045
  if (s && (r = decodeURIComponent(s[1])), e && r)
3056
3046
  throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
3057
- const i = Sr(), o = {};
3047
+ const i = Ar(), o = {};
3058
3048
  for (const [a, c] of Object.entries(i))
3059
- Ga.includes(a) || (o[a] = c);
3049
+ xa.includes(a) || (o[a] = c);
3060
3050
  return { sessionId: e, channelKey: r, parameters: o };
3061
3051
  }
3062
- function Ye() {
3052
+ function je() {
3063
3053
  if (typeof window > "u") return !1;
3064
3054
  const t = window.location.hostname;
3065
3055
  if (t === "localhost" || t === "127.0.0.1" || t === "::1" || t.startsWith("10.") || t.startsWith("192.168."))
@@ -3071,7 +3061,7 @@ function Ye() {
3071
3061
  }
3072
3062
  return !0;
3073
3063
  }
3074
- 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, xa = 1e3, Va = 5e3;
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;
3075
3065
  async function Wa(t) {
3076
3066
  try {
3077
3067
  const e = await fetch(`${pe}/users/me`, {
@@ -3083,7 +3073,7 @@ async function Wa(t) {
3083
3073
  return;
3084
3074
  }
3085
3075
  }
3086
- function wr(t, e, r) {
3076
+ function yr(t, e, r) {
3087
3077
  const n = {
3088
3078
  method: "POST",
3089
3079
  headers: {
@@ -3095,13 +3085,13 @@ function wr(t, e, r) {
3095
3085
  };
3096
3086
  return e || (n.credentials = "include"), n;
3097
3087
  }
3098
- async function Ar(t, e, r, n, s, i, o) {
3088
+ async function Nr(t, e, r, n, s, i, o) {
3099
3089
  const a = `${t}/rooms`, c = {
3100
3090
  space: e,
3101
3091
  ...r ? { key: r } : {},
3102
3092
  ...n && Object.keys(n).length > 0 ? { params: n } : {},
3103
3093
  ...s ? { hash: s } : {}
3104
- }, l = await fetch(a, wr(c, i, o));
3094
+ }, l = await fetch(a, yr(c, i, o));
3105
3095
  if (!l.ok) {
3106
3096
  const d = await l.text().catch(() => "Unknown error");
3107
3097
  throw new y(`Failed to request channel: ${l.status} ${d}`);
@@ -3109,16 +3099,16 @@ async function Ar(t, e, r, n, s, i, o) {
3109
3099
  return await l.json();
3110
3100
  }
3111
3101
  async function Ha(t, e, r, n) {
3112
- const s = `${t}/rooms/connect`, i = await fetch(s, wr(e, r, n));
3102
+ const s = `${t}/rooms/connect`, i = await fetch(s, yr(e, r, n));
3113
3103
  if (!i.ok) {
3114
3104
  const o = await i.text().catch(() => "Unknown error");
3115
3105
  throw new y(`Backend connect failed: ${i.status} ${o}`);
3116
3106
  }
3117
3107
  return i.json();
3118
3108
  }
3119
- async function yr(t, e, r, n, s) {
3109
+ async function gr(t, e, r, n, s) {
3120
3110
  const i = Date.now();
3121
- let o = xa;
3111
+ let o = Ga;
3122
3112
  for (; ; ) {
3123
3113
  if (s?.aborted)
3124
3114
  throw new y("Connection aborted");
@@ -3128,23 +3118,23 @@ async function yr(t, e, r, n, s) {
3128
3118
  if (l === "running")
3129
3119
  return c;
3130
3120
  if (l === "provisioning") {
3131
- await pr(o, s), o = Math.min(o * 1.5, Va);
3121
+ await mr(o, s), o = Math.min(o * 1.5, Va);
3132
3122
  continue;
3133
3123
  }
3134
3124
  throw new y(`Unexpected channel state: ${c.state}`);
3135
3125
  }
3136
3126
  }
3137
- async function je(t, e) {
3127
+ async function Te(t, e) {
3138
3128
  const r = await fetch(t, { signal: e });
3139
3129
  if (!r.ok) {
3140
3130
  const o = await r.text().catch(() => "Unknown error");
3141
3131
  throw new y(`Failed to connect: ${r.status} ${o}`);
3142
3132
  }
3143
3133
  const n = await r.arrayBuffer(), s = new Uint8Array(n);
3144
- return { authResponse: await Ns(s) };
3134
+ return { authResponse: await Cs(s) };
3145
3135
  }
3146
- function $a(t, e) {
3147
- return bs({
3136
+ function Ka(t, e) {
3137
+ return ks({
3148
3138
  ServerSessionId: "",
3149
3139
  // Server will fill this in
3150
3140
  ContextType: J.Browser,
@@ -3153,7 +3143,7 @@ function $a(t, e) {
3153
3143
  IsInternal: !1,
3154
3144
  Description: t.description ?? "Ikon SDK TypeScript",
3155
3145
  UserId: e,
3156
- DeviceId: t.deviceId ?? Ke(),
3146
+ DeviceId: t.deviceId ?? Ye(),
3157
3147
  ProductId: t.productId ?? "ikon-sdk",
3158
3148
  VersionId: t.versionId ?? "1.0.0",
3159
3149
  InstallId: t.installId ?? "",
@@ -3171,7 +3161,7 @@ function $a(t, e) {
3171
3161
  Parameters: t.parameters ?? {}
3172
3162
  });
3173
3163
  }
3174
- function Ka(t) {
3164
+ function $a(t) {
3175
3165
  return {
3176
3166
  ServerSessionId: t.ServerSessionId,
3177
3167
  ContextType: t.ContextType,
@@ -3201,10 +3191,10 @@ function Ka(t) {
3201
3191
  async function Ya(t, e) {
3202
3192
  const r = `https://${t.host}:${t.httpsPort}`;
3203
3193
  Ie.debug(`Authenticating with local server: ${r}`);
3204
- const s = { ...Sr(), ...t.parameters };
3194
+ const s = { ...Ar(), ...t.parameters };
3205
3195
  let i = t.userId;
3206
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')));
3207
- const o = $a({ ...t, parameters: s }, i), a = Ka(o), c = await fetch(`${r}/connect-token`, {
3197
+ const o = Ka({ ...t, parameters: s }, i), a = $a(o), c = await fetch(`${r}/connect-token`, {
3208
3198
  method: "POST",
3209
3199
  headers: {
3210
3200
  "Content-Type": "application/json"
@@ -3220,12 +3210,12 @@ async function Ya(t, e) {
3220
3210
  if (!f)
3221
3211
  throw new y("Server did not return a token");
3222
3212
  const d = `${r}/connect?token=${encodeURIComponent(f)}`;
3223
- return je(d, e);
3213
+ return Te(d, e);
3224
3214
  }
3225
3215
  async function ja(t, e) {
3226
3216
  if (t.sessionId && t.channelKey)
3227
3217
  throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
3228
- const r = Tr(t.backendType);
3218
+ const r = wr(t.backendType);
3229
3219
  Ie.debug(`Authenticating with cloud server: ${r}, space ID: ${t.spaceId}`);
3230
3220
  const n = await fetch(`${r}/auth/api-key`, {
3231
3221
  method: "POST",
@@ -3258,13 +3248,13 @@ async function ja(t, e) {
3258
3248
  throw new y(`Failed to get or create profile: ${o.status} ${h}`);
3259
3249
  }
3260
3250
  const c = {
3261
- 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,
3262
3252
  contextType: J.Plugin,
3263
3253
  userType: t.userType ?? Z.Human,
3264
3254
  clientType: t.clientType ?? X.DesktopWeb,
3265
3255
  payloadType: Q.Teleport,
3266
3256
  description: t.description ?? "Ikon SDK TypeScript",
3267
- deviceId: t.deviceId ?? Ke(),
3257
+ deviceId: t.deviceId ?? Ye(),
3268
3258
  productId: t.productId ?? "",
3269
3259
  versionId: t.versionId ?? "",
3270
3260
  installId: t.installId ?? "",
@@ -3276,16 +3266,16 @@ async function ja(t, e) {
3276
3266
  launchParams: t.parameters,
3277
3267
  hash: t.sessionId,
3278
3268
  waitForRunning: !0
3279
- }, l = t.provisioningTimeoutMs ?? _r, f = await yr(r, c, l, i, e);
3269
+ }, l = t.provisioningTimeoutMs ?? Sr, f = await gr(r, c, l, i, e);
3280
3270
  if (!f.configuration?.url)
3281
3271
  throw new y("Backend did not return a connect URL");
3282
3272
  const d = f.configuration.url;
3283
- return je(d, e);
3273
+ return Te(d, e);
3284
3274
  }
3285
3275
  async function za(t, e) {
3286
3276
  if (t.sessionId && t.channelKey)
3287
3277
  throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
3288
- const r = Tr(t.backendType), n = t.token;
3278
+ const r = wr(t.backendType), n = t.token;
3289
3279
  Ie.debug(`Authenticating with session token to: ${r}, space ID: ${t.spaceId}`);
3290
3280
  const s = await fetch(`${r}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
3291
3281
  method: "GET",
@@ -3299,13 +3289,13 @@ async function za(t, e) {
3299
3289
  throw new y(`Failed to get or create profile: ${s.status} ${f}`);
3300
3290
  }
3301
3291
  const o = {
3302
- 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,
3303
3293
  contextType: J.Browser,
3304
3294
  userType: Z.Human,
3305
3295
  clientType: X.DesktopWeb,
3306
3296
  payloadType: Q.Teleport,
3307
3297
  description: t.description ?? "Ikon SDK TypeScript",
3308
- deviceId: t.deviceId ?? Ke(),
3298
+ deviceId: t.deviceId ?? Ye(),
3309
3299
  productId: t.productId ?? "",
3310
3300
  versionId: t.versionId ?? "",
3311
3301
  installId: t.installId ?? "",
@@ -3317,14 +3307,14 @@ async function za(t, e) {
3317
3307
  launchParams: t.parameters,
3318
3308
  hash: t.sessionId,
3319
3309
  waitForRunning: !0
3320
- }, 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);
3321
3311
  if (!c.configuration?.url)
3322
3312
  throw new y("Backend did not return a connect URL");
3323
3313
  const l = c.configuration.url;
3324
- return je(l, e);
3314
+ return Te(l, e);
3325
3315
  }
3326
- const Nr = "ikon.theme", ke = "ikon.theme-user", Xa = "ikon.theme-change";
3327
- function gr(t) {
3316
+ const Cr = "ikon.theme", Ue = "ikon.theme-user", Xa = "ikon.theme-change";
3317
+ function br(t) {
3328
3318
  typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
3329
3319
  }
3330
3320
  const Ja = {
@@ -3335,8 +3325,8 @@ const Ja = {
3335
3325
  function Qa() {
3336
3326
  if (typeof window > "u" || !window.localStorage)
3337
3327
  return null;
3338
- const t = window.localStorage.getItem(ke) ?? window.localStorage.getItem(Nr) ?? "light";
3339
- return gr(t), t;
3328
+ const t = window.localStorage.getItem(Ue) ?? window.localStorage.getItem(Cr) ?? "light";
3329
+ return br(t), t;
3340
3330
  }
3341
3331
  const Za = {
3342
3332
  name: "ikon.client.setTheme",
@@ -3354,12 +3344,12 @@ function qa(t, e) {
3354
3344
  if (!r)
3355
3345
  return !1;
3356
3346
  const n = e === void 0 ? !0 : !!e, s = window.localStorage;
3357
- n ? s.setItem(ke, r) : s.removeItem(ke), s.setItem(Nr, r);
3347
+ n ? s.setItem(Ue, r) : s.removeItem(Ue), s.setItem(Cr, r);
3358
3348
  try {
3359
3349
  window.dispatchEvent(new CustomEvent(Xa, { detail: { mode: r } }));
3360
3350
  } catch {
3361
3351
  }
3362
- return gr(r), !0;
3352
+ return br(r), !0;
3363
3353
  }
3364
3354
  const ec = {
3365
3355
  name: "ikon.client.getLanguage",
@@ -3570,7 +3560,7 @@ function it(t, e) {
3570
3560
  }
3571
3561
  return r;
3572
3562
  }
3573
- function Cr(t, e) {
3563
+ function Rr(t, e) {
3574
3564
  if (t === void 0)
3575
3565
  return "null";
3576
3566
  if (t === null) {
@@ -3582,7 +3572,7 @@ function Cr(t, e) {
3582
3572
  }
3583
3573
  function yc(t, e) {
3584
3574
  const r = (t.parameters ?? []).map((i) => {
3585
- 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) : "";
3586
3576
  return {
3587
3577
  name: i.name,
3588
3578
  descriptor: o,
@@ -3621,7 +3611,7 @@ function yc(t, e) {
3621
3611
  returnType: n
3622
3612
  };
3623
3613
  }
3624
- const Se = L("FunctionRegistry"), Nc = new Uint8Array(0);
3614
+ const we = L("FunctionRegistry"), Nc = new Uint8Array(0);
3625
3615
  function gc(t) {
3626
3616
  return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
3627
3617
  }
@@ -3682,7 +3672,7 @@ class Cc {
3682
3672
  if (r === S.ACTION_FUNCTION_CALL) {
3683
3673
  const n = ne(e);
3684
3674
  return this.handleFunctionCall(e, n.senderId).catch((s) => {
3685
- Se.error("Failed to handle function call:", s);
3675
+ we.error("Failed to handle function call:", s);
3686
3676
  }), !0;
3687
3677
  }
3688
3678
  return !1;
@@ -3694,7 +3684,7 @@ class Cc {
3694
3684
  sendAllRegistrations() {
3695
3685
  if (!this.config || this.functions.size === 0)
3696
3686
  return;
3697
- const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = Ri({ Functions: e }), n = Mi(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);
3698
3688
  this.config.sendProtocolMessage(n);
3699
3689
  }
3700
3690
  /**
@@ -3703,16 +3693,16 @@ class Cc {
3703
3693
  sendRegistration(e) {
3704
3694
  if (!this.config)
3705
3695
  return;
3706
- const r = Ti(e.registerPayload, this.config.sessionId);
3696
+ const r = wi(e.registerPayload, this.config.sessionId);
3707
3697
  this.config.sendProtocolMessage(r);
3708
3698
  }
3709
3699
  /**
3710
3700
  * Handle an incoming function call.
3711
3701
  */
3712
3702
  async handleFunctionCall(e, r) {
3713
- const n = await Xs(e), s = this.functions.get(n.FunctionName);
3703
+ const n = await Qs(e), s = this.functions.get(n.FunctionName);
3714
3704
  if (!s) {
3715
- Se.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}`));
3716
3706
  return;
3717
3707
  }
3718
3708
  this.sendAck(n.CallId, n.InstanceId, r), this.executeFunction(s, n, r);
@@ -3730,10 +3720,10 @@ class Cc {
3730
3720
  const i = await e.handler(...s);
3731
3721
  let o = i, a = Nc;
3732
3722
  gc(i) && (o = i.value, a = new Uint8Array(i.data));
3733
- const c = Cr(o, e.returnType);
3723
+ const c = Rr(o, e.returnType);
3734
3724
  this.sendResult(r.CallId, r.InstanceId, n, e, c, a);
3735
3725
  } catch (s) {
3736
- Se.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)));
3737
3727
  }
3738
3728
  }
3739
3729
  /**
@@ -3742,7 +3732,7 @@ class Cc {
3742
3732
  sendAck(e, r, n) {
3743
3733
  if (!this.config)
3744
3734
  return;
3745
- const s = Ps(Ms({ CallId: e, InstanceId: r }), this.config.sessionId, { targetIds: [n] });
3735
+ const s = Bs(Ls({ CallId: e, InstanceId: r }), this.config.sessionId, { targetIds: [n] });
3746
3736
  this.config.sendProtocolMessage(s);
3747
3737
  }
3748
3738
  /**
@@ -3751,8 +3741,8 @@ class Cc {
3751
3741
  sendResult(e, r, n, s, i, o) {
3752
3742
  if (!this.config)
3753
3743
  return;
3754
- const a = Hi(
3755
- Gi({
3744
+ const a = $i(
3745
+ Vi({
3756
3746
  CallId: e,
3757
3747
  InstanceId: r,
3758
3748
  ResultTypeName: re(s.returnType),
@@ -3770,8 +3760,8 @@ class Cc {
3770
3760
  sendError(e, r, n, s) {
3771
3761
  if (!this.config)
3772
3762
  return;
3773
- const i = fi(
3774
- li({
3763
+ const i = pi(
3764
+ hi({
3775
3765
  CallId: e,
3776
3766
  InstanceId: r,
3777
3767
  ErrorMessage: s.message,
@@ -3787,7 +3777,7 @@ class Cc {
3787
3777
  function bc(t, e) {
3788
3778
  return { value: t, data: e };
3789
3779
  }
3790
- function we(t) {
3780
+ function Ae(t) {
3791
3781
  if (!(typeof t != "string" || !t.trim()))
3792
3782
  try {
3793
3783
  return JSON.parse(t);
@@ -3795,13 +3785,13 @@ function we(t) {
3795
3785
  return;
3796
3786
  }
3797
3787
  }
3798
- const Te = {
3788
+ const Se = {
3799
3789
  StartVideoCapture: "ikon.client.startVideoCapture",
3800
3790
  StartAudioCapture: "ikon.client.startAudioCapture",
3801
3791
  StopCapture: "ikon.client.stopCapture",
3802
3792
  CaptureImage: "ikon.client.captureImage"
3803
3793
  }, Rc = {
3804
- name: Te.StartVideoCapture,
3794
+ name: Se.StartVideoCapture,
3805
3795
  description: "Start camera or screen capture and stream video frames to the server",
3806
3796
  returnType: { kind: "string" },
3807
3797
  parameters: [
@@ -3809,17 +3799,17 @@ const Te = {
3809
3799
  { name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
3810
3800
  ]
3811
3801
  }, kc = {
3812
- name: Te.StartAudioCapture,
3802
+ name: Se.StartAudioCapture,
3813
3803
  description: "Start microphone capture and stream audio frames to the server",
3814
3804
  returnType: { kind: "string" },
3815
3805
  parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
3816
3806
  }, Uc = {
3817
- name: Te.StopCapture,
3807
+ name: Se.StopCapture,
3818
3808
  description: "Stop a previously started capture by captureId",
3819
3809
  returnType: { kind: "boolean" },
3820
3810
  parameters: [{ name: "captureId", type: { kind: "string" }, description: "Capture ID to stop" }]
3821
3811
  }, Dc = {
3822
- name: Te.CaptureImage,
3812
+ name: Se.CaptureImage,
3823
3813
  description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
3824
3814
  returnType: { kind: "string" },
3825
3815
  parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
@@ -3831,7 +3821,7 @@ function Mc(t, e) {
3831
3821
  const i = e.mediaCapture;
3832
3822
  if (!i)
3833
3823
  throw new Error("Media capture is not available in this environment");
3834
- const o = we(s);
3824
+ const o = Ae(s);
3835
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;
3836
3826
  })
3837
3827
  ), r.push(
@@ -3839,7 +3829,7 @@ function Mc(t, e) {
3839
3829
  const s = e.mediaCapture;
3840
3830
  if (!s)
3841
3831
  throw new Error("Media capture is not available in this environment");
3842
- const i = we(n);
3832
+ const i = Ae(n);
3843
3833
  return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).captureId;
3844
3834
  })
3845
3835
  ), r.push(
@@ -3855,7 +3845,7 @@ function Mc(t, e) {
3855
3845
  const s = e.mediaCapture;
3856
3846
  if (!s)
3857
3847
  throw new Error("Media capture is not available in this environment");
3858
- const i = we(n) ?? {}, o = await s.image.captureFromCamera({
3848
+ const i = Ae(n) ?? {}, o = await s.image.captureFromCamera({
3859
3849
  userGesture: !1,
3860
3850
  constraints: i.constraints,
3861
3851
  mime: i.mime,
@@ -3870,7 +3860,7 @@ function Mc(t, e) {
3870
3860
  n();
3871
3861
  };
3872
3862
  }
3873
- const br = () => {
3863
+ const kr = () => {
3874
3864
  if (typeof navigator > "u")
3875
3865
  return !1;
3876
3866
  const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
@@ -3886,7 +3876,7 @@ function le() {
3886
3876
  }
3887
3877
  return !0;
3888
3878
  }
3889
- function Rr(t) {
3879
+ function Ur(t) {
3890
3880
  return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
3891
3881
  }
3892
3882
  function Lc(t) {
@@ -3898,7 +3888,7 @@ function Lc(t) {
3898
3888
  }
3899
3889
  );
3900
3890
  }
3901
- const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback", vc = 120, Pc = 300, Fc = 4, Bc = 200, Gc = 100, xc = 8e3, Vc = 10, Ur = 100, Ue = 50, Dr = 128, Wc = 20, Hc = !0, x = 1500, $c = -20, Kc = -100, Yc = 200, g = L("IkonAudioPlayback"), jc = () => {
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 = () => {
3902
3892
  if (typeof navigator > "u" || typeof window > "u")
3903
3893
  return !1;
3904
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;
@@ -3907,7 +3897,7 @@ const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback", vc = 120, Pc = 300
3907
3897
  enabled: !1,
3908
3898
  statusIntervalMs: 1e3
3909
3899
  };
3910
- function K(t) {
3900
+ function $(t) {
3911
3901
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
3912
3902
  }
3913
3903
  function zc(t) {
@@ -3918,10 +3908,10 @@ const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_R
3918
3908
  const BUFFER_TARGET_MIN_MS = ${vc};
3919
3909
  const BUFFER_TARGET_MAX_MS = ${Pc};
3920
3910
  const JITTER_MULTIPLIER = ${Fc};
3921
- const LOCAL_BUFFER_MAX_MS = ${kr};
3911
+ const LOCAL_BUFFER_MAX_MS = ${Dr};
3922
3912
  const CONTROL_PERIOD_MS = ${Bc};
3923
- const UNDERRUN_JUMP_MS = ${Gc};
3924
- const STABLE_TIME_TO_DECREASE_MS = ${xc};
3913
+ const UNDERRUN_JUMP_MS = ${xc};
3914
+ const STABLE_TIME_TO_DECREASE_MS = ${Gc};
3925
3915
  const DECREASE_STEP_MS = ${Vc};
3926
3916
  const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
3927
3917
 
@@ -3930,15 +3920,15 @@ const INV_OUTPUT_SAMPLE_RATE_HZ = 1 / OUTPUT_SAMPLE_RATE_HZ;
3930
3920
  const MS_PER_SAMPLE = 1000 * INV_OUTPUT_SAMPLE_RATE_HZ;
3931
3921
 
3932
3922
  // Fade envelope constants
3933
- const FADE_IN_DURATION_MS = ${Ur};
3934
- const FADE_OUT_DURATION_MS = ${Ue};
3923
+ const FADE_IN_DURATION_MS = ${Mr};
3924
+ const FADE_OUT_DURATION_MS = ${De};
3935
3925
  const FADE_IN_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_IN_DURATION_MS / 1000);
3936
3926
  const FADE_OUT_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_OUT_DURATION_MS / 1000);
3937
3927
  const FADE_IN_INCREMENT = 1.0 / FADE_IN_DURATION_SAMPLES;
3938
3928
  const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
3939
3929
 
3940
3930
  // Render quantum size (standard Web Audio API value)
3941
- const RENDER_QUANTUM_SIZE = ${Dr};
3931
+ const RENDER_QUANTUM_SIZE = ${Or};
3942
3932
 
3943
3933
  // Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
3944
3934
  const BUFFER_REDUCTION_CROSSFADE_MS = ${Wc};
@@ -4939,7 +4929,7 @@ class ze {
4939
4929
  * (e.g., button click/release) to ensure the AudioContext can be recreated.
4940
4930
  */
4941
4931
  requestRecovery() {
4942
- if (this.enabled && br() && this.audioContext) {
4932
+ if (this.enabled && kr() && this.audioContext) {
4943
4933
  this.stopAudioGraph();
4944
4934
  try {
4945
4935
  const e = new AudioContext({
@@ -5040,11 +5030,11 @@ class ze {
5040
5030
  const o = r - i.playbackStartContextTime;
5041
5031
  if (o < 0)
5042
5032
  continue;
5043
- const a = o * n * s, c = i.frames, l = i.count, d = (i.head - l + x) % x;
5033
+ const a = o * n * s, c = i.frames, l = i.count, d = (i.head - l + G) % G;
5044
5034
  let h = null, E = null;
5045
5035
  for (let u = 0; u < l; u++) {
5046
- const N = (d + u) % x, w = c[N], v = w.samplePosition + Math.max(w.frameSamples, 1);
5047
- if (w.samplePosition <= a && (h = w), v > a && !E && (E = w, w.samplePosition <= a))
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))
5048
5038
  break;
5049
5039
  }
5050
5040
  if (!h)
@@ -5092,17 +5082,17 @@ class ze {
5092
5082
  try {
5093
5083
  this.audioContext = new AudioContext();
5094
5084
  } catch (d) {
5095
- g.warn(`Failed to create AudioContext: ${K(d)}`), this.audioContext = null;
5085
+ g.warn(`Failed to create AudioContext: ${$(d)}`), this.audioContext = null;
5096
5086
  return;
5097
5087
  }
5098
- g.debug(`AudioContext latencyHint unsupported: ${K(f)}`);
5088
+ g.debug(`AudioContext latencyHint unsupported: ${$(f)}`);
5099
5089
  }
5100
- g.debug(`AudioContext sample rate request unsupported: ${K(l)}`);
5090
+ g.debug(`AudioContext sample rate request unsupported: ${$(l)}`);
5101
5091
  }
5102
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);
5103
5093
  }
5104
5094
  const n = this.audioContext, s = this.resolveDiagnosticsConfig();
5105
- if ((this.config.performance?.preferAudioWorklet ?? !0) && Rr(n)) {
5095
+ if ((this.config.performance?.preferAudioWorklet ?? !0) && Ur(n)) {
5106
5096
  await this.ensureAudioWorklet(n, s, e, r);
5107
5097
  return;
5108
5098
  }
@@ -5265,7 +5255,7 @@ class ze {
5265
5255
  this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([zc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: R })], { type: "text/javascript" }));
5266
5256
  }
5267
5257
  this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((f) => {
5268
- 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;
5269
5259
  }));
5270
5260
  try {
5271
5261
  await this.workletReady;
@@ -5311,7 +5301,7 @@ class ze {
5311
5301
  if (this.scriptProcessorNode)
5312
5302
  return;
5313
5303
  this.stopAudioWorklet(), this.pendingWorkletMessages = [];
5314
- const n = 1024, s = new Float32Array(n * R), i = Math.round(this.outputSampleRateHz * Ur / 1e3), o = Math.round(this.outputSampleRateHz * Ue / 1e3), a = 1 / i, c = 1 / o, l = 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);
5315
5305
  d.onaudioprocess = (h) => {
5316
5306
  const E = h.outputBuffer, m = E.numberOfChannels, I = E.length;
5317
5307
  for (let p = 0; p < m; p++) {
@@ -5321,18 +5311,18 @@ class ze {
5321
5311
  let T = 0;
5322
5312
  f.length = 0;
5323
5313
  for (const [p, u] of this.fallbackQueues.entries()) {
5324
- u.totalSamples > 0 && (T += 1), (u.ending || u.inputDrained) && u.fadeDirection !== "out" && u.totalSamples / m * 1e3 / this.outputSampleRateHz <= Ue * 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);
5325
- for (let w = 0; w < I; w++) {
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++) {
5326
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"));
5327
5317
  for (let v = 0; v < m; v++) {
5328
- const M = s[w * m + v];
5329
- l[v][w] += M * u.fadeGain;
5318
+ const M = s[A * m + v];
5319
+ l[v][A] += M * u.fadeGain;
5330
5320
  }
5331
5321
  }
5332
5322
  const N = u.ending || u.inputDrained;
5333
5323
  if (N && u.totalSamples <= 0) {
5334
5324
  if (u.fadeDirection === "out" && u.fadeGain > 1e-3) {
5335
- for (let w = 0; w < I; w++)
5325
+ for (let A = 0; A < I; A++)
5336
5326
  if (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 1e-3) {
5337
5327
  u.fadeGain = 0, u.fadeDirection = "none";
5338
5328
  break;
@@ -5341,12 +5331,12 @@ class ze {
5341
5331
  u.fadeGain <= 1e-3 && u.ending && f.push(p);
5342
5332
  } else if (!N && u.totalSamples <= 0 && u.hasLastOut && u.lastOut && u.fadeGain > 1e-3) {
5343
5333
  u.fadeDirection = "out", u.underrunPending = !0;
5344
- const w = u.lastOut, v = I - 1;
5334
+ const A = u.lastOut, v = I - 1;
5345
5335
  for (let M = 0; M < I; M++) {
5346
5336
  u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none");
5347
- for (let $ = 0; $ < m; $++) {
5348
- const Gr = w[v * m + $];
5349
- l[$][M] += Gr * u.fadeGain;
5337
+ for (let K = 0; K < m; K++) {
5338
+ const Vr = A[v * m + K];
5339
+ l[K][M] += Vr * u.fadeGain;
5350
5340
  }
5351
5341
  }
5352
5342
  }
@@ -5387,7 +5377,7 @@ class ze {
5387
5377
  e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
5388
5378
  }
5389
5379
  trimFallbackQueue(e) {
5390
- 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;
5391
5381
  n <= 0 || this.skipFromFallbackQueue(e, n);
5392
5382
  }
5393
5383
  stopScriptProcessorDiagnostics() {
@@ -5434,7 +5424,7 @@ class ze {
5434
5424
  try {
5435
5425
  await this.resumeWithTimeout(e), this.removeUnlockHandler();
5436
5426
  } catch (o) {
5437
- g.warn(`Failed to resume AudioContext: ${K(o)}`), this.addUnlockHandler();
5427
+ g.warn(`Failed to resume AudioContext: ${$(o)}`), this.addUnlockHandler();
5438
5428
  }
5439
5429
  }
5440
5430
  async recoverAudioContext(e) {
@@ -5510,7 +5500,7 @@ class ze {
5510
5500
  try {
5511
5501
  this.audioWorker = new Lc();
5512
5502
  } catch (d) {
5513
- 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;
5514
5504
  return;
5515
5505
  }
5516
5506
  const r = this.audioWorker;
@@ -5532,8 +5522,8 @@ class ze {
5532
5522
  onAudioWorkerMessage(e) {
5533
5523
  if (e.type === "streamBegin") {
5534
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"))) {
5535
- const s = new Array(x);
5536
- for (let i = 0; i < x; i++)
5525
+ const s = new Array(G);
5526
+ for (let i = 0; i < G; i++)
5537
5527
  s[i] = { samplePosition: 0, frameSamples: 0, mouthOpenY: 0, mouthForm: 0 };
5538
5528
  this.visemeBuffers.set(e.streamId, {
5539
5529
  frames: s,
@@ -5592,14 +5582,14 @@ class ze {
5592
5582
  s.epochTimestampSamples = e.timestampInterleavedSamples;
5593
5583
  const c = this.audioContext;
5594
5584
  if (c) {
5595
- const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), f = $c + l * 1e3, d = Math.min(Yc, Math.max(Kc, f));
5585
+ const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), f = Kc + l * 1e3, d = Math.min(Yc, Math.max($c, f));
5596
5586
  s.playbackStartContextTime = c.currentTime + d / 1e3;
5597
5587
  }
5598
5588
  s.timingEstablished = !0;
5599
5589
  }
5600
5590
  if (e.frameSizeInterleavedSamples > 0) {
5601
5591
  const c = s.frames[s.head];
5602
- 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++;
5603
5593
  }
5604
5594
  }
5605
5595
  }
@@ -5725,7 +5715,7 @@ function Xc(t) {
5725
5715
  );
5726
5716
  }
5727
5717
  const V = L("IkonVideoPlayback");
5728
- function Ae(t) {
5718
+ function ye(t) {
5729
5719
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
5730
5720
  }
5731
5721
  class Jc {
@@ -5805,7 +5795,7 @@ class Jc {
5805
5795
  try {
5806
5796
  e = new Xc();
5807
5797
  } catch (r) {
5808
- V.warn(`Failed to create video worker: ${Ae(r)}`);
5798
+ V.warn(`Failed to create video worker: ${ye(r)}`);
5809
5799
  return;
5810
5800
  }
5811
5801
  this.worker = e, e.addEventListener("message", (r) => this.onWorkerMessage(r.data)), e.addEventListener("error", (r) => {
@@ -5874,7 +5864,7 @@ class Jc {
5874
5864
  const n = r.canvas.transferControlToOffscreen();
5875
5865
  this.worker.postMessage({ type: "attachSurface", streamId: e, canvas: n }, [n]), r.attachedToWorker = !0;
5876
5866
  } catch (n) {
5877
- V.warn(`Failed to attach offscreen canvas for stream ${e}: ${Ae(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 }));
5878
5868
  try {
5879
5869
  this.worker.postMessage({ type: "watchStream", streamId: e }), r.attachedToWorker = !0;
5880
5870
  } catch {
@@ -5923,7 +5913,7 @@ class Jc {
5923
5913
  try {
5924
5914
  this.worker.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
5925
5915
  } catch (r) {
5926
- V.warn(`Failed to attach video protocol port: ${Ae(r)}`), this.protocolPort.close(), this.protocolPort = null;
5916
+ V.warn(`Failed to attach video protocol port: ${ye(r)}`), this.protocolPort.close(), this.protocolPort = null;
5927
5917
  }
5928
5918
  }
5929
5919
  }
@@ -6092,7 +6082,7 @@ class RingBuffer {
6092
6082
  }
6093
6083
  }
6094
6084
 
6095
- const RENDER_QUANTUM_SIZE = ${Dr};
6085
+ const RENDER_QUANTUM_SIZE = ${Or};
6096
6086
 
6097
6087
  class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
6098
6088
  constructor(options) {
@@ -6225,7 +6215,7 @@ class nl {
6225
6215
  return await navigator.mediaDevices.getUserMedia({ audio: n });
6226
6216
  }
6227
6217
  async ensureWorklet(e) {
6228
- if (!Rr(e))
6218
+ if (!Ur(e))
6229
6219
  throw new Error("AudioWorklet is not supported in this browser");
6230
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));
6231
6221
  try {
@@ -6267,18 +6257,18 @@ class nl {
6267
6257
  sharedArrayBuffer: E
6268
6258
  }), await new Promise((p, u) => {
6269
6259
  const N = setTimeout(() => {
6270
- m.removeEventListener("message", w), u(new Error("Audio capture worker start timeout"));
6271
- }, 1e4), w = (v) => {
6260
+ m.removeEventListener("message", A), u(new Error("Audio capture worker start timeout"));
6261
+ }, 1e4), A = (v) => {
6272
6262
  const M = v.data;
6273
6263
  if (M?.type === "started" && M.captureId === o)
6274
- clearTimeout(N), m.removeEventListener("message", w), p();
6264
+ clearTimeout(N), m.removeEventListener("message", A), p();
6275
6265
  else if (M?.type === "error" && M.captureId === o) {
6276
- clearTimeout(N), m.removeEventListener("message", w);
6277
- const $ = M.error;
6278
- u(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"));
6279
6269
  }
6280
6270
  };
6281
- m.addEventListener("message", w);
6271
+ m.addEventListener("message", A);
6282
6272
  });
6283
6273
  const I = new AudioWorkletNode(n, "ikon-audio-capture", {
6284
6274
  numberOfInputs: 1,
@@ -6311,7 +6301,7 @@ class nl {
6311
6301
  T.stopped || m.postMessage({ type: "startSegment", captureId: o });
6312
6302
  },
6313
6303
  endSegment: () => {
6314
- T.stopped || (m.postMessage({ type: "endSegment", captureId: o }), br() && T.stop());
6304
+ T.stopped || (m.postMessage({ type: "endSegment", captureId: o }), kr() && T.stop());
6315
6305
  },
6316
6306
  stop: async () => {
6317
6307
  if (!T.stopped) {
@@ -6390,9 +6380,9 @@ class nl {
6390
6380
  }
6391
6381
  }
6392
6382
  }
6393
- const Mr = 1280, Or = 720, sl = 30, Lr = "image/jpeg", il = 0.92;
6383
+ const Lr = 1280, vr = 720, sl = 30, Pr = "image/jpeg", il = 0.92;
6394
6384
  async function ol(t, e) {
6395
- const r = e.mime ?? Lr, n = e.quality ?? il;
6385
+ const r = e.mime ?? Pr, n = e.quality ?? il;
6396
6386
  if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
6397
6387
  try {
6398
6388
  return await t.convertToBlob({ type: r, quality: n });
@@ -6434,7 +6424,7 @@ class al {
6434
6424
  await s.play();
6435
6425
  } catch {
6436
6426
  }
6437
- 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;
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;
6438
6428
  let l;
6439
6429
  if (typeof OffscreenCanvas < "u")
6440
6430
  l = new OffscreenCanvas(a, c);
@@ -6448,7 +6438,7 @@ class al {
6448
6438
  f.drawImage(s, 0, 0, a, c);
6449
6439
  const d = await ol(l, e), h = await d.arrayBuffer();
6450
6440
  return {
6451
- mime: d.type || e.mime || Lr,
6441
+ mime: d.type || e.mime || Pr,
6452
6442
  width: a,
6453
6443
  height: c,
6454
6444
  data: new Uint8Array(h)
@@ -6550,7 +6540,7 @@ class hl {
6550
6540
  const n = ll(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
6551
6541
  if (!i)
6552
6542
  throw s.getTracks().forEach((I) => I.stop()), new Error("No video track available");
6553
- const o = i.getSettings(), a = e.options?.width ?? o.width ?? Mr, c = e.options?.height ?? o.height ?? Or, l = ul(), d = new l({ 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();
6554
6544
  E.postMessage(
6555
6545
  {
6556
6546
  type: "start",
@@ -6634,7 +6624,7 @@ const ut = {
6634
6624
  [k.WebSocket]: 1,
6635
6625
  [k.WebTransportProxy]: 2,
6636
6626
  [k.WebSocketProxy]: 3
6637
- }, ye = "ikon_endpoint_type";
6627
+ }, Ne = "ikon_endpoint_type";
6638
6628
  class fl {
6639
6629
  isLocal;
6640
6630
  workingEndpointType = null;
@@ -6667,7 +6657,7 @@ class fl {
6667
6657
  if (!this.isLocal) {
6668
6658
  this.workingEndpointType = e;
6669
6659
  try {
6670
- localStorage.setItem(ye, String(e));
6660
+ localStorage.setItem(Ne, String(e));
6671
6661
  } catch {
6672
6662
  }
6673
6663
  }
@@ -6678,7 +6668,7 @@ class fl {
6678
6668
  clearRememberedType() {
6679
6669
  this.workingEndpointType = null;
6680
6670
  try {
6681
- localStorage.removeItem(ye);
6671
+ localStorage.removeItem(Ne);
6682
6672
  } catch {
6683
6673
  }
6684
6674
  }
@@ -6687,7 +6677,7 @@ class fl {
6687
6677
  */
6688
6678
  loadRememberedType() {
6689
6679
  try {
6690
- const e = localStorage.getItem(ye);
6680
+ const e = localStorage.getItem(Ne);
6691
6681
  if (e !== null) {
6692
6682
  const r = Number(e);
6693
6683
  k[r] !== void 0 && (this.workingEndpointType = r);
@@ -6696,8 +6686,11 @@ class fl {
6696
6686
  }
6697
6687
  }
6698
6688
  }
6699
- const A = L("IkonClient");
6700
- class Dl {
6689
+ const w = L("IkonClient");
6690
+ function El() {
6691
+ return typeof __IKON_EXTERNAL_TOKEN__ < "u" && __IKON_EXTERNAL_TOKEN__;
6692
+ }
6693
+ class Ml {
6701
6694
  channelManager = null;
6702
6695
  protocolWorker = null;
6703
6696
  workerManagerState = null;
@@ -6734,6 +6727,9 @@ class Dl {
6734
6727
  nextProtocolSendPortId = 1;
6735
6728
  _media;
6736
6729
  _mediaCapture = null;
6730
+ // External token mode
6731
+ _externalTokenMode = El();
6732
+ _externalTokenCleanup = null;
6737
6733
  /**
6738
6734
  * SDK-provided media pipelines (audio/video).
6739
6735
  *
@@ -6816,28 +6812,38 @@ class Dl {
6816
6812
  async connect() {
6817
6813
  if (this.currentState !== "idle")
6818
6814
  throw new Error(`Cannot connect: already in state ${this.currentState}`);
6819
- 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(() => {
6820
6826
  this.currentState === "connecting" && this.setState("connectingSlow");
6821
6827
  }, this.slowConnectionThresholdMs), this.connectionTimer = setTimeout(() => {
6822
- (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")));
6823
6829
  }, this.connectionTimeoutMs);
6824
6830
  try {
6825
- const e = await this.authenticate();
6826
- this.authResponse = e.authResponse, this._sessionId = e.authResponse.ClientContext.SessionId, A.info("Connected to Ikon server"), await this.connectProtocol(this.authResponse.Entrypoints);
6827
- } catch (e) {
6828
- 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")
6829
6835
  return;
6830
- 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;
6831
6837
  }
6832
6838
  }
6833
6839
  /**
6834
6840
  * Disconnect from the server.
6835
6841
  */
6836
6842
  disconnect() {
6837
- 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");
6838
6844
  }
6839
6845
  sendActionCall(e, r) {
6840
- const n = en(
6846
+ const n = rn(
6841
6847
  {
6842
6848
  ActionId: _.fromString(e),
6843
6849
  PayloadJson: r ?? "{}"
@@ -6860,7 +6866,7 @@ class Dl {
6860
6866
  this.channelManager.sendProtocolMessage(e);
6861
6867
  return;
6862
6868
  }
6863
- A.warn("Cannot send: not connected");
6869
+ w.warn("Cannot send: not connected");
6864
6870
  }
6865
6871
  /**
6866
6872
  * Create a MessagePort that receives raw protocol message buffers.
@@ -6957,7 +6963,7 @@ class Dl {
6957
6963
  return;
6958
6964
  this.channelManager?.sendProtocolMessage(c);
6959
6965
  } catch (c) {
6960
- A.warn(`Failed to forward protocol send port message: ${c}`);
6966
+ w.warn(`Failed to forward protocol send port message: ${c}`);
6961
6967
  }
6962
6968
  };
6963
6969
  try {
@@ -7032,7 +7038,7 @@ class Dl {
7032
7038
  r === S.CORE_GLOBAL_STATE && Fo(e).then((s) => {
7033
7039
  this._globalState = s, this._globalState.DebugMode && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
7034
7040
  }).catch((s) => {
7035
- A.error("Failed to parse GlobalState:", s);
7041
+ w.error("Failed to parse GlobalState:", s);
7036
7042
  }), this.notifyMessageSubscribers(e, r, n);
7037
7043
  }
7038
7044
  /**
@@ -7056,7 +7062,7 @@ class Dl {
7056
7062
  }
7057
7063
  s[a](e);
7058
7064
  } catch (l) {
7059
- A.error("Message subscriber error:", l);
7065
+ w.error("Message subscriber error:", l);
7060
7066
  }
7061
7067
  }
7062
7068
  }
@@ -7073,7 +7079,7 @@ class Dl {
7073
7079
  this.currentState === "connected" && this.setState("reconnecting");
7074
7080
  break;
7075
7081
  case "stopped":
7076
- A.info("Ikon server has stopped"), this.clearTimers(), this.setState("offline");
7082
+ w.info("Ikon server has stopped"), this.clearTimers(), this.setState("offline");
7077
7083
  break;
7078
7084
  case "offline":
7079
7085
  this.currentState !== "idle" && (this.clearTimers(), this.setState("offline"));
@@ -7098,7 +7104,7 @@ class Dl {
7098
7104
  try {
7099
7105
  r(e);
7100
7106
  } catch (n) {
7101
- A.error("State subscriber error:", n);
7107
+ w.error("State subscriber error:", n);
7102
7108
  }
7103
7109
  this.config.onConnectionStateChange?.(e);
7104
7110
  }
@@ -7108,7 +7114,7 @@ class Dl {
7108
7114
  * Use this for unrecoverable SDK internal errors.
7109
7115
  */
7110
7116
  setErrorState(e) {
7111
- 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);
7112
7118
  }
7113
7119
  async connectProtocol(e) {
7114
7120
  if (typeof Worker > "u") {
@@ -7119,7 +7125,7 @@ class Dl {
7119
7125
  try {
7120
7126
  r = new ga();
7121
7127
  } catch (h) {
7122
- 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);
7123
7129
  return;
7124
7130
  }
7125
7131
  this.channelManager = null, this.protocolWorker = r, this.workerManagerState = "idle";
@@ -7164,7 +7170,7 @@ class Dl {
7164
7170
  try {
7165
7171
  await n;
7166
7172
  } catch (h) {
7167
- 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);
7168
7174
  }
7169
7175
  }
7170
7176
  async connectProtocolOnMainThread(e) {
@@ -7246,14 +7252,14 @@ class Dl {
7246
7252
  * Close connection cleanly to avoid orphaned connections on the server.
7247
7253
  */
7248
7254
  handleBeforeUnload() {
7249
- A.debug("Page unloading, closing connection..."), this.disconnect();
7255
+ w.debug("Page unloading, closing connection..."), this.disconnect();
7250
7256
  }
7251
7257
  /**
7252
7258
  * Handle page hide event (mobile-friendly, bfcache compatible).
7253
7259
  * Only disconnect if page is actually being unloaded (not persisted).
7254
7260
  */
7255
7261
  handlePageHide(e) {
7256
- 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());
7257
7263
  }
7258
7264
  /**
7259
7265
  * Handle visibility change event.
@@ -7269,10 +7275,10 @@ class Dl {
7269
7275
  */
7270
7276
  checkConnectionHealth() {
7271
7277
  if (this.protocolWorker) {
7272
- 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"));
7273
7279
  return;
7274
7280
  }
7275
- 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"));
7276
7282
  }
7277
7283
  /**
7278
7284
  * Try to handle joined state - only proceeds if both channels are connected and GlobalState is received.
@@ -7293,127 +7299,147 @@ class Dl {
7293
7299
  const e = Qe(Je(), this._sessionId ?? 0);
7294
7300
  this.sendProtocolMessage(e);
7295
7301
  } catch (e) {
7296
- A.error("onJoined callback error:", e);
7302
+ w.error("onJoined callback error:", e);
7297
7303
  const r = Qe(Je(), this._sessionId ?? 0);
7298
7304
  this.sendProtocolMessage(r);
7299
7305
  }
7300
7306
  }
7301
- }
7302
- function Ml(t) {
7303
- return t === "connecting" || t === "connectingSlow" || t === "reconnecting";
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
+ }
7304
7327
  }
7305
7328
  function Ol(t) {
7306
- return t === "connected";
7329
+ return t === "waitingForToken" || t === "connecting" || t === "connectingSlow" || t === "reconnecting";
7307
7330
  }
7308
7331
  function Ll(t) {
7309
- return t === "offline" || t === "offlineError" || t === "idle";
7332
+ return t === "connected";
7310
7333
  }
7311
7334
  function vl(t) {
7312
- return t === "offlineError";
7335
+ return t === "offline" || t === "offlineError" || t === "idle";
7313
7336
  }
7314
- const vr = /* @__PURE__ */ new Map();
7315
- for (const [t, e] of Object.entries(S))
7316
- typeof e == "number" && vr.set(e, t);
7317
7337
  function Pl(t) {
7318
- return vr.get(t) ?? `UNKNOWN_${t}`;
7338
+ return t === "offlineError";
7319
7339
  }
7320
- const Pr = 1e3, Fr = Ir.INFO;
7321
- let O = [], De = Pr, Br = Fr, Me = null;
7322
- function El(t) {
7323
- t.level < Br || (O.push(t), O.length > De && (O = O.slice(-De)));
7340
+ const Fr = /* @__PURE__ */ new Map();
7341
+ for (const [t, e] of Object.entries(S))
7342
+ typeof e == "number" && Fr.set(e, t);
7343
+ function Fl(t) {
7344
+ return Fr.get(t) ?? `UNKNOWN_${t}`;
7324
7345
  }
7346
+ const Br = 1e3, xr = _r.INFO;
7347
+ let O = [], Me = Br, Gr = xr, Oe = null;
7325
7348
  function pl(t) {
7326
- De = t?.maxBufferSize ?? Pr, Br = t?.minLevel ?? Fr, O = [], Ra(El);
7349
+ t.level < Gr || (O.push(t), O.length > Me && (O = O.slice(-Me)));
7327
7350
  }
7328
- function Fl(t) {
7329
- Me = t;
7351
+ function Il(t) {
7352
+ Me = t?.maxBufferSize ?? Br, Gr = t?.minLevel ?? xr, O = [], Ra(pl);
7353
+ }
7354
+ function Bl(t) {
7355
+ Oe = t;
7330
7356
  }
7331
- function Bl() {
7357
+ function xl() {
7332
7358
  return O;
7333
7359
  }
7334
- function Il() {
7360
+ function ml() {
7335
7361
  const t = O;
7336
7362
  return O = [], t;
7337
7363
  }
7338
7364
  function Gl() {
7339
- if (!Me || O.length === 0)
7365
+ if (!Oe || O.length === 0)
7340
7366
  return 0;
7341
- const t = Il();
7342
- return Me(t), t.length;
7367
+ const t = ml();
7368
+ return Oe(t), t.length;
7343
7369
  }
7344
- function xl() {
7370
+ function Vl() {
7345
7371
  O = [];
7346
7372
  }
7347
- function Vl() {
7373
+ function Wl() {
7348
7374
  return O.length;
7349
7375
  }
7350
- pl();
7376
+ Il();
7351
7377
  export {
7352
7378
  y as AuthenticationError,
7353
7379
  va as Channel,
7354
7380
  Pa as ChannelManager,
7355
- _l as ChannelNotFoundError,
7381
+ Tl as ChannelNotFoundError,
7356
7382
  X as ClientType,
7357
- We as ConnectionError,
7383
+ He as ConnectionError,
7358
7384
  J as ContextType,
7359
7385
  fl as EndpointSelector,
7360
7386
  k as EntrypointType,
7361
7387
  Cc as FunctionRegistry,
7362
- Cl as IKON_AUTH_BASE_URL,
7388
+ bl as IKON_AUTH_BASE_URL,
7363
7389
  nt as IKON_AUTH_URL_DEV,
7364
7390
  rt as IKON_AUTH_URL_PROD,
7365
7391
  pe as IKON_BACKEND_URL_DEV,
7366
- Re as IKON_BACKEND_URL_PROD,
7392
+ ke as IKON_BACKEND_URL_PROD,
7367
7393
  nl as IkonAudioCapture,
7368
7394
  ze as IkonAudioPlayback,
7369
- Dl as IkonClient,
7395
+ Ml as IkonClient,
7370
7396
  al as IkonImageCapture,
7371
7397
  Qc as IkonMedia,
7372
7398
  dl as IkonMediaCapture,
7373
7399
  hl as IkonVideoCapture,
7374
7400
  Jc as IkonVideoPlayback,
7375
- He as KeepaliveTimeoutError,
7376
- Ir as LogLevel,
7401
+ Ke as KeepaliveTimeoutError,
7402
+ _r as LogLevel,
7377
7403
  Ca as MaxRetriesExceededError,
7378
- Sl as NoChannelsError,
7404
+ wl as NoChannelsError,
7379
7405
  S as Opcode,
7380
7406
  ba as ProvisioningTimeoutError,
7381
- Tl as SpaceNotFoundError,
7407
+ Sl as SpaceNotFoundError,
7382
7408
  W as TransportError,
7383
7409
  Z as UserType,
7384
- ml as asProtocolMessage,
7385
- Nl as clearDeviceId,
7386
- xl as clearLogBuffer,
7410
+ _l as asProtocolMessage,
7411
+ gl as clearDeviceId,
7412
+ Vl as clearLogBuffer,
7387
7413
  L as createLogger,
7388
- kl as deriveAuthUrl,
7389
- Rl as deriveBackendType,
7390
- bl as deriveBackendUrl,
7391
- gl as extractUserIdFromToken,
7414
+ Ul as deriveAuthUrl,
7415
+ kl as deriveBackendType,
7416
+ Rl as deriveBackendUrl,
7417
+ Cl as extractUserIdFromToken,
7392
7418
  Gl as flushLogs,
7393
- Bl as getBufferedLogs,
7394
- Vl as getLogBufferSize,
7395
- Al as getLogLevel,
7396
- yl as getLogSink,
7397
- Pl as getOpcodeName,
7398
- Ke as getOrCreateDeviceId,
7399
- pl as initializeLogSink,
7400
- Rr as isAudioWorkletSupported,
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,
7401
7427
  st as isBrowserEnvironment,
7402
- Ye as isCloudEnvironment,
7403
- Ol as isConnected,
7404
- Ml as isConnecting,
7405
- vl as isError,
7406
- Ll as isOffline,
7428
+ je as isCloudEnvironment,
7429
+ Ll as isConnected,
7430
+ Ol as isConnecting,
7431
+ Pl as isError,
7432
+ vl as isOffline,
7407
7433
  le as isSharedArrayBufferSupported,
7408
- mr as isWebTransportSupported,
7409
- Ul as parseUrlParams,
7434
+ Tr as isWebTransportSupported,
7435
+ Dl as parseUrlParams,
7410
7436
  ue as readOpcode,
7411
7437
  ce as readOpcodeGroup,
7412
7438
  ne as readProtocolMessageHeaders,
7413
7439
  wc as registerBrowserFunctions,
7414
- wl as setLogLevel,
7440
+ Al as setLogLevel,
7415
7441
  Ra as setLogSink,
7416
- Fl as setSendLogsCallback,
7417
- Il as takeBufferedLogs,
7442
+ Bl as setSendLogsCallback,
7443
+ ml as takeBufferedLogs,
7418
7444
  bc as withResultData
7419
7445
  };