@nil-/xit 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/assets/index.js +290 -281
  2. package/package.json +1 -1
package/assets/index.js CHANGED
@@ -96,8 +96,8 @@ function create_effect(t, e, r, s = !0) {
96
96
  var a = is_flushing_effect;
97
97
  try {
98
98
  set_is_flushing_effect(!0), update_effect(n), n.f |= EFFECT_RAN;
99
- } catch (l) {
100
- throw destroy_effect(n), l;
99
+ } catch (c) {
100
+ throw destroy_effect(n), c;
101
101
  } finally {
102
102
  set_is_flushing_effect(a);
103
103
  }
@@ -342,7 +342,7 @@ function handle_error(t, e, r) {
342
342
  throw t;
343
343
  }
344
344
  function update_reaction(t) {
345
- var l;
345
+ var c;
346
346
  var e = new_deps, r = skipped_deps, s = untracked_writes, o = active_reaction, u = skip_reaction, n = derived_sources;
347
347
  new_deps = /** @type {null | Value[]} */
348
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;
@@ -360,7 +360,7 @@ function update_reaction(t) {
360
360
  t.deps = f = new_deps;
361
361
  if (!skip_reaction)
362
362
  for (i = skipped_deps; i < f.length; i++)
363
- ((l = f[i]).reactions ?? (l.reactions = [])).push(t);
363
+ ((c = f[i]).reactions ?? (c.reactions = [])).push(t);
364
364
  } else f !== null && skipped_deps < f.length && (remove_reactions(t, skipped_deps), f.length = skipped_deps);
365
365
  return a;
366
366
  } finally {
@@ -480,22 +480,22 @@ function process_effects(t, e) {
480
480
  } else o & EFFECT && s.push(r);
481
481
  var f = r.next;
482
482
  if (f === null) {
483
- let c = r.parent;
484
- for (; c !== null; ) {
485
- if (t === c)
483
+ let l = r.parent;
484
+ for (; l !== null; ) {
485
+ if (t === l)
486
486
  break e;
487
- var i = c.next;
487
+ var i = l.next;
488
488
  if (i !== null) {
489
489
  r = i;
490
490
  continue e;
491
491
  }
492
- c = c.parent;
492
+ l = l.parent;
493
493
  }
494
494
  }
495
495
  r = f;
496
496
  }
497
- for (var l = 0; l < s.length; l++)
498
- a = s[l], e.push(a), process_effects(a, e);
497
+ for (var c = 0; c < s.length; c++)
498
+ a = s[c], e.push(a), process_effects(a, e);
499
499
  }
500
500
  function flush_sync(t) {
501
501
  var e = scheduler_mode, r = queued_root_effects;
@@ -643,7 +643,7 @@ function handle_event_propagation(t) {
643
643
  }
644
644
  });
