@ikonai/sdk-ui 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,7 @@
1
- function Zt(t) {
1
+ const ee = {
2
+ Compressed: 8
3
+ };
4
+ function se(t) {
2
5
  if (t.length < 8)
3
6
  throw new Error("Protocol message too short");
4
7
  return (t[4] | t[5] << 8 | t[6] << 16 | t[7] << 24) >>> 0;
@@ -7,38 +10,57 @@ function et(t) {
7
10
  const e = K(t), s = new DataView(e.buffer, e.byteOffset, e.byteLength);
8
11
  if (e.length < 27)
9
12
  throw new Error("Protocol payload too short");
10
- const r = s.getUint32(0, !0), n = s.getUint32(4, !0), i = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0), I = s.getUint32(20, !0), l = s.getUint8(24), c = s.getUint8(25), E = s.getUint8(26);
11
- if (27 + I * 4 > e.length)
13
+ const r = s.getUint32(0, !0), n = s.getUint32(4, !0), i = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0), c = s.getUint32(20, !0), l = s.getUint8(24), I = s.getUint8(25), E = s.getUint8(26);
14
+ if (27 + c * 4 > e.length)
12
15
  throw new Error("Protocol header exceeds payload length");
13
- const N = [];
16
+ const A = [];
14
17
  let h = 27;
15
- for (let w = 0; w < I; w++)
16
- N.push(s.getUint32(h, !0)), h += 4;
18
+ for (let w = 0; w < c; w++)
19
+ A.push(s.getUint32(h, !0)), h += 4;
17
20
  return {
18
21
  length: r,
19
22
  opcode: n,
20
23
  senderId: i,
21
24
  trackId: o,
22
25
  sequenceId: a,
23
- targetIds: N,
26
+ targetIds: A,
24
27
  payloadVersion: l,
25
- payloadType: c,
28
+ payloadType: I,
26
29
  flags: E
27
30
  };
28
31
  }
29
- function $(t, e, s) {
32
+ async function $(t, e, s) {
30
33
  const r = K(t), n = et(r);
31
34
  if (e !== void 0 && n.opcode !== e)
32
35
  throw new Error(`Unexpected opcode ${n.opcode}`);
33
36
  if (n.payloadType !== 8)
34
37
  throw new Error(`Unexpected payload type ${n.payloadType}`);
35
38
  const i = 27 + n.targetIds.length * 4;
36
- return r.subarray(i, n.length);
39
+ let o = r.subarray(i, n.length);
40
+ return (n.flags & ee.Compressed) !== 0 && (o = await re(o)), o;
41
+ }
42
+ async function re(t) {
43
+ if (typeof DecompressionStream > "u")
44
+ throw new Error("DecompressionStream not supported");
45
+ const e = new DecompressionStream("gzip"), s = e.writable.getWriter(), r = new Uint8Array(t);
46
+ s.write(r), s.close();
47
+ const n = e.readable.getReader(), i = [];
48
+ let o = 0;
49
+ for (; ; ) {
50
+ const { done: l, value: I } = await n.read();
51
+ if (l) break;
52
+ i.push(I), o += I.length;
53
+ }
54
+ const a = new Uint8Array(o);
55
+ let c = 0;
56
+ for (let l = 0; l < i.length; l++)
57
+ a.set(i[l], c), c += i[l].length;
58
+ return a;
37
59
  }
38
60
  var F = /* @__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))(F || {});
39
- const te = 161, ee = 162;
61
+ const ne = 161, ie = 162;
40
62
  new TextEncoder();
41
- const se = new TextDecoder("utf-8", { fatal: !0 });
63
+ const oe = new TextDecoder("utf-8", { fatal: !0 });
42
64
  class L {
43
65
  constructor(e, s, r) {
44
66
  this.buffer = e, this.version = s, this.offset = r, this.end = e.length - 1;
@@ -49,7 +71,7 @@ class L {
49
71
  const s = K(e);
50
72
  if (s.length < 2)
51
73
  throw new Error("Teleport payload too short");
52
- if (s[0] !== te || s[s.length - 1] !== ee)
74
+ if (s[0] !== ne || s[s.length - 1] !== ie)
53
75
  throw new Error("Teleport object missing markers");
54
76
  const r = { offset: 1 }, n = C(s, r, "InvalidLength");
55
77
  return new L(s, n, r.offset);
@@ -59,7 +81,7 @@ class L {
59
81
  return null;
60
82
  if (this.offset + 5 > this.buffer.length)
61
83
  throw new Error("Teleport object truncated");
62
- const e = oe(this.buffer, this.offset);
84
+ const e = ce(this.buffer, this.offset);
63
85
  this.offset += 4;
64
86
  const s = this.buffer[this.offset++], r = s >> 4 & 15;
65
87
  if ((s & 15) !== 0)
@@ -67,12 +89,12 @@ class L {
67
89
  const n = p(r);
68
90
  let i;
69
91
  if (n >= 0)
70
- d(this.buffer, this.offset, n), i = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
92
+ S(this.buffer, this.offset, n), i = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
71
93
  else {
72
94
  const o = { offset: this.offset }, a = C(this.buffer, o, "InvalidLength");
73
- d(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
95
+ S(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
74
96
  }
75
- return new re(e, r, i);
97
+ return new ae(e, r, i);
76
98
  }
77
99
  }
78
100
  class U {
@@ -137,7 +159,7 @@ class U {
137
159
  return this.ensureType(
138
160
  12
139
161
  /* String */
140
- ), se.decode(this.payload);
162
+ ), oe.decode(this.payload);
141
163
  }
