@nil-/xit 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/assets/index.js CHANGED
@@ -2,7 +2,7 @@ var U = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
4
  var L = (t, e, r) => e.has(t) || U("Cannot " + r);
5
- var w = (t, e, r) => (L(t, e, "read from private field"), r ? r.call(t) : e.get(t)), D = (t, e, r) => e.has(t) ? U("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), k = (t, e, r, s) => (L(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r), j = (t, e, r) => (L(t, e, "access private method"), r);
5
+ var w = (t, e, r) => (L(t, e, "read from private field"), r ? r.call(t) : e.get(t)), B = (t, e, r) => e.has(t) ? U("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), T = (t, e, r, s) => (L(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r), j = (t, e, r) => (L(t, e, "access private method"), r);
6
6
  const PUBLIC_VERSION = "5";
7
7
  typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(PUBLIC_VERSION);
8
8
  const TEMPLATE_USE_IMPORT_NODE = 2, DEV = !1;
@@ -32,9 +32,6 @@ function effect_update_depth_exceeded() {
32
32
  function state_unsafe_local_read() {
33
33
  throw new Error("state_unsafe_local_read");
34
34
  }
35
- function state_unsafe_mutation() {
36
- throw new Error("state_unsafe_mutation");
37
- }
38
35
  function source(t) {
39
36
  return {
40
37
  f: 0,
@@ -46,21 +43,19 @@ function source(t) {
46
43
  };
47
44
  }
48
45
  // @__NO_SIDE_EFFECTS__
49
- function mutable_source(t) {
50
- var r;
51
- const e = source(t);
52
- return e.equals = safe_equals, component_context !== null && component_context.l !== null && ((r = component_context.l).s ?? (r.s = [])).push(e), e;
46
+ function mutable_source(t, e = !1) {
47
+ var s;
48
+ const r = source(t);
49
+ return e || (r.equals = safe_equals), component_context !== null && component_context.l !== null && ((s = component_context.l).s ?? (s.s = [])).push(r), r;
53
50
  }
54
- function set(t, e) {
55
- return active_reaction !== null && is_runes() && active_reaction.f & DERIVED && // If the source was created locally within the current derived, then
56
- // we allow the mutation.
57
- (derived_sources === null || !derived_sources.includes(t)) && state_unsafe_mutation(), t.equals(e) || (t.v = e, t.version = increment_version(), mark_reactions(t, DIRTY), is_runes() && active_effect !== null && active_effect.f & CLEAN && !(active_effect.f & BRANCH_EFFECT) && (new_deps !== null && new_deps.includes(t) ? (set_signal_status(active_effect, DIRTY), schedule_effect(active_effect)) : untracked_writes === null ? set_untracked_writes([t]) : untracked_writes.push(t))), e;
51
+ function internal_set(t, e) {
52
+ return t.equals(e) || (t.v = e, t.version = increment_version(), mark_reactions(t, DIRTY), is_runes() && active_effect !== null && active_effect.f & CLEAN && !(active_effect.f & BRANCH_EFFECT) && (new_deps !== null && new_deps.includes(t) ? (set_signal_status(active_effect, DIRTY), schedule_effect(active_effect)) : untracked_writes === null ? set_untracked_writes([t]) : untracked_writes.push(t))), e;
58
53
  }
59
54
  function mark_reactions(t, e) {
60
55
  var r = t.reactions;
61
56
  if (r !== null)
62
- for (var s = is_runes(), o = r.length, u = 0; u < o; u++) {
63
- var n = r[u], a = n.f;
57
+ for (var s = is_runes(), u = r.length, o = 0; o < u; o++) {
58
+ var n = r[o], a = n.f;
64
59
  a & DIRTY || !s && n === active_effect || (set_signal_status(n, e), a & (CLEAN | UNOWNED) && (a & DERIVED ? mark_reactions(
65
60
  /** @type {Derived} */
66
61
  n,
@@ -71,14 +66,76 @@ function mark_reactions(t, e) {
71
66
  )));
72
67
  }
73
68
  }
69
+ // @__NO_SIDE_EFFECTS__
70
+ function derived(t) {
71
+ var e = DERIVED | DIRTY;
72
+ active_effect === null ? e |= UNOWNED : active_effect.f |= EFFECT_HAS_DERIVED;
73
+ const r = {
74
+ children: null,
75
+ ctx: component_context,
76
+ deps: null,
77
+ equals,
78
+ f: e,
79
+ fn: t,
80
+ reactions: null,
81
+ v: (
82
+ /** @type {V} */
83
+ null
84
+ ),
85
+ version: 0,
86
+ parent: active_effect
87
+ };
88
+ if (active_reaction !== null && active_reaction.f & DERIVED) {
89
+ var s = (
90
+ /** @type {Derived} */
91
+ active_reaction
92
+ );
93
+ (s.children ?? (s.children = [])).push(r);
94
+ }
95
+ return r;
96
+ }
97
+ function destroy_derived_children(t) {
98
+ var e = t.children;
99
+ if (e !== null) {
100
+ t.children = null;
101
+ for (var r = 0; r < e.length; r += 1) {
102
+ var s = e[r];
103
+ s.f & DERIVED ? destroy_derived(
104
+ /** @type {Derived} */
105
+ s
106
+ ) : destroy_effect(
107
+ /** @type {Effect} */
108
+ s
109
+ );
110
+ }
111
+ }
112
+ }
113
+ function execute_derived(t) {
114
+ var e, r = active_effect;
115
+ set_active_effect(t.parent);
116
+ try {
117
+ destroy_derived_children(t), e = update_reaction(t);
118
+ } finally {
119
+ set_active_effect(r);
120
+ }
121
+ return e;
122
+ }
123
+ function update_derived(t) {
124
+ var e = execute_derived(t), r = (skip_reaction || t.f & UNOWNED) && t.deps !== null ? MAYBE_DIRTY : CLEAN;
125
+ set_signal_status(t, r), t.equals(e) || (t.v = e, t.version = increment_version());
126
+ }
127
+ function destroy_derived(t) {
128
+ destroy_derived_children(t), remove_reactions(t, 0), set_signal_status(t, DESTROYED), t.v = t.children = t.deps = t.ctx = t.reactions = null;
129
+ }
74
130
  function push_effect(t, e) {
75
131
  var r = e.last;
76
132
  r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
77
133
  }
78
134
  function create_effect(t, e, r, s = !0) {
79
- var o = (t & ROOT_EFFECT) !== 0, u = active_effect, n = {
135
+ var u = (t & ROOT_EFFECT) !== 0, o = active_effect, n = {
80
136
  ctx: component_context,
81
137
  deps: null,
138
+ deriveds: null,
82
139
  nodes_start: null,
83
140
  nodes_end: null,
84
141
  f: t | DIRTY,
@@ -86,7 +143,7 @@ function create_effect(t, e, r, s = !0) {
86
143
  fn: e,
87
144
  last: null,
88
145
  next: null,
89
- parent: o ? null : u,
146
+ parent: u ? null : o,
90
147
  prev: null,
91
148
  teardown: null,
92
149
  transitions: null,
@@ -96,14 +153,14 @@ function create_effect(t, e, r, s = !0) {
96
153
  var a = is_flushing_effect;
97
154
  try {
98
155
  set_is_flushing_effect(!0), update_effect(n), n.f |= EFFECT_RAN;
99
- } catch (l) {
100
- throw destroy_effect(n), l;
156
+ } catch (c) {
157
+ throw destroy_effect(n), c;
101
158
  } finally {
102
159
  set_is_flushing_effect(a);
103
160
  }
104
161
  } else e !== null && schedule_effect(n);
105
162
  var f = r && n.deps === null && n.first === null && n.nodes_start === null && n.teardown === null && (n.f & EFFECT_HAS_DERIVED) === 0;
106
- if (!f && !o && s && (u !== null && push_effect(n, u), active_reaction !== null && active_reaction.f & DERIVED)) {
163
+ if (!f && !u && s && (o !== null && push_effect(n, o), active_reaction !== null && active_reaction.f & DERIVED)) {
107
164
  var i = (
108
165
  /** @type {Derived} */
109
166
  active_reaction
@@ -121,11 +178,8 @@ function effect_root(t) {
121
178
  function effect(t) {
122
179
  return create_effect(EFFECT, t, !1);
123
180
  }
124
- function render_effect(t) {
125
- return create_effect(RENDER_EFFECT, t, !0);
126
- }
127
181
  function template_effect(t) {
128
- return render_effect(t);
182
+ return block(t);
129
183
  }
130
184
  function block(t, e = 0) {
131
185
  return create_effect(RENDER_EFFECT | BLOCK_EFFECT | e, t, !0);
@@ -145,19 +199,40 @@ function execute_effect_teardown(t) {
145
199
  }
146
200
  }
147
201
  }
202
+ function destroy_effect_deriveds(t) {
203
+ var e = t.deriveds;
204
+ if (e !== null) {
205
+ t.deriveds = null;
206
+ for (var r = 0; r < e.length; r += 1)
207
+ destroy_derived(e[r]);
208
+ }
209
+ }
210
+ function destroy_effect_children(t, e = !1) {
211
+ var r = t.first;
212
+ for (t.first = t.last = null; r !== null; ) {
213
+ var s = r.next;
214
+ destroy_effect(r, e), r = s;
215
+ }
216
+ }
217
+ function destroy_block_effect_children(t) {
218
+ for (var e = t.first; e !== null; ) {
219
+ var r = e.next;
220
+ e.f & BRANCH_EFFECT || destroy_effect(e), e = r;
221
+ }
222
+ }
148
223
  function destroy_effect(t, e = !0) {
149
224
  var r = !1;
150
225
  if ((e || t.f & HEAD_EFFECT) && t.nodes_start !== null) {
151
- for (var s = t.nodes_start, o = t.nodes_end; s !== null; ) {
152
- var u = s === o ? null : (
226
+ for (var s = t.nodes_start, u = t.nodes_end; s !== null; ) {
227
+ var o = s === u ? null : (
153
228
  /** @type {TemplateNode} */
154
229
  /* @__PURE__ */ get_next_sibling(s)
155
230
  );
156
- s.remove(), s = u;
231
+ s.remove(), s = o;
157
232
  }
158
233
  r = !0;
159
234
  }
160
- destroy_effect_children(t, e && !r), remove_reactions(t, 0), set_signal_status(t, DESTROYED);
235
+ destroy_effect_deriveds(t), destroy_effect_children(t, e && !r), remove_reactions(t, 0), set_signal_status(t, DESTROYED);
161
236
  var n = t.transitions;
162
237
  if (n !== null)
163
238
  for (const f of n)
@@ -180,8 +255,8 @@ function run_out_transitions(t, e) {
180
255
  var r = t.length;
181
256
  if (r > 0) {
182
257
  var s = () => --r || e();
183
- for (var o of t)
184
- o.out(s);
258
+ for (var u of t)
259
+ u.out(s);
185
260
  } else
186
261
  e();
187
262
  }
@@ -191,8 +266,8 @@ function pause_children(t, e, r) {
191
266
  for (const n of t.transitions)
192
267
  (n.is_global || r) && e.push(n);
193
268
  for (var s = t.first; s !== null; ) {
194
- var o = s.next, u = (s.f & EFFECT_TRANSPARENT) !== 0 || (s.f & BRANCH_EFFECT) !== 0;
195
- pause_children(s, e, u ? r : !1), s = o;
269
+ var u = s.next, o = (s.f & EFFECT_TRANSPARENT) !== 0 || (s.f & BRANCH_EFFECT) !== 0;
270
+ pause_children(s, e, o ? r : !1), s = u;
196
271
  }
197
272
  }
198
273
  }
@@ -203,12 +278,12 @@ function resume_children(t, e) {
203
278
  if (t.f & INERT) {
204
279
  t.f ^= INERT, check_dirtiness(t) && update_effect(t);
205
280
  for (var r = t.first; r !== null; ) {
206
- var s = r.next, o = (r.f & EFFECT_TRANSPARENT) !== 0 || (r.f & BRANCH_EFFECT) !== 0;
207
- resume_children(r, o ? e : !1), r = s;
281
+ var s = r.next, u = (r.f & EFFECT_TRANSPARENT) !== 0 || (r.f & BRANCH_EFFECT) !== 0;
282
+ resume_children(r, u ? e : !1), r = s;
208
283
  }
209
284
  if (t.transitions !== null)
210
- for (const u of t.transitions)
211
- (u.is_global || e) && u.in();
285
+ for (const o of t.transitions)
286
+ (o.is_global || e) && o.in();
212
287
  }
213
288
  }
214
289
  let is_micro_task_queued$1 = !1, current_queued_micro_tasks = [];
@@ -223,64 +298,6 @@ function queue_micro_task(t) {
223
298
  function flush_tasks() {
224
299
  is_micro_task_queued$1 && process_micro_tasks();
225
300
  }
226
- // @__NO_SIDE_EFFECTS__
227
- function derived(t) {
228
- let e = DERIVED | DIRTY;
229
- active_effect === null ? e |= UNOWNED : active_effect.f |= EFFECT_HAS_DERIVED;
230
- const r = {
231
- children: null,
232
- deps: null,
233
- equals,
234
- f: e,
235
- fn: t,
236
- reactions: null,
237
- v: (
238
- /** @type {V} */
239
- null
240
- ),
241
- version: 0,
242
- parent: active_effect
243
- };
244
- if (active_reaction !== null && active_reaction.f & DERIVED) {
245
- var s = (
246
- /** @type {Derived} */
247
- active_reaction
248
- );
249
- (s.children ?? (s.children = [])).push(r);
250
- }
251
- return r;
252
- }
253
- function destroy_derived_children(t) {
254
- var e = t.children;
255
- if (e !== null) {
256
- t.children = null;
257
- for (var r = 0; r < e.length; r += 1) {
258
- var s = e[r];
259
- s.f & DERIVED ? destroy_derived(
260
- /** @type {Derived} */
261
- s
262
- ) : destroy_effect(
263
- /** @type {Effect} */
264
- s
265
- );
266
- }
267
- }
268
- }
269
- function update_derived(t) {
270
- var e, r = active_effect;
271
- set_active_effect(t.parent);
272
- try {
273
- destroy_derived_children(t), e = update_reaction(t);
274
- } finally {
275
- set_active_effect(r);
276
- }
277
- var s = (skip_reaction || t.f & UNOWNED) && t.deps !== null ? MAYBE_DIRTY : CLEAN;
278
- set_signal_status(t, s), t.equals(e) || (t.v = e, t.version = increment_version());
279
- }
280
- function destroy_derived(t) {
281
- destroy_derived_children(t), remove_reactions(t, 0), set_signal_status(t, DESTROYED), t.children = t.deps = t.reactions = // @ts-expect-error `signal.fn` cannot be `null` while the signal is alive
282
- t.fn = null;
283
- }
284
301
  const FLUSH_MICROTASK = 0, FLUSH_SYNC = 1;
285
302
  let scheduler_mode = FLUSH_MICROTASK, is_micro_task_queued = !1, is_flushing_effect = !1;
286
303
  function set_is_flushing_effect(t) {
@@ -316,21 +333,21 @@ function check_dirtiness(t) {
316
333
  if (e & MAYBE_DIRTY) {
317
334
  var r = t.deps, s = (e & UNOWNED) !== 0;
318
335
  if (r !== null) {
319
- var o;
336
+ var u;
320
337
  if (e & DISCONNECTED) {
321
- for (o = 0; o < r.length; o++)
322
- ((n = r[o]).reactions ?? (n.reactions = [])).push(t);
338
+ for (u = 0; u < r.length; u++)
339
+ ((n = r[u]).reactions ?? (n.reactions = [])).push(t);
323
340
  t.f ^= DISCONNECTED;
324
341
  }
325
- for (o = 0; o < r.length; o++) {
326
- var u = r[o];
342
+ for (u = 0; u < r.length; u++) {
343
+ var o = r[u];
327
344
  if (check_dirtiness(
328
345
  /** @type {Derived} */
329
- u
346
+ o
330
347
  ) && update_derived(
331
348
  /** @type {Derived} */
332
- u
333
- ), s && active_effect !== null && !skip_reaction && !((a = u == null ? void 0 : u.reactions) != null && a.includes(t)) && (u.reactions ?? (u.reactions = [])).push(t), u.version > t.version)
349
+ o
350
+ ), s && active_effect !== null && !skip_reaction && !((a = o == null ? void 0 : o.reactions) != null && a.includes(t)) && (o.reactions ?? (o.reactions = [])).push(t), o.version > t.version)
334
351
  return !0;
335
352
  }
336
353
  }
@@ -342,29 +359,29 @@ function handle_error(t, e, r) {
342
359
  throw t;
343
360
  }
344
361
  function update_reaction(t) {
345
- var l;
346
- var e = new_deps, r = skipped_deps, s = untracked_writes, o = active_reaction, u = skip_reaction, n = derived_sources;
362
+ var d;
363
+ var e = new_deps, r = skipped_deps, s = untracked_writes, u = active_reaction, o = skip_reaction, n = derived_sources, a = component_context, f = t.f;
347
364
  new_deps = /** @type {null | Value[]} */
348
- null, skipped_deps = 0, untracked_writes = null, active_reaction = t.f & (BRANCH_EFFECT | ROOT_EFFECT) ? null : t, skip_reaction = !is_flushing_effect && (t.f & UNOWNED) !== 0, derived_sources = null;
365
+ null, skipped_deps = 0, untracked_writes = null, active_reaction = f & (BRANCH_EFFECT | ROOT_EFFECT) ? null : t, skip_reaction = !is_flushing_effect && (f & UNOWNED) !== 0, derived_sources = null, component_context = t.ctx;
349
366
  try {
350
- var a = (
367
+ var i = (
351
368
  /** @type {Function} */
352
369
  (0, t.fn)()
353
- ), f = t.deps;
370
+ ), c = t.deps;
354
371
  if (new_deps !== null) {
355
- var i;
356
- if (remove_reactions(t, skipped_deps), f !== null && skipped_deps > 0)
357
- for (f.length = skipped_deps + new_deps.length, i = 0; i < new_deps.length; i++)
358
- f[skipped_deps + i] = new_deps[i];
372
+ var l;
373
+ if (remove_reactions(t, skipped_deps), c !== null && skipped_deps > 0)
374
+ for (c.length = skipped_deps + new_deps.length, l = 0; l < new_deps.length; l++)
375
+ c[skipped_deps + l] = new_deps[l];
359
376
  else
360
- t.deps = f = new_deps;
377
+ t.deps = c = new_deps;
361
378
  if (!skip_reaction)
362
- for (i = skipped_deps; i < f.length; i++)
363
- ((l = f[i]).reactions ?? (l.reactions = [])).push(t);
364
- } else f !== null && skipped_deps < f.length && (remove_reactions(t, skipped_deps), f.length = skipped_deps);
365
- return a;
379
+ for (l = skipped_deps; l < c.length; l++)
380
+ ((d = c[l]).reactions ?? (d.reactions = [])).push(t);
381
+ } else c !== null && skipped_deps < c.length && (remove_reactions(t, skipped_deps), c.length = skipped_deps);
382
+ return i;
366
383
  } finally {
367
- new_deps = e, skipped_deps = r, untracked_writes = s, active_reaction = o, skip_reaction = u, derived_sources = n;
384
+ new_deps = e, skipped_deps = r, untracked_writes = s, active_reaction = u, skip_reaction = o, derived_sources = n, component_context = a;
368
385
  }
369
386
  }
370
387
  function remove_reaction(t, e) {
@@ -372,8 +389,8 @@ function remove_reaction(t, e) {
372
389
  if (r !== null) {
373
390
  var s = r.indexOf(t);
374
391
  if (s !== -1) {
375
- var o = r.length - 1;
376
- o === 0 ? r = e.reactions = null : (r[s] = r[o], r.pop());
392
+ var u = r.length - 1;
393
+ u === 0 ? r = e.reactions = null : (r[s] = r[u], r.pop());
377
394
  }
378
395
  }
379
396
  r === null && e.f & DERIVED && // Destroying a child effect while updating a parent effect can cause a dependency to appear
@@ -391,30 +408,23 @@ function remove_reactions(t, e) {
391
408
  for (var s = e; s < r.length; s++)
392
409
  remove_reaction(t, r[s]);
393
410
  }
394
- function destroy_effect_children(t, e = !1) {
395
- var r = t.first;
396
- for (t.first = t.last = null; r !== null; ) {
397
- var s = r.next;
398
- destroy_effect(r, e), r = s;
399
- }
400
- }
401
411
  function update_effect(t) {
402
412
  var e = t.f;
403
413
  if (!(e & DESTROYED)) {
404
414
  set_signal_status(t, CLEAN);
405
- var r = active_effect, s = component_context;
406
- active_effect = t, component_context = t.ctx;
415
+ var r = active_effect;
416
+ active_effect = t;
407
417
  try {
408
- e & BLOCK_EFFECT || destroy_effect_children(t), execute_effect_teardown(t);
409
- var o = update_reaction(t);
410
- t.teardown = typeof o == "function" ? o : null, t.version = current_version;
418
+ destroy_effect_deriveds(t), e & BLOCK_EFFECT ? destroy_block_effect_children(t) : destroy_effect_children(t), execute_effect_teardown(t);
419
+ var s = update_reaction(t);
420
+ t.teardown = typeof s == "function" ? s : null, t.version = current_version;
411
421
  } catch (u) {
412
422
  handle_error(
413
423
  /** @type {Error} */
414
424
  u
415
425
  );
416
426
  } finally {
417
- active_effect = r, component_context = s;
427
+ active_effect = r;
418
428
  }
419
429
  }
420
430
  }
@@ -429,10 +439,10 @@ function flush_queued_root_effects(t) {
429
439
  is_flushing_effect = !0;
430
440
  try {
431
441
  for (var s = 0; s < e; s++) {
432
- var o = t[s];
433
- o.f & CLEAN || (o.f ^= CLEAN);
434
- var u = [];
435
- process_effects(o, u), flush_queued_effects(u);
442
+ var u = t[s];
443
+ u.f & CLEAN || (u.f ^= CLEAN);
444
+ var o = [];
445
+ process_effects(u, o), flush_queued_effects(o);
436
446
  }
437
447
  } finally {
438
448
  is_flushing_effect = r;
@@ -468,64 +478,74 @@ function schedule_effect(t) {
468
478
  function process_effects(t, e) {
469
479
  var r = t.first, s = [];
470
480
  e: for (; r !== null; ) {
471
- var o = r.f, u = (o & BRANCH_EFFECT) !== 0, n = u && (o & CLEAN) !== 0;
472
- if (!n && !(o & INERT))
473
- if (o & RENDER_EFFECT) {
474
- u ? r.f ^= CLEAN : check_dirtiness(r) && update_effect(r);
481
+ var u = r.f, o = (u & BRANCH_EFFECT) !== 0, n = o && (u & CLEAN) !== 0;
482
+ if (!n && !(u & INERT))
483
+ if (u & RENDER_EFFECT) {
484
+ o ? r.f ^= CLEAN : check_dirtiness(r) && update_effect(r);
475
485
  var a = r.first;
476
486
  if (a !== null) {
477
487
  r = a;
478
488
  continue;
479
489
  }
480
- } else o & EFFECT && s.push(r);
490
+ } else u & EFFECT && s.push(r);
481
491
  var f = r.next;
482
492
  if (f === null) {
483
- let c = r.parent;
484
- for (; c !== null; ) {
485
- if (t === c)
493
+ let l = r.parent;
494
+ for (; l !== null; ) {
495
+ if (t === l)
486
496
  break e;
487
- var i = c.next;
497
+ var i = l.next;
488
498
  if (i !== null) {
489
499
  r = i;
490
500
  continue e;
491
501
  }
492
- c = c.parent;
502
+ l = l.parent;
493
503
  }
494
504
  }
495
505
  r = f;
496
506
  }
497
- for (var l = 0; l < s.length; l++)
498
- a = s[l], e.push(a), process_effects(a, e);
507
+ for (var c = 0; c < s.length; c++)
508
+ a = s[c], e.push(a), process_effects(a, e);
499
509
  }
500
510
  function flush_sync(t) {
501
511
  var e = scheduler_mode, r = queued_root_effects;
502
512
  try {
503
513
  infinite_loop_guard();
504
- const o = [];
505
- scheduler_mode = FLUSH_SYNC, queued_root_effects = o, is_micro_task_queued = !1, flush_queued_root_effects(r);
514
+ const u = [];
515
+ scheduler_mode = FLUSH_SYNC, queued_root_effects = u, is_micro_task_queued = !1, flush_queued_root_effects(r);
506
516
  var s = t == null ? void 0 : t();
507
- return flush_tasks(), (queued_root_effects.length > 0 || o.length > 0) && flush_sync(), flush_count = 0, s;
517
+ return flush_tasks(), (queued_root_effects.length > 0 || u.length > 0) && flush_sync(), flush_count = 0, s;
508
518
  } finally {
509
519
  scheduler_mode = e, queued_root_effects = r;
510
520
  }
511
521
  }
512
522
  function get$1(t) {
513
- var e = t.f;
514
- if (e & DESTROYED)
515
- return t.v;
523
+ var a;
524
+ var e = t.f, r = (e & DERIVED) !== 0;
525
+ if (r && e & DESTROYED) {
526
+ var s = execute_derived(
527
+ /** @type {Derived} */
528
+ t
529
+ );
530
+ return destroy_derived(
531
+ /** @type {Derived} */
532
+ t
533
+ ), s;
534
+ }
516
535
  if (active_reaction !== null) {
517
536
  derived_sources !== null && derived_sources.includes(t) && state_unsafe_local_read();
518
- var r = active_reaction.deps;
519
- new_deps === null && r !== null && r[skipped_deps] === t ? skipped_deps++ : new_deps === null ? new_deps = [t] : new_deps.push(t), untracked_writes !== null && active_effect !== null && active_effect.f & CLEAN && !(active_effect.f & BRANCH_EFFECT) && untracked_writes.includes(t) && (set_signal_status(active_effect, DIRTY), schedule_effect(active_effect));
520
- }
521
- if (e & DERIVED) {
522
- var s = (
537
+ var u = active_reaction.deps;
538
+ new_deps === null && u !== null && u[skipped_deps] === t ? skipped_deps++ : new_deps === null ? new_deps = [t] : new_deps.push(t), untracked_writes !== null && active_effect !== null && active_effect.f & CLEAN && !(active_effect.f & BRANCH_EFFECT) && untracked_writes.includes(t) && (set_signal_status(active_effect, DIRTY), schedule_effect(active_effect));
539
+ } else if (r && /** @type {Derived} */
540
+ t.deps === null) {
541
+ var o = (
523
542
  /** @type {Derived} */
524
543
  t
525
- );
526
- check_dirtiness(s) && update_derived(s);
544
+ ), n = o.parent;
545
+ n !== null && !((a = n.deriveds) != null && a.includes(o)) && (n.deriveds ?? (n.deriveds = [])).push(o);
527
546
  }
528
- return t.v;
547
+ return r && (o = /** @type {Derived} */
548
+ t, check_dirtiness(o) && update_derived(o)), t.v;
529
549
  }
530
550
  function untrack(t) {
531
551
  const e = active_reaction;
@@ -563,9 +583,9 @@ function pop(t) {
563
583
  var r = active_effect, s = active_reaction;
564
584
  e.e = null;
565
585
  try {
566
- for (var o = 0; o < n.length; o++) {
567
- var u = n[o];
568
- set_active_effect(u.effect), set_active_reaction(u.reaction), effect(u.fn);
586
+ for (var u = 0; u < n.length; u++) {
587
+ var o = n[u];
588
+ set_active_effect(o.effect), set_active_reaction(o.reaction), effect(o.fn);
569
589
  }
570
590
  } finally {
571
591
  set_active_effect(r), set_active_reaction(s);
@@ -614,63 +634,65 @@ function first_child(t, e) {
614
634
  }
615
635
  const all_registered_events = /* @__PURE__ */ new Set(), root_event_handles = /* @__PURE__ */ new Set();
616
636
  function handle_event_propagation(t) {
617
- var g;
637
+ var _;
618
638
  var e = this, r = (
619
639
  /** @type {Node} */
620
640
  e.ownerDocument
621
- ), s = t.type, o = ((g = t.composedPath) == null ? void 0 : g.call(t)) || [], u = (
641
+ ), s = t.type, u = ((_ = t.composedPath) == null ? void 0 : _.call(t)) || [], o = (
622
642
  /** @type {null | Element} */
623
- o[0] || t.target
643
+ u[0] || t.target
624
644
  ), n = 0, a = t.__root;
625
645
  if (a) {
626
- var f = o.indexOf(a);
646
+ var f = u.indexOf(a);
627
647
  if (f !== -1 && (e === document || e === /** @type {any} */
628
648
  window)) {
629
649
  t.__root = e;
630
650
  return;
631
651
  }
632
- var i = o.indexOf(e);
652
+ var i = u.indexOf(e);
633
653
  if (i === -1)
634
654
  return;
635
655
  f <= i && (n = f);
636
656
  }
637
- if (u = /** @type {Element} */
638
- o[n] || t.target, u !== e) {
657
+ if (o = /** @type {Element} */
658
+ u[n] || t.target, o !== e) {
639
659
  define_property(t, "currentTarget", {
640
660
  configurable: !0,
641
661
  get() {
642
- return u || r;
662
+ return o || r;
643
663
  }
644
664
  });
665
+ var c = active_reaction, l = active_effect;
666
+ set_active_reaction(null), set_active_effect(null);
645
667
  try {
646
- for (var l, c = []; u !== null; ) {
647
- var h = u.assignedSlot || u.parentNode || /** @type {any} */
648
- u.host || null;
668
+ for (var d, h = []; o !== null; ) {
669
+ var p = o.assignedSlot || o.parentNode || /** @type {any} */
670
+ o.host || null;
649
671
  try {
650
- var d = u["__" + s];
651
- if (d !== void 0 && !/** @type {any} */
652
- u.disabled)
653
- if (is_array(d)) {
654
- var [p, ...v] = d;
655
- p.apply(u, [t, ...v]);
672
+ var v = o["__" + s];
673
+ if (v !== void 0 && !/** @type {any} */
674
+ o.disabled)
675
+ if (is_array(v)) {
676
+ var [g, ...m] = v;
677
+ g.apply(o, [t, ...m]);
656
678
  } else
657
- d.call(u, t);
658
- } catch (m) {
659
- l ? c.push(m) : l = m;
679
+ v.call(o, t);
680
+ } catch (y) {
681
+ d ? h.push(y) : d = y;
660
682
  }
661
- if (t.cancelBubble || h === e || h === null)
683
+ if (t.cancelBubble || p === e || p === null)
662
684
  break;
663
- u = h;
685
+ o = p;
664
686
  }
665
- if (l) {
666
- for (let m of c)
687
+ if (d) {
688
+ for (let y of h)
667
689
  queueMicrotask(() => {
668
- throw m;
690
+ throw y;
669
691
  });
670
- throw l;
692
+ throw d;
671
693
  }
672
694
  } finally {
673
- t.__root = e, delete t.currentTarget;
695
+ t.__root = e, delete t.currentTarget, set_active_reaction(c), set_active_effect(l);
674
696
  }
675
697
  }
676
698
  }
@@ -687,15 +709,15 @@ function assign_nodes(t, e) {
687
709
  }
688
710
  // @__NO_SIDE_EFFECTS__
689
711
  function template(t, e) {
690
- var r = (e & TEMPLATE_USE_IMPORT_NODE) !== 0, s, o = !t.startsWith("<!>");
712
+ var r = (e & TEMPLATE_USE_IMPORT_NODE) !== 0, s, u = !t.startsWith("<!>");
691
713
  return () => {
692
- s === void 0 && (s = create_fragment_from_html(o ? t : "<!>" + t), s = /** @type {Node} */
714
+ s === void 0 && (s = create_fragment_from_html(u ? t : "<!>" + t), s = /** @type {Node} */
693
715
  /* @__PURE__ */ get_first_child(s));
694
- var u = (
716
+ var o = (
695
717
  /** @type {TemplateNode} */
696
718
  r ? document.importNode(s, !0) : s.cloneNode(!0)
697
719
  );
698
- return assign_nodes(u, u), u;
720
+ return assign_nodes(o, o), o;
699
721
  };
700
722
  }
701
723
  function comment() {
@@ -713,53 +735,54 @@ function is_passive_event(t) {
713
735
  return PASSIVE_EVENTS.includes(t);
714
736
  }
715
737
  function set_text(t, e) {
716
- e !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = e, t.nodeValue = e == null ? "" : e + "");
738
+ var r = e == null ? "" : typeof e == "object" ? e + "" : e;
739
+ r !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = r, t.nodeValue = r == null ? "" : r + "");
717
740
  }
718
741
  function mount(t, e) {
719
742
  return _mount(t, e);
720
743
  }
721
744
  const document_listeners = /* @__PURE__ */ new Map();
722
- function _mount(t, { target: e, anchor: r, props: s = {}, events: o, context: u, intro: n = !0 }) {
745
+ function _mount(t, { target: e, anchor: r, props: s = {}, events: u, context: o, intro: n = !0 }) {
723
746
  init_operations();
724
- var a = /* @__PURE__ */ new Set(), f = (c) => {
725
- for (var h = 0; h < c.length; h++) {
726
- var d = c[h];
727
- if (!a.has(d)) {
728
- a.add(d);
729
- var p = is_passive_event(d);
730
- e.addEventListener(d, handle_event_propagation, { passive: p });
731
- var v = document_listeners.get(d);
732
- v === void 0 ? (document.addEventListener(d, handle_event_propagation, { passive: p }), document_listeners.set(d, 1)) : document_listeners.set(d, v + 1);
747
+ var a = /* @__PURE__ */ new Set(), f = (l) => {
748
+ for (var d = 0; d < l.length; d++) {
749
+ var h = l[d];
750
+ if (!a.has(h)) {
751
+ a.add(h);
752
+ var p = is_passive_event(h);
753
+ e.addEventListener(h, handle_event_propagation, { passive: p });
754
+ var v = document_listeners.get(h);
755
+ v === void 0 ? (document.addEventListener(h, handle_event_propagation, { passive: p }), document_listeners.set(h, 1)) : document_listeners.set(h, v + 1);
733
756
  }
734
757
  }
735
758
  };
736
759
  f(array_from(all_registered_events)), root_event_handles.add(f);
737
- var i = void 0, l = effect_root(() => {
738
- var c = r ?? e.appendChild(create_text());
760
+ var i = void 0, c = effect_root(() => {
761
+ var l = r ?? e.appendChild(create_text());
739
762
  return branch(() => {
740
- if (u) {
763
+ if (o) {
741
764
  push({});
742
- var h = (
765
+ var d = (
743
766
  /** @type {ComponentContext} */
744
767
  component_context
745
768
  );
746
- h.c = u;
769
+ d.c = o;
747
770
  }
748
- o && (s.$$events = o), i = t(c, s) || {}, u && pop();
771
+ u && (s.$$events = u), i = t(l, s) || {}, o && pop();
749
772
  }), () => {
750
773
  var p;
751
- for (var h of a) {
752
- e.removeEventListener(h, handle_event_propagation);
753
- var d = (
774
+ for (var d of a) {
775
+ e.removeEventListener(d, handle_event_propagation);
776
+ var h = (
754
777
  /** @type {number} */
755
- document_listeners.get(h)
778
+ document_listeners.get(d)
756
779
  );
757
- --d === 0 ? (document.removeEventListener(h, handle_event_propagation), document_listeners.delete(h)) : document_listeners.set(h, d);
780
+ --h === 0 ? (document.removeEventListener(d, handle_event_propagation), document_listeners.delete(d)) : document_listeners.set(d, h);
758
781
  }
759
- root_event_handles.delete(f), mounted_components.delete(i), c !== r && ((p = c.parentNode) == null || p.removeChild(c));
782
+ root_event_handles.delete(f), mounted_components.delete(i), l !== r && ((p = l.parentNode) == null || p.removeChild(l));
760
783
  };
761
784
  });
762
- return mounted_components.set(i, l), i;
785
+ return mounted_components.set(i, c), i;
763
786
  }
764
787
  let mounted_components = /* @__PURE__ */ new WeakMap();
765
788
  function unmount(t) {
@@ -767,13 +790,13 @@ function unmount(t) {
767
790
  e && e();
768
791
  }
769
792
  const PENDING = 0, THEN = 1, CATCH = 2;
770
- function await_block(t, e, r, s, o) {
771
- var u = t, n = is_runes(), a = component_context, f, i, l, c, h = (n ? source : mutable_source)(
793
+ function await_block(t, e, r, s, u) {
794
+ var o = t, n = is_runes(), a = component_context, f, i, c, l, d = (n ? source : mutable_source)(
772
795
  /** @type {V} */
773
796
  void 0
774
- ), d = (n ? source : mutable_source)(void 0), p = !1;
797
+ ), h = (n ? source : mutable_source)(void 0), p = !1;
775
798
  function v(m, _) {
776
- p = !0, _ && (set_active_effect(g), set_active_reaction(g), set_component_context(a)), m === PENDING && r && (i ? resume_effect(i) : i = branch(() => r(u))), m === THEN && s && (l ? resume_effect(l) : l = branch(() => s(u, h))), m === CATCH && o && (c ? resume_effect(c) : c = branch(() => o(u, d))), m !== PENDING && i && pause_effect(i, () => i = null), m !== THEN && l && pause_effect(l, () => l = null), m !== CATCH && c && pause_effect(c, () => c = null), _ && (set_component_context(null), set_active_reaction(null), set_active_effect(null), flush_sync());
799
+ p = !0, _ && (set_active_effect(g), set_active_reaction(g), set_component_context(a)), m === PENDING && r && (i ? resume_effect(i) : i = branch(() => r(o))), m === THEN && s && (c ? resume_effect(c) : c = branch(() => s(o, d))), m === CATCH && u && (l ? resume_effect(l) : l = branch(() => u(o, h))), m !== PENDING && i && pause_effect(i, () => i = null), m !== THEN && c && pause_effect(c, () => c = null), m !== CATCH && l && pause_effect(l, () => l = null), _ && (set_component_context(null), set_active_reaction(null), set_active_effect(null), flush_sync());
777
800
  }
778
801
  var g = block(() => {
779
802
  if (f !== (f = e())) {
@@ -781,16 +804,16 @@ function await_block(t, e, r, s, o) {
781
804
  var m = f;
782
805
  p = !1, m.then(
783
806
  (_) => {
784
- m === f && (set(h, _), v(THEN, !0));
807
+ m === f && (internal_set(d, _), v(THEN, !0));
785
808
  },
786
809
  (_) => {
787
- m === f && (set(d, _), v(CATCH, !0));
810
+ m === f && (internal_set(h, _), v(CATCH, !0));
788
811
  }
789
812
  ), queue_micro_task(() => {
790
813
  p || v(PENDING, !0);
791
814
  });
792
815
  } else
793
- set(h, f), v(THEN, !1);
816
+ internal_set(d, f), v(THEN, !1);
794
817
  return () => f = null;
795
818
  }
796
819
  });
@@ -815,80 +838,80 @@ function subscribe_to_store(t, e, r) {
815
838
  );
816
839
  return s.unsubscribe ? () => s.unsubscribe() : s;
817
840
  }
818
- var I, W, S, B, C, M, $, T, V;
841
+ var I, W, S, C, D, M, $, k, V;
819
842
  let Service$1 = (V = class {
820
843
  constructor({ host: e, port: r }) {
821
- D(this, I);
822
- D(this, S);
844
+ B(this, I);
845
+ B(this, S);
823
846
  // 0 idle, 1 has connected, 2 keep reconnecting, 3 stopped
824
- D(this, B);
825
- D(this, C);
826
- D(this, M);
827
- D(this, $);
828
- D(this, T);
829
- k(this, $, `${e ?? "localhost"}${r != null ? `:${r}` : ""}`), k(this, S, 0), k(this, B, null), k(this, C, null), k(this, M, null), k(this, T, null);
847
+ B(this, C);
848
+ B(this, D);
849
+ B(this, M);
850
+ B(this, $);
851
+ B(this, k);
852
+ T(this, $, `${e ?? "localhost"}${r != null ? `:${r}` : ""}`), T(this, S, 0), T(this, C, null), T(this, D, null), T(this, M, null), T(this, k, null);
830
853
  }
831
854
  on_message(e) {
832
- k(this, M, e);
855
+ T(this, M, e);
833
856
  }
834
857
  on_connect(e) {
835
- k(this, B, e);
858
+ T(this, C, e);
836
859
  }
837
860
  on_disconnect(e) {
838
- k(this, C, e);
861
+ T(this, D, e);
839
862
  }
840
863
  // non-blocking (run is blocking in c++)
841
864
  // calling it again should not do anything
842
865
  start() {
843
- w(this, T) == null && w(this, S) !== 1 && w(this, S) !== 3 && (k(this, T, new WebSocket(`ws://${w(this, $)}`)), w(this, T).binaryType = "arraybuffer", w(this, T).onopen = () => {
844
- k(this, S, 1), w(this, B) && w(this, B).call(this, w(this, $));
845
- }, w(this, T).onclose = () => {
846
- w(this, S) === 1 && (w(this, C) && w(this, C).call(this, w(this, $)), k(this, S, 2), j(this, I, W).call(this));
847
- }, w(this, T).onerror = () => {
848
- w(this, S) !== 1 && w(this, S) !== 3 && (k(this, S, 2), j(this, I, W).call(this));
849
- }, w(this, T).onmessage = (e) => {
866
+ w(this, k) == null && w(this, S) !== 1 && w(this, S) !== 3 && (T(this, k, new WebSocket(`ws://${w(this, $)}`)), w(this, k).binaryType = "arraybuffer", w(this, k).onopen = () => {
867
+ T(this, S, 1), w(this, C) && w(this, C).call(this, w(this, $));
868
+ }, w(this, k).onclose = () => {
869
+ w(this, S) === 1 && (w(this, D) && w(this, D).call(this, w(this, $)), T(this, S, 2), j(this, I, W).call(this));
870
+ }, w(this, k).onerror = () => {
871
+ w(this, S) !== 1 && w(this, S) !== 3 && (T(this, S, 2), j(this, I, W).call(this));
872
+ }, w(this, k).onmessage = (e) => {
850
873
  w(this, M) && w(this, M).call(this, w(this, $), new Uint8Array(e.data));
851
874
  });
852
875
  }
853
876
  stop() {
854
- k(this, S, 3), w(this, T) != null && (w(this, T).close(), k(this, T, null));
877
+ T(this, S, 3), w(this, k) != null && (w(this, k).close(), T(this, k, null));
855
878
  }
856
879
  restart() {
857
- k(this, S, 0);
880
+ T(this, S, 0);
858
881
  }
859
882
  publish(e) {
860
- w(this, T) != null && w(this, S) == 1 && w(this, T).send(e);
883
+ w(this, k) != null && w(this, S) == 1 && w(this, k).send(e);
861
884
  }
862
885
  send(e, r) {
863
886
  e === w(this, $) && this.publish(r);
864
887
  }
865
888
  }, I = new WeakSet(), W = function() {
866
- w(this, T) != null && (w(this, T).close(), k(this, T, null)), setTimeout(() => this.start(), 1e3);
867
- }, S = new WeakMap(), B = new WeakMap(), C = new WeakMap(), M = new WeakMap(), $ = new WeakMap(), T = new WeakMap(), V);
889
+ w(this, k) != null && (w(this, k).close(), T(this, k, null)), setTimeout(() => this.start(), 1e3);
890
+ }, S = new WeakMap(), C = new WeakMap(), D = new WeakMap(), M = new WeakMap(), $ = new WeakMap(), k = new WeakMap(), V);
868
891
  const header = (t) => {
869
892
  const e = new Uint8Array(4);
870
893
  return new DataView(e.buffer).setUint32(0, t, !1), e;
871
894
  }, concat = (t) => {
872
- const e = new Uint8Array(t.reduce((s, o) => s + o.length, 0));
895
+ const e = new Uint8Array(t.reduce((s, u) => s + u.length, 0));
873
896
  let r = 0;
874
897
  for (const s of t)
875
898
  e.set(s, r), r += s.length;
876
899
  return e;
877
900
  }, test_connection = async (t) => new Promise((e, r) => {
878
- const s = new Service$1(t), o = setTimeout(() => {
901
+ const s = new Service$1(t), u = setTimeout(() => {
879
902
  s.stop(), r("connection failed... stopping");
880
903
  }, 2500);
881
904
  s.on_connect(() => {
882
- console.log("connection tested... proceeding"), clearTimeout(o), s.stop(), e();
905
+ console.log("connection tested... proceeding"), clearTimeout(u), s.stop(), e();
883
906
  }), s.start();
884
- }), service_fetch = async (t, e, r) => new Promise((s, o) => {
885
- const u = new Service$1(t), n = setTimeout(() => {
886
- o("timed out, cancelled");
907
+ }), service_fetch = async (t, e, r) => new Promise((s, u) => {
908
+ const o = new Service$1(t), n = setTimeout(() => {
909
+ o.stop(), u("timed out, cancelled");
887
910
  }, 2500);
888
- u.on_connect(() => u.publish(e)), u.on_message((a, f) => {
889
- const i = new DataView(f.buffer).getUint32(0, !1), l = f.slice(4), c = r(i, l);
890
- c != null && (s(c), clearTimeout(n), u.stop());
891
- }), u.start();
911
+ o.on_connect(() => o.publish(e)), o.on_message((a, f) => {
912
+ const i = new DataView(f.buffer).getUint32(0, !1), c = f.slice(4), l = r(i, c);
913
+ l != null && (clearTimeout(n), o.stop(), s(l));
914
+ }), o.start();
892
915
  }), service_publish = (t, e) => {
893
916
  const r = new Service$1(t), s = setTimeout(() => {
894
917
  r.stop();
@@ -911,23 +934,23 @@ function getDefaultExportFromCjs(t) {
911
934
  }
912
935
  var indexLight = { exports: {} }, indexMinimal = {}, minimal = {}, aspromise = asPromise$1;
913
936
  function asPromise$1(t, e) {
914
- for (var r = new Array(arguments.length - 1), s = 0, o = 2, u = !0; o < arguments.length; )
915
- r[s++] = arguments[o++];
937
+ for (var r = new Array(arguments.length - 1), s = 0, u = 2, o = !0; u < arguments.length; )
938
+ r[s++] = arguments[u++];
916
939
  return new Promise(function(a, f) {
917
- r[s] = function(l) {
918
- if (u)
919
- if (u = !1, l)
920
- f(l);
940
+ r[s] = function(c) {
941
+ if (o)
942
+ if (o = !1, c)
943
+ f(c);
921
944
  else {
922
- for (var c = new Array(arguments.length - 1), h = 0; h < c.length; )
923
- c[h++] = arguments[h];
924
- a.apply(null, c);
945
+ for (var l = new Array(arguments.length - 1), d = 0; d < l.length; )
946
+ l[d++] = arguments[d];
947
+ a.apply(null, l);
925
948
  }
926
949
  };
927
950
  try {
928
951
  t.apply(e || null, r);
929
952
  } catch (i) {
930
- u && (u = !1, f(i));
953
+ o && (o = !1, f(i));
931
954
  }
932
955
  });
933
956
  }
@@ -942,52 +965,52 @@ var base64$1 = {};
942
965
  ++i;
943
966
  return Math.ceil(a.length * 3) / 4 - i;
944
967
  };
945
- for (var r = new Array(64), s = new Array(123), o = 0; o < 64; )
946
- s[r[o] = o < 26 ? o + 65 : o < 52 ? o + 71 : o < 62 ? o - 4 : o - 59 | 43] = o++;
968
+ for (var r = new Array(64), s = new Array(123), u = 0; u < 64; )
969
+ s[r[u] = u < 26 ? u + 65 : u < 52 ? u + 71 : u < 62 ? u - 4 : u - 59 | 43] = u++;
947
970
  e.encode = function(a, f, i) {
948
- for (var l = null, c = [], h = 0, d = 0, p; f < i; ) {
971
+ for (var c = null, l = [], d = 0, h = 0, p; f < i; ) {
949
972
  var v = a[f++];
950
- switch (d) {
973
+ switch (h) {
951
974
  case 0:
952
- c[h++] = r[v >> 2], p = (v & 3) << 4, d = 1;
975
+ l[d++] = r[v >> 2], p = (v & 3) << 4, h = 1;
953
976
  break;
954
977
  case 1:
955
- c[h++] = r[p | v >> 4], p = (v & 15) << 2, d = 2;
978
+ l[d++] = r[p | v >> 4], p = (v & 15) << 2, h = 2;
956
979
  break;
957
980
  case 2:
958
- c[h++] = r[p | v >> 6], c[h++] = r[v & 63], d = 0;
981
+ l[d++] = r[p | v >> 6], l[d++] = r[v & 63], h = 0;
959
982
  break;
960
983
  }
961
- h > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, c)), h = 0);
984
+ d > 8191 && ((c || (c = [])).push(String.fromCharCode.apply(String, l)), d = 0);
962
985
  }
963
- return d && (c[h++] = r[p], c[h++] = 61, d === 1 && (c[h++] = 61)), l ? (h && l.push(String.fromCharCode.apply(String, c.slice(0, h))), l.join("")) : String.fromCharCode.apply(String, c.slice(0, h));
986
+ return h && (l[d++] = r[p], l[d++] = 61, h === 1 && (l[d++] = 61)), c ? (d && c.push(String.fromCharCode.apply(String, l.slice(0, d))), c.join("")) : String.fromCharCode.apply(String, l.slice(0, d));
964
987
  };
965
- var u = "invalid encoding";
988
+ var o = "invalid encoding";
966
989
  e.decode = function(a, f, i) {
967
- for (var l = i, c = 0, h, d = 0; d < a.length; ) {
968
- var p = a.charCodeAt(d++);
969
- if (p === 61 && c > 1)
990
+ for (var c = i, l = 0, d, h = 0; h < a.length; ) {
991
+ var p = a.charCodeAt(h++);
992
+ if (p === 61 && l > 1)
970
993
  break;
971
994
  if ((p = s[p]) === void 0)
972
- throw Error(u);
973
- switch (c) {
995
+ throw Error(o);
996
+ switch (l) {
974
997
  case 0:
975
- h = p, c = 1;
998
+ d = p, l = 1;
976
999
  break;
977
1000
  case 1:
978
- f[i++] = h << 2 | (p & 48) >> 4, h = p, c = 2;
1001
+ f[i++] = d << 2 | (p & 48) >> 4, d = p, l = 2;
979
1002
  break;
980
1003
  case 2:
981
- f[i++] = (h & 15) << 4 | (p & 60) >> 2, h = p, c = 3;
1004
+ f[i++] = (d & 15) << 4 | (p & 60) >> 2, d = p, l = 3;
982
1005
  break;
983
1006
  case 3:
984
- f[i++] = (h & 3) << 6 | p, c = 0;
1007
+ f[i++] = (d & 3) << 6 | p, l = 0;
985
1008
  break;
986
1009
  }
987
1010
  }
988
- if (c === 1)
989
- throw Error(u);
990
- return i - l;
1011
+ if (l === 1)
1012
+ throw Error(o);
1013
+ return i - c;
991
1014
  }, e.test = function(a) {
992
1015
  return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a);
993
1016
  };
@@ -1008,17 +1031,17 @@ EventEmitter.prototype.off = function(e, r) {
1008
1031
  else if (r === void 0)
1009
1032
  this._listeners[e] = [];
1010
1033
  else
1011
- for (var s = this._listeners[e], o = 0; o < s.length; )
1012
- s[o].fn === r ? s.splice(o, 1) : ++o;
1034
+ for (var s = this._listeners[e], u = 0; u < s.length; )
1035
+ s[u].fn === r ? s.splice(u, 1) : ++u;
1013
1036
  return this;
1014
1037
  };
1015
1038
  EventEmitter.prototype.emit = function(e) {
1016
1039
  var r = this._listeners[e];
1017
1040
  if (r) {
1018
- for (var s = [], o = 1; o < arguments.length; )
1019
- s.push(arguments[o++]);
1020
- for (o = 0; o < r.length; )
1021
- r[o].fn.apply(r[o++].ctx, s);
1041
+ for (var s = [], u = 1; u < arguments.length; )
1042
+ s.push(arguments[u++]);
1043
+ for (u = 0; u < r.length; )
1044
+ r[u].fn.apply(r[u++].ctx, s);
1022
1045
  }
1023
1046
  return this;
1024
1047
  };
@@ -1026,13 +1049,13 @@ var float = factory(factory);
1026
1049
  function factory(t) {
1027
1050
  return typeof Float32Array < "u" ? function() {
1028
1051
  var e = new Float32Array([-0]), r = new Uint8Array(e.buffer), s = r[3] === 128;
1029
- function o(f, i, l) {
1030
- e[0] = f, i[l] = r[0], i[l + 1] = r[1], i[l + 2] = r[2], i[l + 3] = r[3];
1052
+ function u(f, i, c) {
1053
+ e[0] = f, i[c] = r[0], i[c + 1] = r[1], i[c + 2] = r[2], i[c + 3] = r[3];
1031
1054
  }
1032
- function u(f, i, l) {
1033
- e[0] = f, i[l] = r[3], i[l + 1] = r[2], i[l + 2] = r[1], i[l + 3] = r[0];
1055
+ function o(f, i, c) {
1056
+ e[0] = f, i[c] = r[3], i[c + 1] = r[2], i[c + 2] = r[1], i[c + 3] = r[0];
1034
1057
  }
1035
- t.writeFloatLE = s ? o : u, t.writeFloatBE = s ? u : o;
1058
+ t.writeFloatLE = s ? u : o, t.writeFloatBE = s ? o : u;
1036
1059
  function n(f, i) {
1037
1060
  return r[0] = f[i], r[1] = f[i + 1], r[2] = f[i + 2], r[3] = f[i + 3], e[0];
1038
1061
  }
@@ -1041,42 +1064,42 @@ function factory(t) {
1041
1064
  }
1042
1065
  t.readFloatLE = s ? n : a, t.readFloatBE = s ? a : n;
1043
1066
  }() : function() {
1044
- function e(s, o, u, n) {
1045
- var a = o < 0 ? 1 : 0;
1046
- if (a && (o = -o), o === 0)
1047
- s(1 / o > 0 ? (
1067
+ function e(s, u, o, n) {
1068
+ var a = u < 0 ? 1 : 0;
1069
+ if (a && (u = -u), u === 0)
1070
+ s(1 / u > 0 ? (
1048
1071
  /* positive */
1049
1072
  0
1050
1073
  ) : (
1051
1074
  /* negative 0 */
1052
1075
  2147483648
1053
- ), u, n);
1054
- else if (isNaN(o))
1055
- s(2143289344, u, n);
1056
- else if (o > 34028234663852886e22)
1057
- s((a << 31 | 2139095040) >>> 0, u, n);
1058
- else if (o < 11754943508222875e-54)
1059
- s((a << 31 | Math.round(o / 1401298464324817e-60)) >>> 0, u, n);
1076
+ ), o, n);
1077
+ else if (isNaN(u))
1078
+ s(2143289344, o, n);
1079
+ else if (u > 34028234663852886e22)
1080
+ s((a << 31 | 2139095040) >>> 0, o, n);
1081
+ else if (u < 11754943508222875e-54)
1082
+ s((a << 31 | Math.round(u / 1401298464324817e-60)) >>> 0, o, n);
1060
1083
  else {
1061
- var f = Math.floor(Math.log(o) / Math.LN2), i = Math.round(o * Math.pow(2, -f) * 8388608) & 8388607;
1062
- s((a << 31 | f + 127 << 23 | i) >>> 0, u, n);
1084
+ var f = Math.floor(Math.log(u) / Math.LN2), i = Math.round(u * Math.pow(2, -f) * 8388608) & 8388607;
1085
+ s((a << 31 | f + 127 << 23 | i) >>> 0, o, n);
1063
1086
  }
1064
1087
  }
1065
1088
  t.writeFloatLE = e.bind(null, writeUintLE), t.writeFloatBE = e.bind(null, writeUintBE);
1066
- function r(s, o, u) {
1067
- var n = s(o, u), a = (n >> 31) * 2 + 1, f = n >>> 23 & 255, i = n & 8388607;
1089
+ function r(s, u, o) {
1090
+ var n = s(u, o), a = (n >> 31) * 2 + 1, f = n >>> 23 & 255, i = n & 8388607;
1068
1091
  return f === 255 ? i ? NaN : a * (1 / 0) : f === 0 ? a * 1401298464324817e-60 * i : a * Math.pow(2, f - 150) * (i + 8388608);
1069
1092
  }
1070
1093
  t.readFloatLE = r.bind(null, readUintLE), t.readFloatBE = r.bind(null, readUintBE);
1071
1094
  }(), typeof Float64Array < "u" ? function() {
1072
1095
  var e = new Float64Array([-0]), r = new Uint8Array(e.buffer), s = r[7] === 128;
1073
- function o(f, i, l) {
1074
- e[0] = f, i[l] = r[0], i[l + 1] = r[1], i[l + 2] = r[2], i[l + 3] = r[3], i[l + 4] = r[4], i[l + 5] = r[5], i[l + 6] = r[6], i[l + 7] = r[7];
1096
+ function u(f, i, c) {
1097
+ e[0] = f, i[c] = r[0], i[c + 1] = r[1], i[c + 2] = r[2], i[c + 3] = r[3], i[c + 4] = r[4], i[c + 5] = r[5], i[c + 6] = r[6], i[c + 7] = r[7];
1075
1098
  }
1076
- function u(f, i, l) {
1077
- e[0] = f, i[l] = r[7], i[l + 1] = r[6], i[l + 2] = r[5], i[l + 3] = r[4], i[l + 4] = r[3], i[l + 5] = r[2], i[l + 6] = r[1], i[l + 7] = r[0];
1099
+ function o(f, i, c) {
1100
+ e[0] = f, i[c] = r[7], i[c + 1] = r[6], i[c + 2] = r[5], i[c + 3] = r[4], i[c + 4] = r[3], i[c + 5] = r[2], i[c + 6] = r[1], i[c + 7] = r[0];
1078
1101
  }
1079
- t.writeDoubleLE = s ? o : u, t.writeDoubleBE = s ? u : o;
1102
+ t.writeDoubleLE = s ? u : o, t.writeDoubleBE = s ? o : u;
1080
1103
  function n(f, i) {
1081
1104
  return r[0] = f[i], r[1] = f[i + 1], r[2] = f[i + 2], r[3] = f[i + 3], r[4] = f[i + 4], r[5] = f[i + 5], r[6] = f[i + 6], r[7] = f[i + 7], e[0];
1082
1105
  }
@@ -1085,34 +1108,34 @@ function factory(t) {
1085
1108
  }
1086
1109
  t.readDoubleLE = s ? n : a, t.readDoubleBE = s ? a : n;
1087
1110
  }() : function() {
1088
- function e(s, o, u, n, a, f) {
1111
+ function e(s, u, o, n, a, f) {
1089
1112
  var i = n < 0 ? 1 : 0;
1090
1113
  if (i && (n = -n), n === 0)
1091
- s(0, a, f + o), s(1 / n > 0 ? (
1114
+ s(0, a, f + u), s(1 / n > 0 ? (
1092
1115
  /* positive */
1093
1116
  0
1094
1117
  ) : (
1095
1118
  /* negative 0 */
1096
1119
  2147483648
1097
- ), a, f + u);
1120
+ ), a, f + o);
1098
1121
  else if (isNaN(n))
1099
- s(0, a, f + o), s(2146959360, a, f + u);
1122
+ s(0, a, f + u), s(2146959360, a, f + o);
1100
1123
  else if (n > 17976931348623157e292)
1101
- s(0, a, f + o), s((i << 31 | 2146435072) >>> 0, a, f + u);
1124
+ s(0, a, f + u), s((i << 31 | 2146435072) >>> 0, a, f + o);
1102
1125
  else {
1103
- var l;
1126
+ var c;
1104
1127
  if (n < 22250738585072014e-324)
1105
- l = n / 5e-324, s(l >>> 0, a, f + o), s((i << 31 | l / 4294967296) >>> 0, a, f + u);
1128
+ c = n / 5e-324, s(c >>> 0, a, f + u), s((i << 31 | c / 4294967296) >>> 0, a, f + o);
1106
1129
  else {
1107
- var c = Math.floor(Math.log(n) / Math.LN2);
1108
- c === 1024 && (c = 1023), l = n * Math.pow(2, -c), s(l * 4503599627370496 >>> 0, a, f + o), s((i << 31 | c + 1023 << 20 | l * 1048576 & 1048575) >>> 0, a, f + u);
1130
+ var l = Math.floor(Math.log(n) / Math.LN2);
1131
+ l === 1024 && (l = 1023), c = n * Math.pow(2, -l), s(c * 4503599627370496 >>> 0, a, f + u), s((i << 31 | l + 1023 << 20 | c * 1048576 & 1048575) >>> 0, a, f + o);
1109
1132
  }
1110
1133
  }
1111
1134
  }
1112
1135
  t.writeDoubleLE = e.bind(null, writeUintLE, 0, 4), t.writeDoubleBE = e.bind(null, writeUintBE, 4, 0);
1113
- function r(s, o, u, n, a) {
1114
- var f = s(n, a + o), i = s(n, a + u), l = (i >> 31) * 2 + 1, c = i >>> 20 & 2047, h = 4294967296 * (i & 1048575) + f;
1115
- return c === 2047 ? h ? NaN : l * (1 / 0) : c === 0 ? l * 5e-324 * h : l * Math.pow(2, c - 1075) * (h + 4503599627370496);
1136
+ function r(s, u, o, n, a) {
1137
+ var f = s(n, a + u), i = s(n, a + o), c = (i >> 31) * 2 + 1, l = i >>> 20 & 2047, d = 4294967296 * (i & 1048575) + f;
1138
+ return l === 2047 ? d ? NaN : c * (1 / 0) : l === 0 ? c * 5e-324 * d : c * Math.pow(2, l - 1075) * (d + 4503599627370496);
1116
1139
  }
1117
1140
  t.readDoubleLE = r.bind(null, readUintLE, 0, 4), t.readDoubleBE = r.bind(null, readUintBE, 4, 0);
1118
1141
  }(), t;
@@ -1143,30 +1166,30 @@ var utf8$2 = {};
1143
1166
  (function(t) {
1144
1167
  var e = t;
1145
1168
  e.length = function(s) {
1146
- for (var o = 0, u = 0, n = 0; n < s.length; ++n)
1147
- u = s.charCodeAt(n), u < 128 ? o += 1 : u < 2048 ? o += 2 : (u & 64512) === 55296 && (s.charCodeAt(n + 1) & 64512) === 56320 ? (++n, o += 4) : o += 3;
1148
- return o;
1149
- }, e.read = function(s, o, u) {
1150
- var n = u - o;
1169
+ for (var u = 0, o = 0, n = 0; n < s.length; ++n)
1170
+ o = s.charCodeAt(n), o < 128 ? u += 1 : o < 2048 ? u += 2 : (o & 64512) === 55296 && (s.charCodeAt(n + 1) & 64512) === 56320 ? (++n, u += 4) : u += 3;
1171
+ return u;
1172
+ }, e.read = function(s, u, o) {
1173
+ var n = o - u;
1151
1174
  if (n < 1)
1152
1175
  return "";
1153
- for (var a = null, f = [], i = 0, l; o < u; )
1154
- l = s[o++], l < 128 ? f[i++] = l : l > 191 && l < 224 ? f[i++] = (l & 31) << 6 | s[o++] & 63 : l > 239 && l < 365 ? (l = ((l & 7) << 18 | (s[o++] & 63) << 12 | (s[o++] & 63) << 6 | s[o++] & 63) - 65536, f[i++] = 55296 + (l >> 10), f[i++] = 56320 + (l & 1023)) : f[i++] = (l & 15) << 12 | (s[o++] & 63) << 6 | s[o++] & 63, i > 8191 && ((a || (a = [])).push(String.fromCharCode.apply(String, f)), i = 0);
1176
+ for (var a = null, f = [], i = 0, c; u < o; )
1177
+ c = s[u++], c < 128 ? f[i++] = c : c > 191 && c < 224 ? f[i++] = (c & 31) << 6 | s[u++] & 63 : c > 239 && c < 365 ? (c = ((c & 7) << 18 | (s[u++] & 63) << 12 | (s[u++] & 63) << 6 | s[u++] & 63) - 65536, f[i++] = 55296 + (c >> 10), f[i++] = 56320 + (c & 1023)) : f[i++] = (c & 15) << 12 | (s[u++] & 63) << 6 | s[u++] & 63, i > 8191 && ((a || (a = [])).push(String.fromCharCode.apply(String, f)), i = 0);
1155
1178
  return a ? (i && a.push(String.fromCharCode.apply(String, f.slice(0, i))), a.join("")) : String.fromCharCode.apply(String, f.slice(0, i));
1156
- }, e.write = function(s, o, u) {
1157
- for (var n = u, a, f, i = 0; i < s.length; ++i)
1158
- a = s.charCodeAt(i), a < 128 ? o[u++] = a : a < 2048 ? (o[u++] = a >> 6 | 192, o[u++] = a & 63 | 128) : (a & 64512) === 55296 && ((f = s.charCodeAt(i + 1)) & 64512) === 56320 ? (a = 65536 + ((a & 1023) << 10) + (f & 1023), ++i, o[u++] = a >> 18 | 240, o[u++] = a >> 12 & 63 | 128, o[u++] = a >> 6 & 63 | 128, o[u++] = a & 63 | 128) : (o[u++] = a >> 12 | 224, o[u++] = a >> 6 & 63 | 128, o[u++] = a & 63 | 128);
1159
- return u - n;
1179
+ }, e.write = function(s, u, o) {
1180
+ for (var n = o, a, f, i = 0; i < s.length; ++i)
1181
+ a = s.charCodeAt(i), a < 128 ? u[o++] = a : a < 2048 ? (u[o++] = a >> 6 | 192, u[o++] = a & 63 | 128) : (a & 64512) === 55296 && ((f = s.charCodeAt(i + 1)) & 64512) === 56320 ? (a = 65536 + ((a & 1023) << 10) + (f & 1023), ++i, u[o++] = a >> 18 | 240, u[o++] = a >> 12 & 63 | 128, u[o++] = a >> 6 & 63 | 128, u[o++] = a & 63 | 128) : (u[o++] = a >> 12 | 224, u[o++] = a >> 6 & 63 | 128, u[o++] = a & 63 | 128);
1182
+ return o - n;
1160
1183
  };
1161
1184
  })(utf8$2);
1162
1185
  var pool_1 = pool;
1163
1186
  function pool(t, e, r) {
1164
- var s = r || 8192, o = s >>> 1, u = null, n = s;
1187
+ var s = r || 8192, u = s >>> 1, o = null, n = s;
1165
1188
  return function(f) {
1166
- if (f < 1 || f > o)
1189
+ if (f < 1 || f > u)
1167
1190
  return t(f);
1168
- n + f > s && (u = t(s), n = 0);
1169
- var i = e.call(u, n, n += f);
1191
+ n + f > s && (o = t(s), n = 0);
1192
+ var i = e.call(o, n, n += f);
1170
1193
  return n & 7 && (n = (n | 7) + 1), i;
1171
1194
  };
1172
1195
  }
@@ -1175,8 +1198,8 @@ function requireLongbits() {
1175
1198
  if (hasRequiredLongbits) return longbits;
1176
1199
  hasRequiredLongbits = 1, longbits = e;
1177
1200
  var t = requireMinimal();
1178
- function e(u, n) {
1179
- this.lo = u >>> 0, this.hi = n >>> 0;
1201
+ function e(o, n) {
1202
+ this.lo = o >>> 0, this.hi = n >>> 0;
1180
1203
  }
1181
1204
  var r = e.zero = new e(0, 0);
1182
1205
  r.toNumber = function() {
@@ -1212,11 +1235,11 @@ function requireLongbits() {
1212
1235
  }, e.prototype.toLong = function(n) {
1213
1236
  return t.Long ? new t.Long(this.lo | 0, this.hi | 0, !!n) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!n };
1214
1237
  };
1215
- var o = String.prototype.charCodeAt;
1238
+ var u = String.prototype.charCodeAt;
1216
1239
  return e.fromHash = function(n) {
1217
1240
  return n === s ? r : new e(
1218
- (o.call(n, 0) | o.call(n, 1) << 8 | o.call(n, 2) << 16 | o.call(n, 3) << 24) >>> 0,
1219
- (o.call(n, 4) | o.call(n, 5) << 8 | o.call(n, 6) << 16 | o.call(n, 7) << 24) >>> 0
1241
+ (u.call(n, 0) | u.call(n, 1) << 8 | u.call(n, 2) << 16 | u.call(n, 3) << 24) >>> 0,
1242
+ (u.call(n, 4) | u.call(n, 5) << 8 | u.call(n, 6) << 16 | u.call(n, 7) << 24) >>> 0
1220
1243
  );
1221
1244
  }, e.prototype.toHash = function() {
1222
1245
  return String.fromCharCode(
@@ -1251,68 +1274,68 @@ function requireMinimal() {
1251
1274
  /* istanbul ignore next */
1252
1275
  {}
1253
1276
  ), e.isInteger = Number.isInteger || /* istanbul ignore next */
1254
- function(u) {
1255
- return typeof u == "number" && isFinite(u) && Math.floor(u) === u;
1256
- }, e.isString = function(u) {
1257
- return typeof u == "string" || u instanceof String;
1258
- }, e.isObject = function(u) {
1259
- return u && typeof u == "object";
1277
+ function(o) {
1278
+ return typeof o == "number" && isFinite(o) && Math.floor(o) === o;
1279
+ }, e.isString = function(o) {
1280
+ return typeof o == "string" || o instanceof String;
1281
+ }, e.isObject = function(o) {
1282
+ return o && typeof o == "object";
1260
1283
  }, e.isset = /**
1261
1284
  * Checks if a property on a message is considered to be present.
1262
1285
  * @param {Object} obj Plain object or message instance
1263
1286
  * @param {string} prop Property name
1264
1287
  * @returns {boolean} `true` if considered to be present, otherwise `false`
1265
1288
  */
1266
- e.isSet = function(u, n) {
1267
- var a = u[n];
1268
- return a != null && u.hasOwnProperty(n) ? typeof a != "object" || (Array.isArray(a) ? a.length : Object.keys(a).length) > 0 : !1;
1289
+ e.isSet = function(o, n) {
1290
+ var a = o[n];
1291
+ return a != null && o.hasOwnProperty(n) ? typeof a != "object" || (Array.isArray(a) ? a.length : Object.keys(a).length) > 0 : !1;
1269
1292
  }, e.Buffer = function() {
1270
1293
  try {
1271
- var o = e.inquire("buffer").Buffer;
1272
- return o.prototype.utf8Write ? o : (
1294
+ var u = e.inquire("buffer").Buffer;
1295
+ return u.prototype.utf8Write ? u : (
1273
1296
  /* istanbul ignore next */
1274
1297
  null
1275
1298
  );
1276
1299
  } catch {
1277
1300
  return null;
1278
1301
  }
1279
- }(), e._Buffer_from = null, e._Buffer_allocUnsafe = null, e.newBuffer = function(u) {
1280
- return typeof u == "number" ? e.Buffer ? e._Buffer_allocUnsafe(u) : new e.Array(u) : e.Buffer ? e._Buffer_from(u) : typeof Uint8Array > "u" ? u : new Uint8Array(u);
1302
+ }(), e._Buffer_from = null, e._Buffer_allocUnsafe = null, e.newBuffer = function(o) {
1303
+ return typeof o == "number" ? e.Buffer ? e._Buffer_allocUnsafe(o) : new e.Array(o) : e.Buffer ? e._Buffer_from(o) : typeof Uint8Array > "u" ? o : new Uint8Array(o);
1281
1304
  }, e.Array = typeof Uint8Array < "u" ? Uint8Array : Array, e.Long = /* istanbul ignore next */
1282
1305
  e.global.dcodeIO && /* istanbul ignore next */
1283
1306
  e.global.dcodeIO.Long || /* istanbul ignore next */
1284
- e.global.Long || e.inquire("long"), e.key2Re = /^true|false|0|1$/, e.key32Re = /^-?(?:0|[1-9][0-9]*)$/, e.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, e.longToHash = function(u) {
1285
- return u ? e.LongBits.from(u).toHash() : e.LongBits.zeroHash;
1286
- }, e.longFromHash = function(u, n) {
1287
- var a = e.LongBits.fromHash(u);
1307
+ e.global.Long || e.inquire("long"), e.key2Re = /^true|false|0|1$/, e.key32Re = /^-?(?:0|[1-9][0-9]*)$/, e.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, e.longToHash = function(o) {
1308
+ return o ? e.LongBits.from(o).toHash() : e.LongBits.zeroHash;
1309
+ }, e.longFromHash = function(o, n) {
1310
+ var a = e.LongBits.fromHash(o);
1288
1311
  return e.Long ? e.Long.fromBits(a.lo, a.hi, n) : a.toNumber(!!n);
1289
1312
  };
1290
- function r(o, u, n) {
1291
- for (var a = Object.keys(u), f = 0; f < a.length; ++f)
1292
- (o[a[f]] === void 0 || !n) && (o[a[f]] = u[a[f]]);
1293
- return o;
1313
+ function r(u, o, n) {
1314
+ for (var a = Object.keys(o), f = 0; f < a.length; ++f)
1315
+ (u[a[f]] === void 0 || !n) && (u[a[f]] = o[a[f]]);
1316
+ return u;
1294
1317
  }
1295
- e.merge = r, e.lcFirst = function(u) {
1296
- return u.charAt(0).toLowerCase() + u.substring(1);
1318
+ e.merge = r, e.lcFirst = function(o) {
1319
+ return o.charAt(0).toLowerCase() + o.substring(1);
1297
1320
  };
1298
- function s(o) {
1299
- function u(n, a) {
1300
- if (!(this instanceof u))
1301
- return new u(n, a);
1321
+ function s(u) {
1322
+ function o(n, a) {
1323
+ if (!(this instanceof o))
1324
+ return new o(n, a);
1302
1325
  Object.defineProperty(this, "message", { get: function() {
1303
1326
  return n;
1304
- } }), Error.captureStackTrace ? Error.captureStackTrace(this, u) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), a && r(this, a);
1327
+ } }), Error.captureStackTrace ? Error.captureStackTrace(this, o) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), a && r(this, a);
1305
1328
  }
1306
- return u.prototype = Object.create(Error.prototype, {
1329
+ return o.prototype = Object.create(Error.prototype, {
1307
1330
  constructor: {
1308
- value: u,
1331
+ value: o,
1309
1332
  writable: !0,
1310
1333
  enumerable: !1,
1311
1334
  configurable: !0
1312
1335
  },
1313
1336
  name: {
1314
1337
  get: function() {
1315
- return o;
1338
+ return u;
1316
1339
  },
1317
1340
  set: void 0,
1318
1341
  enumerable: !1,
@@ -1330,20 +1353,20 @@ function requireMinimal() {
1330
1353
  enumerable: !1,
1331
1354
  configurable: !0
1332
1355
  }
1333
- }), u;
1356
+ }), o;
1334
1357
  }
1335
- e.newError = s, e.ProtocolError = s("ProtocolError"), e.oneOfGetter = function(u) {
1336
- for (var n = {}, a = 0; a < u.length; ++a)
1337
- n[u[a]] = 1;
1358
+ e.newError = s, e.ProtocolError = s("ProtocolError"), e.oneOfGetter = function(o) {
1359
+ for (var n = {}, a = 0; a < o.length; ++a)
1360
+ n[o[a]] = 1;
1338
1361
  return function() {
1339
1362
  for (var f = Object.keys(this), i = f.length - 1; i > -1; --i)
1340
1363
  if (n[f[i]] === 1 && this[f[i]] !== void 0 && this[f[i]] !== null)
1341
1364
  return f[i];
1342
1365
  };
1343
- }, e.oneOfSetter = function(u) {
1366
+ }, e.oneOfSetter = function(o) {
1344
1367
  return function(n) {
1345
- for (var a = 0; a < u.length; ++a)
1346
- u[a] !== n && delete this[u[a]];
1368
+ for (var a = 0; a < o.length; ++a)
1369
+ o[a] !== n && delete this[o[a]];
1347
1370
  };
1348
1371
  }, e.toJSONOptions = {
1349
1372
  longs: String,
@@ -1351,17 +1374,17 @@ function requireMinimal() {
1351
1374
  bytes: String,
1352
1375
  json: !0
1353
1376
  }, e._configure = function() {
1354
- var o = e.Buffer;
1355
- if (!o) {
1377
+ var u = e.Buffer;
1378
+ if (!u) {
1356
1379
  e._Buffer_from = e._Buffer_allocUnsafe = null;
1357
1380
  return;
1358
1381
  }
1359
- e._Buffer_from = o.from !== Uint8Array.from && o.from || /* istanbul ignore next */
1382
+ e._Buffer_from = u.from !== Uint8Array.from && u.from || /* istanbul ignore next */
1360
1383
  function(n, a) {
1361
- return new o(n, a);
1362
- }, e._Buffer_allocUnsafe = o.allocUnsafe || /* istanbul ignore next */
1384
+ return new u(n, a);
1385
+ }, e._Buffer_allocUnsafe = u.allocUnsafe || /* istanbul ignore next */
1363
1386
  function(n) {
1364
- return new o(n);
1387
+ return new u(n);
1365
1388
  };
1366
1389
  };
1367
1390
  }(minimal)), minimal;
@@ -1460,8 +1483,8 @@ Writer$1.prototype.double = function t(e) {
1460
1483
  var writeBytes = util$6.Array.prototype.set ? function t(e, r, s) {
1461
1484
  r.set(e, s);
1462
1485
  } : function t(e, r, s) {
1463
- for (var o = 0; o < e.length; ++o)
1464
- r[s + o] = e[o];
1486
+ for (var u = 0; u < e.length; ++u)
1487
+ r[s + u] = e[u];
1465
1488
  };
1466
1489
  Writer$1.prototype.bytes = function t(e) {
1467
1490
  var r = e.length >>> 0;
@@ -1507,8 +1530,8 @@ BufferWriter._configure = function() {
1507
1530
  } : function(e, r, s) {
1508
1531
  if (e.copy)
1509
1532
  e.copy(r, s, 0, e.length);
1510
- else for (var o = 0; o < e.length; )
1511
- r[s++] = e[o++];
1533
+ else for (var u = 0; u < e.length; )
1534
+ r[s++] = e[u++];
1512
1535
  };
1513
1536
  };
1514
1537
  BufferWriter.prototype.bytes = function t(e) {
@@ -1541,8 +1564,8 @@ var create_array = typeof Uint8Array < "u" ? function t(e) {
1541
1564
  throw Error("illegal buffer");
1542
1565
  }, create = function t() {
1543
1566
  return util$4.Buffer ? function(r) {
1544
- return (Reader$1.create = function(o) {
1545
- return util$4.Buffer.isBuffer(o) ? new BufferReader$1(o) : create_array(o);
1567
+ return (Reader$1.create = function(u) {
1568
+ return util$4.Buffer.isBuffer(u) ? new BufferReader$1(u) : create_array(u);
1546
1569
  })(r);
1547
1570
  } : create_array;
1548
1571
  };
@@ -1636,8 +1659,8 @@ Reader$1.prototype.bytes = function t() {
1636
1659
  if (this.pos += e, Array.isArray(this.buf))
1637
1660
  return this.buf.slice(r, s);
1638
1661
  if (r === s) {
1639
- var o = util$4.Buffer;
1640
- return o ? o.alloc(0) : new this.buf.constructor(0);
1662
+ var u = util$4.Buffer;
1663
+ return u ? u.alloc(0) : new this.buf.constructor(0);
1641
1664
  }
1642
1665
  return this._slice.call(this.buf, r, s);
1643
1666
  };
@@ -1725,25 +1748,25 @@ function Service(t, e, r) {
1725
1748
  throw TypeError("rpcImpl must be a function");
1726
1749
  util$2.EventEmitter.call(this), this.rpcImpl = t, this.requestDelimited = !!e, this.responseDelimited = !!r;
1727
1750
  }
1728
- Service.prototype.rpcCall = function t(e, r, s, o, u) {
1729
- if (!o)
1751
+ Service.prototype.rpcCall = function t(e, r, s, u, o) {
1752
+ if (!u)
1730
1753
  throw TypeError("request must be specified");
1731
1754
  var n = this;
1732
- if (!u)
1733
- return util$2.asPromise(t, n, e, r, s, o);
1755
+ if (!o)
1756
+ return util$2.asPromise(t, n, e, r, s, u);
1734
1757
  if (!n.rpcImpl) {
1735
1758
  setTimeout(function() {
1736
- u(Error("already ended"));
1759
+ o(Error("already ended"));
1737
1760
  }, 0);
1738
1761
  return;
1739
1762
  }
1740
1763
  try {
1741
1764
  return n.rpcImpl(
1742
1765
  e,
1743
- r[n.requestDelimited ? "encodeDelimited" : "encode"](o).finish(),
1766
+ r[n.requestDelimited ? "encodeDelimited" : "encode"](u).finish(),
1744
1767
  function(f, i) {
1745
1768
  if (f)
1746
- return n.emit("error", f, e), u(f);
1769
+ return n.emit("error", f, e), o(f);
1747
1770
  if (i === null) {
1748
1771
  n.end(
1749
1772
  /* endedByRPC */
@@ -1754,15 +1777,15 @@ Service.prototype.rpcCall = function t(e, r, s, o, u) {
1754
1777
  if (!(i instanceof s))
1755
1778
  try {
1756
1779
  i = s[n.responseDelimited ? "decodeDelimited" : "decode"](i);
1757
- } catch (l) {
1758
- return n.emit("error", l, e), u(l);
1780
+ } catch (c) {
1781
+ return n.emit("error", c, e), o(c);
1759
1782
  }
1760
- return n.emit("data", i, e), u(null, i);
1783
+ return n.emit("data", i, e), o(null, i);
1761
1784
  }
1762
1785
  );
1763
1786
  } catch (a) {
1764
1787
  n.emit("error", a, e), setTimeout(function() {
1765
- u(a);
1788
+ o(a);
1766
1789
  }, 0);
1767
1790
  return;
1768
1791
  }
@@ -1787,20 +1810,20 @@ var util$1 = { exports: {} }, codegen_1 = codegen;
1787
1810
  function codegen(t, e) {
1788
1811
  typeof t == "string" && (e = t, t = void 0);
1789
1812
  var r = [];
1790
- function s(u) {
1791
- if (typeof u != "string") {
1792
- var n = o();
1793
- if (codegen.verbose && console.log("codegen: " + n), n = "return " + n, u) {
1794
- for (var a = Object.keys(u), f = new Array(a.length + 1), i = new Array(a.length), l = 0; l < a.length; )
1795
- f[l] = a[l], i[l] = u[a[l++]];
1796
- return f[l] = n, Function.apply(null, f).apply(null, i);
1813
+ function s(o) {
1814
+ if (typeof o != "string") {
1815
+ var n = u();
1816
+ if (codegen.verbose && console.log("codegen: " + n), n = "return " + n, o) {
1817
+ for (var a = Object.keys(o), f = new Array(a.length + 1), i = new Array(a.length), c = 0; c < a.length; )
1818
+ f[c] = a[c], i[c] = o[a[c++]];
1819
+ return f[c] = n, Function.apply(null, f).apply(null, i);
1797
1820
  }
1798
1821
  return Function(n)();
1799
1822
  }
1800
- for (var c = new Array(arguments.length - 1), h = 0; h < c.length; )
1801
- c[h] = arguments[++h];
1802
- if (h = 0, u = u.replace(/%([%dfijs])/g, function(p, v) {
1803
- var g = c[h++];
1823
+ for (var l = new Array(arguments.length - 1), d = 0; d < l.length; )
1824
+ l[d] = arguments[++d];
1825
+ if (d = 0, o = o.replace(/%([%dfijs])/g, function(p, v) {
1826
+ var g = l[d++];
1804
1827
  switch (v) {
1805
1828
  case "d":
1806
1829
  case "f":
@@ -1813,43 +1836,43 @@ function codegen(t, e) {
1813
1836
  return String(g);
1814
1837
  }
1815
1838
  return "%";
1816
- }), h !== c.length)
1839
+ }), d !== l.length)
1817
1840
  throw Error("parameter count mismatch");
1818
- return r.push(u), s;
1841
+ return r.push(o), s;
1819
1842
  }
1820
- function o(u) {
1821
- return "function " + (u || e || "") + "(" + (t && t.join(",") || "") + `){
1843
+ function u(o) {
1844
+ return "function " + (o || e || "") + "(" + (t && t.join(",") || "") + `){
1822
1845
  ` + r.join(`
1823
1846
  `) + `
1824
1847
  }`;
1825
1848
  }
1826
- return s.toString = o, s;
1849
+ return s.toString = u, s;
1827
1850
  }
1828
1851
  codegen.verbose = !1;
1829
1852
  var fetch_1 = fetch, asPromise = aspromise, inquire = inquire_1, fs = inquire("fs");
1830
1853
  function fetch(t, e, r) {
1831
- return typeof e == "function" ? (r = e, e = {}) : e || (e = {}), r ? !e.xhr && fs && fs.readFile ? fs.readFile(t, function(o, u) {
1832
- return o && typeof XMLHttpRequest < "u" ? fetch.xhr(t, e, r) : o ? r(o) : r(null, e.binary ? u : u.toString("utf8"));
1854
+ return typeof e == "function" ? (r = e, e = {}) : e || (e = {}), r ? !e.xhr && fs && fs.readFile ? fs.readFile(t, function(u, o) {
1855
+ return u && typeof XMLHttpRequest < "u" ? fetch.xhr(t, e, r) : u ? r(u) : r(null, e.binary ? o : o.toString("utf8"));
1833
1856
  }) : fetch.xhr(t, e, r) : asPromise(fetch, this, t, e);
1834
1857
  }
1835
1858
  fetch.xhr = function t(e, r, s) {
1836
- var o = new XMLHttpRequest();
1837
- o.onreadystatechange = function() {
1838
- if (o.readyState === 4) {
1839
- if (o.status !== 0 && o.status !== 200)
1840
- return s(Error("status " + o.status));
1859
+ var u = new XMLHttpRequest();
1860
+ u.onreadystatechange = function() {
1861
+ if (u.readyState === 4) {
1862
+ if (u.status !== 0 && u.status !== 200)
1863
+ return s(Error("status " + u.status));
1841
1864
  if (r.binary) {
1842
- var n = o.response;
1865
+ var n = u.response;
1843
1866
  if (!n) {
1844
1867
  n = [];
1845
- for (var a = 0; a < o.responseText.length; ++a)
1846
- n.push(o.responseText.charCodeAt(a) & 255);
1868
+ for (var a = 0; a < u.responseText.length; ++a)
1869
+ n.push(u.responseText.charCodeAt(a) & 255);
1847
1870
  }
1848
1871
  return s(null, typeof Uint8Array < "u" ? new Uint8Array(n) : n);
1849
1872
  }
1850
- return s(null, o.responseText);
1873
+ return s(null, u.responseText);
1851
1874
  }
1852
- }, r.binary && ("overrideMimeType" in o && o.overrideMimeType("text/plain; charset=x-user-defined"), o.responseType = "arraybuffer"), o.open("GET", e), o.send();
1875
+ }, r.binary && ("overrideMimeType" in u && u.overrideMimeType("text/plain; charset=x-user-defined"), u.responseType = "arraybuffer"), u.open("GET", e), u.send();
1853
1876
  };
1854
1877
  var path = {};
1855
1878
  (function(t) {
@@ -1859,8 +1882,8 @@ var path = {};
1859
1882
  * @param {string} path Path to test
1860
1883
  * @returns {boolean} `true` if path is absolute
1861
1884
  */
1862
- e.isAbsolute = function(u) {
1863
- return /^(?:\/|\w+:)/.test(u);
1885
+ e.isAbsolute = function(o) {
1886
+ return /^(?:\/|\w+:)/.test(o);
1864
1887
  }
1865
1888
  ), s = (
1866
1889
  /**
@@ -1868,17 +1891,17 @@ var path = {};
1868
1891
  * @param {string} path Path to normalize
1869
1892
  * @returns {string} Normalized path
1870
1893
  */
1871
- e.normalize = function(u) {
1872
- u = u.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
1873
- var n = u.split("/"), a = r(u), f = "";
1894
+ e.normalize = function(o) {
1895
+ o = o.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
1896
+ var n = o.split("/"), a = r(o), f = "";
1874
1897
  a && (f = n.shift() + "/");
1875
1898
  for (var i = 0; i < n.length; )
1876
1899
  n[i] === ".." ? i > 0 && n[i - 1] !== ".." ? n.splice(--i, 2) : a ? n.splice(i, 1) : ++i : n[i] === "." ? n.splice(i, 1) : ++i;
1877
1900
  return f + n.join("/");
1878
1901
  }
1879
1902
  );
1880
- e.resolve = function(u, n, a) {
1881
- return a || (n = s(n)), r(n) ? n : (a || (u = s(u)), (u = u.replace(/(?:\/|^)[^/]+$/, "")).length ? s(u + "/" + n) : n);
1903
+ e.resolve = function(o, n, a) {
1904
+ return a || (n = s(n)), r(n) ? n : (a || (o = s(o)), (o = o.replace(/(?:\/|^)[^/]+$/, "")).length ? s(o + "/" + n) : n);
1882
1905
  };
1883
1906
  })(path);
1884
1907
  var types = {}, hasRequiredTypes;
@@ -1916,12 +1939,12 @@ function requireTypes() {
1916
1939
  "bytes"
1917
1940
  // 14
1918
1941
  ];
1919
- function o(u, n) {
1942
+ function u(o, n) {
1920
1943
  var a = 0, f = {};
1921
- for (n |= 0; a < u.length; ) f[s[a + n]] = u[a++];
1944
+ for (n |= 0; a < o.length; ) f[s[a + n]] = o[a++];
1922
1945
  return f;
1923
1946
  }
1924
- e.basic = o([
1947
+ e.basic = u([
1925
1948
  /* double */
1926
1949
  1,
1927
1950
  /* float */
@@ -1952,7 +1975,7 @@ function requireTypes() {
1952
1975
  2,
1953
1976
  /* bytes */
1954
1977
  2
1955
- ]), e.defaults = o([
1978
+ ]), e.defaults = u([
1956
1979
  /* double */
1957
1980
  0,
1958
1981
  /* float */
@@ -1985,7 +2008,7 @@ function requireTypes() {
1985
2008
  r.emptyArray,
1986
2009
  /* message */
1987
2010
  null
1988
- ]), e.long = o([
2011
+ ]), e.long = u([
1989
2012
  /* int64 */
1990
2013
  0,
1991
2014
  /* uint64 */
@@ -1996,7 +2019,7 @@ function requireTypes() {
1996
2019
  1,
1997
2020
  /* sfixed64 */
1998
2021
  1
1999
- ], 7), e.mapKey = o([
2022
+ ], 7), e.mapKey = u([
2000
2023
  /* int32 */
2001
2024
  0,
2002
2025
  /* uint32 */
@@ -2021,7 +2044,7 @@ function requireTypes() {
2021
2044
  0,
2022
2045
  /* string */
2023
2046
  2
2024
- ], 2), e.packed = o([
2047
+ ], 2), e.packed = u([
2025
2048
  /* double */
2026
2049
  1,
2027
2050
  /* float */
@@ -2057,30 +2080,30 @@ function requireField() {
2057
2080
  hasRequiredField = 1, field = n;
2058
2081
  var t = requireObject();
2059
2082
  ((n.prototype = Object.create(t.prototype)).constructor = n).className = "Field";
2060
- var e = require_enum(), r = requireTypes(), s = requireUtil(), o, u = /^required|optional|repeated$/;
2083
+ var e = require_enum(), r = requireTypes(), s = requireUtil(), u, o = /^required|optional|repeated$/;
2061
2084
  n.fromJSON = function(f, i) {
2062
2085
  return new n(f, i.id, i.type, i.rule, i.extend, i.options, i.comment);
2063
2086
  };
2064
- function n(a, f, i, l, c, h, d) {
2065
- if (s.isObject(l) ? (d = c, h = l, l = c = void 0) : s.isObject(c) && (d = h, h = c, c = void 0), t.call(this, a, h), !s.isInteger(f) || f < 0)
2087
+ function n(a, f, i, c, l, d, h) {
2088
+ if (s.isObject(c) ? (h = l, d = c, c = l = void 0) : s.isObject(l) && (h = d, d = l, l = void 0), t.call(this, a, d), !s.isInteger(f) || f < 0)
2066
2089
  throw TypeError("id must be a non-negative integer");
2067
2090
  if (!s.isString(i))
2068
2091
  throw TypeError("type must be a string");
2069
- if (l !== void 0 && !u.test(l = l.toString().toLowerCase()))
2092
+ if (c !== void 0 && !o.test(c = c.toString().toLowerCase()))
2070
2093
  throw TypeError("rule must be a string rule");
2071
- if (c !== void 0 && !s.isString(c))
2094
+ if (l !== void 0 && !s.isString(l))
2072
2095
  throw TypeError("extend must be a string");
2073
- l === "proto3_optional" && (l = "optional"), this.rule = l && l !== "optional" ? l : void 0, this.type = i, this.id = f, this.extend = c || void 0, this.required = l === "required", this.optional = !this.required, this.repeated = l === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = s.Long ? r.long[i] !== void 0 : (
2096
+ c === "proto3_optional" && (c = "optional"), this.rule = c && c !== "optional" ? c : void 0, this.type = i, this.id = f, this.extend = l || void 0, this.required = c === "required", this.optional = !this.required, this.repeated = c === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = s.Long ? r.long[i] !== void 0 : (
2074
2097
  /* istanbul ignore next */
2075
2098
  !1
2076
- ), this.bytes = i === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment = d;
2099
+ ), this.bytes = i === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment = h;
2077
2100
  }
2078
2101
  return Object.defineProperty(n.prototype, "packed", {
2079
2102
  get: function() {
2080
2103
  return this._packed === null && (this._packed = this.getOption("packed") !== !1), this._packed;
2081
2104
  }
2082
- }), n.prototype.setOption = function(f, i, l) {
2083
- return f === "packed" && (this._packed = null), t.prototype.setOption.call(this, f, i, l);
2105
+ }), n.prototype.setOption = function(f, i, c) {
2106
+ return f === "packed" && (this._packed = null), t.prototype.setOption.call(this, f, i, c);
2084
2107
  }, n.prototype.toJSON = function(f) {
2085
2108
  var i = f ? !!f.keepComments : !1;
2086
2109
  return s.toObject([
@@ -2100,19 +2123,19 @@ function requireField() {
2100
2123
  }, n.prototype.resolve = function() {
2101
2124
  if (this.resolved)
2102
2125
  return this;
2103
- if ((this.typeDefault = r.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof o ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]) : this.options && this.options.proto3_optional && (this.typeDefault = null), this.options && this.options.default != null && (this.typeDefault = this.options.default, this.resolvedType instanceof e && typeof this.typeDefault == "string" && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && ((this.options.packed === !0 || this.options.packed !== void 0 && this.resolvedType && !(this.resolvedType instanceof e)) && delete this.options.packed, Object.keys(this.options).length || (this.options = void 0)), this.long)
2126
+ if ((this.typeDefault = r.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof u ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]) : this.options && this.options.proto3_optional && (this.typeDefault = null), this.options && this.options.default != null && (this.typeDefault = this.options.default, this.resolvedType instanceof e && typeof this.typeDefault == "string" && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && ((this.options.packed === !0 || this.options.packed !== void 0 && this.resolvedType && !(this.resolvedType instanceof e)) && delete this.options.packed, Object.keys(this.options).length || (this.options = void 0)), this.long)
2104
2127
  this.typeDefault = s.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"), Object.freeze && Object.freeze(this.typeDefault);
2105
2128
  else if (this.bytes && typeof this.typeDefault == "string") {
2106
2129
  var f;
2107
2130
  s.base64.test(this.typeDefault) ? s.base64.decode(this.typeDefault, f = s.newBuffer(s.base64.length(this.typeDefault)), 0) : s.utf8.write(this.typeDefault, f = s.newBuffer(s.utf8.length(this.typeDefault)), 0), this.typeDefault = f;
2108
2131
  }
2109
- return this.map ? this.defaultValue = s.emptyObject : this.repeated ? this.defaultValue = s.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof o && (this.parent.ctor.prototype[this.name] = this.defaultValue), t.prototype.resolve.call(this);
2110
- }, n.d = function(f, i, l, c) {
2111
- return typeof i == "function" ? i = s.decorateType(i).name : i && typeof i == "object" && (i = s.decorateEnum(i).name), function(d, p) {
2112
- s.decorateType(d.constructor).add(new n(p, f, i, l, { default: c }));
2132
+ return this.map ? this.defaultValue = s.emptyObject : this.repeated ? this.defaultValue = s.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof u && (this.parent.ctor.prototype[this.name] = this.defaultValue), t.prototype.resolve.call(this);
2133
+ }, n.d = function(f, i, c, l) {
2134
+ return typeof i == "function" ? i = s.decorateType(i).name : i && typeof i == "object" && (i = s.decorateEnum(i).name), function(h, p) {
2135
+ s.decorateType(h.constructor).add(new n(p, f, i, c, { default: l }));
2113
2136
  };
2114
2137
  }, n._configure = function(f) {
2115
- o = f;
2138
+ u = f;
2116
2139
  }, field;
2117
2140
  }
2118
2141
  var oneof, hasRequiredOneof;
@@ -2122,8 +2145,8 @@ function requireOneof() {
2122
2145
  var t = requireObject();
2123
2146
  ((s.prototype = Object.create(t.prototype)).constructor = s).className = "OneOf";
2124
2147
  var e = requireField(), r = requireUtil();
2125
- function s(u, n, a, f) {
2126
- if (Array.isArray(n) || (a = n, n = void 0), t.call(this, u, a), !(n === void 0 || Array.isArray(n)))
2148
+ function s(o, n, a, f) {
2149
+ if (Array.isArray(n) || (a = n, n = void 0), t.call(this, o, a), !(n === void 0 || Array.isArray(n)))
2127
2150
  throw TypeError("fieldNames must be an Array");
2128
2151
  this.oneof = n || [], this.fieldsArray = [], this.comment = f;
2129
2152
  }
@@ -2140,15 +2163,15 @@ function requireOneof() {
2140
2163
  a ? this.comment : void 0
2141
2164
  ]);
2142
2165
  };
2143
- function o(u) {
2144
- if (u.parent)
2145
- for (var n = 0; n < u.fieldsArray.length; ++n)
2146
- u.fieldsArray[n].parent || u.parent.add(u.fieldsArray[n]);
2166
+ function u(o) {
2167
+ if (o.parent)
2168
+ for (var n = 0; n < o.fieldsArray.length; ++n)
2169
+ o.fieldsArray[n].parent || o.parent.add(o.fieldsArray[n]);
2147
2170
  }
2148
2171
  return s.prototype.add = function(n) {
2149
2172
  if (!(n instanceof e))
2150
2173
  throw TypeError("field must be a Field");
2151
- return n.parent && n.parent !== this.parent && n.parent.remove(n), this.oneof.push(n.name), this.fieldsArray.push(n), n.partOf = this, o(this), this;
2174
+ return n.parent && n.parent !== this.parent && n.parent.remove(n), this.oneof.push(n.name), this.fieldsArray.push(n), n.partOf = this, u(this), this;
2152
2175
  }, s.prototype.remove = function(n) {
2153
2176
  if (!(n instanceof e))
2154
2177
  throw TypeError("field must be a Field");
@@ -2162,7 +2185,7 @@ function requireOneof() {
2162
2185
  var i = n.get(this.oneof[f]);
2163
2186
  i && !i.partOf && (i.partOf = a, a.fieldsArray.push(i));
2164
2187
  }
2165
- o(this);
2188
+ u(this);
2166
2189
  }, s.prototype.onRemove = function(n) {
2167
2190
  for (var a = 0, f; a < this.fieldsArray.length; ++a)
2168
2191
  (f = this.fieldsArray[a]).parent && f.parent.remove(f);
@@ -2170,8 +2193,8 @@ function requireOneof() {
2170
2193
  }, s.d = function() {
2171
2194
  for (var n = new Array(arguments.length), a = 0; a < arguments.length; )
2172
2195
  n[a] = arguments[a++];
2173
- return function(i, l) {
2174
- r.decorateType(i.constructor).add(new s(l, n)), Object.defineProperty(i, l, {
2196
+ return function(i, c) {
2197
+ r.decorateType(i.constructor).add(new s(c, n)), Object.defineProperty(i, c, {
2175
2198
  get: r.oneOfGetter(n),
2176
2199
  set: r.oneOfSetter(n)
2177
2200
  });
@@ -2184,149 +2207,149 @@ function requireNamespace() {
2184
2207
  hasRequiredNamespace = 1, namespace = f;
2185
2208
  var t = requireObject();
2186
2209
  ((f.prototype = Object.create(t.prototype)).constructor = f).className = "Namespace";
2187
- var e = requireField(), r = requireUtil(), s = requireOneof(), o, u, n;
2188
- f.fromJSON = function(c, h) {
2189
- return new f(c, h.options).addJSON(h.nested);
2210
+ var e = requireField(), r = requireUtil(), s = requireOneof(), u, o, n;
2211
+ f.fromJSON = function(l, d) {
2212
+ return new f(l, d.options).addJSON(d.nested);
2190
2213
  };
2191
- function a(l, c) {
2192
- if (l && l.length) {
2193
- for (var h = {}, d = 0; d < l.length; ++d)
2194
- h[l[d].name] = l[d].toJSON(c);
2195
- return h;
2214
+ function a(c, l) {
2215
+ if (c && c.length) {
2216
+ for (var d = {}, h = 0; h < c.length; ++h)
2217
+ d[c[h].name] = c[h].toJSON(l);
2218
+ return d;
2196
2219
  }
2197
2220
  }
2198
- f.arrayToJSON = a, f.isReservedId = function(c, h) {
2199
- if (c) {
2200
- for (var d = 0; d < c.length; ++d)
2201
- if (typeof c[d] != "string" && c[d][0] <= h && c[d][1] > h)
2221
+ f.arrayToJSON = a, f.isReservedId = function(l, d) {
2222
+ if (l) {
2223
+ for (var h = 0; h < l.length; ++h)
2224
+ if (typeof l[h] != "string" && l[h][0] <= d && l[h][1] > d)
2202
2225
  return !0;
2203
2226
  }
2204
2227
  return !1;
2205
- }, f.isReservedName = function(c, h) {
2206
- if (c) {
2207
- for (var d = 0; d < c.length; ++d)
2208
- if (c[d] === h)
2228
+ }, f.isReservedName = function(l, d) {
2229
+ if (l) {
2230
+ for (var h = 0; h < l.length; ++h)
2231
+ if (l[h] === d)
2209
2232
  return !0;
2210
2233
  }
2211
2234
  return !1;
2212
2235
  };
2213
- function f(l, c) {
2214
- t.call(this, l, c), this.nested = void 0, this._nestedArray = null;
2236
+ function f(c, l) {
2237
+ t.call(this, c, l), this.nested = void 0, this._nestedArray = null;
2215
2238
  }
2216
- function i(l) {
2217
- return l._nestedArray = null, l;
2239
+ function i(c) {
2240
+ return c._nestedArray = null, c;
2218
2241
  }
2219
2242
  return Object.defineProperty(f.prototype, "nestedArray", {
2220
2243
  get: function() {
2221
2244
  return this._nestedArray || (this._nestedArray = r.toArray(this.nested));
2222
2245
  }
2223
- }), f.prototype.toJSON = function(c) {
2246
+ }), f.prototype.toJSON = function(l) {
2224
2247
  return r.toObject([
2225
2248
  "options",
2226
2249
  this.options,
2227
2250
  "nested",
2228
- a(this.nestedArray, c)
2251
+ a(this.nestedArray, l)
2229
2252
  ]);
2230
- }, f.prototype.addJSON = function(c) {
2231
- var h = this;
2232
- if (c)
2233
- for (var d = Object.keys(c), p = 0, v; p < d.length; ++p)
2234
- v = c[d[p]], h.add(
2253
+ }, f.prototype.addJSON = function(l) {
2254
+ var d = this;
2255
+ if (l)
2256
+ for (var h = Object.keys(l), p = 0, v; p < h.length; ++p)
2257
+ v = l[h[p]], d.add(
2235
2258
  // most to least likely
2236
- (v.fields !== void 0 ? o.fromJSON : v.values !== void 0 ? n.fromJSON : v.methods !== void 0 ? u.fromJSON : v.id !== void 0 ? e.fromJSON : f.fromJSON)(d[p], v)
2259
+ (v.fields !== void 0 ? u.fromJSON : v.values !== void 0 ? n.fromJSON : v.methods !== void 0 ? o.fromJSON : v.id !== void 0 ? e.fromJSON : f.fromJSON)(h[p], v)
2237
2260
  );
2238
2261
  return this;
2239
- }, f.prototype.get = function(c) {
2240
- return this.nested && this.nested[c] || null;
2241
- }, f.prototype.getEnum = function(c) {
2242
- if (this.nested && this.nested[c] instanceof n)
2243
- return this.nested[c].values;
2244
- throw Error("no such enum: " + c);
2245
- }, f.prototype.add = function(c) {
2246
- if (!(c instanceof e && c.extend !== void 0 || c instanceof o || c instanceof s || c instanceof n || c instanceof u || c instanceof f))
2262
+ }, f.prototype.get = function(l) {
2263
+ return this.nested && this.nested[l] || null;
2264
+ }, f.prototype.getEnum = function(l) {
2265
+ if (this.nested && this.nested[l] instanceof n)
2266
+ return this.nested[l].values;
2267
+ throw Error("no such enum: " + l);
2268
+ }, f.prototype.add = function(l) {
2269
+ if (!(l instanceof e && l.extend !== void 0 || l instanceof u || l instanceof s || l instanceof n || l instanceof o || l instanceof f))
2247
2270
  throw TypeError("object must be a valid nested object");
2248
2271
  if (!this.nested)
2249
2272
  this.nested = {};
2250
2273
  else {
2251
- var h = this.get(c.name);
2252
- if (h)
2253
- if (h instanceof f && c instanceof f && !(h instanceof o || h instanceof u)) {
2254
- for (var d = h.nestedArray, p = 0; p < d.length; ++p)
2255
- c.add(d[p]);
2256
- this.remove(h), this.nested || (this.nested = {}), c.setOptions(h.options, !0);
2274
+ var d = this.get(l.name);
2275
+ if (d)
2276
+ if (d instanceof f && l instanceof f && !(d instanceof u || d instanceof o)) {
2277
+ for (var h = d.nestedArray, p = 0; p < h.length; ++p)
2278
+ l.add(h[p]);
2279
+ this.remove(d), this.nested || (this.nested = {}), l.setOptions(d.options, !0);
2257
2280
  } else
2258
- throw Error("duplicate name '" + c.name + "' in " + this);
2281
+ throw Error("duplicate name '" + l.name + "' in " + this);
2259
2282
  }
2260
- return this.nested[c.name] = c, c.onAdd(this), i(this);
2261
- }, f.prototype.remove = function(c) {
2262
- if (!(c instanceof t))
2283
+ return this.nested[l.name] = l, l.onAdd(this), i(this);
2284
+ }, f.prototype.remove = function(l) {
2285
+ if (!(l instanceof t))
2263
2286
  throw TypeError("object must be a ReflectionObject");
2264
- if (c.parent !== this)
2265
- throw Error(c + " is not a member of " + this);
2266
- return delete this.nested[c.name], Object.keys(this.nested).length || (this.nested = void 0), c.onRemove(this), i(this);
2267
- }, f.prototype.define = function(c, h) {
2268
- if (r.isString(c))
2269
- c = c.split(".");
2270
- else if (!Array.isArray(c))
2287
+ if (l.parent !== this)
2288
+ throw Error(l + " is not a member of " + this);
2289
+ return delete this.nested[l.name], Object.keys(this.nested).length || (this.nested = void 0), l.onRemove(this), i(this);
2290
+ }, f.prototype.define = function(l, d) {
2291
+ if (r.isString(l))
2292
+ l = l.split(".");
2293
+ else if (!Array.isArray(l))
2271
2294
  throw TypeError("illegal path");
2272
- if (c && c.length && c[0] === "")
2295
+ if (l && l.length && l[0] === "")
2273
2296
  throw Error("path must be relative");
2274
- for (var d = this; c.length > 0; ) {
2275
- var p = c.shift();
2276
- if (d.nested && d.nested[p]) {
2277
- if (d = d.nested[p], !(d instanceof f))
2297
+ for (var h = this; l.length > 0; ) {
2298
+ var p = l.shift();
2299
+ if (h.nested && h.nested[p]) {
2300
+ if (h = h.nested[p], !(h instanceof f))
2278
2301
  throw Error("path conflicts with non-namespace objects");
2279
2302
  } else
2280
- d.add(d = new f(p));
2303
+ h.add(h = new f(p));
2281
2304
  }
2282
- return h && d.addJSON(h), d;
2305
+ return d && h.addJSON(d), h;
2283
2306
  }, f.prototype.resolveAll = function() {
2284
- for (var c = this.nestedArray, h = 0; h < c.length; )
2285
- c[h] instanceof f ? c[h++].resolveAll() : c[h++].resolve();
2307
+ for (var l = this.nestedArray, d = 0; d < l.length; )
2308
+ l[d] instanceof f ? l[d++].resolveAll() : l[d++].resolve();
2286
2309
  return this.resolve();
2287
- }, f.prototype.lookup = function(c, h, d) {
2288
- if (typeof h == "boolean" ? (d = h, h = void 0) : h && !Array.isArray(h) && (h = [h]), r.isString(c) && c.length) {
2289
- if (c === ".")
2310
+ }, f.prototype.lookup = function(l, d, h) {
2311
+ if (typeof d == "boolean" ? (h = d, d = void 0) : d && !Array.isArray(d) && (d = [d]), r.isString(l) && l.length) {
2312
+ if (l === ".")
2290
2313
  return this.root;
2291
- c = c.split(".");
2292
- } else if (!c.length)
2314
+ l = l.split(".");
2315
+ } else if (!l.length)
2293
2316
  return this;
2294
- if (c[0] === "")
2295
- return this.root.lookup(c.slice(1), h);
2296
- var p = this.get(c[0]);
2317
+ if (l[0] === "")
2318
+ return this.root.lookup(l.slice(1), d);
2319
+ var p = this.get(l[0]);
2297
2320
  if (p) {
2298
- if (c.length === 1) {
2299
- if (!h || h.indexOf(p.constructor) > -1)
2321
+ if (l.length === 1) {
2322
+ if (!d || d.indexOf(p.constructor) > -1)
2300
2323
  return p;
2301
- } else if (p instanceof f && (p = p.lookup(c.slice(1), h, !0)))
2324
+ } else if (p instanceof f && (p = p.lookup(l.slice(1), d, !0)))
2302
2325
  return p;
2303
2326
  } else
2304
2327
  for (var v = 0; v < this.nestedArray.length; ++v)
2305
- if (this._nestedArray[v] instanceof f && (p = this._nestedArray[v].lookup(c, h, !0)))
2328
+ if (this._nestedArray[v] instanceof f && (p = this._nestedArray[v].lookup(l, d, !0)))
2306
2329
  return p;
2307
- return this.parent === null || d ? null : this.parent.lookup(c, h);
2308
- }, f.prototype.lookupType = function(c) {
2309
- var h = this.lookup(c, [o]);
2310
- if (!h)
2311
- throw Error("no such type: " + c);
2312
- return h;
2313
- }, f.prototype.lookupEnum = function(c) {
2314
- var h = this.lookup(c, [n]);
2315
- if (!h)
2316
- throw Error("no such Enum '" + c + "' in " + this);
2317
- return h;
2318
- }, f.prototype.lookupTypeOrEnum = function(c) {
2319
- var h = this.lookup(c, [o, n]);
2320
- if (!h)
2321
- throw Error("no such Type or Enum '" + c + "' in " + this);
2322
- return h;
2323
- }, f.prototype.lookupService = function(c) {
2324
- var h = this.lookup(c, [u]);
2325
- if (!h)
2326
- throw Error("no such Service '" + c + "' in " + this);
2327
- return h;
2328
- }, f._configure = function(l, c, h) {
2329
- o = l, u = c, n = h;
2330
+ return this.parent === null || h ? null : this.parent.lookup(l, d);
2331
+ }, f.prototype.lookupType = function(l) {
2332
+ var d = this.lookup(l, [u]);
2333
+ if (!d)
2334
+ throw Error("no such type: " + l);
2335
+ return d;
2336
+ }, f.prototype.lookupEnum = function(l) {
2337
+ var d = this.lookup(l, [n]);
2338
+ if (!d)
2339
+ throw Error("no such Enum '" + l + "' in " + this);
2340
+ return d;
2341
+ }, f.prototype.lookupTypeOrEnum = function(l) {
2342
+ var d = this.lookup(l, [u, n]);
2343
+ if (!d)
2344
+ throw Error("no such Type or Enum '" + l + "' in " + this);
2345
+ return d;
2346
+ }, f.prototype.lookupService = function(l) {
2347
+ var d = this.lookup(l, [o]);
2348
+ if (!d)
2349
+ throw Error("no such Service '" + l + "' in " + this);
2350
+ return d;
2351
+ }, f._configure = function(c, l, d) {
2352
+ u = c, o = l, n = d;
2330
2353
  }, namespace;
2331
2354
  }
2332
2355
  var mapfield, hasRequiredMapfield;
@@ -2336,15 +2359,15 @@ function requireMapfield() {
2336
2359
  var t = requireField();
2337
2360
  ((s.prototype = Object.create(t.prototype)).constructor = s).className = "MapField";
2338
2361
  var e = requireTypes(), r = requireUtil();
2339
- function s(o, u, n, a, f, i) {
2340
- if (t.call(this, o, u, a, void 0, void 0, f, i), !r.isString(n))
2362
+ function s(u, o, n, a, f, i) {
2363
+ if (t.call(this, u, o, a, void 0, void 0, f, i), !r.isString(n))
2341
2364
  throw TypeError("keyType must be a string");
2342
2365
  this.keyType = n, this.resolvedKeyType = null, this.map = !0;
2343
2366
  }
2344
- return s.fromJSON = function(u, n) {
2345
- return new s(u, n.id, n.keyType, n.type, n.options, n.comment);
2346
- }, s.prototype.toJSON = function(u) {
2347
- var n = u ? !!u.keepComments : !1;
2367
+ return s.fromJSON = function(o, n) {
2368
+ return new s(o, n.id, n.keyType, n.type, n.options, n.comment);
2369
+ }, s.prototype.toJSON = function(o) {
2370
+ var n = o ? !!o.keepComments : !1;
2348
2371
  return r.toObject([
2349
2372
  "keyType",
2350
2373
  this.keyType,
@@ -2365,9 +2388,9 @@ function requireMapfield() {
2365
2388
  if (e.mapKey[this.keyType] === void 0)
2366
2389
  throw Error("invalid key type: " + this.keyType);
2367
2390
  return t.prototype.resolve.call(this);
2368
- }, s.d = function(u, n, a) {
2369
- return typeof a == "function" ? a = r.decorateType(a).name : a && typeof a == "object" && (a = r.decorateEnum(a).name), function(i, l) {
2370
- r.decorateType(i.constructor).add(new s(l, u, n, a));
2391
+ }, s.d = function(o, n, a) {
2392
+ return typeof a == "function" ? a = r.decorateType(a).name : a && typeof a == "object" && (a = r.decorateEnum(a).name), function(i, c) {
2393
+ r.decorateType(i.constructor).add(new s(c, o, n, a));
2371
2394
  };
2372
2395
  }, mapfield;
2373
2396
  }
@@ -2378,19 +2401,19 @@ function requireMethod() {
2378
2401
  var t = requireObject();
2379
2402
  ((r.prototype = Object.create(t.prototype)).constructor = r).className = "Method";
2380
2403
  var e = requireUtil();
2381
- function r(s, o, u, n, a, f, i, l, c) {
2382
- if (e.isObject(a) ? (i = a, a = f = void 0) : e.isObject(f) && (i = f, f = void 0), !(o === void 0 || e.isString(o)))
2404
+ function r(s, u, o, n, a, f, i, c, l) {
2405
+ if (e.isObject(a) ? (i = a, a = f = void 0) : e.isObject(f) && (i = f, f = void 0), !(u === void 0 || e.isString(u)))
2383
2406
  throw TypeError("type must be a string");
2384
- if (!e.isString(u))
2407
+ if (!e.isString(o))
2385
2408
  throw TypeError("requestType must be a string");
2386
2409
  if (!e.isString(n))
2387
2410
  throw TypeError("responseType must be a string");
2388
- t.call(this, s, i), this.type = o || "rpc", this.requestType = u, this.requestStream = a ? !0 : void 0, this.responseType = n, this.responseStream = f ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = l, this.parsedOptions = c;
2411
+ t.call(this, s, i), this.type = u || "rpc", this.requestType = o, this.requestStream = a ? !0 : void 0, this.responseType = n, this.responseStream = f ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = c, this.parsedOptions = l;
2389
2412
  }
2390
- return r.fromJSON = function(o, u) {
2391
- return new r(o, u.type, u.requestType, u.responseType, u.requestStream, u.responseStream, u.options, u.comment, u.parsedOptions);
2392
- }, r.prototype.toJSON = function(o) {
2393
- var u = o ? !!o.keepComments : !1;
2413
+ return r.fromJSON = function(u, o) {
2414
+ return new r(u, o.type, o.requestType, o.responseType, o.requestStream, o.responseStream, o.options, o.comment, o.parsedOptions);
2415
+ }, r.prototype.toJSON = function(u) {
2416
+ var o = u ? !!u.keepComments : !1;
2394
2417
  return e.toObject([
2395
2418
  "type",
2396
2419
  this.type !== "rpc" && /* istanbul ignore next */
@@ -2406,7 +2429,7 @@ function requireMethod() {
2406
2429
  "options",
2407
2430
  this.options,
2408
2431
  "comment",
2409
- u ? this.comment : void 0,
2432
+ o ? this.comment : void 0,
2410
2433
  "parsedOptions",
2411
2434
  this.parsedOptions
2412
2435
  ]);
@@ -2417,20 +2440,20 @@ function requireMethod() {
2417
2440
  var service, hasRequiredService;
2418
2441
  function requireService() {
2419
2442
  if (hasRequiredService) return service;
2420
- hasRequiredService = 1, service = o;
2443
+ hasRequiredService = 1, service = u;
2421
2444
  var t = requireNamespace();
2422
- ((o.prototype = Object.create(t.prototype)).constructor = o).className = "Service";
2445
+ ((u.prototype = Object.create(t.prototype)).constructor = u).className = "Service";
2423
2446
  var e = requireMethod(), r = requireUtil(), s = rpc;
2424
- function o(n, a) {
2447
+ function u(n, a) {
2425
2448
  t.call(this, n, a), this.methods = {}, this._methodsArray = null;
2426
2449
  }
2427
- o.fromJSON = function(a, f) {
2428
- var i = new o(a, f.options);
2450
+ u.fromJSON = function(a, f) {
2451
+ var i = new u(a, f.options);
2429
2452
  if (f.methods)
2430
- for (var l = Object.keys(f.methods), c = 0; c < l.length; ++c)
2431
- i.add(e.fromJSON(l[c], f.methods[l[c]]));
2453
+ for (var c = Object.keys(f.methods), l = 0; l < c.length; ++l)
2454
+ i.add(e.fromJSON(c[l], f.methods[c[l]]));
2432
2455
  return f.nested && i.addJSON(f.nested), i.comment = f.comment, i;
2433
- }, o.prototype.toJSON = function(a) {
2456
+ }, u.prototype.toJSON = function(a) {
2434
2457
  var f = t.prototype.toJSON.call(this, a), i = a ? !!a.keepComments : !1;
2435
2458
  return r.toObject([
2436
2459
  "options",
@@ -2443,45 +2466,45 @@ function requireService() {
2443
2466
  "comment",
2444
2467
  i ? this.comment : void 0
2445
2468
  ]);
2446
- }, Object.defineProperty(o.prototype, "methodsArray", {
2469
+ }, Object.defineProperty(u.prototype, "methodsArray", {
2447
2470
  get: function() {
2448
2471
  return this._methodsArray || (this._methodsArray = r.toArray(this.methods));
2449
2472
  }
2450
2473
  });
2451
- function u(n) {
2474
+ function o(n) {
2452
2475
  return n._methodsArray = null, n;
2453
2476
  }
2454
- return o.prototype.get = function(a) {
2477
+ return u.prototype.get = function(a) {
2455
2478
  return this.methods[a] || t.prototype.get.call(this, a);
2456
- }, o.prototype.resolveAll = function() {
2479
+ }, u.prototype.resolveAll = function() {
2457
2480
  for (var a = this.methodsArray, f = 0; f < a.length; ++f)
2458
2481
  a[f].resolve();
2459
2482
  return t.prototype.resolve.call(this);
2460
- }, o.prototype.add = function(a) {
2483
+ }, u.prototype.add = function(a) {
2461
2484
  if (this.get(a.name))
2462
2485
  throw Error("duplicate name '" + a.name + "' in " + this);
2463
- return a instanceof e ? (this.methods[a.name] = a, a.parent = this, u(this)) : t.prototype.add.call(this, a);
2464
- }, o.prototype.remove = function(a) {
2486
+ return a instanceof e ? (this.methods[a.name] = a, a.parent = this, o(this)) : t.prototype.add.call(this, a);
2487
+ }, u.prototype.remove = function(a) {
2465
2488
  if (a instanceof e) {
2466
2489
  if (this.methods[a.name] !== a)
2467
2490
  throw Error(a + " is not a member of " + this);
2468
- return delete this.methods[a.name], a.parent = null, u(this);
2491
+ return delete this.methods[a.name], a.parent = null, o(this);
2469
2492
  }
2470
2493
  return t.prototype.remove.call(this, a);
2471
- }, o.prototype.create = function(a, f, i) {
2472
- for (var l = new s.Service(a, f, i), c = 0, h; c < /* initializes */
2473
- this.methodsArray.length; ++c) {
2474
- var d = r.lcFirst((h = this._methodsArray[c]).resolve().name).replace(/[^$\w_]/g, "");
2475
- l[d] = r.codegen(["r", "c"], r.isReserved(d) ? d + "_" : d)("return this.rpcCall(m,q,s,r,c)")({
2476
- m: h,
2477
- q: h.resolvedRequestType.ctor,
2478
- s: h.resolvedResponseType.ctor
2494
+ }, u.prototype.create = function(a, f, i) {
2495
+ for (var c = new s.Service(a, f, i), l = 0, d; l < /* initializes */
2496
+ this.methodsArray.length; ++l) {
2497
+ var h = r.lcFirst((d = this._methodsArray[l]).resolve().name).replace(/[^$\w_]/g, "");
2498
+ c[h] = r.codegen(["r", "c"], r.isReserved(h) ? h + "_" : h)("return this.rpcCall(m,q,s,r,c)")({
2499
+ m: d,
2500
+ q: d.resolvedRequestType.ctor,
2501
+ s: d.resolvedResponseType.ctor
2479
2502
  });
2480
2503
  }
2481
- return l;
2504
+ return c;
2482
2505
  }, service;
2483
2506
  }
2484
- var message = Message, util = requireMinimal();
2507
+ var message$1 = Message, util = requireMinimal();
2485
2508
  function Message(t) {
2486
2509
  if (t)
2487
2510
  for (var e = Object.keys(t), r = 0; r < e.length; ++r)
@@ -2517,24 +2540,24 @@ Message.prototype.toJSON = function t() {
2517
2540
  var decoder_1, hasRequiredDecoder;
2518
2541
  function requireDecoder() {
2519
2542
  if (hasRequiredDecoder) return decoder_1;
2520
- hasRequiredDecoder = 1, decoder_1 = o;
2543
+ hasRequiredDecoder = 1, decoder_1 = u;
2521
2544
  var t = require_enum(), e = requireTypes(), r = requireUtil();
2522
- function s(u) {
2523
- return "missing required '" + u.name + "'";
2545
+ function s(o) {
2546
+ return "missing required '" + o.name + "'";
2524
2547
  }
2525
- function o(u) {
2526
- var n = r.codegen(["r", "l"], u.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (u.fieldsArray.filter(function(h) {
2527
- return h.map;
2548
+ function u(o) {
2549
+ var n = r.codegen(["r", "l"], o.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (o.fieldsArray.filter(function(d) {
2550
+ return d.map;
2528
2551
  }).length ? ",k,value" : ""))("while(r.pos<c){")("var t=r.uint32()");
2529
- u.group && n("if((t&7)===4)")("break"), n("switch(t>>>3){");
2552
+ o.group && n("if((t&7)===4)")("break"), n("switch(t>>>3){");
2530
2553
  for (var a = 0; a < /* initializes */
2531
- u.fieldsArray.length; ++a) {
2532
- var f = u._fieldsArray[a].resolve(), i = f.resolvedType instanceof t ? "int32" : f.type, l = "m" + r.safeProp(f.name);
2533
- n("case %i: {", f.id), f.map ? (n("if(%s===util.emptyObject)", l)("%s={}", l)("var c2 = r.uint32()+r.pos"), e.defaults[f.keyType] !== void 0 ? n("k=%j", e.defaults[f.keyType]) : n("k=null"), e.defaults[i] !== void 0 ? n("value=%j", e.defaults[i]) : n("value=null"), n("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break", f.keyType)("case 2:"), e.basic[i] === void 0 ? n("value=types[%i].decode(r,r.uint32())", a) : n("value=r.%s()", i), n("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), e.long[f.keyType] !== void 0 ? n('%s[typeof k==="object"?util.longToHash(k):k]=value', l) : n("%s[k]=value", l)) : f.repeated ? (n("if(!(%s&&%s.length))", l, l)("%s=[]", l), e.packed[i] !== void 0 && n("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", l, i)("}else"), e.basic[i] === void 0 ? n(f.resolvedType.group ? "%s.push(types[%i].decode(r))" : "%s.push(types[%i].decode(r,r.uint32()))", l, a) : n("%s.push(r.%s())", l, i)) : e.basic[i] === void 0 ? n(f.resolvedType.group ? "%s=types[%i].decode(r)" : "%s=types[%i].decode(r,r.uint32())", l, a) : n("%s=r.%s()", l, i), n("break")("}");
2554
+ o.fieldsArray.length; ++a) {
2555
+ var f = o._fieldsArray[a].resolve(), i = f.resolvedType instanceof t ? "int32" : f.type, c = "m" + r.safeProp(f.name);
2556
+ n("case %i: {", f.id), f.map ? (n("if(%s===util.emptyObject)", c)("%s={}", c)("var c2 = r.uint32()+r.pos"), e.defaults[f.keyType] !== void 0 ? n("k=%j", e.defaults[f.keyType]) : n("k=null"), e.defaults[i] !== void 0 ? n("value=%j", e.defaults[i]) : n("value=null"), n("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break", f.keyType)("case 2:"), e.basic[i] === void 0 ? n("value=types[%i].decode(r,r.uint32())", a) : n("value=r.%s()", i), n("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), e.long[f.keyType] !== void 0 ? n('%s[typeof k==="object"?util.longToHash(k):k]=value', c) : n("%s[k]=value", c)) : f.repeated ? (n("if(!(%s&&%s.length))", c, c)("%s=[]", c), e.packed[i] !== void 0 && n("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", c, i)("}else"), e.basic[i] === void 0 ? n(f.resolvedType.group ? "%s.push(types[%i].decode(r))" : "%s.push(types[%i].decode(r,r.uint32()))", c, a) : n("%s.push(r.%s())", c, i)) : e.basic[i] === void 0 ? n(f.resolvedType.group ? "%s=types[%i].decode(r)" : "%s=types[%i].decode(r,r.uint32())", c, a) : n("%s=r.%s()", c, i), n("break")("}");
2534
2557
  }
2535
- for (n("default:")("r.skipType(t&7)")("break")("}")("}"), a = 0; a < u._fieldsArray.length; ++a) {
2536
- var c = u._fieldsArray[a];
2537
- c.required && n("if(!m.hasOwnProperty(%j))", c.name)("throw util.ProtocolError(%j,{instance:m})", s(c));
2558
+ for (n("default:")("r.skipType(t&7)")("break")("}")("}"), a = 0; a < o._fieldsArray.length; ++a) {
2559
+ var l = o._fieldsArray[a];
2560
+ l.required && n("if(!m.hasOwnProperty(%j))", l.name)("throw util.ProtocolError(%j,{instance:m})", s(l));
2538
2561
  }
2539
2562
  return n("return m");
2540
2563
  }
@@ -2543,7 +2566,7 @@ function requireDecoder() {
2543
2566
  var verifier_1, hasRequiredVerifier;
2544
2567
  function requireVerifier() {
2545
2568
  if (hasRequiredVerifier) return verifier_1;
2546
- hasRequiredVerifier = 1, verifier_1 = u;
2569
+ hasRequiredVerifier = 1, verifier_1 = o;
2547
2570
  var t = require_enum(), e = requireUtil();
2548
2571
  function r(n, a) {
2549
2572
  return n.name + ": " + a + (n.repeated && a !== "array" ? "[]" : n.map && a !== "object" ? "{k:" + n.keyType + "}" : "") + " expected";
@@ -2552,7 +2575,7 @@ function requireVerifier() {
2552
2575
  if (a.resolvedType)
2553
2576
  if (a.resolvedType instanceof t) {
2554
2577
  n("switch(%s){", i)("default:")("return%j", r(a, "enum value"));
2555
- for (var l = Object.keys(a.resolvedType.values), c = 0; c < l.length; ++c) n("case %i:", a.resolvedType.values[l[c]]);
2578
+ for (var c = Object.keys(a.resolvedType.values), l = 0; l < c.length; ++l) n("case %i:", a.resolvedType.values[c[l]]);
2556
2579
  n("break")("}");
2557
2580
  } else
2558
2581
  n("{")("var e=types[%i].verify(%s);", f, i)("if(e)")("return%j+e", a.name + ".")("}");
@@ -2588,7 +2611,7 @@ function requireVerifier() {
2588
2611
  }
2589
2612
  return n;
2590
2613
  }
2591
- function o(n, a, f) {
2614
+ function u(n, a, f) {
2592
2615
  switch (a.keyType) {
2593
2616
  case "int32":
2594
2617
  case "uint32":
@@ -2610,24 +2633,24 @@ function requireVerifier() {
2610
2633
  }
2611
2634
  return n;
2612
2635
  }
2613
- function u(n) {
2636
+ function o(n) {
2614
2637
  var a = e.codegen(["m"], n.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected"), f = n.oneofsArray, i = {};
2615
2638
  f.length && a("var p={}");
2616
- for (var l = 0; l < /* initializes */
2617
- n.fieldsArray.length; ++l) {
2618
- var c = n._fieldsArray[l].resolve(), h = "m" + e.safeProp(c.name);
2619
- if (c.optional && a("if(%s!=null&&m.hasOwnProperty(%j)){", h, c.name), c.map)
2620
- a("if(!util.isObject(%s))", h)("return%j", r(c, "object"))("var k=Object.keys(%s)", h)("for(var i=0;i<k.length;++i){"), o(a, c, "k[i]"), s(a, c, l, h + "[k[i]]")("}");
2621
- else if (c.repeated)
2622
- a("if(!Array.isArray(%s))", h)("return%j", r(c, "array"))("for(var i=0;i<%s.length;++i){", h), s(a, c, l, h + "[i]")("}");
2639
+ for (var c = 0; c < /* initializes */
2640
+ n.fieldsArray.length; ++c) {
2641
+ var l = n._fieldsArray[c].resolve(), d = "m" + e.safeProp(l.name);
2642
+ if (l.optional && a("if(%s!=null&&m.hasOwnProperty(%j)){", d, l.name), l.map)
2643
+ a("if(!util.isObject(%s))", d)("return%j", r(l, "object"))("var k=Object.keys(%s)", d)("for(var i=0;i<k.length;++i){"), u(a, l, "k[i]"), s(a, l, c, d + "[k[i]]")("}");
2644
+ else if (l.repeated)
2645
+ a("if(!Array.isArray(%s))", d)("return%j", r(l, "array"))("for(var i=0;i<%s.length;++i){", d), s(a, l, c, d + "[i]")("}");
2623
2646
  else {
2624
- if (c.partOf) {
2625
- var d = e.safeProp(c.partOf.name);
2626
- i[c.partOf.name] === 1 && a("if(p%s===1)", d)("return%j", c.partOf.name + ": multiple values"), i[c.partOf.name] = 1, a("p%s=1", d);
2647
+ if (l.partOf) {
2648
+ var h = e.safeProp(l.partOf.name);
2649
+ i[l.partOf.name] === 1 && a("if(p%s===1)", h)("return%j", l.partOf.name + ": multiple values"), i[l.partOf.name] = 1, a("p%s=1", h);
2627
2650
  }
2628
- s(a, c, l, h);
2651
+ s(a, l, c, d);
2629
2652
  }
2630
- c.optional && a("}");
2653
+ l.optional && a("}");
2631
2654
  }
2632
2655
  return a("return null");
2633
2656
  }
@@ -2637,13 +2660,13 @@ var converter = {}, hasRequiredConverter;
2637
2660
  function requireConverter() {
2638
2661
  return hasRequiredConverter || (hasRequiredConverter = 1, function(t) {
2639
2662
  var e = t, r = require_enum(), s = requireUtil();
2640
- function o(n, a, f, i) {
2641
- var l = !1;
2663
+ function u(n, a, f, i) {
2664
+ var c = !1;
2642
2665
  if (a.resolvedType)
2643
2666
  if (a.resolvedType instanceof r) {
2644
2667
  n("switch(d%s){", i);
2645
- for (var c = a.resolvedType.values, h = Object.keys(c), d = 0; d < h.length; ++d)
2646
- c[h[d]] === a.typeDefault && !l && (n("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', i, i, i), a.repeated || n("break"), l = !0), n("case%j:", h[d])("case %i:", c[h[d]])("m%s=%j", i, c[h[d]])("break");
2668
+ for (var l = a.resolvedType.values, d = Object.keys(l), h = 0; h < d.length; ++h)
2669
+ l[d[h]] === a.typeDefault && !c && (n("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', i, i, i), a.repeated || n("break"), c = !0), n("case%j:", d[h])("case %i:", l[d[h]])("m%s=%j", i, l[d[h]])("break");
2647
2670
  n("}");
2648
2671
  } else n('if(typeof d%s!=="object")', i)("throw TypeError(%j)", a.fullName + ": object expected")("m%s=types[%i].fromObject(d%s)", i, f, i);
2649
2672
  else {
@@ -2687,47 +2710,47 @@ function requireConverter() {
2687
2710
  var f = a.fieldsArray, i = s.codegen(["d"], a.name + "$fromObject")("if(d instanceof this.ctor)")("return d");
2688
2711
  if (!f.length) return i("return new this.ctor");
2689
2712
  i("var m=new this.ctor");
2690
- for (var l = 0; l < f.length; ++l) {
2691
- var c = f[l].resolve(), h = s.safeProp(c.name);
2692
- c.map ? (i("if(d%s){", h)('if(typeof d%s!=="object")', h)("throw TypeError(%j)", c.fullName + ": object expected")("m%s={}", h)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", h), o(
2713
+ for (var c = 0; c < f.length; ++c) {
2714
+ var l = f[c].resolve(), d = s.safeProp(l.name);
2715
+ l.map ? (i("if(d%s){", d)('if(typeof d%s!=="object")', d)("throw TypeError(%j)", l.fullName + ": object expected")("m%s={}", d)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", d), u(
2693
2716
  i,
2694
- c,
2695
- /* not sorted */
2696
2717
  l,
2697
- h + "[ks[i]]"
2698
- )("}")("}")) : c.repeated ? (i("if(d%s){", h)("if(!Array.isArray(d%s))", h)("throw TypeError(%j)", c.fullName + ": array expected")("m%s=[]", h)("for(var i=0;i<d%s.length;++i){", h), o(
2699
- i,
2700
- c,
2701
2718
  /* not sorted */
2702
- l,
2703
- h + "[i]"
2704
- )("}")("}")) : (c.resolvedType instanceof r || i("if(d%s!=null){", h), o(
2705
- i,
2706
2719
  c,
2720
+ d + "[ks[i]]"
2721
+ )("}")("}")) : l.repeated ? (i("if(d%s){", d)("if(!Array.isArray(d%s))", d)("throw TypeError(%j)", l.fullName + ": array expected")("m%s=[]", d)("for(var i=0;i<d%s.length;++i){", d), u(
2722
+ i,
2723
+ l,
2707
2724
  /* not sorted */
2725
+ c,
2726
+ d + "[i]"
2727
+ )("}")("}")) : (l.resolvedType instanceof r || i("if(d%s!=null){", d), u(
2728
+ i,
2708
2729
  l,
2709
- h
2710
- ), c.resolvedType instanceof r || i("}"));
2730
+ /* not sorted */
2731
+ c,
2732
+ d
2733
+ ), l.resolvedType instanceof r || i("}"));
2711
2734
  }
2712
2735
  return i("return m");
2713
2736
  };
2714
- function u(n, a, f, i) {
2737
+ function o(n, a, f, i) {
2715
2738
  if (a.resolvedType)
2716
2739
  a.resolvedType instanceof r ? n("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s", i, f, i, i, f, i, i) : n("d%s=types[%i].toObject(m%s,o)", i, f, i);
2717
2740
  else {
2718
- var l = !1;
2741
+ var c = !1;
2719
2742
  switch (a.type) {
2720
2743
  case "double":
2721
2744
  case "float":
2722
2745
  n("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", i, i, i, i);
2723
2746
  break;
2724
2747
  case "uint64":
2725
- l = !0;
2748
+ c = !0;
2726
2749
  case "int64":
2727
2750
  case "sint64":
2728
2751
  case "fixed64":
2729
2752
  case "sfixed64":
2730
- n('if(typeof m%s==="number")', i)("d%s=o.longs===String?String(m%s):m%s", i, i, i)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", i, i, i, i, l ? "true" : "", i);
2753
+ n('if(typeof m%s==="number")', i)("d%s=o.longs===String?String(m%s):m%s", i, i, i)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", i, i, i, i, c ? "true" : "", i);
2731
2754
  break;
2732
2755
  case "bytes":
2733
2756
  n("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", i, i, i, i, i);
@@ -2743,19 +2766,19 @@ function requireConverter() {
2743
2766
  var f = a.fieldsArray.slice().sort(s.compareFieldsById);
2744
2767
  if (!f.length)
2745
2768
  return s.codegen()("return {}");
2746
- for (var i = s.codegen(["m", "o"], a.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], c = [], h = [], d = 0; d < f.length; ++d)
2747
- f[d].partOf || (f[d].resolve().repeated ? l : f[d].map ? c : h).push(f[d]);
2748
- if (l.length) {
2749
- for (i("if(o.arrays||o.defaults){"), d = 0; d < l.length; ++d) i("d%s=[]", s.safeProp(l[d].name));
2769
+ for (var i = s.codegen(["m", "o"], a.name + "$toObject")("if(!o)")("o={}")("var d={}"), c = [], l = [], d = [], h = 0; h < f.length; ++h)
2770
+ f[h].partOf || (f[h].resolve().repeated ? c : f[h].map ? l : d).push(f[h]);
2771
+ if (c.length) {
2772
+ for (i("if(o.arrays||o.defaults){"), h = 0; h < c.length; ++h) i("d%s=[]", s.safeProp(c[h].name));
2750
2773
  i("}");
2751
2774
  }
2752
- if (c.length) {
2753
- for (i("if(o.objects||o.defaults){"), d = 0; d < c.length; ++d) i("d%s={}", s.safeProp(c[d].name));
2775
+ if (l.length) {
2776
+ for (i("if(o.objects||o.defaults){"), h = 0; h < l.length; ++h) i("d%s={}", s.safeProp(l[h].name));
2754
2777
  i("}");
2755
2778
  }
2756
- if (h.length) {
2757
- for (i("if(o.defaults){"), d = 0; d < h.length; ++d) {
2758
- var p = h[d], v = s.safeProp(p.name);
2779
+ if (d.length) {
2780
+ for (i("if(o.defaults){"), h = 0; h < d.length; ++h) {
2781
+ var p = d[h], v = s.safeProp(p.name);
2759
2782
  if (p.resolvedType instanceof r) i("d%s=o.enums===String?%j:%j", v, p.resolvedType.valuesById[p.typeDefault], p.typeDefault);
2760
2783
  else if (p.long) i("if(util.Long){")("var n=new util.Long(%i,%i,%j)", p.typeDefault.low, p.typeDefault.high, p.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", v)("}else")("d%s=o.longs===String?%j:%i", v, p.typeDefault.toString(), p.typeDefault.toNumber());
2761
2784
  else if (p.bytes) {
@@ -2766,21 +2789,21 @@ function requireConverter() {
2766
2789
  i("}");
2767
2790
  }
2768
2791
  var m = !1;
2769
- for (d = 0; d < f.length; ++d) {
2770
- var p = f[d], _ = a._fieldsArray.indexOf(p), v = s.safeProp(p.name);
2771
- p.map ? (m || (m = !0, i("var ks2")), i("if(m%s&&(ks2=Object.keys(m%s)).length){", v, v)("d%s={}", v)("for(var j=0;j<ks2.length;++j){"), u(
2792
+ for (h = 0; h < f.length; ++h) {
2793
+ var p = f[h], _ = a._fieldsArray.indexOf(p), v = s.safeProp(p.name);
2794
+ p.map ? (m || (m = !0, i("var ks2")), i("if(m%s&&(ks2=Object.keys(m%s)).length){", v, v)("d%s={}", v)("for(var j=0;j<ks2.length;++j){"), o(
2772
2795
  i,
2773
2796
  p,
2774
2797
  /* sorted */
2775
2798
  _,
2776
2799
  v + "[ks2[j]]"
2777
- )("}")) : p.repeated ? (i("if(m%s&&m%s.length){", v, v)("d%s=[]", v)("for(var j=0;j<m%s.length;++j){", v), u(
2800
+ )("}")) : p.repeated ? (i("if(m%s&&m%s.length){", v, v)("d%s=[]", v)("for(var j=0;j<m%s.length;++j){", v), o(
2778
2801
  i,
2779
2802
  p,
2780
2803
  /* sorted */
2781
2804
  _,
2782
2805
  v + "[j]"
2783
- )("}")) : (i("if(m%s!=null&&m.hasOwnProperty(%j)){", v, p.name), u(
2806
+ )("}")) : (i("if(m%s!=null&&m.hasOwnProperty(%j)){", v, p.name), o(
2784
2807
  i,
2785
2808
  p,
2786
2809
  /* sorted */
@@ -2794,33 +2817,33 @@ function requireConverter() {
2794
2817
  }
2795
2818
  var wrappers = {};
2796
2819
  (function(t) {
2797
- var e = t, r = message;
2820
+ var e = t, r = message$1;
2798
2821
  e[".google.protobuf.Any"] = {
2799
2822
  fromObject: function(s) {
2800
2823
  if (s && s["@type"]) {
2801
- var o = s["@type"].substring(s["@type"].lastIndexOf("/") + 1), u = this.lookup(o);
2802
- if (u) {
2824
+ var u = s["@type"].substring(s["@type"].lastIndexOf("/") + 1), o = this.lookup(u);
2825
+ if (o) {
2803
2826
  var n = s["@type"].charAt(0) === "." ? s["@type"].slice(1) : s["@type"];
2804
2827
  return n.indexOf("/") === -1 && (n = "/" + n), this.create({
2805
2828
  type_url: n,
2806
- value: u.encode(u.fromObject(s)).finish()
2829
+ value: o.encode(o.fromObject(s)).finish()
2807
2830
  });
2808
2831
  }
2809
2832
  }
2810
2833
  return this.fromObject(s);
2811
2834
  },
2812
- toObject: function(s, o) {
2813
- var u = "type.googleapis.com/", n = "", a = "";
2814
- if (o && o.json && s.type_url && s.value) {
2835
+ toObject: function(s, u) {
2836
+ var o = "type.googleapis.com/", n = "", a = "";
2837
+ if (u && u.json && s.type_url && s.value) {
2815
2838
  a = s.type_url.substring(s.type_url.lastIndexOf("/") + 1), n = s.type_url.substring(0, s.type_url.lastIndexOf("/") + 1);
2816
2839
  var f = this.lookup(a);
2817
2840
  f && (s = f.decode(s.value));
2818
2841
  }
2819
2842
  if (!(s instanceof this.ctor) && s instanceof r) {
2820
- var i = s.$type.toObject(s, o), l = s.$type.fullName[0] === "." ? s.$type.fullName.slice(1) : s.$type.fullName;
2821
- return n === "" && (n = u), a = n + l, i["@type"] = a, i;
2843
+ var i = s.$type.toObject(s, u), c = s.$type.fullName[0] === "." ? s.$type.fullName.slice(1) : s.$type.fullName;
2844
+ return n === "" && (n = o), a = n + c, i["@type"] = a, i;
2822
2845
  }
2823
- return this.toObject(s, o);
2846
+ return this.toObject(s, u);
2824
2847
  }
2825
2848
  };
2826
2849
  })(wrappers);
@@ -2830,7 +2853,7 @@ function requireType() {
2830
2853
  hasRequiredType = 1, type = v;
2831
2854
  var t = requireNamespace();
2832
2855
  ((v.prototype = Object.create(t.prototype)).constructor = v).className = "Type";
2833
- var e = require_enum(), r = requireOneof(), s = requireField(), o = requireMapfield(), u = requireService(), n = message, a = reader, f = writer, i = requireUtil(), l = requireEncoder(), c = requireDecoder(), h = requireVerifier(), d = requireConverter(), p = wrappers;
2856
+ var e = require_enum(), r = requireOneof(), s = requireField(), u = requireMapfield(), o = requireService(), n = message$1, a = reader, f = writer, i = requireUtil(), c = requireEncoder(), l = requireDecoder(), d = requireVerifier(), h = requireConverter(), p = wrappers;
2834
2857
  function v(m, _) {
2835
2858
  t.call(this, m, _), this.fields = {}, this.oneofs = void 0, this.extensions = void 0, this.reserved = void 0, this.group = void 0, this._fieldsById = null, this._fieldsArray = null, this._oneofsArray = null, this._ctor = null;
2836
2859
  }
@@ -2916,7 +2939,7 @@ function requireType() {
2916
2939
  b.extensions = y.extensions, b.reserved = y.reserved;
2917
2940
  for (var O = Object.keys(y.fields), E = 0; E < O.length; ++E)
2918
2941
  b.add(
2919
- (typeof y.fields[O[E]].keyType < "u" ? o.fromJSON : s.fromJSON)(O[E], y.fields[O[E]])
2942
+ (typeof y.fields[O[E]].keyType < "u" ? u.fromJSON : s.fromJSON)(O[E], y.fields[O[E]])
2920
2943
  );
2921
2944
  if (y.oneofs)
2922
2945
  for (O = Object.keys(y.oneofs), E = 0; E < O.length; ++E)
@@ -2926,7 +2949,7 @@ function requireType() {
2926
2949
  var x = y.nested[O[E]];
2927
2950
  b.add(
2928
2951
  // most to least likely
2929
- (x.id !== void 0 ? s.fromJSON : x.fields !== void 0 ? v.fromJSON : x.values !== void 0 ? e.fromJSON : x.methods !== void 0 ? u.fromJSON : t.fromJSON)(O[E], x)
2952
+ (x.id !== void 0 ? s.fromJSON : x.fields !== void 0 ? v.fromJSON : x.values !== void 0 ? e.fromJSON : x.methods !== void 0 ? o.fromJSON : t.fromJSON)(O[E], x)
2930
2953
  );
2931
2954
  }
2932
2955
  return y.extensions && y.extensions.length && (b.extensions = y.extensions), y.reserved && y.reserved.length && (b.reserved = y.reserved), y.group && (b.group = !0), y.comment && (b.comment = y.comment), b;
@@ -2999,21 +3022,21 @@ function requireType() {
2999
3022
  for (var _ = this.fullName, y = [], b = 0; b < /* initializes */
3000
3023
  this.fieldsArray.length; ++b)
3001
3024
  y.push(this._fieldsArray[b].resolve().resolvedType);
3002
- this.encode = l(this)({
3025
+ this.encode = c(this)({
3003
3026
  Writer: f,
3004
3027
  types: y,
3005
3028
  util: i
3006
- }), this.decode = c(this)({
3029
+ }), this.decode = l(this)({
3007
3030
  Reader: a,
3008
3031
  types: y,
3009
3032
  util: i
3010
- }), this.verify = h(this)({
3033
+ }), this.verify = d(this)({
3011
3034
  types: y,
3012
3035
  util: i
3013
- }), this.fromObject = d.fromObject(this)({
3036
+ }), this.fromObject = h.fromObject(this)({
3014
3037
  types: y,
3015
3038
  util: i
3016
- }), this.toObject = d.toObject(this)({
3039
+ }), this.toObject = h.toObject(this)({
3017
3040
  types: y,
3018
3041
  util: i
3019
3042
  });
@@ -3049,20 +3072,20 @@ function requireRoot() {
3049
3072
  hasRequiredRoot = 1, root = f;
3050
3073
  var t = requireNamespace();
3051
3074
  ((f.prototype = Object.create(t.prototype)).constructor = f).className = "Root";
3052
- var e = requireField(), r = require_enum(), s = requireOneof(), o = requireUtil(), u, n, a;
3053
- function f(h) {
3054
- t.call(this, "", h), this.deferred = [], this.files = [];
3075
+ var e = requireField(), r = require_enum(), s = requireOneof(), u = requireUtil(), o, n, a;
3076
+ function f(d) {
3077
+ t.call(this, "", d), this.deferred = [], this.files = [];
3055
3078
  }
3056
- f.fromJSON = function(d, p) {
3057
- return p || (p = new f()), d.options && p.setOptions(d.options), p.addJSON(d.nested);
3058
- }, f.prototype.resolvePath = o.path.resolve, f.prototype.fetch = o.fetch;
3079
+ f.fromJSON = function(h, p) {
3080
+ return p || (p = new f()), h.options && p.setOptions(h.options), p.addJSON(h.nested);
3081
+ }, f.prototype.resolvePath = u.path.resolve, f.prototype.fetch = u.fetch;
3059
3082
  function i() {
3060
3083
  }
3061
- f.prototype.load = function h(d, p, v) {
3084
+ f.prototype.load = function d(h, p, v) {
3062
3085
  typeof p == "function" && (v = p, p = void 0);
3063
3086
  var g = this;
3064
3087
  if (!v)
3065
- return o.asPromise(h, g, d, p);
3088
+ return u.asPromise(d, g, h, p);
3066
3089
  var m = v === i;
3067
3090
  function _(R, q) {
3068
3091
  if (v) {
@@ -3082,7 +3105,7 @@ function requireRoot() {
3082
3105
  }
3083
3106
  function b(R, q) {
3084
3107
  try {
3085
- if (o.isString(q) && q.charAt(0) === "{" && (q = JSON.parse(q)), !o.isString(q))
3108
+ if (u.isString(q) && q.charAt(0) === "{" && (q = JSON.parse(q)), !u.isString(q))
3086
3109
  g.setOptions(q.options).addJSON(q.nested);
3087
3110
  else {
3088
3111
  n.filename = R;
@@ -3110,7 +3133,7 @@ function requireRoot() {
3110
3133
  if (m) {
3111
3134
  var A;
3112
3135
  try {
3113
- A = o.fs.readFileSync(R).toString("utf8");
3136
+ A = u.fs.readFileSync(R).toString("utf8");
3114
3137
  } catch (F) {
3115
3138
  q || _(F);
3116
3139
  return;
@@ -3129,73 +3152,73 @@ function requireRoot() {
3129
3152
  }
3130
3153
  }
3131
3154
  var E = 0;
3132
- o.isString(d) && (d = [d]);
3133
- for (var x = 0, P; x < d.length; ++x)
3134
- (P = g.resolvePath("", d[x])) && O(P);
3155
+ u.isString(h) && (h = [h]);
3156
+ for (var x = 0, P; x < h.length; ++x)
3157
+ (P = g.resolvePath("", h[x])) && O(P);
3135
3158
  if (m)
3136
3159
  return g;
3137
3160
  E || _(null, g);
3138
- }, f.prototype.loadSync = function(d, p) {
3139
- if (!o.isNode)
3161
+ }, f.prototype.loadSync = function(h, p) {
3162
+ if (!u.isNode)
3140
3163
  throw Error("not supported");
3141
- return this.load(d, p, i);
3164
+ return this.load(h, p, i);
3142
3165
  }, f.prototype.resolveAll = function() {
3143
3166
  if (this.deferred.length)
3144
- throw Error("unresolvable extensions: " + this.deferred.map(function(d) {
3145
- return "'extend " + d.extend + "' in " + d.parent.fullName;
3167
+ throw Error("unresolvable extensions: " + this.deferred.map(function(h) {
3168
+ return "'extend " + h.extend + "' in " + h.parent.fullName;
3146
3169
  }).join(", "));
3147
3170
  return t.prototype.resolveAll.call(this);
3148
3171
  };
3149
- var l = /^[A-Z]/;
3150
- function c(h, d) {
3151
- var p = d.parent.lookup(d.extend);
3172
+ var c = /^[A-Z]/;
3173
+ function l(d, h) {
3174
+ var p = h.parent.lookup(h.extend);
3152
3175
  if (p) {
3153
- var v = new e(d.fullName, d.id, d.type, d.rule, void 0, d.options);
3154
- return p.get(v.name) || (v.declaringField = d, d.extensionField = v, p.add(v)), !0;
3176
+ var v = new e(h.fullName, h.id, h.type, h.rule, void 0, h.options);
3177
+ return p.get(v.name) || (v.declaringField = h, h.extensionField = v, p.add(v)), !0;
3155
3178
  }
3156
3179
  return !1;
3157
3180
  }
3158
- return f.prototype._handleAdd = function(d) {
3159
- if (d instanceof e)
3181
+ return f.prototype._handleAdd = function(h) {
3182
+ if (h instanceof e)
3160
3183
  /* an extension field (implies not part of a oneof) */
3161
- d.extend !== void 0 && /* not already handled */
3162
- !d.extensionField && (c(this, d) || this.deferred.push(d));
3163
- else if (d instanceof r)
3164
- l.test(d.name) && (d.parent[d.name] = d.values);
3165
- else if (!(d instanceof s)) {
3166
- if (d instanceof u)
3184
+ h.extend !== void 0 && /* not already handled */
3185
+ !h.extensionField && (l(this, h) || this.deferred.push(h));
3186
+ else if (h instanceof r)
3187
+ c.test(h.name) && (h.parent[h.name] = h.values);
3188
+ else if (!(h instanceof s)) {
3189
+ if (h instanceof o)
3167
3190
  for (var p = 0; p < this.deferred.length; )
3168
- c(this, this.deferred[p]) ? this.deferred.splice(p, 1) : ++p;
3191
+ l(this, this.deferred[p]) ? this.deferred.splice(p, 1) : ++p;
3169
3192
  for (var v = 0; v < /* initializes */
3170
- d.nestedArray.length; ++v)
3171
- this._handleAdd(d._nestedArray[v]);
3172
- l.test(d.name) && (d.parent[d.name] = d);
3193
+ h.nestedArray.length; ++v)
3194
+ this._handleAdd(h._nestedArray[v]);
3195
+ c.test(h.name) && (h.parent[h.name] = h);
3173
3196
  }
3174
- }, f.prototype._handleRemove = function(d) {
3175
- if (d instanceof e) {
3197
+ }, f.prototype._handleRemove = function(h) {
3198
+ if (h instanceof e) {
3176
3199
  if (
3177
3200
  /* an extension field */
3178
- d.extend !== void 0
3201
+ h.extend !== void 0
3179
3202
  )
3180
3203
  if (
3181
3204
  /* already handled */
3182
- d.extensionField
3205
+ h.extensionField
3183
3206
  )
3184
- d.extensionField.parent.remove(d.extensionField), d.extensionField = null;
3207
+ h.extensionField.parent.remove(h.extensionField), h.extensionField = null;
3185
3208
  else {
3186
- var p = this.deferred.indexOf(d);
3209
+ var p = this.deferred.indexOf(h);
3187
3210
  p > -1 && this.deferred.splice(p, 1);
3188
3211
  }
3189
- } else if (d instanceof r)
3190
- l.test(d.name) && delete d.parent[d.name];
3191
- else if (d instanceof t) {
3212
+ } else if (h instanceof r)
3213
+ c.test(h.name) && delete h.parent[h.name];
3214
+ else if (h instanceof t) {
3192
3215
  for (var v = 0; v < /* initializes */
3193
- d.nestedArray.length; ++v)
3194
- this._handleRemove(d._nestedArray[v]);
3195
- l.test(d.name) && delete d.parent[d.name];
3216
+ h.nestedArray.length; ++v)
3217
+ this._handleRemove(h._nestedArray[v]);
3218
+ c.test(h.name) && delete h.parent[h.name];
3196
3219
  }
3197
- }, f._configure = function(h, d, p) {
3198
- u = h, n = d, a = p;
3220
+ }, f._configure = function(d, h, p) {
3221
+ o = d, n = h, a = p;
3199
3222
  }, root;
3200
3223
  }
3201
3224
  var hasRequiredUtil;
@@ -3205,65 +3228,65 @@ function requireUtil() {
3205
3228
  var t = util$1.exports = requireMinimal(), e = roots, r, s;
3206
3229
  t.codegen = codegen_1, t.fetch = fetch_1, t.path = path, t.fs = t.inquire("fs"), t.toArray = function(i) {
3207
3230
  if (i) {
3208
- for (var l = Object.keys(i), c = new Array(l.length), h = 0; h < l.length; )
3209
- c[h] = i[l[h++]];
3210
- return c;
3231
+ for (var c = Object.keys(i), l = new Array(c.length), d = 0; d < c.length; )
3232
+ l[d] = i[c[d++]];
3233
+ return l;
3211
3234
  }
3212
3235
  return [];
3213
3236
  }, t.toObject = function(i) {
3214
- for (var l = {}, c = 0; c < i.length; ) {
3215
- var h = i[c++], d = i[c++];
3216
- d !== void 0 && (l[h] = d);
3237
+ for (var c = {}, l = 0; l < i.length; ) {
3238
+ var d = i[l++], h = i[l++];
3239
+ h !== void 0 && (c[d] = h);
3217
3240
  }
3218
- return l;
3241
+ return c;
3219
3242
  };
3220
- var o = /\\/g, u = /"/g;
3243
+ var u = /\\/g, o = /"/g;
3221
3244
  t.isReserved = function(i) {
3222
3245
  return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(i);
3223
3246
  }, t.safeProp = function(i) {
3224
- return !/^[$\w_]+$/.test(i) || t.isReserved(i) ? '["' + i.replace(o, "\\\\").replace(u, '\\"') + '"]' : "." + i;
3247
+ return !/^[$\w_]+$/.test(i) || t.isReserved(i) ? '["' + i.replace(u, "\\\\").replace(o, '\\"') + '"]' : "." + i;
3225
3248
  }, t.ucFirst = function(i) {
3226
3249
  return i.charAt(0).toUpperCase() + i.substring(1);
3227
3250
  };
3228
3251
  var n = /_([a-z])/g;
3229
3252
  t.camelCase = function(i) {
3230
- return i.substring(0, 1) + i.substring(1).replace(n, function(l, c) {
3231
- return c.toUpperCase();
3253
+ return i.substring(0, 1) + i.substring(1).replace(n, function(c, l) {
3254
+ return l.toUpperCase();
3232
3255
  });
3233
- }, t.compareFieldsById = function(i, l) {
3234
- return i.id - l.id;
3235
- }, t.decorateType = function(i, l) {
3256
+ }, t.compareFieldsById = function(i, c) {
3257
+ return i.id - c.id;
3258
+ }, t.decorateType = function(i, c) {
3236
3259
  if (i.$type)
3237
- return l && i.$type.name !== l && (t.decorateRoot.remove(i.$type), i.$type.name = l, t.decorateRoot.add(i.$type)), i.$type;
3260
+ return c && i.$type.name !== c && (t.decorateRoot.remove(i.$type), i.$type.name = c, t.decorateRoot.add(i.$type)), i.$type;
3238
3261
  r || (r = requireType());
3239
- var c = new r(l || i.name);
3240
- return t.decorateRoot.add(c), c.ctor = i, Object.defineProperty(i, "$type", { value: c, enumerable: !1 }), Object.defineProperty(i.prototype, "$type", { value: c, enumerable: !1 }), c;
3262
+ var l = new r(c || i.name);
3263
+ return t.decorateRoot.add(l), l.ctor = i, Object.defineProperty(i, "$type", { value: l, enumerable: !1 }), Object.defineProperty(i.prototype, "$type", { value: l, enumerable: !1 }), l;
3241
3264
  };
3242
3265
  var a = 0;
3243
3266
  return t.decorateEnum = function(i) {
3244
3267
  if (i.$type)
3245
3268
  return i.$type;
3246
3269
  s || (s = require_enum());
3247
- var l = new s("Enum" + a++, i);
3248
- return t.decorateRoot.add(l), Object.defineProperty(i, "$type", { value: l, enumerable: !1 }), l;
3249
- }, t.setProperty = function(i, l, c) {
3250
- function h(d, p, v) {
3270
+ var c = new s("Enum" + a++, i);
3271
+ return t.decorateRoot.add(c), Object.defineProperty(i, "$type", { value: c, enumerable: !1 }), c;
3272
+ }, t.setProperty = function(i, c, l) {
3273
+ function d(h, p, v) {
3251
3274
  var g = p.shift();
3252
3275
  if (g === "__proto__" || g === "prototype")
3253
- return d;
3276
+ return h;
3254
3277
  if (p.length > 0)
3255
- d[g] = h(d[g] || {}, p, v);
3278
+ h[g] = d(h[g] || {}, p, v);
3256
3279
  else {
3257
- var m = d[g];
3258
- m && (v = [].concat(m).concat(v)), d[g] = v;
3280
+ var m = h[g];
3281
+ m && (v = [].concat(m).concat(v)), h[g] = v;
3259
3282
  }
3260
- return d;
3283
+ return h;
3261
3284
  }
3262
3285
  if (typeof i != "object")
3263
3286
  throw TypeError("dst must be an object");
3264
- if (!l)
3287
+ if (!c)
3265
3288
  throw TypeError("path must be specified");
3266
- return l = l.split("."), h(i, l, c);
3289
+ return c = c.split("."), d(i, c, l);
3267
3290
  }, Object.defineProperty(t, "decorateRoot", {
3268
3291
  get: function() {
3269
3292
  return e.decorated || (e.decorated = new (requireRoot())());
@@ -3275,12 +3298,12 @@ function requireObject() {
3275
3298
  if (hasRequiredObject) return object;
3276
3299
  hasRequiredObject = 1, object = r, r.className = "ReflectionObject";
3277
3300
  var t = requireUtil(), e;
3278
- function r(s, o) {
3301
+ function r(s, u) {
3279
3302
  if (!t.isString(s))
3280
3303
  throw TypeError("name must be a string");
3281
- if (o && !t.isObject(o))
3304
+ if (u && !t.isObject(u))
3282
3305
  throw TypeError("options must be an object");
3283
- this.options = o, this.parsedOptions = null, this.name = s, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
3306
+ this.options = u, this.parsedOptions = null, this.name = s, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
3284
3307
  }
3285
3308
  return Object.defineProperties(r.prototype, {
3286
3309
  /**
@@ -3304,53 +3327,53 @@ function requireObject() {
3304
3327
  */
3305
3328
  fullName: {
3306
3329
  get: function() {
3307
- for (var s = [this.name], o = this.parent; o; )
3308
- s.unshift(o.name), o = o.parent;
3330
+ for (var s = [this.name], u = this.parent; u; )
3331
+ s.unshift(u.name), u = u.parent;
3309
3332
  return s.join(".");
3310
3333
  }
3311
3334
  }
3312
3335
  }), r.prototype.toJSON = /* istanbul ignore next */
3313
3336
  function() {
3314
3337
  throw Error();
3315
- }, r.prototype.onAdd = function(o) {
3316
- this.parent && this.parent !== o && this.parent.remove(this), this.parent = o, this.resolved = !1;
3317
- var u = o.root;
3318
- u instanceof e && u._handleAdd(this);
3319
- }, r.prototype.onRemove = function(o) {
3320
- var u = o.root;
3321
- u instanceof e && u._handleRemove(this), this.parent = null, this.resolved = !1;
3338
+ }, r.prototype.onAdd = function(u) {
3339
+ this.parent && this.parent !== u && this.parent.remove(this), this.parent = u, this.resolved = !1;
3340
+ var o = u.root;
3341
+ o instanceof e && o._handleAdd(this);
3342
+ }, r.prototype.onRemove = function(u) {
3343
+ var o = u.root;
3344
+ o instanceof e && o._handleRemove(this), this.parent = null, this.resolved = !1;
3322
3345
  }, r.prototype.resolve = function() {
3323
3346
  return this.resolved ? this : (this.root instanceof e && (this.resolved = !0), this);
3324
- }, r.prototype.getOption = function(o) {
3347
+ }, r.prototype.getOption = function(u) {
3325
3348
  if (this.options)
3326
- return this.options[o];
3327
- }, r.prototype.setOption = function(o, u, n) {
3328
- return (!n || !this.options || this.options[o] === void 0) && ((this.options || (this.options = {}))[o] = u), this;
3329
- }, r.prototype.setParsedOption = function(o, u, n) {
3349
+ return this.options[u];
3350
+ }, r.prototype.setOption = function(u, o, n) {
3351
+ return (!n || !this.options || this.options[u] === void 0) && ((this.options || (this.options = {}))[u] = o), this;
3352
+ }, r.prototype.setParsedOption = function(u, o, n) {
3330
3353
  this.parsedOptions || (this.parsedOptions = []);
3331
3354
  var a = this.parsedOptions;
3332
3355
  if (n) {
3333
- var f = a.find(function(c) {
3334
- return Object.prototype.hasOwnProperty.call(c, o);
3356
+ var f = a.find(function(l) {
3357
+ return Object.prototype.hasOwnProperty.call(l, u);
3335
3358
  });
3336
3359
  if (f) {
3337
- var i = f[o];
3338
- t.setProperty(i, n, u);
3360
+ var i = f[u];
3361
+ t.setProperty(i, n, o);
3339
3362
  } else
3340
- f = {}, f[o] = t.setProperty({}, n, u), a.push(f);
3363
+ f = {}, f[u] = t.setProperty({}, n, o), a.push(f);
3341
3364
  } else {
3342
- var l = {};
3343
- l[o] = u, a.push(l);
3365
+ var c = {};
3366
+ c[u] = o, a.push(c);
3344
3367
  }
3345
3368
  return this;
3346
- }, r.prototype.setOptions = function(o, u) {
3347
- if (o)
3348
- for (var n = Object.keys(o), a = 0; a < n.length; ++a)
3349
- this.setOption(n[a], o[n[a]], u);
3369
+ }, r.prototype.setOptions = function(u, o) {
3370
+ if (u)
3371
+ for (var n = Object.keys(u), a = 0; a < n.length; ++a)
3372
+ this.setOption(n[a], u[n[a]], o);
3350
3373
  return this;
3351
3374
  }, r.prototype.toString = function() {
3352
- var o = this.constructor.className, u = this.fullName;
3353
- return u.length ? o + " " + u : o;
3375
+ var u = this.constructor.className, o = this.fullName;
3376
+ return o.length ? u + " " + o : u;
3354
3377
  }, r._configure = function(s) {
3355
3378
  e = s;
3356
3379
  }, object;
@@ -3362,18 +3385,18 @@ function require_enum() {
3362
3385
  var t = requireObject();
3363
3386
  ((s.prototype = Object.create(t.prototype)).constructor = s).className = "Enum";
3364
3387
  var e = requireNamespace(), r = requireUtil();
3365
- function s(o, u, n, a, f, i) {
3366
- if (t.call(this, o, n), u && typeof u != "object")
3388
+ function s(u, o, n, a, f, i) {
3389
+ if (t.call(this, u, n), o && typeof o != "object")
3367
3390
  throw TypeError("values must be an object");
3368
- if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = a, this.comments = f || {}, this.valuesOptions = i, this.reserved = void 0, u)
3369
- for (var l = Object.keys(u), c = 0; c < l.length; ++c)
3370
- typeof u[l[c]] == "number" && (this.valuesById[this.values[l[c]] = u[l[c]]] = l[c]);
3391
+ if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = a, this.comments = f || {}, this.valuesOptions = i, this.reserved = void 0, o)
3392
+ for (var c = Object.keys(o), l = 0; l < c.length; ++l)
3393
+ typeof o[c[l]] == "number" && (this.valuesById[this.values[c[l]] = o[c[l]]] = c[l]);
3371
3394
  }
3372
- return s.fromJSON = function(u, n) {
3373
- var a = new s(u, n.values, n.options, n.comment, n.comments);
3395
+ return s.fromJSON = function(o, n) {
3396
+ var a = new s(o, n.values, n.options, n.comment, n.comments);
3374
3397
  return a.reserved = n.reserved, a;
3375
- }, s.prototype.toJSON = function(u) {
3376
- var n = u ? !!u.keepComments : !1;
3398
+ }, s.prototype.toJSON = function(o) {
3399
+ var n = o ? !!o.keepComments : !1;
3377
3400
  return r.toObject([
3378
3401
  "options",
3379
3402
  this.options,
@@ -3388,52 +3411,52 @@ function require_enum() {
3388
3411
  "comments",
3389
3412
  n ? this.comments : void 0
3390
3413
  ]);
3391
- }, s.prototype.add = function(u, n, a, f) {
3392
- if (!r.isString(u))
3414
+ }, s.prototype.add = function(o, n, a, f) {
3415
+ if (!r.isString(o))
3393
3416
  throw TypeError("name must be a string");
3394
3417
  if (!r.isInteger(n))
3395
3418
  throw TypeError("id must be an integer");
3396
- if (this.values[u] !== void 0)
3397
- throw Error("duplicate name '" + u + "' in " + this);
3419
+ if (this.values[o] !== void 0)
3420
+ throw Error("duplicate name '" + o + "' in " + this);
3398
3421
  if (this.isReservedId(n))
3399
3422
  throw Error("id " + n + " is reserved in " + this);
3400
- if (this.isReservedName(u))
3401
- throw Error("name '" + u + "' is reserved in " + this);
3423
+ if (this.isReservedName(o))
3424
+ throw Error("name '" + o + "' is reserved in " + this);
3402
3425
  if (this.valuesById[n] !== void 0) {
3403
3426
  if (!(this.options && this.options.allow_alias))
3404
3427
  throw Error("duplicate id " + n + " in " + this);
3405
- this.values[u] = n;
3428
+ this.values[o] = n;
3406
3429
  } else
3407
- this.valuesById[this.values[u] = n] = u;
3408
- return f && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[u] = f || null), this.comments[u] = a || null, this;
3409
- }, s.prototype.remove = function(u) {
3410
- if (!r.isString(u))
3430
+ this.valuesById[this.values[o] = n] = o;
3431
+ return f && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[o] = f || null), this.comments[o] = a || null, this;
3432
+ }, s.prototype.remove = function(o) {
3433
+ if (!r.isString(o))
3411
3434
  throw TypeError("name must be a string");
3412
- var n = this.values[u];
3435
+ var n = this.values[o];
3413
3436
  if (n == null)
3414
- throw Error("name '" + u + "' does not exist in " + this);
3415
- return delete this.valuesById[n], delete this.values[u], delete this.comments[u], this.valuesOptions && delete this.valuesOptions[u], this;
3416
- }, s.prototype.isReservedId = function(u) {
3417
- return e.isReservedId(this.reserved, u);
3418
- }, s.prototype.isReservedName = function(u) {
3419
- return e.isReservedName(this.reserved, u);
3437
+ throw Error("name '" + o + "' does not exist in " + this);
3438
+ return delete this.valuesById[n], delete this.values[o], delete this.comments[o], this.valuesOptions && delete this.valuesOptions[o], this;
3439
+ }, s.prototype.isReservedId = function(o) {
3440
+ return e.isReservedId(this.reserved, o);
3441
+ }, s.prototype.isReservedName = function(o) {
3442
+ return e.isReservedName(this.reserved, o);
3420
3443
  }, _enum;
3421
3444
  }
3422
3445
  var encoder_1, hasRequiredEncoder;
3423
3446
  function requireEncoder() {
3424
3447
  if (hasRequiredEncoder) return encoder_1;
3425
- hasRequiredEncoder = 1, encoder_1 = o;
3448
+ hasRequiredEncoder = 1, encoder_1 = u;
3426
3449
  var t = require_enum(), e = requireTypes(), r = requireUtil();
3427
- function s(u, n, a, f) {
3428
- return n.resolvedType.group ? u("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", a, f, (n.id << 3 | 3) >>> 0, (n.id << 3 | 4) >>> 0) : u("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", a, f, (n.id << 3 | 2) >>> 0);
3450
+ function s(o, n, a, f) {
3451
+ return n.resolvedType.group ? o("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", a, f, (n.id << 3 | 3) >>> 0, (n.id << 3 | 4) >>> 0) : o("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", a, f, (n.id << 3 | 2) >>> 0);
3429
3452
  }
3430
- function o(u) {
3431
- for (var n = r.codegen(["m", "w"], u.name + "$encode")("if(!w)")("w=Writer.create()"), a, f, i = (
3453
+ function u(o) {
3454
+ for (var n = r.codegen(["m", "w"], o.name + "$encode")("if(!w)")("w=Writer.create()"), a, f, i = (
3432
3455
  /* initializes */
3433
- u.fieldsArray.slice().sort(r.compareFieldsById)
3456
+ o.fieldsArray.slice().sort(r.compareFieldsById)
3434
3457
  ), a = 0; a < i.length; ++a) {
3435
- var l = i[a].resolve(), c = u._fieldsArray.indexOf(l), h = l.resolvedType instanceof t ? "int32" : l.type, d = e.basic[h];
3436
- f = "m" + r.safeProp(l.name), l.map ? (n("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", f, l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", f)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (l.id << 3 | 2) >>> 0, 8 | e.mapKey[l.keyType], l.keyType), d === void 0 ? n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", c, f) : n(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | d, h, f), n("}")("}")) : l.repeated ? (n("if(%s!=null&&%s.length){", f, f), l.packed && e.packed[h] !== void 0 ? n("w.uint32(%i).fork()", (l.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", f)("w.%s(%s[i])", h, f)("w.ldelim()") : (n("for(var i=0;i<%s.length;++i)", f), d === void 0 ? s(n, l, c, f + "[i]") : n("w.uint32(%i).%s(%s[i])", (l.id << 3 | d) >>> 0, h, f)), n("}")) : (l.optional && n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", f, l.name), d === void 0 ? s(n, l, c, f) : n("w.uint32(%i).%s(%s)", (l.id << 3 | d) >>> 0, h, f));
3458
+ var c = i[a].resolve(), l = o._fieldsArray.indexOf(c), d = c.resolvedType instanceof t ? "int32" : c.type, h = e.basic[d];
3459
+ f = "m" + r.safeProp(c.name), c.map ? (n("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", f, c.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", f)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (c.id << 3 | 2) >>> 0, 8 | e.mapKey[c.keyType], c.keyType), h === void 0 ? n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", l, f) : n(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | h, d, f), n("}")("}")) : c.repeated ? (n("if(%s!=null&&%s.length){", f, f), c.packed && e.packed[d] !== void 0 ? n("w.uint32(%i).fork()", (c.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", f)("w.%s(%s[i])", d, f)("w.ldelim()") : (n("for(var i=0;i<%s.length;++i)", f), h === void 0 ? s(n, c, l, f + "[i]") : n("w.uint32(%i).%s(%s[i])", (c.id << 3 | h) >>> 0, d, f)), n("}")) : (c.optional && n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", f, c.name), h === void 0 ? s(n, c, l, f) : n("w.uint32(%i).%s(%s)", (c.id << 3 | h) >>> 0, d, f));
3437
3460
  }
3438
3461
  return n("return w");
3439
3462
  }
@@ -3463,7 +3486,7 @@ protobuf.OneOf = requireOneof();
3463
3486
  protobuf.MapField = requireMapfield();
3464
3487
  protobuf.Service = requireService();
3465
3488
  protobuf.Method = requireMethod();
3466
- protobuf.Message = message;
3489
+ protobuf.Message = message$1;
3467
3490
  protobuf.wrappers = wrappers;
3468
3491
  protobuf.types = requireTypes();
3469
3492
  protobuf.util = requireUtil();
@@ -3476,34 +3499,34 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
3476
3499
  "nil.xit.proto"
3477
3500
  ), bundle = async (t) => new Promise((e, r) => {
3478
3501
  const s = new WorkerWrapper();
3479
- s.postMessage({ type: "init", host: t.host, id: t.id, cdn_url: t.cdn_url }), s.addEventListener("message", async (o) => {
3480
- if (o.data.ok) {
3481
- if (o.data.files) {
3482
- const u = concat([
3502
+ s.postMessage({ type: "init", host: t.host, id: t.id, cdn_url: t.cdn_url }), s.addEventListener("message", async (u) => {
3503
+ if (u.data.ok) {
3504
+ if (u.data.files) {
3505
+ const o = concat([
3483
3506
  header(nil_xit_proto.MessageType.MessageType_FrameCache),
3484
3507
  nil_xit_proto.FrameCache.encode({
3485
3508
  id: t.id,
3486
- content: o.data.code,
3487
- files: o.data.files
3509
+ content: u.data.code,
3510
+ files: u.data.files
3488
3511
  }).finish()
3489
3512
  ]);
3490
- service_publish({ host: t.host }, u);
3513
+ service_publish({ host: t.host }, o);
3491
3514
  }
3492
3515
  e(
3493
3516
  await import(
3494
3517
  /* @vite-ignore */
3495
- "data:text/javascript;base64," + btoa(unescape(encodeURIComponent(o.data.code)))
3518
+ "data:text/javascript;base64," + btoa(unescape(encodeURIComponent(u.data.code)))
3496
3519
  )
3497
3520
  );
3498
3521
  } else
3499
- r(o.data.err);
3522
+ r(u.data.err);
3500
3523
  s.terminate();
3501
3524
  });
3502
3525
  }), subscriber_queue = [];
3503
3526
  function writable(t, e = noop$1) {
3504
3527
  let r = null;
3505
3528
  const s = /* @__PURE__ */ new Set();
3506
- function o(a) {
3529
+ function u(a) {
3507
3530
  if (safe_not_equal(t, a) && (t = a, r)) {
3508
3531
  const f = !subscriber_queue.length;
3509
3532
  for (const i of s)
@@ -3515,22 +3538,22 @@ function writable(t, e = noop$1) {
3515
3538
  }
3516
3539
  }
3517
3540
  }
3518
- function u(a) {
3519
- o(a(
3541
+ function o(a) {
3542
+ u(a(
3520
3543
  /** @type {T} */
3521
3544
  t
3522
3545
  ));
3523
3546
  }
3524
3547
  function n(a, f = noop$1) {
3525
3548
  const i = [a, f];
3526
- return s.add(i), s.size === 1 && (r = e(o, u) || noop$1), a(
3549
+ return s.add(i), s.size === 1 && (r = e(u, o) || noop$1), a(
3527
3550
  /** @type {T} */
3528
3551
  t
3529
3552
  ), () => {
3530
3553
  s.delete(i), s.size === 0 && r && (r(), r = null);
3531
3554
  };
3532
3555
  }
3533
- return { set: o, update: u, subscribe: n };
3556
+ return { set: u, update: o, subscribe: n };
3534
3557
  }
3535
3558
  function get(t) {
3536
3559
  let e;
@@ -3542,7 +3565,7 @@ const make_values = async ({
3542
3565
  host: r,
3543
3566
  service: s
3544
3567
  }) => {
3545
- const o = await service_fetch(
3568
+ const u = await service_fetch(
3546
3569
  { host: r },
3547
3570
  concat([
3548
3571
  header(nil_xit_proto.MessageType.MessageType_ValueRequest),
@@ -3551,42 +3574,47 @@ const make_values = async ({
3551
3574
  (n, a) => {
3552
3575
  if (n === nil_xit_proto.MessageType.MessageType_ValueResponse) {
3553
3576
  const f = nil_xit_proto.ValueResponse.decode(a);
3554
- if (f.id === t && (e == null || e === f.tag))
3577
+ if (f.id === t && e === f.tag)
3555
3578
  return f.values;
3556
3579
  }
3557
3580
  }
3558
- ), u = {
3581
+ ), o = {
3559
3582
  value_boolean: /* @__PURE__ */ new Map(),
3560
3583
  value_double: /* @__PURE__ */ new Map(),
3561
3584
  value_number: /* @__PURE__ */ new Map(),
3562
3585
  value_string: /* @__PURE__ */ new Map(),
3563
3586
  value_buffer: /* @__PURE__ */ new Map()
3564
3587
  };
3565
- for (const n of o) {
3566
- const a = writable(n[n.value]);
3567
- a.subscribe((f) => {
3568
- const i = { id: n.id, [n.value]: f, value: n.value }, l = { id: t, tag: e, value: i }, c = concat([
3569
- header(nil_xit_proto.MessageType.MessageType_ValueUpdate),
3570
- nil_xit_proto.ValueUpdate.encode(l).finish()
3571
- ]);
3572
- s.publish(c);
3573
- }), u[n.value].set(n.id, a);
3588
+ for (const n of u) {
3589
+ const a = n.id, f = n.value, i = writable(n[f]);
3590
+ i.subscribe((c) => {
3591
+ const l = { id: a, [f]: c, value: f }, d = { id: t, tag: e, value: l };
3592
+ s.publish(
3593
+ concat([
3594
+ header(nil_xit_proto.MessageType.MessageType_ValueUpdate),
3595
+ nil_xit_proto.ValueUpdate.encode(d).finish()
3596
+ ])
3597
+ );
3598
+ }), o[f].set(a, i);
3574
3599
  }
3575
3600
  return s.on_message((n, a) => {
3576
- var l;
3601
+ var c;
3577
3602
  const f = new DataView(a.buffer).getUint32(0, !1), i = a.slice(4);
3578
3603
  if (f === nil_xit_proto.MessageType.MessageType_ValueUpdate) {
3579
- const c = nil_xit_proto.ValueUpdate.decode(i), h = c.value.value;
3580
- u[h].get(c.value.id), (l = u[h].get(c.value.id)) == null || l.set(c.value[h]);
3604
+ const l = nil_xit_proto.ValueUpdate.decode(i);
3605
+ if (l.id === t && e === l.tag) {
3606
+ const d = l.value.value, h = (c = o[d]) == null ? void 0 : c.get(l.value.id);
3607
+ h == null || h.set(message.value[d]);
3608
+ }
3581
3609
  }
3582
- }), u;
3610
+ }), o;
3583
3611
  }, make_signals = async ({
3584
3612
  id: t,
3585
3613
  tag: e,
3586
3614
  host: r,
3587
3615
  service: s
3588
3616
  }) => {
3589
- const o = await service_fetch(
3617
+ const u = await service_fetch(
3590
3618
  { host: r },
3591
3619
  concat([
3592
3620
  header(nil_xit_proto.MessageType.MessageType_SignalRequest),
@@ -3599,7 +3627,7 @@ const make_values = async ({
3599
3627
  return f.signals;
3600
3628
  }
3601
3629
  }
3602
- ), u = {
3630
+ ), o = {
3603
3631
  arg_none: /* @__PURE__ */ new Map(),
3604
3632
  arg_boolean: /* @__PURE__ */ new Map(),
3605
3633
  arg_double: /* @__PURE__ */ new Map(),
@@ -3607,38 +3635,42 @@ const make_values = async ({
3607
3635
  arg_string: /* @__PURE__ */ new Map(),
3608
3636
  arg_buffer: /* @__PURE__ */ new Map()
3609
3637
  };
3610
- for (const { id: n, type: a } of o)
3611
- a == null ? u.arg_none.set(n, () => {
3612
- const f = { frame_id: t, signal_id: n, tag: e }, i = concat([
3613
- header(nil_xit_proto.MessageType.MessageType_SignalNotify),
3614
- nil_xit_proto.SignalNotify.encode(f).finish()
3615
- ]);
3616
- s.publish(i);
3617
- }) : u[a].set(n, (f) => {
3618
- const i = { frame_id: t, signal_id: n, tag: e, [a]: f }, l = concat([
3619
- header(nil_xit_proto.MessageType.MessageType_SignalNotify),
3620
- nil_xit_proto.SignalNotify.encode(i).finish()
3621
- ]);
3622
- s.publish(l);
3638
+ for (const { id: n, type: a } of u)
3639
+ a == null ? o.arg_none.set(n, () => {
3640
+ const f = { frame_id: t, signal_id: n, tag: e };
3641
+ s.publish(
3642
+ concat([
3643
+ header(nil_xit_proto.MessageType.MessageType_SignalNotify),
3644
+ nil_xit_proto.SignalNotify.encode(f).finish()
3645
+ ])
3646
+ );
3647
+ }) : o[a].set(n, (f) => {
3648
+ const i = { frame_id: t, signal_id: n, tag: e, [a]: f };
3649
+ s.publish(
3650
+ concat([
3651
+ header(nil_xit_proto.MessageType.MessageType_SignalNotify),
3652
+ nil_xit_proto.SignalNotify.encode(i).finish()
3653
+ ])
3654
+ );
3623
3655
  });
3624
- return u;
3656
+ return o;
3625
3657
  }, create_context = (t, e, r) => ({
3626
3658
  values: {
3627
- boolean: (s, o) => t.value_boolean.get(s) ?? writable(o),
3628
- double: (s, o) => t.value_double.get(s) ?? writable(o),
3629
- string: (s, o) => t.value_string.get(s) ?? writable(o),
3630
- number: (s, o) => t.value_number.get(s) ?? writable(o),
3631
- buffer: (s, o) => t.value_buffer.get(s) ?? writable(o),
3632
- json: (s, o, u) => {
3633
- const n = t.value_buffer.get(s) ?? writable(u.encode(o));
3634
- let a = t.value_buffer.has(s) ? u.decode(get(n)) : o;
3659
+ boolean: (s, u) => t.value_boolean.get(s) ?? writable(u),
3660
+ double: (s, u) => t.value_double.get(s) ?? writable(u),
3661
+ string: (s, u) => t.value_string.get(s) ?? writable(u),
3662
+ number: (s, u) => t.value_number.get(s) ?? writable(u),
3663
+ buffer: (s, u) => t.value_buffer.get(s) ?? writable(u),
3664
+ json: (s, u, o) => {
3665
+ const n = t.value_buffer.get(s) ?? writable(o.encode(u));
3666
+ let a = t.value_buffer.has(s) ? o.decode(get(n)) : u;
3635
3667
  return {
3636
3668
  set: (f) => {
3637
- a = f, n.set(u.encode(a));
3669
+ a = f, n.set(o.encode(a));
3638
3670
  },
3639
3671
  subscribe: (f) => n.subscribe((i) => f(a)),
3640
3672
  update: (f) => {
3641
- n.update((i) => (a = f(i), u.encode(a)));
3673
+ n.update((i) => (a = f(i), o.encode(a)));
3642
3674
  }
3643
3675
  };
3644
3676
  }
@@ -3646,37 +3678,37 @@ const make_values = async ({
3646
3678
  signals: {
3647
3679
  none: (s) => e.arg_none.get(s) ?? (() => {
3648
3680
  }),
3649
- boolean: (s) => e.arg_boolean.get(s) ?? ((o) => {
3681
+ boolean: (s) => e.arg_boolean.get(s) ?? ((u) => {
3650
3682
  }),
3651
- double: (s) => e.arg_double.get(s) ?? ((o) => {
3683
+ double: (s) => e.arg_double.get(s) ?? ((u) => {
3652
3684
  }),
3653
- number: (s) => e.arg_number.get(s) ?? ((o) => {
3685
+ number: (s) => e.arg_number.get(s) ?? ((u) => {
3654
3686
  }),
3655
- string: (s) => e.arg_string.get(s) ?? ((o) => {
3687
+ string: (s) => e.arg_string.get(s) ?? ((u) => {
3656
3688
  }),
3657
- buffer: (s) => e.arg_buffer.get(s) ?? ((o) => {
3689
+ buffer: (s) => e.arg_buffer.get(s) ?? ((u) => {
3658
3690
  }),
3659
- json: (s, o) => {
3660
- const u = e.arg_buffer.get(s) ?? ((n) => {
3691
+ json: (s, u) => {
3692
+ const o = e.arg_buffer.get(s) ?? ((n) => {
3661
3693
  });
3662
- return (n) => u(o(n));
3694
+ return (n) => o(u(n));
3663
3695
  }
3664
3696
  },
3665
3697
  loader: r
3666
- }), create_app = async (t, e, r, s, o) => {
3698
+ }), create_app = async (t, e, r, s, u) => {
3667
3699
  await test_connection({ host: t });
3668
- const u = new Service$1({ host: t }), [n, a, { action: f }] = await Promise.all([
3669
- make_values({ id: e, tag: r, host: t, service: u }),
3670
- make_signals({ id: e, tag: r, host: t, service: u }),
3700
+ const o = new Service$1({ host: t }), [n, a, { action: f }] = await Promise.all([
3701
+ make_values({ id: e, tag: r, host: t, service: o }),
3702
+ make_signals({ id: e, tag: r, host: t, service: o }),
3671
3703
  bundle({ host: t, cdn_url: s, id: e })
3672
3704
  ]);
3673
3705
  return (i) => {
3674
- const l = /* @__PURE__ */ new Map();
3675
- l.set("nil.xit", create_context(n, a, o));
3676
- const { destroy: c } = f(i, l);
3677
- return u.start(), {
3706
+ const c = /* @__PURE__ */ new Map();
3707
+ c.set("nil.xit", create_context(n, a, u));
3708
+ const { destroy: l } = f(i, c);
3709
+ return o.start(), {
3678
3710
  destroy: () => {
3679
- u.stop(), c();
3711
+ o.stop(), l();
3680
3712
  }
3681
3713
  };
3682
3714
  };
@@ -3687,34 +3719,34 @@ function Client(t, e) {
3687
3719
  var r = comment(), s = first_child(r);
3688
3720
  await_block(
3689
3721
  s,
3690
- () => create_app(e.host, e.frame, e.tag, e.cdn_url, e.loader),
3691
- (o) => {
3692
- var u = root_3(), n = child(u);
3693
- template_effect(() => set_text(n, `Loading ${(e.tag ? `${e.frame}-${e.tag}` : e.frame) ?? ""}...`)), append(o, u);
3722
+ () => create_app(e.host, e.frame, e.tag ?? null, e.cdn_url, e.loader),
3723
+ (u) => {
3724
+ var o = root_3(), n = child(o);
3725
+ template_effect(() => set_text(n, `Loading ${(e.tag ? `${e.frame}-${e.tag}` : e.frame) ?? ""}...`)), append(u, o);
3694
3726
  },
3695
- (o, u) => {
3727
+ (u, o) => {
3696
3728
  var n = root_1();
3697
- action(n, (a) => get$1(u)(a)), append(o, n);
3729
+ action(n, (a) => get$1(o)(a)), append(u, n);
3698
3730
  },
3699
- (o, u) => {
3731
+ (u, o) => {
3700
3732
  var n = root_2(), a = child(n);
3701
- template_effect(() => set_text(a, (console.log(get$1(u)), "Something went wrong..."))), append(o, n);
3733
+ template_effect(() => set_text(a, (console.log(get$1(o)), "Something went wrong..."))), append(u, n);
3702
3734
  }
3703
3735
  ), append(t, r), pop();
3704
3736
  }
3705
3737
  function Component(t, e) {
3706
3738
  push(e, !0);
3707
- const r = (o) => {
3708
- const u = {
3739
+ const r = (u) => {
3740
+ const o = {
3709
3741
  one: (n, a) => r([{ frame: n, tag: a }]),
3710
3742
  all: (n) => r(n)
3711
3743
  };
3712
3744
  return (n) => {
3713
3745
  n.style.display = "contents";
3714
- const a = o.map(({ frame: f, tag: i }) => mount(Client, {
3746
+ const a = u.map(({ frame: f, tag: i }) => mount(Client, {
3715
3747
  target: n,
3716
3748
  props: {
3717
- loader: u,
3749
+ loader: o,
3718
3750
  host: e.data.server,
3719
3751
  frame: f,
3720
3752
  tag: i,
@@ -3727,8 +3759,8 @@ function Component(t, e) {
3727
3759
  };
3728
3760
  };
3729
3761
  var s = /* @__PURE__ */ derived(() => ({
3730
- one: (o, u) => r([{ frame: o, tag: u }]),
3731
- all: (o) => r(o)
3762
+ one: (u, o) => r([{ frame: u, tag: o }]),
3763
+ all: (u) => r(u)
3732
3764
  }));
3733
3765
  Client(t, {
3734
3766
  get loader() {