645
645
  try {
646
- for (var l, c = []; u !== null; ) {
646
+ for (var c, l = []; u !== null; ) {
647
647
  var h = u.assignedSlot || u.parentNode || /** @type {any} */
648
648
  u.host || null;
649
649
  try {
@@ -656,18 +656,18 @@ function handle_event_propagation(t) {
656
656
  } else
657
657
  d.call(u, t);
658
658
  } catch (m) {
659
- l ? c.push(m) : l = m;
659
+ c ? l.push(m) : c = m;
660
660
  }
661
661
  if (t.cancelBubble || h === e || h === null)
662
662
  break;
663
663
  u = h;
664
664
  }
665
- if (l) {
666
- for (let m of c)
665
+ if (c) {
666
+ for (let m of l)
667
667
  queueMicrotask(() => {
668
668
  throw m;
669
669
  });
670
- throw l;
670
+ throw c;
671
671
  }
672
672
  } finally {
673
673
  t.__root = e, delete t.currentTarget;
@@ -721,9 +721,9 @@ function mount(t, e) {
721
721
  const document_listeners = /* @__PURE__ */ new Map();
722
722
  function _mount(t, { target: e, anchor: r, props: s = {}, events: o, context: u, intro: n = !0 }) {
723
723
  init_operations();
724
- var a = /* @__PURE__ */ new Set(), f = (c) => {
725
- for (var h = 0; h < c.length; h++) {
726
- var d = c[h];
724
+ var a = /* @__PURE__ */ new Set(), f = (l) => {
725
+ for (var h = 0; h < l.length; h++) {
726
+ var d = l[h];
727
727
  if (!a.has(d)) {
728
728
  a.add(d);
729
729
  var p = is_passive_event(d);
@@ -734,8 +734,8 @@ function _mount(t, { target: e, anchor: r, props: s = {}, events: o, context: u,
734
734
  }
735
735
  };
736
736
  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());
737
+ var i = void 0, c = effect_root(() => {
738
+ var l = r ?? e.appendChild(create_text());
739
739
  return branch(() => {
740
740
  if (u) {
741
741
  push({});
@@ -745,7 +745,7 @@ function _mount(t, { target: e, anchor: r, props: s = {}, events: o, context: u,
745
745
  );
746
746
  h.c = u;
747
747
  }
748
- o && (s.$$events = o), i = t(c, s) || {}, u && pop();
748
+ o && (s.$$events = o), i = t(l, s) || {}, u && pop();
749
749
  }), () => {
750
750
  var p;
751
751
  for (var h of a) {
@@ -756,10 +756,10 @@ function _mount(t, { target: e, anchor: r, props: s = {}, events: o, context: u,
756
756
  );
757
757
  --d === 0 ? (document.removeEventListener(h, handle_event_propagation), document_listeners.delete(h)) : document_listeners.set(h, d);
758
758
  }
759
- root_event_handles.delete(f), mounted_components.delete(i), c !== r && ((p = c.parentNode) == null || p.removeChild(c));
759
+ root_event_handles.delete(f), mounted_components.delete(i), l !== r && ((p = l.parentNode) == null || p.removeChild(l));
760
760
  };
761
761
  });
762
- return mounted_components.set(i, l), i;
762
+ return mounted_components.set(i, c), i;
763
763
  }
764
764
  let mounted_components = /* @__PURE__ */ new WeakMap();
765
765
  function unmount(t) {
@@ -768,12 +768,12 @@ function unmount(t) {
768
768
  }
769
769
  const PENDING = 0, THEN = 1, CATCH = 2;
770
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)(
771
+ var u = t, n = is_runes(), a = component_context, f, i, c, l, h = (n ? source : mutable_source)(
772
772
  /** @type {V} */
773
773
  void 0
774
774
  ), d = (n ? source : mutable_source)(void 0), p = !1;
775
775
  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());
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 && (c ? resume_effect(c) : c = branch(() => s(u, h))), m === CATCH && o && (l ? resume_effect(l) : l = branch(() => o(u, d))), 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
777
  }
778
778
  var g = block(() => {
779
779
  if (f !== (f = e())) {
@@ -886,8 +886,8 @@ const header = (t) => {
886
886
  o("timed out, cancelled");
887
887
  }, 2500);
888
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());
889
+ const i = new DataView(f.buffer).getUint32(0, !1), c = f.slice(4), l = r(i, c);
890
+ l != null && (s(l), clearTimeout(n), u.stop());
891
891
  }), u.start();
892
892
  }), service_publish = (t, e) => {
893
893
  const r = new Service$1(t), s = setTimeout(() => {
@@ -914,14 +914,14 @@ function asPromise$1(t, e) {
914
914
  for (var r = new Array(arguments.length - 1), s = 0, o = 2, u = !0; o < arguments.length; )
915
915
  r[s++] = arguments[o++];
916
916
  return new Promise(function(a, f) {
917
- r[s] = function(l) {
917
+ r[s] = function(c) {
918
918
  if (u)
919
- if (u = !1, l)
920
- f(l);
919
+ if (u = !1, c)
920
+ f(c);
921
921
  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);
922
+ for (var l = new Array(arguments.length - 1), h = 0; h < l.length; )
923
+ l[h++] = arguments[h];
924
+ a.apply(null, l);
925
925
  }
926
926
  };
927
927
  try {
@@ -945,49 +945,49 @@ var base64$1 = {};
945
945
  for (var r = new Array(64), s = new Array(123), o = 0; o < 64; )
946
946
  s[r[o] = o < 26 ? o + 65 : o < 52 ? o + 71 : o < 62 ? o - 4 : o - 59 | 43] = o++;
947
947
  e.encode = function(a, f, i) {
948
- for (var l = null, c = [], h = 0, d = 0, p; f < i; ) {
948
+ for (var c = null, l = [], h = 0, d = 0, p; f < i; ) {
949
949
  var v = a[f++];
950
950
  switch (d) {
951
951
  case 0:
952
- c[h++] = r[v >> 2], p = (v & 3) << 4, d = 1;
952
+ l[h++] = r[v >> 2], p = (v & 3) << 4, d = 1;
953
953
  break;
954
954
  case 1:
955
- c[h++] = r[p | v >> 4], p = (v & 15) << 2, d = 2;
955
+ l[h++] = r[p | v >> 4], p = (v & 15) << 2, d = 2;
956
956
  break;
957
957
  case 2:
958
- c[h++] = r[p | v >> 6], c[h++] = r[v & 63], d = 0;
958
+ l[h++] = r[p | v >> 6], l[h++] = r[v & 63], d = 0;
959
959
  break;
960
960
  }
961
- h > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, c)), h = 0);
961
+ h > 8191 && ((c || (c = [])).push(String.fromCharCode.apply(String, l)), h = 0);
962
962
  }
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));
963
+ return d && (l[h++] = r[p], l[h++] = 61, d === 1 && (l[h++] = 61)), c ? (h && c.push(String.fromCharCode.apply(String, l.slice(0, h))), c.join("")) : String.fromCharCode.apply(String, l.slice(0, h));
964
964
  };
965
965
  var u = "invalid encoding";
966
966
  e.decode = function(a, f, i) {
967
- for (var l = i, c = 0, h, d = 0; d < a.length; ) {
967
+ for (var c = i, l = 0, h, d = 0; d < a.length; ) {
968
968
  var p = a.charCodeAt(d++);
969
- if (p === 61 && c > 1)
969
+ if (p === 61 && l > 1)
970
970
  break;
971
971
  if ((p = s[p]) === void 0)
972
972
  throw Error(u);
973
- switch (c) {
973
+ switch (l) {
974
974
  case 0:
975
- h = p, c = 1;
975
+ h = p, l = 1;
976
976
  break;
977
977
  case 1:
978
- f[i++] = h << 2 | (p & 48) >> 4, h = p, c = 2;
978
+ f[i++] = h << 2 | (p & 48) >> 4, h = p, l = 2;
979
979
  break;
980
980
  case 2:
981
- f[i++] = (h & 15) << 4 | (p & 60) >> 2, h = p, c = 3;
981
+ f[i++] = (h & 15) << 4 | (p & 60) >> 2, h = p, l = 3;
982
982
  break;
983
983
  case 3:
984
- f[i++] = (h & 3) << 6 | p, c = 0;
984
+ f[i++] = (h & 3) << 6 | p, l = 0;
985
985
  break;
986
986
  }
987
987
  }
988
- if (c === 1)
988
+ if (l === 1)
989
989
  throw Error(u);
990
- return i - l;
990
+ return i - c;
991
991
  }, e.test = function(a) {
992
992
  return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a);
993
993
  };
@@ -1026,11 +1026,11 @@ var float = factory(factory);
1026
1026
  function factory(t) {
1027
1027
  return typeof Float32Array < "u" ? function() {
1028
1028
  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];
1029
+ function o(f, i, c) {
1030
+ e[0] = f, i[c] = r[0], i[c + 1] = r[1], i[c + 2] = r[2], i[c + 3] = r[3];
1031
1031
  }
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];
1032
+ function u(f, i, c) {
1033
+ e[0] = f, i[c] = r[3], i[c + 1] = r[2], i[c + 2] = r[1], i[c + 3] = r[0];
1034
1034
  }
1035
1035
  t.writeFloatLE = s ? o : u, t.writeFloatBE = s ? u : o;
1036
1036
  function n(f, i) {
@@ -1070,11 +1070,11 @@ function factory(t) {
1070
1070
  t.readFloatLE = r.bind(null, readUintLE), t.readFloatBE = r.bind(null, readUintBE);
1071
1071
  }(), typeof Float64Array < "u" ? function() {
1072
1072
  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];
1073
+ function o(f, i, c) {
1074
+ 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
1075
  }
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];
1076
+ function u(f, i, c) {
1077
+ 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
1078
  }
1079
1079
  t.writeDoubleLE = s ? o : u, t.writeDoubleBE = s ? u : o;
1080
1080
  function n(f, i) {
@@ -1100,19 +1100,19 @@ function factory(t) {
1100
1100
  else if (n > 17976931348623157e292)
1101
1101
  s(0, a, f + o), s((i << 31 | 2146435072) >>> 0, a, f + u);
1102
1102
  else {
1103
- var l;
1103
+ var c;
1104
1104
  if (n < 22250738585072014e-324)
1105
- l = n / 5e-324, s(l >>> 0, a, f + o), s((i << 31 | l / 4294967296) >>> 0, a, f + u);
1105
+ c = n / 5e-324, s(c >>> 0, a, f + o), s((i << 31 | c / 4294967296) >>> 0, a, f + u);
1106
1106
  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);
1107
+ var l = Math.floor(Math.log(n) / Math.LN2);
1108
+ l === 1024 && (l = 1023), c = n * Math.pow(2, -l), s(c * 4503599627370496 >>> 0, a, f + o), s((i << 31 | l + 1023 << 20 | c * 1048576 & 1048575) >>> 0, a, f + u);
1109
1109
  }
1110
1110
  }
1111
1111
  }
1112
1112
  t.writeDoubleLE = e.bind(null, writeUintLE, 0, 4), t.writeDoubleBE = e.bind(null, writeUintBE, 4, 0);
1113
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);
1114
+ var f = s(n, a + o), i = s(n, a + u), c = (i >> 31) * 2 + 1, l = i >>> 20 & 2047, h = 4294967296 * (i & 1048575) + f;
1115
+ return l === 2047 ? h ? NaN : c * (1 / 0) : l === 0 ? c * 5e-324 * h : c * Math.pow(2, l - 1075) * (h + 4503599627370496);
1116
1116
  }
1117
1117
  t.readDoubleLE = r.bind(null, readUintLE, 0, 4), t.readDoubleBE = r.bind(null, readUintBE, 4, 0);
1118
1118
  }(), t;
@@ -1150,8 +1150,8 @@ var utf8$2 = {};
1150
1150
  var n = u - o;
1151
1151
  if (n < 1)
1152
1152
  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);
1153
+ for (var a = null, f = [], i = 0, c; o < u; )
1154
+ c = s[o++], c < 128 ? f[i++] = c : c > 191 && c < 224 ? f[i++] = (c & 31) << 6 | s[o++] & 63 : c > 239 && c < 365 ? (c = ((c & 7) << 18 | (s[o++] & 63) << 12 | (s[o++] & 63) << 6 | s[o++] & 63) - 65536, f[i++] = 55296 + (c >> 10), f[i++] = 56320 + (c & 1023)) : f[i++] = (c & 15) << 12 | (s[o++] & 63) << 6 | s[o++] & 63, i > 8191 && ((a || (a = [])).push(String.fromCharCode.apply(String, f)), i = 0);
1155
1155
  return a ? (i && a.push(String.fromCharCode.apply(String, f.slice(0, i))), a.join("")) : String.fromCharCode.apply(String, f.slice(0, i));
1156
1156
  }, e.write = function(s, o, u) {
1157
1157
  for (var n = u, a, f, i = 0; i < s.length; ++i)
@@ -1754,8 +1754,8 @@ Service.prototype.rpcCall = function t(e, r, s, o, u) {
1754
1754
  if (!(i instanceof s))
1755
1755
  try {
1756
1756
  i = s[n.responseDelimited ? "decodeDelimited" : "decode"](i);
1757
- } catch (l) {
1758
- return n.emit("error", l, e), u(l);
1757
+ } catch (c) {
1758
+ return n.emit("error", c, e), u(c);
1759
1759
  }
1760
1760
  return n.emit("data", i, e), u(null, i);
1761
1761
  }
@@ -1791,16 +1791,16 @@ function codegen(t, e) {
1791
1791
  if (typeof u != "string") {
1792
1792
  var n = o();
1793
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);
1794
+ for (var a = Object.keys(u), f = new Array(a.length + 1), i = new Array(a.length), c = 0; c < a.length; )
1795
+ f[c] = a[c], i[c] = u[a[c++]];
1796
+ return f[c] = n, Function.apply(null, f).apply(null, i);
1797
1797
  }
1798
1798
  return Function(n)();
1799
1799
  }
1800
- for (var c = new Array(arguments.length - 1), h = 0; h < c.length; )
1801
- c[h] = arguments[++h];
1800
+ for (var l = new Array(arguments.length - 1), h = 0; h < l.length; )
1801
+ l[h] = arguments[++h];
1802
1802
  if (h = 0, u = u.replace(/%([%dfijs])/g, function(p, v) {
1803
- var g = c[h++];
1803
+ var g = l[h++];
1804
1804
  switch (v) {
1805
1805
  case "d":
1806
1806
  case "f":
@@ -1813,7 +1813,7 @@ function codegen(t, e) {
1813
1813
  return String(g);
1814
1814
  }
1815
1815
  return "%";
1816
- }), h !== c.length)
1816
+ }), h !== l.length)
1817
1817
  throw Error("parameter count mismatch");
1818
1818
  return r.push(u), s;
1819
1819
  }