142
164
  asGuid() {
143
165
  return this.ensureType(
@@ -168,7 +190,7 @@ class U {
168
190
  throw new Error(`Teleport value has type ${F[this.type]}, expected ${F[e]}`);
169
191
  }
170
192
  }
171
- class re extends U {
193
+ class ae extends U {
172
194
  constructor(e, s, r) {
173
195
  super(s, r), this.fieldId = e;
174
196
  }
@@ -214,20 +236,20 @@ class st {
214
236
  case 6:
215
237
  case 14: {
216
238
  const e = p(this.elementType);
217
- d(this.payload, this.offset, e);
239
+ S(this.payload, this.offset, e);
218
240
  const s = this.payload.subarray(this.offset, this.offset + e);
219
241
  return this.offset += e, new M(this.elementType, s);
220
242
  }
221
243
  case 12:
222
244
  case 13: {
223
245
  const e = { offset: this.offset }, s = C(this.payload, e, "ArrayMalformed");
224
- d(this.payload, e.offset, s);
246
+ S(this.payload, e.offset, s);
225
247
  const r = this.payload.subarray(e.offset, e.offset + s);
226
248
  return this.offset = e.offset + s, new M(this.elementType, r);
227
249
  }
228
250
  case 11: {
229
251
  const e = { offset: this.offset }, s = C(this.payload, e, "ArrayMalformed");
230
- d(this.payload, e.offset, s);
252
+ S(this.payload, e.offset, s);
231
253
  const r = this.payload.subarray(e.offset, e.offset + s);
232
254
  return this.offset = e.offset + s, new M(11, r);
233
255
  }
@@ -275,18 +297,18 @@ class rt {
275
297
  return null;
276
298
  }
277
299
  const e = this.readKey(), s = this.readValue();
278
- return this.index++, new ne(e, s);
300
+ return this.index++, new le(e, s);
279
301
  }
280
302
  readKey() {
281
303
  const e = p(this.keyType);
282
304
  if (e >= 0) {
283
- d(this.payload, this.offset, e);
305
+ S(this.payload, this.offset, e);
284
306
  const s = this.payload.subarray(this.offset, this.offset + e);
285
307
  return this.offset += e, new U(this.keyType, s);
286
308
  }
287
309
  if (this.keyType === 12 || this.keyType === 13) {
288
310
  const s = { offset: this.offset }, r = C(this.payload, s, "DictMalformed");
289
- d(this.payload, s.offset, r);
311
+ S(this.payload, s.offset, r);
290
312
  const n = this.payload.subarray(s.offset, s.offset + r);
291
313
  return this.offset = s.offset + r, new U(this.keyType, n);
292
314
  }
@@ -297,13 +319,13 @@ class rt {
297
319
  case 12:
298
320
  case 13: {
299
321
  const e = { offset: this.offset }, s = C(this.payload, e, "DictMalformed");
300
- d(this.payload, e.offset, s);
322
+ S(this.payload, e.offset, s);
301
323
  const r = this.payload.subarray(e.offset, e.offset + s);
302
324
  return this.offset = e.offset + s, new U(this.valueType, r);
303
325
  }
304
326
  case 11: {
305
327
  const e = { offset: this.offset }, s = C(this.payload, e, "DictMalformed");
306
- d(this.payload, e.offset, s);
328
+ S(this.payload, e.offset, s);
307
329
  const r = this.payload.subarray(e.offset, e.offset + s);
308
330
  return this.offset = e.offset + s, new U(11, r);
309
331
  }
@@ -325,7 +347,7 @@ class rt {
325
347
  case 14:
326
348
  case 1: {
327
349
  const e = p(this.valueType);
328
- d(this.payload, this.offset, e);
350
+ S(this.payload, this.offset, e);
329
351
  const s = this.payload.subarray(this.offset, this.offset + e);
330
352
  return this.offset += e, new U(this.valueType, s);
331
353
  }
@@ -334,7 +356,7 @@ class rt {
334
356
  }
335
357
  }
336
358
  }
337
- class ne {
359
+ class le {
338
360
  constructor(e, s) {
339
361
  this.key = e, this.value = s;
340
362
  }
@@ -416,7 +438,7 @@ function C(t, e, s) {
416
438
  for (; e.offset < t.length; ) {
417
439
  const o = t[e.offset++];
418
440
  if (i++, r |= (o & 127) << n, (o & 128) === 0) {
419
- if (i !== ie(r))
441
+ if (i !== Ie(r))
420
442
  throw new Error("Teleport VarUInt is not canonical");
421
443
  return r >>> 0;
422
444
  }
@@ -425,7 +447,7 @@ function C(t, e, s) {
425
447
  }
426
448
  throw new Error(s);
427
449
  }
428
- function ie(t) {
450
+ function Ie(t) {
429
451
  return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
430
452
  }
431
453
  function p(t) {
@@ -452,11 +474,11 @@ function ct(t) {
452
474
  if (t === 9 || t === 11 || t === 10 || t === 1)
453
475
  throw new Error("Dictionary keys must be primitive Teleport types");
454
476
  }
455
- function d(t, e, s) {
477
+ function S(t, e, s) {
456
478
  if (e < 0 || s < 0 || e + s > t.length)
457
479
  throw new Error("Teleport payload exceeds bounds");
458
480
  }
459
- function oe(t, e) {
481
+ function ce(t, e) {
460
482
  return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
461
483
  }
462
484
  function nt(t, e) {
@@ -467,11 +489,11 @@ function nt(t, e) {
467
489
  throw new Error("Array flags must be zero");
468
490
  const n = { offset: e + 1 }, i = C(t, n, "ArrayMalformed"), o = p(r);
469
491
  if (o >= 0) {
470
- const I = o * i;
471
- return d(t, n.offset, I), n.offset + I - e;
492
+ const c = o * i;
493
+ return S(t, n.offset, c), n.offset + c - e;
472
494
  }
473
495
  let a = n.offset;
474
- for (let I = 0; I < i; I++)
496
+ for (let c = 0; c < i; c++)
475
497
  a = q(r, t, a, "ArrayMalformed");
476
498
  return a - e;
477
499
  }
@@ -491,16 +513,16 @@ function it(t, e) {
491
513
  function q(t, e, s, r) {
492
514
  const n = p(t);
493
515
  if (n >= 0)
494
- return d(e, s, n), s + n;
516
+ return S(e, s, n), s + n;
495
517
  switch (t) {
496
518
  case 12:
497
519
  case 13: {
498
520
  const i = { offset: s }, o = C(e, i, r);
499
- return d(e, i.offset, o), i.offset + o;
521
+ return S(e, i.offset, o), i.offset + o;
500
522
  }
501
523
  case 11: {
502
524
  const i = { offset: s }, o = C(e, i, r);
503
- return d(e, i.offset, o), i.offset + o;
525
+ return S(e, i.offset, o), i.offset + o;
504
526
  }
505
527
  case 9:
506
528
  return s + nt(e, s);
@@ -516,244 +538,244 @@ function at(t) {
516
538
  function K(t) {
517
539
  return t instanceof Uint8Array ? t : new Uint8Array(t);
518
540
  }
519
- var Et = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(Et || {}), _t = /* @__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))(_t || {}), ft = /* @__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))(ft || {}), ht = /* @__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))(ht || {}), ut = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(ut || {}), Tt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Tt || {}), Nt = /* @__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))(Nt || {}), At = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(At || {}), O = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.ANALYTICS_DEVTOOLS_CONSOLE_OUTPUT = 524297] = "ANALYTICS_DEVTOOLS_CONSOLE_OUTPUT", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(O || {});
520
- const ae = 265814330, le = 1368629611, Ie = 2431514951, ce = 2914494629, Ee = 3284746250, _e = 4101844078;
521
- function St(t) {
541
+ var Et = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(Et || {}), _t = /* @__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))(_t || {}), ft = /* @__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))(ft || {}), ht = /* @__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))(ht || {}), ut = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(ut || {}), Tt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Tt || {}), At = /* @__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))(At || {}), Nt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(Nt || {}), dt = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(dt || {}), St = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(St || {}), g = /* @__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))(g || {});
542
+ const Ee = 265814330, _e = 1368629611, fe = 2431514951, he = 2914494629, ue = 3284746250, Te = 4101844078;
543
+ function yt(t) {
522
544
  const e = {};
523
- return dt(e), e;
545
+ return wt(e), e;
524
546
  }
525
- function dt(t) {
547
+ function wt(t) {
526
548
  return t.Description = "", t.Codec = Et.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t.ShapeSets = void 0, t;
527
549
  }
528
- function fe(t, e) {
529
- const s = e ?? St();
530
- return dt(s), he(t, s), s;
550
+ function Ae(t, e) {
551
+ const s = e ?? yt();
552
+ return wt(s), Ne(t, s), s;
531
553
  }
532
- function he(t, e) {
554
+ function Ne(t, e) {
533
555
  let s;
534
556
  for (; (s = t.next()) !== null; )
535
557
  switch (s.fieldId) {
536
- case ae: {
558
+ case Ee: {
537
559
  if (s.isNull) {
538
560
  e.ShapeSets = void 0;
539
561
  break;
540
562
  }
541
- e.ShapeSets = ue(s.asArray());
563
+ e.ShapeSets = de(s.asArray());
542
564
  break;
543
565
  }
544
- case le: {
566
+ case _e: {
545
567
  if (s.isNull) throw new Error();
546
568
  e.Description = s.asString();
547
569
  break;
548
570
  }
549
- case Ie: {
571
+ case fe: {
550
572
  if (s.isNull) throw new Error();
551
573
  e.Channels = s.asInt32();
552
574
  break;
553
575
  }
554
- case ce: {
576
+ case he: {
555
577
  if (s.isNull) throw new Error();
556
578
  e.BitDepth = s.asInt32();
557
579
  break;
558
580
  }
559
- case Ee: {
581
+ case ue: {
560
582
  if (s.isNull) throw new Error();
561
583
  e.Codec = s.asInt32();
562
584
  break;
563
585
  }
564
- case _e: {
586
+ case Te: {
565
587
  if (s.isNull) throw new Error();
566
588
  e.SampleRate = s.asInt32();
567
589
  break;
568
590
  }
569
591
  }
570
592
  }
571
- function ue(t) {
593
+ function de(t) {
572
594
  const e = [];
573
595
  let s;
574
596
  for (; (s = t.next()) !== null; )
575
- e.push(de(s.asObject()));
597
+ e.push(De(s.asObject()));
576
598
  return e;
577
599
  }
578
- const Te = 1107713536, Ne = 1154362099, Ae = 1185721362;
579
- function Se(t) {
600
+ const Se = 1107713536, ye = 1154362099, we = 1185721362;
601
+ function Ce(t) {
580
602
  const e = {};
581
- return yt(e), e;
603
+ return Ct(e), e;
582
604
  }
583
- function yt(t) {
605
+ function Ct(t) {
584
606
  return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
585
607
  }
586
- function de(t, e) {
587
- const s = e ?? Se();
588
- return yt(s), ye(t, s), s;
608
+ function De(t, e) {
609
+ const s = e ?? Ce();
610
+ return Ct(s), Ue(t, s), s;
589
611
  }
590
- function ye(t, e) {
612
+ function Ue(t, e) {
591
613
  let s;
592
614
  for (; (s = t.next()) !== null; )
593
615
  switch (s.fieldId) {
594
- case Te: {
616
+ case Se: {
595
617
  if (s.isNull) throw new Error();
596
618
  e.Name = s.asString();
597
619
  break;
598
620
  }
599
- case Ne: {
621
+ case ye: {
600
622
  if (s.isNull) throw new Error();
601
623
  e.SetId = s.asUInt32();
602
624
  break;
603
625
  }
604
- case Ae: {
626
+ case we: {
605
627
  if (s.isNull) throw new Error();
606
- e.ShapeNames = we(s.asArray());
628
+ e.ShapeNames = Re(s.asArray());
607
629
  break;
608
630
  }
609
631
  }
610
632
  }
611
- function we(t) {
633
+ function Re(t) {
612
634
  const e = [];
613
635
  let s;
614
636
  for (; (s = t.next()) !== null; )
615
637
  e.push(s.asString());
616
638
  return e;
617
639
  }
618
- const Ce = 76337612, De = 185396121, Ue = 388632637, Re = 417197284, me = 469070965, Le = 470595159, Oe = 781727218, ge = 834078886, Pe = 1043273762, be = 1236999138, Fe = 1368629611, pe = 1715899485, ve = 1942830531, Me = 1999510636, ke = 2079864626, Ve = 2142346422, Ge = 2598291686, Be = 2719718823, xe = 2810953526, He = 2840065720, Ye = 2885165957, $e = 3586157513, Ke = 3717933110, je = 4062655306;
619
- function Xe(t) {
640
+ const me = 76337612, Le = 185396121, ge = 388632637, Oe = 417197284, Pe = 469070965, be = 470595159, Fe = 781727218, pe = 834078886, ve = 1043273762, Me = 1236999138, ke = 1368629611, Ve = 1715899485, Ge = 1942830531, Be = 1999510636, xe = 2079864626, He = 2142346422, Ye = 2598291686, $e = 2719718823, Ke = 2810953526, je = 2840065720, Xe = 2885165957, ze = 3586157513, We = 3717933110, Je = 4062655306;
641
+ function qe(t) {
620
642
  const e = {};
621
- return wt(e), e;
643
+ return Dt(e), e;
622
644
  }
623
- function wt(t) {
624
- return t.ContextType = ft.Unknown, t.UserType = Tt.Unknown, t.PayloadType = ht.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 = _t.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = At.Unknown, t;
645
+ function Dt(t) {
646
+ return t.ContextType = ft.Unknown, t.UserType = Tt.Unknown, t.PayloadType = ht.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 = _t.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Nt.Unknown, t;
625
647
  }
626
- function ze(t, e) {
627
- const s = e ?? Xe();
628
- return wt(s), We(t, s), s;
648
+ function Qe(t, e) {
649
+ const s = e ?? qe();
650
+ return Dt(s), Ze(t, s), s;
629
651
  }
630
- function We(t, e) {
652
+ function Ze(t, e) {
631
653
  let s;
632
654
  for (; (s = t.next()) !== null; )
633
655
  switch (s.fieldId) {
634
- case Ce: {
656
+ case me: {
635
657
  if (s.isNull) throw new Error();
636
658
  e.DeviceId = s.asString();
637
659
  break;
638
660
  }
639
- case De: {
661
+ case Le: {
640
662
  if (s.isNull) throw new Error();
641
663
  e.InstallId = s.asString();
642
664
  break;
643
665
  }
644
- case Ue: {
666
+ case ge: {
645
667
  if (s.isNull) throw new Error();
646
668
  e.UserAgent = s.asString();
647
669
  break;
648
670
  }
649
- case Re: {
671
+ case Oe: {
650
672
  if (s.isNull) throw new Error();
651
673
  e.ContextType = s.asInt32();
652
674
  break;
653
675
  }
654
- case me: {
676
+ case Pe: {
655
677
  if (s.isNull) throw new Error();
656
678
  e.HasInput = s.asBool();
657
679
  break;
658
680
  }
659
- case Le: {
681
+ case be: {
660
682
  if (s.isNull) throw new Error();
661
683
  e.UserType = s.asInt32();
662
684
  break;
663
685
  }
664
- case Oe: {
686
+ case Fe: {
665
687
  if (s.isNull) throw new Error();
666
688
  e.UserId = s.asString();
667
689
  break;
668
690
  }
669
- case ge: {
691
+ case pe: {
670
692
  if (s.isNull) throw new Error();
671
693
  e.ProductId = s.asString();
672
694
  break;
673
695
  }
674
- case Pe: {
696
+ case ve: {
675
697
  if (s.isNull) throw new Error();
676
698
  e.AuthSessionId = s.asString();
677
699
  break;
678
700
  }
679
- case be: {
701
+ case Me: {
680
702
  if (s.isNull) throw new Error();
681
703
  e.ReceiveAllMessages = s.asBool();
682
704
  break;
683
705
  }
684
- case Fe: {
706
+ case ke: {
685
707
  if (s.isNull) throw new Error();
686
708
  e.Description = s.asString();
687
709
  break;
688
710
  }
689
- case pe: {
711
+ case Ve: {
690
712
  if (s.isNull) throw new Error();
691
713
  e.Locale = s.asString();
692
714
  break;
693
715
  }
694
- case ve: {
716
+ case Ge: {
695
717
  if (s.isNull) throw new Error();
696
718
  e.SdkType = s.asInt32();
697
719
  break;
698
720
  }
699
- case Me: {
721
+ case Be: {
700
722
  if (s.isNull) throw new Error();
701
723
  e.SessionId = s.asInt32();
702
724
  break;
703
725
  }
704
- case ke: {
726
+ case xe: {
705
727
  if (s.isNull) throw new Error();
706
728
  e.PreciseJoinedAt = s.asUInt64();
707
729
  break;
708
730
  }
709
- case Ve: {
731
+ case He: {
710
732
  if (s.isNull) throw new Error();
711
733
  e.PayloadType = s.asInt32();
712
734
  break;
713
735
  }
714
- case Ge: {
736
+ case Ye: {
715
737
  if (s.isNull) throw new Error();
716
738
  e.VersionId = s.asString();
717
739
  break;
718
740
  }
719
- case Be: {
741
+ case $e: {
720
742
  if (s.isNull) throw new Error();
721
743
  e.UniqueSessionId = s.asString();
722
744
  break;
723
745
  }
724
- case xe: {
746
+ case Ke: {
725
747
  if (s.isNull) throw new Error();
726
748
  e.ClientType = s.asInt32();
727
749
  break;
728
750
  }
729
- case He: {
751
+ case je: {
730
752
  if (s.isNull) throw new Error();
731
753
  e.IsReady = s.asBool();
732
754
  break;
733
755
  }
734
- case Ye: {
756
+ case Xe: {
735
757
  if (s.isNull) throw new Error();
736
- e.Parameters = Je(s.asDictionary());
758
+ e.Parameters = ts(s.asDictionary());
737
759
  break;
738
760
  }
739
- case $e: {
761
+ case ze: {
740
762
  if (s.isNull) throw new Error();
741
763
  e.IsInternal = s.asBool();
742
764
  break;
743
765
  }
744
- case Ke: {
766
+ case We: {
745
767
  if (s.isNull) throw new Error();
746
768
  e.ChannelLocale = s.asString();
747
769
  break;
748
770
  }
749
- case je: {
771
+ case Je: {
750
772
  if (s.isNull) throw new Error();
751
773
  e.EmbeddedSpaceId = s.asString();
752
774
  break;
753
775
  }
754
776
  }
755
777
  }
756
- function Je(t) {
778
+ function ts(t) {
757
779
  const e = /* @__PURE__ */ Object.create(null);
758
780
  let s;
759
781
  for (; (s = t.next()) !== null; ) {
@@ -762,674 +784,664 @@ function Je(t) {
762
784
  }
763
785
  return e;
764
786
  }
765
- const qe = 703025676, Qe = 814454131, Ze = 972460562, ts = 976255570, es = 1368629611, ss = 1479280922, rs = 1533537016, ns = 2274386296, is = 2603556958, os = 2885165957, as = 3568439632;
766
- function ls(t) {
787
+ const es = 703025676, ss = 814454131, rs = 972460562, ns = 976255570, is = 1368629611, os = 1479280922, as = 1533537016, ls = 2274386296, Is = 2603556958, cs = 2885165957, Es = 3568439632;
788
+ function _s(t) {
767
789
  const e = {};
768
- return Ct(e), e;
790
+ return Ut(e), e;
769
791
  }
770
- function Ct(t) {
792
+ function Ut(t) {
771
793
  return t.FunctionId = T.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;
772
794
  }
773
- function Is(t, e) {
774
- const s = e ?? ls();
775
- return Ct(s), cs(t, s), s;
795
+ function fs(t, e) {
796
+ const s = e ?? _s();
797
+ return Ut(s), hs(t, s), s;
776
798
  }
777
- function cs(t, e) {
799
+ function hs(t, e) {
778
800
  let s;
779
801
  for (; (s = t.next()) !== null; )
780
802
  switch (s.fieldId) {
781
- case qe: {
803
+ case es: {
782
804
  if (s.isNull) throw new Error();
783
805
  e.ResultTypeName = s.asString();
784
806
  break;
785
807
  }
786
- case Qe: {
808
+ case ss: {
787
809
  if (s.isNull) throw new Error();
788
810
  e.FunctionName = s.asString();
789
811
  break;
790
812
  }
791
- case Ze: {
813
+ case rs: {
792
814
  if (s.isNull) throw new Error();
793
815
  e.EnumerableItemTypeName = s.asString();
794
816
  break;
795
817
  }
796
- case ts: {
818
+ case ns: {
797
819
  if (s.isNull) throw new Error();
798
820
  e.FunctionId = s.asGuid();
799
821
  break;
800
822
  }
801
- case es: {
823
+ case is: {
802
824
  if (s.isNull) throw new Error();
803
825
  e.Description = s.asString();
804
826
  break;
805
827
  }
806
- case ss: {
828
+ case os: {
807
829
  if (s.isNull) throw new Error();
808
830
  e.IsCancellable = s.asBool();
809
831
  break;
810
832
  }
811
- case rs: {
833
+ case as: {
812
834
  if (s.isNull) throw new Error();
813
835
  e.RequiresInstance = s.asBool();
814
836
  break;
815
837
  }
816
- case ns: {
838
+ case ls: {
817
839
  if (s.isNull) throw new Error();
818
840
  e.LlmInlineResult = s.asBool();
819
841
  break;
820
842
  }
821
- case is: {
843
+ case Is: {
822
844
  if (s.isNull) throw new Error();
823
845
  e.IsEnumerable = s.asBool();
824
846
  break;
825
847
  }
826
- case os: {
848
+ case cs: {
827
849
  if (s.isNull) throw new Error();
828
- e.Parameters = Es(s.asArray());
850
+ e.Parameters = us(s.asArray());
829
851
  break;
830
852
  }
831
- case as: {
853
+ case Es: {
832
854
  if (s.isNull) throw new Error();
833
855
  e.LlmCallOnlyOnce = s.asBool();
834
856
  break;
835
857
  }
836
858
  }
837
859
  }
838
- function Es(t) {
860
+ function us(t) {
839
861
  const e = [];
840
862
  let s;
841
863
  for (; (s = t.next()) !== null; )
842
- e.push(ws(s.asObject()));
864
+ e.push(Rs(s.asObject()));
843
865
  return e;
844
866
  }
845
- const _s = 607861992, fs = 894485888, hs = 972460562, us = 1368629611, Ts = 1883521406, Ns = 2603556958, As = 3609695522, Ss = 4075263697, ds = 4257460908;
846
- function ys(t) {
867
+ const Ts = 607861992, As = 894485888, Ns = 972460562, ds = 1368629611, Ss = 1883521406, ys = 2603556958, ws = 3609695522, Cs = 4075263697, Ds = 4257460908;
868
+ function Us(t) {
847
869
  const e = {};
848
- return Dt(e), e;
870
+ return Rt(e), e;
849
871
  }
850
- function Dt(t) {
872
+ function Rt(t) {
851
873
  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;
852
874
  }
853
- function ws(t, e) {
854
- const s = e ?? ys();
855
- return Dt(s), Cs(t, s), s;
875
+ function Rs(t, e) {
876
+ const s = e ?? Us();
877
+ return Rt(s), ms(t, s), s;
856
878
  }
857
- function Cs(t, e) {
879
+ function ms(t, e) {
858
880
  let s;
859
881
  for (; (s = t.next()) !== null; )
860
882
  switch (s.fieldId) {
861
- case _s: {
883
+ case Ts: {
862
884
  if (s.isNull) throw new Error();
863
885
  e.HasDefaultValue = s.asBool();
864
886
  break;
865
887
  }
866
- case fs: {
888
+ case As: {
867
889
  if (s.isNull) throw new Error();
868
890
  e.DefaultValueJson = s.asString();
869
891
  break;
870
892
  }
871
- case hs: {
893
+ case Ns: {
872
894
  if (s.isNull) throw new Error();
873
895
  e.EnumerableItemTypeName = s.asString();
874
896
  break;
875
897
  }
876
- case us: {
898
+ case ds: {
877
899
  if (s.isNull) throw new Error();
878
900
  e.Description = s.asString();
879
901
  break;
880
902
  }
881
- case Ts: {
903
+ case Ss: {
882
904
  if (s.isNull) throw new Error();
883
905
  e.DefaultValueData = s.asBinary();
884
906
  break;
885
907
  }
886
- case Ns: {
908
+ case ys: {
887
909
  if (s.isNull) throw new Error();
888
910
  e.IsEnumerable = s.asBool();
889
911
  break;
890
912
  }
891
- case As: {
913
+ case ws: {
892
914
  if (s.isNull) throw new Error();
893
915
  e.TypeName = s.asString();
894
916
  break;
895
917
  }
896
- case Ss: {
918
+ case Cs: {
897
919
  if (s.isNull) throw new Error();
898
920
  e.ParameterName = s.asString();
899
921
  break;
900
922
  }
901
- case ds: {
923
+ case Ds: {
902
924
  if (s.isNull) throw new Error();
903
925
  e.ParameterIndex = s.asInt32();
904
926
  break;
905
927
  }
906
928
  }
907
929
  }
908
- const Ds = 3167053791, Us = 3342364356, Rs = 3612929027;
909
- function Ut(t) {
930
+ const Ls = 3167053791, gs = 3342364356, Os = 3612929027;
931
+ function mt(t) {
910
932
  const e = {};
911
- return Rt(e), e;
933
+ return Lt(e), e;
912
934
  }
913
- function Rt(t) {
935
+ function Lt(t) {
914
936
  return t.Category = "", t.Type = ut.Face, t.FaceBlendshapes = [], t;
915
937
  }
916
- function ms(t, e) {
917
- const s = e ?? Ut();
918
- return Rt(s), Ls(t, s), s;
938
+ function Ps(t, e) {
939
+ const s = e ?? mt();
940
+ return Lt(s), bs(t, s), s;
919
941
  }
920
- function Ls(t, e) {
942
+ function bs(t, e) {
921
943
  let s;
922
944
  for (; (s = t.next()) !== null; )
923
945
  switch (s.fieldId) {
924
- case Ds: {
946
+ case Ls: {
925
947
  if (s.isNull) throw new Error();
926
948
  e.Type = s.asInt32();
927
949
  break;
928
950
  }
929
- case Us: {
951
+ case gs: {
930
952
  if (s.isNull) throw new Error();
931
- e.FaceBlendshapes = Os(s.asArray());
953
+ e.FaceBlendshapes = Fs(s.asArray());
932
954
  break;
933
955
  }
934
- case Rs: {
956
+ case Os: {
935
957
  if (s.isNull) throw new Error();
936
958
  e.Category = s.asString();
937
959
  break;
938
960
  }
939
961
  }
940
962
  }
941
- function Os(t) {
963
+ function Fs(t) {
942
964
  const e = [];
943
965
  let s;
944
966
  for (; (s = t.next()) !== null; )
945
967
  e.push(s.asString());
946
968
  return e;
947
969
  }
948
- const gs = 3612929027;
949
- function mt(t) {
970
+ const ps = 3612929027;
971
+ function gt(t) {
950
972
  const e = {};
951
- return Lt(e), e;
973
+ return Ot(e), e;
952
974
  }
953
- function Lt(t) {
975
+ function Ot(t) {
954
976
  return t.Category = "", t;
955
977
  }
956
- function Ps(t, e) {
957
- const s = e ?? mt();
958
- return Lt(s), bs(t, s), s;
978
+ function vs(t, e) {
979
+ const s = e ?? gt();
980
+ return Ot(s), Ms(t, s), s;
959
981
  }
960
- function bs(t, e) {
982
+ function Ms(t, e) {
961
983
  let s;
962
984
  for (; (s = t.next()) !== null; )
963
985
  switch (s.fieldId) {
964
- case gs: {
986
+ case ps: {
965
987
  if (s.isNull) throw new Error();
966
988
  e.Category = s.asString();
967
989
  break;
968
990
  }
969
991
  }
970
992
  }
971
- const Fs = 164808083, ps = 1368629611, vs = 2739413426, Ms = 2768375929, ks = 2950031986, Vs = 3284746250, Gs = 4065070594;
972
- function Ot(t) {
993
+ const ks = 164808083, Vs = 1368629611, Gs = 2739413426, Bs = 2768375929, xs = 2950031986, Hs = 3284746250, Ys = 4065070594;
994
+ function Pt(t) {
973
995
  const e = {};
974
- return gt(e), e;
996
+ return bt(e), e;
975
997
  }
976
- function gt(t) {
977
- return t.Description = "", t.Codec = Nt.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
998
+ function bt(t) {
999
+ return t.Description = "", t.Codec = At.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
978
1000
  }
979
- function Bs(t, e) {
980
- const s = e ?? Ot();
981
- return gt(s), xs(t, s), s;
1001
+ function $s(t, e) {
1002
+ const s = e ?? Pt();
1003
+ return bt(s), Ks(t, s), s;
982
1004
  }
983
- function xs(t, e) {
1005
+ function Ks(t, e) {
984
1006
  let s;
985
1007
  for (; (s = t.next()) !== null; )
986
1008
  switch (s.fieldId) {
987
- case Fs: {
1009
+ case ks: {
988
1010
  if (s.isNull) throw new Error();
989
1011
  e.Framerate = s.asInt32();
990
1012
  break;
991
1013
  }
992
- case ps: {
1014
+ case Vs: {
993
1015
  if (s.isNull) throw new Error();
994
1016
  e.Description = s.asString();
995
1017
  break;
996
1018
  }
997
- case vs: {
1019
+ case Gs: {
998
1020
  if (s.isNull) throw new Error();
999
1021
  e.IsHardwareAccelerated = s.asBool();
1000
1022
  break;
1001
1023
  }
1002
- case Ms: {
1024
+ case Bs: {
1003
1025
  if (s.isNull) throw new Error();
1004
1026
  e.Bitrate = s.asInt32();
1005
1027
  break;
1006
1028
  }
1007
- case ks: {
1029
+ case xs: {
1008
1030
  if (s.isNull) throw new Error();
1009
1031
  e.Height = s.asInt32();
1010
1032
  break;
1011
1033
  }
1012
- case Vs: {
1034
+ case Hs: {
1013
1035
  if (s.isNull) throw new Error();
1014
1036
  e.Codec = s.asInt32();
1015
1037
  break;
1016
1038
  }
1017
- case Gs: {
1039
+ case Ys: {
1018
1040
  if (s.isNull) throw new Error();
1019
1041
  e.Width = s.asInt32();
1020
1042
  break;
1021
1043
  }
1022
1044
  }
1023
1045
  }
1024
- const Hs = 65539, Ys = 414670648, $s = 693643444, Ks = 1144553441, js = 1497620243, Xs = 1559330978, zs = 1999510636, Ws = 2277643855, Js = 2469008121, qs = 3042922213, Qs = 3219210453, Zs = 3504054055, tr = 3642827795, er = 3678477544, sr = 3696445035, rr = 3707543140, nr = 3712281496, ir = 3748214980, or = 3823842552, ar = 3895362455, lr = 3897397815, Ir = 4225107827;
1025
- function cr(t) {
1046
+ const js = 65539, Xs = 693643444, zs = 1144553441, Ws = 1497620243, Js = 1559330978, qs = 1976546434, Qs = 1999510636, Zs = 2277643855, tr = 2469008121, er = 3042922213, sr = 3064612128, rr = 3219210453, nr = 3504054055, ir = 3678477544, or = 3696445035, ar = 3707543140, lr = 3712281496, Ir = 3895362455, cr = 3897397815, Er = 4225107827;
1047
+ function _r(t) {
1026
1048
  const e = {};
1027
- return Pt(e), e;
1049
+ return Ft(e), e;
1028
1050
  }
1029
- function Pt(t) {
1030
- 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;
1051
+ function Ft(t) {
1052
+ 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 = dt.Local, t.AppSourceType = St.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
1031
1053
  }
1032
- function Er(t, e) {
1054
+ function fr(t, e) {
1033
1055
  const s = L.create(t);
1034
- return _r(s, e);
1056
+ return hr(s, e);
1035
1057
  }
1036
- function _r(t, e) {
1037
- const s = e ?? cr();
1038
- return Pt(s), fr(t, s), s;
1058
+ function hr(t, e) {
1059
+ const s = e ?? _r();
1060
+ return Ft(s), ur(t, s), s;
1039
1061
  }
1040
- function fr(t, e) {
1062
+ function ur(t, e) {
1041
1063
  let s;
1042
1064
  for (; (s = t.next()) !== null; )
1043
1065
  switch (s.fieldId) {
1044
- case Ys: {
1045
- if (s.isNull) throw new Error();
1046
- e.IsGitSource = s.asBool();
1047
- break;
1048
- }
1049
- case $s: {
1050
- if (s.isNull) throw new Error();
1051
- e.FirstUserId = s.asString();
1052
- break;
1053
- }
1054
- case Ks: {
1055
- if (s.isNull) throw new Error();
1056
- e.Clients = ur(s.asDictionary());
1057
- break;
1058
- }
1059
- case js: {
1060
- if (s.isNull) throw new Error();
1061
- e.TrackingStreams = Tr(s.asDictionary());
1062
- break;
1063
- }
1064
1066
  case Xs: {
1065
1067
  if (s.isNull) throw new Error();
1066
- e.ChannelId = s.asString();
1068
+ e.FirstUserId = s.asString();
1067
1069
  break;
1068
1070
  }
1069
1071
  case zs: {
1070
1072
  if (s.isNull) throw new Error();
1071
- e.SessionId = s.asString();
1073
+ e.Clients = Ar(s.asDictionary());
1072
1074
  break;
1073
1075
  }
1074
1076
  case Ws: {
1075
1077
  if (s.isNull) throw new Error();
1076
- e.ChannelUrl = s.asString();
1078
+ e.TrackingStreams = Nr(s.asDictionary());
1077
1079
  break;
1078
1080
  }
1079
1081
  case Js: {
1080
1082
  if (s.isNull) throw new Error();
1081
- e.ChannelName = s.asString();
1083
+ e.ChannelId = s.asString();
1082
1084
  break;
1083
1085
  }
1084
1086
  case qs: {
1085
1087
  if (s.isNull) throw new Error();
1086
- e.PublicAccess = s.asBool();
1088
+ e.AppSourceType = s.asInt32();
1087
1089
  break;
1088
1090
  }
1089
1091
  case Qs: {
1090
1092
  if (s.isNull) throw new Error();
1091
- e.OrganisationName = s.asString();
1093
+ e.SessionId = s.asString();
1092
1094
  break;
1093
1095
  }
1094
1096
  case Zs: {
1095
1097
  if (s.isNull) throw new Error();
1096
- e.DebugMode = s.asBool();
1098
+ e.ChannelUrl = s.asString();
1097
1099
  break;
1098
1100
  }
1099
1101
  case tr: {
1100
1102
  if (s.isNull) throw new Error();
1101
- e.RunnerType = s.asString();
1103
+ e.ChannelName = s.asString();
1102
1104
  break;
1103
1105
  }
1104
1106
  case er: {
1105
1107
  if (s.isNull) throw new Error();
1106
- e.Functions = Nr(s.asDictionary());
1108
+ e.PublicAccess = s.asBool();
1107
1109
  break;
1108
1110
  }
1109
1111
  case sr: {
1110
1112
  if (s.isNull) throw new Error();
1111
- e.UIStreams = Ar(s.asDictionary());
1113
+ e.ServerRunType = s.asInt32();
1112
1114
  break;
1113
1115
  }
1114
1116
  case rr: {
1115
1117
  if (s.isNull) throw new Error();
1116
- e.SpaceId = s.asString();
1118
+ e.OrganisationName = s.asString();
1117
1119
  break;
1118
1120
  }
1119
1121
  case nr: {
1120
1122
  if (s.isNull) throw new Error();
1121
- e.PrimaryUserId = s.asString();
1123
+ e.DebugMode = s.asBool();
1122
1124
  break;
1123
1125
  }
1124
1126
  case ir: {
1125
1127
  if (s.isNull) throw new Error();
1126
- e.BootType = s.asString();
1128
+ e.Functions = dr(s.asDictionary());
1127
1129
  break;
1128
1130
  }
1129
1131
  case or: {
1130
1132
  if (s.isNull) throw new Error();
1131
- e.ChannelInstanceId = s.asString();
1133
+ e.UIStreams = Sr(s.asDictionary());
1132
1134
  break;
1133
1135
  }
1134
1136
  case ar: {
1135
1137
  if (s.isNull) throw new Error();
1136
- e.AudioStreams = Sr(s.asDictionary());
1138
+ e.SpaceId = s.asString();
1137
1139
  break;
1138
1140
  }
1139
1141
  case lr: {
1140
1142
  if (s.isNull) throw new Error();
1141
- e.VideoStreams = dr(s.asDictionary());
1143
+ e.PrimaryUserId = s.asString();
1142
1144
  break;
1143
1145
  }
1144
1146
  case Ir: {
1147
+ if (s.isNull) throw new Error();
1148
+ e.AudioStreams = yr(s.asDictionary());
1149
+ break;
1150
+ }
1151
+ case cr: {
1152
+ if (s.isNull) throw new Error();
1153
+ e.VideoStreams = wr(s.asDictionary());
1154
+ break;
1155
+ }
1156
+ case Er: {
1145
1157
  if (s.isNull) throw new Error();
1146
1158
  e.SpaceName = s.asString();
1147
1159
  break;
1148
1160
  }
1149
1161
  }
1150
1162
  }
1151
- function hr(t, e) {
1152
- const s = $(t, Hs);
1153
- return Er(s, e);
1163
+ async function Tr(t, e) {
1164
+ const s = await $(t, js);
1165
+ return fr(s, e);
1154
1166
  }
1155
- function ur(t) {
1167
+ function Ar(t) {
1156
1168
  const e = /* @__PURE__ */ Object.create(null);
1157
1169
  let s;
1158
1170
  for (; (s = t.next()) !== null; ) {
1159
1171
  const r = s.key.asInt32();
1160
- e[r] = ze(s.value.asObject());
1172
+ e[r] = Qe(s.value.asObject());
1161
1173
  }
1162
1174
  return e;
1163
1175
  }
1164
- function Tr(t) {
1176
+ function Nr(t) {
1165
1177
  const e = /* @__PURE__ */ Object.create(null);
1166
1178
  let s;
1167
1179
  for (; (s = t.next()) !== null; ) {
1168
1180
  const r = s.key.asString();
1169
- e[r] = zr(s.value.asObject());
1181
+ e[r] = Jr(s.value.asObject());
1170
1182
  }
1171
1183
  return e;
1172
1184
  }
1173
- function Nr(t) {
1185
+ function dr(t) {
1174
1186
  const e = /* @__PURE__ */ Object.create(null);
1175
1187
  let s;
1176
1188
  for (; (s = t.next()) !== null; ) {
1177
1189
  const r = s.key.asInt32();
1178
- e[r] = yr(s.value.asArray());
1190
+ e[r] = Cr(s.value.asArray());
1179
1191
  }
1180
1192
  return e;
1181
1193
  }
1182
- function Ar(t) {
1194
+ function Sr(t) {
1183
1195
  const e = /* @__PURE__ */ Object.create(null);
1184
1196
  let s;
1185
1197
  for (; (s = t.next()) !== null; ) {
1186
1198
  const r = s.key.asString();
1187
- e[r] = mr(s.value.asObject());
1199
+ e[r] = gr(s.value.asObject());
1188
1200
  }
1189
1201
  return e;
1190
1202
  }
1191
- function Sr(t) {
1203
+ function yr(t) {
1192
1204
  const e = /* @__PURE__ */ Object.create(null);
1193
1205
  let s;
1194
1206
  for (; (s = t.next()) !== null; ) {
1195
1207
  const r = s.key.asString();
1196
- e[r] = pr(s.value.asObject());
1208
+ e[r] = Mr(s.value.asObject());
1197
1209
  }
1198
1210
  return e;
1199
1211
  }
1200
- function dr(t) {
1212
+ function wr(t) {
1201
1213
  const e = /* @__PURE__ */ Object.create(null);
1202
1214
  let s;
1203
1215
  for (; (s = t.next()) !== null; ) {
1204
1216
  const r = s.key.asString();
1205
- e[r] = xr(s.value.asObject());
1217
+ e[r] = Yr(s.value.asObject());
1206
1218
  }
1207
1219
  return e;
1208
1220
  }
1209
- function yr(t) {
1221
+ function Cr(t) {
1210
1222
  const e = [];
1211
1223
  let s;
1212
1224
  for (; (s = t.next()) !== null; )
1213
- e.push(Is(s.asObject()));
1225
+ e.push(fs(s.asObject()));
1214
1226
  return e;
1215
1227
  }
1216
- const wr = 161083277, Cr = 325678206, Dr = 3469892363, Ur = 3645544153;
1217
- function Rr(t) {
1228
+ const Dr = 161083277, Ur = 325678206, Rr = 3469892363, mr = 3645544153;
1229
+ function Lr(t) {
1218
1230
  const e = {};
1219
- return bt(e), e;
1231
+ return pt(e), e;
1220
1232
  }
1221
- function bt(t) {
1222
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = mt(), t;
1233
+ function pt(t) {
1234
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = gt(), t;
1223
1235
  }
1224
- function mr(t, e) {
1225
- const s = e ?? Rr();
1226
- return bt(s), Lr(t, s), s;
1236
+ function gr(t, e) {
1237
+ const s = e ?? Lr();
1238
+ return pt(s), Or(t, s), s;
1227
1239
  }
1228
- function Lr(t, e) {
1240
+ function Or(t, e) {
1229
1241
  let s;
1230
1242
  for (; (s = t.next()) !== null; )
1231
1243
  switch (s.fieldId) {
1232
- case wr: {
1244
+ case Dr: {
1233
1245
  if (s.isNull) throw new Error();
1234
1246
  e.StreamId = s.asString();
1235
1247
  break;
1236
1248
  }
1237
- case Cr: {
1249
+ case Ur: {
1238
1250
  if (s.isNull) throw new Error();
1239
1251
  e.ClientSessionId = s.asInt32();
1240
1252
  break;
1241
1253
  }
1242
- case Dr: {
1254
+ case Rr: {
1243
1255
  if (s.isNull) throw new Error();
1244
1256
  e.TrackId = s.asInt32();
1245
1257
  break;
1246
1258
  }
1247
- case Ur: {
1259
+ case mr: {
1248
1260
  if (s.isNull) throw new Error();
1249
- e.Info = Ps(s.asObject());
1261
+ e.Info = vs(s.asObject());
1250
1262
  break;
1251
1263
  }
1252
1264
  }
1253
1265
  }
1254
- const Or = 161083277, gr = 325678206, Pr = 3469892363, br = 3645544153;
1255
- function Fr(t) {
1266
+ const Pr = 161083277, br = 325678206, Fr = 3469892363, pr = 3645544153;
1267
+ function vr(t) {
1256
1268
  const e = {};
1257
- return Ft(e), e;
1269
+ return vt(e), e;
1258
1270
  }
1259
- function Ft(t) {
1260
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = St(), t;
1271
+ function vt(t) {
1272
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = yt(), t;
1261
1273
  }
1262
- function pr(t, e) {
1263
- const s = e ?? Fr();
1264
- return Ft(s), vr(t, s), s;
1274
+ function Mr(t, e) {
1275
+ const s = e ?? vr();
1276
+ return vt(s), kr(t, s), s;
1265
1277
  }
1266
- function vr(t, e) {
1278
+ function kr(t, e) {
1267
1279
  let s;
1268
1280
  for (; (s = t.next()) !== null; )
1269
1281
  switch (s.fieldId) {
1270
- case Or: {
1282
+ case Pr: {
1271
1283
  if (s.isNull) throw new Error();
1272
1284
  e.StreamId = s.asString();
1273
1285
  break;
1274
1286
  }
1275
- case gr: {
1287
+ case br: {
1276
1288
  if (s.isNull) throw new Error();
1277
1289
  e.ClientSessionId = s.asInt32();
1278
1290
  break;
1279
1291
  }
1280
- case Pr: {
1292
+ case Fr: {
1281
1293
  if (s.isNull) throw new Error();
1282
1294
  e.TrackId = s.asInt32();
1283
1295
  break;
1284
1296
  }
1285
- case br: {
1297
+ case pr: {
1286
1298
  if (s.isNull) throw new Error();
1287
- e.Info = fe(s.asObject());
1299
+ e.Info = Ae(s.asObject());
1288
1300
  break;
1289
1301
  }
1290
1302
  }
1291
1303
  }
1292
- const Mr = 161083277, kr = 325678206, Vr = 3469892363, Gr = 3645544153;
1293
- function Br(t) {
1304
+ const Vr = 161083277, Gr = 325678206, Br = 3469892363, xr = 3645544153;
1305
+ function Hr(t) {
1294
1306
  const e = {};
1295
- return pt(e), e;
1307
+ return Mt(e), e;
1296
1308
  }
1297
- function pt(t) {
1298
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Ot(), t;
1309
+ function Mt(t) {
1310
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Pt(), t;
1299
1311
  }
1300
- function xr(t, e) {
1301
- const s = e ?? Br();
1302
- return pt(s), Hr(t, s), s;
1312
+ function Yr(t, e) {
1313
+ const s = e ?? Hr();
1314
+ return Mt(s), $r(t, s), s;
1303
1315
  }
1304
- function Hr(t, e) {
1316
+ function $r(t, e) {
1305
1317
  let s;
1306
1318
  for (; (s = t.next()) !== null; )
1307
1319
  switch (s.fieldId) {
1308
- case Mr: {
1320
+ case Vr: {
1309
1321
  if (s.isNull) throw new Error();
1310
1322
  e.StreamId = s.asString();
1311
1323
  break;
1312
1324
  }
1313
- case kr: {
1325
+ case Gr: {
1314
1326
  if (s.isNull) throw new Error();
1315
1327
  e.ClientSessionId = s.asInt32();
1316
1328
  break;
1317
1329
  }
1318
- case Vr: {
1330
+ case Br: {
1319
1331
  if (s.isNull) throw new Error();
1320
1332
  e.TrackId = s.asInt32();
1321
1333
  break;
1322
1334
  }
1323
- case Gr: {
1335
+ case xr: {
1324
1336
  if (s.isNull) throw new Error();
1325
- e.Info = Bs(s.asObject());
1337
+ e.Info = $s(s.asObject());
1326
1338
  break;
1327
1339
  }
1328
1340
  }
1329
1341
  }
1330
- const Yr = 161083277, $r = 325678206, Kr = 3469892363, jr = 3645544153;
1331
- function Xr(t) {
1342
+ const Kr = 161083277, jr = 325678206, Xr = 3469892363, zr = 3645544153;
1343
+ function Wr(t) {
1332
1344
  const e = {};
1333
- return vt(e), e;
1345
+ return kt(e), e;
1334
1346
  }
1335
- function vt(t) {
1336
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Ut(), t;
1347
+ function kt(t) {
1348
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = mt(), t;
1337
1349
  }
1338
- function zr(t, e) {
1339
- const s = e ?? Xr();
1340
- return vt(s), Wr(t, s), s;
1350
+ function Jr(t, e) {
1351
+ const s = e ?? Wr();
1352
+ return kt(s), qr(t, s), s;
1341
1353
  }
1342
- function Wr(t, e) {
1354
+ function qr(t, e) {
1343
1355
  let s;
1344
1356
  for (; (s = t.next()) !== null; )
1345
1357
  switch (s.fieldId) {
1346
- case Yr: {
1358
+ case Kr: {
1347
1359
  if (s.isNull) throw new Error();
1348
1360
  e.StreamId = s.asString();
1349
1361
  break;
1350
1362
  }
1351
- case $r: {
1363
+ case jr: {
1352
1364
  if (s.isNull) throw new Error();
1353
1365
  e.ClientSessionId = s.asInt32();
1354
1366
  break;
1355
1367
  }
1356
- case Kr: {
1368
+ case Xr: {
1357
1369
  if (s.isNull) throw new Error();
1358
1370
  e.TrackId = s.asInt32();
1359
1371
  break;
1360
1372
  }
1361
- case jr: {
1373
+ case zr: {
1362
1374
  if (s.isNull) throw new Error();
1363
- e.Info = ms(s.asObject());
1375
+ e.Info = Ps(s.asObject());
1364
1376
  break;
1365
1377
  }
1366
1378
  }
1367
1379
  }
1368
- const Jr = 1405462580, qr = 2968276160;
1369
- function Qr(t) {
1380
+ const Qr = 1405462580, Zr = 2968276160;
1381
+ function tn(t) {
1370
1382
  const e = {};
1371
- return Mt(e), e;
1383
+ return Vt(e), e;
1372
1384
  }
1373
- function Mt(t) {
1385
+ function Vt(t) {
1374
1386
  return t.MimeType = "", t.Value = new Uint8Array(0), t;
1375
1387
  }
1376
- function Zr(t, e) {
1377
- const s = e ?? Qr();
1378
- return Mt(s), tn(t, s), s;
1388
+ function en(t, e) {
1389
+ const s = e ?? tn();
1390
+ return Vt(s), sn(t, s), s;
1379
1391
  }
1380
- function tn(t, e) {
1392
+ function sn(t, e) {
1381
1393
  let s;
1382
1394
  for (; (s = t.next()) !== null; )
1383
1395
  switch (s.fieldId) {
1384
- case Jr: {
1396
+ case Qr: {
1385
1397
  if (s.isNull) throw new Error();
1386
1398
  e.Value = s.asBinary();
1387
1399
  break;
1388
1400
  }
1389
- case qr: {
1401
+ case Zr: {
1390
1402
  if (s.isNull) throw new Error();
1391
1403
  e.MimeType = s.asString();
1392
1404
  break;
1393
1405
  }
1394
1406
  }
1395
1407
  }
1396
- const en = 2097188, sn = 979822885, rn = 2374537704;
1397
- function nn(t) {
1408
+ const rn = 2097188, nn = 979822885, on = 2374537704;
1409
+ function an(t) {
1398
1410
  const e = {};
1399
- return kt(e), e;
1411
+ return Gt(e), e;
1400
1412
  }
1401
- function kt(t) {
1413
+ function Gt(t) {
1402
1414
  return t.StyleId = "", t.Style = /* @__PURE__ */ Object.create(null), t;
1403
1415
  }
1404
- function on(t, e) {
1416
+ function ln(t, e) {
1405
1417
  const s = L.create(t);
1406
- return an(s, e);
1418
+ return In(s, e);
1407
1419
  }
1408
- function an(t, e) {
1409
- const s = e ?? nn();
1410
- return kt(s), ln(t, s), s;
1420
+ function In(t, e) {
1421
+ const s = e ?? an();
1422
+ return Gt(s), cn(t, s), s;
1411
1423
  }
1412
- function ln(t, e) {
1424
+ function cn(t, e) {
1413
1425
  let s;
1414
1426
  for (; (s = t.next()) !== null; )
1415
1427
  switch (s.fieldId) {
1416
- case sn: {
1428
+ case nn: {
1417
1429
  if (s.isNull) throw new Error();
1418
1430
  e.StyleId = s.asString();
1419
1431
  break;
1420
1432
  }
1421
- case rn: {
1433
+ case on: {
1422
1434
  if (s.isNull) throw new Error();
1423
- e.Style = cn(s.asDictionary());
1435
+ e.Style = _n(s.asDictionary());
1424
1436
  break;
1425
1437
  }
1426
1438
  }
1427
1439
  }
1428
- function In(t, e) {
1429
- const s = $(t, en);
1430
- return on(s, e);
1440
+ async function En(t, e) {
1441
+ const s = await $(t, rn);
1442
+ return ln(s, e);
1431
1443
  }
1432
- function cn(t) {
1444
+ function _n(t) {
1433
1445
  const e = /* @__PURE__ */ Object.create(null);
1434
1446
  let s;
1435
1447
  for (; (s = t.next()) !== null; ) {
@@ -1438,73 +1450,73 @@ function cn(t) {
1438
1450
  }
1439
1451
  return e;
1440
1452
  }
1441
- const En = 2097192, _n = 2136687806;
1442
- function fn(t) {
1453
+ const fn = 2097192, hn = 2136687806;
1454
+ function un(t) {
1443
1455
  const e = {};
1444
- return Vt(e), e;
1456
+ return Bt(e), e;
1445
1457
  }
1446
- function Vt(t) {
1458
+ function Bt(t) {
1447
1459
  return t.Styles = [], t;
1448
1460
  }
1449
- function hn(t, e) {
1461
+ function Tn(t, e) {
1450
1462
  const s = L.create(t);
1451
- return un(s, e);
1463
+ return An(s, e);
1452
1464
  }
1453
- function un(t, e) {
1454
- const s = e ?? fn();
1455
- return Vt(s), Tn(t, s), s;
1465
+ function An(t, e) {
1466
+ const s = e ?? un();
1467
+ return Bt(s), Nn(t, s), s;
1456
1468
  }
1457
- function Tn(t, e) {
1469
+ function Nn(t, e) {
1458
1470
  let s;
1459
1471
  for (; (s = t.next()) !== null; )
1460
1472
  switch (s.fieldId) {
1461
- case _n: {
1473
+ case hn: {
1462
1474
  if (s.isNull) throw new Error();
1463
- e.Styles = An(s.asArray());
1475
+ e.Styles = Sn(s.asArray());
1464
1476
  break;
1465
1477
  }
1466
1478
  }
1467
1479
  }
1468
- function Nn(t, e) {
1469
- const s = $(t, En);
1470
- return hn(s, e);
1480
+ async function dn(t, e) {
1481
+ const s = await $(t, fn);
1482
+ return Tn(s, e);
1471
1483
  }
1472
- function An(t) {
1484
+ function Sn(t) {
1473
1485
  const e = [];
1474
1486
  let s;
1475
1487
  for (; (s = t.next()) !== null; )
1476
- e.push(wn(s.asObject()));
1488
+ e.push(Dn(s.asObject()));
1477
1489
  return e;
1478
1490
  }
1479
- const Sn = 979822885, dn = 2374537704;
1480
- function yn(t) {
1491
+ const yn = 979822885, wn = 2374537704;
1492
+ function Cn(t) {
1481
1493
  const e = {};
1482
- return Gt(e), e;
1494
+ return xt(e), e;
1483
1495
  }
1484
- function Gt(t) {
1496
+ function xt(t) {
1485
1497
  return t.StyleId = "", t.Style = /* @__PURE__ */ Object.create(null), t;
1486
1498
  }
1487
- function wn(t, e) {
1488
- const s = e ?? yn();
1489
- return Gt(s), Cn(t, s), s;
1499
+ function Dn(t, e) {
1500
+ const s = e ?? Cn();
1501
+ return xt(s), Un(t, s), s;
1490
1502
  }
1491
- function Cn(t, e) {
1503
+ function Un(t, e) {
1492
1504
  let s;
1493
1505
  for (; (s = t.next()) !== null; )
1494
1506
  switch (s.fieldId) {
1495
- case Sn: {
1507
+ case yn: {
1496
1508
  if (s.isNull) throw new Error();
1497
1509
  e.StyleId = s.asString();
1498
1510
  break;
1499
1511
  }
1500
- case dn: {
1512
+ case wn: {
1501
1513
  if (s.isNull) throw new Error();
1502
- e.Style = Dn(s.asDictionary());
1514
+ e.Style = Rn(s.asDictionary());
1503
1515
  break;
1504
1516
  }
1505
1517
  }
1506
1518
  }
1507
- function Dn(t) {
1519
+ function Rn(t) {
1508
1520
  const e = /* @__PURE__ */ Object.create(null);
1509
1521
  let s;
1510
1522
  for (; (s = t.next()) !== null; ) {
@@ -1513,93 +1525,93 @@ function Dn(t) {
1513
1525
  }
1514
1526
  return e;
1515
1527
  }
1516
- const Un = 2097193, Rn = 1415642792;
1517
- function mn(t) {
1528
+ const mn = 2097193, Ln = 1415642792;
1529
+ function gn(t) {
1518
1530
  const e = {};
1519
- return Bt(e), e;
1531
+ return Ht(e), e;
1520
1532
  }
1521
- function Bt(t) {
1533
+ function Ht(t) {
1522
1534
  return t.StyleIds = [], t;
1523
1535
  }
1524
- function Ln(t, e) {
1536
+ function On(t, e) {
1525
1537
  const s = L.create(t);
1526
- return On(s, e);
1538
+ return Pn(s, e);
1527
1539
  }
1528
- function On(t, e) {
1529
- const s = e ?? mn();
1530
- return Bt(s), gn(t, s), s;
1540
+ function Pn(t, e) {
1541
+ const s = e ?? gn();
1542
+ return Ht(s), bn(t, s), s;
1531
1543
  }
1532
- function gn(t, e) {
1544
+ function bn(t, e) {
1533
1545
  let s;
1534
1546
  for (; (s = t.next()) !== null; )
1535
1547
  switch (s.fieldId) {
1536
- case Rn: {
1548
+ case Ln: {
1537
1549
  if (s.isNull) throw new Error();
1538
- e.StyleIds = bn(s.asArray());
1550
+ e.StyleIds = pn(s.asArray());
1539
1551
  break;
1540
1552
  }
1541
1553
  }
1542
1554
  }
1543
- function Pn(t, e) {
1544
- const s = $(t, Un);
1545
- return Ln(s, e);
1555
+ async function Fn(t, e) {
1556
+ const s = await $(t, mn);
1557
+ return On(s, e);
1546
1558
  }
1547
- function bn(t) {
1559
+ function pn(t) {
1548
1560
  const e = [];
1549
1561
  let s;
1550
1562
  for (; (s = t.next()) !== null; )
1551
1563
  e.push(s.asString());
1552
1564
  return e;
1553
1565
  }
1554
- const Fn = 2097190, pn = 425183262, vn = 653781469;
1555
- function Mn(t) {
1566
+ const vn = 2097190, Mn = 425183262, kn = 653781469;
1567
+ function Vn(t) {
1556
1568
  const e = {};
1557
- return xt(e), e;
1569
+ return Yt(e), e;
1558
1570
  }
1559
- function xt(t) {
1571
+ function Yt(t) {
1560
1572
  return t.Json = "", t.Payloads = /* @__PURE__ */ Object.create(null), t;
1561
1573
  }
1562
- function kn(t, e) {
1574
+ function Gn(t, e) {
1563
1575
  const s = L.create(t);
1564
- return Vn(s, e);
1576
+ return Bn(s, e);
1565
1577
  }
1566
- function Vn(t, e) {
1567
- const s = e ?? Mn();
1568
- return xt(s), Gn(t, s), s;
1578
+ function Bn(t, e) {
1579
+ const s = e ?? Vn();
1580
+ return Yt(s), xn(t, s), s;
1569
1581
  }
1570
- function Gn(t, e) {
1582
+ function xn(t, e) {
1571
1583
  let s;
1572
1584
  for (; (s = t.next()) !== null; )
1573
1585
  switch (s.fieldId) {
1574
- case pn: {
1586
+ case Mn: {
1575
1587
  if (s.isNull) throw new Error();
1576
1588
  e.Json = s.asString();
1577
1589
  break;
1578
1590
  }
1579
- case vn: {
1591
+ case kn: {
1580
1592
  if (s.isNull) throw new Error();
1581
- e.Payloads = xn(s.asDictionary());
1593
+ e.Payloads = Yn(s.asDictionary());
1582
1594
  break;
1583
1595
  }
1584
1596
  }
1585
1597
  }
1586
- function Bn(t, e) {
1587
- const s = $(t, Fn);
1588
- return kn(s, e);
1598
+ async function Hn(t, e) {
1599
+ const s = await $(t, vn);
1600
+ return Gn(s, e);
1589
1601
  }
1590
- function xn(t) {
1602
+ function Yn(t) {
1591
1603
  const e = /* @__PURE__ */ Object.create(null);
1592
1604
  let s;
1593
1605
  for (; (s = t.next()) !== null; ) {
1594
1606
  const r = s.key.asString();
1595
- e[r] = Zr(s.value.asObject());
1607
+ e[r] = en(s.value.asObject());
1596
1608
  }
1597
1609
  return e;
1598
1610
  }
1599
1611
  function y(t) {
1600
1612
  return typeof t == "object" && t !== null && !Array.isArray(t);
1601
1613
  }
1602
- function Ht(t) {
1614
+ function $t(t) {
1603
1615
  const e = {}, s = Object.keys(t);
1604
1616
  for (let r = 0; r < s.length; r++) {
1605
1617
  const n = s[r];
@@ -1607,7 +1619,7 @@ function Ht(t) {
1607
1619
  }
1608
1620
  return e;
1609
1621
  }
1610
- function Yt(t, e, s, r) {
1622
+ function Kt(t, e, s, r) {
1611
1623
  if (!(t === void 0 && r)) {
1612
1624
  if (Array.isArray(t)) {
1613
1625
  const n = [];
@@ -1637,22 +1649,22 @@ function ot(t, e) {
1637
1649
  if (n != null) {
1638
1650
  if (!y(n))
1639
1651
  throw new Error(`Invalid props for node ${s}`);
1640
- a = Ht(n);
1652
+ a = $t(n);
1641
1653
  }
1642
- let I = [];
1643
- Array.isArray(i) && (I = i.map(
1644
- (c, E) => ot(c ?? {}, `${e}.children[${E}]`)
1654
+ let c = [];
1655
+ Array.isArray(i) && (c = i.map(
1656
+ (I, E) => ot(I ?? {}, `${e}.children[${E}]`)
1645
1657
  ));
1646
- const l = Yt(o, e, s, !1);
1658
+ const l = Kt(o, e, s, !1);
1647
1659
  return {
1648
1660
  id: s,
1649
1661
  type: r,
1650
1662
  props: a,
1651
- children: I,
1663
+ children: c,
1652
1664
  styleIds: l ?? []
1653
1665
  };
1654
1666
  }
1655
- function Hn(t, e) {
1667
+ function $n(t, e) {
1656
1668
  if (!y(t))
1657
1669
  throw new Error(`Invalid text delta at ${e}`);
1658
1670
  const s = t.NodeId, r = t.PropertyName, n = t.Start, i = t.End, o = t.InsertedText;
@@ -1679,7 +1691,7 @@ function Hn(t, e) {
1679
1691
  insertedText: o
1680
1692
  };
1681
1693
  }
1682
- function Yn(t, e) {
1694
+ function Kn(t, e) {
1683
1695
  if (!y(t))
1684
1696
  throw new Error(`Invalid child insert at ${e}`);
1685
1697
  const s = t.Index, r = t.Node;
@@ -1692,7 +1704,7 @@ function Yn(t, e) {
1692
1704
  node: ot(r, `${e}.node`)
1693
1705
  };
1694
1706
  }
1695
- function $n(t, e) {
1707
+ function jn(t, e) {
1696
1708
  if (!y(t))
1697
1709
  throw new Error(`Invalid child move at ${e}`);
1698
1710
  const s = t.NodeId, r = t.FromIndex, n = t.ToIndex;
@@ -1708,7 +1720,7 @@ function $n(t, e) {
1708
1720
  toIndex: n
1709
1721
  };
1710
1722
  }
1711
- function Kn(t, e) {
1723
+ function Xn(t, e) {
1712
1724
  if (!y(t))
1713
1725
  throw new Error(`Invalid child remove at ${e}`);
1714
1726
  const s = t.NodeId, r = t.Index;
@@ -1721,32 +1733,32 @@ function Kn(t, e) {
1721
1733
  index: r
1722
1734
  };
1723
1735
  }
1724
- function jn(t, e) {
1736
+ function zn(t, e) {
1725
1737
  if (!y(t))
1726
1738
  throw new Error(`Invalid node change at ${e}`);
1727
1739
  const s = t.nodeId;
1728
1740
  if (typeof s != "string" || s.length === 0)
1729
1741
  throw new Error(`Invalid node change nodeId at ${e}`);
1730
1742
  const r = Array.isArray(t.inserts) ? t.inserts.map(
1731
- (c, E) => Yn(c ?? {}, `${e}.inserts[${E}]`)
1743
+ (I, E) => Kn(I ?? {}, `${e}.inserts[${E}]`)
1732
1744
  ) : void 0, n = Array.isArray(t.moves) ? t.moves.map(
1733
- (c, E) => $n(c ?? {}, `${e}.moves[${E}]`)
1745
+ (I, E) => jn(I ?? {}, `${e}.moves[${E}]`)
1734
1746
  ) : void 0, i = Array.isArray(t.removals) ? t.removals.map(
1735
- (c, E) => Kn(c ?? {}, `${e}.removals[${E}]`)
1747
+ (I, E) => Xn(I ?? {}, `${e}.removals[${E}]`)
1736
1748
  ) : void 0;
1737
1749
  let o;
1738
1750
  if (y(t.changedProps)) {
1739
1751
  o = /* @__PURE__ */ new Map();
1740
- for (const [c, E] of Object.entries(t.changedProps)) {
1752
+ for (const [I, E] of Object.entries(t.changedProps)) {
1741
1753
  if (!y(E))
1742
1754
  continue;
1743
1755
  const _ = E.New;
1744
- _ === void 0 ? o.set(c, void 0) : y(_) ? o.set(c, Ht(_)) : o.set(c, _);
1756
+ _ === void 0 ? o.set(I, void 0) : y(_) ? o.set(I, $t(_)) : o.set(I, _);
1745
1757
  }
1746
1758
  }
1747
1759
  const a = Array.isArray(t.textUpdates) ? t.textUpdates.map(
1748
- (c, E) => Hn(c ?? {}, `${e}.textUpdates[${E}]`)
1749
- ) : void 0, I = t.styleIds, l = I !== void 0 ? Yt(I, e, s, !0) : void 0;
1760
+ (I, E) => $n(I ?? {}, `${e}.textUpdates[${E}]`)
1761
+ ) : void 0, c = t.styleIds, l = c !== void 0 ? Kt(c, e, s, !0) : void 0;
1750
1762
  return {
1751
1763
  nodeId: s,
1752
1764
  ...r && r.length > 0 ? { inserts: r } : {},
@@ -1757,19 +1769,19 @@ function jn(t, e) {
1757
1769
  ...l !== void 0 ? { styleIds: l } : {}
1758
1770
  };
1759
1771
  }
1760
- function Xn(t) {
1772
+ function Wn(t) {
1761
1773
  const e = /* @__PURE__ */ new Map();
1762
1774
  for (const [s, r] of Object.entries(t))
1763
1775
  e.set(s, r);
1764
1776
  return e;
1765
1777
  }
1766
- function zn(t, e, s) {
1778
+ function Jn(t, e, s) {
1767
1779
  if (!t || typeof t != "object")
1768
1780
  throw new D("UI update graph is missing");
1769
1781
  const r = ot(t, "graph");
1770
1782
  if (r.type !== "root")
1771
1783
  throw new D('UI update root element must have type "root"');
1772
- const n = Jn(r.props, e);
1784
+ const n = Qn(r.props, e);
1773
1785
  return {
1774
1786
  type: "full",
1775
1787
  version: s,
@@ -1777,7 +1789,7 @@ function zn(t, e, s) {
1777
1789
  metadata: n
1778
1790
  };
1779
1791
  }
1780
- function Wn(t, e, s) {
1792
+ function qn(t, e, s) {
1781
1793
  if (!Array.isArray(t))
1782
1794
  throw new D("UI diff changes must be an array");
1783
1795
  if (!y(e))
@@ -1786,34 +1798,34 @@ function Wn(t, e, s) {
1786
1798
  if (typeof r != "string" || r.length === 0)
1787
1799
  throw new D("UI diff metadata is missing viewId");
1788
1800
  const n = t.map(
1789
- (E, _) => jn(E ?? {}, `changes[${_}]`)
1790
- ), i = e.optimisticActionId === null || typeof e.optimisticActionId == "string" ? e.optimisticActionId : void 0, o = typeof e.isOptimistic == "boolean" ? e.isOptimistic : void 0, a = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0, I = Q(e.optimisticPatch), l = Z(e.optimisticReconcile), c = {
1801
+ (E, _) => zn(E ?? {}, `changes[${_}]`)
1802
+ ), i = e.optimisticActionId === null || typeof e.optimisticActionId == "string" ? e.optimisticActionId : void 0, o = typeof e.isOptimistic == "boolean" ? e.isOptimistic : void 0, a = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0, c = Q(e.optimisticPatch), l = Z(e.optimisticReconcile), I = {
1791
1803
  viewId: r,
1792
1804
  ...i !== void 0 ? { optimisticActionId: i } : {},
1793
1805
  ...o !== void 0 ? { isOptimistic: o } : {},
1794
1806
  ...a !== void 0 ? { isUpdate: a } : {},
1795
- ...I ? { optimisticPatch: I } : {},
1807
+ ...c ? { optimisticPatch: c } : {},
1796
1808
  ...l ? { optimisticReconcile: l } : {}
1797
1809
  };
1798
1810
  return {
1799
1811
  type: "diff",
1800
1812
  version: s,
1801
1813
  changes: n,
1802
- metadata: c
1814
+ metadata: I
1803
1815
  };
1804
1816
  }
1805
- function Jn(t, e) {
1817
+ function Qn(t, e) {
1806
1818
  const s = t.viewId;
1807
1819
  if (typeof s != "string" || s.length === 0)
1808
1820
  throw new D("UI update root is missing viewId");
1809
- let r = s, n = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, i = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, o = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, a = Q(t.optimisticPatch), I = Z(t.optimisticReconcile);
1810
- return y(e) && (typeof e.viewId == "string" && e.viewId.length > 0 && (r = e.viewId), (e.optimisticActionId === null || typeof e.optimisticActionId == "string") && (n = e.optimisticActionId), typeof e.isOptimistic == "boolean" && (i = e.isOptimistic), typeof e.isUpdate == "boolean" && (o = e.isUpdate), e.optimisticPatch !== void 0 && (a = Q(e.optimisticPatch)), e.optimisticReconcile !== void 0 && (I = Z(e.optimisticReconcile))), {
1821
+ let r = s, n = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, i = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, o = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, a = Q(t.optimisticPatch), c = Z(t.optimisticReconcile);
1822
+ return y(e) && (typeof e.viewId == "string" && e.viewId.length > 0 && (r = e.viewId), (e.optimisticActionId === null || typeof e.optimisticActionId == "string") && (n = e.optimisticActionId), typeof e.isOptimistic == "boolean" && (i = e.isOptimistic), typeof e.isUpdate == "boolean" && (o = e.isUpdate), e.optimisticPatch !== void 0 && (a = Q(e.optimisticPatch)), e.optimisticReconcile !== void 0 && (c = Z(e.optimisticReconcile))), {
1811
1823
  viewId: r,
1812
1824
  ...n !== void 0 ? { optimisticActionId: n } : {},
1813
1825
  ...i !== void 0 ? { isOptimistic: i } : {},
1814
1826
  ...o !== void 0 ? { isUpdate: o } : {},
1815
1827
  ...a ? { optimisticPatch: a } : {},
1816
- ...I ? { optimisticReconcile: I } : {}
1828
+ ...c ? { optimisticReconcile: c } : {}
1817
1829
  };
1818
1830
  }
1819
1831
  function Q(t) {
@@ -1824,10 +1836,10 @@ function Q(t) {
1824
1836
  return;
1825
1837
  let a;
1826
1838
  if (Array.isArray(o)) {
1827
- const I = [];
1839
+ const c = [];
1828
1840
  for (const l of o)
1829
- typeof l == "string" && l.length > 0 && I.push(l);
1830
- a = I;
1841
+ typeof l == "string" && l.length > 0 && c.push(l);
1842
+ a = c;
1831
1843
  }
1832
1844
  return {
1833
1845
  id: s,
@@ -1860,7 +1872,7 @@ class D extends Error {
1860
1872
  super(e), this.causeError = s, this.name = "UiUpdateParseError", s instanceof Error && (this.stack = s.stack);
1861
1873
  }
1862
1874
  }
1863
- function qn(t) {
1875
+ function Zn(t) {
1864
1876
  let e;
1865
1877
  try {
1866
1878
  e = JSON.parse(t.Json);
@@ -1874,13 +1886,13 @@ function qn(t) {
1874
1886
  throw new D(`Unknown UI update type: ${String(s)}`);
1875
1887
  if (typeof r != "number")
1876
1888
  throw new D("UI update version must be a number");
1877
- const n = s === "full" ? zn(e.graph, e.metadata, r) : Wn(e.changes, e.metadata, r), i = t.Payloads ? Xn(t.Payloads) : /* @__PURE__ */ new Map();
1889
+ const n = s === "full" ? Jn(e.graph, e.metadata, r) : qn(e.changes, e.metadata, r), i = t.Payloads ? Wn(t.Payloads) : /* @__PURE__ */ new Map();
1878
1890
  return {
1879
1891
  snapshot: n,
1880
1892
  payloads: i
1881
1893
  };
1882
1894
  }
1883
- class Qn {
1895
+ class ti {
1884
1896
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1885
1897
  cache = /* @__PURE__ */ new Map();
1886
1898
  /**
@@ -1961,7 +1973,7 @@ class Qn {
1961
1973
  return this.cache.size;
1962
1974
  }
1963
1975
  }
1964
- class Zn {
1976
+ class ei {
1965
1977
  views = /* @__PURE__ */ new Map();
1966
1978
  listeners = /* @__PURE__ */ new Set();
1967
1979
  payloads = /* @__PURE__ */ new Map();
@@ -1983,7 +1995,7 @@ class Zn {
1983
1995
  patchesDirty = !0;
1984
1996
  payloadsDirty = !0;
1985
1997
  // Handler cache for stable event handlers
1986
- handlerCache = new Qn();
1998
+ handlerCache = new ti();
1987
1999
  getSortedPatches(e) {
1988
2000
  const s = this.buildPatchCacheKey(e.patches);
1989
2001
  if (e.sortedPatchesCacheKey === s && e.sortedPatchesCache)
@@ -2022,21 +2034,21 @@ class Zn {
2022
2034
  const a = s.type === "diff" && n.isUpdate === !0;
2023
2035
  if (s.version < o.version || s.version === o.version && !a)
2024
2036
  return !1;
2025
- let I = !1;
2026
- if (this.rootViewId || (this.rootViewId = i, I = !0, this.structureChanged = !0), n.optimisticReconcile?.drop)
2027
- for (const c of n.optimisticReconcile.drop)
2028
- o.patches.delete(c) && (I = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
2037
+ let c = !1;
2038
+ if (this.rootViewId || (this.rootViewId = i, c = !0, this.structureChanged = !0), n.optimisticReconcile?.drop)
2039
+ for (const I of n.optimisticReconcile.drop)
2040
+ o.patches.delete(I) && (c = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
2029
2041
  if (n.optimisticPatch?.supersedes)
2030
- for (const c of n.optimisticPatch.supersedes)
2031
- o.patches.delete(c) && (I = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
2042
+ for (const I of n.optimisticPatch.supersedes)
2043
+ o.patches.delete(I) && (c = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
2032
2044
  const l = o.composite ?? o.baseline;
2033
2045
  if (s.type === "full")
2034
- o.baseline = s.root, o.composite = s.root, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? s.version, o.patches.clear(), this.invalidatePatchCache(o), o.version = s.version, I = !0, this.viewsDirty = !0, this.patchesDirty = !0, this.structureChanged = !0, s.root && b(s.root, this.changedNodeIds);
2046
+ o.baseline = s.root, o.composite = s.root, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? s.version, o.patches.clear(), this.invalidatePatchCache(o), o.version = s.version, c = !0, this.viewsDirty = !0, this.patchesDirty = !0, this.structureChanged = !0, s.root && b(s.root, this.changedNodeIds);
2035
2047
  else if (n.optimisticPatch) {
2036
2048
  if (!l)
2037
2049
  return !1;
2038
- const c = J(l, s.changes);
2039
- c !== l && (o.composite = c, I = !0, this.viewsDirty = !0, X(l, c, this.changedNodeIds));
2050
+ const I = J(l, s.changes);
2051
+ I !== l && (o.composite = I, c = !0, this.viewsDirty = !0, X(l, I, this.changedNodeIds));
2040
2052
  const E = n.optimisticPatch, _ = {
2041
2053
  id: E.id,
2042
2054
  actionId: E.actionId,
@@ -2044,24 +2056,24 @@ class Zn {
2044
2056
  baseVersion: E.baseVersion,
2045
2057
  changes: s.changes
2046
2058
  };
2047
- o.patches.set(_.id, _), this.invalidatePatchCache(o), I = !0, this.patchesDirty = !0, o.version = s.version;
2059
+ o.patches.set(_.id, _), this.invalidatePatchCache(o), c = !0, this.patchesDirty = !0, o.version = s.version;
2048
2060
  } else {
2049
- const c = o.baseline ?? l;
2050
- if (!c)
2061
+ const I = o.baseline ?? l;
2062
+ if (!I)
2051
2063
  return !1;
2052
- const E = J(c, s.changes);
2053
- E !== c ? (o.baseline = E, I = !0, this.viewsDirty = !0) : o.baseline = E, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? s.version;
2064
+ const E = J(I, s.changes);
2065
+ E !== I ? (o.baseline = E, c = !0, this.viewsDirty = !0) : o.baseline = E, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? s.version;
2054
2066
  let _ = o.baseline ?? E;
2055
- const N = this.getSortedPatches(o);
2056
- for (const h of N) {
2067
+ const A = this.getSortedPatches(o);
2068
+ for (const h of A) {
2057
2069
  const w = J(_, h.changes);
2058
- w !== _ && (I = !0, this.viewsDirty = !0), _ = w, h.baseVersion = o.baselineVersion;
2070
+ w !== _ && (c = !0, this.viewsDirty = !0), _ = w, h.baseVersion = o.baselineVersion;
2059
2071
  }
2060
- o.composite !== _ && (o.composite = _, I = !0, this.viewsDirty = !0), l && _ ? X(l, _, this.changedNodeIds) : _ && b(_, this.changedNodeIds), o.version = s.version;
2072
+ o.composite !== _ && (o.composite = _, c = !0, this.viewsDirty = !0), l && _ ? X(l, _, this.changedNodeIds) : _ && b(_, this.changedNodeIds), o.version = s.version;
2061
2073
  }
2062
- for (const [c, E] of r)
2063
- this.payloads.get(c) !== E && (this.payloads.set(c, E), I = !0, this.payloadsDirty = !0);
2064
- return I ? (this.commitSnapshot(), this.notify(), !0) : (o.version = s.version, !1);
2074
+ for (const [I, E] of r)
2075
+ this.payloads.get(I) !== E && (this.payloads.set(I, E), c = !0, this.payloadsDirty = !0);
2076
+ return c ? (this.commitSnapshot(), this.notify(), !0) : (o.version = s.version, !1);
2065
2077
  }
2066
2078
  replaceFromWire(e) {
2067
2079
  const s = {
@@ -2079,40 +2091,40 @@ class Zn {
2079
2091
  if (s !== void 0 && this.snapshot.version !== s)
2080
2092
  return !1;
2081
2093
  let r = !1, n = null, i = null, o = null;
2082
- const a = () => (n || (n = new Map(this.snapshot.views)), n), I = () => (i || (i = new Map(this.snapshot.payloads)), i), l = () => (o || (o = new Map(this.snapshot.optimisticPatches)), o);
2094
+ const a = () => (n || (n = new Map(this.snapshot.views)), n), c = () => (i || (i = new Map(this.snapshot.payloads)), i), l = () => (o || (o = new Map(this.snapshot.optimisticPatches)), o);
2083
2095
  if (e.deleteViews && e.deleteViews.length > 0)
2084
2096
  for (const _ of e.deleteViews)
2085
2097
  a().delete(_) && (r = !0, this.structureChanged = !0);
2086
2098
  if (e.upsertViews && e.upsertViews.length > 0)
2087
- for (const [_, N] of e.upsertViews) {
2099
+ for (const [_, A] of e.upsertViews) {
2088
2100
  const h = a(), w = h.get(_);
2089
- w !== N && (h.set(_, N), r = !0, w ? X(w, N, this.changedNodeIds) : (b(N, this.changedNodeIds), this.structureChanged = !0));
2101
+ w !== A && (h.set(_, A), r = !0, w ? X(w, A, this.changedNodeIds) : (b(A, this.changedNodeIds), this.structureChanged = !0));
2090
2102
  }
2091
2103
  if (e.deletePayloads && e.deletePayloads.length > 0)
2092
2104
  for (const _ of e.deletePayloads)
2093
- I().delete(_) && (r = !0);
2105
+ c().delete(_) && (r = !0);
2094
2106
  if (e.upsertPayloads && e.upsertPayloads.length > 0)
2095
- for (const [_, N] of e.upsertPayloads) {
2096
- const h = I();
2097
- h.get(_) !== N && (h.set(_, N), r = !0);
2107
+ for (const [_, A] of e.upsertPayloads) {
2108
+ const h = c();
2109
+ h.get(_) !== A && (h.set(_, A), r = !0);
2098
2110
  }
2099
2111
  if (e.deleteOptimisticPatchesForViews && e.deleteOptimisticPatchesForViews.length > 0)
2100
2112
  for (const _ of e.deleteOptimisticPatchesForViews)
2101
2113
  l().delete(_) && (r = !0);
2102
2114
  if (e.upsertOptimisticPatches && e.upsertOptimisticPatches.length > 0)
2103
- for (const [_, N] of e.upsertOptimisticPatches) {
2115
+ for (const [_, A] of e.upsertOptimisticPatches) {
2104
2116
  const h = l(), w = h.get(_);
2105
- ri(w, N) || (h.set(_, N), r = !0);
2117
+ ii(w, A) || (h.set(_, A), r = !0);
2106
2118
  }
2107
- const c = e.rootViewId ?? this.snapshot.rootViewId;
2108
- c !== this.snapshot.rootViewId && (r = !0, this.structureChanged = !0);
2119
+ const I = e.rootViewId ?? this.snapshot.rootViewId;
2120
+ I !== this.snapshot.rootViewId && (r = !0, this.structureChanged = !0);
2109
2121
  const E = e.nextVersion;
2110
2122
  if (E !== this.snapshot.version && (r = !0), !r)
2111
2123
  return this.snapshot = { ...this.snapshot, version: E }, !1;
2112
2124
  for (const _ of this.changedNodeIds)
2113
2125
  this.nodeVersions.set(_, (this.nodeVersions.get(_) ?? 0) + 1);
2114
2126
  return this.snapshot = {
2115
- rootViewId: c,
2127
+ rootViewId: I,
2116
2128
  views: n ?? new Map(this.snapshot.views),
2117
2129
  payloads: i ?? new Map(this.snapshot.payloads),
2118
2130
  optimisticPatches: o ?? new Map(this.snapshot.optimisticPatches),
@@ -2158,7 +2170,7 @@ class Zn {
2158
2170
  if (s)
2159
2171
  return s;
2160
2172
  for (const r of this.snapshot.views.values()) {
2161
- const n = jt(r, e);
2173
+ const n = zt(r, e);
2162
2174
  if (n)
2163
2175
  return n;
2164
2176
  }
@@ -2192,10 +2204,10 @@ class Zn {
2192
2204
  const i = /* @__PURE__ */ new Map();
2193
2205
  for (const [o, a] of this.views)
2194
2206
  if (a.patches.size > 0) {
2195
- const I = this.getSortedPatches(a);
2207
+ const c = this.getSortedPatches(a);
2196
2208
  i.set(
2197
2209
  o,
2198
- I.map((l) => ({
2210
+ c.map((l) => ({
2199
2211
  id: l.id,
2200
2212
  actionId: l.actionId,
2201
2213
  ordinal: l.ordinal,
@@ -2229,7 +2241,7 @@ class Zn {
2229
2241
  }
2230
2242
  }
2231
2243
  }
2232
- class ti {
2244
+ class si {
2233
2245
  streams = /* @__PURE__ */ new Map();
2234
2246
  listeners = /* @__PURE__ */ new Set();
2235
2247
  apply(e, s) {
@@ -2293,7 +2305,7 @@ class ti {
2293
2305
  }
2294
2306
  getOrCreateStreamEntry(e) {
2295
2307
  let s = this.streams.get(e);
2296
- return s || (s = { store: new Zn() }, this.streams.set(e, s)), s;
2308
+ return s || (s = { store: new ei() }, this.streams.set(e, s)), s;
2297
2309
  }
2298
2310
  notify(e) {
2299
2311
  for (const s of this.listeners)
@@ -2306,59 +2318,59 @@ function J(t, e, s) {
2306
2318
  const r = /* @__PURE__ */ new Map();
2307
2319
  for (const n of e)
2308
2320
  r.set(n.nodeId, n);
2309
- return $t(t, r);
2321
+ return jt(t, r);
2310
2322
  }
2311
- function $t(t, e, s) {
2323
+ function jt(t, e, s) {
2312
2324
  const r = e.get(t.id);
2313
2325
  let n = t, i = !1;
2314
2326
  if (r?.textUpdates && r.textUpdates.length > 0) {
2315
- const f = ii(t, r.textUpdates);
2327
+ const f = ai(t, r.textUpdates);
2316
2328
  n = f.node, i = f.changed;
2317
2329
  }
2318
2330
  let o = !1, a = n.props;
2319
2331
  if (r?.changedProps && r.changedProps.size > 0)
2320
- for (const [f, S] of r.changedProps.entries()) {
2332
+ for (const [f, d] of r.changedProps.entries()) {
2321
2333
  const u = a[f];
2322
- if (S === void 0)
2334
+ if (d === void 0)
2323
2335
  (u !== void 0 || f in a) && (o || (a = k(a), o = !0), delete a[f]);
2324
- else if (tt(S)) {
2325
- const A = k(S);
2326
- v(A, u) || (o || (a = k(a), o = !0), a[f] = A);
2336
+ else if (tt(d)) {
2337
+ const N = k(d);
2338
+ v(N, u) || (o || (a = k(a), o = !0), a[f] = N);
2327
2339
  } else
2328
- v(S, u) || (o || (a = k(a), o = !0), a[f] = S);
2340
+ v(d, u) || (o || (a = k(a), o = !0), a[f] = d);
2329
2341
  }
2330
- let I = !1, l = n.styleIds;
2331
- r?.styleIds !== void 0 && (Xt(n.styleIds, r.styleIds) || (l = r.styleIds, I = !0));
2332
- const c = n.children ?? [];
2333
- let E = c, _ = !1;
2342
+ let c = !1, l = n.styleIds;
2343
+ r?.styleIds !== void 0 && (Wt(n.styleIds, r.styleIds) || (l = r.styleIds, c = !0));
2344
+ const I = n.children ?? [];
2345
+ let E = I, _ = !1;
2334
2346
  if (r?.removals && r.removals.length > 0 || r?.moves && r.moves.length > 0 || r?.inserts && r.inserts.length > 0) {
2335
2347
  const f = E.slice();
2336
2348
  if (r?.removals && r.removals.length > 0) {
2337
- const S = [...r.removals].sort((u, A) => A.index - u.index);
2338
- for (const u of S)
2349
+ const d = [...r.removals].sort((u, N) => N.index - u.index);
2350
+ for (const u of d)
2339
2351
  u.index >= 0 && u.index < f.length && f.splice(u.index, 1);
2340
2352
  _ = !0;
2341
2353
  }
2342
2354
  if (r?.moves && r.moves.length > 0) {
2343
- const S = [...r.moves].sort((A, m) => A.toIndex - m.toIndex), u = /* @__PURE__ */ new Map();
2344
- for (const A of S) {
2345
- const m = f.findIndex((W) => W.id === A.nodeId);
2346
- m >= 0 && (u.set(A.nodeId, f[m]), f.splice(m, 1));
2355
+ const d = [...r.moves].sort((N, m) => N.toIndex - m.toIndex), u = /* @__PURE__ */ new Map();
2356
+ for (const N of d) {
2357
+ const m = f.findIndex((W) => W.id === N.nodeId);
2358
+ m >= 0 && (u.set(N.nodeId, f[m]), f.splice(m, 1));
2347
2359
  }
2348
- for (const A of S) {
2349
- const m = u.get(A.nodeId);
2360
+ for (const N of d) {
2361
+ const m = u.get(N.nodeId);
2350
2362
  if (m) {
2351
- const W = Math.min(A.toIndex, f.length);
2363
+ const W = Math.min(N.toIndex, f.length);
2352
2364
  f.splice(W, 0, m);
2353
2365
  }
2354
2366
  }
2355
2367
  _ = !0;
2356
2368
  }
2357
2369
  if (r?.inserts && r.inserts.length > 0) {
2358
- const S = [...r.inserts].sort((u, A) => u.index - A.index);
2359
- for (const u of S) {
2360
- const A = Math.min(u.index, f.length);
2361
- f.splice(A, 0, u.node);
2370
+ const d = [...r.inserts].sort((u, N) => u.index - N.index);
2371
+ for (const u of d) {
2372
+ const N = Math.min(u.index, f.length);
2373
+ f.splice(N, 0, u.node);
2362
2374
  }
2363
2375
  _ = !0;
2364
2376
  }
@@ -2366,15 +2378,15 @@ function $t(t, e, s) {
2366
2378
  }
2367
2379
  let h;
2368
2380
  for (let f = 0; f < E.length; f++) {
2369
- const S = E[f], u = $t(S, e);
2370
- u !== S && (h || (h = E.slice()), h[f] = u);
2381
+ const d = E[f], u = jt(d, e);
2382
+ u !== d && (h || (h = E.slice()), h[f] = u);
2371
2383
  }
2372
- return h && (E = h, _ = !0), i || o || I || _ ? !o && !_ && !I ? n : {
2384
+ return h && (E = h, _ = !0), i || o || c || _ ? !o && !_ && !c ? n : {
2373
2385
  id: t.id,
2374
2386
  type: t.type,
2375
2387
  props: o ? a : n.props,
2376
- children: _ ? E : c,
2377
- styleIds: I ? l : n.styleIds
2388
+ children: _ ? E : I,
2389
+ styleIds: c ? l : n.styleIds
2378
2390
  } : t;
2379
2391
  }
2380
2392
  function b(t, e) {
@@ -2383,47 +2395,48 @@ function b(t, e) {
2383
2395
  b(s, e);
2384
2396
  }
2385
2397
  const j = [];
2386
- function ei(t) {
2398
+ function ri(t) {
2387
2399
  for (; j.length <= t; )
2388
2400
  j.push(/* @__PURE__ */ new Map());
2389
2401
  return j[t].clear(), j[t];
2390
2402
  }
2391
2403
  function X(t, e, s) {
2392
- Kt(t, e, s, 0);
2404
+ Xt(t, e, s, 0);
2393
2405
  }
2394
- function Kt(t, e, s, r) {
2406
+ function Xt(t, e, s, r) {
2395
2407
  if (t === e)
2396
2408
  return;
2397
- (t.type !== e.type || !si(t.props, e.props) || !Xt(t.styleIds, e.styleIds)) && s.add(e.id);
2409
+ (t.type !== e.type || !ni(t.props, e.props) || !Wt(t.styleIds, e.styleIds)) && s.add(e.id);
2398
2410
  const i = t.children ?? [], o = e.children ?? [];
2399
2411
  if (i !== o) {
2400
- const a = ei(r);
2401
- for (const I of i)
2402
- a.set(I.id, I);
2403
- for (const I of o) {
2404
- const l = a.get(I.id);
2405
- l ? Kt(l, I, s, r + 1) : b(I, s);
2412
+ const a = ri(r);
2413
+ for (const l of i)
2414
+ a.set(l.id, l);
2415
+ let c = !1;
2416
+ for (const l of o) {
2417
+ const I = a.get(l.id);
2418
+ I ? Xt(I, l, s, r + 1) : (b(l, s), c = !0);
2406
2419
  }
2407
- i.length !== o.length && s.add(e.id);
2420
+ (i.length !== o.length || c) && s.add(e.id);
2408
2421
  }
2409
2422
  }
2410
- function si(t, e) {
2423
+ function ni(t, e) {
2411
2424
  return v(t, e);
2412
2425
  }
2413
- function jt(t, e) {
2426
+ function zt(t, e) {
2414
2427
  if (t.id === e)
2415
2428
  return t;
2416
2429
  if (t.children)
2417
2430
  for (const s of t.children) {
2418
- const r = jt(s, e);
2431
+ const r = zt(s, e);
2419
2432
  if (r)
2420
2433
  return r;
2421
2434
  }
2422
2435
  }
2423
- function Xt(t, e) {
2436
+ function Wt(t, e) {
2424
2437
  return v(t, e);
2425
2438
  }
2426
- function ri(t, e) {
2439
+ function ii(t, e) {
2427
2440
  if (t === e) return !0;
2428
2441
  if (!t || !e || t.length !== e.length) return !1;
2429
2442
  for (let s = 0; s < t.length; s++) {
@@ -2433,7 +2446,7 @@ function ri(t, e) {
2433
2446
  }
2434
2447
  return !0;
2435
2448
  }
2436
- function ni(t, e) {
2449
+ function oi(t, e) {
2437
2450
  if (e.length === 0)
2438
2451
  return t;
2439
2452
  const s = [...e].sort((i, o) => i.start - o.start);
@@ -2441,16 +2454,16 @@ function ni(t, e) {
2441
2454
  for (const i of s) {
2442
2455
  const o = lt(i.start + n, 0, r.length);
2443
2456
  if (i.end == null) {
2444
- const c = r.slice(o), E = oi(c, i.insertedText);
2445
- r = r.slice(0, o) + i.insertedText + c.slice(E), n += i.insertedText.length - E;
2457
+ const I = r.slice(o), E = li(I, i.insertedText);
2458
+ r = r.slice(0, o) + i.insertedText + I.slice(E), n += i.insertedText.length - E;
2446
2459
  continue;
2447
2460
  }
2448
- const a = i.end + n, I = lt(a, o, r.length), l = I - o;
2449
- r = r.slice(0, o) + i.insertedText + r.slice(I), n += i.insertedText.length - l;
2461
+ const a = i.end + n, c = lt(a, o, r.length), l = c - o;
2462
+ r = r.slice(0, o) + i.insertedText + r.slice(c), n += i.insertedText.length - l;
2450
2463
  }
2451
2464
  return r;
2452
2465
  }
2453
- function ii(t, e, s) {
2466
+ function ai(t, e, s) {
2454
2467
  if (e.length === 0)
2455
2468
  return { node: t, changed: !1 };
2456
2469
  const r = /* @__PURE__ */ new Map();
@@ -2458,39 +2471,39 @@ function ii(t, e, s) {
2458
2471
  const i = r.get(n.nodeId);
2459
2472
  i ? i.push(n) : r.set(n.nodeId, [n]);
2460
2473
  }
2461
- return zt(t, r);
2474
+ return Jt(t, r);
2462
2475
  }
2463
- function zt(t, e, s) {
2476
+ function Jt(t, e, s) {
2464
2477
  const r = e.get(t.id) ?? [];
2465
2478
  let n = !1, i = t.props;
2466
2479
  if (r.length > 0) {
2467
2480
  const l = /* @__PURE__ */ new Map();
2468
- for (const c of r) {
2469
- const E = l.get(c.propertyName);
2470
- E ? E.push(c) : l.set(c.propertyName, [c]);
2481
+ for (const I of r) {
2482
+ const E = l.get(I.propertyName);
2483
+ E ? E.push(I) : l.set(I.propertyName, [I]);
2471
2484
  }
2472
- for (const [c, E] of l.entries()) {
2473
- const _ = i[c], h = ni(typeof _ == "string" ? _ : "", E);
2474
- n || (i = k(i), n = !0), i[c] = h;
2485
+ for (const [I, E] of l.entries()) {
2486
+ const _ = i[I], h = oi(typeof _ == "string" ? _ : "", E);
2487
+ n || (i = k(i), n = !0), i[I] = h;
2475
2488
  }
2476
2489
  }
2477
2490
  let o = !1;
2478
2491
  const a = t.children ?? [];
2479
- let I = a;
2492
+ let c = a;
2480
2493
  if (a.length > 0) {
2481
2494
  let l;
2482
- for (let c = 0; c < a.length; c++) {
2483
- const E = a[c], _ = zt(E, e);
2484
- _.changed && (l || (l = [...a]), l[c] = _.node);
2495
+ for (let I = 0; I < a.length; I++) {
2496
+ const E = a[I], _ = Jt(E, e);
2497
+ _.changed && (l || (l = [...a]), l[I] = _.node);
2485
2498
  }
2486
- l && (I = l, o = !0);
2499
+ l && (c = l, o = !0);
2487
2500
  }
2488
2501
  return !n && !o ? { node: t, changed: !1 } : {
2489
2502
  node: {
2490
2503
  id: t.id,
2491
2504
  type: t.type,
2492
2505
  props: n ? i : t.props,
2493
- children: o ? I : a,
2506
+ children: o ? c : a,
2494
2507
  styleIds: t.styleIds
2495
2508
  },
2496
2509
  changed: !0
@@ -2499,7 +2512,7 @@ function zt(t, e, s) {
2499
2512
  function lt(t, e, s) {
2500
2513
  return Math.max(e, Math.min(s, t));
2501
2514
  }
2502
- function oi(t, e) {
2515
+ function li(t, e) {
2503
2516
  const s = Math.min(t.length, e.length);
2504
2517
  let r = 0;
2505
2518
  for (; r < s && t.charCodeAt(r) === e.charCodeAt(r); )
@@ -2539,20 +2552,20 @@ function v(t, e) {
2539
2552
  }
2540
2553
  return !1;
2541
2554
  }
2542
- const ai = 16, li = 50, g = new ti(), H = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
2543
- let Wt = ai, Jt = li, V = [], G = null, B = null, R = 0, z = 0;
2555
+ const Ii = 16, ci = 50, O = new si(), H = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
2556
+ let qt = Ii, Qt = ci, V = [], G = null, B = null, R = 0, z = 0;
2544
2557
  const x = /* @__PURE__ */ new Map();
2545
- function Ii() {
2558
+ function Ei() {
2546
2559
  return typeof performance < "u" ? performance.now() : Date.now();
2547
2560
  }
2548
- function ci() {
2561
+ function _i() {
2549
2562
  try {
2550
2563
  return crypto.randomUUID();
2551
2564
  } catch {
2552
2565
  return `${Date.now()}_${Math.random().toString(16).slice(2)}`;
2553
2566
  }
2554
2567
  }
2555
- function Ei(t) {
2568
+ function fi(t) {
2556
2569
  const e = [];
2557
2570
  for (const n of t.views)
2558
2571
  e.push(n);
@@ -2572,7 +2585,7 @@ function Ei(t) {
2572
2585
  optimisticPatches: r
2573
2586
  };
2574
2587
  }
2575
- function _i(t, e) {
2588
+ function hi(t, e) {
2576
2589
  if (t === e) return !0;
2577
2590
  if (!t || !e || t.length !== e.length) return !1;
2578
2591
  for (let s = 0; s < t.length; s++) {
@@ -2582,26 +2595,26 @@ function _i(t, e) {
2582
2595
  }
2583
2596
  return !0;
2584
2597
  }
2585
- function fi(t, e, s) {
2598
+ function ui(t, e, s) {
2586
2599
  if (!s || s.version === -1)
2587
- return { type: "ReplaceStreamSnapshot", snapshot: Ei(e) };
2600
+ return { type: "ReplaceStreamSnapshot", snapshot: fi(e) };
2588
2601
  let r, n;
2589
- for (const [l, c] of e.views)
2590
- s.views.get(l) !== c && (r ??= []).push([l, c]);
2602
+ for (const [l, I] of e.views)
2603
+ s.views.get(l) !== I && (r ??= []).push([l, I]);
2591
2604
  for (const l of s.views.keys())
2592
2605
  e.views.has(l) || (n ??= []).push(l);
2593
2606
  let i, o;
2594
- for (const [l, c] of e.payloads)
2595
- s.payloads.get(l) !== c && (i ??= []).push([l, c]);
2607
+ for (const [l, I] of e.payloads)
2608
+ s.payloads.get(l) !== I && (i ??= []).push([l, I]);
2596
2609
  for (const l of s.payloads.keys())
2597
2610
  e.payloads.has(l) || (o ??= []).push(l);
2598
- let a, I;
2599
- for (const [l, c] of e.optimisticPatches) {
2611
+ let a, c;
2612
+ for (const [l, I] of e.optimisticPatches) {
2600
2613
  const E = s.optimisticPatches.get(l);
2601
- _i(E, c) || (a ??= []).push([l, c.slice()]);
2614
+ hi(E, I) || (a ??= []).push([l, I.slice()]);
2602
2615
  }
2603
2616
  for (const l of s.optimisticPatches.keys())
2604
- e.optimisticPatches.has(l) || (I ??= []).push(l);
2617
+ e.optimisticPatches.has(l) || (c ??= []).push(l);
2605
2618
  return {
2606
2619
  type: "PatchStreamSnapshot",
2607
2620
  streamId: t,
@@ -2614,14 +2627,14 @@ function fi(t, e, s) {
2614
2627
  upsertPayloads: i,
2615
2628
  deletePayloads: o,
2616
2629
  upsertOptimisticPatches: a,
2617
- deleteOptimisticPatchesForViews: I
2630
+ deleteOptimisticPatchesForViews: c
2618
2631
  };
2619
2632
  }
2620
- function qt() {
2621
- G || (G = setTimeout(It, Wt)), B || (B = setTimeout(It, Jt));
2633
+ function Zt() {
2634
+ G || (G = setTimeout(It, qt)), B || (B = setTimeout(It, Qt));
2622
2635
  }
2623
2636
  function P(t) {
2624
- V.push(t), qt();
2637
+ V.push(t), Zt();
2625
2638
  }
2626
2639
  function It() {
2627
2640
  if (G && (clearTimeout(G), G = null), B && (clearTimeout(B), B = null), V.length === 0 && x.size === 0) {
@@ -2632,40 +2645,40 @@ function It() {
2632
2645
  for (const [s, r] of x)
2633
2646
  t.push({ trackId: s, version: r });
2634
2647
  const e = {
2635
- batchId: ci(),
2636
- createdAtMs: Ii(),
2648
+ batchId: _i(),
2649
+ createdAtMs: Ei(),
2637
2650
  ops: V,
2638
2651
  ...t.length > 0 ? { acks: t } : {},
2639
2652
  stats: { uiMessagesConsumed: R, bytesConsumed: z }
2640
2653
  };
2641
2654
  V = [], R = 0, z = 0, x.clear(), self.postMessage(e);
2642
2655
  }
2643
- function Qt(t) {
2656
+ function te(t) {
2644
2657
  return `${t.senderId}_${t.trackId}`;
2645
2658
  }
2646
- function hi(t) {
2647
- const e = hr(t), s = /* @__PURE__ */ new Set();
2659
+ async function Ti(t) {
2660
+ const e = await Tr(t), s = /* @__PURE__ */ new Set();
2648
2661
  for (const r of Object.values(e.UIStreams ?? {})) {
2649
2662
  const n = r.StreamId;
2650
2663
  s.add(n);
2651
2664
  const i = r.Info?.Category;
2652
- g.getSnapshot(n)?.category !== i && (g.setCategory(n, i), P({ type: "SetStreamCategory", streamId: n, category: i }));
2665
+ O.getSnapshot(n)?.category !== i && (O.setCategory(n, i), P({ type: "SetStreamCategory", streamId: n, category: i }));
2653
2666
  }
2654
- for (const r of g.getSnapshots())
2655
- s.has(r.streamId) || (g.remove(r.streamId), Y.delete(r.streamId), P({ type: "RemoveStream", streamId: r.streamId }));
2667
+ for (const r of O.getSnapshots())
2668
+ s.has(r.streamId) || (O.remove(r.streamId), Y.delete(r.streamId), P({ type: "RemoveStream", streamId: r.streamId }));
2656
2669
  }
2657
- function ui(t) {
2658
- const e = et(t), s = Qt(e), r = Bn(t), n = qn(r), i = x.get(e.trackId);
2659
- if ((i === void 0 || n.snapshot.version > i) && (x.set(e.trackId, n.snapshot.version), qt()), !g.apply(s, n))
2670
+ async function Ai(t) {
2671
+ const e = et(t), s = te(e), r = await Hn(t), n = Zn(r), i = x.get(e.trackId);
2672
+ if ((i === void 0 || n.snapshot.version > i) && (x.set(e.trackId, n.snapshot.version), Zt()), !O.apply(s, n))
2660
2673
  return;
2661
- const a = g.getSnapshot(s);
2674
+ const a = O.getSnapshot(s);
2662
2675
  if (!a)
2663
2676
  return;
2664
- const I = Y.get(s);
2665
- Y.set(s, a), P(fi(s, a, I));
2677
+ const c = Y.get(s);
2678
+ Y.set(s, a), P(ui(s, a, c));
2666
2679
  }
2667
- function Ti(t) {
2668
- const e = In(t);
2680
+ async function Ni(t) {
2681
+ const e = await En(t);
2669
2682
  if (!e.StyleId)
2670
2683
  return;
2671
2684
  const s = {
@@ -2675,8 +2688,8 @@ function Ti(t) {
2675
2688
  }, r = H.get(s.styleId);
2676
2689
  r && r.css === s.css && r.common === s.common || (H.set(s.styleId, s), P({ type: "UpsertUiStyle", style: s }));
2677
2690
  }
2678
- function Ni(t) {
2679
- const e = Nn(t);
2691
+ async function di(t) {
2692
+ const e = await dn(t);
2680
2693
  if (e.Styles)
2681
2694
  for (const s of e.Styles) {
2682
2695
  if (!s.StyleId)
@@ -2689,44 +2702,44 @@ function Ni(t) {
2689
2702
  n && n.css === r.css && n.common === r.common || (H.set(r.styleId, r), P({ type: "UpsertUiStyle", style: r }));
2690
2703
  }
2691
2704
  }
2692
- function Ai(t) {
2693
- const e = et(t), s = Qt(e);
2694
- g.clear(s), Y.delete(s), P({ type: "ClearStream", streamId: s });
2695
- }
2696
2705
  function Si(t) {
2697
- const e = Pn(t);
2706
+ const e = et(t), s = te(e);
2707
+ O.clear(s), Y.delete(s), P({ type: "ClearStream", streamId: s });
2708
+ }
2709
+ async function yi(t) {
2710
+ const e = await Fn(t);
2698
2711
  if (!(!e.StyleIds || e.StyleIds.length === 0))
2699
2712
  for (const s of e.StyleIds)
2700
2713
  H.delete(s) && P({ type: "RemoveUiStyle", styleId: s });
2701
2714
  }
2702
- function di(t) {
2715
+ async function wi(t) {
2703
2716
  const e = new Uint8Array(t);
2704
2717
  z += e.byteLength;
2705
2718
  const s = e;
2706
- switch (Zt(s)) {
2707
- case O.CORE_GLOBAL_STATE:
2708
- hi(s), R++;
2719
+ switch (se(s)) {
2720
+ case g.CORE_GLOBAL_STATE:
2721
+ await Ti(s), R++;
2709
2722
  return;
2710
- case O.UI_UPDATE:
2723
+ case g.UI_UPDATE:
2711
2724
  try {
2712
- ui(s);
2725
+ await Ai(s);
2713
2726
  } catch (n) {
2714
2727
  return n instanceof D, void 0;
2715
2728
  } finally {
2716
2729
  R++;
2717
2730
  }
2718
2731
  return;
2719
- case O.UI_STYLES:
2720
- Ti(s), R++;
2732
+ case g.UI_STYLES:
2733
+ await Ni(s), R++;
2721
2734
  return;
2722
- case O.UI_STYLES_BATCH:
2723
- Ni(s), R++;
2735
+ case g.UI_STYLES_BATCH:
2736
+ await di(s), R++;
2724
2737
  return;
2725
- case O.UI_STYLES_DELETE:
2726
- Si(s), R++;
2738
+ case g.UI_STYLES_DELETE:
2739
+ await yi(s), R++;
2727
2740
  return;
2728
- case O.ACTION_UI_CLEAR_STREAM:
2729
- Ai(s), R++;
2741
+ case g.ACTION_UI_CLEAR_STREAM:
2742
+ Si(s), R++;
2730
2743
  return;
2731
2744
  default:
2732
2745
  return;
@@ -2735,12 +2748,13 @@ function di(t) {
2735
2748
  self.addEventListener("message", (t) => {
2736
2749
  const e = t.data;
2737
2750
  if (e.type === "configure") {
2738
- typeof e.flushIntervalMs == "number" && Number.isFinite(e.flushIntervalMs) && e.flushIntervalMs >= 0 && (Wt = e.flushIntervalMs), typeof e.maxLatencyMs == "number" && Number.isFinite(e.maxLatencyMs) && e.maxLatencyMs >= 0 && (Jt = e.maxLatencyMs);
2751
+ typeof e.flushIntervalMs == "number" && Number.isFinite(e.flushIntervalMs) && e.flushIntervalMs >= 0 && (qt = e.flushIntervalMs), typeof e.maxLatencyMs == "number" && Number.isFinite(e.maxLatencyMs) && e.maxLatencyMs >= 0 && (Qt = e.maxLatencyMs);
2739
2752
  return;
2740
2753
  }
2741
2754
  if (e.type === "clear") {
2742
2755
  V = [], Y.clear();
2743
2756
  return;
2744
2757
  }
2745
- e.type === "protocol" && di(e.message);
2758
+ e.type === "protocol" && wi(e.message).catch(() => {
2759
+ });
2746
2760
  });