@@ -2061,16 +2061,16 @@ function requireField() {
2061
2061
  n.fromJSON = function(f, i) {
2062
2062
  return new n(f, i.id, i.type, i.rule, i.extend, i.options, i.comment);
2063
2063
  };
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)
2064
+ function n(a, f, i, c, l, h, d) {
2065
+ if (s.isObject(c) ? (d = l, h = c, c = l = void 0) : s.isObject(l) && (d = h, h = l, l = void 0), t.call(this, a, h), !s.isInteger(f) || f < 0)
2066
2066
  throw TypeError("id must be a non-negative integer");
2067
2067
  if (!s.isString(i))
2068
2068
  throw TypeError("type must be a string");
2069
- if (l !== void 0 && !u.test(l = l.toString().toLowerCase()))
2069
+ if (c !== void 0 && !u.test(c = c.toString().toLowerCase()))
2070
2070
  throw TypeError("rule must be a string rule");
2071
- if (c !== void 0 && !s.isString(c))
2071
+ if (l !== void 0 && !s.isString(l))
2072
2072
  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 : (
2073
+ 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
2074
  /* istanbul ignore next */
2075
2075
  !1
2076
2076
  ), this.bytes = i === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment = d;
@@ -2079,8 +2079,8 @@ function requireField() {
2079
2079
  get: function() {
2080
2080
  return this._packed === null && (this._packed = this.getOption("packed") !== !1), this._packed;
2081
2081
  }
2082
- }), n.prototype.setOption = function(f, i, l) {
2083
- return f === "packed" && (this._packed = null), t.prototype.setOption.call(this, f, i, l);
2082
+ }), n.prototype.setOption = function(f, i, c) {
2083
+ return f === "packed" && (this._packed = null), t.prototype.setOption.call(this, f, i, c);
2084
2084
  }, n.prototype.toJSON = function(f) {
2085
2085
  var i = f ? !!f.keepComments : !1;
2086
2086
  return s.toObject([
@@ -2107,9 +2107,9 @@ function requireField() {
2107
2107
  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
2108
  }
2109
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) {
2110
+ }, n.d = function(f, i, c, l) {
2111
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 }));
2112
+ s.decorateType(d.constructor).add(new n(p, f, i, c, { default: l }));
2113
2113
  };
2114
2114
  }, n._configure = function(f) {
2115
2115
  o = f;
@@ -2170,8 +2170,8 @@ function requireOneof() {
2170
2170
  }, s.d = function() {
2171
2171
  for (var n = new Array(arguments.length), a = 0; a < arguments.length; )
2172
2172
  n[a] = arguments[a++];
2173
- return function(i, l) {
2174
- r.decorateType(i.constructor).add(new s(l, n)), Object.defineProperty(i, l, {
2173
+ return function(i, c) {
2174
+ r.decorateType(i.constructor).add(new s(c, n)), Object.defineProperty(i, c, {
2175
2175
  get: r.oneOfGetter(n),
2176
2176
  set: r.oneOfSetter(n)
2177
2177
  });
@@ -2185,94 +2185,94 @@ function requireNamespace() {
2185
2185
  var t = requireObject();
2186
2186
  ((f.prototype = Object.create(t.prototype)).constructor = f).className = "Namespace";
2187
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);
2188
+ f.fromJSON = function(l, h) {
2189
+ return new f(l, h.options).addJSON(h.nested);
2190
2190
  };
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);
2191
+ function a(c, l) {
2192
+ if (c && c.length) {
2193
+ for (var h = {}, d = 0; d < c.length; ++d)
2194
+ h[c[d].name] = c[d].toJSON(l);
2195
2195
  return h;
2196
2196
  }
2197
2197
  }
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)
2198
+ f.arrayToJSON = a, f.isReservedId = function(l, h) {
2199
+ if (l) {
2200
+ for (var d = 0; d < l.length; ++d)
2201
+ if (typeof l[d] != "string" && l[d][0] <= h && l[d][1] > h)
2202
2202
  return !0;
2203
2203
  }
2204
2204
  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)
2205
+ }, f.isReservedName = function(l, h) {
2206
+ if (l) {
2207
+ for (var d = 0; d < l.length; ++d)
2208
+ if (l[d] === h)
2209
2209
  return !0;
2210
2210
  }
2211
2211
  return !1;
2212
2212
  };
2213
- function f(l, c) {
2214
- t.call(this, l, c), this.nested = void 0, this._nestedArray = null;
2213
+ function f(c, l) {
2214
+ t.call(this, c, l), this.nested = void 0, this._nestedArray = null;
2215
2215
  }
2216
- function i(l) {
2217
- return l._nestedArray = null, l;
2216
+ function i(c) {
2217
+ return c._nestedArray = null, c;
2218
2218
  }
2219
2219
  return Object.defineProperty(f.prototype, "nestedArray", {
2220
2220
  get: function() {
2221
2221
  return this._nestedArray || (this._nestedArray = r.toArray(this.nested));
2222
2222
  }
2223
- }), f.prototype.toJSON = function(c) {
2223
+ }), f.prototype.toJSON = function(l) {
2224
2224
  return r.toObject([
2225
2225
  "options",
2226
2226
  this.options,
2227
2227
  "nested",
2228
- a(this.nestedArray, c)
2228
+ a(this.nestedArray, l)
2229
2229
  ]);
2230
- }, f.prototype.addJSON = function(c) {
2230
+ }, f.prototype.addJSON = function(l) {
2231
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(
2232
+ if (l)
2233
+ for (var d = Object.keys(l), p = 0, v; p < d.length; ++p)
2234
+ v = l[d[p]], h.add(
2235
2235
  // most to least likely
2236
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)
2237
2237
  );
2238
2238
  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))
2239
+ }, f.prototype.get = function(l) {
2240
+ return this.nested && this.nested[l] || null;
2241
+ }, f.prototype.getEnum = function(l) {
2242
+ if (this.nested && this.nested[l] instanceof n)
2243
+ return this.nested[l].values;
2244
+ throw Error("no such enum: " + l);
2245
+ }, f.prototype.add = function(l) {
2246
+ if (!(l instanceof e && l.extend !== void 0 || l instanceof o || l instanceof s || l instanceof n || l instanceof u || l instanceof f))
2247
2247
  throw TypeError("object must be a valid nested object");
2248
2248
  if (!this.nested)
2249
2249
  this.nested = {};
2250
2250
  else {
2251
- var h = this.get(c.name);
2251
+ var h = this.get(l.name);
2252
2252
  if (h)
2253
- if (h instanceof f && c instanceof f && !(h instanceof o || h instanceof u)) {
2253
+ if (h instanceof f && l instanceof f && !(h instanceof o || h instanceof u)) {
2254
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);
2255
+ l.add(d[p]);
2256
+ this.remove(h), this.nested || (this.nested = {}), l.setOptions(h.options, !0);
2257
2257
  } else
2258
- throw Error("duplicate name '" + c.name + "' in " + this);
2258
+ throw Error("duplicate name '" + l.name + "' in " + this);
2259
2259
  }
2260
- return this.nested[c.name] = c, c.onAdd(this), i(this);
2261
- }, f.prototype.remove = function(c) {
2262
- if (!(c instanceof t))
2260
+ return this.nested[l.name] = l, l.onAdd(this), i(this);
2261
+ }, f.prototype.remove = function(l) {
2262
+ if (!(l instanceof t))
2263
2263
  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))
2264
+ if (l.parent !== this)
2265
+ throw Error(l + " is not a member of " + this);
2266
+ return delete this.nested[l.name], Object.keys(this.nested).length || (this.nested = void 0), l.onRemove(this), i(this);
2267
+ }, f.prototype.define = function(l, h) {
2268
+ if (r.isString(l))
2269
+ l = l.split(".");
2270
+ else if (!Array.isArray(l))
2271
2271
  throw TypeError("illegal path");
2272
- if (c && c.length && c[0] === "")
2272
+ if (l && l.length && l[0] === "")
2273
2273
  throw Error("path must be relative");
2274
- for (var d = this; c.length > 0; ) {
2275
- var p = c.shift();
2274
+ for (var d = this; l.length > 0; ) {
2275
+ var p = l.shift();
2276
2276
  if (d.nested && d.nested[p]) {
2277
2277
  if (d = d.nested[p], !(d instanceof f))
2278
2278
  throw Error("path conflicts with non-namespace objects");
@@ -2281,52 +2281,52 @@ function requireNamespace() {
2281
2281
  }
2282
2282
  return h && d.addJSON(h), d;
2283
2283
  }, 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();
2284
+ for (var l = this.nestedArray, h = 0; h < l.length; )
2285
+ l[h] instanceof f ? l[h++].resolveAll() : l[h++].resolve();
2286
2286
  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 === ".")
2287
+ }, f.prototype.lookup = function(l, h, d) {
2288
+ if (typeof h == "boolean" ? (d = h, h = void 0) : h && !Array.isArray(h) && (h = [h]), r.isString(l) && l.length) {
2289
+ if (l === ".")
2290
2290
  return this.root;
2291
- c = c.split(".");
2292
- } else if (!c.length)
2291
+ l = l.split(".");
2292
+ } else if (!l.length)
2293
2293
  return this;
2294
- if (c[0] === "")
2295
- return this.root.lookup(c.slice(1), h);
2296
- var p = this.get(c[0]);
2294
+ if (l[0] === "")
2295
+ return this.root.lookup(l.slice(1), h);
2296
+ var p = this.get(l[0]);
2297
2297
  if (p) {
2298
- if (c.length === 1) {
2298
+ if (l.length === 1) {
2299
2299
  if (!h || h.indexOf(p.constructor) > -1)
2300
2300
  return p;
2301
- } else if (p instanceof f && (p = p.lookup(c.slice(1), h, !0)))
2301
+ } else if (p instanceof f && (p = p.lookup(l.slice(1), h, !0)))
2302
2302
  return p;
2303
2303
  } else
2304
2304
  for (var v = 0; v < this.nestedArray.length; ++v)
2305
- if (this._nestedArray[v] instanceof f && (p = this._nestedArray[v].lookup(c, h, !0)))
2305
+ if (this._nestedArray[v] instanceof f && (p = this._nestedArray[v].lookup(l, h, !0)))
2306
2306
  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]);
2307
+ return this.parent === null || d ? null : this.parent.lookup(l, h);
2308
+ }, f.prototype.lookupType = function(l) {
2309
+ var h = this.lookup(l, [o]);
2310
2310
  if (!h)
2311
- throw Error("no such type: " + c);
2311
+ throw Error("no such type: " + l);
2312
2312
  return h;
2313
- }, f.prototype.lookupEnum = function(c) {
2314
- var h = this.lookup(c, [n]);
2313
+ }, f.prototype.lookupEnum = function(l) {
2314
+ var h = this.lookup(l, [n]);
2315
2315
  if (!h)
2316
- throw Error("no such Enum '" + c + "' in " + this);
2316
+ throw Error("no such Enum '" + l + "' in " + this);
2317
2317
  return h;
2318
- }, f.prototype.lookupTypeOrEnum = function(c) {
2319
- var h = this.lookup(c, [o, n]);
2318
+ }, f.prototype.lookupTypeOrEnum = function(l) {
2319
+ var h = this.lookup(l, [o, n]);
2320
2320
  if (!h)
2321
- throw Error("no such Type or Enum '" + c + "' in " + this);
2321
+ throw Error("no such Type or Enum '" + l + "' in " + this);
2322
2322
  return h;
2323
- }, f.prototype.lookupService = function(c) {
2324
- var h = this.lookup(c, [u]);
2323
+ }, f.prototype.lookupService = function(l) {
2324
+ var h = this.lookup(l, [u]);
2325
2325
  if (!h)
2326
- throw Error("no such Service '" + c + "' in " + this);
2326
+ throw Error("no such Service '" + l + "' in " + this);
2327
2327
  return h;
2328
- }, f._configure = function(l, c, h) {
2329
- o = l, u = c, n = h;
2328
+ }, f._configure = function(c, l, h) {
2329
+ o = c, u = l, n = h;
2330
2330
  }, namespace;
2331
2331
  }
2332
2332
  var mapfield, hasRequiredMapfield;
@@ -2366,8 +2366,8 @@ function requireMapfield() {
2366
2366
  throw Error("invalid key type: " + this.keyType);
2367
2367
  return t.prototype.resolve.call(this);
2368
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));
2369
+ return typeof a == "function" ? a = r.decorateType(a).name : a && typeof a == "object" && (a = r.decorateEnum(a).name), function(i, c) {
2370
+ r.decorateType(i.constructor).add(new s(c, u, n, a));
2371
2371
  };
2372
2372
  }, mapfield;
2373
2373
  }
@@ -2378,14 +2378,14 @@ function requireMethod() {
2378
2378
  var t = requireObject();
2379
2379
  ((r.prototype = Object.create(t.prototype)).constructor = r).className = "Method";
2380
2380
  var e = requireUtil();
2381
- function r(s, o, u, n, a, f, i, l, c) {
2381
+ function r(s, o, u, n, a, f, i, c, l) {
2382
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)))
2383
2383
  throw TypeError("type must be a string");
2384
2384
  if (!e.isString(u))
2385
2385
  throw TypeError("requestType must be a string");
2386
2386
  if (!e.isString(n))
2387
2387
  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;
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 = c, this.parsedOptions = l;
2389
2389
  }
2390
2390
  return r.fromJSON = function(o, u) {
2391
2391
  return new r(o, u.type, u.requestType, u.responseType, u.requestStream, u.responseStream, u.options, u.comment, u.parsedOptions);
@@ -2427,8 +2427,8 @@ function requireService() {
2427
2427
  o.fromJSON = function(a, f) {
2428
2428
  var i = new o(a, f.options);
2429
2429
  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]]));
2430
+ for (var c = Object.keys(f.methods), l = 0; l < c.length; ++l)
2431
+ i.add(e.fromJSON(c[l], f.methods[c[l]]));
2432
2432
  return f.nested && i.addJSON(f.nested), i.comment = f.comment, i;
2433
2433
  }, o.prototype.toJSON = function(a) {
2434
2434
  var f = t.prototype.toJSON.call(this, a), i = a ? !!a.keepComments : !1;
@@ -2469,16 +2469,16 @@ function requireService() {
2469
2469
  }
2470
2470
  return t.prototype.remove.call(this, a);
2471
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)")({
2472
+ for (var c = new s.Service(a, f, i), l = 0, h; l < /* initializes */
2473
+ this.methodsArray.length; ++l) {
2474
+ var d = r.lcFirst((h = this._methodsArray[l]).resolve().name).replace(/[^$\w_]/g, "");
2475
+ c[d] = r.codegen(["r", "c"], r.isReserved(d) ? d + "_" : d)("return this.rpcCall(m,q,s,r,c)")({
2476
2476
  m: h,
2477
2477
  q: h.resolvedRequestType.ctor,
2478
2478
  s: h.resolvedResponseType.ctor
2479
2479
  });
2480
2480
  }
2481
- return l;
2481
+ return c;
2482
2482
  }, service;
2483
2483
  }
2484
2484
  var message = Message, util = requireMinimal();
@@ -2529,12 +2529,12 @@ function requireDecoder() {
2529
2529
  u.group && n("if((t&7)===4)")("break"), n("switch(t>>>3){");
2530
2530
  for (var a = 0; a < /* initializes */
2531
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")("}");
2532
+ var f = u._fieldsArray[a].resolve(), i = f.resolvedType instanceof t ? "int32" : f.type, c = "m" + r.safeProp(f.name);
2533
+ 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
2534
  }
2535
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));
2536
+ var l = u._fieldsArray[a];
2537
+ l.required && n("if(!m.hasOwnProperty(%j))", l.name)("throw util.ProtocolError(%j,{instance:m})", s(l));
2538
2538
  }
2539
2539
  return n("return m");
2540
2540
  }
@@ -2552,7 +2552,7 @@ function requireVerifier() {
2552
2552
  if (a.resolvedType)
2553
2553
  if (a.resolvedType instanceof t) {
2554
2554
  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]]);
2555
+ for (var c = Object.keys(a.resolvedType.values), l = 0; l < c.length; ++l) n("case %i:", a.resolvedType.values[c[l]]);
2556
2556
  n("break")("}");
2557
2557
  } else
2558
2558
  n("{")("var e=types[%i].verify(%s);", f, i)("if(e)")("return%j+e", a.name + ".")("}");
@@ -2613,21 +2613,21 @@ function requireVerifier() {
2613
2613
  function u(n) {
2614
2614
  var a = e.codegen(["m"], n.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected"), f = n.oneofsArray, i = {};
2615
2615
  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]")("}");
2616
+ for (var c = 0; c < /* initializes */
2617
+ n.fieldsArray.length; ++c) {
2618
+ var l = n._fieldsArray[c].resolve(), h = "m" + e.safeProp(l.name);
2619
+ if (l.optional && a("if(%s!=null&&m.hasOwnProperty(%j)){", h, l.name), l.map)
2620
+ a("if(!util.isObject(%s))", h)("return%j", r(l, "object"))("var k=Object.keys(%s)", h)("for(var i=0;i<k.length;++i){"), o(a, l, "k[i]"), s(a, l, c, h + "[k[i]]")("}");
2621
+ else if (l.repeated)
2622
+ a("if(!Array.isArray(%s))", h)("return%j", r(l, "array"))("for(var i=0;i<%s.length;++i){", h), s(a, l, c, h + "[i]")("}");
2623
2623
  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);
2624
+ if (l.partOf) {
2625
+ var d = e.safeProp(l.partOf.name);
2626
+ i[l.partOf.name] === 1 && a("if(p%s===1)", d)("return%j", l.partOf.name + ": multiple values"), i[l.partOf.name] = 1, a("p%s=1", d);
2627
2627
  }
2628
- s(a, c, l, h);
2628
+ s(a, l, c, h);
2629
2629
  }
2630
- c.optional && a("}");
2630
+ l.optional && a("}");
2631
2631
  }
2632
2632
  return a("return null");
2633
2633
  }
@@ -2638,12 +2638,12 @@ function requireConverter() {
2638
2638
  return hasRequiredConverter || (hasRequiredConverter = 1, function(t) {
2639
2639
  var e = t, r = require_enum(), s = requireUtil();
2640
2640
  function o(n, a, f, i) {
2641
- var l = !1;
2641
+ var c = !1;
2642
2642
  if (a.resolvedType)
2643
2643
  if (a.resolvedType instanceof r) {
2644
2644
  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");
2645
+ for (var l = a.resolvedType.values, h = Object.keys(l), d = 0; d < h.length; ++d)
2646
+ l[h[d]] === 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:", h[d])("case %i:", l[h[d]])("m%s=%j", i, l[h[d]])("break");
2647
2647
  n("}");
2648
2648
  } 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
2649
  else {
@@ -2687,27 +2687,27 @@ function requireConverter() {
2687
2687
  var f = a.fieldsArray, i = s.codegen(["d"], a.name + "$fromObject")("if(d instanceof this.ctor)")("return d");
2688
2688
  if (!f.length) return i("return new this.ctor");
2689
2689
  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(
2690
+ for (var c = 0; c < f.length; ++c) {
2691
+ var l = f[c].resolve(), h = s.safeProp(l.name);
2692
+ l.map ? (i("if(d%s){", h)('if(typeof d%s!=="object")', h)("throw TypeError(%j)", l.fullName + ": object expected")("m%s={}", h)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", h), o(
2693
2693
  i,
2694
- c,
2695
- /* not sorted */
2696
2694
  l,
2695
+ /* not sorted */
2696
+ c,
2697
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(
2698
+ )("}")("}")) : l.repeated ? (i("if(d%s){", h)("if(!Array.isArray(d%s))", h)("throw TypeError(%j)", l.fullName + ": array expected")("m%s=[]", h)("for(var i=0;i<d%s.length;++i){", h), o(
2699
2699
  i,
2700
- c,
2701
- /* not sorted */
2702
2700
  l,
2701
+ /* not sorted */
2702
+ c,
2703
2703
  h + "[i]"
2704
- )("}")("}")) : (c.resolvedType instanceof r || i("if(d%s!=null){", h), o(
2704
+ )("}")("}")) : (l.resolvedType instanceof r || i("if(d%s!=null){", h), o(
2705
2705
  i,
2706
- c,
2707
- /* not sorted */
2708
2706
  l,
2707
+ /* not sorted */
2708
+ c,
2709
2709
  h
2710
- ), c.resolvedType instanceof r || i("}"));
2710
+ ), l.resolvedType instanceof r || i("}"));
2711
2711
  }
2712
2712
  return i("return m");
2713
2713
  };
@@ -2715,19 +2715,19 @@ function requireConverter() {
2715
2715
  if (a.resolvedType)
2716
2716
  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
2717
  else {
2718
- var l = !1;
2718
+ var c = !1;
2719
2719
  switch (a.type) {
2720
2720
  case "double":
2721
2721
  case "float":
2722
2722
  n("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", i, i, i, i);
2723
2723
  break;
2724
2724
  case "uint64":
2725
- l = !0;
2725
+ c = !0;
2726
2726
  case "int64":
2727
2727
  case "sint64":
2728
2728
  case "fixed64":
2729
2729
  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);
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, c ? "true" : "", i);
2731
2731
  break;
2732
2732
  case "bytes":
2733
2733
  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,14 +2743,14 @@ function requireConverter() {
2743
2743
  var f = a.fieldsArray.slice().sort(s.compareFieldsById);
2744
2744
  if (!f.length)
2745
2745
  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));
2746
+ for (var i = s.codegen(["m", "o"], a.name + "$toObject")("if(!o)")("o={}")("var d={}"), c = [], l = [], h = [], d = 0; d < f.length; ++d)
2747
+ f[d].partOf || (f[d].resolve().repeated ? c : f[d].map ? l : h).push(f[d]);
2748
+ if (c.length) {
2749
+ for (i("if(o.arrays||o.defaults){"), d = 0; d < c.length; ++d) i("d%s=[]", s.safeProp(c[d].name));
2750
2750
  i("}");
2751
2751
  }
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));
2752
+ if (l.length) {
2753
+ for (i("if(o.objects||o.defaults){"), d = 0; d < l.length; ++d) i("d%s={}", s.safeProp(l[d].name));
2754
2754
  i("}");
2755
2755
  }
2756
2756
  if (h.length) {
@@ -2817,8 +2817,8 @@ var wrappers = {};
2817
2817
  f && (s = f.decode(s.value));
2818
2818
  }
2819
2819
  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;
2820
+ var i = s.$type.toObject(s, o), c = s.$type.fullName[0] === "." ? s.$type.fullName.slice(1) : s.$type.fullName;
2821
+ return n === "" && (n = u), a = n + c, i["@type"] = a, i;
2822
2822
  }
2823
2823
  return this.toObject(s, o);
2824
2824
  }
@@ -2830,7 +2830,7 @@ function requireType() {
2830
2830
  hasRequiredType = 1, type = v;
2831
2831
  var t = requireNamespace();
2832
2832
  ((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;
2833
+ var e = require_enum(), r = requireOneof(), s = requireField(), o = requireMapfield(), u = requireService(), n = message, a = reader, f = writer, i = requireUtil(), c = requireEncoder(), l = requireDecoder(), h = requireVerifier(), d = requireConverter(), p = wrappers;
2834
2834
  function v(m, _) {
2835
2835
  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
2836
  }
@@ -2999,11 +2999,11 @@ function requireType() {
2999
2999
  for (var _ = this.fullName, y = [], b = 0; b < /* initializes */
3000
3000
  this.fieldsArray.length; ++b)
3001
3001
  y.push(this._fieldsArray[b].resolve().resolvedType);
3002
- this.encode = l(this)({
3002
+ this.encode = c(this)({
3003
3003
  Writer: f,
3004
3004
  types: y,
3005
3005
  util: i
3006
- }), this.decode = c(this)({
3006
+ }), this.decode = l(this)({
3007
3007
  Reader: a,
3008
3008
  types: y,
3009
3009
  util: i
@@ -3146,8 +3146,8 @@ function requireRoot() {
3146
3146
  }).join(", "));
3147
3147
  return t.prototype.resolveAll.call(this);
3148
3148
  };
3149
- var l = /^[A-Z]/;
3150
- function c(h, d) {
3149
+ var c = /^[A-Z]/;
3150
+ function l(h, d) {
3151
3151
  var p = d.parent.lookup(d.extend);
3152
3152
  if (p) {
3153
3153
  var v = new e(d.fullName, d.id, d.type, d.rule, void 0, d.options);
@@ -3159,17 +3159,17 @@ function requireRoot() {
3159
3159
  if (d instanceof e)
3160
3160
  /* an extension field (implies not part of a oneof) */
3161
3161
  d.extend !== void 0 && /* not already handled */
3162
- !d.extensionField && (c(this, d) || this.deferred.push(d));
3162
+ !d.extensionField && (l(this, d) || this.deferred.push(d));
3163
3163
  else if (d instanceof r)
3164
- l.test(d.name) && (d.parent[d.name] = d.values);
3164
+ c.test(d.name) && (d.parent[d.name] = d.values);
3165
3165
  else if (!(d instanceof s)) {
3166
3166
  if (d instanceof u)
3167
3167
  for (var p = 0; p < this.deferred.length; )
3168
- c(this, this.deferred[p]) ? this.deferred.splice(p, 1) : ++p;
3168
+ l(this, this.deferred[p]) ? this.deferred.splice(p, 1) : ++p;
3169
3169
  for (var v = 0; v < /* initializes */
3170
3170
  d.nestedArray.length; ++v)
3171
3171
  this._handleAdd(d._nestedArray[v]);
3172
- l.test(d.name) && (d.parent[d.name] = d);
3172
+ c.test(d.name) && (d.parent[d.name] = d);
3173
3173
  }
3174
3174
  }, f.prototype._handleRemove = function(d) {
3175
3175
  if (d instanceof e) {
@@ -3187,12 +3187,12 @@ function requireRoot() {
3187
3187
  p > -1 && this.deferred.splice(p, 1);
3188
3188
  }
3189
3189
  } else if (d instanceof r)
3190
- l.test(d.name) && delete d.parent[d.name];
3190
+ c.test(d.name) && delete d.parent[d.name];
3191
3191
  else if (d instanceof t) {
3192
3192
  for (var v = 0; v < /* initializes */
3193
3193
  d.nestedArray.length; ++v)
3194
3194
  this._handleRemove(d._nestedArray[v]);
3195
- l.test(d.name) && delete d.parent[d.name];
3195
+ c.test(d.name) && delete d.parent[d.name];
3196
3196
  }
3197
3197
  }, f._configure = function(h, d, p) {
3198
3198
  u = h, n = d, a = p;
@@ -3205,17 +3205,17 @@ function requireUtil() {
3205
3205
  var t = util$1.exports = requireMinimal(), e = roots, r, s;
3206
3206
  t.codegen = codegen_1, t.fetch = fetch_1, t.path = path, t.fs = t.inquire("fs"), t.toArray = function(i) {
3207
3207
  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;
3208
+ for (var c = Object.keys(i), l = new Array(c.length), h = 0; h < c.length; )
3209
+ l[h] = i[c[h++]];
3210
+ return l;
3211
3211
  }
3212
3212
  return [];
3213
3213
  }, 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);
3214
+ for (var c = {}, l = 0; l < i.length; ) {
3215
+ var h = i[l++], d = i[l++];
3216
+ d !== void 0 && (c[h] = d);
3217
3217
  }
3218
- return l;
3218
+ return c;
3219
3219
  };
3220
3220
  var o = /\\/g, u = /"/g;
3221
3221
  t.isReserved = function(i) {
@@ -3227,26 +3227,26 @@ function requireUtil() {
3227
3227
  };
3228
3228
  var n = /_([a-z])/g;
3229
3229
  t.camelCase = function(i) {
3230
- return i.substring(0, 1) + i.substring(1).replace(n, function(l, c) {
3231
- return c.toUpperCase();
3230
+ return i.substring(0, 1) + i.substring(1).replace(n, function(c, l) {
3231
+ return l.toUpperCase();
3232
3232
  });
3233
- }, t.compareFieldsById = function(i, l) {
3234
- return i.id - l.id;
3235
- }, t.decorateType = function(i, l) {
3233
+ }, t.compareFieldsById = function(i, c) {
3234
+ return i.id - c.id;
3235
+ }, t.decorateType = function(i, c) {
3236
3236
  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;
3237
+ return c && i.$type.name !== c && (t.decorateRoot.remove(i.$type), i.$type.name = c, t.decorateRoot.add(i.$type)), i.$type;
3238
3238
  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;
3239
+ var l = new r(c || i.name);
3240
+ 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
3241
  };
3242
3242
  var a = 0;
3243
3243
  return t.decorateEnum = function(i) {
3244
3244
  if (i.$type)
3245
3245
  return i.$type;
3246
3246
  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) {
3247
+ var c = new s("Enum" + a++, i);
3248
+ return t.decorateRoot.add(c), Object.defineProperty(i, "$type", { value: c, enumerable: !1 }), c;
3249
+ }, t.setProperty = function(i, c, l) {
3250
3250
  function h(d, p, v) {
3251
3251
  var g = p.shift();
3252
3252
  if (g === "__proto__" || g === "prototype")
@@ -3261,9 +3261,9 @@ function requireUtil() {
3261
3261
  }
3262
3262
  if (typeof i != "object")
3263
3263
  throw TypeError("dst must be an object");
3264
- if (!l)
3264
+ if (!c)
3265
3265
  throw TypeError("path must be specified");
3266
- return l = l.split("."), h(i, l, c);
3266
+ return c = c.split("."), h(i, c, l);
3267
3267
  }, Object.defineProperty(t, "decorateRoot", {
3268
3268
  get: function() {
3269
3269
  return e.decorated || (e.decorated = new (requireRoot())());
@@ -3330,8 +3330,8 @@ function requireObject() {
3330
3330
  this.parsedOptions || (this.parsedOptions = []);
3331
3331
  var a = this.parsedOptions;
3332
3332
  if (n) {
3333
- var f = a.find(function(c) {
3334
- return Object.prototype.hasOwnProperty.call(c, o);
3333
+ var f = a.find(function(l) {
3334
+ return Object.prototype.hasOwnProperty.call(l, o);
3335
3335
  });
3336
3336
  if (f) {
3337
3337
  var i = f[o];
@@ -3339,8 +3339,8 @@ function requireObject() {
3339
3339
  } else
3340
3340
  f = {}, f[o] = t.setProperty({}, n, u), a.push(f);
3341
3341
  } else {
3342
- var l = {};
3343
- l[o] = u, a.push(l);
3342
+ var c = {};
3343
+ c[o] = u, a.push(c);
3344
3344
  }
3345
3345
  return this;
3346
3346
  }, r.prototype.setOptions = function(o, u) {
@@ -3366,8 +3366,8 @@ function require_enum() {
3366
3366
  if (t.call(this, o, n), u && typeof u != "object")
3367
3367
  throw TypeError("values must be an object");
3368
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]);
3369
+ for (var c = Object.keys(u), l = 0; l < c.length; ++l)
3370
+ typeof u[c[l]] == "number" && (this.valuesById[this.values[c[l]] = u[c[l]]] = c[l]);
3371
3371
  }
3372
3372
  return s.fromJSON = function(u, n) {
3373
3373
  var a = new s(u, n.values, n.options, n.comment, n.comments);
@@ -3432,8 +3432,8 @@ function requireEncoder() {
3432
3432
  /* initializes */
3433
3433
  u.fieldsArray.slice().sort(r.compareFieldsById)
3434
3434
  ), 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));
3435
+ var c = i[a].resolve(), l = u._fieldsArray.indexOf(c), h = c.resolvedType instanceof t ? "int32" : c.type, d = e.basic[h];
3436
+ 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), d === 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 | d, h, f), n("}")("}")) : c.repeated ? (n("if(%s!=null&&%s.length){", f, f), c.packed && e.packed[h] !== 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])", h, f)("w.ldelim()") : (n("for(var i=0;i<%s.length;++i)", f), d === void 0 ? s(n, c, l, f + "[i]") : n("w.uint32(%i).%s(%s[i])", (c.id << 3 | d) >>> 0, h, f)), n("}")) : (c.optional && n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", f, c.name), d === void 0 ? s(n, c, l, f) : n("w.uint32(%i).%s(%s)", (c.id << 3 | d) >>> 0, h, f));
3437
3437
  }
3438
3438
  return n("return w");
3439
3439
  }
@@ -3563,21 +3563,26 @@ const make_values = async ({
3563
3563
  value_buffer: /* @__PURE__ */ new Map()
3564
3564
  };
3565
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);
3566
+ const a = n.id, f = n.value, i = writable(n[f]);
3567
+ i.subscribe((c) => {
3568
+ const l = { id: a, [f]: c, value: f }, h = { id: t, tag: e, value: l };
3569
+ s.publish(
3570
+ concat([
3571
+ header(nil_xit_proto.MessageType.MessageType_ValueUpdate),
3572
+ nil_xit_proto.ValueUpdate.encode(h).finish()
3573
+ ])
3574
+ );
3575
+ }), u[f].set(a, i);
3574
3576
  }
3575
3577
  return s.on_message((n, a) => {
3576
- var l;
3578
+ var c;
3577
3579
  const f = new DataView(a.buffer).getUint32(0, !1), i = a.slice(4);
3578
3580
  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]);
3581
+ const l = nil_xit_proto.ValueUpdate.decode(i);
3582
+ if (l.id === t && l.tag === e) {
3583
+ const h = l.value.value, d = (c = u[h]) == null ? void 0 : c.get(l.value.id);
3584
+ d == null || d.set(l.value[h]);
3585
+ }
3581
3586
  }
3582
3587
  }), u;
3583
3588
  }, make_signals = async ({
@@ -3609,17 +3614,21 @@ const make_values = async ({
3609
3614
  };
3610
3615
  for (const { id: n, type: a } of o)
3611
3616
  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
+ const f = { frame_id: t, signal_id: n, tag: e };
3618
+ s.publish(
3619
+ concat([
3620
+ header(nil_xit_proto.MessageType.MessageType_SignalNotify),
3621
+ nil_xit_proto.SignalNotify.encode(f).finish()
3622
+ ])
3623
+ );
3617
3624
  }) : 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);
3625
+ const i = { frame_id: t, signal_id: n, tag: e, [a]: f };
3626
+ s.publish(
3627
+ concat([
3628
+ header(nil_xit_proto.MessageType.MessageType_SignalNotify),
3629
+ nil_xit_proto.SignalNotify.encode(i).finish()
3630
+ ])
3631
+ );
3623
3632
  });
3624
3633
  return u;
3625
3634
  }, create_context = (t, e, r) => ({
@@ -3671,12 +3680,12 @@ const make_values = async ({
3671
3680
  bundle({ host: t, cdn_url: s, id: e })
3672
3681
  ]);
3673
3682
  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);
3683
+ const c = /* @__PURE__ */ new Map();
3684
+ c.set("nil.xit", create_context(n, a, o));
3685
+ const { destroy: l } = f(i, c);
3677
3686
  return u.start(), {
3678
3687
  destroy: () => {
3679
- u.stop(), c();
3688
+ u.stop(), l();
3680
3689
  }
3681
3690
  };
3682
3691
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nil-/xit",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",