@busy-app/busy-lib 0.15.0 → 0.15.2

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/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- var F = Object.defineProperty;
2
- var B = (e, n, t) => n in e ? F(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
1
+ var U = Object.defineProperty;
2
+ var B = (e, n, t) => n in e ? U(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
3
  var u = (e, n, t) => B(e, typeof n != "symbol" ? n + "" : n, t);
4
- import j from "openapi-fetch";
4
+ import L from "openapi-fetch";
5
5
  const M = (e, n) => {
6
6
  if (typeof FormData < "u" && e instanceof FormData || typeof Buffer < "u" && typeof Buffer.isBuffer == "function" && Buffer.isBuffer(e) || typeof File < "u" && e instanceof File || typeof Blob < "u" && e instanceof Blob || typeof ArrayBuffer < "u" && e instanceof ArrayBuffer || typeof ArrayBuffer < "u" && ArrayBuffer.isView && ArrayBuffer.isView(e))
7
7
  return e;
@@ -27,7 +27,7 @@ function G(e, n, t, r = 3e3) {
27
27
  })().finally(() => {
28
28
  l = null;
29
29
  })), await l);
30
- }, U = {
30
+ }, F = {
31
31
  async onRequest({ request: f, schemaPath: p }) {
32
32
  return o && f.headers.set("Authorization", `Bearer ${o}`), p !== "/version" && (await a(), i && f.headers.set("X-API-Sem-Ver", i), s && f.headers.set("X-API-Token", s)), f;
33
33
  },
@@ -44,7 +44,7 @@ function G(e, n, t, r = 3e3) {
44
44
  return h;
45
45
  throw await w(h);
46
46
  }
47
- }, R = j({
47
+ }, R = L({
48
48
  baseUrl: e,
49
49
  bodySerializer: M
50
50
  });
@@ -59,7 +59,7 @@ function G(e, n, t, r = 3e3) {
59
59
  } finally {
60
60
  clearTimeout(O);
61
61
  }
62
- }, R.use(U), {
62
+ }, R.use(F), {
63
63
  client: R,
64
64
  setApiKey: (f) => {
65
65
  s = f;
@@ -832,7 +832,7 @@ async function Dn(e, n) {
832
832
  throw r;
833
833
  return t;
834
834
  }
835
- class jn {
835
+ class Ln {
836
836
  /**
837
837
  * Returns current Wi-Fi status.
838
838
  *
@@ -878,7 +878,7 @@ class jn {
878
878
  return await Dn(this.apiClient, n);
879
879
  }
880
880
  }
881
- async function Ln(e, n) {
881
+ async function jn(e, n) {
882
882
  const { path: t, file: r } = n, { data: i, error: o } = await e.withTimeout(
883
883
  (s) => e.POST("/storage/write", {
884
884
  params: {
@@ -915,7 +915,7 @@ async function xn(e, n) {
915
915
  throw o;
916
916
  return i;
917
917
  }
918
- async function Un(e, n) {
918
+ async function Fn(e, n) {
919
919
  const { path: t } = n, { data: r, error: i } = await e.withTimeout(
920
920
  (o) => e.GET("/storage/list", {
921
921
  params: {
@@ -931,7 +931,7 @@ async function Un(e, n) {
931
931
  throw i;
932
932
  return r;
933
933
  }
934
- async function Fn(e, n) {
934
+ async function Un(e, n) {
935
935
  const { path: t } = n, { data: r, error: i } = await e.withTimeout(
936
936
  (o) => e.DELETE("/storage/remove", {
937
937
  params: {
@@ -997,7 +997,7 @@ class Vn {
997
997
  * @returns {Promise<SuccessResponse>} A promise that resolves on successful upload.
998
998
  */
999
999
  async StorageWrite(n) {
1000
- return await Ln(this.apiClient, n);
1000
+ return await jn(this.apiClient, n);
1001
1001
  }
1002
1002
  /**
1003
1003
  * Download file from internal storage. Downloads a file from a specified path.
@@ -1020,7 +1020,7 @@ class Vn {
1020
1020
  * @returns {Promise<StorageList>} A promise that resolves to a list of files and directories.
1021
1021
  */
1022
1022
  async StorageListGet(n) {
1023
- return await Un(this.apiClient, n);
1023
+ return await Fn(this.apiClient, n);
1024
1024
  }
1025
1025
  /**
1026
1026
  * Remove a file on internal storage. Removes a file with a specified path.
@@ -1031,7 +1031,7 @@ class Vn {
1031
1031
  * @returns {Promise<SuccessResponse>} A promise that resolves on successful removal.
1032
1032
  */
1033
1033
  async StorageRemove(n) {
1034
- return await Fn(this.apiClient, n);
1034
+ return await Un(this.apiClient, n);
1035
1035
  }
1036
1036
  /**
1037
1037
  * Create a directory on internal storage. Creates a new directory with a specified path.
@@ -1508,7 +1508,7 @@ class me {
1508
1508
  this.connectionType = "wifi";
1509
1509
  return;
1510
1510
  }
1511
- const t = j({
1511
+ const t = L({
1512
1512
  baseUrl: `${this.addr}/api/`
1513
1513
  });
1514
1514
  try {
@@ -1552,7 +1552,7 @@ ve(me, [
1552
1552
  bn,
1553
1553
  On,
1554
1554
  Cn,
1555
- jn,
1555
+ Ln,
1556
1556
  Vn,
1557
1557
  Jn,
1558
1558
  Qn,
@@ -1567,11 +1567,11 @@ class y extends Error {
1567
1567
  }
1568
1568
  }
1569
1569
  var d = /* @__PURE__ */ ((e) => (e.IDLE = "IDLE", e.STARTING = "STARTING", e.RUNNING = "RUNNING", e.STOPPED = "STOPPED", e.FAILED = "FAILED", e))(d || {}), m = /* @__PURE__ */ ((e) => (e.DISCONNECTED = "DISCONNECTED", e.CONNECTING = "CONNECTING", e.CONNECTED = "CONNECTED", e.RECONNECTING = "RECONNECTING", e))(m || {}), v = /* @__PURE__ */ ((e) => (e.UNAUTHENTICATED = "UNAUTHENTICATED", e.AUTHENTICATING = "AUTHENTICATING", e.AUTHENTICATED = "AUTHENTICATED", e.REAUTHENTICATING = "REAUTHENTICATING", e.FAILED = "FAILED", e))(v || {}), E = /* @__PURE__ */ ((e) => (e.NONE = "NONE", e.ACTIVE = "ACTIVE", e.STALE = "STALE", e))(E || {}), _ = /* @__PURE__ */ ((e) => (e.OFF = "OFF", e.INITIALIZING = "INITIALIZING", e.READY = "READY", e.ERROR = "ERROR", e))(_ || {});
1570
- const ge = 5, L = 5, x = `var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, src = { exports: {} }, indexLight = { exports: {} }, indexMinimal = {}, minimal = {}, aspromise, hasRequiredAspromise;
1570
+ const ge = 5, j = 5, be = 500, x = `var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, src = { exports: {} }, indexLight = { exports: {} }, indexMinimal = {}, minimal = {}, aspromise, hasRequiredAspromise;
1571
1571
  function requireAspromise() {
1572
1572
  if (hasRequiredAspromise) return aspromise;
1573
- hasRequiredAspromise = 1, aspromise = u;
1574
- function u(f, h) {
1573
+ hasRequiredAspromise = 1, aspromise = a;
1574
+ function a(f, h) {
1575
1575
  for (var c = new Array(arguments.length - 1), d = 0, n = 2, e = !0; n < arguments.length; )
1576
1576
  c[d++] = arguments[n++];
1577
1577
  return new Promise(function(i, t) {
@@ -1580,9 +1580,9 @@ function requireAspromise() {
1580
1580
  if (e = !1, s)
1581
1581
  t(s);
1582
1582
  else {
1583
- for (var a = new Array(arguments.length - 1), o = 0; o < a.length; )
1584
- a[o++] = arguments[o];
1585
- i.apply(null, a);
1583
+ for (var u = new Array(arguments.length - 1), o = 0; o < u.length; )
1584
+ u[o++] = arguments[o];
1585
+ i.apply(null, u);
1586
1586
  }
1587
1587
  };
1588
1588
  try {
@@ -1596,8 +1596,8 @@ function requireAspromise() {
1596
1596
  }
1597
1597
  var base64 = {}, hasRequiredBase64;
1598
1598
  function requireBase64() {
1599
- return hasRequiredBase64 || (hasRequiredBase64 = 1, function(u) {
1600
- var f = u;
1599
+ return hasRequiredBase64 || (hasRequiredBase64 = 1, function(a) {
1600
+ var f = a;
1601
1601
  f.length = function(r) {
1602
1602
  var i = r.length;
1603
1603
  if (!i)
@@ -1609,26 +1609,26 @@ function requireBase64() {
1609
1609
  for (var h = new Array(64), c = new Array(123), d = 0; d < 64; )
1610
1610
  c[h[d] = d < 26 ? d + 65 : d < 52 ? d + 71 : d < 62 ? d - 4 : d - 59 | 43] = d++;
1611
1611
  f.encode = function(r, i, t) {
1612
- for (var l = null, s = [], a = 0, o = 0, p; i < t; ) {
1612
+ for (var l = null, s = [], u = 0, o = 0, p; i < t; ) {
1613
1613
  var y = r[i++];
1614
1614
  switch (o) {
1615
1615
  case 0:
1616
- s[a++] = h[y >> 2], p = (y & 3) << 4, o = 1;
1616
+ s[u++] = h[y >> 2], p = (y & 3) << 4, o = 1;
1617
1617
  break;
1618
1618
  case 1:
1619
- s[a++] = h[p | y >> 4], p = (y & 15) << 2, o = 2;
1619
+ s[u++] = h[p | y >> 4], p = (y & 15) << 2, o = 2;
1620
1620
  break;
1621
1621
  case 2:
1622
- s[a++] = h[p | y >> 6], s[a++] = h[y & 63], o = 0;
1622
+ s[u++] = h[p | y >> 6], s[u++] = h[y & 63], o = 0;
1623
1623
  break;
1624
1624
  }
1625
- a > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, s)), a = 0);
1625
+ u > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, s)), u = 0);
1626
1626
  }
1627
- return o && (s[a++] = h[p], s[a++] = 61, o === 1 && (s[a++] = 61)), l ? (a && l.push(String.fromCharCode.apply(String, s.slice(0, a))), l.join("")) : String.fromCharCode.apply(String, s.slice(0, a));
1627
+ return o && (s[u++] = h[p], s[u++] = 61, o === 1 && (s[u++] = 61)), l ? (u && l.push(String.fromCharCode.apply(String, s.slice(0, u))), l.join("")) : String.fromCharCode.apply(String, s.slice(0, u));
1628
1628
  };
1629
1629
  var n = "invalid encoding";
1630
1630
  f.decode = function(r, i, t) {
1631
- for (var l = t, s = 0, a, o = 0; o < r.length; ) {
1631
+ for (var l = t, s = 0, u, o = 0; o < r.length; ) {
1632
1632
  var p = r.charCodeAt(o++);
1633
1633
  if (p === 61 && s > 1)
1634
1634
  break;
@@ -1636,16 +1636,16 @@ function requireBase64() {
1636
1636
  throw Error(n);
1637
1637
  switch (s) {
1638
1638
  case 0:
1639
- a = p, s = 1;
1639
+ u = p, s = 1;
1640
1640
  break;
1641
1641
  case 1:
1642
- i[t++] = a << 2 | (p & 48) >> 4, a = p, s = 2;
1642
+ i[t++] = u << 2 | (p & 48) >> 4, u = p, s = 2;
1643
1643
  break;
1644
1644
  case 2:
1645
- i[t++] = (a & 15) << 4 | (p & 60) >> 2, a = p, s = 3;
1645
+ i[t++] = (u & 15) << 4 | (p & 60) >> 2, u = p, s = 3;
1646
1646
  break;
1647
1647
  case 3:
1648
- i[t++] = (a & 3) << 6 | p, s = 0;
1648
+ i[t++] = (u & 3) << 6 | p, s = 0;
1649
1649
  break;
1650
1650
  }
1651
1651
  }
@@ -1660,16 +1660,16 @@ function requireBase64() {
1660
1660
  var eventemitter, hasRequiredEventemitter;
1661
1661
  function requireEventemitter() {
1662
1662
  if (hasRequiredEventemitter) return eventemitter;
1663
- hasRequiredEventemitter = 1, eventemitter = u;
1664
- function u() {
1663
+ hasRequiredEventemitter = 1, eventemitter = a;
1664
+ function a() {
1665
1665
  this._listeners = {};
1666
1666
  }
1667
- return u.prototype.on = function(h, c, d) {
1667
+ return a.prototype.on = function(h, c, d) {
1668
1668
  return (this._listeners[h] || (this._listeners[h] = [])).push({
1669
1669
  fn: c,
1670
1670
  ctx: d || this
1671
1671
  }), this;
1672
- }, u.prototype.off = function(h, c) {
1672
+ }, a.prototype.off = function(h, c) {
1673
1673
  if (h === void 0)
1674
1674
  this._listeners = {};
1675
1675
  else if (c === void 0)
@@ -1678,7 +1678,7 @@ function requireEventemitter() {
1678
1678
  for (var d = this._listeners[h], n = 0; n < d.length; )
1679
1679
  d[n].fn === c ? d.splice(n, 1) : ++n;
1680
1680
  return this;
1681
- }, u.prototype.emit = function(h) {
1681
+ }, a.prototype.emit = function(h) {
1682
1682
  var c = this._listeners[h];
1683
1683
  if (c) {
1684
1684
  for (var d = [], n = 1; n < arguments.length; )
@@ -1692,8 +1692,8 @@ function requireEventemitter() {
1692
1692
  var float, hasRequiredFloat;
1693
1693
  function requireFloat() {
1694
1694
  if (hasRequiredFloat) return float;
1695
- hasRequiredFloat = 1, float = u(u);
1696
- function u(n) {
1695
+ hasRequiredFloat = 1, float = a(a);
1696
+ function a(n) {
1697
1697
  return typeof Float32Array < "u" ? function() {
1698
1698
  var e = new Float32Array([-0]), r = new Uint8Array(e.buffer), i = r[3] === 128;
1699
1699
  function t(o, p, y) {
@@ -1706,14 +1706,14 @@ function requireFloat() {
1706
1706
  function s(o, p) {
1707
1707
  return r[0] = o[p], r[1] = o[p + 1], r[2] = o[p + 2], r[3] = o[p + 3], e[0];
1708
1708
  }
1709
- function a(o, p) {
1709
+ function u(o, p) {
1710
1710
  return r[3] = o[p], r[2] = o[p + 1], r[1] = o[p + 2], r[0] = o[p + 3], e[0];
1711
1711
  }
1712
- n.readFloatLE = i ? s : a, n.readFloatBE = i ? a : s;
1712
+ n.readFloatLE = i ? s : u, n.readFloatBE = i ? u : s;
1713
1713
  }() : function() {
1714
1714
  function e(i, t, l, s) {
1715
- var a = t < 0 ? 1 : 0;
1716
- if (a && (t = -t), t === 0)
1715
+ var u = t < 0 ? 1 : 0;
1716
+ if (u && (t = -t), t === 0)
1717
1717
  i(1 / t > 0 ? (
1718
1718
  /* positive */
1719
1719
  0
@@ -1724,18 +1724,18 @@ function requireFloat() {
1724
1724
  else if (isNaN(t))
1725
1725
  i(2143289344, l, s);
1726
1726
  else if (t > 34028234663852886e22)
1727
- i((a << 31 | 2139095040) >>> 0, l, s);
1727
+ i((u << 31 | 2139095040) >>> 0, l, s);
1728
1728
  else if (t < 11754943508222875e-54)
1729
- i((a << 31 | Math.round(t / 1401298464324817e-60)) >>> 0, l, s);
1729
+ i((u << 31 | Math.round(t / 1401298464324817e-60)) >>> 0, l, s);
1730
1730
  else {
1731
1731
  var o = Math.floor(Math.log(t) / Math.LN2), p = Math.round(t * Math.pow(2, -o) * 8388608) & 8388607;
1732
- i((a << 31 | o + 127 << 23 | p) >>> 0, l, s);
1732
+ i((u << 31 | o + 127 << 23 | p) >>> 0, l, s);
1733
1733
  }
1734
1734
  }
1735
1735
  n.writeFloatLE = e.bind(null, f), n.writeFloatBE = e.bind(null, h);
1736
1736
  function r(i, t, l) {
1737
- var s = i(t, l), a = (s >> 31) * 2 + 1, o = s >>> 23 & 255, p = s & 8388607;
1738
- return o === 255 ? p ? NaN : a * (1 / 0) : o === 0 ? a * 1401298464324817e-60 * p : a * Math.pow(2, o - 150) * (p + 8388608);
1737
+ var s = i(t, l), u = (s >> 31) * 2 + 1, o = s >>> 23 & 255, p = s & 8388607;
1738
+ return o === 255 ? p ? NaN : u * (1 / 0) : o === 0 ? u * 1401298464324817e-60 * p : u * Math.pow(2, o - 150) * (p + 8388608);
1739
1739
  }
1740
1740
  n.readFloatLE = r.bind(null, c), n.readFloatBE = r.bind(null, d);
1741
1741
  }(), typeof Float64Array < "u" ? function() {
@@ -1750,38 +1750,38 @@ function requireFloat() {
1750
1750
  function s(o, p) {
1751
1751
  return r[0] = o[p], r[1] = o[p + 1], r[2] = o[p + 2], r[3] = o[p + 3], r[4] = o[p + 4], r[5] = o[p + 5], r[6] = o[p + 6], r[7] = o[p + 7], e[0];
1752
1752
  }
1753
- function a(o, p) {
1753
+ function u(o, p) {
1754
1754
  return r[7] = o[p], r[6] = o[p + 1], r[5] = o[p + 2], r[4] = o[p + 3], r[3] = o[p + 4], r[2] = o[p + 5], r[1] = o[p + 6], r[0] = o[p + 7], e[0];
1755
1755
  }
1756
- n.readDoubleLE = i ? s : a, n.readDoubleBE = i ? a : s;
1756
+ n.readDoubleLE = i ? s : u, n.readDoubleBE = i ? u : s;
1757
1757
  }() : function() {
1758
- function e(i, t, l, s, a, o) {
1758
+ function e(i, t, l, s, u, o) {
1759
1759
  var p = s < 0 ? 1 : 0;
1760
1760
  if (p && (s = -s), s === 0)
1761
- i(0, a, o + t), i(1 / s > 0 ? (
1761
+ i(0, u, o + t), i(1 / s > 0 ? (
1762
1762
  /* positive */
1763
1763
  0
1764
1764
  ) : (
1765
1765
  /* negative 0 */
1766
1766
  2147483648
1767
- ), a, o + l);
1767
+ ), u, o + l);
1768
1768
  else if (isNaN(s))
1769
- i(0, a, o + t), i(2146959360, a, o + l);
1769
+ i(0, u, o + t), i(2146959360, u, o + l);
1770
1770
  else if (s > 17976931348623157e292)
1771
- i(0, a, o + t), i((p << 31 | 2146435072) >>> 0, a, o + l);
1771
+ i(0, u, o + t), i((p << 31 | 2146435072) >>> 0, u, o + l);
1772
1772
  else {
1773
1773
  var y;
1774
1774
  if (s < 22250738585072014e-324)
1775
- y = s / 5e-324, i(y >>> 0, a, o + t), i((p << 31 | y / 4294967296) >>> 0, a, o + l);
1775
+ y = s / 5e-324, i(y >>> 0, u, o + t), i((p << 31 | y / 4294967296) >>> 0, u, o + l);
1776
1776
  else {
1777
1777
  var E = Math.floor(Math.log(s) / Math.LN2);
1778
- E === 1024 && (E = 1023), y = s * Math.pow(2, -E), i(y * 4503599627370496 >>> 0, a, o + t), i((p << 31 | E + 1023 << 20 | y * 1048576 & 1048575) >>> 0, a, o + l);
1778
+ E === 1024 && (E = 1023), y = s * Math.pow(2, -E), i(y * 4503599627370496 >>> 0, u, o + t), i((p << 31 | E + 1023 << 20 | y * 1048576 & 1048575) >>> 0, u, o + l);
1779
1779
  }
1780
1780
  }
1781
1781
  }
1782
1782
  n.writeDoubleLE = e.bind(null, f, 0, 4), n.writeDoubleBE = e.bind(null, h, 4, 0);
1783
- function r(i, t, l, s, a) {
1784
- var o = i(s, a + t), p = i(s, a + l), y = (p >> 31) * 2 + 1, E = p >>> 20 & 2047, v = 4294967296 * (p & 1048575) + o;
1783
+ function r(i, t, l, s, u) {
1784
+ var o = i(s, u + t), p = i(s, u + l), y = (p >> 31) * 2 + 1, E = p >>> 20 & 2047, v = 4294967296 * (p & 1048575) + o;
1785
1785
  return E === 2047 ? v ? NaN : y * (1 / 0) : E === 0 ? y * 5e-324 * v : y * Math.pow(2, E - 1075) * (v + 4503599627370496);
1786
1786
  }
1787
1787
  n.readDoubleLE = r.bind(null, c, 0, 4), n.readDoubleBE = r.bind(null, d, 4, 0);
@@ -1810,7 +1810,7 @@ function requireInquire() {
1810
1810
  var mod = eval("quire".replace(/^/, "re"))(moduleName);
1811
1811
  if (mod && (mod.length || Object.keys(mod).length))
1812
1812
  return mod;
1813
- } catch (u) {
1813
+ } catch (a) {
1814
1814
  }
1815
1815
  return null;
1816
1816
  }
@@ -1818,8 +1818,8 @@ function requireInquire() {
1818
1818
  }
1819
1819
  var utf8 = {}, hasRequiredUtf8;
1820
1820
  function requireUtf8() {
1821
- return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(u) {
1822
- var f = u;
1821
+ return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(a) {
1822
+ var f = a;
1823
1823
  f.length = function(c) {
1824
1824
  for (var d = 0, n = 0, e = 0; e < c.length; ++e)
1825
1825
  n = c.charCodeAt(e), n < 128 ? d += 1 : n < 2048 ? d += 2 : (n & 64512) === 55296 && (c.charCodeAt(e + 1) & 64512) === 56320 ? (++e, d += 4) : d += 3;
@@ -1841,8 +1841,8 @@ function requireUtf8() {
1841
1841
  var pool_1, hasRequiredPool;
1842
1842
  function requirePool() {
1843
1843
  if (hasRequiredPool) return pool_1;
1844
- hasRequiredPool = 1, pool_1 = u;
1845
- function u(f, h, c) {
1844
+ hasRequiredPool = 1, pool_1 = a;
1845
+ function a(f, h, c) {
1846
1846
  var d = c || 8192, n = d >>> 1, e = null, r = d;
1847
1847
  return function(t) {
1848
1848
  if (t < 1 || t > n)
@@ -1858,7 +1858,7 @@ var longbits, hasRequiredLongbits;
1858
1858
  function requireLongbits() {
1859
1859
  if (hasRequiredLongbits) return longbits;
1860
1860
  hasRequiredLongbits = 1, longbits = f;
1861
- var u = requireMinimal();
1861
+ var a = requireMinimal();
1862
1862
  function f(n, e) {
1863
1863
  this.lo = n >>> 0, this.hi = e >>> 0;
1864
1864
  }
@@ -1881,9 +1881,9 @@ function requireLongbits() {
1881
1881
  }, f.from = function(e) {
1882
1882
  if (typeof e == "number")
1883
1883
  return f.fromNumber(e);
1884
- if (u.isString(e))
1885
- if (u.Long)
1886
- e = u.Long.fromString(e);
1884
+ if (a.isString(e))
1885
+ if (a.Long)
1886
+ e = a.Long.fromString(e);
1887
1887
  else
1888
1888
  return f.fromNumber(parseInt(e, 10));
1889
1889
  return e.low || e.high ? new f(e.low >>> 0, e.high >>> 0) : h;
@@ -1894,7 +1894,7 @@ function requireLongbits() {
1894
1894
  }
1895
1895
  return this.lo + this.hi * 4294967296;
1896
1896
  }, f.prototype.toLong = function(e) {
1897
- return u.Long ? new u.Long(this.lo | 0, this.hi | 0, !!e) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!e };
1897
+ return a.Long ? new a.Long(this.lo | 0, this.hi | 0, !!e) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!e };
1898
1898
  };
1899
1899
  var d = String.prototype.charCodeAt;
1900
1900
  return f.fromHash = function(e) {
@@ -1926,8 +1926,8 @@ function requireLongbits() {
1926
1926
  }
1927
1927
  var hasRequiredMinimal;
1928
1928
  function requireMinimal() {
1929
- return hasRequiredMinimal || (hasRequiredMinimal = 1, function(u) {
1930
- var f = u;
1929
+ return hasRequiredMinimal || (hasRequiredMinimal = 1, function(a) {
1930
+ var f = a;
1931
1931
  f.asPromise = requireAspromise(), f.base64 = requireBase64(), f.EventEmitter = requireEventemitter(), f.float = requireFloat(), f.inquire = requireInquire(), f.utf8 = requireUtf8(), f.pool = requirePool(), f.LongBits = requireLongbits(), f.isNode = !!(typeof commonjsGlobal < "u" && commonjsGlobal && commonjsGlobal.process && commonjsGlobal.process.versions && commonjsGlobal.process.versions.node), f.global = f.isNode && commonjsGlobal || typeof window < "u" && window || typeof self < "u" && self || minimal, f.emptyArray = Object.freeze ? Object.freeze([]) : (
1932
1932
  /* istanbul ignore next */
1933
1933
  []
@@ -2054,7 +2054,7 @@ var writer, hasRequiredWriter;
2054
2054
  function requireWriter() {
2055
2055
  if (hasRequiredWriter) return writer;
2056
2056
  hasRequiredWriter = 1, writer = i;
2057
- var u = requireMinimal(), f, h = u.LongBits, c = u.base64, d = u.utf8;
2057
+ var a = requireMinimal(), f, h = a.LongBits, c = a.base64, d = a.utf8;
2058
2058
  function n(E, v, m) {
2059
2059
  this.fn = E, this.len = v, this.next = void 0, this.val = m;
2060
2060
  }
@@ -2067,7 +2067,7 @@ function requireWriter() {
2067
2067
  this.len = 0, this.head = new n(e, 0, 0), this.tail = this.head, this.states = null;
2068
2068
  }
2069
2069
  var t = function() {
2070
- return u.Buffer ? function() {
2070
+ return a.Buffer ? function() {
2071
2071
  return (i.create = function() {
2072
2072
  return new f();
2073
2073
  })();
@@ -2076,8 +2076,8 @@ function requireWriter() {
2076
2076
  };
2077
2077
  };
2078
2078
  i.create = t(), i.alloc = function(v) {
2079
- return new u.Array(v);
2080
- }, u.Array !== Array && (i.alloc = u.pool(i.alloc, u.Array.prototype.subarray)), i.prototype._push = function(v, m, _) {
2079
+ return new a.Array(v);
2080
+ }, a.Array !== Array && (i.alloc = a.pool(i.alloc, a.Array.prototype.subarray)), i.prototype._push = function(v, m, _) {
2081
2081
  return this.tail = this.tail.next = new n(v, m, _), this.len += m, this;
2082
2082
  };
2083
2083
  function l(E, v, m) {
@@ -2088,11 +2088,11 @@ function requireWriter() {
2088
2088
  v[m++] = E & 127 | 128, E >>>= 7;
2089
2089
  v[m] = E;
2090
2090
  }
2091
- function a(E, v) {
2091
+ function u(E, v) {
2092
2092
  this.len = E, this.next = void 0, this.val = v;
2093
2093
  }
2094
- a.prototype = Object.create(n.prototype), a.prototype.fn = s, i.prototype.uint32 = function(v) {
2095
- return this.len += (this.tail = this.tail.next = new a(
2094
+ u.prototype = Object.create(n.prototype), u.prototype.fn = s, i.prototype.uint32 = function(v) {
2095
+ return this.len += (this.tail = this.tail.next = new u(
2096
2096
  (v = v >>> 0) < 128 ? 1 : v < 16384 ? 2 : v < 2097152 ? 3 : v < 268435456 ? 4 : 5,
2097
2097
  v
2098
2098
  )).len, this;
@@ -2126,11 +2126,11 @@ function requireWriter() {
2126
2126
  var m = h.from(v);
2127
2127
  return this._push(p, 4, m.lo)._push(p, 4, m.hi);
2128
2128
  }, i.prototype.sfixed64 = i.prototype.fixed64, i.prototype.float = function(v) {
2129
- return this._push(u.float.writeFloatLE, 4, v);
2129
+ return this._push(a.float.writeFloatLE, 4, v);
2130
2130
  }, i.prototype.double = function(v) {
2131
- return this._push(u.float.writeDoubleLE, 8, v);
2131
+ return this._push(a.float.writeDoubleLE, 8, v);
2132
2132
  };
2133
- var y = u.Array.prototype.set ? function(v, m, _) {
2133
+ var y = a.Array.prototype.set ? function(v, m, _) {
2134
2134
  m.set(v, _);
2135
2135
  } : function(v, m, _) {
2136
2136
  for (var A = 0; A < v.length; ++A)
@@ -2140,7 +2140,7 @@ function requireWriter() {
2140
2140
  var m = v.length >>> 0;
2141
2141
  if (!m)
2142
2142
  return this._push(l, 1, 0);
2143
- if (u.isString(v)) {
2143
+ if (a.isString(v)) {
2144
2144
  var _ = i.alloc(m = c.length(v));
2145
2145
  c.decode(v, _, 0), v = _;
2146
2146
  }
@@ -2167,11 +2167,11 @@ var writer_buffer, hasRequiredWriter_buffer;
2167
2167
  function requireWriter_buffer() {
2168
2168
  if (hasRequiredWriter_buffer) return writer_buffer;
2169
2169
  hasRequiredWriter_buffer = 1, writer_buffer = h;
2170
- var u = requireWriter();
2171
- (h.prototype = Object.create(u.prototype)).constructor = h;
2170
+ var a = requireWriter();
2171
+ (h.prototype = Object.create(a.prototype)).constructor = h;
2172
2172
  var f = requireMinimal();
2173
2173
  function h() {
2174
- u.call(this);
2174
+ a.call(this);
2175
2175
  }
2176
2176
  h._configure = function() {
2177
2177
  h.alloc = f._Buffer_allocUnsafe, h.writeBytesBuffer = f.Buffer && f.Buffer.prototype instanceof Uint8Array && f.Buffer.prototype.set.name === "set" ? function(n, e, r) {
@@ -2199,70 +2199,70 @@ var reader, hasRequiredReader;
2199
2199
  function requireReader() {
2200
2200
  if (hasRequiredReader) return reader;
2201
2201
  hasRequiredReader = 1, reader = n;
2202
- var u = requireMinimal(), f, h = u.LongBits, c = u.utf8;
2203
- function d(s, a) {
2204
- return RangeError("index out of range: " + s.pos + " + " + (a || 1) + " > " + s.len);
2202
+ var a = requireMinimal(), f, h = a.LongBits, c = a.utf8;
2203
+ function d(s, u) {
2204
+ return RangeError("index out of range: " + s.pos + " + " + (u || 1) + " > " + s.len);
2205
2205
  }
2206
2206
  function n(s) {
2207
2207
  this.buf = s, this.pos = 0, this.len = s.length;
2208
2208
  }
2209
- var e = typeof Uint8Array < "u" ? function(a) {
2210
- if (a instanceof Uint8Array || Array.isArray(a))
2211
- return new n(a);
2209
+ var e = typeof Uint8Array < "u" ? function(u) {
2210
+ if (u instanceof Uint8Array || Array.isArray(u))
2211
+ return new n(u);
2212
2212
  throw Error("illegal buffer");
2213
- } : function(a) {
2214
- if (Array.isArray(a))
2215
- return new n(a);
2213
+ } : function(u) {
2214
+ if (Array.isArray(u))
2215
+ return new n(u);
2216
2216
  throw Error("illegal buffer");
2217
2217
  }, r = function() {
2218
- return u.Buffer ? function(o) {
2218
+ return a.Buffer ? function(o) {
2219
2219
  return (n.create = function(y) {
2220
- return u.Buffer.isBuffer(y) ? new f(y) : e(y);
2220
+ return a.Buffer.isBuffer(y) ? new f(y) : e(y);
2221
2221
  })(o);
2222
2222
  } : e;
2223
2223
  };
2224
- n.create = r(), n.prototype._slice = u.Array.prototype.subarray || /* istanbul ignore next */
2225
- u.Array.prototype.slice, n.prototype.uint32 = /* @__PURE__ */ function() {
2226
- var a = 4294967295;
2224
+ n.create = r(), n.prototype._slice = a.Array.prototype.subarray || /* istanbul ignore next */
2225
+ a.Array.prototype.slice, n.prototype.uint32 = /* @__PURE__ */ function() {
2226
+ var u = 4294967295;
2227
2227
  return function() {
2228
- if (a = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (a = (a | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (a = (a | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (a = (a | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (a = (a | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return a;
2228
+ if (u = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (u = (u | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (u = (u | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (u = (u | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (u = (u | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return u;
2229
2229
  if ((this.pos += 5) > this.len)
2230
2230
  throw this.pos = this.len, d(this, 10);
2231
- return a;
2231
+ return u;
2232
2232
  };
2233
2233
  }(), n.prototype.int32 = function() {
2234
2234
  return this.uint32() | 0;
2235
2235
  }, n.prototype.sint32 = function() {
2236
- var a = this.uint32();
2237
- return a >>> 1 ^ -(a & 1) | 0;
2236
+ var u = this.uint32();
2237
+ return u >>> 1 ^ -(u & 1) | 0;
2238
2238
  };
2239
2239
  function i() {
2240
- var s = new h(0, 0), a = 0;
2240
+ var s = new h(0, 0), u = 0;
2241
2241
  if (this.len - this.pos > 4) {
2242
- for (; a < 4; ++a)
2243
- if (s.lo = (s.lo | (this.buf[this.pos] & 127) << a * 7) >>> 0, this.buf[this.pos++] < 128)
2242
+ for (; u < 4; ++u)
2243
+ if (s.lo = (s.lo | (this.buf[this.pos] & 127) << u * 7) >>> 0, this.buf[this.pos++] < 128)
2244
2244
  return s;
2245
2245
  if (s.lo = (s.lo | (this.buf[this.pos] & 127) << 28) >>> 0, s.hi = (s.hi | (this.buf[this.pos] & 127) >> 4) >>> 0, this.buf[this.pos++] < 128)
2246
2246
  return s;
2247
- a = 0;
2247
+ u = 0;
2248
2248
  } else {
2249
- for (; a < 3; ++a) {
2249
+ for (; u < 3; ++u) {
2250
2250
  if (this.pos >= this.len)
2251
2251
  throw d(this);
2252
- if (s.lo = (s.lo | (this.buf[this.pos] & 127) << a * 7) >>> 0, this.buf[this.pos++] < 128)
2252
+ if (s.lo = (s.lo | (this.buf[this.pos] & 127) << u * 7) >>> 0, this.buf[this.pos++] < 128)
2253
2253
  return s;
2254
2254
  }
2255
- return s.lo = (s.lo | (this.buf[this.pos++] & 127) << a * 7) >>> 0, s;
2255
+ return s.lo = (s.lo | (this.buf[this.pos++] & 127) << u * 7) >>> 0, s;
2256
2256
  }
2257
2257
  if (this.len - this.pos > 4) {
2258
- for (; a < 5; ++a)
2259
- if (s.hi = (s.hi | (this.buf[this.pos] & 127) << a * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
2258
+ for (; u < 5; ++u)
2259
+ if (s.hi = (s.hi | (this.buf[this.pos] & 127) << u * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
2260
2260
  return s;
2261
2261
  } else
2262
- for (; a < 5; ++a) {
2262
+ for (; u < 5; ++u) {
2263
2263
  if (this.pos >= this.len)
2264
2264
  throw d(this);
2265
- if (s.hi = (s.hi | (this.buf[this.pos] & 127) << a * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
2265
+ if (s.hi = (s.hi | (this.buf[this.pos] & 127) << u * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
2266
2266
  return s;
2267
2267
  }
2268
2268
  throw Error("invalid varint encoding");
@@ -2270,8 +2270,8 @@ function requireReader() {
2270
2270
  n.prototype.bool = function() {
2271
2271
  return this.uint32() !== 0;
2272
2272
  };
2273
- function t(s, a) {
2274
- return (s[a - 4] | s[a - 3] << 8 | s[a - 2] << 16 | s[a - 1] << 24) >>> 0;
2273
+ function t(s, u) {
2274
+ return (s[u - 4] | s[u - 3] << 8 | s[u - 2] << 16 | s[u - 1] << 24) >>> 0;
2275
2275
  }
2276
2276
  n.prototype.fixed32 = function() {
2277
2277
  if (this.pos + 4 > this.len)
@@ -2290,32 +2290,32 @@ function requireReader() {
2290
2290
  return n.prototype.float = function() {
2291
2291
  if (this.pos + 4 > this.len)
2292
2292
  throw d(this, 4);
2293
- var a = u.float.readFloatLE(this.buf, this.pos);
2294
- return this.pos += 4, a;
2293
+ var u = a.float.readFloatLE(this.buf, this.pos);
2294
+ return this.pos += 4, u;
2295
2295
  }, n.prototype.double = function() {
2296
2296
  if (this.pos + 8 > this.len)
2297
2297
  throw d(this, 4);
2298
- var a = u.float.readDoubleLE(this.buf, this.pos);
2299
- return this.pos += 8, a;
2298
+ var u = a.float.readDoubleLE(this.buf, this.pos);
2299
+ return this.pos += 8, u;
2300
2300
  }, n.prototype.bytes = function() {
2301
- var a = this.uint32(), o = this.pos, p = this.pos + a;
2301
+ var u = this.uint32(), o = this.pos, p = this.pos + u;
2302
2302
  if (p > this.len)
2303
- throw d(this, a);
2304
- if (this.pos += a, Array.isArray(this.buf))
2303
+ throw d(this, u);
2304
+ if (this.pos += u, Array.isArray(this.buf))
2305
2305
  return this.buf.slice(o, p);
2306
2306
  if (o === p) {
2307
- var y = u.Buffer;
2307
+ var y = a.Buffer;
2308
2308
  return y ? y.alloc(0) : new this.buf.constructor(0);
2309
2309
  }
2310
2310
  return this._slice.call(this.buf, o, p);
2311
2311
  }, n.prototype.string = function() {
2312
- var a = this.bytes();
2313
- return c.read(a, 0, a.length);
2314
- }, n.prototype.skip = function(a) {
2315
- if (typeof a == "number") {
2316
- if (this.pos + a > this.len)
2317
- throw d(this, a);
2318
- this.pos += a;
2312
+ var u = this.bytes();
2313
+ return c.read(u, 0, u.length);
2314
+ }, n.prototype.skip = function(u) {
2315
+ if (typeof u == "number") {
2316
+ if (this.pos + u > this.len)
2317
+ throw d(this, u);
2318
+ this.pos += u;
2319
2319
  } else
2320
2320
  do
2321
2321
  if (this.pos >= this.len)
@@ -2347,25 +2347,25 @@ function requireReader() {
2347
2347
  return this;
2348
2348
  }, n._configure = function(s) {
2349
2349
  f = s, n.create = r(), f._configure();
2350
- var a = u.Long ? "toLong" : (
2350
+ var u = a.Long ? "toLong" : (
2351
2351
  /* istanbul ignore next */
2352
2352
  "toNumber"
2353
2353
  );
2354
- u.merge(n.prototype, {
2354
+ a.merge(n.prototype, {
2355
2355
  int64: function() {
2356
- return i.call(this)[a](!1);
2356
+ return i.call(this)[u](!1);
2357
2357
  },
2358
2358
  uint64: function() {
2359
- return i.call(this)[a](!0);
2359
+ return i.call(this)[u](!0);
2360
2360
  },
2361
2361
  sint64: function() {
2362
- return i.call(this).zzDecode()[a](!1);
2362
+ return i.call(this).zzDecode()[u](!1);
2363
2363
  },
2364
2364
  fixed64: function() {
2365
- return l.call(this)[a](!0);
2365
+ return l.call(this)[u](!0);
2366
2366
  },
2367
2367
  sfixed64: function() {
2368
- return l.call(this)[a](!1);
2368
+ return l.call(this)[u](!1);
2369
2369
  }
2370
2370
  });
2371
2371
  }, reader;
@@ -2374,11 +2374,11 @@ var reader_buffer, hasRequiredReader_buffer;
2374
2374
  function requireReader_buffer() {
2375
2375
  if (hasRequiredReader_buffer) return reader_buffer;
2376
2376
  hasRequiredReader_buffer = 1, reader_buffer = h;
2377
- var u = requireReader();
2378
- (h.prototype = Object.create(u.prototype)).constructor = h;
2377
+ var a = requireReader();
2378
+ (h.prototype = Object.create(a.prototype)).constructor = h;
2379
2379
  var f = requireMinimal();
2380
2380
  function h(c) {
2381
- u.call(this, c);
2381
+ a.call(this, c);
2382
2382
  }
2383
2383
  return h._configure = function() {
2384
2384
  f.Buffer && (h.prototype._slice = f.Buffer.prototype.slice);
@@ -2391,19 +2391,19 @@ var rpc = {}, service$1, hasRequiredService$1;
2391
2391
  function requireService$1() {
2392
2392
  if (hasRequiredService$1) return service$1;
2393
2393
  hasRequiredService$1 = 1, service$1 = f;
2394
- var u = requireMinimal();
2395
- (f.prototype = Object.create(u.EventEmitter.prototype)).constructor = f;
2394
+ var a = requireMinimal();
2395
+ (f.prototype = Object.create(a.EventEmitter.prototype)).constructor = f;
2396
2396
  function f(h, c, d) {
2397
2397
  if (typeof h != "function")
2398
2398
  throw TypeError("rpcImpl must be a function");
2399
- u.EventEmitter.call(this), this.rpcImpl = h, this.requestDelimited = !!c, this.responseDelimited = !!d;
2399
+ a.EventEmitter.call(this), this.rpcImpl = h, this.requestDelimited = !!c, this.responseDelimited = !!d;
2400
2400
  }
2401
2401
  return f.prototype.rpcCall = function h(c, d, n, e, r) {
2402
2402
  if (!e)
2403
2403
  throw TypeError("request must be specified");
2404
2404
  var i = this;
2405
2405
  if (!r)
2406
- return u.asPromise(h, i, c, d, n, e);
2406
+ return a.asPromise(h, i, c, d, n, e);
2407
2407
  if (!i.rpcImpl) {
2408
2408
  setTimeout(function() {
2409
2409
  r(Error("already ended"));
@@ -2427,8 +2427,8 @@ function requireService$1() {
2427
2427
  if (!(s instanceof n))
2428
2428
  try {
2429
2429
  s = n[i.responseDelimited ? "decodeDelimited" : "decode"](s);
2430
- } catch (a) {
2431
- return i.emit("error", a, c), r(a);
2430
+ } catch (u) {
2431
+ return i.emit("error", u, c), r(u);
2432
2432
  }
2433
2433
  return i.emit("data", s, c), r(null, s);
2434
2434
  }
@@ -2445,8 +2445,8 @@ function requireService$1() {
2445
2445
  }
2446
2446
  var hasRequiredRpc;
2447
2447
  function requireRpc() {
2448
- return hasRequiredRpc || (hasRequiredRpc = 1, function(u) {
2449
- var f = u;
2448
+ return hasRequiredRpc || (hasRequiredRpc = 1, function(a) {
2449
+ var f = a;
2450
2450
  f.Service = requireService$1();
2451
2451
  }(rpc)), rpc;
2452
2452
  }
@@ -2456,8 +2456,8 @@ function requireRoots() {
2456
2456
  }
2457
2457
  var hasRequiredIndexMinimal;
2458
2458
  function requireIndexMinimal() {
2459
- return hasRequiredIndexMinimal || (hasRequiredIndexMinimal = 1, function(u) {
2460
- var f = u;
2459
+ return hasRequiredIndexMinimal || (hasRequiredIndexMinimal = 1, function(a) {
2460
+ var f = a;
2461
2461
  f.build = "minimal", f.Writer = requireWriter(), f.BufferWriter = requireWriter_buffer(), f.Reader = requireReader(), f.BufferReader = requireReader_buffer(), f.util = requireMinimal(), f.rpc = requireRpc(), f.roots = requireRoots(), f.configure = h;
2462
2462
  function h() {
2463
2463
  f.util._configure(), f.Writer._configure(f.BufferWriter), f.Reader._configure(f.BufferReader);
@@ -2468,24 +2468,24 @@ function requireIndexMinimal() {
2468
2468
  var types = {}, util = { exports: {} }, codegen_1, hasRequiredCodegen;
2469
2469
  function requireCodegen() {
2470
2470
  if (hasRequiredCodegen) return codegen_1;
2471
- hasRequiredCodegen = 1, codegen_1 = u;
2472
- function u(f, h) {
2471
+ hasRequiredCodegen = 1, codegen_1 = a;
2472
+ function a(f, h) {
2473
2473
  typeof f == "string" && (h = f, f = void 0);
2474
2474
  var c = [];
2475
2475
  function d(e) {
2476
2476
  if (typeof e != "string") {
2477
2477
  var r = n();
2478
- if (u.verbose && console.log("codegen: " + r), r = "return " + r, e) {
2478
+ if (a.verbose && console.log("codegen: " + r), r = "return " + r, e) {
2479
2479
  for (var i = Object.keys(e), t = new Array(i.length + 1), l = new Array(i.length), s = 0; s < i.length; )
2480
2480
  t[s] = i[s], l[s] = e[i[s++]];
2481
2481
  return t[s] = r, Function.apply(null, t).apply(null, l);
2482
2482
  }
2483
2483
  return Function(r)();
2484
2484
  }
2485
- for (var a = new Array(arguments.length - 1), o = 0; o < a.length; )
2486
- a[o] = arguments[++o];
2485
+ for (var u = new Array(arguments.length - 1), o = 0; o < u.length; )
2486
+ u[o] = arguments[++o];
2487
2487
  if (o = 0, e = e.replace(/%([%dfijs])/g, function(y, E) {
2488
- var v = a[o++];
2488
+ var v = u[o++];
2489
2489
  switch (E) {
2490
2490
  case "d":
2491
2491
  case "f":
@@ -2498,7 +2498,7 @@ function requireCodegen() {
2498
2498
  return String(v);
2499
2499
  }
2500
2500
  return "%";
2501
- }), o !== a.length)
2501
+ }), o !== u.length)
2502
2502
  throw Error("parameter count mismatch");
2503
2503
  return c.push(e), d;
2504
2504
  }
@@ -2510,17 +2510,17 @@ function requireCodegen() {
2510
2510
  }
2511
2511
  return d.toString = n, d;
2512
2512
  }
2513
- return u.verbose = !1, codegen_1;
2513
+ return a.verbose = !1, codegen_1;
2514
2514
  }
2515
2515
  var fetch_1, hasRequiredFetch;
2516
2516
  function requireFetch() {
2517
2517
  if (hasRequiredFetch) return fetch_1;
2518
2518
  hasRequiredFetch = 1, fetch_1 = c;
2519
- var u = requireAspromise(), f = requireInquire(), h = f("fs");
2519
+ var a = requireAspromise(), f = requireInquire(), h = f("fs");
2520
2520
  function c(d, n, e) {
2521
2521
  return typeof n == "function" ? (e = n, n = {}) : n || (n = {}), e ? !n.xhr && h && h.readFile ? h.readFile(d, function(i, t) {
2522
2522
  return i && typeof XMLHttpRequest < "u" ? c.xhr(d, n, e) : i ? e(i) : e(null, n.binary ? t : t.toString("utf8"));
2523
- }) : c.xhr(d, n, e) : u(c, this, d, n);
2523
+ }) : c.xhr(d, n, e) : a(c, this, d, n);
2524
2524
  }
2525
2525
  return c.xhr = function(n, e, r) {
2526
2526
  var i = new XMLHttpRequest();
@@ -2544,8 +2544,8 @@ function requireFetch() {
2544
2544
  }
2545
2545
  var path = {}, hasRequiredPath;
2546
2546
  function requirePath() {
2547
- return hasRequiredPath || (hasRequiredPath = 1, function(u) {
2548
- var f = u, h = (
2547
+ return hasRequiredPath || (hasRequiredPath = 1, function(a) {
2548
+ var f = a, h = (
2549
2549
  /**
2550
2550
  * Tests if the specified path is absolute.
2551
2551
  * @param {string} path Path to test
@@ -2578,36 +2578,36 @@ var namespace, hasRequiredNamespace;
2578
2578
  function requireNamespace() {
2579
2579
  if (hasRequiredNamespace) return namespace;
2580
2580
  hasRequiredNamespace = 1, namespace = i;
2581
- var u = requireObject();
2582
- ((i.prototype = Object.create(u.prototype)).constructor = i).className = "Namespace";
2581
+ var a = requireObject();
2582
+ ((i.prototype = Object.create(a.prototype)).constructor = i).className = "Namespace";
2583
2583
  var f = requireField(), h = requireUtil(), c = requireOneof(), d, n, e;
2584
- i.fromJSON = function(s, a) {
2585
- return new i(s, a.options).addJSON(a.nested);
2584
+ i.fromJSON = function(s, u) {
2585
+ return new i(s, u.options).addJSON(u.nested);
2586
2586
  };
2587
2587
  function r(l, s) {
2588
2588
  if (l && l.length) {
2589
- for (var a = {}, o = 0; o < l.length; ++o)
2590
- a[l[o].name] = l[o].toJSON(s);
2591
- return a;
2589
+ for (var u = {}, o = 0; o < l.length; ++o)
2590
+ u[l[o].name] = l[o].toJSON(s);
2591
+ return u;
2592
2592
  }
2593
2593
  }
2594
- i.arrayToJSON = r, i.isReservedId = function(s, a) {
2594
+ i.arrayToJSON = r, i.isReservedId = function(s, u) {
2595
2595
  if (s) {
2596
2596
  for (var o = 0; o < s.length; ++o)
2597
- if (typeof s[o] != "string" && s[o][0] <= a && s[o][1] > a)
2597
+ if (typeof s[o] != "string" && s[o][0] <= u && s[o][1] > u)
2598
2598
  return !0;
2599
2599
  }
2600
2600
  return !1;
2601
- }, i.isReservedName = function(s, a) {
2601
+ }, i.isReservedName = function(s, u) {
2602
2602
  if (s) {
2603
2603
  for (var o = 0; o < s.length; ++o)
2604
- if (s[o] === a)
2604
+ if (s[o] === u)
2605
2605
  return !0;
2606
2606
  }
2607
2607
  return !1;
2608
2608
  };
2609
2609
  function i(l, s) {
2610
- u.call(this, l, s), this.nested = void 0, this._nestedArray = null, this._lookupCache = {}, this._needsRecursiveFeatureResolution = !0, this._needsRecursiveResolve = !0;
2610
+ a.call(this, l, s), this.nested = void 0, this._nestedArray = null, this._lookupCache = {}, this._needsRecursiveFeatureResolution = !0, this._needsRecursiveResolve = !0;
2611
2611
  }
2612
2612
  function t(l) {
2613
2613
  l._nestedArray = null, l._lookupCache = {};
@@ -2627,10 +2627,10 @@ function requireNamespace() {
2627
2627
  r(this.nestedArray, s)
2628
2628
  ]);
2629
2629
  }, i.prototype.addJSON = function(s) {
2630
- var a = this;
2630
+ var u = this;
2631
2631
  if (s)
2632
2632
  for (var o = Object.keys(s), p = 0, y; p < o.length; ++p)
2633
- y = s[o[p]], a.add(
2633
+ y = s[o[p]], u.add(
2634
2634
  // most to least likely
2635
2635
  (y.fields !== void 0 ? d.fromJSON : y.values !== void 0 ? e.fromJSON : y.methods !== void 0 ? n.fromJSON : y.id !== void 0 ? f.fromJSON : i.fromJSON)(o[p], y)
2636
2636
  );
@@ -2647,12 +2647,12 @@ function requireNamespace() {
2647
2647
  if (!this.nested)
2648
2648
  this.nested = {};
2649
2649
  else {
2650
- var a = this.get(s.name);
2651
- if (a)
2652
- if (a instanceof i && s instanceof i && !(a instanceof d || a instanceof n)) {
2653
- for (var o = a.nestedArray, p = 0; p < o.length; ++p)
2650
+ var u = this.get(s.name);
2651
+ if (u)
2652
+ if (u instanceof i && s instanceof i && !(u instanceof d || u instanceof n)) {
2653
+ for (var o = u.nestedArray, p = 0; p < o.length; ++p)
2654
2654
  s.add(o[p]);
2655
- this.remove(a), this.nested || (this.nested = {}), s.setOptions(a.options, !0);
2655
+ this.remove(u), this.nested || (this.nested = {}), s.setOptions(u.options, !0);
2656
2656
  } else
2657
2657
  throw Error("duplicate name '" + s.name + "' in " + this);
2658
2658
  }
@@ -2661,12 +2661,12 @@ function requireNamespace() {
2661
2661
  y._needsRecursiveFeatureResolution = !0, y._needsRecursiveResolve = !0;
2662
2662
  return s.onAdd(this), t(this);
2663
2663
  }, i.prototype.remove = function(s) {
2664
- if (!(s instanceof u))
2664
+ if (!(s instanceof a))
2665
2665
  throw TypeError("object must be a ReflectionObject");
2666
2666
  if (s.parent !== this)
2667
2667
  throw Error(s + " is not a member of " + this);
2668
2668
  return delete this.nested[s.name], Object.keys(this.nested).length || (this.nested = void 0), s.onRemove(this), t(this);
2669
- }, i.prototype.define = function(s, a) {
2669
+ }, i.prototype.define = function(s, u) {
2670
2670
  if (h.isString(s))
2671
2671
  s = s.split(".");
2672
2672
  else if (!Array.isArray(s))
@@ -2681,20 +2681,20 @@ function requireNamespace() {
2681
2681
  } else
2682
2682
  o.add(o = new i(p));
2683
2683
  }
2684
- return a && o.addJSON(a), o;
2684
+ return u && o.addJSON(u), o;
2685
2685
  }, i.prototype.resolveAll = function() {
2686
2686
  if (!this._needsRecursiveResolve) return this;
2687
2687
  this._resolveFeaturesRecursive(this._edition);
2688
- var s = this.nestedArray, a = 0;
2689
- for (this.resolve(); a < s.length; )
2690
- s[a] instanceof i ? s[a++].resolveAll() : s[a++].resolve();
2688
+ var s = this.nestedArray, u = 0;
2689
+ for (this.resolve(); u < s.length; )
2690
+ s[u] instanceof i ? s[u++].resolveAll() : s[u++].resolve();
2691
2691
  return this._needsRecursiveResolve = !1, this;
2692
2692
  }, i.prototype._resolveFeaturesRecursive = function(s) {
2693
- return this._needsRecursiveFeatureResolution ? (this._needsRecursiveFeatureResolution = !1, s = this._edition || s, u.prototype._resolveFeaturesRecursive.call(this, s), this.nestedArray.forEach((a) => {
2694
- a._resolveFeaturesRecursive(s);
2693
+ return this._needsRecursiveFeatureResolution ? (this._needsRecursiveFeatureResolution = !1, s = this._edition || s, a.prototype._resolveFeaturesRecursive.call(this, s), this.nestedArray.forEach((u) => {
2694
+ u._resolveFeaturesRecursive(s);
2695
2695
  }), this) : this;
2696
- }, i.prototype.lookup = function(s, a, o) {
2697
- if (typeof a == "boolean" ? (o = a, a = void 0) : a && !Array.isArray(a) && (a = [a]), h.isString(s) && s.length) {
2696
+ }, i.prototype.lookup = function(s, u, o) {
2697
+ if (typeof u == "boolean" ? (o = u, u = void 0) : u && !Array.isArray(u) && (u = [u]), h.isString(s) && s.length) {
2698
2698
  if (s === ".")
2699
2699
  return this.root;
2700
2700
  s = s.split(".");
@@ -2702,61 +2702,61 @@ function requireNamespace() {
2702
2702
  return this;
2703
2703
  var p = s.join(".");
2704
2704
  if (s[0] === "")
2705
- return this.root.lookup(s.slice(1), a);
2705
+ return this.root.lookup(s.slice(1), u);
2706
2706
  var y = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects["." + p];
2707
- if (y && (!a || a.indexOf(y.constructor) > -1) || (y = this._lookupImpl(s, p), y && (!a || a.indexOf(y.constructor) > -1)))
2707
+ if (y && (!u || u.indexOf(y.constructor) > -1) || (y = this._lookupImpl(s, p), y && (!u || u.indexOf(y.constructor) > -1)))
2708
2708
  return y;
2709
2709
  if (o)
2710
2710
  return null;
2711
2711
  for (var E = this; E.parent; ) {
2712
- if (y = E.parent._lookupImpl(s, p), y && (!a || a.indexOf(y.constructor) > -1))
2712
+ if (y = E.parent._lookupImpl(s, p), y && (!u || u.indexOf(y.constructor) > -1))
2713
2713
  return y;
2714
2714
  E = E.parent;
2715
2715
  }
2716
2716
  return null;
2717
- }, i.prototype._lookupImpl = function(s, a) {
2718
- if (Object.prototype.hasOwnProperty.call(this._lookupCache, a))
2719
- return this._lookupCache[a];
2717
+ }, i.prototype._lookupImpl = function(s, u) {
2718
+ if (Object.prototype.hasOwnProperty.call(this._lookupCache, u))
2719
+ return this._lookupCache[u];
2720
2720
  var o = this.get(s[0]), p = null;
2721
2721
  if (o)
2722
2722
  s.length === 1 ? p = o : o instanceof i && (s = s.slice(1), p = o._lookupImpl(s, s.join(".")));
2723
2723
  else
2724
2724
  for (var y = 0; y < this.nestedArray.length; ++y)
2725
- this._nestedArray[y] instanceof i && (o = this._nestedArray[y]._lookupImpl(s, a)) && (p = o);
2726
- return this._lookupCache[a] = p, p;
2725
+ this._nestedArray[y] instanceof i && (o = this._nestedArray[y]._lookupImpl(s, u)) && (p = o);
2726
+ return this._lookupCache[u] = p, p;
2727
2727
  }, i.prototype.lookupType = function(s) {
2728
- var a = this.lookup(s, [d]);
2729
- if (!a)
2728
+ var u = this.lookup(s, [d]);
2729
+ if (!u)
2730
2730
  throw Error("no such type: " + s);
2731
- return a;
2731
+ return u;
2732
2732
  }, i.prototype.lookupEnum = function(s) {
2733
- var a = this.lookup(s, [e]);
2734
- if (!a)
2733
+ var u = this.lookup(s, [e]);
2734
+ if (!u)
2735
2735
  throw Error("no such Enum '" + s + "' in " + this);
2736
- return a;
2736
+ return u;
2737
2737
  }, i.prototype.lookupTypeOrEnum = function(s) {
2738
- var a = this.lookup(s, [d, e]);
2739
- if (!a)
2738
+ var u = this.lookup(s, [d, e]);
2739
+ if (!u)
2740
2740
  throw Error("no such Type or Enum '" + s + "' in " + this);
2741
- return a;
2741
+ return u;
2742
2742
  }, i.prototype.lookupService = function(s) {
2743
- var a = this.lookup(s, [n]);
2744
- if (!a)
2743
+ var u = this.lookup(s, [n]);
2744
+ if (!u)
2745
2745
  throw Error("no such Service '" + s + "' in " + this);
2746
- return a;
2747
- }, i._configure = function(l, s, a) {
2748
- d = l, n = s, e = a;
2746
+ return u;
2747
+ }, i._configure = function(l, s, u) {
2748
+ d = l, n = s, e = u;
2749
2749
  }, namespace;
2750
2750
  }
2751
2751
  var mapfield, hasRequiredMapfield;
2752
2752
  function requireMapfield() {
2753
2753
  if (hasRequiredMapfield) return mapfield;
2754
2754
  hasRequiredMapfield = 1, mapfield = c;
2755
- var u = requireField();
2756
- ((c.prototype = Object.create(u.prototype)).constructor = c).className = "MapField";
2755
+ var a = requireField();
2756
+ ((c.prototype = Object.create(a.prototype)).constructor = c).className = "MapField";
2757
2757
  var f = requireTypes(), h = requireUtil();
2758
2758
  function c(d, n, e, r, i, t) {
2759
- if (u.call(this, d, n, r, void 0, void 0, i, t), !h.isString(e))
2759
+ if (a.call(this, d, n, r, void 0, void 0, i, t), !h.isString(e))
2760
2760
  throw TypeError("keyType must be a string");
2761
2761
  this.keyType = e, this.resolvedKeyType = null, this.map = !0;
2762
2762
  }
@@ -2783,7 +2783,7 @@ function requireMapfield() {
2783
2783
  return this;
2784
2784
  if (f.mapKey[this.keyType] === void 0)
2785
2785
  throw Error("invalid key type: " + this.keyType);
2786
- return u.prototype.resolve.call(this);
2786
+ return a.prototype.resolve.call(this);
2787
2787
  }, c.d = function(n, e, r) {
2788
2788
  return typeof r == "function" ? r = h.decorateType(r).name : r && typeof r == "object" && (r = h.decorateEnum(r).name), function(t, l) {
2789
2789
  h.decorateType(t.constructor).add(new c(l, n, e, r));
@@ -2794,8 +2794,8 @@ var method, hasRequiredMethod;
2794
2794
  function requireMethod() {
2795
2795
  if (hasRequiredMethod) return method;
2796
2796
  hasRequiredMethod = 1, method = h;
2797
- var u = requireObject();
2798
- ((h.prototype = Object.create(u.prototype)).constructor = h).className = "Method";
2797
+ var a = requireObject();
2798
+ ((h.prototype = Object.create(a.prototype)).constructor = h).className = "Method";
2799
2799
  var f = requireUtil();
2800
2800
  function h(c, d, n, e, r, i, t, l, s) {
2801
2801
  if (f.isObject(r) ? (t = r, r = i = void 0) : f.isObject(i) && (t = i, i = void 0), !(d === void 0 || f.isString(d)))
@@ -2804,7 +2804,7 @@ function requireMethod() {
2804
2804
  throw TypeError("requestType must be a string");
2805
2805
  if (!f.isString(e))
2806
2806
  throw TypeError("responseType must be a string");
2807
- u.call(this, c, t), this.type = d || "rpc", this.requestType = n, this.requestStream = r ? !0 : void 0, this.responseType = e, this.responseStream = i ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = l, this.parsedOptions = s;
2807
+ a.call(this, c, t), this.type = d || "rpc", this.requestType = n, this.requestStream = r ? !0 : void 0, this.responseType = e, this.responseStream = i ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = l, this.parsedOptions = s;
2808
2808
  }
2809
2809
  return h.fromJSON = function(d, n) {
2810
2810
  return new h(d, n.type, n.requestType, n.responseType, n.requestStream, n.responseStream, n.options, n.comment, n.parsedOptions);
@@ -2830,18 +2830,18 @@ function requireMethod() {
2830
2830
  this.parsedOptions
2831
2831
  ]);
2832
2832
  }, h.prototype.resolve = function() {
2833
- return this.resolved ? this : (this.resolvedRequestType = this.parent.lookupType(this.requestType), this.resolvedResponseType = this.parent.lookupType(this.responseType), u.prototype.resolve.call(this));
2833
+ return this.resolved ? this : (this.resolvedRequestType = this.parent.lookupType(this.requestType), this.resolvedResponseType = this.parent.lookupType(this.responseType), a.prototype.resolve.call(this));
2834
2834
  }, method;
2835
2835
  }
2836
2836
  var service, hasRequiredService;
2837
2837
  function requireService() {
2838
2838
  if (hasRequiredService) return service;
2839
2839
  hasRequiredService = 1, service = d;
2840
- var u = requireNamespace();
2841
- ((d.prototype = Object.create(u.prototype)).constructor = d).className = "Service";
2840
+ var a = requireNamespace();
2841
+ ((d.prototype = Object.create(a.prototype)).constructor = d).className = "Service";
2842
2842
  var f = requireMethod(), h = requireUtil(), c = requireRpc();
2843
2843
  function d(e, r) {
2844
- u.call(this, e, r), this.methods = {}, this._methodsArray = null;
2844
+ a.call(this, e, r), this.methods = {}, this._methodsArray = null;
2845
2845
  }
2846
2846
  d.fromJSON = function(r, i) {
2847
2847
  var t = new d(r, i.options);
@@ -2850,14 +2850,14 @@ function requireService() {
2850
2850
  t.add(f.fromJSON(l[s], i.methods[l[s]]));
2851
2851
  return i.nested && t.addJSON(i.nested), i.edition && (t._edition = i.edition), t.comment = i.comment, t._defaultEdition = "proto3", t;
2852
2852
  }, d.prototype.toJSON = function(r) {
2853
- var i = u.prototype.toJSON.call(this, r), t = r ? !!r.keepComments : !1;
2853
+ var i = a.prototype.toJSON.call(this, r), t = r ? !!r.keepComments : !1;
2854
2854
  return h.toObject([
2855
2855
  "edition",
2856
2856
  this._editionToJSON(),
2857
2857
  "options",
2858
2858
  i && i.options || void 0,
2859
2859
  "methods",
2860
- u.arrayToJSON(this.methodsArray, r) || /* istanbul ignore next */
2860
+ a.arrayToJSON(this.methodsArray, r) || /* istanbul ignore next */
2861
2861
  {},
2862
2862
  "nested",
2863
2863
  i && i.nested || void 0,
@@ -2873,36 +2873,36 @@ function requireService() {
2873
2873
  return e._methodsArray = null, e;
2874
2874
  }
2875
2875
  return d.prototype.get = function(r) {
2876
- return this.methods[r] || u.prototype.get.call(this, r);
2876
+ return this.methods[r] || a.prototype.get.call(this, r);
2877
2877
  }, d.prototype.resolveAll = function() {
2878
2878
  if (!this._needsRecursiveResolve) return this;
2879
- u.prototype.resolve.call(this);
2879
+ a.prototype.resolve.call(this);
2880
2880
  for (var r = this.methodsArray, i = 0; i < r.length; ++i)
2881
2881
  r[i].resolve();
2882
2882
  return this;
2883
2883
  }, d.prototype._resolveFeaturesRecursive = function(r) {
2884
- return this._needsRecursiveFeatureResolution ? (r = this._edition || r, u.prototype._resolveFeaturesRecursive.call(this, r), this.methodsArray.forEach((i) => {
2884
+ return this._needsRecursiveFeatureResolution ? (r = this._edition || r, a.prototype._resolveFeaturesRecursive.call(this, r), this.methodsArray.forEach((i) => {
2885
2885
  i._resolveFeaturesRecursive(r);
2886
2886
  }), this) : this;
2887
2887
  }, d.prototype.add = function(r) {
2888
2888
  if (this.get(r.name))
2889
2889
  throw Error("duplicate name '" + r.name + "' in " + this);
2890
- return r instanceof f ? (this.methods[r.name] = r, r.parent = this, n(this)) : u.prototype.add.call(this, r);
2890
+ return r instanceof f ? (this.methods[r.name] = r, r.parent = this, n(this)) : a.prototype.add.call(this, r);
2891
2891
  }, d.prototype.remove = function(r) {
2892
2892
  if (r instanceof f) {
2893
2893
  if (this.methods[r.name] !== r)
2894
2894
  throw Error(r + " is not a member of " + this);
2895
2895
  return delete this.methods[r.name], r.parent = null, n(this);
2896
2896
  }
2897
- return u.prototype.remove.call(this, r);
2897
+ return a.prototype.remove.call(this, r);
2898
2898
  }, d.prototype.create = function(r, i, t) {
2899
- for (var l = new c.Service(r, i, t), s = 0, a; s < /* initializes */
2899
+ for (var l = new c.Service(r, i, t), s = 0, u; s < /* initializes */
2900
2900
  this.methodsArray.length; ++s) {
2901
- var o = h.lcFirst((a = this._methodsArray[s]).resolve().name).replace(/[^$\\w_]/g, "");
2901
+ var o = h.lcFirst((u = this._methodsArray[s]).resolve().name).replace(/[^$\\w_]/g, "");
2902
2902
  l[o] = h.codegen(["r", "c"], h.isReserved(o) ? o + "_" : o)("return this.rpcCall(m,q,s,r,c)")({
2903
- m: a,
2904
- q: a.resolvedRequestType.ctor,
2905
- s: a.resolvedResponseType.ctor
2903
+ m: u,
2904
+ q: u.resolvedRequestType.ctor,
2905
+ s: u.resolvedResponseType.ctor
2906
2906
  });
2907
2907
  }
2908
2908
  return l;
@@ -2912,7 +2912,7 @@ var message, hasRequiredMessage;
2912
2912
  function requireMessage() {
2913
2913
  if (hasRequiredMessage) return message;
2914
2914
  hasRequiredMessage = 1, message = f;
2915
- var u = requireMinimal();
2915
+ var a = requireMinimal();
2916
2916
  function f(h) {
2917
2917
  if (h)
2918
2918
  for (var c = Object.keys(h), d = 0; d < c.length; ++d) {
@@ -2937,23 +2937,23 @@ function requireMessage() {
2937
2937
  }, f.toObject = function(c, d) {
2938
2938
  return this.$type.toObject(c, d);
2939
2939
  }, f.prototype.toJSON = function() {
2940
- return this.$type.toObject(this, u.toJSONOptions);
2940
+ return this.$type.toObject(this, a.toJSONOptions);
2941
2941
  }, message;
2942
2942
  }
2943
2943
  var decoder_1, hasRequiredDecoder;
2944
2944
  function requireDecoder() {
2945
2945
  if (hasRequiredDecoder) return decoder_1;
2946
2946
  hasRequiredDecoder = 1, decoder_1 = d;
2947
- var u = require_enum(), f = requireTypes(), h = requireUtil();
2947
+ var a = require_enum(), f = requireTypes(), h = requireUtil();
2948
2948
  function c(n) {
2949
2949
  return "missing required '" + n.name + "'";
2950
2950
  }
2951
2951
  function d(n) {
2952
- for (var e = h.codegen(["r", "l", "e"], n.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (n.fieldsArray.filter(function(a) {
2953
- return a.map;
2952
+ for (var e = h.codegen(["r", "l", "e"], n.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (n.fieldsArray.filter(function(u) {
2953
+ return u.map;
2954
2954
  }).length ? ",k,value" : ""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"), r = 0; r < /* initializes */
2955
2955
  n.fieldsArray.length; ++r) {
2956
- var i = n._fieldsArray[r].resolve(), t = i.resolvedType instanceof u ? "int32" : i.type, l = "m" + h.safeProp(i.name);
2956
+ var i = n._fieldsArray[r].resolve(), t = i.resolvedType instanceof a ? "int32" : i.type, l = "m" + h.safeProp(i.name);
2957
2957
  e("case %i: {", i.id), i.map ? (e("if(%s===util.emptyObject)", l)("%s={}", l)("var c2 = r.uint32()+r.pos"), f.defaults[i.keyType] !== void 0 ? e("k=%j", f.defaults[i.keyType]) : e("k=null"), f.defaults[t] !== void 0 ? e("value=%j", f.defaults[t]) : e("value=null"), e("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break", i.keyType)("case 2:"), f.basic[t] === void 0 ? e("value=types[%i].decode(r,r.uint32())", r) : e("value=r.%s()", t), e("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), f.long[i.keyType] !== void 0 ? e('%s[typeof k==="object"?util.longToHash(k):k]=value', l) : e("%s[k]=value", l)) : i.repeated ? (e("if(!(%s&&%s.length))", l, l)("%s=[]", l), f.packed[t] !== void 0 && e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", l, t)("}else"), f.basic[t] === void 0 ? e(i.delimited ? "%s.push(types[%i].decode(r,undefined,((t&~7)|4)))" : "%s.push(types[%i].decode(r,r.uint32()))", l, r) : e("%s.push(r.%s())", l, t)) : f.basic[t] === void 0 ? e(i.delimited ? "%s=types[%i].decode(r,undefined,((t&~7)|4))" : "%s=types[%i].decode(r,r.uint32())", l, r) : e("%s=r.%s()", l, t), e("break")("}");
2958
2958
  }
2959
2959
  for (e("default:")("r.skipType(t&7)")("break")("}")("}"), r = 0; r < n._fieldsArray.length; ++r) {
@@ -2968,13 +2968,13 @@ var verifier_1, hasRequiredVerifier;
2968
2968
  function requireVerifier() {
2969
2969
  if (hasRequiredVerifier) return verifier_1;
2970
2970
  hasRequiredVerifier = 1, verifier_1 = n;
2971
- var u = require_enum(), f = requireUtil();
2971
+ var a = require_enum(), f = requireUtil();
2972
2972
  function h(e, r) {
2973
2973
  return e.name + ": " + r + (e.repeated && r !== "array" ? "[]" : e.map && r !== "object" ? "{k:" + e.keyType + "}" : "") + " expected";
2974
2974
  }
2975
2975
  function c(e, r, i, t) {
2976
2976
  if (r.resolvedType)
2977
- if (r.resolvedType instanceof u) {
2977
+ if (r.resolvedType instanceof a) {
2978
2978
  e("switch(%s){", t)("default:")("return%j", h(r, "enum value"));
2979
2979
  for (var l = Object.keys(r.resolvedType.values), s = 0; s < l.length; ++s) e("case %i:", r.resolvedType.values[l[s]]);
2980
2980
  e("break")("}");
@@ -3039,17 +3039,17 @@ function requireVerifier() {
3039
3039
  i.length && r("var p={}");
3040
3040
  for (var l = 0; l < /* initializes */
3041
3041
  e.fieldsArray.length; ++l) {
3042
- var s = e._fieldsArray[l].resolve(), a = "m" + f.safeProp(s.name);
3043
- if (s.optional && r("if(%s!=null&&m.hasOwnProperty(%j)){", a, s.name), s.map)
3044
- r("if(!util.isObject(%s))", a)("return%j", h(s, "object"))("var k=Object.keys(%s)", a)("for(var i=0;i<k.length;++i){"), d(r, s, "k[i]"), c(r, s, l, a + "[k[i]]")("}");
3042
+ var s = e._fieldsArray[l].resolve(), u = "m" + f.safeProp(s.name);
3043
+ if (s.optional && r("if(%s!=null&&m.hasOwnProperty(%j)){", u, s.name), s.map)
3044
+ r("if(!util.isObject(%s))", u)("return%j", h(s, "object"))("var k=Object.keys(%s)", u)("for(var i=0;i<k.length;++i){"), d(r, s, "k[i]"), c(r, s, l, u + "[k[i]]")("}");
3045
3045
  else if (s.repeated)
3046
- r("if(!Array.isArray(%s))", a)("return%j", h(s, "array"))("for(var i=0;i<%s.length;++i){", a), c(r, s, l, a + "[i]")("}");
3046
+ r("if(!Array.isArray(%s))", u)("return%j", h(s, "array"))("for(var i=0;i<%s.length;++i){", u), c(r, s, l, u + "[i]")("}");
3047
3047
  else {
3048
3048
  if (s.partOf) {
3049
3049
  var o = f.safeProp(s.partOf.name);
3050
3050
  t[s.partOf.name] === 1 && r("if(p%s===1)", o)("return%j", s.partOf.name + ": multiple values"), t[s.partOf.name] = 1, r("p%s=1", o);
3051
3051
  }
3052
- c(r, s, l, a);
3052
+ c(r, s, l, u);
3053
3053
  }
3054
3054
  s.optional && r("}");
3055
3055
  }
@@ -3059,15 +3059,15 @@ function requireVerifier() {
3059
3059
  }
3060
3060
  var converter = {}, hasRequiredConverter;
3061
3061
  function requireConverter() {
3062
- return hasRequiredConverter || (hasRequiredConverter = 1, function(u) {
3063
- var f = u, h = require_enum(), c = requireUtil();
3062
+ return hasRequiredConverter || (hasRequiredConverter = 1, function(a) {
3063
+ var f = a, h = require_enum(), c = requireUtil();
3064
3064
  function d(e, r, i, t) {
3065
3065
  var l = !1;
3066
3066
  if (r.resolvedType)
3067
3067
  if (r.resolvedType instanceof h) {
3068
3068
  e("switch(d%s){", t);
3069
- for (var s = r.resolvedType.values, a = Object.keys(s), o = 0; o < a.length; ++o)
3070
- s[a[o]] === r.typeDefault && !l && (e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', t, t, t), r.repeated || e("break"), l = !0), e("case%j:", a[o])("case %i:", s[a[o]])("m%s=%j", t, s[a[o]])("break");
3069
+ for (var s = r.resolvedType.values, u = Object.keys(s), o = 0; o < u.length; ++o)
3070
+ s[u[o]] === r.typeDefault && !l && (e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', t, t, t), r.repeated || e("break"), l = !0), e("case%j:", u[o])("case %i:", s[u[o]])("m%s=%j", t, s[u[o]])("break");
3071
3071
  e("}");
3072
3072
  } else e('if(typeof d%s!=="object")', t)("throw TypeError(%j)", r.fullName + ": object expected")("m%s=types[%i].fromObject(d%s)", t, i, t);
3073
3073
  else {
@@ -3113,25 +3113,25 @@ function requireConverter() {
3113
3113
  if (!i.length) return t("return new this.ctor");
3114
3114
  t("var m=new this.ctor");
3115
3115
  for (var l = 0; l < i.length; ++l) {
3116
- var s = i[l].resolve(), a = c.safeProp(s.name);
3117
- s.map ? (t("if(d%s){", a)('if(typeof d%s!=="object")', a)("throw TypeError(%j)", s.fullName + ": object expected")("m%s={}", a)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", a), d(
3116
+ var s = i[l].resolve(), u = c.safeProp(s.name);
3117
+ s.map ? (t("if(d%s){", u)('if(typeof d%s!=="object")', u)("throw TypeError(%j)", s.fullName + ": object expected")("m%s={}", u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", u), d(
3118
3118
  t,
3119
3119
  s,
3120
3120
  /* not sorted */
3121
3121
  l,
3122
- a + "[ks[i]]"
3123
- )("}")("}")) : s.repeated ? (t("if(d%s){", a)("if(!Array.isArray(d%s))", a)("throw TypeError(%j)", s.fullName + ": array expected")("m%s=[]", a)("for(var i=0;i<d%s.length;++i){", a), d(
3122
+ u + "[ks[i]]"
3123
+ )("}")("}")) : s.repeated ? (t("if(d%s){", u)("if(!Array.isArray(d%s))", u)("throw TypeError(%j)", s.fullName + ": array expected")("m%s=[]", u)("for(var i=0;i<d%s.length;++i){", u), d(
3124
3124
  t,
3125
3125
  s,
3126
3126
  /* not sorted */
3127
3127
  l,
3128
- a + "[i]"
3129
- )("}")("}")) : (s.resolvedType instanceof h || t("if(d%s!=null){", a), d(
3128
+ u + "[i]"
3129
+ )("}")("}")) : (s.resolvedType instanceof h || t("if(d%s!=null){", u), d(
3130
3130
  t,
3131
3131
  s,
3132
3132
  /* not sorted */
3133
3133
  l,
3134
- a
3134
+ u
3135
3135
  ), s.resolvedType instanceof h || t("}"));
3136
3136
  }
3137
3137
  return t("return m");
@@ -3169,8 +3169,8 @@ function requireConverter() {
3169
3169
  var i = r.fieldsArray.slice().sort(c.compareFieldsById);
3170
3170
  if (!i.length)
3171
3171
  return c.codegen()("return {}");
3172
- for (var t = c.codegen(["m", "o"], r.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], s = [], a = [], o = 0; o < i.length; ++o)
3173
- i[o].partOf || (i[o].resolve().repeated ? l : i[o].map ? s : a).push(i[o]);
3172
+ for (var t = c.codegen(["m", "o"], r.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], s = [], u = [], o = 0; o < i.length; ++o)
3173
+ i[o].partOf || (i[o].resolve().repeated ? l : i[o].map ? s : u).push(i[o]);
3174
3174
  if (l.length) {
3175
3175
  for (t("if(o.arrays||o.defaults){"), o = 0; o < l.length; ++o) t("d%s=[]", c.safeProp(l[o].name));
3176
3176
  t("}");
@@ -3179,9 +3179,9 @@ function requireConverter() {
3179
3179
  for (t("if(o.objects||o.defaults){"), o = 0; o < s.length; ++o) t("d%s={}", c.safeProp(s[o].name));
3180
3180
  t("}");
3181
3181
  }
3182
- if (a.length) {
3183
- for (t("if(o.defaults){"), o = 0; o < a.length; ++o) {
3184
- var p = a[o], y = c.safeProp(p.name);
3182
+ if (u.length) {
3183
+ for (t("if(o.defaults){"), o = 0; o < u.length; ++o) {
3184
+ var p = u[o], y = c.safeProp(p.name);
3185
3185
  if (p.resolvedType instanceof h) t("d%s=o.enums===String?%j:%j", y, p.resolvedType.valuesById[p.typeDefault], p.typeDefault);
3186
3186
  else if (p.long) t("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", y)("}else")("d%s=o.longs===String?%j:%i", y, p.typeDefault.toString(), p.typeDefault.toNumber());
3187
3187
  else if (p.bytes) {
@@ -3220,8 +3220,8 @@ function requireConverter() {
3220
3220
  }
3221
3221
  var wrappers = {}, hasRequiredWrappers;
3222
3222
  function requireWrappers() {
3223
- return hasRequiredWrappers || (hasRequiredWrappers = 1, function(u) {
3224
- var f = u, h = requireMessage();
3223
+ return hasRequiredWrappers || (hasRequiredWrappers = 1, function(a) {
3224
+ var f = a, h = requireMessage();
3225
3225
  f[".google.protobuf.Any"] = {
3226
3226
  fromObject: function(c) {
3227
3227
  if (c && c["@type"]) {
@@ -3256,11 +3256,11 @@ var type, hasRequiredType;
3256
3256
  function requireType() {
3257
3257
  if (hasRequiredType) return type;
3258
3258
  hasRequiredType = 1, type = y;
3259
- var u = requireNamespace();
3260
- ((y.prototype = Object.create(u.prototype)).constructor = y).className = "Type";
3261
- var f = require_enum(), h = requireOneof(), c = requireField(), d = requireMapfield(), n = requireService(), e = requireMessage(), r = requireReader(), i = requireWriter(), t = requireUtil(), l = requireEncoder(), s = requireDecoder(), a = requireVerifier(), o = requireConverter(), p = requireWrappers();
3259
+ var a = requireNamespace();
3260
+ ((y.prototype = Object.create(a.prototype)).constructor = y).className = "Type";
3261
+ var f = require_enum(), h = requireOneof(), c = requireField(), d = requireMapfield(), n = requireService(), e = requireMessage(), r = requireReader(), i = requireWriter(), t = requireUtil(), l = requireEncoder(), s = requireDecoder(), u = requireVerifier(), o = requireConverter(), p = requireWrappers();
3262
3262
  function y(v, m) {
3263
- v = v.replace(/\\W/g, ""), u.call(this, v, 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;
3263
+ v = v.replace(/\\W/g, ""), a.call(this, v, 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;
3264
3264
  }
3265
3265
  Object.defineProperties(y.prototype, {
3266
3266
  /**
@@ -3354,21 +3354,21 @@ function requireType() {
3354
3354
  var j = _.nested[I[C]];
3355
3355
  A.add(
3356
3356
  // most to least likely
3357
- (j.id !== void 0 ? c.fromJSON : j.fields !== void 0 ? y.fromJSON : j.values !== void 0 ? f.fromJSON : j.methods !== void 0 ? n.fromJSON : u.fromJSON)(I[C], j)
3357
+ (j.id !== void 0 ? c.fromJSON : j.fields !== void 0 ? y.fromJSON : j.values !== void 0 ? f.fromJSON : j.methods !== void 0 ? n.fromJSON : a.fromJSON)(I[C], j)
3358
3358
  );
3359
3359
  }
3360
3360
  return _.extensions && _.extensions.length && (A.extensions = _.extensions), _.reserved && _.reserved.length && (A.reserved = _.reserved), _.group && (A.group = !0), _.comment && (A.comment = _.comment), _.edition && (A._edition = _.edition), A._defaultEdition = "proto3", A;
3361
3361
  }, y.prototype.toJSON = function(m) {
3362
- var _ = u.prototype.toJSON.call(this, m), A = m ? !!m.keepComments : !1;
3362
+ var _ = a.prototype.toJSON.call(this, m), A = m ? !!m.keepComments : !1;
3363
3363
  return t.toObject([
3364
3364
  "edition",
3365
3365
  this._editionToJSON(),
3366
3366
  "options",
3367
3367
  _ && _.options || void 0,
3368
3368
  "oneofs",
3369
- u.arrayToJSON(this.oneofsArray, m),
3369
+ a.arrayToJSON(this.oneofsArray, m),
3370
3370
  "fields",
3371
- u.arrayToJSON(this.fieldsArray.filter(function(I) {
3371
+ a.arrayToJSON(this.fieldsArray.filter(function(I) {
3372
3372
  return !I.declaringField;
3373
3373
  }), m) || {},
3374
3374
  "extensions",
@@ -3384,7 +3384,7 @@ function requireType() {
3384
3384
  ]);
3385
3385
  }, y.prototype.resolveAll = function() {
3386
3386
  if (!this._needsRecursiveResolve) return this;
3387
- u.prototype.resolveAll.call(this);
3387
+ a.prototype.resolveAll.call(this);
3388
3388
  var m = this.oneofsArray;
3389
3389
  for (A = 0; A < m.length; )
3390
3390
  m[A++].resolve();
@@ -3392,7 +3392,7 @@ function requireType() {
3392
3392
  _[A++].resolve();
3393
3393
  return this;
3394
3394
  }, y.prototype._resolveFeaturesRecursive = function(m) {
3395
- return this._needsRecursiveFeatureResolution ? (m = this._edition || m, u.prototype._resolveFeaturesRecursive.call(this, m), this.oneofsArray.forEach((_) => {
3395
+ return this._needsRecursiveFeatureResolution ? (m = this._edition || m, a.prototype._resolveFeaturesRecursive.call(this, m), this.oneofsArray.forEach((_) => {
3396
3396
  _._resolveFeatures(m);
3397
3397
  }), this.fieldsArray.forEach((_) => {
3398
3398
  _._resolveFeatures(m);
@@ -3414,7 +3414,7 @@ function requireType() {
3414
3414
  throw Error("name '" + m.name + "' is reserved in " + this);
3415
3415
  return m.parent && m.parent.remove(m), this.fields[m.name] = m, m.message = this, m.onAdd(this), E(this);
3416
3416
  }
3417
- return m instanceof h ? (this.oneofs || (this.oneofs = {}), this.oneofs[m.name] = m, m.onAdd(this), E(this)) : u.prototype.add.call(this, m);
3417
+ return m instanceof h ? (this.oneofs || (this.oneofs = {}), this.oneofs[m.name] = m, m.onAdd(this), E(this)) : a.prototype.add.call(this, m);
3418
3418
  }, y.prototype.remove = function(m) {
3419
3419
  if (m instanceof c && m.extend === void 0) {
3420
3420
  if (!this.fields || this.fields[m.name] !== m)
@@ -3426,11 +3426,11 @@ function requireType() {
3426
3426
  throw Error(m + " is not a member of " + this);
3427
3427
  return delete this.oneofs[m.name], m.parent = null, m.onRemove(this), E(this);
3428
3428
  }
3429
- return u.prototype.remove.call(this, m);
3429
+ return a.prototype.remove.call(this, m);
3430
3430
  }, y.prototype.isReservedId = function(m) {
3431
- return u.isReservedId(this.reserved, m);
3431
+ return a.isReservedId(this.reserved, m);
3432
3432
  }, y.prototype.isReservedName = function(m) {
3433
- return u.isReservedName(this.reserved, m);
3433
+ return a.isReservedName(this.reserved, m);
3434
3434
  }, y.prototype.create = function(m) {
3435
3435
  return new this.ctor(m);
3436
3436
  }, y.prototype.setup = function() {
@@ -3445,7 +3445,7 @@ function requireType() {
3445
3445
  Reader: r,
3446
3446
  types: _,
3447
3447
  util: t
3448
- }), this.verify = a(this)({
3448
+ }), this.verify = u(this)({
3449
3449
  types: _,
3450
3450
  util: t
3451
3451
  }), this.fromObject = o.fromObject(this)({
@@ -3485,22 +3485,22 @@ var root$1, hasRequiredRoot;
3485
3485
  function requireRoot() {
3486
3486
  if (hasRequiredRoot) return root$1;
3487
3487
  hasRequiredRoot = 1, root$1 = i;
3488
- var u = requireNamespace();
3489
- ((i.prototype = Object.create(u.prototype)).constructor = i).className = "Root";
3488
+ var a = requireNamespace();
3489
+ ((i.prototype = Object.create(a.prototype)).constructor = i).className = "Root";
3490
3490
  var f = requireField(), h = require_enum(), c = requireOneof(), d = requireUtil(), n, e, r;
3491
- function i(a) {
3492
- u.call(this, "", a), this.deferred = [], this.files = [], this._edition = "proto2", this._fullyQualifiedObjects = {};
3491
+ function i(u) {
3492
+ a.call(this, "", u), this.deferred = [], this.files = [], this._edition = "proto2", this._fullyQualifiedObjects = {};
3493
3493
  }
3494
3494
  i.fromJSON = function(o, p) {
3495
3495
  return p || (p = new i()), o.options && p.setOptions(o.options), p.addJSON(o.nested).resolveAll();
3496
3496
  }, i.prototype.resolvePath = d.path.resolve, i.prototype.fetch = d.fetch;
3497
3497
  function t() {
3498
3498
  }
3499
- i.prototype.load = function a(o, p, y) {
3499
+ i.prototype.load = function u(o, p, y) {
3500
3500
  typeof p == "function" && (y = p, p = void 0);
3501
3501
  var E = this;
3502
3502
  if (!y)
3503
- return d.asPromise(a, E, o, p);
3503
+ return d.asPromise(u, E, o, p);
3504
3504
  var v = y === t;
3505
3505
  function m(B, L) {
3506
3506
  if (y) {
@@ -3582,10 +3582,10 @@ function requireRoot() {
3582
3582
  throw Error("unresolvable extensions: " + this.deferred.map(function(o) {
3583
3583
  return "'extend " + o.extend + "' in " + o.parent.fullName;
3584
3584
  }).join(", "));
3585
- return u.prototype.resolveAll.call(this);
3585
+ return a.prototype.resolveAll.call(this);
3586
3586
  };
3587
3587
  var l = /^[A-Z]/;
3588
- function s(a, o) {
3588
+ function s(u, o) {
3589
3589
  var p = o.parent.lookup(o.extend);
3590
3590
  if (p) {
3591
3591
  var y = new f(o.fullName, o.id, o.type, o.rule, void 0, o.options);
@@ -3627,66 +3627,66 @@ function requireRoot() {
3627
3627
  }
3628
3628
  } else if (o instanceof h)
3629
3629
  l.test(o.name) && delete o.parent[o.name];
3630
- else if (o instanceof u) {
3630
+ else if (o instanceof a) {
3631
3631
  for (var y = 0; y < /* initializes */
3632
3632
  o.nestedArray.length; ++y)
3633
3633
  this._handleRemove(o._nestedArray[y]);
3634
3634
  l.test(o.name) && delete o.parent[o.name];
3635
3635
  }
3636
3636
  delete this._fullyQualifiedObjects[o.fullName];
3637
- }, i._configure = function(a, o, p) {
3638
- n = a, e = o, r = p;
3637
+ }, i._configure = function(u, o, p) {
3638
+ n = u, e = o, r = p;
3639
3639
  }, root$1;
3640
3640
  }
3641
3641
  var hasRequiredUtil;
3642
3642
  function requireUtil() {
3643
3643
  if (hasRequiredUtil) return util.exports;
3644
3644
  hasRequiredUtil = 1;
3645
- var u = util.exports = requireMinimal(), f = requireRoots(), h, c;
3646
- u.codegen = requireCodegen(), u.fetch = requireFetch(), u.path = requirePath(), u.fs = u.inquire("fs"), u.toArray = function(t) {
3645
+ var a = util.exports = requireMinimal(), f = requireRoots(), h, c;
3646
+ a.codegen = requireCodegen(), a.fetch = requireFetch(), a.path = requirePath(), a.fs = a.inquire("fs"), a.toArray = function(t) {
3647
3647
  if (t) {
3648
- for (var l = Object.keys(t), s = new Array(l.length), a = 0; a < l.length; )
3649
- s[a] = t[l[a++]];
3648
+ for (var l = Object.keys(t), s = new Array(l.length), u = 0; u < l.length; )
3649
+ s[u] = t[l[u++]];
3650
3650
  return s;
3651
3651
  }
3652
3652
  return [];
3653
- }, u.toObject = function(t) {
3653
+ }, a.toObject = function(t) {
3654
3654
  for (var l = {}, s = 0; s < t.length; ) {
3655
- var a = t[s++], o = t[s++];
3656
- o !== void 0 && (l[a] = o);
3655
+ var u = t[s++], o = t[s++];
3656
+ o !== void 0 && (l[u] = o);
3657
3657
  }
3658
3658
  return l;
3659
3659
  };
3660
3660
  var d = /\\\\/g, n = /"/g;
3661
- u.isReserved = function(t) {
3661
+ a.isReserved = function(t) {
3662
3662
  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(t);
3663
- }, u.safeProp = function(t) {
3664
- return !/^[$\\w_]+$/.test(t) || u.isReserved(t) ? '["' + t.replace(d, "\\\\\\\\").replace(n, '\\\\"') + '"]' : "." + t;
3665
- }, u.ucFirst = function(t) {
3663
+ }, a.safeProp = function(t) {
3664
+ return !/^[$\\w_]+$/.test(t) || a.isReserved(t) ? '["' + t.replace(d, "\\\\\\\\").replace(n, '\\\\"') + '"]' : "." + t;
3665
+ }, a.ucFirst = function(t) {
3666
3666
  return t.charAt(0).toUpperCase() + t.substring(1);
3667
3667
  };
3668
3668
  var e = /_([a-z])/g;
3669
- u.camelCase = function(t) {
3669
+ a.camelCase = function(t) {
3670
3670
  return t.substring(0, 1) + t.substring(1).replace(e, function(l, s) {
3671
3671
  return s.toUpperCase();
3672
3672
  });
3673
- }, u.compareFieldsById = function(t, l) {
3673
+ }, a.compareFieldsById = function(t, l) {
3674
3674
  return t.id - l.id;
3675
- }, u.decorateType = function(t, l) {
3675
+ }, a.decorateType = function(t, l) {
3676
3676
  if (t.$type)
3677
- return l && t.$type.name !== l && (u.decorateRoot.remove(t.$type), t.$type.name = l, u.decorateRoot.add(t.$type)), t.$type;
3677
+ return l && t.$type.name !== l && (a.decorateRoot.remove(t.$type), t.$type.name = l, a.decorateRoot.add(t.$type)), t.$type;
3678
3678
  h || (h = requireType());
3679
3679
  var s = new h(l || t.name);
3680
- return u.decorateRoot.add(s), s.ctor = t, Object.defineProperty(t, "$type", { value: s, enumerable: !1 }), Object.defineProperty(t.prototype, "$type", { value: s, enumerable: !1 }), s;
3680
+ return a.decorateRoot.add(s), s.ctor = t, Object.defineProperty(t, "$type", { value: s, enumerable: !1 }), Object.defineProperty(t.prototype, "$type", { value: s, enumerable: !1 }), s;
3681
3681
  };
3682
3682
  var r = 0;
3683
- return u.decorateEnum = function(t) {
3683
+ return a.decorateEnum = function(t) {
3684
3684
  if (t.$type)
3685
3685
  return t.$type;
3686
3686
  c || (c = require_enum());
3687
3687
  var l = new c("Enum" + r++, t);
3688
- return u.decorateRoot.add(l), Object.defineProperty(t, "$type", { value: l, enumerable: !1 }), l;
3689
- }, u.setProperty = function(t, l, s, a) {
3688
+ return a.decorateRoot.add(l), Object.defineProperty(t, "$type", { value: l, enumerable: !1 }), l;
3689
+ }, a.setProperty = function(t, l, s, u) {
3690
3690
  function o(p, y, E) {
3691
3691
  var v = y.shift();
3692
3692
  if (v === "__proto__" || v === "prototype")
@@ -3695,7 +3695,7 @@ function requireUtil() {
3695
3695
  p[v] = o(p[v] || {}, y, E);
3696
3696
  else {
3697
3697
  var m = p[v];
3698
- if (m && a)
3698
+ if (m && u)
3699
3699
  return p;
3700
3700
  m && (E = [].concat(m).concat(E)), p[v] = E;
3701
3701
  }
@@ -3706,7 +3706,7 @@ function requireUtil() {
3706
3706
  if (!l)
3707
3707
  throw TypeError("path must be specified");
3708
3708
  return l = l.split("."), o(t, l, s);
3709
- }, Object.defineProperty(u, "decorateRoot", {
3709
+ }, Object.defineProperty(a, "decorateRoot", {
3710
3710
  get: function() {
3711
3711
  return f.decorated || (f.decorated = new (requireRoot())());
3712
3712
  }
@@ -3714,8 +3714,8 @@ function requireUtil() {
3714
3714
  }
3715
3715
  var hasRequiredTypes;
3716
3716
  function requireTypes() {
3717
- return hasRequiredTypes || (hasRequiredTypes = 1, function(u) {
3718
- var f = u, h = requireUtil(), c = [
3717
+ return hasRequiredTypes || (hasRequiredTypes = 1, function(a) {
3718
+ var f = a, h = requireUtil(), c = [
3719
3719
  "double",
3720
3720
  // 0
3721
3721
  "float",
@@ -3886,15 +3886,15 @@ var field, hasRequiredField;
3886
3886
  function requireField() {
3887
3887
  if (hasRequiredField) return field;
3888
3888
  hasRequiredField = 1, field = e;
3889
- var u = requireObject();
3890
- ((e.prototype = Object.create(u.prototype)).constructor = e).className = "Field";
3889
+ var a = requireObject();
3890
+ ((e.prototype = Object.create(a.prototype)).constructor = e).className = "Field";
3891
3891
  var f = require_enum(), h = requireTypes(), c = requireUtil(), d, n = /^required|optional|repeated$/;
3892
3892
  e.fromJSON = function(i, t) {
3893
3893
  var l = new e(i, t.id, t.type, t.rule, t.extend, t.options, t.comment);
3894
3894
  return t.edition && (l._edition = t.edition), l._defaultEdition = "proto3", l;
3895
3895
  };
3896
- function e(r, i, t, l, s, a, o) {
3897
- if (c.isObject(l) ? (o = s, a = l, l = s = void 0) : c.isObject(s) && (o = a, a = s, s = void 0), u.call(this, r, a), !c.isInteger(i) || i < 0)
3896
+ function e(r, i, t, l, s, u, o) {
3897
+ if (c.isObject(l) ? (o = s, u = l, l = s = void 0) : c.isObject(s) && (o = u, u = s, s = void 0), a.call(this, r, u), !c.isInteger(i) || i < 0)
3898
3898
  throw TypeError("id must be a non-negative integer");
3899
3899
  if (!c.isString(t))
3900
3900
  throw TypeError("type must be a string");
@@ -3930,7 +3930,7 @@ function requireField() {
3930
3930
  this._features.field_presence !== "IMPLICIT";
3931
3931
  }
3932
3932
  }), e.prototype.setOption = function(i, t, l) {
3933
- return u.prototype.setOption.call(this, i, t, l);
3933
+ return a.prototype.setOption.call(this, i, t, l);
3934
3934
  }, e.prototype.toJSON = function(i) {
3935
3935
  var t = i ? !!i.keepComments : !1;
3936
3936
  return c.toObject([
@@ -3958,7 +3958,7 @@ function requireField() {
3958
3958
  var i;
3959
3959
  c.base64.test(this.typeDefault) ? c.base64.decode(this.typeDefault, i = c.newBuffer(c.base64.length(this.typeDefault)), 0) : c.utf8.write(this.typeDefault, i = c.newBuffer(c.utf8.length(this.typeDefault)), 0), this.typeDefault = i;
3960
3960
  }
3961
- return this.map ? this.defaultValue = c.emptyObject : this.repeated ? this.defaultValue = c.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof d && (this.parent.ctor.prototype[this.name] = this.defaultValue), u.prototype.resolve.call(this);
3961
+ return this.map ? this.defaultValue = c.emptyObject : this.repeated ? this.defaultValue = c.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof d && (this.parent.ctor.prototype[this.name] = this.defaultValue), a.prototype.resolve.call(this);
3962
3962
  }, e.prototype._inferLegacyProtoFeatures = function(i) {
3963
3963
  if (i !== "proto2" && i !== "proto3")
3964
3964
  return {};
@@ -3969,7 +3969,7 @@ function requireField() {
3969
3969
  }
3970
3970
  return this.getOption("packed") === !0 ? t.repeated_field_encoding = "PACKED" : this.getOption("packed") === !1 && (t.repeated_field_encoding = "EXPANDED"), t;
3971
3971
  }, e.prototype._resolveFeatures = function(i) {
3972
- return u.prototype._resolveFeatures.call(this, this._edition || i);
3972
+ return a.prototype._resolveFeatures.call(this, this._edition || i);
3973
3973
  }, e.d = function(i, t, l, s) {
3974
3974
  return typeof t == "function" ? t = c.decorateType(t).name : t && typeof t == "object" && (t = c.decorateEnum(t).name), function(o, p) {
3975
3975
  c.decorateType(o.constructor).add(new e(p, i, t, l, { default: s }));
@@ -3982,11 +3982,11 @@ var oneof, hasRequiredOneof;
3982
3982
  function requireOneof() {
3983
3983
  if (hasRequiredOneof) return oneof;
3984
3984
  hasRequiredOneof = 1, oneof = c;
3985
- var u = requireObject();
3986
- ((c.prototype = Object.create(u.prototype)).constructor = c).className = "OneOf";
3985
+ var a = requireObject();
3986
+ ((c.prototype = Object.create(a.prototype)).constructor = c).className = "OneOf";
3987
3987
  var f = requireField(), h = requireUtil();
3988
3988
  function c(n, e, r, i) {
3989
- if (Array.isArray(e) || (r = e, e = void 0), u.call(this, n, r), !(e === void 0 || Array.isArray(e)))
3989
+ if (Array.isArray(e) || (r = e, e = void 0), a.call(this, n, r), !(e === void 0 || Array.isArray(e)))
3990
3990
  throw TypeError("fieldNames must be an Array");
3991
3991
  this.oneof = e || [], this.fieldsArray = [], this.comment = i;
3992
3992
  }
@@ -4020,7 +4020,7 @@ function requireOneof() {
4020
4020
  throw Error(e + " is not a member of " + this);
4021
4021
  return this.fieldsArray.splice(r, 1), r = this.oneof.indexOf(e.name), r > -1 && this.oneof.splice(r, 1), e.partOf = null, this;
4022
4022
  }, c.prototype.onAdd = function(e) {
4023
- u.prototype.onAdd.call(this, e);
4023
+ a.prototype.onAdd.call(this, e);
4024
4024
  for (var r = this, i = 0; i < this.oneof.length; ++i) {
4025
4025
  var t = e.get(this.oneof[i]);
4026
4026
  t && !t.partOf && (t.partOf = r, r.fieldsArray.push(t));
@@ -4029,7 +4029,7 @@ function requireOneof() {
4029
4029
  }, c.prototype.onRemove = function(e) {
4030
4030
  for (var r = 0, i; r < this.fieldsArray.length; ++r)
4031
4031
  (i = this.fieldsArray[r]).parent && i.parent.remove(i);
4032
- u.prototype.onRemove.call(this, e);
4032
+ a.prototype.onRemove.call(this, e);
4033
4033
  }, Object.defineProperty(c.prototype, "isProto3Optional", {
4034
4034
  get: function() {
4035
4035
  if (this.fieldsArray == null || this.fieldsArray.length !== 1)
@@ -4052,7 +4052,7 @@ var object, hasRequiredObject;
4052
4052
  function requireObject() {
4053
4053
  if (hasRequiredObject) return object;
4054
4054
  hasRequiredObject = 1, object = r, r.className = "ReflectionObject";
4055
- const u = requireOneof();
4055
+ const a = requireOneof();
4056
4056
  var f = requireUtil(), h, c = { enum_type: "OPEN", field_presence: "EXPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY", enforce_naming_style: "STYLE2024", default_symbol_visibility: "EXPORT_TOP_LEVEL" }, d = { enum_type: "OPEN", field_presence: "EXPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY", enforce_naming_style: "STYLE_LEGACY", default_symbol_visibility: "EXPORT_ALL" }, n = { enum_type: "CLOSED", field_presence: "EXPLICIT", json_format: "LEGACY_BEST_EFFORT", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "EXPANDED", utf8_validation: "NONE", enforce_naming_style: "STYLE_LEGACY", default_symbol_visibility: "EXPORT_ALL" }, e = { enum_type: "OPEN", field_presence: "IMPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY", enforce_naming_style: "STYLE_LEGACY", default_symbol_visibility: "EXPORT_ALL" };
4057
4057
  function r(i, t) {
4058
4058
  if (!f.isString(i))
@@ -4125,9 +4125,9 @@ function requireObject() {
4125
4125
  this._features = Object.assign(l, s || {}), this._featuresResolved = !0;
4126
4126
  return;
4127
4127
  }
4128
- if (this.partOf instanceof u) {
4129
- var a = Object.assign({}, this.partOf._features);
4130
- this._features = Object.assign(a, s || {});
4128
+ if (this.partOf instanceof a) {
4129
+ var u = Object.assign({}, this.partOf._features);
4130
+ this._features = Object.assign(u, s || {});
4131
4131
  } else if (!this.declaringField) if (this.parent) {
4132
4132
  var o = Object.assign({}, this.parent._features);
4133
4133
  this._features = Object.assign(o, s || {});
@@ -4144,25 +4144,25 @@ function requireObject() {
4144
4144
  return this.options || (this.options = {}), /^features\\./.test(t) ? f.setProperty(this.options, t, l, s) : (!s || this.options[t] === void 0) && (this.getOption(t) !== l && (this.resolved = !1), this.options[t] = l), this;
4145
4145
  }, r.prototype.setParsedOption = function(t, l, s) {
4146
4146
  this.parsedOptions || (this.parsedOptions = []);
4147
- var a = this.parsedOptions;
4147
+ var u = this.parsedOptions;
4148
4148
  if (s) {
4149
- var o = a.find(function(E) {
4149
+ var o = u.find(function(E) {
4150
4150
  return Object.prototype.hasOwnProperty.call(E, t);
4151
4151
  });
4152
4152
  if (o) {
4153
4153
  var p = o[t];
4154
4154
  f.setProperty(p, s, l);
4155
4155
  } else
4156
- o = {}, o[t] = f.setProperty({}, s, l), a.push(o);
4156
+ o = {}, o[t] = f.setProperty({}, s, l), u.push(o);
4157
4157
  } else {
4158
4158
  var y = {};
4159
- y[t] = l, a.push(y);
4159
+ y[t] = l, u.push(y);
4160
4160
  }
4161
4161
  return this;
4162
4162
  }, r.prototype.setOptions = function(t, l) {
4163
4163
  if (t)
4164
- for (var s = Object.keys(t), a = 0; a < s.length; ++a)
4165
- this.setOption(s[a], t[s[a]], l);
4164
+ for (var s = Object.keys(t), u = 0; u < s.length; ++u)
4165
+ this.setOption(s[u], t[s[u]], l);
4166
4166
  return this;
4167
4167
  }, r.prototype.toString = function() {
4168
4168
  var t = this.constructor.className, l = this.fullName;
@@ -4178,18 +4178,18 @@ var _enum, hasRequired_enum;
4178
4178
  function require_enum() {
4179
4179
  if (hasRequired_enum) return _enum;
4180
4180
  hasRequired_enum = 1, _enum = c;
4181
- var u = requireObject();
4182
- ((c.prototype = Object.create(u.prototype)).constructor = c).className = "Enum";
4181
+ var a = requireObject();
4182
+ ((c.prototype = Object.create(a.prototype)).constructor = c).className = "Enum";
4183
4183
  var f = requireNamespace(), h = requireUtil();
4184
4184
  function c(d, n, e, r, i, t) {
4185
- if (u.call(this, d, e), n && typeof n != "object")
4185
+ if (a.call(this, d, e), n && typeof n != "object")
4186
4186
  throw TypeError("values must be an object");
4187
4187
  if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = r, this.comments = i || {}, this.valuesOptions = t, this._valuesFeatures = {}, this.reserved = void 0, n)
4188
4188
  for (var l = Object.keys(n), s = 0; s < l.length; ++s)
4189
4189
  typeof n[l[s]] == "number" && (this.valuesById[this.values[l[s]] = n[l[s]]] = l[s]);
4190
4190
  }
4191
4191
  return c.prototype._resolveFeatures = function(n) {
4192
- return n = this._edition || n, u.prototype._resolveFeatures.call(this, n), Object.keys(this.values).forEach((e) => {
4192
+ return n = this._edition || n, a.prototype._resolveFeatures.call(this, n), Object.keys(this.values).forEach((e) => {
4193
4193
  var r = Object.assign({}, this._features);
4194
4194
  this._valuesFeatures[e] = Object.assign(r, this.valuesOptions && this.valuesOptions[e] && this.valuesOptions[e].features);
4195
4195
  }), this;
@@ -4249,7 +4249,7 @@ var encoder_1, hasRequiredEncoder;
4249
4249
  function requireEncoder() {
4250
4250
  if (hasRequiredEncoder) return encoder_1;
4251
4251
  hasRequiredEncoder = 1, encoder_1 = d;
4252
- var u = require_enum(), f = requireTypes(), h = requireUtil();
4252
+ var a = require_enum(), f = requireTypes(), h = requireUtil();
4253
4253
  function c(n, e, r, i) {
4254
4254
  return e.delimited ? n("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", r, i, (e.id << 3 | 3) >>> 0, (e.id << 3 | 4) >>> 0) : n("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", r, i, (e.id << 3 | 2) >>> 0);
4255
4255
  }
@@ -4258,8 +4258,8 @@ function requireEncoder() {
4258
4258
  /* initializes */
4259
4259
  n.fieldsArray.slice().sort(h.compareFieldsById)
4260
4260
  ), r = 0; r < t.length; ++r) {
4261
- var l = t[r].resolve(), s = n._fieldsArray.indexOf(l), a = l.resolvedType instanceof u ? "int32" : l.type, o = f.basic[a];
4262
- i = "m" + h.safeProp(l.name), l.map ? (e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", i, l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (l.id << 3 | 2) >>> 0, 8 | f.mapKey[l.keyType], l.keyType), o === void 0 ? e("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", s, i) : e(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | o, a, i), e("}")("}")) : l.repeated ? (e("if(%s!=null&&%s.length){", i, i), l.packed && f.packed[a] !== void 0 ? e("w.uint32(%i).fork()", (l.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", i)("w.%s(%s[i])", a, i)("w.ldelim()") : (e("for(var i=0;i<%s.length;++i)", i), o === void 0 ? c(e, l, s, i + "[i]") : e("w.uint32(%i).%s(%s[i])", (l.id << 3 | o) >>> 0, a, i)), e("}")) : (l.optional && e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", i, l.name), o === void 0 ? c(e, l, s, i) : e("w.uint32(%i).%s(%s)", (l.id << 3 | o) >>> 0, a, i));
4261
+ var l = t[r].resolve(), s = n._fieldsArray.indexOf(l), u = l.resolvedType instanceof a ? "int32" : l.type, o = f.basic[u];
4262
+ i = "m" + h.safeProp(l.name), l.map ? (e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", i, l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (l.id << 3 | 2) >>> 0, 8 | f.mapKey[l.keyType], l.keyType), o === void 0 ? e("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", s, i) : e(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | o, u, i), e("}")("}")) : l.repeated ? (e("if(%s!=null&&%s.length){", i, i), l.packed && f.packed[u] !== void 0 ? e("w.uint32(%i).fork()", (l.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", i)("w.%s(%s[i])", u, i)("w.ldelim()") : (e("for(var i=0;i<%s.length;++i)", i), o === void 0 ? c(e, l, s, i + "[i]") : e("w.uint32(%i).%s(%s[i])", (l.id << 3 | o) >>> 0, u, i)), e("}")) : (l.optional && e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", i, l.name), o === void 0 ? c(e, l, s, i) : e("w.uint32(%i).%s(%s)", (l.id << 3 | o) >>> 0, u, i));
4263
4263
  }
4264
4264
  return e("return w");
4265
4265
  }
@@ -4269,22 +4269,22 @@ var hasRequiredIndexLight;
4269
4269
  function requireIndexLight() {
4270
4270
  if (hasRequiredIndexLight) return indexLight.exports;
4271
4271
  hasRequiredIndexLight = 1;
4272
- var u = indexLight.exports = requireIndexMinimal();
4273
- u.build = "light";
4272
+ var a = indexLight.exports = requireIndexMinimal();
4273
+ a.build = "light";
4274
4274
  function f(c, d, n) {
4275
- return typeof d == "function" ? (n = d, d = new u.Root()) : d || (d = new u.Root()), d.load(c, n);
4275
+ return typeof d == "function" ? (n = d, d = new a.Root()) : d || (d = new a.Root()), d.load(c, n);
4276
4276
  }
4277
- u.load = f;
4277
+ a.load = f;
4278
4278
  function h(c, d) {
4279
- return d || (d = new u.Root()), d.loadSync(c);
4279
+ return d || (d = new a.Root()), d.loadSync(c);
4280
4280
  }
4281
- return u.loadSync = h, u.encoder = requireEncoder(), u.decoder = requireDecoder(), u.verifier = requireVerifier(), u.converter = requireConverter(), u.ReflectionObject = requireObject(), u.Namespace = requireNamespace(), u.Root = requireRoot(), u.Enum = require_enum(), u.Type = requireType(), u.Field = requireField(), u.OneOf = requireOneof(), u.MapField = requireMapfield(), u.Service = requireService(), u.Method = requireMethod(), u.Message = requireMessage(), u.wrappers = requireWrappers(), u.types = requireTypes(), u.util = requireUtil(), u.ReflectionObject._configure(u.Root), u.Namespace._configure(u.Type, u.Service, u.Enum), u.Root._configure(u.Type), u.Field._configure(u.Type), indexLight.exports;
4281
+ return a.loadSync = h, a.encoder = requireEncoder(), a.decoder = requireDecoder(), a.verifier = requireVerifier(), a.converter = requireConverter(), a.ReflectionObject = requireObject(), a.Namespace = requireNamespace(), a.Root = requireRoot(), a.Enum = require_enum(), a.Type = requireType(), a.Field = requireField(), a.OneOf = requireOneof(), a.MapField = requireMapfield(), a.Service = requireService(), a.Method = requireMethod(), a.Message = requireMessage(), a.wrappers = requireWrappers(), a.types = requireTypes(), a.util = requireUtil(), a.ReflectionObject._configure(a.Root), a.Namespace._configure(a.Type, a.Service, a.Enum), a.Root._configure(a.Type), a.Field._configure(a.Type), indexLight.exports;
4282
4282
  }
4283
4283
  var tokenize_1, hasRequiredTokenize;
4284
4284
  function requireTokenize() {
4285
4285
  if (hasRequiredTokenize) return tokenize_1;
4286
4286
  hasRequiredTokenize = 1, tokenize_1 = l;
4287
- var u = /[\\s{}=;:[\\],'"()<>]/g, f = /(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)")/g, h = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g, c = /^ *[*/]+ */, d = /^\\s*\\*?\\/*/, n = /\\n/g, e = /\\s/, r = /\\\\(.?)/g, i = {
4287
+ var a = /[\\s{}=;:[\\],'"()<>]/g, f = /(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)")/g, h = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g, c = /^ *[*/]+ */, d = /^\\s*\\*?\\/*/, n = /\\n/g, e = /\\s/, r = /\\\\(.?)/g, i = {
4288
4288
  0: "\\0",
4289
4289
  r: "\\r",
4290
4290
  n: \`
@@ -4292,7 +4292,7 @@ function requireTokenize() {
4292
4292
  t: " "
4293
4293
  };
4294
4294
  function t(s) {
4295
- return s.replace(r, function(a, o) {
4295
+ return s.replace(r, function(u, o) {
4296
4296
  switch (o) {
4297
4297
  case "\\\\":
4298
4298
  case "":
@@ -4303,7 +4303,7 @@ function requireTokenize() {
4303
4303
  });
4304
4304
  }
4305
4305
  l.unescape = t;
4306
- function l(s, a) {
4306
+ function l(s, u) {
4307
4307
  s = s.toString();
4308
4308
  var o = 0, p = s.length, y = 1, E = 0, v = {}, m = [], _ = null;
4309
4309
  function A(k) {
@@ -4326,7 +4326,7 @@ function requireTokenize() {
4326
4326
  lineEmpty: !1,
4327
4327
  leading: F
4328
4328
  }, H;
4329
- a ? H = 2 : H = 3;
4329
+ u ? H = 2 : H = 3;
4330
4330
  var D = k - H, $;
4331
4331
  do
4332
4332
  if (--D < 0 || ($ = s.charAt(D)) === \`
@@ -4335,9 +4335,9 @@ function requireTokenize() {
4335
4335
  break;
4336
4336
  }
4337
4337
  while ($ === " " || $ === " ");
4338
- for (var X = s.substring(k, P).split(n), z = 0; z < X.length; ++z)
4339
- X[z] = X[z].replace(a ? d : c, "").trim();
4340
- W.text = X.join(\`
4338
+ for (var Y = s.substring(k, P).split(n), z = 0; z < Y.length; ++z)
4339
+ Y[z] = Y[z].replace(u ? d : c, "").trim();
4340
+ W.text = Y.join(\`
4341
4341
  \`).trim(), v[y] = W, E = y;
4342
4342
  }
4343
4343
  function K(k) {
@@ -4367,7 +4367,7 @@ function requireTokenize() {
4367
4367
  if (++o === p)
4368
4368
  throw A("comment");
4369
4369
  if (C(o) === "/")
4370
- if (a) {
4370
+ if (u) {
4371
4371
  if (W = o, H = !1, K(o - 1)) {
4372
4372
  H = !0;
4373
4373
  do
@@ -4385,7 +4385,7 @@ function requireTokenize() {
4385
4385
  ++o, H && (j(W, o - 1, D), D = !0), ++y, k = !0;
4386
4386
  }
4387
4387
  else if ((F = C(o)) === "*") {
4388
- W = o + 1, H = a || C(W) === "*";
4388
+ W = o + 1, H = u || C(W) === "*";
4389
4389
  do {
4390
4390
  if (F === \`
4391
4391
  \` && ++y, ++o === p)
@@ -4398,10 +4398,10 @@ function requireTokenize() {
4398
4398
  }
4399
4399
  } while (k);
4400
4400
  var $ = o;
4401
- u.lastIndex = 0;
4402
- var X = u.test(C($++));
4403
- if (!X)
4404
- for (; $ < p && !u.test(C($)); )
4401
+ a.lastIndex = 0;
4402
+ var Y = a.test(C($++));
4403
+ if (!Y)
4404
+ for (; $ < p && !a.test(C($)); )
4405
4405
  ++$;
4406
4406
  var z = s.substring(o, o = $);
4407
4407
  return (z === '"' || z === "'") && (_ = z), z;
@@ -4428,7 +4428,7 @@ function requireTokenize() {
4428
4428
  }
4429
4429
  function T(k) {
4430
4430
  var P = null, F;
4431
- return k === void 0 ? (F = v[y - 1], delete v[y - 1], F && (a || F.type === "*" || F.lineEmpty) && (P = F.leading ? F.text : null)) : (E < k && J(), F = v[k], delete v[k], F && !F.lineEmpty && (a || F.type === "/") && (P = F.leading ? null : F.text)), P;
4431
+ return k === void 0 ? (F = v[y - 1], delete v[y - 1], F && (u || F.type === "*" || F.lineEmpty) && (P = F.leading ? F.text : null)) : (E < k && J(), F = v[k], delete v[k], F && !F.lineEmpty && (u || F.type === "/") && (P = F.leading ? null : F.text)), P;
4432
4432
  }
4433
4433
  return Object.defineProperty({
4434
4434
  next: L,
@@ -4448,14 +4448,14 @@ var parse_1, hasRequiredParse;
4448
4448
  function requireParse() {
4449
4449
  if (hasRequiredParse) return parse_1;
4450
4450
  hasRequiredParse = 1, parse_1 = I, I.filename = null, I.defaults = { keepCase: !1 };
4451
- var u = requireTokenize(), f = requireRoot(), h = requireType(), c = requireField(), d = requireMapfield(), n = requireOneof(), e = require_enum(), r = requireService(), i = requireMethod(), t = requireObject(), l = requireTypes(), s = requireUtil(), a = /^[1-9][0-9]*$/, o = /^-?[1-9][0-9]*$/, p = /^0[x][0-9a-fA-F]+$/, y = /^-?0[x][0-9a-fA-F]+$/, E = /^0[0-7]+$/, v = /^-?0[0-7]+$/, m = /^(?![eE])[0-9]*(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, _ = /^[a-zA-Z_][a-zA-Z_0-9]*$/, A = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;
4451
+ var a = requireTokenize(), f = requireRoot(), h = requireType(), c = requireField(), d = requireMapfield(), n = requireOneof(), e = require_enum(), r = requireService(), i = requireMethod(), t = requireObject(), l = requireTypes(), s = requireUtil(), u = /^[1-9][0-9]*$/, o = /^-?[1-9][0-9]*$/, p = /^0[x][0-9a-fA-F]+$/, y = /^-?0[x][0-9a-fA-F]+$/, E = /^0[0-7]+$/, v = /^-?0[0-7]+$/, m = /^(?![eE])[0-9]*(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, _ = /^[a-zA-Z_][a-zA-Z_0-9]*$/, A = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;
4452
4452
  function I(C, j, K) {
4453
4453
  j instanceof f || (K = j, j = new f()), K || (K = I.defaults);
4454
- var B = K.preferTrailingComment || !1, L = u(C, K.alternateCommentMode || !1), S = L.next, J = L.push, M = L.peek, T = L.skip, k = L.cmnt, P = !0, F, W, H, D = "proto2", $ = j, X = [], z = {}, ae = K.keepCase ? function(R) {
4454
+ var B = K.preferTrailingComment || !1, L = a(C, K.alternateCommentMode || !1), S = L.next, J = L.push, M = L.peek, T = L.skip, k = L.cmnt, P = !0, F, W, H, D = "proto2", $ = j, Y = [], z = {}, ae = K.keepCase ? function(R) {
4455
4455
  return R;
4456
4456
  } : s.camelCase;
4457
4457
  function he() {
4458
- X.forEach((R) => {
4458
+ Y.forEach((R) => {
4459
4459
  R._edition = D, Object.keys(z).forEach((g) => {
4460
4460
  R.getOption(g) === void 0 && R.setOption(g, z[g], !0);
4461
4461
  });
@@ -4547,7 +4547,7 @@ function requireParse() {
4547
4547
  case "0":
4548
4548
  return 0;
4549
4549
  }
4550
- if (a.test(R))
4550
+ if (u.test(R))
4551
4551
  return O * parseInt(R, 10);
4552
4552
  if (p.test(R))
4553
4553
  return O * parseInt(R, 16);
@@ -4655,15 +4655,15 @@ function requireParse() {
4655
4655
  throw N(w);
4656
4656
  /* eslint-disable no-fallthrough */
4657
4657
  case "repeated":
4658
- Y(O, w);
4658
+ X(O, w);
4659
4659
  break;
4660
4660
  case "optional":
4661
4661
  if (D === "proto3")
4662
- Y(O, "proto3_optional");
4662
+ X(O, "proto3_optional");
4663
4663
  else {
4664
4664
  if (D !== "proto2")
4665
4665
  throw N(w);
4666
- Y(O, "optional");
4666
+ X(O, "optional");
4667
4667
  }
4668
4668
  break;
4669
4669
  case "oneof":
@@ -4678,12 +4678,12 @@ function requireParse() {
4678
4678
  default:
4679
4679
  if (D === "proto2" || !A.test(w))
4680
4680
  throw N(w);
4681
- J(w), Y(O, "optional");
4681
+ J(w), X(O, "optional");
4682
4682
  break;
4683
4683
  }
4684
- }), R.add(O), R === $ && X.push(O);
4684
+ }), R.add(O), R === $ && Y.push(O);
4685
4685
  }
4686
- function Y(R, g, O) {
4686
+ function X(R, g, O) {
4687
4687
  var b = S();
4688
4688
  if (b === "group") {
4689
4689
  _e(R, g);
@@ -4710,7 +4710,7 @@ function requireParse() {
4710
4710
  q.setOption("proto3_optional", !0), x.add(q), R.add(x);
4711
4711
  } else
4712
4712
  R.add(q);
4713
- R === $ && X.push(q);
4713
+ R === $ && Y.push(q);
4714
4714
  }
4715
4715
  function _e(R, g) {
4716
4716
  if (D >= 2023)
@@ -4730,10 +4730,10 @@ function requireParse() {
4730
4730
  break;
4731
4731
  case "required":
4732
4732
  case "repeated":
4733
- Y(q, U);
4733
+ X(q, U);
4734
4734
  break;
4735
4735
  case "optional":
4736
- D === "proto3" ? Y(q, "proto3_optional") : Y(q, "optional");
4736
+ D === "proto3" ? X(q, "proto3_optional") : X(q, "optional");
4737
4737
  break;
4738
4738
  case "message":
4739
4739
  ne(q, U);
@@ -4794,7 +4794,7 @@ function requireParse() {
4794
4794
  throw N(g, "name");
4795
4795
  var O = new n(ae(g));
4796
4796
  Z(O, function(w) {
4797
- w === "option" ? (Q(O, w), T(";")) : (J(w), Y(O, "optional"));
4797
+ w === "option" ? (Q(O, w), T(";")) : (J(w), X(O, "optional"));
4798
4798
  }), R.add(O);
4799
4799
  }
4800
4800
  function de(R, g) {
@@ -4812,7 +4812,7 @@ function requireParse() {
4812
4812
  default:
4813
4813
  Oe(O, w);
4814
4814
  }
4815
- }), R.add(O), R === $ && X.push(O);
4815
+ }), R.add(O), R === $ && Y.push(O);
4816
4816
  }
4817
4817
  function Oe(R, g) {
4818
4818
  if (!_.test(g))
@@ -4914,7 +4914,7 @@ function requireParse() {
4914
4914
  we(O, w);
4915
4915
  else
4916
4916
  throw N(w);
4917
- }), R.add(O), R === $ && X.push(O);
4917
+ }), R.add(O), R === $ && Y.push(O);
4918
4918
  }
4919
4919
  function we(R, g) {
4920
4920
  var O = k(), b = g;
@@ -4940,15 +4940,15 @@ function requireParse() {
4940
4940
  switch (w) {
4941
4941
  case "required":
4942
4942
  case "repeated":
4943
- Y(R, w, O);
4943
+ X(R, w, O);
4944
4944
  break;
4945
4945
  case "optional":
4946
- D === "proto3" ? Y(R, "proto3_optional", O) : Y(R, "optional", O);
4946
+ D === "proto3" ? X(R, "proto3_optional", O) : X(R, "optional", O);
4947
4947
  break;
4948
4948
  default:
4949
4949
  if (D === "proto2" || !A.test(w))
4950
4950
  throw N(w);
4951
- J(w), Y(R, "optional", O);
4951
+ J(w), X(R, "optional", O);
4952
4952
  break;
4953
4953
  }
4954
4954
  });
@@ -4998,9 +4998,9 @@ var common_1, hasRequiredCommon;
4998
4998
  function requireCommon() {
4999
4999
  if (hasRequiredCommon) return common_1;
5000
5000
  hasRequiredCommon = 1, common_1 = f;
5001
- var u = /\\/|\\./;
5001
+ var a = /\\/|\\./;
5002
5002
  function f(c, d) {
5003
- u.test(c) || (c = "google/protobuf/" + c + ".proto", d = { nested: { google: { nested: { protobuf: { nested: d } } } } }), f[c] = d;
5003
+ a.test(c) || (c = "google/protobuf/" + c + ".proto", d = { nested: { google: { nested: { protobuf: { nested: d } } } } }), f[c] = d;
5004
5004
  }
5005
5005
  f("any", {
5006
5006
  /**
@@ -5317,34 +5317,34 @@ var hasRequiredSrc;
5317
5317
  function requireSrc() {
5318
5318
  if (hasRequiredSrc) return src.exports;
5319
5319
  hasRequiredSrc = 1;
5320
- var u = src.exports = requireIndexLight();
5321
- return u.build = "full", u.tokenize = requireTokenize(), u.parse = requireParse(), u.common = requireCommon(), u.Root._configure(u.Type, u.parse, u.common), src.exports;
5320
+ var a = src.exports = requireIndexLight();
5321
+ return a.build = "full", a.tokenize = requireTokenize(), a.parse = requireParse(), a.common = requireCommon(), a.Root._configure(a.Type, a.parse, a.common), src.exports;
5322
5322
  }
5323
5323
  var protobufjs, hasRequiredProtobufjs;
5324
5324
  function requireProtobufjs() {
5325
5325
  return hasRequiredProtobufjs || (hasRequiredProtobufjs = 1, protobufjs = requireSrc()), protobufjs;
5326
5326
  }
5327
- var protobufjsExports = requireProtobufjs(), StateStreamErrorCode = /* @__PURE__ */ ((u) => (u.CONNECTION_FAILED = "CONNECTION_FAILED", u.RECONNECT_FAILED = "RECONNECT_FAILED", u.CONNECTION_LOST = "CONNECTION_LOST", u.CONNECTION_TIMEOUT = "CONNECTION_TIMEOUT", u.AUTH_FAILED = "AUTH_FAILED", u.AUTH_REFRESH_FAILED = "AUTH_REFRESH_FAILED", u.DEVICE_ERROR = "DEVICE_ERROR", u.DECODE_ERROR = "DECODE_ERROR", u.FRAME_PROCESS_ERROR = "FRAME_PROCESS_ERROR", u.STREAM_ALREADY_STARTED = "STREAM_ALREADY_STARTED", u.WORKER_INIT_FAILED = "WORKER_INIT_FAILED", u.UNKNOWN_ERROR = "UNKNOWN_ERROR", u))(StateStreamErrorCode || {}), ConnectionStatus = /* @__PURE__ */ ((u) => (u.DISCONNECTED = "DISCONNECTED", u.CONNECTING = "CONNECTING", u.CONNECTED = "CONNECTED", u.RECONNECTING = "RECONNECTING", u))(ConnectionStatus || {}), AuthStatus = /* @__PURE__ */ ((u) => (u.UNAUTHENTICATED = "UNAUTHENTICATED", u.AUTHENTICATING = "AUTHENTICATING", u.AUTHENTICATED = "AUTHENTICATED", u.REAUTHENTICATING = "REAUTHENTICATING", u.FAILED = "FAILED", u))(AuthStatus || {});
5328
- const DEFAULT_MAX_RECONNECT_ATTEMPTS = 5, DEFAULT_MAX_AUTH_ATTEMPTS = 5, nested = { BSB_State: { nested: { StateUpdate: { oneofs: { state: { oneof: ["deviceName", "power", "brightness", "audioVolume", "wifi", "updateState", "updateCheck", "timezone", "matter", "frame", "input", "timer", "ble", "autoUpdateState"] } }, fields: { deviceName: { type: "BSB_State.DeviceName", id: 1 }, power: { type: "BSB_State.Power", id: 2 }, brightness: { type: "BSB_State.Brightness", id: 3 }, audioVolume: { type: "BSB_State.AudioVolume", id: 4 }, wifi: { type: "BSB_State.Wifi", id: 5 }, updateState: { type: "BSB_Update.UpdateState", id: 6 }, updateCheck: { type: "BSB_Update.CheckState", id: 7 }, timezone: { type: "BSB_State.Timezone", id: 8 }, matter: { type: "BSB_State.Matter", id: 9 }, frame: { type: "BSB_Frame.Frame", id: 10 }, input: { type: "BSB_Input.InputEvent", id: 11 }, timer: { type: "BSB_Timer.Timer", id: 12 }, ble: { type: "BSB_State.Ble.Ble", id: 13 }, autoUpdateState: { type: "BSB_Update.AutoUpdateState", id: 14 } } }, State: { oneofs: { _error: { oneof: ["error"] } }, fields: { timestamp: { type: "fixed64", id: 1 }, updates: { rule: "repeated", type: "StateUpdate", id: 2 }, error: { type: "BSB_Error.Error", id: 3, options: { proto3_optional: !0 } } } }, DeviceName: { fields: { name: { type: "string", id: 1 } } }, BrightnessAutomatic: { fields: {} }, BrightnessManual: { fields: { brightness: { type: "uint32", id: 1 } } }, Brightness: { oneofs: { setting: { oneof: ["automatic", "manual"] } }, fields: { automatic: { type: "BrightnessAutomatic", id: 1 }, manual: { type: "BrightnessManual", id: 2 }, actualBrightness: { type: "uint32", id: 3 } } }, BatteryStatus: { values: { DISCHARGING: 0, CHARGING: 1, CHARGED: 2 } }, UnknownPowerState: { fields: {} }, PowerState: { fields: { batteryStatus: { type: "BatteryStatus", id: 1 }, batteryChargePercent: { type: "uint32", id: 2 }, batteryVoltageMv: { type: "uint32", id: 3 }, batteryCurrentMa: { type: "sint32", id: 4 }, usbVoltageMv: { type: "uint32", id: 5 } } }, Power: { oneofs: { state: { oneof: ["unknown", "known"] } }, fields: { unknown: { type: "UnknownPowerState", id: 1 }, known: { type: "PowerState", id: 2 } } }, AudioVolume: { fields: { volume: { type: "uint32", id: 1 } } }, WifiConnectionStatus: { values: { CONNECTED: 0, CONNECTING: 1, DISCONNECTING: 2, RECONNECTING: 3 } }, WifiSecurity: { values: { UNKNOWN: 0, OPEN: 1, WPA: 2, WPA2: 3, WEP: 4, WPA_WPA2: 5, WPA3: 6, WPA2_WPA3: 7 } }, IpConfigurationMethod: { values: { DHCP: 0, STATIC: 1 } }, IpProtocol: { values: { IPV4: 0, IPV6: 1 } }, WifiStateUnknown: { fields: {} }, WifiStateDisconnected: { fields: {} }, WifiStateConnected: { fields: { status: { type: "WifiConnectionStatus", id: 1 }, ssid: { type: "string", id: 2 }, bssid: { type: "string", id: 3 }, channel: { type: "uint32", id: 4 }, rssi: { type: "sint32", id: 5 }, security: { type: "WifiSecurity", id: 6 } } }, IpAddress: { fields: { protocol: { type: "IpProtocol", id: 1 }, method: { type: "IpConfigurationMethod", id: 2 }, address: { type: "string", id: 3 }, gateway: { type: "string", id: 4 }, netmask: { type: "string", id: 5 } } }, Wifi: { oneofs: { wifiState: { oneof: ["unknown", "disconnected", "connected"] } }, fields: { unknown: { type: "WifiStateUnknown", id: 1 }, disconnected: { type: "WifiStateDisconnected", id: 2 }, connected: { type: "WifiStateConnected", id: 3 }, ipAddresses: { rule: "repeated", type: "IpAddress", id: 4 } } }, Timezone: { fields: { name: { type: "string", id: 1 }, offset: { type: "sint32", id: 2 }, abbr: { type: "string", id: 3 } } }, MatterCommissioningStatus: { values: { NEVER_STARTED: 0, STARTED: 1, COMPLETED_SUCCESSFULLY: 2, FAILED: 3 } }, MatterCommissioningState: { fields: { status: { type: "MatterCommissioningStatus", id: 1 }, timestamp: { type: "fixed64", id: 2 } } }, Matter: { fields: { fabricCount: { type: "uint32", id: 1 }, state: { type: "MatterCommissioningState", id: 2 } } }, Ble: { nested: { ServiceStatus: { values: { RESET: 0, INITIALIZATION: 1, READY: 2, ADVERTISING: 3, CONNECTABLE: 4, CONNECTED: 5, ERROR: 6 } }, Ble: { oneofs: { _remoteAddress: { oneof: ["remoteAddress"] } }, fields: { status: { type: "ServiceStatus", id: 1 }, remoteAddress: { type: "string", id: 2, options: { proto3_optional: !0 } } } } } } } }, BSB_Update: { nested: { UpdateEvent: { values: { SESSION_START: 0, SESSION_STOP: 1, ACTION_BEGIN: 2, ACTION_DONE: 3, DETAIL_CHANGE: 4, ACTION_PROGRESS: 5, EVENT_NONE: 6 } }, UpdateAction: { values: { DOWNLOAD: 0, SHA_VERIFICATION: 1, UNPACK: 2, INSTALLATION_PREPARE: 3, INSTALLATION_APPLY: 4, ACTION_NONE: 5 } }, UpdateStatus: { values: { OK: 0, BATTERY_LOW: 1, BUSY: 2, DOWNLOAD_FAILURE: 3, DOWNLOAD_ABORT: 4, SHA_MISMATCH: 5, UNPACK_CREATE_STAGING_DIRECTORY_FAILURE: 6, UNPACK_ARCHIVE_OPEN_FAILURE: 7, UNPACK_ARCHIVE_UNPACK_FAILURE: 8, INSTALLATION_PREPARE_MANIFEST_NOT_FOUND: 9, INSTALLATION_PREPARE_MANIFEST_INVALID: 10, INSTALLATION_PREPARE_SESSION_CONFIG_SETUP_FAILURE: 11, INSTALLATION_PREPARE_POINTER_SETUP_FAILURE: 12, UNKNOWN_FAILURE: 13 } }, CheckError: { values: { NOT_AVAILABLE: 0, FAILURE: 1, IDLE: 2 } }, UpdateAvailable: { fields: { version: { type: "string", id: 1 } } }, UpdateUnavailable: { fields: { reason: { type: "CheckError", id: 1 } } }, UpdateState: { fields: { event: { type: "UpdateEvent", id: 1 }, action: { type: "UpdateAction", id: 2 }, status: { type: "UpdateStatus", id: 3 } } }, CheckState: { oneofs: { status: { oneof: ["available", "unavailable"] } }, fields: { available: { type: "UpdateAvailable", id: 1 }, unavailable: { type: "UpdateUnavailable", id: 2 } } }, AutoUpdateInterval: { fields: { start: { type: "uint32", id: 1 }, end: { type: "uint32", id: 2 } } }, AutoUpdateState: { fields: { enabled: { type: "bool", id: 1 }, interval: { type: "AutoUpdateInterval", id: 2 } } } } }, BSB_Frame: { nested: { Encoding: { values: { PLAIN: 0, RUN_LENGTH: 1, DEFLATE: 2, DEFLATE_RUN_LENGTH: 3 } }, PixelFormat: { values: { RGB888: 0, L8: 1, L4: 2 } }, Screen: { values: { FRONT: 0, BACK: 1 } }, Frame: { fields: { screen: { type: "Screen", id: 1 }, width: { type: "uint32", id: 2 }, height: { type: "uint32", id: 3 }, encoding: { type: "Encoding", id: 4 }, pixelFormat: { type: "PixelFormat", id: 5 }, data: { type: "bytes", id: 6 } } } } }, BSB_Timer: { nested: { Timer: { fields: { json: { type: "BSB_Util.Json", id: 1 } } } } }, BSB_Util: { nested: { Compression: { values: { PLAIN: 0, GZIP: 1 } }, Json: { fields: { compression: { type: "Compression", id: 1 }, data: { type: "bytes", id: 2 } } } } }, BSB_Input: { nested: { Button: { values: { OK: 0, BACK: 1, START: 2 } }, ButtonAction: { values: { PRESS: 0, RELEASE: 1 } }, SwitchPosition: { values: { BUSY: 0, CUSTOM: 1, OFF: 2, APPS: 3, SETTINGS: 4 } }, ButtonEvent: { fields: { button: { type: "Button", id: 1 }, action: { type: "ButtonAction", id: 2 } } }, SwitchEvent: { fields: { position: { type: "SwitchPosition", id: 1 } } }, EncoderEvent: { fields: { delta: { type: "sint32", id: 1 } } }, InputEvent: { oneofs: { event: { oneof: ["buttonEvent", "switchEvent", "encoderEvent"] } }, fields: { buttonEvent: { type: "ButtonEvent", id: 1 }, switchEvent: { type: "SwitchEvent", id: 2 }, encoderEvent: { type: "EncoderEvent", id: 3 } } } } }, BSB_Error: { nested: { Cause: { values: { RESOURCE_LIMIT: 0 } }, Severity: { values: { FATAL: 0, ERROR: 1, WARNING: 2 } }, Error: { fields: { cause: { type: "Cause", id: 1 }, severity: { type: "Severity", id: 2 } } } } } };
5327
+ var protobufjsExports = requireProtobufjs(), StateStreamErrorCode = /* @__PURE__ */ ((a) => (a.CONNECTION_FAILED = "CONNECTION_FAILED", a.RECONNECT_FAILED = "RECONNECT_FAILED", a.CONNECTION_LOST = "CONNECTION_LOST", a.CONNECTION_TIMEOUT = "CONNECTION_TIMEOUT", a.AUTH_FAILED = "AUTH_FAILED", a.AUTH_REFRESH_FAILED = "AUTH_REFRESH_FAILED", a.DEVICE_ERROR = "DEVICE_ERROR", a.DECODE_ERROR = "DECODE_ERROR", a.FRAME_PROCESS_ERROR = "FRAME_PROCESS_ERROR", a.STREAM_ALREADY_STARTED = "STREAM_ALREADY_STARTED", a.WORKER_INIT_FAILED = "WORKER_INIT_FAILED", a.UNKNOWN_ERROR = "UNKNOWN_ERROR", a))(StateStreamErrorCode || {}), ConnectionStatus = /* @__PURE__ */ ((a) => (a.DISCONNECTED = "DISCONNECTED", a.CONNECTING = "CONNECTING", a.CONNECTED = "CONNECTED", a.RECONNECTING = "RECONNECTING", a))(ConnectionStatus || {}), AuthStatus = /* @__PURE__ */ ((a) => (a.UNAUTHENTICATED = "UNAUTHENTICATED", a.AUTHENTICATING = "AUTHENTICATING", a.AUTHENTICATED = "AUTHENTICATED", a.REAUTHENTICATING = "REAUTHENTICATING", a.FAILED = "FAILED", a))(AuthStatus || {});
5328
+ const DEFAULT_MAX_RECONNECT_ATTEMPTS = 5, DEFAULT_MAX_AUTH_ATTEMPTS = 5, DEFAULT_DELAY_RECONNECT = 500, nested = { BSB_State: { nested: { StateUpdate: { oneofs: { state: { oneof: ["deviceName", "power", "brightness", "audioVolume", "wifi", "updateState", "updateCheck", "timezone", "matter", "frame", "input", "timer", "ble", "autoUpdateState"] } }, fields: { deviceName: { type: "BSB_State.DeviceName", id: 1 }, power: { type: "BSB_State.Power", id: 2 }, brightness: { type: "BSB_State.Brightness", id: 3 }, audioVolume: { type: "BSB_State.AudioVolume", id: 4 }, wifi: { type: "BSB_State.Wifi", id: 5 }, updateState: { type: "BSB_Update.UpdateState", id: 6 }, updateCheck: { type: "BSB_Update.CheckState", id: 7 }, timezone: { type: "BSB_State.Timezone", id: 8 }, matter: { type: "BSB_State.Matter", id: 9 }, frame: { type: "BSB_Frame.Frame", id: 10 }, input: { type: "BSB_Input.InputEvent", id: 11 }, timer: { type: "BSB_Timer.Timer", id: 12 }, ble: { type: "BSB_State.Ble.Ble", id: 13 }, autoUpdateState: { type: "BSB_Update.AutoUpdateState", id: 14 } } }, State: { oneofs: { _error: { oneof: ["error"] } }, fields: { timestamp: { type: "fixed64", id: 1 }, updates: { rule: "repeated", type: "StateUpdate", id: 2 }, error: { type: "BSB_Error.Error", id: 3, options: { proto3_optional: !0 } } } }, DeviceName: { fields: { name: { type: "string", id: 1 } } }, BrightnessAutomatic: { fields: {} }, BrightnessManual: { fields: { brightness: { type: "uint32", id: 1 } } }, Brightness: { oneofs: { setting: { oneof: ["automatic", "manual"] } }, fields: { automatic: { type: "BrightnessAutomatic", id: 1 }, manual: { type: "BrightnessManual", id: 2 }, actualBrightness: { type: "uint32", id: 3 } } }, BatteryStatus: { values: { DISCHARGING: 0, CHARGING: 1, CHARGED: 2 } }, UnknownPowerState: { fields: {} }, PowerState: { fields: { batteryStatus: { type: "BatteryStatus", id: 1 }, batteryChargePercent: { type: "uint32", id: 2 }, batteryVoltageMv: { type: "uint32", id: 3 }, batteryCurrentMa: { type: "sint32", id: 4 }, usbVoltageMv: { type: "uint32", id: 5 } } }, Power: { oneofs: { state: { oneof: ["unknown", "known"] } }, fields: { unknown: { type: "UnknownPowerState", id: 1 }, known: { type: "PowerState", id: 2 } } }, AudioVolume: { fields: { volume: { type: "uint32", id: 1 } } }, WifiConnectionStatus: { values: { CONNECTED: 0, CONNECTING: 1, DISCONNECTING: 2, RECONNECTING: 3 } }, WifiSecurity: { values: { UNKNOWN: 0, OPEN: 1, WPA: 2, WPA2: 3, WEP: 4, WPA_WPA2: 5, WPA3: 6, WPA2_WPA3: 7 } }, IpConfigurationMethod: { values: { DHCP: 0, STATIC: 1 } }, IpProtocol: { values: { IPV4: 0, IPV6: 1 } }, WifiStateUnknown: { fields: {} }, WifiStateDisconnected: { fields: {} }, WifiStateConnected: { fields: { status: { type: "WifiConnectionStatus", id: 1 }, ssid: { type: "string", id: 2 }, bssid: { type: "string", id: 3 }, channel: { type: "uint32", id: 4 }, rssi: { type: "sint32", id: 5 }, security: { type: "WifiSecurity", id: 6 } } }, IpAddress: { fields: { protocol: { type: "IpProtocol", id: 1 }, method: { type: "IpConfigurationMethod", id: 2 }, address: { type: "string", id: 3 }, gateway: { type: "string", id: 4 }, netmask: { type: "string", id: 5 } } }, Wifi: { oneofs: { wifiState: { oneof: ["unknown", "disconnected", "connected"] } }, fields: { unknown: { type: "WifiStateUnknown", id: 1 }, disconnected: { type: "WifiStateDisconnected", id: 2 }, connected: { type: "WifiStateConnected", id: 3 }, ipAddresses: { rule: "repeated", type: "IpAddress", id: 4 } } }, Timezone: { fields: { name: { type: "string", id: 1 }, offset: { type: "sint32", id: 2 }, abbr: { type: "string", id: 3 } } }, MatterCommissioningStatus: { values: { NEVER_STARTED: 0, STARTED: 1, COMPLETED_SUCCESSFULLY: 2, FAILED: 3 } }, MatterCommissioningState: { fields: { status: { type: "MatterCommissioningStatus", id: 1 }, timestamp: { type: "fixed64", id: 2 } } }, Matter: { fields: { fabricCount: { type: "uint32", id: 1 }, state: { type: "MatterCommissioningState", id: 2 } } }, Ble: { nested: { ServiceStatus: { values: { RESET: 0, INITIALIZATION: 1, READY: 2, ADVERTISING: 3, CONNECTABLE: 4, CONNECTED: 5, ERROR: 6 } }, Ble: { oneofs: { _remoteAddress: { oneof: ["remoteAddress"] } }, fields: { status: { type: "ServiceStatus", id: 1 }, remoteAddress: { type: "string", id: 2, options: { proto3_optional: !0 } } } } } } } }, BSB_Update: { nested: { UpdateEvent: { values: { SESSION_START: 0, SESSION_STOP: 1, ACTION_BEGIN: 2, ACTION_DONE: 3, DETAIL_CHANGE: 4, ACTION_PROGRESS: 5, EVENT_NONE: 6 } }, UpdateAction: { values: { DOWNLOAD: 0, SHA_VERIFICATION: 1, UNPACK: 2, INSTALLATION_PREPARE: 3, INSTALLATION_APPLY: 4, ACTION_NONE: 5 } }, UpdateStatus: { values: { OK: 0, BATTERY_LOW: 1, BUSY: 2, DOWNLOAD_FAILURE: 3, DOWNLOAD_ABORT: 4, SHA_MISMATCH: 5, UNPACK_CREATE_STAGING_DIRECTORY_FAILURE: 6, UNPACK_ARCHIVE_OPEN_FAILURE: 7, UNPACK_ARCHIVE_UNPACK_FAILURE: 8, INSTALLATION_PREPARE_MANIFEST_NOT_FOUND: 9, INSTALLATION_PREPARE_MANIFEST_INVALID: 10, INSTALLATION_PREPARE_SESSION_CONFIG_SETUP_FAILURE: 11, INSTALLATION_PREPARE_POINTER_SETUP_FAILURE: 12, UNKNOWN_FAILURE: 13 } }, CheckError: { values: { NOT_AVAILABLE: 0, FAILURE: 1, IDLE: 2 } }, UpdateAvailable: { fields: { version: { type: "string", id: 1 } } }, UpdateUnavailable: { fields: { reason: { type: "CheckError", id: 1 } } }, UpdateState: { fields: { event: { type: "UpdateEvent", id: 1 }, action: { type: "UpdateAction", id: 2 }, status: { type: "UpdateStatus", id: 3 } } }, CheckState: { oneofs: { status: { oneof: ["available", "unavailable"] } }, fields: { available: { type: "UpdateAvailable", id: 1 }, unavailable: { type: "UpdateUnavailable", id: 2 } } }, AutoUpdateInterval: { fields: { start: { type: "uint32", id: 1 }, end: { type: "uint32", id: 2 } } }, AutoUpdateState: { fields: { enabled: { type: "bool", id: 1 }, interval: { type: "AutoUpdateInterval", id: 2 } } } } }, BSB_Frame: { nested: { Encoding: { values: { PLAIN: 0, RUN_LENGTH: 1, DEFLATE: 2, DEFLATE_RUN_LENGTH: 3 } }, PixelFormat: { values: { RGB888: 0, L8: 1, L4: 2 } }, Screen: { values: { FRONT: 0, BACK: 1 } }, Frame: { fields: { screen: { type: "Screen", id: 1 }, width: { type: "uint32", id: 2 }, height: { type: "uint32", id: 3 }, encoding: { type: "Encoding", id: 4 }, pixelFormat: { type: "PixelFormat", id: 5 }, data: { type: "bytes", id: 6 } } } } }, BSB_Timer: { nested: { Timer: { fields: { json: { type: "BSB_Util.Json", id: 1 } } } } }, BSB_Util: { nested: { Compression: { values: { PLAIN: 0, GZIP: 1 } }, Json: { fields: { compression: { type: "Compression", id: 1 }, data: { type: "bytes", id: 2 } } } } }, BSB_Input: { nested: { Button: { values: { OK: 0, BACK: 1, START: 2 } }, ButtonAction: { values: { PRESS: 0, RELEASE: 1 } }, SwitchPosition: { values: { BUSY: 0, CUSTOM: 1, OFF: 2, APPS: 3, SETTINGS: 4 } }, ButtonEvent: { fields: { button: { type: "Button", id: 1 }, action: { type: "ButtonAction", id: 2 } } }, SwitchEvent: { fields: { position: { type: "SwitchPosition", id: 1 } } }, EncoderEvent: { fields: { delta: { type: "sint32", id: 1 } } }, InputEvent: { oneofs: { event: { oneof: ["buttonEvent", "switchEvent", "encoderEvent"] } }, fields: { buttonEvent: { type: "ButtonEvent", id: 1 }, switchEvent: { type: "SwitchEvent", id: 2 }, encoderEvent: { type: "EncoderEvent", id: 3 } } } } }, BSB_Error: { nested: { Cause: { values: { RESOURCE_LIMIT: 0 } }, Severity: { values: { FATAL: 0, ERROR: 1, WARNING: 2 } }, Error: { fields: { cause: { type: "Cause", id: 1 }, severity: { type: "Severity", id: 2 } } } } } };
5329
5329
  var bundle = {
5330
5330
  nested
5331
5331
  };
5332
- function decompressRLE(u, f) {
5332
+ function decompressRLE(a, f) {
5333
5333
  const h = [];
5334
- for (let c = 0; c < u.length; ) {
5335
- const d = u[c++];
5334
+ for (let c = 0; c < a.length; ) {
5335
+ const d = a[c++];
5336
5336
  if (d === void 0) break;
5337
5337
  const n = d & 127;
5338
5338
  if (!n)
5339
5339
  continue;
5340
5340
  if (d & 128) {
5341
- const r = n * f, i = u.subarray(c, c + r);
5341
+ const r = n * f, i = a.subarray(c, c + r);
5342
5342
  for (let t = 0; t < i.length; t++)
5343
5343
  h.push(i[t]);
5344
5344
  c += r;
5345
5345
  continue;
5346
5346
  }
5347
- const e = u.subarray(c, c + f);
5347
+ const e = a.subarray(c, c + f);
5348
5348
  c += f;
5349
5349
  for (let r = 0; r < n; r++)
5350
5350
  for (let i = 0; i < f; i++)
@@ -5352,23 +5352,23 @@ function decompressRLE(u, f) {
5352
5352
  }
5353
5353
  return new Uint8Array(h);
5354
5354
  }
5355
- async function decompressDeflate(u) {
5355
+ async function decompressDeflate(a) {
5356
5356
  if (typeof DecompressionStream > "u")
5357
5357
  throw new Error("DecompressionStream is not supported in this environment.");
5358
5358
  try {
5359
5359
  const f = new DecompressionStream("deflate"), h = f.writable.getWriter();
5360
- h.write(u), h.close();
5360
+ h.write(a), h.close();
5361
5361
  const d = await new Response(f.readable).arrayBuffer();
5362
5362
  return new Uint8Array(d);
5363
5363
  } catch (f) {
5364
5364
  throw new Error(\`Deflate decompression failed: \${f instanceof Error ? f.message : String(f)}\`);
5365
5365
  }
5366
5366
  }
5367
- function convertL4toRGBA(u, f, h) {
5367
+ function convertL4toRGBA(a, f, h) {
5368
5368
  const c = new Uint8ClampedArray(f * h * 4);
5369
5369
  let d = 0;
5370
- for (let n = 0; n < u.length; n++) {
5371
- const e = u[n], r = (e & 15) * 17, i = (e >> 4 & 15) * 17, t = [r, i];
5370
+ for (let n = 0; n < a.length; n++) {
5371
+ const e = a[n], r = (e & 15) * 17, i = (e >> 4 & 15) * 17, t = [r, i];
5372
5372
  for (const l of t)
5373
5373
  if (d < f * h) {
5374
5374
  const s = d * 4;
@@ -5377,28 +5377,28 @@ function convertL4toRGBA(u, f, h) {
5377
5377
  }
5378
5378
  return c;
5379
5379
  }
5380
- function convertL8toRGBA(u, f, h) {
5381
- const c = new Uint8ClampedArray(f * h * 4), d = Math.min(u.length, f * h);
5380
+ function convertL8toRGBA(a, f, h) {
5381
+ const c = new Uint8ClampedArray(f * h * 4), d = Math.min(a.length, f * h);
5382
5382
  for (let n = 0; n < d; n++) {
5383
- const e = u[n], r = n * 4;
5383
+ const e = a[n], r = n * 4;
5384
5384
  c[r] = e, c[r + 1] = e, c[r + 2] = e, c[r + 3] = 255;
5385
5385
  }
5386
5386
  return c;
5387
5387
  }
5388
- function convertRGB888toRGBA(u, f, h) {
5388
+ function convertRGB888toRGBA(a, f, h) {
5389
5389
  const c = new Uint8ClampedArray(f * h * 4), d = f * h;
5390
5390
  for (let n = 0; n < d; n++) {
5391
5391
  const e = n * 3, r = n * 4;
5392
- e + 2 < u.length && (c[r] = u[e + 2], c[r + 1] = u[e + 1], c[r + 2] = u[e], c[r + 3] = 255);
5392
+ e + 2 < a.length && (c[r] = a[e + 2], c[r + 1] = a[e + 1], c[r + 2] = a[e], c[r + 3] = 255);
5393
5393
  }
5394
5394
  return c;
5395
5395
  }
5396
- async function processFrame(u) {
5397
- if (!u.data || !u.width || !u.height)
5396
+ async function processFrame(a) {
5397
+ if (!a.data || !a.width || !a.height)
5398
5398
  return null;
5399
- let f = u.data;
5400
- const h = u.pixelFormat === 0 ? 3 : 1;
5401
- switch (u.encoding) {
5399
+ let f = a.data;
5400
+ const h = a.pixelFormat === 0 ? 3 : 1;
5401
+ switch (a.encoding) {
5402
5402
  case 1:
5403
5403
  f = decompressRLE(f, h);
5404
5404
  break;
@@ -5409,24 +5409,24 @@ async function processFrame(u) {
5409
5409
  f = await decompressDeflate(f), f = decompressRLE(f, h);
5410
5410
  break;
5411
5411
  }
5412
- switch (u.pixelFormat) {
5412
+ switch (a.pixelFormat) {
5413
5413
  case 2:
5414
- return convertL4toRGBA(f, u.width, u.height);
5414
+ return convertL4toRGBA(f, a.width, a.height);
5415
5415
  case 1:
5416
- return convertL8toRGBA(f, u.width, u.height);
5416
+ return convertL8toRGBA(f, a.width, a.height);
5417
5417
  case 0:
5418
- return convertRGB888toRGBA(f, u.width, u.height);
5418
+ return convertRGB888toRGBA(f, a.width, a.height);
5419
5419
  default:
5420
- return new Uint8ClampedArray(u.width * u.height * 4);
5420
+ return new Uint8ClampedArray(a.width * a.height * 4);
5421
5421
  }
5422
5422
  }
5423
- const root = protobufjsExports.Root.fromJSON(bundle), StateType = root.lookupType("BSB_State.State"), AUTH_CODE = 3e3, RECONNECT_CODES = /* @__PURE__ */ new Set([1001, 1006, 1012, 1013, 1014, 3008]);
5424
- let maxAuthAttempts = DEFAULT_MAX_AUTH_ATTEMPTS, maxReconnectAttempts = DEFAULT_MAX_RECONNECT_ATTEMPTS, socket = null, isBinaryMode = !0, currentMode = "local", currentToken, currentAddr = "", retryCount = 0, authRetryCount = 0, isAuthReported = !1, stabilityTimeout;
5423
+ const root = protobufjsExports.Root.fromJSON(bundle), StateType = root.lookupType("BSB_State.State"), AUTH_CODE = 3e3;
5424
+ let maxAuthAttempts = DEFAULT_MAX_AUTH_ATTEMPTS, maxReconnectAttempts = DEFAULT_MAX_RECONNECT_ATTEMPTS, reconnectDelay = DEFAULT_DELAY_RECONNECT, socket = null, isBinaryMode = !0, currentMode = "local", currentToken, currentAddr = "", retryCount = 0, authRetryCount = 0, isAuthReported = !1;
5425
5425
  const activePorts = /* @__PURE__ */ new Set(), subscriptions = /* @__PURE__ */ new Map();
5426
5426
  let processingQueue = Promise.resolve();
5427
- function broadcast(u) {
5427
+ function broadcast(a) {
5428
5428
  for (const f of activePorts)
5429
- f.postMessage(u);
5429
+ f.postMessage(a);
5430
5430
  }
5431
5431
  function sendAuth() {
5432
5432
  currentMode === "remote" && currentToken && (socket == null ? void 0 : socket.readyState) === WebSocket.OPEN && (broadcast({ type: "STATUS_UPDATE", auth: AuthStatus.AUTHENTICATING }), socket.send(JSON.stringify({ token: currentToken })));
@@ -5438,16 +5438,17 @@ function sendSubscriptions() {
5438
5438
  })
5439
5439
  );
5440
5440
  }
5441
+ function stopSocket() {
5442
+ socket && (socket.onopen = null, socket.onmessage = null, socket.onerror = null, socket.onclose = null, socket.close(), socket = null);
5443
+ }
5441
5444
  function stopAndCleanup() {
5442
- socket && (socket.close(), socket = null), stabilityTimeout && (clearTimeout(stabilityTimeout), stabilityTimeout = void 0), subscriptions.clear(), activePorts.clear(), retryCount = 0, authRetryCount = 0, isAuthReported = !1;
5445
+ stopSocket(), subscriptions.clear(), activePorts.clear(), retryCount = 0, authRetryCount = 0, isAuthReported = !1;
5443
5446
  }
5444
- function connect(u, f, h = !0, c = "local") {
5445
- socket && socket.close(), broadcast({ type: "STATUS_UPDATE", connection: ConnectionStatus.CONNECTING }), currentAddr = u, isBinaryMode = h, currentMode = c, currentToken = f, isAuthReported = !1;
5446
- const d = new URL(u);
5447
+ function connect(a, f, h = !0, c = "local") {
5448
+ stopSocket(), broadcast({ type: "STATUS_UPDATE", connection: ConnectionStatus.CONNECTING }), currentAddr = a, isBinaryMode = h, currentMode = c, currentToken = f, isAuthReported = !1;
5449
+ const d = new URL(a);
5447
5450
  socket = new WebSocket(d.toString()), socket.binaryType = "arraybuffer", socket.onopen = () => {
5448
- broadcast({ type: "CONNECTED" }), currentMode === "local" && (socket == null || socket.send(JSON.stringify({ enable: !0 }))), sendAuth(), stabilityTimeout && clearTimeout(stabilityTimeout), stabilityTimeout = setTimeout(() => {
5449
- retryCount = 0, authRetryCount = 0, console.log("[Worker] Connection stable. All retry counters reset.");
5450
- }, 5e3), currentMode === "remote" && subscriptions.size > 0 && sendSubscriptions(), currentMode === "local" && broadcast({ type: "STATUS_UPDATE", auth: AuthStatus.AUTHENTICATED });
5451
+ broadcast({ type: "CONNECTED" }), currentMode === "local" && (socket == null || socket.send(JSON.stringify({ enable: !0 }))), sendAuth(), retryCount = 0, authRetryCount = 0, console.log("[Worker] Connection stable. All retry counters reset."), currentMode === "remote" && subscriptions.size > 0 && sendSubscriptions(), currentMode === "local" && broadcast({ type: "STATUS_UPDATE", auth: AuthStatus.AUTHENTICATED });
5451
5452
  }, socket.onmessage = (n) => {
5452
5453
  processingQueue = processingQueue.then(async () => {
5453
5454
  try {
@@ -5466,19 +5467,19 @@ function connect(u, f, h = !0, c = "local") {
5466
5467
  defaults: !0
5467
5468
  });
5468
5469
  if (l.error) {
5469
- const { cause: s, severity: a } = l.error;
5470
- if (s != null && a != null) {
5471
- const o = root.lookupEnum("BSB_Error.Cause"), p = root.lookupEnum("BSB_Error.Severity"), y = o.valuesById[s] || "UNKNOWN", E = p.valuesById[a] || "UNKNOWN";
5470
+ const { cause: s, severity: u } = l.error;
5471
+ if (s != null && u != null) {
5472
+ const o = root.lookupEnum("BSB_Error.Cause"), p = root.lookupEnum("BSB_Error.Severity"), y = o.valuesById[s] || "UNKNOWN", E = p.valuesById[u] || "UNKNOWN";
5472
5473
  if (broadcast({
5473
5474
  type: "ERROR",
5474
5475
  code: StateStreamErrorCode.DEVICE_ERROR,
5475
5476
  message: \`Server reported \${E}: \${y}\`,
5476
5477
  data: l.error
5477
- }), a === p.values.FATAL) {
5478
+ }), u === p.values.FATAL) {
5478
5479
  stopAndCleanup();
5479
5480
  return;
5480
5481
  }
5481
- if (a === p.values.ERROR)
5482
+ if (u === p.values.ERROR)
5482
5483
  return;
5483
5484
  } else
5484
5485
  broadcast({
@@ -5490,17 +5491,17 @@ function connect(u, f, h = !0, c = "local") {
5490
5491
  }
5491
5492
  if (l.updates)
5492
5493
  for (const s of l.updates) {
5493
- const a = s.frame;
5494
- if (a && a.data)
5494
+ const u = s.frame;
5495
+ if (u && u.data)
5495
5496
  try {
5496
- const o = await processFrame(a);
5497
- o && (a.data = o);
5497
+ const o = await processFrame(u);
5498
+ o && (u.data = o);
5498
5499
  } catch (o) {
5499
5500
  broadcast({
5500
5501
  type: "ERROR",
5501
5502
  code: StateStreamErrorCode.FRAME_PROCESS_ERROR,
5502
5503
  message: o instanceof Error ? o.message : String(o),
5503
- data: a.data
5504
+ data: u.data
5504
5505
  });
5505
5506
  }
5506
5507
  }
@@ -5521,7 +5522,7 @@ function connect(u, f, h = !0, c = "local") {
5521
5522
  }, socket.onerror = () => {
5522
5523
  broadcast({ type: "ERROR", code: StateStreamErrorCode.CONNECTION_FAILED, message: "WebSocket connection error" });
5523
5524
  }, socket.onclose = (n) => {
5524
- if (console.log("[Worker] Socket closed:", n), stabilityTimeout && (clearTimeout(stabilityTimeout), stabilityTimeout = void 0), !socket || activePorts.size === 0) {
5525
+ if (console.log("[Worker] Socket closed:", n), !socket || activePorts.size === 0) {
5525
5526
  console.log("[Worker] Connection closed or no active ports. No retries.");
5526
5527
  return;
5527
5528
  }
@@ -5533,11 +5534,11 @@ function connect(u, f, h = !0, c = "local") {
5533
5534
  }));
5534
5535
  return;
5535
5536
  }
5536
- if (RECONNECT_CODES.has(n.code)) {
5537
+ if (n.code !== 1e3) {
5537
5538
  if (retryCount < maxReconnectAttempts) {
5538
5539
  retryCount++;
5539
- const e = Math.min(1e3 * retryCount, 5e3);
5540
- console.log(\`[Worker] Reconnecting (network code: \${n.code}) in \${e}ms... (Attempt \${retryCount}/\${maxReconnectAttempts})\`), broadcast({ type: "STATUS_UPDATE", connection: ConnectionStatus.RECONNECTING, connectionAttempts: retryCount }), setTimeout(() => {
5540
+ let e = Math.min(1e3 * retryCount, 5e3);
5541
+ reconnectDelay && (e = reconnectDelay), console.log(\`[Worker] Reconnecting (network code: \${n.code}) in \${e}ms... (Attempt \${retryCount}/\${maxReconnectAttempts})\`), broadcast({ type: "STATUS_UPDATE", connection: ConnectionStatus.RECONNECTING, connectionAttempts: retryCount }), setTimeout(() => {
5541
5542
  activePorts.size > 0 && socket && connect(currentAddr, currentToken, isBinaryMode, currentMode);
5542
5543
  }, e);
5543
5544
  } else
@@ -5555,10 +5556,10 @@ function connect(u, f, h = !0, c = "local") {
5555
5556
  });
5556
5557
  };
5557
5558
  }
5558
- function handleCommand(u, f) {
5559
- switch (u.type) {
5559
+ function handleCommand(a, f) {
5560
+ switch (a.type) {
5560
5561
  case "START":
5561
- maxAuthAttempts = u.maxAuthAttempts ?? DEFAULT_MAX_AUTH_ATTEMPTS, maxReconnectAttempts = u.maxReconnectAttempts ?? DEFAULT_MAX_RECONNECT_ATTEMPTS, activePorts.add(f), socket && socket.readyState === WebSocket.OPEN && currentAddr === u.addr ? (f.postMessage({ type: "CONNECTED" }), f.postMessage({ type: "STATUS_UPDATE", auth: AuthStatus.AUTHENTICATED })) : connect(u.addr, u.token, u.isBinary, u.mode);
5562
+ maxAuthAttempts = a.maxAuthAttempts ?? DEFAULT_MAX_AUTH_ATTEMPTS, maxReconnectAttempts = a.maxReconnectAttempts ?? DEFAULT_MAX_RECONNECT_ATTEMPTS, reconnectDelay = a.reconnectDelay ?? DEFAULT_DELAY_RECONNECT, activePorts.add(f), socket && socket.readyState === WebSocket.OPEN && currentAddr === a.addr ? (f.postMessage({ type: "CONNECTED" }), f.postMessage({ type: "STATUS_UPDATE", auth: AuthStatus.AUTHENTICATED })) : connect(a.addr, a.token, a.isBinary, a.mode);
5562
5563
  break;
5563
5564
  case "STOP":
5564
5565
  activePorts.delete(f);
@@ -5568,39 +5569,39 @@ function handleCommand(u, f) {
5568
5569
  break;
5569
5570
  case "UPDATE_TOKEN":
5570
5571
  const h = currentToken;
5571
- if (currentToken = u.token, currentMode === "remote") {
5572
+ if (currentToken = a.token, currentMode === "remote") {
5572
5573
  const e = socket && socket.readyState === WebSocket.OPEN;
5573
- if (e && h === u.token)
5574
+ if (e && h === a.token)
5574
5575
  return;
5575
- e ? sendAuth() : h !== u.token && currentAddr && activePorts.size > 0 && connect(currentAddr, currentToken, isBinaryMode, currentMode);
5576
+ e ? sendAuth() : h !== a.token && currentAddr && activePorts.size > 0 && connect(currentAddr, currentToken, isBinaryMode, currentMode);
5576
5577
  }
5577
5578
  break;
5578
5579
  case "SUBSCRIBE":
5579
- let c = subscriptions.get(u.guid);
5580
- c || (c = /* @__PURE__ */ new Set(), subscriptions.set(u.guid, c));
5580
+ let c = subscriptions.get(a.guid);
5581
+ c || (c = /* @__PURE__ */ new Set(), subscriptions.set(a.guid, c));
5581
5582
  const d = c.size === 0;
5582
- c.add(f), d && (socket == null ? void 0 : socket.readyState) === WebSocket.OPEN && currentMode === "remote" && socket.send(JSON.stringify({ subscribe: [u.guid] }));
5583
+ c.add(f), d && (socket == null ? void 0 : socket.readyState) === WebSocket.OPEN && currentMode === "remote" && socket.send(JSON.stringify({ subscribe: [a.guid] }));
5583
5584
  break;
5584
5585
  case "UNSUBSCRIBE":
5585
- const n = subscriptions.get(u.guid);
5586
- n && (n.delete(f), n.size === 0 && (subscriptions.delete(u.guid), (socket == null ? void 0 : socket.readyState) === WebSocket.OPEN && currentMode === "remote" && socket.send(JSON.stringify({ unsubscribe: [u.guid] }))));
5586
+ const n = subscriptions.get(a.guid);
5587
+ n && (n.delete(f), n.size === 0 && (subscriptions.delete(a.guid), (socket == null ? void 0 : socket.readyState) === WebSocket.OPEN && currentMode === "remote" && socket.send(JSON.stringify({ unsubscribe: [a.guid] }))));
5587
5588
  break;
5588
5589
  }
5589
5590
  }
5590
5591
  if ("SharedWorkerGlobalScope" in self) {
5591
- const u = self;
5592
- u.onconnect = (f) => {
5592
+ const a = self;
5593
+ a.onconnect = (f) => {
5593
5594
  const h = f.ports[0];
5594
5595
  h && (h.onmessage = (c) => handleCommand(c.data, h), h.start());
5595
5596
  };
5596
5597
  } else {
5597
- const u = self;
5598
- u.onmessage = (f) => {
5599
- handleCommand(f.data, u);
5598
+ const a = self;
5599
+ a.onmessage = (f) => {
5600
+ handleCommand(f.data, a);
5600
5601
  };
5601
5602
  }
5602
5603
  `, S = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", x], { type: "text/javascript;charset=utf-8" });
5603
- function be(e) {
5604
+ function Ee(e) {
5604
5605
  let n;
5605
5606
  try {
5606
5607
  if (n = S && (self.URL || self.webkitURL).createObjectURL(S), !n) throw "";
@@ -5621,11 +5622,11 @@ function be(e) {
5621
5622
  );
5622
5623
  }
5623
5624
  }
5624
- const Ee = `var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, src = { exports: {} }, indexLight = { exports: {} }, indexMinimal = {}, minimal = {}, aspromise, hasRequiredAspromise;
5625
+ const _e = `var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, src = { exports: {} }, indexLight = { exports: {} }, indexMinimal = {}, minimal = {}, aspromise, hasRequiredAspromise;
5625
5626
  function requireAspromise() {
5626
5627
  if (hasRequiredAspromise) return aspromise;
5627
- hasRequiredAspromise = 1, aspromise = u;
5628
- function u(f, h) {
5628
+ hasRequiredAspromise = 1, aspromise = a;
5629
+ function a(f, h) {
5629
5630
  for (var c = new Array(arguments.length - 1), d = 0, n = 2, e = !0; n < arguments.length; )
5630
5631
  c[d++] = arguments[n++];
5631
5632
  return new Promise(function(i, t) {
@@ -5634,9 +5635,9 @@ function requireAspromise() {
5634
5635
  if (e = !1, s)
5635
5636
  t(s);
5636
5637
  else {
5637
- for (var a = new Array(arguments.length - 1), o = 0; o < a.length; )
5638
- a[o++] = arguments[o];
5639
- i.apply(null, a);
5638
+ for (var u = new Array(arguments.length - 1), o = 0; o < u.length; )
5639
+ u[o++] = arguments[o];
5640
+ i.apply(null, u);
5640
5641
  }
5641
5642
  };
5642
5643
  try {
@@ -5650,8 +5651,8 @@ function requireAspromise() {
5650
5651
  }
5651
5652
  var base64 = {}, hasRequiredBase64;
5652
5653
  function requireBase64() {
5653
- return hasRequiredBase64 || (hasRequiredBase64 = 1, function(u) {
5654
- var f = u;
5654
+ return hasRequiredBase64 || (hasRequiredBase64 = 1, function(a) {
5655
+ var f = a;
5655
5656
  f.length = function(r) {
5656
5657
  var i = r.length;
5657
5658
  if (!i)
@@ -5663,26 +5664,26 @@ function requireBase64() {
5663
5664
  for (var h = new Array(64), c = new Array(123), d = 0; d < 64; )
5664
5665
  c[h[d] = d < 26 ? d + 65 : d < 52 ? d + 71 : d < 62 ? d - 4 : d - 59 | 43] = d++;
5665
5666
  f.encode = function(r, i, t) {
5666
- for (var l = null, s = [], a = 0, o = 0, p; i < t; ) {
5667
+ for (var l = null, s = [], u = 0, o = 0, p; i < t; ) {
5667
5668
  var y = r[i++];
5668
5669
  switch (o) {
5669
5670
  case 0:
5670
- s[a++] = h[y >> 2], p = (y & 3) << 4, o = 1;
5671
+ s[u++] = h[y >> 2], p = (y & 3) << 4, o = 1;
5671
5672
  break;
5672
5673
  case 1:
5673
- s[a++] = h[p | y >> 4], p = (y & 15) << 2, o = 2;
5674
+ s[u++] = h[p | y >> 4], p = (y & 15) << 2, o = 2;
5674
5675
  break;
5675
5676
  case 2:
5676
- s[a++] = h[p | y >> 6], s[a++] = h[y & 63], o = 0;
5677
+ s[u++] = h[p | y >> 6], s[u++] = h[y & 63], o = 0;
5677
5678
  break;
5678
5679
  }
5679
- a > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, s)), a = 0);
5680
+ u > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, s)), u = 0);
5680
5681
  }
5681
- return o && (s[a++] = h[p], s[a++] = 61, o === 1 && (s[a++] = 61)), l ? (a && l.push(String.fromCharCode.apply(String, s.slice(0, a))), l.join("")) : String.fromCharCode.apply(String, s.slice(0, a));
5682
+ return o && (s[u++] = h[p], s[u++] = 61, o === 1 && (s[u++] = 61)), l ? (u && l.push(String.fromCharCode.apply(String, s.slice(0, u))), l.join("")) : String.fromCharCode.apply(String, s.slice(0, u));
5682
5683
  };
5683
5684
  var n = "invalid encoding";
5684
5685
  f.decode = function(r, i, t) {
5685
- for (var l = t, s = 0, a, o = 0; o < r.length; ) {
5686
+ for (var l = t, s = 0, u, o = 0; o < r.length; ) {
5686
5687
  var p = r.charCodeAt(o++);
5687
5688
  if (p === 61 && s > 1)
5688
5689
  break;
@@ -5690,16 +5691,16 @@ function requireBase64() {
5690
5691
  throw Error(n);
5691
5692
  switch (s) {
5692
5693
  case 0:
5693
- a = p, s = 1;
5694
+ u = p, s = 1;
5694
5695
  break;
5695
5696
  case 1:
5696
- i[t++] = a << 2 | (p & 48) >> 4, a = p, s = 2;
5697
+ i[t++] = u << 2 | (p & 48) >> 4, u = p, s = 2;
5697
5698
  break;
5698
5699
  case 2:
5699
- i[t++] = (a & 15) << 4 | (p & 60) >> 2, a = p, s = 3;
5700
+ i[t++] = (u & 15) << 4 | (p & 60) >> 2, u = p, s = 3;
5700
5701
  break;
5701
5702
  case 3:
5702
- i[t++] = (a & 3) << 6 | p, s = 0;
5703
+ i[t++] = (u & 3) << 6 | p, s = 0;
5703
5704
  break;
5704
5705
  }
5705
5706
  }
@@ -5714,16 +5715,16 @@ function requireBase64() {
5714
5715
  var eventemitter, hasRequiredEventemitter;
5715
5716
  function requireEventemitter() {
5716
5717
  if (hasRequiredEventemitter) return eventemitter;
5717
- hasRequiredEventemitter = 1, eventemitter = u;
5718
- function u() {
5718
+ hasRequiredEventemitter = 1, eventemitter = a;
5719
+ function a() {
5719
5720
  this._listeners = {};
5720
5721
  }
5721
- return u.prototype.on = function(h, c, d) {
5722
+ return a.prototype.on = function(h, c, d) {
5722
5723
  return (this._listeners[h] || (this._listeners[h] = [])).push({
5723
5724
  fn: c,
5724
5725
  ctx: d || this
5725
5726
  }), this;
5726
- }, u.prototype.off = function(h, c) {
5727
+ }, a.prototype.off = function(h, c) {
5727
5728
  if (h === void 0)
5728
5729
  this._listeners = {};
5729
5730
  else if (c === void 0)
@@ -5732,7 +5733,7 @@ function requireEventemitter() {
5732
5733
  for (var d = this._listeners[h], n = 0; n < d.length; )
5733
5734
  d[n].fn === c ? d.splice(n, 1) : ++n;
5734
5735
  return this;
5735
- }, u.prototype.emit = function(h) {
5736
+ }, a.prototype.emit = function(h) {
5736
5737
  var c = this._listeners[h];
5737
5738
  if (c) {
5738
5739
  for (var d = [], n = 1; n < arguments.length; )
@@ -5746,8 +5747,8 @@ function requireEventemitter() {
5746
5747
  var float, hasRequiredFloat;
5747
5748
  function requireFloat() {
5748
5749
  if (hasRequiredFloat) return float;
5749
- hasRequiredFloat = 1, float = u(u);
5750
- function u(n) {
5750
+ hasRequiredFloat = 1, float = a(a);
5751
+ function a(n) {
5751
5752
  return typeof Float32Array < "u" ? function() {
5752
5753
  var e = new Float32Array([-0]), r = new Uint8Array(e.buffer), i = r[3] === 128;
5753
5754
  function t(o, p, y) {
@@ -5760,14 +5761,14 @@ function requireFloat() {
5760
5761
  function s(o, p) {
5761
5762
  return r[0] = o[p], r[1] = o[p + 1], r[2] = o[p + 2], r[3] = o[p + 3], e[0];
5762
5763
  }
5763
- function a(o, p) {
5764
+ function u(o, p) {
5764
5765
  return r[3] = o[p], r[2] = o[p + 1], r[1] = o[p + 2], r[0] = o[p + 3], e[0];
5765
5766
  }
5766
- n.readFloatLE = i ? s : a, n.readFloatBE = i ? a : s;
5767
+ n.readFloatLE = i ? s : u, n.readFloatBE = i ? u : s;
5767
5768
  }() : function() {
5768
5769
  function e(i, t, l, s) {
5769
- var a = t < 0 ? 1 : 0;
5770
- if (a && (t = -t), t === 0)
5770
+ var u = t < 0 ? 1 : 0;
5771
+ if (u && (t = -t), t === 0)
5771
5772
  i(1 / t > 0 ? (
5772
5773
  /* positive */
5773
5774
  0
@@ -5778,18 +5779,18 @@ function requireFloat() {
5778
5779
  else if (isNaN(t))
5779
5780
  i(2143289344, l, s);
5780
5781
  else if (t > 34028234663852886e22)
5781
- i((a << 31 | 2139095040) >>> 0, l, s);
5782
+ i((u << 31 | 2139095040) >>> 0, l, s);
5782
5783
  else if (t < 11754943508222875e-54)
5783
- i((a << 31 | Math.round(t / 1401298464324817e-60)) >>> 0, l, s);
5784
+ i((u << 31 | Math.round(t / 1401298464324817e-60)) >>> 0, l, s);
5784
5785
  else {
5785
5786
  var o = Math.floor(Math.log(t) / Math.LN2), p = Math.round(t * Math.pow(2, -o) * 8388608) & 8388607;
5786
- i((a << 31 | o + 127 << 23 | p) >>> 0, l, s);
5787
+ i((u << 31 | o + 127 << 23 | p) >>> 0, l, s);
5787
5788
  }
5788
5789
  }
5789
5790
  n.writeFloatLE = e.bind(null, f), n.writeFloatBE = e.bind(null, h);
5790
5791
  function r(i, t, l) {
5791
- var s = i(t, l), a = (s >> 31) * 2 + 1, o = s >>> 23 & 255, p = s & 8388607;
5792
- return o === 255 ? p ? NaN : a * (1 / 0) : o === 0 ? a * 1401298464324817e-60 * p : a * Math.pow(2, o - 150) * (p + 8388608);
5792
+ var s = i(t, l), u = (s >> 31) * 2 + 1, o = s >>> 23 & 255, p = s & 8388607;
5793
+ return o === 255 ? p ? NaN : u * (1 / 0) : o === 0 ? u * 1401298464324817e-60 * p : u * Math.pow(2, o - 150) * (p + 8388608);
5793
5794
  }
5794
5795
  n.readFloatLE = r.bind(null, c), n.readFloatBE = r.bind(null, d);
5795
5796
  }(), typeof Float64Array < "u" ? function() {
@@ -5804,38 +5805,38 @@ function requireFloat() {
5804
5805
  function s(o, p) {
5805
5806
  return r[0] = o[p], r[1] = o[p + 1], r[2] = o[p + 2], r[3] = o[p + 3], r[4] = o[p + 4], r[5] = o[p + 5], r[6] = o[p + 6], r[7] = o[p + 7], e[0];
5806
5807
  }
5807
- function a(o, p) {
5808
+ function u(o, p) {
5808
5809
  return r[7] = o[p], r[6] = o[p + 1], r[5] = o[p + 2], r[4] = o[p + 3], r[3] = o[p + 4], r[2] = o[p + 5], r[1] = o[p + 6], r[0] = o[p + 7], e[0];
5809
5810
  }
5810
- n.readDoubleLE = i ? s : a, n.readDoubleBE = i ? a : s;
5811
+ n.readDoubleLE = i ? s : u, n.readDoubleBE = i ? u : s;
5811
5812
  }() : function() {
5812
- function e(i, t, l, s, a, o) {
5813
+ function e(i, t, l, s, u, o) {
5813
5814
  var p = s < 0 ? 1 : 0;
5814
5815
  if (p && (s = -s), s === 0)
5815
- i(0, a, o + t), i(1 / s > 0 ? (
5816
+ i(0, u, o + t), i(1 / s > 0 ? (
5816
5817
  /* positive */
5817
5818
  0
5818
5819
  ) : (
5819
5820
  /* negative 0 */
5820
5821
  2147483648
5821
- ), a, o + l);
5822
+ ), u, o + l);
5822
5823
  else if (isNaN(s))
5823
- i(0, a, o + t), i(2146959360, a, o + l);
5824
+ i(0, u, o + t), i(2146959360, u, o + l);
5824
5825
  else if (s > 17976931348623157e292)
5825
- i(0, a, o + t), i((p << 31 | 2146435072) >>> 0, a, o + l);
5826
+ i(0, u, o + t), i((p << 31 | 2146435072) >>> 0, u, o + l);
5826
5827
  else {
5827
5828
  var y;
5828
5829
  if (s < 22250738585072014e-324)
5829
- y = s / 5e-324, i(y >>> 0, a, o + t), i((p << 31 | y / 4294967296) >>> 0, a, o + l);
5830
+ y = s / 5e-324, i(y >>> 0, u, o + t), i((p << 31 | y / 4294967296) >>> 0, u, o + l);
5830
5831
  else {
5831
5832
  var E = Math.floor(Math.log(s) / Math.LN2);
5832
- E === 1024 && (E = 1023), y = s * Math.pow(2, -E), i(y * 4503599627370496 >>> 0, a, o + t), i((p << 31 | E + 1023 << 20 | y * 1048576 & 1048575) >>> 0, a, o + l);
5833
+ E === 1024 && (E = 1023), y = s * Math.pow(2, -E), i(y * 4503599627370496 >>> 0, u, o + t), i((p << 31 | E + 1023 << 20 | y * 1048576 & 1048575) >>> 0, u, o + l);
5833
5834
  }
5834
5835
  }
5835
5836
  }
5836
5837
  n.writeDoubleLE = e.bind(null, f, 0, 4), n.writeDoubleBE = e.bind(null, h, 4, 0);
5837
- function r(i, t, l, s, a) {
5838
- var o = i(s, a + t), p = i(s, a + l), y = (p >> 31) * 2 + 1, E = p >>> 20 & 2047, v = 4294967296 * (p & 1048575) + o;
5838
+ function r(i, t, l, s, u) {
5839
+ var o = i(s, u + t), p = i(s, u + l), y = (p >> 31) * 2 + 1, E = p >>> 20 & 2047, v = 4294967296 * (p & 1048575) + o;
5839
5840
  return E === 2047 ? v ? NaN : y * (1 / 0) : E === 0 ? y * 5e-324 * v : y * Math.pow(2, E - 1075) * (v + 4503599627370496);
5840
5841
  }
5841
5842
  n.readDoubleLE = r.bind(null, c, 0, 4), n.readDoubleBE = r.bind(null, d, 4, 0);
@@ -5864,7 +5865,7 @@ function requireInquire() {
5864
5865
  var mod = eval("quire".replace(/^/, "re"))(moduleName);
5865
5866
  if (mod && (mod.length || Object.keys(mod).length))
5866
5867
  return mod;
5867
- } catch (u) {
5868
+ } catch (a) {
5868
5869
  }
5869
5870
  return null;
5870
5871
  }
@@ -5872,8 +5873,8 @@ function requireInquire() {
5872
5873
  }
5873
5874
  var utf8 = {}, hasRequiredUtf8;
5874
5875
  function requireUtf8() {
5875
- return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(u) {
5876
- var f = u;
5876
+ return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(a) {
5877
+ var f = a;
5877
5878
  f.length = function(c) {
5878
5879
  for (var d = 0, n = 0, e = 0; e < c.length; ++e)
5879
5880
  n = c.charCodeAt(e), n < 128 ? d += 1 : n < 2048 ? d += 2 : (n & 64512) === 55296 && (c.charCodeAt(e + 1) & 64512) === 56320 ? (++e, d += 4) : d += 3;
@@ -5895,8 +5896,8 @@ function requireUtf8() {
5895
5896
  var pool_1, hasRequiredPool;
5896
5897
  function requirePool() {
5897
5898
  if (hasRequiredPool) return pool_1;
5898
- hasRequiredPool = 1, pool_1 = u;
5899
- function u(f, h, c) {
5899
+ hasRequiredPool = 1, pool_1 = a;
5900
+ function a(f, h, c) {
5900
5901
  var d = c || 8192, n = d >>> 1, e = null, r = d;
5901
5902
  return function(t) {
5902
5903
  if (t < 1 || t > n)
@@ -5912,7 +5913,7 @@ var longbits, hasRequiredLongbits;
5912
5913
  function requireLongbits() {
5913
5914
  if (hasRequiredLongbits) return longbits;
5914
5915
  hasRequiredLongbits = 1, longbits = f;
5915
- var u = requireMinimal();
5916
+ var a = requireMinimal();
5916
5917
  function f(n, e) {
5917
5918
  this.lo = n >>> 0, this.hi = e >>> 0;
5918
5919
  }
@@ -5935,9 +5936,9 @@ function requireLongbits() {
5935
5936
  }, f.from = function(e) {
5936
5937
  if (typeof e == "number")
5937
5938
  return f.fromNumber(e);
5938
- if (u.isString(e))
5939
- if (u.Long)
5940
- e = u.Long.fromString(e);
5939
+ if (a.isString(e))
5940
+ if (a.Long)
5941
+ e = a.Long.fromString(e);
5941
5942
  else
5942
5943
  return f.fromNumber(parseInt(e, 10));
5943
5944
  return e.low || e.high ? new f(e.low >>> 0, e.high >>> 0) : h;
@@ -5948,7 +5949,7 @@ function requireLongbits() {
5948
5949
  }
5949
5950
  return this.lo + this.hi * 4294967296;
5950
5951
  }, f.prototype.toLong = function(e) {
5951
- return u.Long ? new u.Long(this.lo | 0, this.hi | 0, !!e) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!e };
5952
+ return a.Long ? new a.Long(this.lo | 0, this.hi | 0, !!e) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!e };
5952
5953
  };
5953
5954
  var d = String.prototype.charCodeAt;
5954
5955
  return f.fromHash = function(e) {
@@ -5980,8 +5981,8 @@ function requireLongbits() {
5980
5981
  }
5981
5982
  var hasRequiredMinimal;
5982
5983
  function requireMinimal() {
5983
- return hasRequiredMinimal || (hasRequiredMinimal = 1, function(u) {
5984
- var f = u;
5984
+ return hasRequiredMinimal || (hasRequiredMinimal = 1, function(a) {
5985
+ var f = a;
5985
5986
  f.asPromise = requireAspromise(), f.base64 = requireBase64(), f.EventEmitter = requireEventemitter(), f.float = requireFloat(), f.inquire = requireInquire(), f.utf8 = requireUtf8(), f.pool = requirePool(), f.LongBits = requireLongbits(), f.isNode = !!(typeof commonjsGlobal < "u" && commonjsGlobal && commonjsGlobal.process && commonjsGlobal.process.versions && commonjsGlobal.process.versions.node), f.global = f.isNode && commonjsGlobal || typeof window < "u" && window || typeof self < "u" && self || minimal, f.emptyArray = Object.freeze ? Object.freeze([]) : (
5986
5987
  /* istanbul ignore next */
5987
5988
  []
@@ -6108,7 +6109,7 @@ var writer, hasRequiredWriter;
6108
6109
  function requireWriter() {
6109
6110
  if (hasRequiredWriter) return writer;
6110
6111
  hasRequiredWriter = 1, writer = i;
6111
- var u = requireMinimal(), f, h = u.LongBits, c = u.base64, d = u.utf8;
6112
+ var a = requireMinimal(), f, h = a.LongBits, c = a.base64, d = a.utf8;
6112
6113
  function n(E, v, m) {
6113
6114
  this.fn = E, this.len = v, this.next = void 0, this.val = m;
6114
6115
  }
@@ -6121,7 +6122,7 @@ function requireWriter() {
6121
6122
  this.len = 0, this.head = new n(e, 0, 0), this.tail = this.head, this.states = null;
6122
6123
  }
6123
6124
  var t = function() {
6124
- return u.Buffer ? function() {
6125
+ return a.Buffer ? function() {
6125
6126
  return (i.create = function() {
6126
6127
  return new f();
6127
6128
  })();
@@ -6130,8 +6131,8 @@ function requireWriter() {
6130
6131
  };
6131
6132
  };
6132
6133
  i.create = t(), i.alloc = function(v) {
6133
- return new u.Array(v);
6134
- }, u.Array !== Array && (i.alloc = u.pool(i.alloc, u.Array.prototype.subarray)), i.prototype._push = function(v, m, _) {
6134
+ return new a.Array(v);
6135
+ }, a.Array !== Array && (i.alloc = a.pool(i.alloc, a.Array.prototype.subarray)), i.prototype._push = function(v, m, _) {
6135
6136
  return this.tail = this.tail.next = new n(v, m, _), this.len += m, this;
6136
6137
  };
6137
6138
  function l(E, v, m) {
@@ -6142,11 +6143,11 @@ function requireWriter() {
6142
6143
  v[m++] = E & 127 | 128, E >>>= 7;
6143
6144
  v[m] = E;
6144
6145
  }
6145
- function a(E, v) {
6146
+ function u(E, v) {
6146
6147
  this.len = E, this.next = void 0, this.val = v;
6147
6148
  }
6148
- a.prototype = Object.create(n.prototype), a.prototype.fn = s, i.prototype.uint32 = function(v) {
6149
- return this.len += (this.tail = this.tail.next = new a(
6149
+ u.prototype = Object.create(n.prototype), u.prototype.fn = s, i.prototype.uint32 = function(v) {
6150
+ return this.len += (this.tail = this.tail.next = new u(
6150
6151
  (v = v >>> 0) < 128 ? 1 : v < 16384 ? 2 : v < 2097152 ? 3 : v < 268435456 ? 4 : 5,
6151
6152
  v
6152
6153
  )).len, this;
@@ -6180,11 +6181,11 @@ function requireWriter() {
6180
6181
  var m = h.from(v);
6181
6182
  return this._push(p, 4, m.lo)._push(p, 4, m.hi);
6182
6183
  }, i.prototype.sfixed64 = i.prototype.fixed64, i.prototype.float = function(v) {
6183
- return this._push(u.float.writeFloatLE, 4, v);
6184
+ return this._push(a.float.writeFloatLE, 4, v);
6184
6185
  }, i.prototype.double = function(v) {
6185
- return this._push(u.float.writeDoubleLE, 8, v);
6186
+ return this._push(a.float.writeDoubleLE, 8, v);
6186
6187
  };
6187
- var y = u.Array.prototype.set ? function(v, m, _) {
6188
+ var y = a.Array.prototype.set ? function(v, m, _) {
6188
6189
  m.set(v, _);
6189
6190
  } : function(v, m, _) {
6190
6191
  for (var A = 0; A < v.length; ++A)
@@ -6194,7 +6195,7 @@ function requireWriter() {
6194
6195
  var m = v.length >>> 0;
6195
6196
  if (!m)
6196
6197
  return this._push(l, 1, 0);
6197
- if (u.isString(v)) {
6198
+ if (a.isString(v)) {
6198
6199
  var _ = i.alloc(m = c.length(v));
6199
6200
  c.decode(v, _, 0), v = _;
6200
6201
  }
@@ -6221,11 +6222,11 @@ var writer_buffer, hasRequiredWriter_buffer;
6221
6222
  function requireWriter_buffer() {
6222
6223
  if (hasRequiredWriter_buffer) return writer_buffer;
6223
6224
  hasRequiredWriter_buffer = 1, writer_buffer = h;
6224
- var u = requireWriter();
6225
- (h.prototype = Object.create(u.prototype)).constructor = h;
6225
+ var a = requireWriter();
6226
+ (h.prototype = Object.create(a.prototype)).constructor = h;
6226
6227
  var f = requireMinimal();
6227
6228
  function h() {
6228
- u.call(this);
6229
+ a.call(this);
6229
6230
  }
6230
6231
  h._configure = function() {
6231
6232
  h.alloc = f._Buffer_allocUnsafe, h.writeBytesBuffer = f.Buffer && f.Buffer.prototype instanceof Uint8Array && f.Buffer.prototype.set.name === "set" ? function(n, e, r) {
@@ -6253,70 +6254,70 @@ var reader, hasRequiredReader;
6253
6254
  function requireReader() {
6254
6255
  if (hasRequiredReader) return reader;
6255
6256
  hasRequiredReader = 1, reader = n;
6256
- var u = requireMinimal(), f, h = u.LongBits, c = u.utf8;
6257
- function d(s, a) {
6258
- return RangeError("index out of range: " + s.pos + " + " + (a || 1) + " > " + s.len);
6257
+ var a = requireMinimal(), f, h = a.LongBits, c = a.utf8;
6258
+ function d(s, u) {
6259
+ return RangeError("index out of range: " + s.pos + " + " + (u || 1) + " > " + s.len);
6259
6260
  }
6260
6261
  function n(s) {
6261
6262
  this.buf = s, this.pos = 0, this.len = s.length;
6262
6263
  }
6263
- var e = typeof Uint8Array < "u" ? function(a) {
6264
- if (a instanceof Uint8Array || Array.isArray(a))
6265
- return new n(a);
6264
+ var e = typeof Uint8Array < "u" ? function(u) {
6265
+ if (u instanceof Uint8Array || Array.isArray(u))
6266
+ return new n(u);
6266
6267
  throw Error("illegal buffer");
6267
- } : function(a) {
6268
- if (Array.isArray(a))
6269
- return new n(a);
6268
+ } : function(u) {
6269
+ if (Array.isArray(u))
6270
+ return new n(u);
6270
6271
  throw Error("illegal buffer");
6271
6272
  }, r = function() {
6272
- return u.Buffer ? function(o) {
6273
+ return a.Buffer ? function(o) {
6273
6274
  return (n.create = function(y) {
6274
- return u.Buffer.isBuffer(y) ? new f(y) : e(y);
6275
+ return a.Buffer.isBuffer(y) ? new f(y) : e(y);
6275
6276
  })(o);
6276
6277
  } : e;
6277
6278
  };
6278
- n.create = r(), n.prototype._slice = u.Array.prototype.subarray || /* istanbul ignore next */
6279
- u.Array.prototype.slice, n.prototype.uint32 = /* @__PURE__ */ function() {
6280
- var a = 4294967295;
6279
+ n.create = r(), n.prototype._slice = a.Array.prototype.subarray || /* istanbul ignore next */
6280
+ a.Array.prototype.slice, n.prototype.uint32 = /* @__PURE__ */ function() {
6281
+ var u = 4294967295;
6281
6282
  return function() {
6282
- if (a = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (a = (a | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (a = (a | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (a = (a | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (a = (a | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return a;
6283
+ if (u = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (u = (u | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (u = (u | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (u = (u | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (u = (u | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return u;
6283
6284
  if ((this.pos += 5) > this.len)
6284
6285
  throw this.pos = this.len, d(this, 10);
6285
- return a;
6286
+ return u;
6286
6287
  };
6287
6288
  }(), n.prototype.int32 = function() {
6288
6289
  return this.uint32() | 0;
6289
6290
  }, n.prototype.sint32 = function() {
6290
- var a = this.uint32();
6291
- return a >>> 1 ^ -(a & 1) | 0;
6291
+ var u = this.uint32();
6292
+ return u >>> 1 ^ -(u & 1) | 0;
6292
6293
  };
6293
6294
  function i() {
6294
- var s = new h(0, 0), a = 0;
6295
+ var s = new h(0, 0), u = 0;
6295
6296
  if (this.len - this.pos > 4) {
6296
- for (; a < 4; ++a)
6297
- if (s.lo = (s.lo | (this.buf[this.pos] & 127) << a * 7) >>> 0, this.buf[this.pos++] < 128)
6297
+ for (; u < 4; ++u)
6298
+ if (s.lo = (s.lo | (this.buf[this.pos] & 127) << u * 7) >>> 0, this.buf[this.pos++] < 128)
6298
6299
  return s;
6299
6300
  if (s.lo = (s.lo | (this.buf[this.pos] & 127) << 28) >>> 0, s.hi = (s.hi | (this.buf[this.pos] & 127) >> 4) >>> 0, this.buf[this.pos++] < 128)
6300
6301
  return s;
6301
- a = 0;
6302
+ u = 0;
6302
6303
  } else {
6303
- for (; a < 3; ++a) {
6304
+ for (; u < 3; ++u) {
6304
6305
  if (this.pos >= this.len)
6305
6306
  throw d(this);
6306
- if (s.lo = (s.lo | (this.buf[this.pos] & 127) << a * 7) >>> 0, this.buf[this.pos++] < 128)
6307
+ if (s.lo = (s.lo | (this.buf[this.pos] & 127) << u * 7) >>> 0, this.buf[this.pos++] < 128)
6307
6308
  return s;
6308
6309
  }
6309
- return s.lo = (s.lo | (this.buf[this.pos++] & 127) << a * 7) >>> 0, s;
6310
+ return s.lo = (s.lo | (this.buf[this.pos++] & 127) << u * 7) >>> 0, s;
6310
6311
  }
6311
6312
  if (this.len - this.pos > 4) {
6312
- for (; a < 5; ++a)
6313
- if (s.hi = (s.hi | (this.buf[this.pos] & 127) << a * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
6313
+ for (; u < 5; ++u)
6314
+ if (s.hi = (s.hi | (this.buf[this.pos] & 127) << u * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
6314
6315
  return s;
6315
6316
  } else
6316
- for (; a < 5; ++a) {
6317
+ for (; u < 5; ++u) {
6317
6318
  if (this.pos >= this.len)
6318
6319
  throw d(this);
6319
- if (s.hi = (s.hi | (this.buf[this.pos] & 127) << a * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
6320
+ if (s.hi = (s.hi | (this.buf[this.pos] & 127) << u * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
6320
6321
  return s;
6321
6322
  }
6322
6323
  throw Error("invalid varint encoding");
@@ -6324,8 +6325,8 @@ function requireReader() {
6324
6325
  n.prototype.bool = function() {
6325
6326
  return this.uint32() !== 0;
6326
6327
  };
6327
- function t(s, a) {
6328
- return (s[a - 4] | s[a - 3] << 8 | s[a - 2] << 16 | s[a - 1] << 24) >>> 0;
6328
+ function t(s, u) {
6329
+ return (s[u - 4] | s[u - 3] << 8 | s[u - 2] << 16 | s[u - 1] << 24) >>> 0;
6329
6330
  }
6330
6331
  n.prototype.fixed32 = function() {
6331
6332
  if (this.pos + 4 > this.len)
@@ -6344,32 +6345,32 @@ function requireReader() {
6344
6345
  return n.prototype.float = function() {
6345
6346
  if (this.pos + 4 > this.len)
6346
6347
  throw d(this, 4);
6347
- var a = u.float.readFloatLE(this.buf, this.pos);
6348
- return this.pos += 4, a;
6348
+ var u = a.float.readFloatLE(this.buf, this.pos);
6349
+ return this.pos += 4, u;
6349
6350
  }, n.prototype.double = function() {
6350
6351
  if (this.pos + 8 > this.len)
6351
6352
  throw d(this, 4);
6352
- var a = u.float.readDoubleLE(this.buf, this.pos);
6353
- return this.pos += 8, a;
6353
+ var u = a.float.readDoubleLE(this.buf, this.pos);
6354
+ return this.pos += 8, u;
6354
6355
  }, n.prototype.bytes = function() {
6355
- var a = this.uint32(), o = this.pos, p = this.pos + a;
6356
+ var u = this.uint32(), o = this.pos, p = this.pos + u;
6356
6357
  if (p > this.len)
6357
- throw d(this, a);
6358
- if (this.pos += a, Array.isArray(this.buf))
6358
+ throw d(this, u);
6359
+ if (this.pos += u, Array.isArray(this.buf))
6359
6360
  return this.buf.slice(o, p);
6360
6361
  if (o === p) {
6361
- var y = u.Buffer;
6362
+ var y = a.Buffer;
6362
6363
  return y ? y.alloc(0) : new this.buf.constructor(0);
6363
6364
  }
6364
6365
  return this._slice.call(this.buf, o, p);
6365
6366
  }, n.prototype.string = function() {
6366
- var a = this.bytes();
6367
- return c.read(a, 0, a.length);
6368
- }, n.prototype.skip = function(a) {
6369
- if (typeof a == "number") {
6370
- if (this.pos + a > this.len)
6371
- throw d(this, a);
6372
- this.pos += a;
6367
+ var u = this.bytes();
6368
+ return c.read(u, 0, u.length);
6369
+ }, n.prototype.skip = function(u) {
6370
+ if (typeof u == "number") {
6371
+ if (this.pos + u > this.len)
6372
+ throw d(this, u);
6373
+ this.pos += u;
6373
6374
  } else
6374
6375
  do
6375
6376
  if (this.pos >= this.len)
@@ -6401,25 +6402,25 @@ function requireReader() {
6401
6402
  return this;
6402
6403
  }, n._configure = function(s) {
6403
6404
  f = s, n.create = r(), f._configure();
6404
- var a = u.Long ? "toLong" : (
6405
+ var u = a.Long ? "toLong" : (
6405
6406
  /* istanbul ignore next */
6406
6407
  "toNumber"
6407
6408
  );
6408
- u.merge(n.prototype, {
6409
+ a.merge(n.prototype, {
6409
6410
  int64: function() {
6410
- return i.call(this)[a](!1);
6411
+ return i.call(this)[u](!1);
6411
6412
  },
6412
6413
  uint64: function() {
6413
- return i.call(this)[a](!0);
6414
+ return i.call(this)[u](!0);
6414
6415
  },
6415
6416
  sint64: function() {
6416
- return i.call(this).zzDecode()[a](!1);
6417
+ return i.call(this).zzDecode()[u](!1);
6417
6418
  },
6418
6419
  fixed64: function() {
6419
- return l.call(this)[a](!0);
6420
+ return l.call(this)[u](!0);
6420
6421
  },
6421
6422
  sfixed64: function() {
6422
- return l.call(this)[a](!1);
6423
+ return l.call(this)[u](!1);
6423
6424
  }
6424
6425
  });
6425
6426
  }, reader;
@@ -6428,11 +6429,11 @@ var reader_buffer, hasRequiredReader_buffer;
6428
6429
  function requireReader_buffer() {
6429
6430
  if (hasRequiredReader_buffer) return reader_buffer;
6430
6431
  hasRequiredReader_buffer = 1, reader_buffer = h;
6431
- var u = requireReader();
6432
- (h.prototype = Object.create(u.prototype)).constructor = h;
6432
+ var a = requireReader();
6433
+ (h.prototype = Object.create(a.prototype)).constructor = h;
6433
6434
  var f = requireMinimal();
6434
6435
  function h(c) {
6435
- u.call(this, c);
6436
+ a.call(this, c);
6436
6437
  }
6437
6438
  return h._configure = function() {
6438
6439
  f.Buffer && (h.prototype._slice = f.Buffer.prototype.slice);
@@ -6445,19 +6446,19 @@ var rpc = {}, service$1, hasRequiredService$1;
6445
6446
  function requireService$1() {
6446
6447
  if (hasRequiredService$1) return service$1;
6447
6448
  hasRequiredService$1 = 1, service$1 = f;
6448
- var u = requireMinimal();
6449
- (f.prototype = Object.create(u.EventEmitter.prototype)).constructor = f;
6449
+ var a = requireMinimal();
6450
+ (f.prototype = Object.create(a.EventEmitter.prototype)).constructor = f;
6450
6451
  function f(h, c, d) {
6451
6452
  if (typeof h != "function")
6452
6453
  throw TypeError("rpcImpl must be a function");
6453
- u.EventEmitter.call(this), this.rpcImpl = h, this.requestDelimited = !!c, this.responseDelimited = !!d;
6454
+ a.EventEmitter.call(this), this.rpcImpl = h, this.requestDelimited = !!c, this.responseDelimited = !!d;
6454
6455
  }
6455
6456
  return f.prototype.rpcCall = function h(c, d, n, e, r) {
6456
6457
  if (!e)
6457
6458
  throw TypeError("request must be specified");
6458
6459
  var i = this;
6459
6460
  if (!r)
6460
- return u.asPromise(h, i, c, d, n, e);
6461
+ return a.asPromise(h, i, c, d, n, e);
6461
6462
  if (!i.rpcImpl) {
6462
6463
  setTimeout(function() {
6463
6464
  r(Error("already ended"));
@@ -6481,8 +6482,8 @@ function requireService$1() {
6481
6482
  if (!(s instanceof n))
6482
6483
  try {
6483
6484
  s = n[i.responseDelimited ? "decodeDelimited" : "decode"](s);
6484
- } catch (a) {
6485
- return i.emit("error", a, c), r(a);
6485
+ } catch (u) {
6486
+ return i.emit("error", u, c), r(u);
6486
6487
  }
6487
6488
  return i.emit("data", s, c), r(null, s);
6488
6489
  }
@@ -6499,8 +6500,8 @@ function requireService$1() {
6499
6500
  }
6500
6501
  var hasRequiredRpc;
6501
6502
  function requireRpc() {
6502
- return hasRequiredRpc || (hasRequiredRpc = 1, function(u) {
6503
- var f = u;
6503
+ return hasRequiredRpc || (hasRequiredRpc = 1, function(a) {
6504
+ var f = a;
6504
6505
  f.Service = requireService$1();
6505
6506
  }(rpc)), rpc;
6506
6507
  }
@@ -6510,8 +6511,8 @@ function requireRoots() {
6510
6511
  }
6511
6512
  var hasRequiredIndexMinimal;
6512
6513
  function requireIndexMinimal() {
6513
- return hasRequiredIndexMinimal || (hasRequiredIndexMinimal = 1, function(u) {
6514
- var f = u;
6514
+ return hasRequiredIndexMinimal || (hasRequiredIndexMinimal = 1, function(a) {
6515
+ var f = a;
6515
6516
  f.build = "minimal", f.Writer = requireWriter(), f.BufferWriter = requireWriter_buffer(), f.Reader = requireReader(), f.BufferReader = requireReader_buffer(), f.util = requireMinimal(), f.rpc = requireRpc(), f.roots = requireRoots(), f.configure = h;
6516
6517
  function h() {
6517
6518
  f.util._configure(), f.Writer._configure(f.BufferWriter), f.Reader._configure(f.BufferReader);
@@ -6522,24 +6523,24 @@ function requireIndexMinimal() {
6522
6523
  var types = {}, util = { exports: {} }, codegen_1, hasRequiredCodegen;
6523
6524
  function requireCodegen() {
6524
6525
  if (hasRequiredCodegen) return codegen_1;
6525
- hasRequiredCodegen = 1, codegen_1 = u;
6526
- function u(f, h) {
6526
+ hasRequiredCodegen = 1, codegen_1 = a;
6527
+ function a(f, h) {
6527
6528
  typeof f == "string" && (h = f, f = void 0);
6528
6529
  var c = [];
6529
6530
  function d(e) {
6530
6531
  if (typeof e != "string") {
6531
6532
  var r = n();
6532
- if (u.verbose && console.log("codegen: " + r), r = "return " + r, e) {
6533
+ if (a.verbose && console.log("codegen: " + r), r = "return " + r, e) {
6533
6534
  for (var i = Object.keys(e), t = new Array(i.length + 1), l = new Array(i.length), s = 0; s < i.length; )
6534
6535
  t[s] = i[s], l[s] = e[i[s++]];
6535
6536
  return t[s] = r, Function.apply(null, t).apply(null, l);
6536
6537
  }
6537
6538
  return Function(r)();
6538
6539
  }
6539
- for (var a = new Array(arguments.length - 1), o = 0; o < a.length; )
6540
- a[o] = arguments[++o];
6540
+ for (var u = new Array(arguments.length - 1), o = 0; o < u.length; )
6541
+ u[o] = arguments[++o];
6541
6542
  if (o = 0, e = e.replace(/%([%dfijs])/g, function(y, E) {
6542
- var v = a[o++];
6543
+ var v = u[o++];
6543
6544
  switch (E) {
6544
6545
  case "d":
6545
6546
  case "f":
@@ -6552,7 +6553,7 @@ function requireCodegen() {
6552
6553
  return String(v);
6553
6554
  }
6554
6555
  return "%";
6555
- }), o !== a.length)
6556
+ }), o !== u.length)
6556
6557
  throw Error("parameter count mismatch");
6557
6558
  return c.push(e), d;
6558
6559
  }
@@ -6564,17 +6565,17 @@ function requireCodegen() {
6564
6565
  }
6565
6566
  return d.toString = n, d;
6566
6567
  }
6567
- return u.verbose = !1, codegen_1;
6568
+ return a.verbose = !1, codegen_1;
6568
6569
  }
6569
6570
  var fetch_1, hasRequiredFetch;
6570
6571
  function requireFetch() {
6571
6572
  if (hasRequiredFetch) return fetch_1;
6572
6573
  hasRequiredFetch = 1, fetch_1 = c;
6573
- var u = requireAspromise(), f = requireInquire(), h = f("fs");
6574
+ var a = requireAspromise(), f = requireInquire(), h = f("fs");
6574
6575
  function c(d, n, e) {
6575
6576
  return typeof n == "function" ? (e = n, n = {}) : n || (n = {}), e ? !n.xhr && h && h.readFile ? h.readFile(d, function(i, t) {
6576
6577
  return i && typeof XMLHttpRequest < "u" ? c.xhr(d, n, e) : i ? e(i) : e(null, n.binary ? t : t.toString("utf8"));
6577
- }) : c.xhr(d, n, e) : u(c, this, d, n);
6578
+ }) : c.xhr(d, n, e) : a(c, this, d, n);
6578
6579
  }
6579
6580
  return c.xhr = function(n, e, r) {
6580
6581
  var i = new XMLHttpRequest();
@@ -6598,8 +6599,8 @@ function requireFetch() {
6598
6599
  }
6599
6600
  var path = {}, hasRequiredPath;
6600
6601
  function requirePath() {
6601
- return hasRequiredPath || (hasRequiredPath = 1, function(u) {
6602
- var f = u, h = (
6602
+ return hasRequiredPath || (hasRequiredPath = 1, function(a) {
6603
+ var f = a, h = (
6603
6604
  /**
6604
6605
  * Tests if the specified path is absolute.
6605
6606
  * @param {string} path Path to test
@@ -6632,36 +6633,36 @@ var namespace, hasRequiredNamespace;
6632
6633
  function requireNamespace() {
6633
6634
  if (hasRequiredNamespace) return namespace;
6634
6635
  hasRequiredNamespace = 1, namespace = i;
6635
- var u = requireObject();
6636
- ((i.prototype = Object.create(u.prototype)).constructor = i).className = "Namespace";
6636
+ var a = requireObject();
6637
+ ((i.prototype = Object.create(a.prototype)).constructor = i).className = "Namespace";
6637
6638
  var f = requireField(), h = requireUtil(), c = requireOneof(), d, n, e;
6638
- i.fromJSON = function(s, a) {
6639
- return new i(s, a.options).addJSON(a.nested);
6639
+ i.fromJSON = function(s, u) {
6640
+ return new i(s, u.options).addJSON(u.nested);
6640
6641
  };
6641
6642
  function r(l, s) {
6642
6643
  if (l && l.length) {
6643
- for (var a = {}, o = 0; o < l.length; ++o)
6644
- a[l[o].name] = l[o].toJSON(s);
6645
- return a;
6644
+ for (var u = {}, o = 0; o < l.length; ++o)
6645
+ u[l[o].name] = l[o].toJSON(s);
6646
+ return u;
6646
6647
  }
6647
6648
  }
6648
- i.arrayToJSON = r, i.isReservedId = function(s, a) {
6649
+ i.arrayToJSON = r, i.isReservedId = function(s, u) {
6649
6650
  if (s) {
6650
6651
  for (var o = 0; o < s.length; ++o)
6651
- if (typeof s[o] != "string" && s[o][0] <= a && s[o][1] > a)
6652
+ if (typeof s[o] != "string" && s[o][0] <= u && s[o][1] > u)
6652
6653
  return !0;
6653
6654
  }
6654
6655
  return !1;
6655
- }, i.isReservedName = function(s, a) {
6656
+ }, i.isReservedName = function(s, u) {
6656
6657
  if (s) {
6657
6658
  for (var o = 0; o < s.length; ++o)
6658
- if (s[o] === a)
6659
+ if (s[o] === u)
6659
6660
  return !0;
6660
6661
  }
6661
6662
  return !1;
6662
6663
  };
6663
6664
  function i(l, s) {
6664
- u.call(this, l, s), this.nested = void 0, this._nestedArray = null, this._lookupCache = {}, this._needsRecursiveFeatureResolution = !0, this._needsRecursiveResolve = !0;
6665
+ a.call(this, l, s), this.nested = void 0, this._nestedArray = null, this._lookupCache = {}, this._needsRecursiveFeatureResolution = !0, this._needsRecursiveResolve = !0;
6665
6666
  }
6666
6667
  function t(l) {
6667
6668
  l._nestedArray = null, l._lookupCache = {};
@@ -6681,10 +6682,10 @@ function requireNamespace() {
6681
6682
  r(this.nestedArray, s)
6682
6683
  ]);
6683
6684
  }, i.prototype.addJSON = function(s) {
6684
- var a = this;
6685
+ var u = this;
6685
6686
  if (s)
6686
6687
  for (var o = Object.keys(s), p = 0, y; p < o.length; ++p)
6687
- y = s[o[p]], a.add(
6688
+ y = s[o[p]], u.add(
6688
6689
  // most to least likely
6689
6690
  (y.fields !== void 0 ? d.fromJSON : y.values !== void 0 ? e.fromJSON : y.methods !== void 0 ? n.fromJSON : y.id !== void 0 ? f.fromJSON : i.fromJSON)(o[p], y)
6690
6691
  );
@@ -6701,12 +6702,12 @@ function requireNamespace() {
6701
6702
  if (!this.nested)
6702
6703
  this.nested = {};
6703
6704
  else {
6704
- var a = this.get(s.name);
6705
- if (a)
6706
- if (a instanceof i && s instanceof i && !(a instanceof d || a instanceof n)) {
6707
- for (var o = a.nestedArray, p = 0; p < o.length; ++p)
6705
+ var u = this.get(s.name);
6706
+ if (u)
6707
+ if (u instanceof i && s instanceof i && !(u instanceof d || u instanceof n)) {
6708
+ for (var o = u.nestedArray, p = 0; p < o.length; ++p)
6708
6709
  s.add(o[p]);
6709
- this.remove(a), this.nested || (this.nested = {}), s.setOptions(a.options, !0);
6710
+ this.remove(u), this.nested || (this.nested = {}), s.setOptions(u.options, !0);
6710
6711
  } else
6711
6712
  throw Error("duplicate name '" + s.name + "' in " + this);
6712
6713
  }
@@ -6715,12 +6716,12 @@ function requireNamespace() {
6715
6716
  y._needsRecursiveFeatureResolution = !0, y._needsRecursiveResolve = !0;
6716
6717
  return s.onAdd(this), t(this);
6717
6718
  }, i.prototype.remove = function(s) {
6718
- if (!(s instanceof u))
6719
+ if (!(s instanceof a))
6719
6720
  throw TypeError("object must be a ReflectionObject");
6720
6721
  if (s.parent !== this)
6721
6722
  throw Error(s + " is not a member of " + this);
6722
6723
  return delete this.nested[s.name], Object.keys(this.nested).length || (this.nested = void 0), s.onRemove(this), t(this);
6723
- }, i.prototype.define = function(s, a) {
6724
+ }, i.prototype.define = function(s, u) {
6724
6725
  if (h.isString(s))
6725
6726
  s = s.split(".");
6726
6727
  else if (!Array.isArray(s))
@@ -6735,20 +6736,20 @@ function requireNamespace() {
6735
6736
  } else
6736
6737
  o.add(o = new i(p));
6737
6738
  }
6738
- return a && o.addJSON(a), o;
6739
+ return u && o.addJSON(u), o;
6739
6740
  }, i.prototype.resolveAll = function() {
6740
6741
  if (!this._needsRecursiveResolve) return this;
6741
6742
  this._resolveFeaturesRecursive(this._edition);
6742
- var s = this.nestedArray, a = 0;
6743
- for (this.resolve(); a < s.length; )
6744
- s[a] instanceof i ? s[a++].resolveAll() : s[a++].resolve();
6743
+ var s = this.nestedArray, u = 0;
6744
+ for (this.resolve(); u < s.length; )
6745
+ s[u] instanceof i ? s[u++].resolveAll() : s[u++].resolve();
6745
6746
  return this._needsRecursiveResolve = !1, this;
6746
6747
  }, i.prototype._resolveFeaturesRecursive = function(s) {
6747
- return this._needsRecursiveFeatureResolution ? (this._needsRecursiveFeatureResolution = !1, s = this._edition || s, u.prototype._resolveFeaturesRecursive.call(this, s), this.nestedArray.forEach((a) => {
6748
- a._resolveFeaturesRecursive(s);
6748
+ return this._needsRecursiveFeatureResolution ? (this._needsRecursiveFeatureResolution = !1, s = this._edition || s, a.prototype._resolveFeaturesRecursive.call(this, s), this.nestedArray.forEach((u) => {
6749
+ u._resolveFeaturesRecursive(s);
6749
6750
  }), this) : this;
6750
- }, i.prototype.lookup = function(s, a, o) {
6751
- if (typeof a == "boolean" ? (o = a, a = void 0) : a && !Array.isArray(a) && (a = [a]), h.isString(s) && s.length) {
6751
+ }, i.prototype.lookup = function(s, u, o) {
6752
+ if (typeof u == "boolean" ? (o = u, u = void 0) : u && !Array.isArray(u) && (u = [u]), h.isString(s) && s.length) {
6752
6753
  if (s === ".")
6753
6754
  return this.root;
6754
6755
  s = s.split(".");
@@ -6756,61 +6757,61 @@ function requireNamespace() {
6756
6757
  return this;
6757
6758
  var p = s.join(".");
6758
6759
  if (s[0] === "")
6759
- return this.root.lookup(s.slice(1), a);
6760
+ return this.root.lookup(s.slice(1), u);
6760
6761
  var y = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects["." + p];
6761
- if (y && (!a || a.indexOf(y.constructor) > -1) || (y = this._lookupImpl(s, p), y && (!a || a.indexOf(y.constructor) > -1)))
6762
+ if (y && (!u || u.indexOf(y.constructor) > -1) || (y = this._lookupImpl(s, p), y && (!u || u.indexOf(y.constructor) > -1)))
6762
6763
  return y;
6763
6764
  if (o)
6764
6765
  return null;
6765
6766
  for (var E = this; E.parent; ) {
6766
- if (y = E.parent._lookupImpl(s, p), y && (!a || a.indexOf(y.constructor) > -1))
6767
+ if (y = E.parent._lookupImpl(s, p), y && (!u || u.indexOf(y.constructor) > -1))
6767
6768
  return y;
6768
6769
  E = E.parent;
6769
6770
  }
6770
6771
  return null;
6771
- }, i.prototype._lookupImpl = function(s, a) {
6772
- if (Object.prototype.hasOwnProperty.call(this._lookupCache, a))
6773
- return this._lookupCache[a];
6772
+ }, i.prototype._lookupImpl = function(s, u) {
6773
+ if (Object.prototype.hasOwnProperty.call(this._lookupCache, u))
6774
+ return this._lookupCache[u];
6774
6775
  var o = this.get(s[0]), p = null;
6775
6776
  if (o)
6776
6777
  s.length === 1 ? p = o : o instanceof i && (s = s.slice(1), p = o._lookupImpl(s, s.join(".")));
6777
6778
  else
6778
6779
  for (var y = 0; y < this.nestedArray.length; ++y)
6779
- this._nestedArray[y] instanceof i && (o = this._nestedArray[y]._lookupImpl(s, a)) && (p = o);
6780
- return this._lookupCache[a] = p, p;
6780
+ this._nestedArray[y] instanceof i && (o = this._nestedArray[y]._lookupImpl(s, u)) && (p = o);
6781
+ return this._lookupCache[u] = p, p;
6781
6782
  }, i.prototype.lookupType = function(s) {
6782
- var a = this.lookup(s, [d]);
6783
- if (!a)
6783
+ var u = this.lookup(s, [d]);
6784
+ if (!u)
6784
6785
  throw Error("no such type: " + s);
6785
- return a;
6786
+ return u;
6786
6787
  }, i.prototype.lookupEnum = function(s) {
6787
- var a = this.lookup(s, [e]);
6788
- if (!a)
6788
+ var u = this.lookup(s, [e]);
6789
+ if (!u)
6789
6790
  throw Error("no such Enum '" + s + "' in " + this);
6790
- return a;
6791
+ return u;
6791
6792
  }, i.prototype.lookupTypeOrEnum = function(s) {
6792
- var a = this.lookup(s, [d, e]);
6793
- if (!a)
6793
+ var u = this.lookup(s, [d, e]);
6794
+ if (!u)
6794
6795
  throw Error("no such Type or Enum '" + s + "' in " + this);
6795
- return a;
6796
+ return u;
6796
6797
  }, i.prototype.lookupService = function(s) {
6797
- var a = this.lookup(s, [n]);
6798
- if (!a)
6798
+ var u = this.lookup(s, [n]);
6799
+ if (!u)
6799
6800
  throw Error("no such Service '" + s + "' in " + this);
6800
- return a;
6801
- }, i._configure = function(l, s, a) {
6802
- d = l, n = s, e = a;
6801
+ return u;
6802
+ }, i._configure = function(l, s, u) {
6803
+ d = l, n = s, e = u;
6803
6804
  }, namespace;
6804
6805
  }
6805
6806
  var mapfield, hasRequiredMapfield;
6806
6807
  function requireMapfield() {
6807
6808
  if (hasRequiredMapfield) return mapfield;
6808
6809
  hasRequiredMapfield = 1, mapfield = c;
6809
- var u = requireField();
6810
- ((c.prototype = Object.create(u.prototype)).constructor = c).className = "MapField";
6810
+ var a = requireField();
6811
+ ((c.prototype = Object.create(a.prototype)).constructor = c).className = "MapField";
6811
6812
  var f = requireTypes(), h = requireUtil();
6812
6813
  function c(d, n, e, r, i, t) {
6813
- if (u.call(this, d, n, r, void 0, void 0, i, t), !h.isString(e))
6814
+ if (a.call(this, d, n, r, void 0, void 0, i, t), !h.isString(e))
6814
6815
  throw TypeError("keyType must be a string");
6815
6816
  this.keyType = e, this.resolvedKeyType = null, this.map = !0;
6816
6817
  }
@@ -6837,7 +6838,7 @@ function requireMapfield() {
6837
6838
  return this;
6838
6839
  if (f.mapKey[this.keyType] === void 0)
6839
6840
  throw Error("invalid key type: " + this.keyType);
6840
- return u.prototype.resolve.call(this);
6841
+ return a.prototype.resolve.call(this);
6841
6842
  }, c.d = function(n, e, r) {
6842
6843
  return typeof r == "function" ? r = h.decorateType(r).name : r && typeof r == "object" && (r = h.decorateEnum(r).name), function(t, l) {
6843
6844
  h.decorateType(t.constructor).add(new c(l, n, e, r));
@@ -6848,8 +6849,8 @@ var method, hasRequiredMethod;
6848
6849
  function requireMethod() {
6849
6850
  if (hasRequiredMethod) return method;
6850
6851
  hasRequiredMethod = 1, method = h;
6851
- var u = requireObject();
6852
- ((h.prototype = Object.create(u.prototype)).constructor = h).className = "Method";
6852
+ var a = requireObject();
6853
+ ((h.prototype = Object.create(a.prototype)).constructor = h).className = "Method";
6853
6854
  var f = requireUtil();
6854
6855
  function h(c, d, n, e, r, i, t, l, s) {
6855
6856
  if (f.isObject(r) ? (t = r, r = i = void 0) : f.isObject(i) && (t = i, i = void 0), !(d === void 0 || f.isString(d)))
@@ -6858,7 +6859,7 @@ function requireMethod() {
6858
6859
  throw TypeError("requestType must be a string");
6859
6860
  if (!f.isString(e))
6860
6861
  throw TypeError("responseType must be a string");
6861
- u.call(this, c, t), this.type = d || "rpc", this.requestType = n, this.requestStream = r ? !0 : void 0, this.responseType = e, this.responseStream = i ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = l, this.parsedOptions = s;
6862
+ a.call(this, c, t), this.type = d || "rpc", this.requestType = n, this.requestStream = r ? !0 : void 0, this.responseType = e, this.responseStream = i ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = l, this.parsedOptions = s;
6862
6863
  }
6863
6864
  return h.fromJSON = function(d, n) {
6864
6865
  return new h(d, n.type, n.requestType, n.responseType, n.requestStream, n.responseStream, n.options, n.comment, n.parsedOptions);
@@ -6884,18 +6885,18 @@ function requireMethod() {
6884
6885
  this.parsedOptions
6885
6886
  ]);
6886
6887
  }, h.prototype.resolve = function() {
6887
- return this.resolved ? this : (this.resolvedRequestType = this.parent.lookupType(this.requestType), this.resolvedResponseType = this.parent.lookupType(this.responseType), u.prototype.resolve.call(this));
6888
+ return this.resolved ? this : (this.resolvedRequestType = this.parent.lookupType(this.requestType), this.resolvedResponseType = this.parent.lookupType(this.responseType), a.prototype.resolve.call(this));
6888
6889
  }, method;
6889
6890
  }
6890
6891
  var service, hasRequiredService;
6891
6892
  function requireService() {
6892
6893
  if (hasRequiredService) return service;
6893
6894
  hasRequiredService = 1, service = d;
6894
- var u = requireNamespace();
6895
- ((d.prototype = Object.create(u.prototype)).constructor = d).className = "Service";
6895
+ var a = requireNamespace();
6896
+ ((d.prototype = Object.create(a.prototype)).constructor = d).className = "Service";
6896
6897
  var f = requireMethod(), h = requireUtil(), c = requireRpc();
6897
6898
  function d(e, r) {
6898
- u.call(this, e, r), this.methods = {}, this._methodsArray = null;
6899
+ a.call(this, e, r), this.methods = {}, this._methodsArray = null;
6899
6900
  }
6900
6901
  d.fromJSON = function(r, i) {
6901
6902
  var t = new d(r, i.options);
@@ -6904,14 +6905,14 @@ function requireService() {
6904
6905
  t.add(f.fromJSON(l[s], i.methods[l[s]]));
6905
6906
  return i.nested && t.addJSON(i.nested), i.edition && (t._edition = i.edition), t.comment = i.comment, t._defaultEdition = "proto3", t;
6906
6907
  }, d.prototype.toJSON = function(r) {
6907
- var i = u.prototype.toJSON.call(this, r), t = r ? !!r.keepComments : !1;
6908
+ var i = a.prototype.toJSON.call(this, r), t = r ? !!r.keepComments : !1;
6908
6909
  return h.toObject([
6909
6910
  "edition",
6910
6911
  this._editionToJSON(),
6911
6912
  "options",
6912
6913
  i && i.options || void 0,
6913
6914
  "methods",
6914
- u.arrayToJSON(this.methodsArray, r) || /* istanbul ignore next */
6915
+ a.arrayToJSON(this.methodsArray, r) || /* istanbul ignore next */
6915
6916
  {},
6916
6917
  "nested",
6917
6918
  i && i.nested || void 0,
@@ -6927,36 +6928,36 @@ function requireService() {
6927
6928
  return e._methodsArray = null, e;
6928
6929
  }
6929
6930
  return d.prototype.get = function(r) {
6930
- return this.methods[r] || u.prototype.get.call(this, r);
6931
+ return this.methods[r] || a.prototype.get.call(this, r);
6931
6932
  }, d.prototype.resolveAll = function() {
6932
6933
  if (!this._needsRecursiveResolve) return this;
6933
- u.prototype.resolve.call(this);
6934
+ a.prototype.resolve.call(this);
6934
6935
  for (var r = this.methodsArray, i = 0; i < r.length; ++i)
6935
6936
  r[i].resolve();
6936
6937
  return this;
6937
6938
  }, d.prototype._resolveFeaturesRecursive = function(r) {
6938
- return this._needsRecursiveFeatureResolution ? (r = this._edition || r, u.prototype._resolveFeaturesRecursive.call(this, r), this.methodsArray.forEach((i) => {
6939
+ return this._needsRecursiveFeatureResolution ? (r = this._edition || r, a.prototype._resolveFeaturesRecursive.call(this, r), this.methodsArray.forEach((i) => {
6939
6940
  i._resolveFeaturesRecursive(r);
6940
6941
  }), this) : this;
6941
6942
  }, d.prototype.add = function(r) {
6942
6943
  if (this.get(r.name))
6943
6944
  throw Error("duplicate name '" + r.name + "' in " + this);
6944
- return r instanceof f ? (this.methods[r.name] = r, r.parent = this, n(this)) : u.prototype.add.call(this, r);
6945
+ return r instanceof f ? (this.methods[r.name] = r, r.parent = this, n(this)) : a.prototype.add.call(this, r);
6945
6946
  }, d.prototype.remove = function(r) {
6946
6947
  if (r instanceof f) {
6947
6948
  if (this.methods[r.name] !== r)
6948
6949
  throw Error(r + " is not a member of " + this);
6949
6950
  return delete this.methods[r.name], r.parent = null, n(this);
6950
6951
  }
6951
- return u.prototype.remove.call(this, r);
6952
+ return a.prototype.remove.call(this, r);
6952
6953
  }, d.prototype.create = function(r, i, t) {
6953
- for (var l = new c.Service(r, i, t), s = 0, a; s < /* initializes */
6954
+ for (var l = new c.Service(r, i, t), s = 0, u; s < /* initializes */
6954
6955
  this.methodsArray.length; ++s) {
6955
- var o = h.lcFirst((a = this._methodsArray[s]).resolve().name).replace(/[^$\\w_]/g, "");
6956
+ var o = h.lcFirst((u = this._methodsArray[s]).resolve().name).replace(/[^$\\w_]/g, "");
6956
6957
  l[o] = h.codegen(["r", "c"], h.isReserved(o) ? o + "_" : o)("return this.rpcCall(m,q,s,r,c)")({
6957
- m: a,
6958
- q: a.resolvedRequestType.ctor,
6959
- s: a.resolvedResponseType.ctor
6958
+ m: u,
6959
+ q: u.resolvedRequestType.ctor,
6960
+ s: u.resolvedResponseType.ctor
6960
6961
  });
6961
6962
  }
6962
6963
  return l;
@@ -6966,7 +6967,7 @@ var message, hasRequiredMessage;
6966
6967
  function requireMessage() {
6967
6968
  if (hasRequiredMessage) return message;
6968
6969
  hasRequiredMessage = 1, message = f;
6969
- var u = requireMinimal();
6970
+ var a = requireMinimal();
6970
6971
  function f(h) {
6971
6972
  if (h)
6972
6973
  for (var c = Object.keys(h), d = 0; d < c.length; ++d) {
@@ -6991,23 +6992,23 @@ function requireMessage() {
6991
6992
  }, f.toObject = function(c, d) {
6992
6993
  return this.$type.toObject(c, d);
6993
6994
  }, f.prototype.toJSON = function() {
6994
- return this.$type.toObject(this, u.toJSONOptions);
6995
+ return this.$type.toObject(this, a.toJSONOptions);
6995
6996
  }, message;
6996
6997
  }
6997
6998
  var decoder_1, hasRequiredDecoder;
6998
6999
  function requireDecoder() {
6999
7000
  if (hasRequiredDecoder) return decoder_1;
7000
7001
  hasRequiredDecoder = 1, decoder_1 = d;
7001
- var u = require_enum(), f = requireTypes(), h = requireUtil();
7002
+ var a = require_enum(), f = requireTypes(), h = requireUtil();
7002
7003
  function c(n) {
7003
7004
  return "missing required '" + n.name + "'";
7004
7005
  }
7005
7006
  function d(n) {
7006
- for (var e = h.codegen(["r", "l", "e"], n.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (n.fieldsArray.filter(function(a) {
7007
- return a.map;
7007
+ for (var e = h.codegen(["r", "l", "e"], n.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (n.fieldsArray.filter(function(u) {
7008
+ return u.map;
7008
7009
  }).length ? ",k,value" : ""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"), r = 0; r < /* initializes */
7009
7010
  n.fieldsArray.length; ++r) {
7010
- var i = n._fieldsArray[r].resolve(), t = i.resolvedType instanceof u ? "int32" : i.type, l = "m" + h.safeProp(i.name);
7011
+ var i = n._fieldsArray[r].resolve(), t = i.resolvedType instanceof a ? "int32" : i.type, l = "m" + h.safeProp(i.name);
7011
7012
  e("case %i: {", i.id), i.map ? (e("if(%s===util.emptyObject)", l)("%s={}", l)("var c2 = r.uint32()+r.pos"), f.defaults[i.keyType] !== void 0 ? e("k=%j", f.defaults[i.keyType]) : e("k=null"), f.defaults[t] !== void 0 ? e("value=%j", f.defaults[t]) : e("value=null"), e("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break", i.keyType)("case 2:"), f.basic[t] === void 0 ? e("value=types[%i].decode(r,r.uint32())", r) : e("value=r.%s()", t), e("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), f.long[i.keyType] !== void 0 ? e('%s[typeof k==="object"?util.longToHash(k):k]=value', l) : e("%s[k]=value", l)) : i.repeated ? (e("if(!(%s&&%s.length))", l, l)("%s=[]", l), f.packed[t] !== void 0 && e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", l, t)("}else"), f.basic[t] === void 0 ? e(i.delimited ? "%s.push(types[%i].decode(r,undefined,((t&~7)|4)))" : "%s.push(types[%i].decode(r,r.uint32()))", l, r) : e("%s.push(r.%s())", l, t)) : f.basic[t] === void 0 ? e(i.delimited ? "%s=types[%i].decode(r,undefined,((t&~7)|4))" : "%s=types[%i].decode(r,r.uint32())", l, r) : e("%s=r.%s()", l, t), e("break")("}");
7012
7013
  }
7013
7014
  for (e("default:")("r.skipType(t&7)")("break")("}")("}"), r = 0; r < n._fieldsArray.length; ++r) {
@@ -7022,13 +7023,13 @@ var verifier_1, hasRequiredVerifier;
7022
7023
  function requireVerifier() {
7023
7024
  if (hasRequiredVerifier) return verifier_1;
7024
7025
  hasRequiredVerifier = 1, verifier_1 = n;
7025
- var u = require_enum(), f = requireUtil();
7026
+ var a = require_enum(), f = requireUtil();
7026
7027
  function h(e, r) {
7027
7028
  return e.name + ": " + r + (e.repeated && r !== "array" ? "[]" : e.map && r !== "object" ? "{k:" + e.keyType + "}" : "") + " expected";
7028
7029
  }
7029
7030
  function c(e, r, i, t) {
7030
7031
  if (r.resolvedType)
7031
- if (r.resolvedType instanceof u) {
7032
+ if (r.resolvedType instanceof a) {
7032
7033
  e("switch(%s){", t)("default:")("return%j", h(r, "enum value"));
7033
7034
  for (var l = Object.keys(r.resolvedType.values), s = 0; s < l.length; ++s) e("case %i:", r.resolvedType.values[l[s]]);
7034
7035
  e("break")("}");
@@ -7093,17 +7094,17 @@ function requireVerifier() {
7093
7094
  i.length && r("var p={}");
7094
7095
  for (var l = 0; l < /* initializes */
7095
7096
  e.fieldsArray.length; ++l) {
7096
- var s = e._fieldsArray[l].resolve(), a = "m" + f.safeProp(s.name);
7097
- if (s.optional && r("if(%s!=null&&m.hasOwnProperty(%j)){", a, s.name), s.map)
7098
- r("if(!util.isObject(%s))", a)("return%j", h(s, "object"))("var k=Object.keys(%s)", a)("for(var i=0;i<k.length;++i){"), d(r, s, "k[i]"), c(r, s, l, a + "[k[i]]")("}");
7097
+ var s = e._fieldsArray[l].resolve(), u = "m" + f.safeProp(s.name);
7098
+ if (s.optional && r("if(%s!=null&&m.hasOwnProperty(%j)){", u, s.name), s.map)
7099
+ r("if(!util.isObject(%s))", u)("return%j", h(s, "object"))("var k=Object.keys(%s)", u)("for(var i=0;i<k.length;++i){"), d(r, s, "k[i]"), c(r, s, l, u + "[k[i]]")("}");
7099
7100
  else if (s.repeated)
7100
- r("if(!Array.isArray(%s))", a)("return%j", h(s, "array"))("for(var i=0;i<%s.length;++i){", a), c(r, s, l, a + "[i]")("}");
7101
+ r("if(!Array.isArray(%s))", u)("return%j", h(s, "array"))("for(var i=0;i<%s.length;++i){", u), c(r, s, l, u + "[i]")("}");
7101
7102
  else {
7102
7103
  if (s.partOf) {
7103
7104
  var o = f.safeProp(s.partOf.name);
7104
7105
  t[s.partOf.name] === 1 && r("if(p%s===1)", o)("return%j", s.partOf.name + ": multiple values"), t[s.partOf.name] = 1, r("p%s=1", o);
7105
7106
  }
7106
- c(r, s, l, a);
7107
+ c(r, s, l, u);
7107
7108
  }
7108
7109
  s.optional && r("}");
7109
7110
  }
@@ -7113,15 +7114,15 @@ function requireVerifier() {
7113
7114
  }
7114
7115
  var converter = {}, hasRequiredConverter;
7115
7116
  function requireConverter() {
7116
- return hasRequiredConverter || (hasRequiredConverter = 1, function(u) {
7117
- var f = u, h = require_enum(), c = requireUtil();
7117
+ return hasRequiredConverter || (hasRequiredConverter = 1, function(a) {
7118
+ var f = a, h = require_enum(), c = requireUtil();
7118
7119
  function d(e, r, i, t) {
7119
7120
  var l = !1;
7120
7121
  if (r.resolvedType)
7121
7122
  if (r.resolvedType instanceof h) {
7122
7123
  e("switch(d%s){", t);
7123
- for (var s = r.resolvedType.values, a = Object.keys(s), o = 0; o < a.length; ++o)
7124
- s[a[o]] === r.typeDefault && !l && (e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', t, t, t), r.repeated || e("break"), l = !0), e("case%j:", a[o])("case %i:", s[a[o]])("m%s=%j", t, s[a[o]])("break");
7124
+ for (var s = r.resolvedType.values, u = Object.keys(s), o = 0; o < u.length; ++o)
7125
+ s[u[o]] === r.typeDefault && !l && (e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', t, t, t), r.repeated || e("break"), l = !0), e("case%j:", u[o])("case %i:", s[u[o]])("m%s=%j", t, s[u[o]])("break");
7125
7126
  e("}");
7126
7127
  } else e('if(typeof d%s!=="object")', t)("throw TypeError(%j)", r.fullName + ": object expected")("m%s=types[%i].fromObject(d%s)", t, i, t);
7127
7128
  else {
@@ -7167,25 +7168,25 @@ function requireConverter() {
7167
7168
  if (!i.length) return t("return new this.ctor");
7168
7169
  t("var m=new this.ctor");
7169
7170
  for (var l = 0; l < i.length; ++l) {
7170
- var s = i[l].resolve(), a = c.safeProp(s.name);
7171
- s.map ? (t("if(d%s){", a)('if(typeof d%s!=="object")', a)("throw TypeError(%j)", s.fullName + ": object expected")("m%s={}", a)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", a), d(
7171
+ var s = i[l].resolve(), u = c.safeProp(s.name);
7172
+ s.map ? (t("if(d%s){", u)('if(typeof d%s!=="object")', u)("throw TypeError(%j)", s.fullName + ": object expected")("m%s={}", u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", u), d(
7172
7173
  t,
7173
7174
  s,
7174
7175
  /* not sorted */
7175
7176
  l,
7176
- a + "[ks[i]]"
7177
- )("}")("}")) : s.repeated ? (t("if(d%s){", a)("if(!Array.isArray(d%s))", a)("throw TypeError(%j)", s.fullName + ": array expected")("m%s=[]", a)("for(var i=0;i<d%s.length;++i){", a), d(
7177
+ u + "[ks[i]]"
7178
+ )("}")("}")) : s.repeated ? (t("if(d%s){", u)("if(!Array.isArray(d%s))", u)("throw TypeError(%j)", s.fullName + ": array expected")("m%s=[]", u)("for(var i=0;i<d%s.length;++i){", u), d(
7178
7179
  t,
7179
7180
  s,
7180
7181
  /* not sorted */
7181
7182
  l,
7182
- a + "[i]"
7183
- )("}")("}")) : (s.resolvedType instanceof h || t("if(d%s!=null){", a), d(
7183
+ u + "[i]"
7184
+ )("}")("}")) : (s.resolvedType instanceof h || t("if(d%s!=null){", u), d(
7184
7185
  t,
7185
7186
  s,
7186
7187
  /* not sorted */
7187
7188
  l,
7188
- a
7189
+ u
7189
7190
  ), s.resolvedType instanceof h || t("}"));
7190
7191
  }
7191
7192
  return t("return m");
@@ -7223,8 +7224,8 @@ function requireConverter() {
7223
7224
  var i = r.fieldsArray.slice().sort(c.compareFieldsById);
7224
7225
  if (!i.length)
7225
7226
  return c.codegen()("return {}");
7226
- for (var t = c.codegen(["m", "o"], r.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], s = [], a = [], o = 0; o < i.length; ++o)
7227
- i[o].partOf || (i[o].resolve().repeated ? l : i[o].map ? s : a).push(i[o]);
7227
+ for (var t = c.codegen(["m", "o"], r.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], s = [], u = [], o = 0; o < i.length; ++o)
7228
+ i[o].partOf || (i[o].resolve().repeated ? l : i[o].map ? s : u).push(i[o]);
7228
7229
  if (l.length) {
7229
7230
  for (t("if(o.arrays||o.defaults){"), o = 0; o < l.length; ++o) t("d%s=[]", c.safeProp(l[o].name));
7230
7231
  t("}");
@@ -7233,9 +7234,9 @@ function requireConverter() {
7233
7234
  for (t("if(o.objects||o.defaults){"), o = 0; o < s.length; ++o) t("d%s={}", c.safeProp(s[o].name));
7234
7235
  t("}");
7235
7236
  }
7236
- if (a.length) {
7237
- for (t("if(o.defaults){"), o = 0; o < a.length; ++o) {
7238
- var p = a[o], y = c.safeProp(p.name);
7237
+ if (u.length) {
7238
+ for (t("if(o.defaults){"), o = 0; o < u.length; ++o) {
7239
+ var p = u[o], y = c.safeProp(p.name);
7239
7240
  if (p.resolvedType instanceof h) t("d%s=o.enums===String?%j:%j", y, p.resolvedType.valuesById[p.typeDefault], p.typeDefault);
7240
7241
  else if (p.long) t("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", y)("}else")("d%s=o.longs===String?%j:%i", y, p.typeDefault.toString(), p.typeDefault.toNumber());
7241
7242
  else if (p.bytes) {
@@ -7274,8 +7275,8 @@ function requireConverter() {
7274
7275
  }
7275
7276
  var wrappers = {}, hasRequiredWrappers;
7276
7277
  function requireWrappers() {
7277
- return hasRequiredWrappers || (hasRequiredWrappers = 1, function(u) {
7278
- var f = u, h = requireMessage();
7278
+ return hasRequiredWrappers || (hasRequiredWrappers = 1, function(a) {
7279
+ var f = a, h = requireMessage();
7279
7280
  f[".google.protobuf.Any"] = {
7280
7281
  fromObject: function(c) {
7281
7282
  if (c && c["@type"]) {
@@ -7310,11 +7311,11 @@ var type, hasRequiredType;
7310
7311
  function requireType() {
7311
7312
  if (hasRequiredType) return type;
7312
7313
  hasRequiredType = 1, type = y;
7313
- var u = requireNamespace();
7314
- ((y.prototype = Object.create(u.prototype)).constructor = y).className = "Type";
7315
- var f = require_enum(), h = requireOneof(), c = requireField(), d = requireMapfield(), n = requireService(), e = requireMessage(), r = requireReader(), i = requireWriter(), t = requireUtil(), l = requireEncoder(), s = requireDecoder(), a = requireVerifier(), o = requireConverter(), p = requireWrappers();
7314
+ var a = requireNamespace();
7315
+ ((y.prototype = Object.create(a.prototype)).constructor = y).className = "Type";
7316
+ var f = require_enum(), h = requireOneof(), c = requireField(), d = requireMapfield(), n = requireService(), e = requireMessage(), r = requireReader(), i = requireWriter(), t = requireUtil(), l = requireEncoder(), s = requireDecoder(), u = requireVerifier(), o = requireConverter(), p = requireWrappers();
7316
7317
  function y(v, m) {
7317
- v = v.replace(/\\W/g, ""), u.call(this, v, 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;
7318
+ v = v.replace(/\\W/g, ""), a.call(this, v, 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;
7318
7319
  }
7319
7320
  Object.defineProperties(y.prototype, {
7320
7321
  /**
@@ -7408,21 +7409,21 @@ function requireType() {
7408
7409
  var j = _.nested[I[C]];
7409
7410
  A.add(
7410
7411
  // most to least likely
7411
- (j.id !== void 0 ? c.fromJSON : j.fields !== void 0 ? y.fromJSON : j.values !== void 0 ? f.fromJSON : j.methods !== void 0 ? n.fromJSON : u.fromJSON)(I[C], j)
7412
+ (j.id !== void 0 ? c.fromJSON : j.fields !== void 0 ? y.fromJSON : j.values !== void 0 ? f.fromJSON : j.methods !== void 0 ? n.fromJSON : a.fromJSON)(I[C], j)
7412
7413
  );
7413
7414
  }
7414
7415
  return _.extensions && _.extensions.length && (A.extensions = _.extensions), _.reserved && _.reserved.length && (A.reserved = _.reserved), _.group && (A.group = !0), _.comment && (A.comment = _.comment), _.edition && (A._edition = _.edition), A._defaultEdition = "proto3", A;
7415
7416
  }, y.prototype.toJSON = function(m) {
7416
- var _ = u.prototype.toJSON.call(this, m), A = m ? !!m.keepComments : !1;
7417
+ var _ = a.prototype.toJSON.call(this, m), A = m ? !!m.keepComments : !1;
7417
7418
  return t.toObject([
7418
7419
  "edition",
7419
7420
  this._editionToJSON(),
7420
7421
  "options",
7421
7422
  _ && _.options || void 0,
7422
7423
  "oneofs",
7423
- u.arrayToJSON(this.oneofsArray, m),
7424
+ a.arrayToJSON(this.oneofsArray, m),
7424
7425
  "fields",
7425
- u.arrayToJSON(this.fieldsArray.filter(function(I) {
7426
+ a.arrayToJSON(this.fieldsArray.filter(function(I) {
7426
7427
  return !I.declaringField;
7427
7428
  }), m) || {},
7428
7429
  "extensions",
@@ -7438,7 +7439,7 @@ function requireType() {
7438
7439
  ]);
7439
7440
  }, y.prototype.resolveAll = function() {
7440
7441
  if (!this._needsRecursiveResolve) return this;
7441
- u.prototype.resolveAll.call(this);
7442
+ a.prototype.resolveAll.call(this);
7442
7443
  var m = this.oneofsArray;
7443
7444
  for (A = 0; A < m.length; )
7444
7445
  m[A++].resolve();
@@ -7446,7 +7447,7 @@ function requireType() {
7446
7447
  _[A++].resolve();
7447
7448
  return this;
7448
7449
  }, y.prototype._resolveFeaturesRecursive = function(m) {
7449
- return this._needsRecursiveFeatureResolution ? (m = this._edition || m, u.prototype._resolveFeaturesRecursive.call(this, m), this.oneofsArray.forEach((_) => {
7450
+ return this._needsRecursiveFeatureResolution ? (m = this._edition || m, a.prototype._resolveFeaturesRecursive.call(this, m), this.oneofsArray.forEach((_) => {
7450
7451
  _._resolveFeatures(m);
7451
7452
  }), this.fieldsArray.forEach((_) => {
7452
7453
  _._resolveFeatures(m);
@@ -7468,7 +7469,7 @@ function requireType() {
7468
7469
  throw Error("name '" + m.name + "' is reserved in " + this);
7469
7470
  return m.parent && m.parent.remove(m), this.fields[m.name] = m, m.message = this, m.onAdd(this), E(this);
7470
7471
  }
7471
- return m instanceof h ? (this.oneofs || (this.oneofs = {}), this.oneofs[m.name] = m, m.onAdd(this), E(this)) : u.prototype.add.call(this, m);
7472
+ return m instanceof h ? (this.oneofs || (this.oneofs = {}), this.oneofs[m.name] = m, m.onAdd(this), E(this)) : a.prototype.add.call(this, m);
7472
7473
  }, y.prototype.remove = function(m) {
7473
7474
  if (m instanceof c && m.extend === void 0) {
7474
7475
  if (!this.fields || this.fields[m.name] !== m)
@@ -7480,11 +7481,11 @@ function requireType() {
7480
7481
  throw Error(m + " is not a member of " + this);
7481
7482
  return delete this.oneofs[m.name], m.parent = null, m.onRemove(this), E(this);
7482
7483
  }
7483
- return u.prototype.remove.call(this, m);
7484
+ return a.prototype.remove.call(this, m);
7484
7485
  }, y.prototype.isReservedId = function(m) {
7485
- return u.isReservedId(this.reserved, m);
7486
+ return a.isReservedId(this.reserved, m);
7486
7487
  }, y.prototype.isReservedName = function(m) {
7487
- return u.isReservedName(this.reserved, m);
7488
+ return a.isReservedName(this.reserved, m);
7488
7489
  }, y.prototype.create = function(m) {
7489
7490
  return new this.ctor(m);
7490
7491
  }, y.prototype.setup = function() {
@@ -7499,7 +7500,7 @@ function requireType() {
7499
7500
  Reader: r,
7500
7501
  types: _,
7501
7502
  util: t
7502
- }), this.verify = a(this)({
7503
+ }), this.verify = u(this)({
7503
7504
  types: _,
7504
7505
  util: t
7505
7506
  }), this.fromObject = o.fromObject(this)({
@@ -7539,22 +7540,22 @@ var root$1, hasRequiredRoot;
7539
7540
  function requireRoot() {
7540
7541
  if (hasRequiredRoot) return root$1;
7541
7542
  hasRequiredRoot = 1, root$1 = i;
7542
- var u = requireNamespace();
7543
- ((i.prototype = Object.create(u.prototype)).constructor = i).className = "Root";
7543
+ var a = requireNamespace();
7544
+ ((i.prototype = Object.create(a.prototype)).constructor = i).className = "Root";
7544
7545
  var f = requireField(), h = require_enum(), c = requireOneof(), d = requireUtil(), n, e, r;
7545
- function i(a) {
7546
- u.call(this, "", a), this.deferred = [], this.files = [], this._edition = "proto2", this._fullyQualifiedObjects = {};
7546
+ function i(u) {
7547
+ a.call(this, "", u), this.deferred = [], this.files = [], this._edition = "proto2", this._fullyQualifiedObjects = {};
7547
7548
  }
7548
7549
  i.fromJSON = function(o, p) {
7549
7550
  return p || (p = new i()), o.options && p.setOptions(o.options), p.addJSON(o.nested).resolveAll();
7550
7551
  }, i.prototype.resolvePath = d.path.resolve, i.prototype.fetch = d.fetch;
7551
7552
  function t() {
7552
7553
  }
7553
- i.prototype.load = function a(o, p, y) {
7554
+ i.prototype.load = function u(o, p, y) {
7554
7555
  typeof p == "function" && (y = p, p = void 0);
7555
7556
  var E = this;
7556
7557
  if (!y)
7557
- return d.asPromise(a, E, o, p);
7558
+ return d.asPromise(u, E, o, p);
7558
7559
  var v = y === t;
7559
7560
  function m(B, L) {
7560
7561
  if (y) {
@@ -7636,10 +7637,10 @@ function requireRoot() {
7636
7637
  throw Error("unresolvable extensions: " + this.deferred.map(function(o) {
7637
7638
  return "'extend " + o.extend + "' in " + o.parent.fullName;
7638
7639
  }).join(", "));
7639
- return u.prototype.resolveAll.call(this);
7640
+ return a.prototype.resolveAll.call(this);
7640
7641
  };
7641
7642
  var l = /^[A-Z]/;
7642
- function s(a, o) {
7643
+ function s(u, o) {
7643
7644
  var p = o.parent.lookup(o.extend);
7644
7645
  if (p) {
7645
7646
  var y = new f(o.fullName, o.id, o.type, o.rule, void 0, o.options);
@@ -7681,66 +7682,66 @@ function requireRoot() {
7681
7682
  }
7682
7683
  } else if (o instanceof h)
7683
7684
  l.test(o.name) && delete o.parent[o.name];
7684
- else if (o instanceof u) {
7685
+ else if (o instanceof a) {
7685
7686
  for (var y = 0; y < /* initializes */
7686
7687
  o.nestedArray.length; ++y)
7687
7688
  this._handleRemove(o._nestedArray[y]);
7688
7689
  l.test(o.name) && delete o.parent[o.name];
7689
7690
  }
7690
7691
  delete this._fullyQualifiedObjects[o.fullName];
7691
- }, i._configure = function(a, o, p) {
7692
- n = a, e = o, r = p;
7692
+ }, i._configure = function(u, o, p) {
7693
+ n = u, e = o, r = p;
7693
7694
  }, root$1;
7694
7695
  }
7695
7696
  var hasRequiredUtil;
7696
7697
  function requireUtil() {
7697
7698
  if (hasRequiredUtil) return util.exports;
7698
7699
  hasRequiredUtil = 1;
7699
- var u = util.exports = requireMinimal(), f = requireRoots(), h, c;
7700
- u.codegen = requireCodegen(), u.fetch = requireFetch(), u.path = requirePath(), u.fs = u.inquire("fs"), u.toArray = function(t) {
7700
+ var a = util.exports = requireMinimal(), f = requireRoots(), h, c;
7701
+ a.codegen = requireCodegen(), a.fetch = requireFetch(), a.path = requirePath(), a.fs = a.inquire("fs"), a.toArray = function(t) {
7701
7702
  if (t) {
7702
- for (var l = Object.keys(t), s = new Array(l.length), a = 0; a < l.length; )
7703
- s[a] = t[l[a++]];
7703
+ for (var l = Object.keys(t), s = new Array(l.length), u = 0; u < l.length; )
7704
+ s[u] = t[l[u++]];
7704
7705
  return s;
7705
7706
  }
7706
7707
  return [];
7707
- }, u.toObject = function(t) {
7708
+ }, a.toObject = function(t) {
7708
7709
  for (var l = {}, s = 0; s < t.length; ) {
7709
- var a = t[s++], o = t[s++];
7710
- o !== void 0 && (l[a] = o);
7710
+ var u = t[s++], o = t[s++];
7711
+ o !== void 0 && (l[u] = o);
7711
7712
  }
7712
7713
  return l;
7713
7714
  };
7714
7715
  var d = /\\\\/g, n = /"/g;
7715
- u.isReserved = function(t) {
7716
+ a.isReserved = function(t) {
7716
7717
  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(t);
7717
- }, u.safeProp = function(t) {
7718
- return !/^[$\\w_]+$/.test(t) || u.isReserved(t) ? '["' + t.replace(d, "\\\\\\\\").replace(n, '\\\\"') + '"]' : "." + t;
7719
- }, u.ucFirst = function(t) {
7718
+ }, a.safeProp = function(t) {
7719
+ return !/^[$\\w_]+$/.test(t) || a.isReserved(t) ? '["' + t.replace(d, "\\\\\\\\").replace(n, '\\\\"') + '"]' : "." + t;
7720
+ }, a.ucFirst = function(t) {
7720
7721
  return t.charAt(0).toUpperCase() + t.substring(1);
7721
7722
  };
7722
7723
  var e = /_([a-z])/g;
7723
- u.camelCase = function(t) {
7724
+ a.camelCase = function(t) {
7724
7725
  return t.substring(0, 1) + t.substring(1).replace(e, function(l, s) {
7725
7726
  return s.toUpperCase();
7726
7727
  });
7727
- }, u.compareFieldsById = function(t, l) {
7728
+ }, a.compareFieldsById = function(t, l) {
7728
7729
  return t.id - l.id;
7729
- }, u.decorateType = function(t, l) {
7730
+ }, a.decorateType = function(t, l) {
7730
7731
  if (t.$type)
7731
- return l && t.$type.name !== l && (u.decorateRoot.remove(t.$type), t.$type.name = l, u.decorateRoot.add(t.$type)), t.$type;
7732
+ return l && t.$type.name !== l && (a.decorateRoot.remove(t.$type), t.$type.name = l, a.decorateRoot.add(t.$type)), t.$type;
7732
7733
  h || (h = requireType());
7733
7734
  var s = new h(l || t.name);
7734
- return u.decorateRoot.add(s), s.ctor = t, Object.defineProperty(t, "$type", { value: s, enumerable: !1 }), Object.defineProperty(t.prototype, "$type", { value: s, enumerable: !1 }), s;
7735
+ return a.decorateRoot.add(s), s.ctor = t, Object.defineProperty(t, "$type", { value: s, enumerable: !1 }), Object.defineProperty(t.prototype, "$type", { value: s, enumerable: !1 }), s;
7735
7736
  };
7736
7737
  var r = 0;
7737
- return u.decorateEnum = function(t) {
7738
+ return a.decorateEnum = function(t) {
7738
7739
  if (t.$type)
7739
7740
  return t.$type;
7740
7741
  c || (c = require_enum());
7741
7742
  var l = new c("Enum" + r++, t);
7742
- return u.decorateRoot.add(l), Object.defineProperty(t, "$type", { value: l, enumerable: !1 }), l;
7743
- }, u.setProperty = function(t, l, s, a) {
7743
+ return a.decorateRoot.add(l), Object.defineProperty(t, "$type", { value: l, enumerable: !1 }), l;
7744
+ }, a.setProperty = function(t, l, s, u) {
7744
7745
  function o(p, y, E) {
7745
7746
  var v = y.shift();
7746
7747
  if (v === "__proto__" || v === "prototype")
@@ -7749,7 +7750,7 @@ function requireUtil() {
7749
7750
  p[v] = o(p[v] || {}, y, E);
7750
7751
  else {
7751
7752
  var m = p[v];
7752
- if (m && a)
7753
+ if (m && u)
7753
7754
  return p;
7754
7755
  m && (E = [].concat(m).concat(E)), p[v] = E;
7755
7756
  }
@@ -7760,7 +7761,7 @@ function requireUtil() {
7760
7761
  if (!l)
7761
7762
  throw TypeError("path must be specified");
7762
7763
  return l = l.split("."), o(t, l, s);
7763
- }, Object.defineProperty(u, "decorateRoot", {
7764
+ }, Object.defineProperty(a, "decorateRoot", {
7764
7765
  get: function() {
7765
7766
  return f.decorated || (f.decorated = new (requireRoot())());
7766
7767
  }
@@ -7768,8 +7769,8 @@ function requireUtil() {
7768
7769
  }
7769
7770
  var hasRequiredTypes;
7770
7771
  function requireTypes() {
7771
- return hasRequiredTypes || (hasRequiredTypes = 1, function(u) {
7772
- var f = u, h = requireUtil(), c = [
7772
+ return hasRequiredTypes || (hasRequiredTypes = 1, function(a) {
7773
+ var f = a, h = requireUtil(), c = [
7773
7774
  "double",
7774
7775
  // 0
7775
7776
  "float",
@@ -7940,15 +7941,15 @@ var field, hasRequiredField;
7940
7941
  function requireField() {
7941
7942
  if (hasRequiredField) return field;
7942
7943
  hasRequiredField = 1, field = e;
7943
- var u = requireObject();
7944
- ((e.prototype = Object.create(u.prototype)).constructor = e).className = "Field";
7944
+ var a = requireObject();
7945
+ ((e.prototype = Object.create(a.prototype)).constructor = e).className = "Field";
7945
7946
  var f = require_enum(), h = requireTypes(), c = requireUtil(), d, n = /^required|optional|repeated$/;
7946
7947
  e.fromJSON = function(i, t) {
7947
7948
  var l = new e(i, t.id, t.type, t.rule, t.extend, t.options, t.comment);
7948
7949
  return t.edition && (l._edition = t.edition), l._defaultEdition = "proto3", l;
7949
7950
  };
7950
- function e(r, i, t, l, s, a, o) {
7951
- if (c.isObject(l) ? (o = s, a = l, l = s = void 0) : c.isObject(s) && (o = a, a = s, s = void 0), u.call(this, r, a), !c.isInteger(i) || i < 0)
7951
+ function e(r, i, t, l, s, u, o) {
7952
+ if (c.isObject(l) ? (o = s, u = l, l = s = void 0) : c.isObject(s) && (o = u, u = s, s = void 0), a.call(this, r, u), !c.isInteger(i) || i < 0)
7952
7953
  throw TypeError("id must be a non-negative integer");
7953
7954
  if (!c.isString(t))
7954
7955
  throw TypeError("type must be a string");
@@ -7984,7 +7985,7 @@ function requireField() {
7984
7985
  this._features.field_presence !== "IMPLICIT";
7985
7986
  }
7986
7987
  }), e.prototype.setOption = function(i, t, l) {
7987
- return u.prototype.setOption.call(this, i, t, l);
7988
+ return a.prototype.setOption.call(this, i, t, l);
7988
7989
  }, e.prototype.toJSON = function(i) {
7989
7990
  var t = i ? !!i.keepComments : !1;
7990
7991
  return c.toObject([
@@ -8012,7 +8013,7 @@ function requireField() {
8012
8013
  var i;
8013
8014
  c.base64.test(this.typeDefault) ? c.base64.decode(this.typeDefault, i = c.newBuffer(c.base64.length(this.typeDefault)), 0) : c.utf8.write(this.typeDefault, i = c.newBuffer(c.utf8.length(this.typeDefault)), 0), this.typeDefault = i;
8014
8015
  }
8015
- return this.map ? this.defaultValue = c.emptyObject : this.repeated ? this.defaultValue = c.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof d && (this.parent.ctor.prototype[this.name] = this.defaultValue), u.prototype.resolve.call(this);
8016
+ return this.map ? this.defaultValue = c.emptyObject : this.repeated ? this.defaultValue = c.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof d && (this.parent.ctor.prototype[this.name] = this.defaultValue), a.prototype.resolve.call(this);
8016
8017
  }, e.prototype._inferLegacyProtoFeatures = function(i) {
8017
8018
  if (i !== "proto2" && i !== "proto3")
8018
8019
  return {};
@@ -8023,7 +8024,7 @@ function requireField() {
8023
8024
  }
8024
8025
  return this.getOption("packed") === !0 ? t.repeated_field_encoding = "PACKED" : this.getOption("packed") === !1 && (t.repeated_field_encoding = "EXPANDED"), t;
8025
8026
  }, e.prototype._resolveFeatures = function(i) {
8026
- return u.prototype._resolveFeatures.call(this, this._edition || i);
8027
+ return a.prototype._resolveFeatures.call(this, this._edition || i);
8027
8028
  }, e.d = function(i, t, l, s) {
8028
8029
  return typeof t == "function" ? t = c.decorateType(t).name : t && typeof t == "object" && (t = c.decorateEnum(t).name), function(o, p) {
8029
8030
  c.decorateType(o.constructor).add(new e(p, i, t, l, { default: s }));
@@ -8036,11 +8037,11 @@ var oneof, hasRequiredOneof;
8036
8037
  function requireOneof() {
8037
8038
  if (hasRequiredOneof) return oneof;
8038
8039
  hasRequiredOneof = 1, oneof = c;
8039
- var u = requireObject();
8040
- ((c.prototype = Object.create(u.prototype)).constructor = c).className = "OneOf";
8040
+ var a = requireObject();
8041
+ ((c.prototype = Object.create(a.prototype)).constructor = c).className = "OneOf";
8041
8042
  var f = requireField(), h = requireUtil();
8042
8043
  function c(n, e, r, i) {
8043
- if (Array.isArray(e) || (r = e, e = void 0), u.call(this, n, r), !(e === void 0 || Array.isArray(e)))
8044
+ if (Array.isArray(e) || (r = e, e = void 0), a.call(this, n, r), !(e === void 0 || Array.isArray(e)))
8044
8045
  throw TypeError("fieldNames must be an Array");
8045
8046
  this.oneof = e || [], this.fieldsArray = [], this.comment = i;
8046
8047
  }
@@ -8074,7 +8075,7 @@ function requireOneof() {
8074
8075
  throw Error(e + " is not a member of " + this);
8075
8076
  return this.fieldsArray.splice(r, 1), r = this.oneof.indexOf(e.name), r > -1 && this.oneof.splice(r, 1), e.partOf = null, this;
8076
8077
  }, c.prototype.onAdd = function(e) {
8077
- u.prototype.onAdd.call(this, e);
8078
+ a.prototype.onAdd.call(this, e);
8078
8079
  for (var r = this, i = 0; i < this.oneof.length; ++i) {
8079
8080
  var t = e.get(this.oneof[i]);
8080
8081
  t && !t.partOf && (t.partOf = r, r.fieldsArray.push(t));
@@ -8083,7 +8084,7 @@ function requireOneof() {
8083
8084
  }, c.prototype.onRemove = function(e) {
8084
8085
  for (var r = 0, i; r < this.fieldsArray.length; ++r)
8085
8086
  (i = this.fieldsArray[r]).parent && i.parent.remove(i);
8086
- u.prototype.onRemove.call(this, e);
8087
+ a.prototype.onRemove.call(this, e);
8087
8088
  }, Object.defineProperty(c.prototype, "isProto3Optional", {
8088
8089
  get: function() {
8089
8090
  if (this.fieldsArray == null || this.fieldsArray.length !== 1)
@@ -8106,7 +8107,7 @@ var object, hasRequiredObject;
8106
8107
  function requireObject() {
8107
8108
  if (hasRequiredObject) return object;
8108
8109
  hasRequiredObject = 1, object = r, r.className = "ReflectionObject";
8109
- const u = requireOneof();
8110
+ const a = requireOneof();
8110
8111
  var f = requireUtil(), h, c = { enum_type: "OPEN", field_presence: "EXPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY", enforce_naming_style: "STYLE2024", default_symbol_visibility: "EXPORT_TOP_LEVEL" }, d = { enum_type: "OPEN", field_presence: "EXPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY", enforce_naming_style: "STYLE_LEGACY", default_symbol_visibility: "EXPORT_ALL" }, n = { enum_type: "CLOSED", field_presence: "EXPLICIT", json_format: "LEGACY_BEST_EFFORT", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "EXPANDED", utf8_validation: "NONE", enforce_naming_style: "STYLE_LEGACY", default_symbol_visibility: "EXPORT_ALL" }, e = { enum_type: "OPEN", field_presence: "IMPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY", enforce_naming_style: "STYLE_LEGACY", default_symbol_visibility: "EXPORT_ALL" };
8111
8112
  function r(i, t) {
8112
8113
  if (!f.isString(i))
@@ -8179,9 +8180,9 @@ function requireObject() {
8179
8180
  this._features = Object.assign(l, s || {}), this._featuresResolved = !0;
8180
8181
  return;
8181
8182
  }
8182
- if (this.partOf instanceof u) {
8183
- var a = Object.assign({}, this.partOf._features);
8184
- this._features = Object.assign(a, s || {});
8183
+ if (this.partOf instanceof a) {
8184
+ var u = Object.assign({}, this.partOf._features);
8185
+ this._features = Object.assign(u, s || {});
8185
8186
  } else if (!this.declaringField) if (this.parent) {
8186
8187
  var o = Object.assign({}, this.parent._features);
8187
8188
  this._features = Object.assign(o, s || {});
@@ -8198,25 +8199,25 @@ function requireObject() {
8198
8199
  return this.options || (this.options = {}), /^features\\./.test(t) ? f.setProperty(this.options, t, l, s) : (!s || this.options[t] === void 0) && (this.getOption(t) !== l && (this.resolved = !1), this.options[t] = l), this;
8199
8200
  }, r.prototype.setParsedOption = function(t, l, s) {
8200
8201
  this.parsedOptions || (this.parsedOptions = []);
8201
- var a = this.parsedOptions;
8202
+ var u = this.parsedOptions;
8202
8203
  if (s) {
8203
- var o = a.find(function(E) {
8204
+ var o = u.find(function(E) {
8204
8205
  return Object.prototype.hasOwnProperty.call(E, t);
8205
8206
  });
8206
8207
  if (o) {
8207
8208
  var p = o[t];
8208
8209
  f.setProperty(p, s, l);
8209
8210
  } else
8210
- o = {}, o[t] = f.setProperty({}, s, l), a.push(o);
8211
+ o = {}, o[t] = f.setProperty({}, s, l), u.push(o);
8211
8212
  } else {
8212
8213
  var y = {};
8213
- y[t] = l, a.push(y);
8214
+ y[t] = l, u.push(y);
8214
8215
  }
8215
8216
  return this;
8216
8217
  }, r.prototype.setOptions = function(t, l) {
8217
8218
  if (t)
8218
- for (var s = Object.keys(t), a = 0; a < s.length; ++a)
8219
- this.setOption(s[a], t[s[a]], l);
8219
+ for (var s = Object.keys(t), u = 0; u < s.length; ++u)
8220
+ this.setOption(s[u], t[s[u]], l);
8220
8221
  return this;
8221
8222
  }, r.prototype.toString = function() {
8222
8223
  var t = this.constructor.className, l = this.fullName;
@@ -8232,18 +8233,18 @@ var _enum, hasRequired_enum;
8232
8233
  function require_enum() {
8233
8234
  if (hasRequired_enum) return _enum;
8234
8235
  hasRequired_enum = 1, _enum = c;
8235
- var u = requireObject();
8236
- ((c.prototype = Object.create(u.prototype)).constructor = c).className = "Enum";
8236
+ var a = requireObject();
8237
+ ((c.prototype = Object.create(a.prototype)).constructor = c).className = "Enum";
8237
8238
  var f = requireNamespace(), h = requireUtil();
8238
8239
  function c(d, n, e, r, i, t) {
8239
- if (u.call(this, d, e), n && typeof n != "object")
8240
+ if (a.call(this, d, e), n && typeof n != "object")
8240
8241
  throw TypeError("values must be an object");
8241
8242
  if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = r, this.comments = i || {}, this.valuesOptions = t, this._valuesFeatures = {}, this.reserved = void 0, n)
8242
8243
  for (var l = Object.keys(n), s = 0; s < l.length; ++s)
8243
8244
  typeof n[l[s]] == "number" && (this.valuesById[this.values[l[s]] = n[l[s]]] = l[s]);
8244
8245
  }
8245
8246
  return c.prototype._resolveFeatures = function(n) {
8246
- return n = this._edition || n, u.prototype._resolveFeatures.call(this, n), Object.keys(this.values).forEach((e) => {
8247
+ return n = this._edition || n, a.prototype._resolveFeatures.call(this, n), Object.keys(this.values).forEach((e) => {
8247
8248
  var r = Object.assign({}, this._features);
8248
8249
  this._valuesFeatures[e] = Object.assign(r, this.valuesOptions && this.valuesOptions[e] && this.valuesOptions[e].features);
8249
8250
  }), this;
@@ -8303,7 +8304,7 @@ var encoder_1, hasRequiredEncoder;
8303
8304
  function requireEncoder() {
8304
8305
  if (hasRequiredEncoder) return encoder_1;
8305
8306
  hasRequiredEncoder = 1, encoder_1 = d;
8306
- var u = require_enum(), f = requireTypes(), h = requireUtil();
8307
+ var a = require_enum(), f = requireTypes(), h = requireUtil();
8307
8308
  function c(n, e, r, i) {
8308
8309
  return e.delimited ? n("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", r, i, (e.id << 3 | 3) >>> 0, (e.id << 3 | 4) >>> 0) : n("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", r, i, (e.id << 3 | 2) >>> 0);
8309
8310
  }
@@ -8312,8 +8313,8 @@ function requireEncoder() {
8312
8313
  /* initializes */
8313
8314
  n.fieldsArray.slice().sort(h.compareFieldsById)
8314
8315
  ), r = 0; r < t.length; ++r) {
8315
- var l = t[r].resolve(), s = n._fieldsArray.indexOf(l), a = l.resolvedType instanceof u ? "int32" : l.type, o = f.basic[a];
8316
- i = "m" + h.safeProp(l.name), l.map ? (e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", i, l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (l.id << 3 | 2) >>> 0, 8 | f.mapKey[l.keyType], l.keyType), o === void 0 ? e("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", s, i) : e(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | o, a, i), e("}")("}")) : l.repeated ? (e("if(%s!=null&&%s.length){", i, i), l.packed && f.packed[a] !== void 0 ? e("w.uint32(%i).fork()", (l.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", i)("w.%s(%s[i])", a, i)("w.ldelim()") : (e("for(var i=0;i<%s.length;++i)", i), o === void 0 ? c(e, l, s, i + "[i]") : e("w.uint32(%i).%s(%s[i])", (l.id << 3 | o) >>> 0, a, i)), e("}")) : (l.optional && e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", i, l.name), o === void 0 ? c(e, l, s, i) : e("w.uint32(%i).%s(%s)", (l.id << 3 | o) >>> 0, a, i));
8316
+ var l = t[r].resolve(), s = n._fieldsArray.indexOf(l), u = l.resolvedType instanceof a ? "int32" : l.type, o = f.basic[u];
8317
+ i = "m" + h.safeProp(l.name), l.map ? (e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", i, l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (l.id << 3 | 2) >>> 0, 8 | f.mapKey[l.keyType], l.keyType), o === void 0 ? e("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", s, i) : e(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | o, u, i), e("}")("}")) : l.repeated ? (e("if(%s!=null&&%s.length){", i, i), l.packed && f.packed[u] !== void 0 ? e("w.uint32(%i).fork()", (l.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", i)("w.%s(%s[i])", u, i)("w.ldelim()") : (e("for(var i=0;i<%s.length;++i)", i), o === void 0 ? c(e, l, s, i + "[i]") : e("w.uint32(%i).%s(%s[i])", (l.id << 3 | o) >>> 0, u, i)), e("}")) : (l.optional && e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", i, l.name), o === void 0 ? c(e, l, s, i) : e("w.uint32(%i).%s(%s)", (l.id << 3 | o) >>> 0, u, i));
8317
8318
  }
8318
8319
  return e("return w");
8319
8320
  }
@@ -8323,22 +8324,22 @@ var hasRequiredIndexLight;
8323
8324
  function requireIndexLight() {
8324
8325
  if (hasRequiredIndexLight) return indexLight.exports;
8325
8326
  hasRequiredIndexLight = 1;
8326
- var u = indexLight.exports = requireIndexMinimal();
8327
- u.build = "light";
8327
+ var a = indexLight.exports = requireIndexMinimal();
8328
+ a.build = "light";
8328
8329
  function f(c, d, n) {
8329
- return typeof d == "function" ? (n = d, d = new u.Root()) : d || (d = new u.Root()), d.load(c, n);
8330
+ return typeof d == "function" ? (n = d, d = new a.Root()) : d || (d = new a.Root()), d.load(c, n);
8330
8331
  }
8331
- u.load = f;
8332
+ a.load = f;
8332
8333
  function h(c, d) {
8333
- return d || (d = new u.Root()), d.loadSync(c);
8334
+ return d || (d = new a.Root()), d.loadSync(c);
8334
8335
  }
8335
- return u.loadSync = h, u.encoder = requireEncoder(), u.decoder = requireDecoder(), u.verifier = requireVerifier(), u.converter = requireConverter(), u.ReflectionObject = requireObject(), u.Namespace = requireNamespace(), u.Root = requireRoot(), u.Enum = require_enum(), u.Type = requireType(), u.Field = requireField(), u.OneOf = requireOneof(), u.MapField = requireMapfield(), u.Service = requireService(), u.Method = requireMethod(), u.Message = requireMessage(), u.wrappers = requireWrappers(), u.types = requireTypes(), u.util = requireUtil(), u.ReflectionObject._configure(u.Root), u.Namespace._configure(u.Type, u.Service, u.Enum), u.Root._configure(u.Type), u.Field._configure(u.Type), indexLight.exports;
8336
+ return a.loadSync = h, a.encoder = requireEncoder(), a.decoder = requireDecoder(), a.verifier = requireVerifier(), a.converter = requireConverter(), a.ReflectionObject = requireObject(), a.Namespace = requireNamespace(), a.Root = requireRoot(), a.Enum = require_enum(), a.Type = requireType(), a.Field = requireField(), a.OneOf = requireOneof(), a.MapField = requireMapfield(), a.Service = requireService(), a.Method = requireMethod(), a.Message = requireMessage(), a.wrappers = requireWrappers(), a.types = requireTypes(), a.util = requireUtil(), a.ReflectionObject._configure(a.Root), a.Namespace._configure(a.Type, a.Service, a.Enum), a.Root._configure(a.Type), a.Field._configure(a.Type), indexLight.exports;
8336
8337
  }
8337
8338
  var tokenize_1, hasRequiredTokenize;
8338
8339
  function requireTokenize() {
8339
8340
  if (hasRequiredTokenize) return tokenize_1;
8340
8341
  hasRequiredTokenize = 1, tokenize_1 = l;
8341
- var u = /[\\s{}=;:[\\],'"()<>]/g, f = /(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)")/g, h = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g, c = /^ *[*/]+ */, d = /^\\s*\\*?\\/*/, n = /\\n/g, e = /\\s/, r = /\\\\(.?)/g, i = {
8342
+ var a = /[\\s{}=;:[\\],'"()<>]/g, f = /(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)")/g, h = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g, c = /^ *[*/]+ */, d = /^\\s*\\*?\\/*/, n = /\\n/g, e = /\\s/, r = /\\\\(.?)/g, i = {
8342
8343
  0: "\\0",
8343
8344
  r: "\\r",
8344
8345
  n: \`
@@ -8346,7 +8347,7 @@ function requireTokenize() {
8346
8347
  t: " "
8347
8348
  };
8348
8349
  function t(s) {
8349
- return s.replace(r, function(a, o) {
8350
+ return s.replace(r, function(u, o) {
8350
8351
  switch (o) {
8351
8352
  case "\\\\":
8352
8353
  case "":
@@ -8357,7 +8358,7 @@ function requireTokenize() {
8357
8358
  });
8358
8359
  }
8359
8360
  l.unescape = t;
8360
- function l(s, a) {
8361
+ function l(s, u) {
8361
8362
  s = s.toString();
8362
8363
  var o = 0, p = s.length, y = 1, E = 0, v = {}, m = [], _ = null;
8363
8364
  function A(k) {
@@ -8380,7 +8381,7 @@ function requireTokenize() {
8380
8381
  lineEmpty: !1,
8381
8382
  leading: F
8382
8383
  }, H;
8383
- a ? H = 2 : H = 3;
8384
+ u ? H = 2 : H = 3;
8384
8385
  var D = k - H, $;
8385
8386
  do
8386
8387
  if (--D < 0 || ($ = s.charAt(D)) === \`
@@ -8389,9 +8390,9 @@ function requireTokenize() {
8389
8390
  break;
8390
8391
  }
8391
8392
  while ($ === " " || $ === " ");
8392
- for (var X = s.substring(k, P).split(n), z = 0; z < X.length; ++z)
8393
- X[z] = X[z].replace(a ? d : c, "").trim();
8394
- W.text = X.join(\`
8393
+ for (var Y = s.substring(k, P).split(n), z = 0; z < Y.length; ++z)
8394
+ Y[z] = Y[z].replace(u ? d : c, "").trim();
8395
+ W.text = Y.join(\`
8395
8396
  \`).trim(), v[y] = W, E = y;
8396
8397
  }
8397
8398
  function K(k) {
@@ -8421,7 +8422,7 @@ function requireTokenize() {
8421
8422
  if (++o === p)
8422
8423
  throw A("comment");
8423
8424
  if (C(o) === "/")
8424
- if (a) {
8425
+ if (u) {
8425
8426
  if (W = o, H = !1, K(o - 1)) {
8426
8427
  H = !0;
8427
8428
  do
@@ -8439,7 +8440,7 @@ function requireTokenize() {
8439
8440
  ++o, H && (j(W, o - 1, D), D = !0), ++y, k = !0;
8440
8441
  }
8441
8442
  else if ((F = C(o)) === "*") {
8442
- W = o + 1, H = a || C(W) === "*";
8443
+ W = o + 1, H = u || C(W) === "*";
8443
8444
  do {
8444
8445
  if (F === \`
8445
8446
  \` && ++y, ++o === p)
@@ -8452,10 +8453,10 @@ function requireTokenize() {
8452
8453
  }
8453
8454
  } while (k);
8454
8455
  var $ = o;
8455
- u.lastIndex = 0;
8456
- var X = u.test(C($++));
8457
- if (!X)
8458
- for (; $ < p && !u.test(C($)); )
8456
+ a.lastIndex = 0;
8457
+ var Y = a.test(C($++));
8458
+ if (!Y)
8459
+ for (; $ < p && !a.test(C($)); )
8459
8460
  ++$;
8460
8461
  var z = s.substring(o, o = $);
8461
8462
  return (z === '"' || z === "'") && (_ = z), z;
@@ -8482,7 +8483,7 @@ function requireTokenize() {
8482
8483
  }
8483
8484
  function T(k) {
8484
8485
  var P = null, F;
8485
- return k === void 0 ? (F = v[y - 1], delete v[y - 1], F && (a || F.type === "*" || F.lineEmpty) && (P = F.leading ? F.text : null)) : (E < k && J(), F = v[k], delete v[k], F && !F.lineEmpty && (a || F.type === "/") && (P = F.leading ? null : F.text)), P;
8486
+ return k === void 0 ? (F = v[y - 1], delete v[y - 1], F && (u || F.type === "*" || F.lineEmpty) && (P = F.leading ? F.text : null)) : (E < k && J(), F = v[k], delete v[k], F && !F.lineEmpty && (u || F.type === "/") && (P = F.leading ? null : F.text)), P;
8486
8487
  }
8487
8488
  return Object.defineProperty({
8488
8489
  next: L,
@@ -8502,14 +8503,14 @@ var parse_1, hasRequiredParse;
8502
8503
  function requireParse() {
8503
8504
  if (hasRequiredParse) return parse_1;
8504
8505
  hasRequiredParse = 1, parse_1 = I, I.filename = null, I.defaults = { keepCase: !1 };
8505
- var u = requireTokenize(), f = requireRoot(), h = requireType(), c = requireField(), d = requireMapfield(), n = requireOneof(), e = require_enum(), r = requireService(), i = requireMethod(), t = requireObject(), l = requireTypes(), s = requireUtil(), a = /^[1-9][0-9]*$/, o = /^-?[1-9][0-9]*$/, p = /^0[x][0-9a-fA-F]+$/, y = /^-?0[x][0-9a-fA-F]+$/, E = /^0[0-7]+$/, v = /^-?0[0-7]+$/, m = /^(?![eE])[0-9]*(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, _ = /^[a-zA-Z_][a-zA-Z_0-9]*$/, A = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;
8506
+ var a = requireTokenize(), f = requireRoot(), h = requireType(), c = requireField(), d = requireMapfield(), n = requireOneof(), e = require_enum(), r = requireService(), i = requireMethod(), t = requireObject(), l = requireTypes(), s = requireUtil(), u = /^[1-9][0-9]*$/, o = /^-?[1-9][0-9]*$/, p = /^0[x][0-9a-fA-F]+$/, y = /^-?0[x][0-9a-fA-F]+$/, E = /^0[0-7]+$/, v = /^-?0[0-7]+$/, m = /^(?![eE])[0-9]*(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, _ = /^[a-zA-Z_][a-zA-Z_0-9]*$/, A = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;
8506
8507
  function I(C, j, K) {
8507
8508
  j instanceof f || (K = j, j = new f()), K || (K = I.defaults);
8508
- var B = K.preferTrailingComment || !1, L = u(C, K.alternateCommentMode || !1), S = L.next, J = L.push, M = L.peek, T = L.skip, k = L.cmnt, P = !0, F, W, H, D = "proto2", $ = j, X = [], z = {}, ae = K.keepCase ? function(R) {
8509
+ var B = K.preferTrailingComment || !1, L = a(C, K.alternateCommentMode || !1), S = L.next, J = L.push, M = L.peek, T = L.skip, k = L.cmnt, P = !0, F, W, H, D = "proto2", $ = j, Y = [], z = {}, ae = K.keepCase ? function(R) {
8509
8510
  return R;
8510
8511
  } : s.camelCase;
8511
8512
  function he() {
8512
- X.forEach((R) => {
8513
+ Y.forEach((R) => {
8513
8514
  R._edition = D, Object.keys(z).forEach((g) => {
8514
8515
  R.getOption(g) === void 0 && R.setOption(g, z[g], !0);
8515
8516
  });
@@ -8601,7 +8602,7 @@ function requireParse() {
8601
8602
  case "0":
8602
8603
  return 0;
8603
8604
  }
8604
- if (a.test(R))
8605
+ if (u.test(R))
8605
8606
  return O * parseInt(R, 10);
8606
8607
  if (p.test(R))
8607
8608
  return O * parseInt(R, 16);
@@ -8709,15 +8710,15 @@ function requireParse() {
8709
8710
  throw N(w);
8710
8711
  /* eslint-disable no-fallthrough */
8711
8712
  case "repeated":
8712
- Y(O, w);
8713
+ X(O, w);
8713
8714
  break;
8714
8715
  case "optional":
8715
8716
  if (D === "proto3")
8716
- Y(O, "proto3_optional");
8717
+ X(O, "proto3_optional");
8717
8718
  else {
8718
8719
  if (D !== "proto2")
8719
8720
  throw N(w);
8720
- Y(O, "optional");
8721
+ X(O, "optional");
8721
8722
  }
8722
8723
  break;
8723
8724
  case "oneof":
@@ -8732,12 +8733,12 @@ function requireParse() {
8732
8733
  default:
8733
8734
  if (D === "proto2" || !A.test(w))
8734
8735
  throw N(w);
8735
- J(w), Y(O, "optional");
8736
+ J(w), X(O, "optional");
8736
8737
  break;
8737
8738
  }
8738
- }), R.add(O), R === $ && X.push(O);
8739
+ }), R.add(O), R === $ && Y.push(O);
8739
8740
  }
8740
- function Y(R, g, O) {
8741
+ function X(R, g, O) {
8741
8742
  var b = S();
8742
8743
  if (b === "group") {
8743
8744
  _e(R, g);
@@ -8764,7 +8765,7 @@ function requireParse() {
8764
8765
  q.setOption("proto3_optional", !0), x.add(q), R.add(x);
8765
8766
  } else
8766
8767
  R.add(q);
8767
- R === $ && X.push(q);
8768
+ R === $ && Y.push(q);
8768
8769
  }
8769
8770
  function _e(R, g) {
8770
8771
  if (D >= 2023)
@@ -8784,10 +8785,10 @@ function requireParse() {
8784
8785
  break;
8785
8786
  case "required":
8786
8787
  case "repeated":
8787
- Y(q, U);
8788
+ X(q, U);
8788
8789
  break;
8789
8790
  case "optional":
8790
- D === "proto3" ? Y(q, "proto3_optional") : Y(q, "optional");
8791
+ D === "proto3" ? X(q, "proto3_optional") : X(q, "optional");
8791
8792
  break;
8792
8793
  case "message":
8793
8794
  ne(q, U);
@@ -8848,7 +8849,7 @@ function requireParse() {
8848
8849
  throw N(g, "name");
8849
8850
  var O = new n(ae(g));
8850
8851
  Z(O, function(w) {
8851
- w === "option" ? (Q(O, w), T(";")) : (J(w), Y(O, "optional"));
8852
+ w === "option" ? (Q(O, w), T(";")) : (J(w), X(O, "optional"));
8852
8853
  }), R.add(O);
8853
8854
  }
8854
8855
  function de(R, g) {
@@ -8866,7 +8867,7 @@ function requireParse() {
8866
8867
  default:
8867
8868
  Oe(O, w);
8868
8869
  }
8869
- }), R.add(O), R === $ && X.push(O);
8870
+ }), R.add(O), R === $ && Y.push(O);
8870
8871
  }
8871
8872
  function Oe(R, g) {
8872
8873
  if (!_.test(g))
@@ -8968,7 +8969,7 @@ function requireParse() {
8968
8969
  we(O, w);
8969
8970
  else
8970
8971
  throw N(w);
8971
- }), R.add(O), R === $ && X.push(O);
8972
+ }), R.add(O), R === $ && Y.push(O);
8972
8973
  }
8973
8974
  function we(R, g) {
8974
8975
  var O = k(), b = g;
@@ -8994,15 +8995,15 @@ function requireParse() {
8994
8995
  switch (w) {
8995
8996
  case "required":
8996
8997
  case "repeated":
8997
- Y(R, w, O);
8998
+ X(R, w, O);
8998
8999
  break;
8999
9000
  case "optional":
9000
- D === "proto3" ? Y(R, "proto3_optional", O) : Y(R, "optional", O);
9001
+ D === "proto3" ? X(R, "proto3_optional", O) : X(R, "optional", O);
9001
9002
  break;
9002
9003
  default:
9003
9004
  if (D === "proto2" || !A.test(w))
9004
9005
  throw N(w);
9005
- J(w), Y(R, "optional", O);
9006
+ J(w), X(R, "optional", O);
9006
9007
  break;
9007
9008
  }
9008
9009
  });
@@ -9052,9 +9053,9 @@ var common_1, hasRequiredCommon;
9052
9053
  function requireCommon() {
9053
9054
  if (hasRequiredCommon) return common_1;
9054
9055
  hasRequiredCommon = 1, common_1 = f;
9055
- var u = /\\/|\\./;
9056
+ var a = /\\/|\\./;
9056
9057
  function f(c, d) {
9057
- u.test(c) || (c = "google/protobuf/" + c + ".proto", d = { nested: { google: { nested: { protobuf: { nested: d } } } } }), f[c] = d;
9058
+ a.test(c) || (c = "google/protobuf/" + c + ".proto", d = { nested: { google: { nested: { protobuf: { nested: d } } } } }), f[c] = d;
9058
9059
  }
9059
9060
  f("any", {
9060
9061
  /**
@@ -9371,34 +9372,34 @@ var hasRequiredSrc;
9371
9372
  function requireSrc() {
9372
9373
  if (hasRequiredSrc) return src.exports;
9373
9374
  hasRequiredSrc = 1;
9374
- var u = src.exports = requireIndexLight();
9375
- return u.build = "full", u.tokenize = requireTokenize(), u.parse = requireParse(), u.common = requireCommon(), u.Root._configure(u.Type, u.parse, u.common), src.exports;
9375
+ var a = src.exports = requireIndexLight();
9376
+ return a.build = "full", a.tokenize = requireTokenize(), a.parse = requireParse(), a.common = requireCommon(), a.Root._configure(a.Type, a.parse, a.common), src.exports;
9376
9377
  }
9377
9378
  var protobufjs, hasRequiredProtobufjs;
9378
9379
  function requireProtobufjs() {
9379
9380
  return hasRequiredProtobufjs || (hasRequiredProtobufjs = 1, protobufjs = requireSrc()), protobufjs;
9380
9381
  }
9381
- var protobufjsExports = requireProtobufjs(), StateStreamErrorCode = /* @__PURE__ */ ((u) => (u.CONNECTION_FAILED = "CONNECTION_FAILED", u.RECONNECT_FAILED = "RECONNECT_FAILED", u.CONNECTION_LOST = "CONNECTION_LOST", u.CONNECTION_TIMEOUT = "CONNECTION_TIMEOUT", u.AUTH_FAILED = "AUTH_FAILED", u.AUTH_REFRESH_FAILED = "AUTH_REFRESH_FAILED", u.DEVICE_ERROR = "DEVICE_ERROR", u.DECODE_ERROR = "DECODE_ERROR", u.FRAME_PROCESS_ERROR = "FRAME_PROCESS_ERROR", u.STREAM_ALREADY_STARTED = "STREAM_ALREADY_STARTED", u.WORKER_INIT_FAILED = "WORKER_INIT_FAILED", u.UNKNOWN_ERROR = "UNKNOWN_ERROR", u))(StateStreamErrorCode || {}), ConnectionStatus = /* @__PURE__ */ ((u) => (u.DISCONNECTED = "DISCONNECTED", u.CONNECTING = "CONNECTING", u.CONNECTED = "CONNECTED", u.RECONNECTING = "RECONNECTING", u))(ConnectionStatus || {}), AuthStatus = /* @__PURE__ */ ((u) => (u.UNAUTHENTICATED = "UNAUTHENTICATED", u.AUTHENTICATING = "AUTHENTICATING", u.AUTHENTICATED = "AUTHENTICATED", u.REAUTHENTICATING = "REAUTHENTICATING", u.FAILED = "FAILED", u))(AuthStatus || {});
9382
- const DEFAULT_MAX_RECONNECT_ATTEMPTS = 5, DEFAULT_MAX_AUTH_ATTEMPTS = 5, nested = { BSB_State: { nested: { StateUpdate: { oneofs: { state: { oneof: ["deviceName", "power", "brightness", "audioVolume", "wifi", "updateState", "updateCheck", "timezone", "matter", "frame", "input", "timer", "ble", "autoUpdateState"] } }, fields: { deviceName: { type: "BSB_State.DeviceName", id: 1 }, power: { type: "BSB_State.Power", id: 2 }, brightness: { type: "BSB_State.Brightness", id: 3 }, audioVolume: { type: "BSB_State.AudioVolume", id: 4 }, wifi: { type: "BSB_State.Wifi", id: 5 }, updateState: { type: "BSB_Update.UpdateState", id: 6 }, updateCheck: { type: "BSB_Update.CheckState", id: 7 }, timezone: { type: "BSB_State.Timezone", id: 8 }, matter: { type: "BSB_State.Matter", id: 9 }, frame: { type: "BSB_Frame.Frame", id: 10 }, input: { type: "BSB_Input.InputEvent", id: 11 }, timer: { type: "BSB_Timer.Timer", id: 12 }, ble: { type: "BSB_State.Ble.Ble", id: 13 }, autoUpdateState: { type: "BSB_Update.AutoUpdateState", id: 14 } } }, State: { oneofs: { _error: { oneof: ["error"] } }, fields: { timestamp: { type: "fixed64", id: 1 }, updates: { rule: "repeated", type: "StateUpdate", id: 2 }, error: { type: "BSB_Error.Error", id: 3, options: { proto3_optional: !0 } } } }, DeviceName: { fields: { name: { type: "string", id: 1 } } }, BrightnessAutomatic: { fields: {} }, BrightnessManual: { fields: { brightness: { type: "uint32", id: 1 } } }, Brightness: { oneofs: { setting: { oneof: ["automatic", "manual"] } }, fields: { automatic: { type: "BrightnessAutomatic", id: 1 }, manual: { type: "BrightnessManual", id: 2 }, actualBrightness: { type: "uint32", id: 3 } } }, BatteryStatus: { values: { DISCHARGING: 0, CHARGING: 1, CHARGED: 2 } }, UnknownPowerState: { fields: {} }, PowerState: { fields: { batteryStatus: { type: "BatteryStatus", id: 1 }, batteryChargePercent: { type: "uint32", id: 2 }, batteryVoltageMv: { type: "uint32", id: 3 }, batteryCurrentMa: { type: "sint32", id: 4 }, usbVoltageMv: { type: "uint32", id: 5 } } }, Power: { oneofs: { state: { oneof: ["unknown", "known"] } }, fields: { unknown: { type: "UnknownPowerState", id: 1 }, known: { type: "PowerState", id: 2 } } }, AudioVolume: { fields: { volume: { type: "uint32", id: 1 } } }, WifiConnectionStatus: { values: { CONNECTED: 0, CONNECTING: 1, DISCONNECTING: 2, RECONNECTING: 3 } }, WifiSecurity: { values: { UNKNOWN: 0, OPEN: 1, WPA: 2, WPA2: 3, WEP: 4, WPA_WPA2: 5, WPA3: 6, WPA2_WPA3: 7 } }, IpConfigurationMethod: { values: { DHCP: 0, STATIC: 1 } }, IpProtocol: { values: { IPV4: 0, IPV6: 1 } }, WifiStateUnknown: { fields: {} }, WifiStateDisconnected: { fields: {} }, WifiStateConnected: { fields: { status: { type: "WifiConnectionStatus", id: 1 }, ssid: { type: "string", id: 2 }, bssid: { type: "string", id: 3 }, channel: { type: "uint32", id: 4 }, rssi: { type: "sint32", id: 5 }, security: { type: "WifiSecurity", id: 6 } } }, IpAddress: { fields: { protocol: { type: "IpProtocol", id: 1 }, method: { type: "IpConfigurationMethod", id: 2 }, address: { type: "string", id: 3 }, gateway: { type: "string", id: 4 }, netmask: { type: "string", id: 5 } } }, Wifi: { oneofs: { wifiState: { oneof: ["unknown", "disconnected", "connected"] } }, fields: { unknown: { type: "WifiStateUnknown", id: 1 }, disconnected: { type: "WifiStateDisconnected", id: 2 }, connected: { type: "WifiStateConnected", id: 3 }, ipAddresses: { rule: "repeated", type: "IpAddress", id: 4 } } }, Timezone: { fields: { name: { type: "string", id: 1 }, offset: { type: "sint32", id: 2 }, abbr: { type: "string", id: 3 } } }, MatterCommissioningStatus: { values: { NEVER_STARTED: 0, STARTED: 1, COMPLETED_SUCCESSFULLY: 2, FAILED: 3 } }, MatterCommissioningState: { fields: { status: { type: "MatterCommissioningStatus", id: 1 }, timestamp: { type: "fixed64", id: 2 } } }, Matter: { fields: { fabricCount: { type: "uint32", id: 1 }, state: { type: "MatterCommissioningState", id: 2 } } }, Ble: { nested: { ServiceStatus: { values: { RESET: 0, INITIALIZATION: 1, READY: 2, ADVERTISING: 3, CONNECTABLE: 4, CONNECTED: 5, ERROR: 6 } }, Ble: { oneofs: { _remoteAddress: { oneof: ["remoteAddress"] } }, fields: { status: { type: "ServiceStatus", id: 1 }, remoteAddress: { type: "string", id: 2, options: { proto3_optional: !0 } } } } } } } }, BSB_Update: { nested: { UpdateEvent: { values: { SESSION_START: 0, SESSION_STOP: 1, ACTION_BEGIN: 2, ACTION_DONE: 3, DETAIL_CHANGE: 4, ACTION_PROGRESS: 5, EVENT_NONE: 6 } }, UpdateAction: { values: { DOWNLOAD: 0, SHA_VERIFICATION: 1, UNPACK: 2, INSTALLATION_PREPARE: 3, INSTALLATION_APPLY: 4, ACTION_NONE: 5 } }, UpdateStatus: { values: { OK: 0, BATTERY_LOW: 1, BUSY: 2, DOWNLOAD_FAILURE: 3, DOWNLOAD_ABORT: 4, SHA_MISMATCH: 5, UNPACK_CREATE_STAGING_DIRECTORY_FAILURE: 6, UNPACK_ARCHIVE_OPEN_FAILURE: 7, UNPACK_ARCHIVE_UNPACK_FAILURE: 8, INSTALLATION_PREPARE_MANIFEST_NOT_FOUND: 9, INSTALLATION_PREPARE_MANIFEST_INVALID: 10, INSTALLATION_PREPARE_SESSION_CONFIG_SETUP_FAILURE: 11, INSTALLATION_PREPARE_POINTER_SETUP_FAILURE: 12, UNKNOWN_FAILURE: 13 } }, CheckError: { values: { NOT_AVAILABLE: 0, FAILURE: 1, IDLE: 2 } }, UpdateAvailable: { fields: { version: { type: "string", id: 1 } } }, UpdateUnavailable: { fields: { reason: { type: "CheckError", id: 1 } } }, UpdateState: { fields: { event: { type: "UpdateEvent", id: 1 }, action: { type: "UpdateAction", id: 2 }, status: { type: "UpdateStatus", id: 3 } } }, CheckState: { oneofs: { status: { oneof: ["available", "unavailable"] } }, fields: { available: { type: "UpdateAvailable", id: 1 }, unavailable: { type: "UpdateUnavailable", id: 2 } } }, AutoUpdateInterval: { fields: { start: { type: "uint32", id: 1 }, end: { type: "uint32", id: 2 } } }, AutoUpdateState: { fields: { enabled: { type: "bool", id: 1 }, interval: { type: "AutoUpdateInterval", id: 2 } } } } }, BSB_Frame: { nested: { Encoding: { values: { PLAIN: 0, RUN_LENGTH: 1, DEFLATE: 2, DEFLATE_RUN_LENGTH: 3 } }, PixelFormat: { values: { RGB888: 0, L8: 1, L4: 2 } }, Screen: { values: { FRONT: 0, BACK: 1 } }, Frame: { fields: { screen: { type: "Screen", id: 1 }, width: { type: "uint32", id: 2 }, height: { type: "uint32", id: 3 }, encoding: { type: "Encoding", id: 4 }, pixelFormat: { type: "PixelFormat", id: 5 }, data: { type: "bytes", id: 6 } } } } }, BSB_Timer: { nested: { Timer: { fields: { json: { type: "BSB_Util.Json", id: 1 } } } } }, BSB_Util: { nested: { Compression: { values: { PLAIN: 0, GZIP: 1 } }, Json: { fields: { compression: { type: "Compression", id: 1 }, data: { type: "bytes", id: 2 } } } } }, BSB_Input: { nested: { Button: { values: { OK: 0, BACK: 1, START: 2 } }, ButtonAction: { values: { PRESS: 0, RELEASE: 1 } }, SwitchPosition: { values: { BUSY: 0, CUSTOM: 1, OFF: 2, APPS: 3, SETTINGS: 4 } }, ButtonEvent: { fields: { button: { type: "Button", id: 1 }, action: { type: "ButtonAction", id: 2 } } }, SwitchEvent: { fields: { position: { type: "SwitchPosition", id: 1 } } }, EncoderEvent: { fields: { delta: { type: "sint32", id: 1 } } }, InputEvent: { oneofs: { event: { oneof: ["buttonEvent", "switchEvent", "encoderEvent"] } }, fields: { buttonEvent: { type: "ButtonEvent", id: 1 }, switchEvent: { type: "SwitchEvent", id: 2 }, encoderEvent: { type: "EncoderEvent", id: 3 } } } } }, BSB_Error: { nested: { Cause: { values: { RESOURCE_LIMIT: 0 } }, Severity: { values: { FATAL: 0, ERROR: 1, WARNING: 2 } }, Error: { fields: { cause: { type: "Cause", id: 1 }, severity: { type: "Severity", id: 2 } } } } } };
9382
+ var protobufjsExports = requireProtobufjs(), StateStreamErrorCode = /* @__PURE__ */ ((a) => (a.CONNECTION_FAILED = "CONNECTION_FAILED", a.RECONNECT_FAILED = "RECONNECT_FAILED", a.CONNECTION_LOST = "CONNECTION_LOST", a.CONNECTION_TIMEOUT = "CONNECTION_TIMEOUT", a.AUTH_FAILED = "AUTH_FAILED", a.AUTH_REFRESH_FAILED = "AUTH_REFRESH_FAILED", a.DEVICE_ERROR = "DEVICE_ERROR", a.DECODE_ERROR = "DECODE_ERROR", a.FRAME_PROCESS_ERROR = "FRAME_PROCESS_ERROR", a.STREAM_ALREADY_STARTED = "STREAM_ALREADY_STARTED", a.WORKER_INIT_FAILED = "WORKER_INIT_FAILED", a.UNKNOWN_ERROR = "UNKNOWN_ERROR", a))(StateStreamErrorCode || {}), ConnectionStatus = /* @__PURE__ */ ((a) => (a.DISCONNECTED = "DISCONNECTED", a.CONNECTING = "CONNECTING", a.CONNECTED = "CONNECTED", a.RECONNECTING = "RECONNECTING", a))(ConnectionStatus || {}), AuthStatus = /* @__PURE__ */ ((a) => (a.UNAUTHENTICATED = "UNAUTHENTICATED", a.AUTHENTICATING = "AUTHENTICATING", a.AUTHENTICATED = "AUTHENTICATED", a.REAUTHENTICATING = "REAUTHENTICATING", a.FAILED = "FAILED", a))(AuthStatus || {});
9383
+ const DEFAULT_MAX_RECONNECT_ATTEMPTS = 5, DEFAULT_MAX_AUTH_ATTEMPTS = 5, DEFAULT_DELAY_RECONNECT = 500, nested = { BSB_State: { nested: { StateUpdate: { oneofs: { state: { oneof: ["deviceName", "power", "brightness", "audioVolume", "wifi", "updateState", "updateCheck", "timezone", "matter", "frame", "input", "timer", "ble", "autoUpdateState"] } }, fields: { deviceName: { type: "BSB_State.DeviceName", id: 1 }, power: { type: "BSB_State.Power", id: 2 }, brightness: { type: "BSB_State.Brightness", id: 3 }, audioVolume: { type: "BSB_State.AudioVolume", id: 4 }, wifi: { type: "BSB_State.Wifi", id: 5 }, updateState: { type: "BSB_Update.UpdateState", id: 6 }, updateCheck: { type: "BSB_Update.CheckState", id: 7 }, timezone: { type: "BSB_State.Timezone", id: 8 }, matter: { type: "BSB_State.Matter", id: 9 }, frame: { type: "BSB_Frame.Frame", id: 10 }, input: { type: "BSB_Input.InputEvent", id: 11 }, timer: { type: "BSB_Timer.Timer", id: 12 }, ble: { type: "BSB_State.Ble.Ble", id: 13 }, autoUpdateState: { type: "BSB_Update.AutoUpdateState", id: 14 } } }, State: { oneofs: { _error: { oneof: ["error"] } }, fields: { timestamp: { type: "fixed64", id: 1 }, updates: { rule: "repeated", type: "StateUpdate", id: 2 }, error: { type: "BSB_Error.Error", id: 3, options: { proto3_optional: !0 } } } }, DeviceName: { fields: { name: { type: "string", id: 1 } } }, BrightnessAutomatic: { fields: {} }, BrightnessManual: { fields: { brightness: { type: "uint32", id: 1 } } }, Brightness: { oneofs: { setting: { oneof: ["automatic", "manual"] } }, fields: { automatic: { type: "BrightnessAutomatic", id: 1 }, manual: { type: "BrightnessManual", id: 2 }, actualBrightness: { type: "uint32", id: 3 } } }, BatteryStatus: { values: { DISCHARGING: 0, CHARGING: 1, CHARGED: 2 } }, UnknownPowerState: { fields: {} }, PowerState: { fields: { batteryStatus: { type: "BatteryStatus", id: 1 }, batteryChargePercent: { type: "uint32", id: 2 }, batteryVoltageMv: { type: "uint32", id: 3 }, batteryCurrentMa: { type: "sint32", id: 4 }, usbVoltageMv: { type: "uint32", id: 5 } } }, Power: { oneofs: { state: { oneof: ["unknown", "known"] } }, fields: { unknown: { type: "UnknownPowerState", id: 1 }, known: { type: "PowerState", id: 2 } } }, AudioVolume: { fields: { volume: { type: "uint32", id: 1 } } }, WifiConnectionStatus: { values: { CONNECTED: 0, CONNECTING: 1, DISCONNECTING: 2, RECONNECTING: 3 } }, WifiSecurity: { values: { UNKNOWN: 0, OPEN: 1, WPA: 2, WPA2: 3, WEP: 4, WPA_WPA2: 5, WPA3: 6, WPA2_WPA3: 7 } }, IpConfigurationMethod: { values: { DHCP: 0, STATIC: 1 } }, IpProtocol: { values: { IPV4: 0, IPV6: 1 } }, WifiStateUnknown: { fields: {} }, WifiStateDisconnected: { fields: {} }, WifiStateConnected: { fields: { status: { type: "WifiConnectionStatus", id: 1 }, ssid: { type: "string", id: 2 }, bssid: { type: "string", id: 3 }, channel: { type: "uint32", id: 4 }, rssi: { type: "sint32", id: 5 }, security: { type: "WifiSecurity", id: 6 } } }, IpAddress: { fields: { protocol: { type: "IpProtocol", id: 1 }, method: { type: "IpConfigurationMethod", id: 2 }, address: { type: "string", id: 3 }, gateway: { type: "string", id: 4 }, netmask: { type: "string", id: 5 } } }, Wifi: { oneofs: { wifiState: { oneof: ["unknown", "disconnected", "connected"] } }, fields: { unknown: { type: "WifiStateUnknown", id: 1 }, disconnected: { type: "WifiStateDisconnected", id: 2 }, connected: { type: "WifiStateConnected", id: 3 }, ipAddresses: { rule: "repeated", type: "IpAddress", id: 4 } } }, Timezone: { fields: { name: { type: "string", id: 1 }, offset: { type: "sint32", id: 2 }, abbr: { type: "string", id: 3 } } }, MatterCommissioningStatus: { values: { NEVER_STARTED: 0, STARTED: 1, COMPLETED_SUCCESSFULLY: 2, FAILED: 3 } }, MatterCommissioningState: { fields: { status: { type: "MatterCommissioningStatus", id: 1 }, timestamp: { type: "fixed64", id: 2 } } }, Matter: { fields: { fabricCount: { type: "uint32", id: 1 }, state: { type: "MatterCommissioningState", id: 2 } } }, Ble: { nested: { ServiceStatus: { values: { RESET: 0, INITIALIZATION: 1, READY: 2, ADVERTISING: 3, CONNECTABLE: 4, CONNECTED: 5, ERROR: 6 } }, Ble: { oneofs: { _remoteAddress: { oneof: ["remoteAddress"] } }, fields: { status: { type: "ServiceStatus", id: 1 }, remoteAddress: { type: "string", id: 2, options: { proto3_optional: !0 } } } } } } } }, BSB_Update: { nested: { UpdateEvent: { values: { SESSION_START: 0, SESSION_STOP: 1, ACTION_BEGIN: 2, ACTION_DONE: 3, DETAIL_CHANGE: 4, ACTION_PROGRESS: 5, EVENT_NONE: 6 } }, UpdateAction: { values: { DOWNLOAD: 0, SHA_VERIFICATION: 1, UNPACK: 2, INSTALLATION_PREPARE: 3, INSTALLATION_APPLY: 4, ACTION_NONE: 5 } }, UpdateStatus: { values: { OK: 0, BATTERY_LOW: 1, BUSY: 2, DOWNLOAD_FAILURE: 3, DOWNLOAD_ABORT: 4, SHA_MISMATCH: 5, UNPACK_CREATE_STAGING_DIRECTORY_FAILURE: 6, UNPACK_ARCHIVE_OPEN_FAILURE: 7, UNPACK_ARCHIVE_UNPACK_FAILURE: 8, INSTALLATION_PREPARE_MANIFEST_NOT_FOUND: 9, INSTALLATION_PREPARE_MANIFEST_INVALID: 10, INSTALLATION_PREPARE_SESSION_CONFIG_SETUP_FAILURE: 11, INSTALLATION_PREPARE_POINTER_SETUP_FAILURE: 12, UNKNOWN_FAILURE: 13 } }, CheckError: { values: { NOT_AVAILABLE: 0, FAILURE: 1, IDLE: 2 } }, UpdateAvailable: { fields: { version: { type: "string", id: 1 } } }, UpdateUnavailable: { fields: { reason: { type: "CheckError", id: 1 } } }, UpdateState: { fields: { event: { type: "UpdateEvent", id: 1 }, action: { type: "UpdateAction", id: 2 }, status: { type: "UpdateStatus", id: 3 } } }, CheckState: { oneofs: { status: { oneof: ["available", "unavailable"] } }, fields: { available: { type: "UpdateAvailable", id: 1 }, unavailable: { type: "UpdateUnavailable", id: 2 } } }, AutoUpdateInterval: { fields: { start: { type: "uint32", id: 1 }, end: { type: "uint32", id: 2 } } }, AutoUpdateState: { fields: { enabled: { type: "bool", id: 1 }, interval: { type: "AutoUpdateInterval", id: 2 } } } } }, BSB_Frame: { nested: { Encoding: { values: { PLAIN: 0, RUN_LENGTH: 1, DEFLATE: 2, DEFLATE_RUN_LENGTH: 3 } }, PixelFormat: { values: { RGB888: 0, L8: 1, L4: 2 } }, Screen: { values: { FRONT: 0, BACK: 1 } }, Frame: { fields: { screen: { type: "Screen", id: 1 }, width: { type: "uint32", id: 2 }, height: { type: "uint32", id: 3 }, encoding: { type: "Encoding", id: 4 }, pixelFormat: { type: "PixelFormat", id: 5 }, data: { type: "bytes", id: 6 } } } } }, BSB_Timer: { nested: { Timer: { fields: { json: { type: "BSB_Util.Json", id: 1 } } } } }, BSB_Util: { nested: { Compression: { values: { PLAIN: 0, GZIP: 1 } }, Json: { fields: { compression: { type: "Compression", id: 1 }, data: { type: "bytes", id: 2 } } } } }, BSB_Input: { nested: { Button: { values: { OK: 0, BACK: 1, START: 2 } }, ButtonAction: { values: { PRESS: 0, RELEASE: 1 } }, SwitchPosition: { values: { BUSY: 0, CUSTOM: 1, OFF: 2, APPS: 3, SETTINGS: 4 } }, ButtonEvent: { fields: { button: { type: "Button", id: 1 }, action: { type: "ButtonAction", id: 2 } } }, SwitchEvent: { fields: { position: { type: "SwitchPosition", id: 1 } } }, EncoderEvent: { fields: { delta: { type: "sint32", id: 1 } } }, InputEvent: { oneofs: { event: { oneof: ["buttonEvent", "switchEvent", "encoderEvent"] } }, fields: { buttonEvent: { type: "ButtonEvent", id: 1 }, switchEvent: { type: "SwitchEvent", id: 2 }, encoderEvent: { type: "EncoderEvent", id: 3 } } } } }, BSB_Error: { nested: { Cause: { values: { RESOURCE_LIMIT: 0 } }, Severity: { values: { FATAL: 0, ERROR: 1, WARNING: 2 } }, Error: { fields: { cause: { type: "Cause", id: 1 }, severity: { type: "Severity", id: 2 } } } } } };
9383
9384
  var bundle = {
9384
9385
  nested
9385
9386
  };
9386
- function decompressRLE(u, f) {
9387
+ function decompressRLE(a, f) {
9387
9388
  const h = [];
9388
- for (let c = 0; c < u.length; ) {
9389
- const d = u[c++];
9389
+ for (let c = 0; c < a.length; ) {
9390
+ const d = a[c++];
9390
9391
  if (d === void 0) break;
9391
9392
  const n = d & 127;
9392
9393
  if (!n)
9393
9394
  continue;
9394
9395
  if (d & 128) {
9395
- const r = n * f, i = u.subarray(c, c + r);
9396
+ const r = n * f, i = a.subarray(c, c + r);
9396
9397
  for (let t = 0; t < i.length; t++)
9397
9398
  h.push(i[t]);
9398
9399
  c += r;
9399
9400
  continue;
9400
9401
  }
9401
- const e = u.subarray(c, c + f);
9402
+ const e = a.subarray(c, c + f);
9402
9403
  c += f;
9403
9404
  for (let r = 0; r < n; r++)
9404
9405
  for (let i = 0; i < f; i++)
@@ -9406,23 +9407,23 @@ function decompressRLE(u, f) {
9406
9407
  }
9407
9408
  return new Uint8Array(h);
9408
9409
  }
9409
- async function decompressDeflate(u) {
9410
+ async function decompressDeflate(a) {
9410
9411
  if (typeof DecompressionStream > "u")
9411
9412
  throw new Error("DecompressionStream is not supported in this environment.");
9412
9413
  try {
9413
9414
  const f = new DecompressionStream("deflate"), h = f.writable.getWriter();
9414
- h.write(u), h.close();
9415
+ h.write(a), h.close();
9415
9416
  const d = await new Response(f.readable).arrayBuffer();
9416
9417
  return new Uint8Array(d);
9417
9418
  } catch (f) {
9418
9419
  throw new Error(\`Deflate decompression failed: \${f instanceof Error ? f.message : String(f)}\`);
9419
9420
  }
9420
9421
  }
9421
- function convertL4toRGBA(u, f, h) {
9422
+ function convertL4toRGBA(a, f, h) {
9422
9423
  const c = new Uint8ClampedArray(f * h * 4);
9423
9424
  let d = 0;
9424
- for (let n = 0; n < u.length; n++) {
9425
- const e = u[n], r = (e & 15) * 17, i = (e >> 4 & 15) * 17, t = [r, i];
9425
+ for (let n = 0; n < a.length; n++) {
9426
+ const e = a[n], r = (e & 15) * 17, i = (e >> 4 & 15) * 17, t = [r, i];
9426
9427
  for (const l of t)
9427
9428
  if (d < f * h) {
9428
9429
  const s = d * 4;
@@ -9431,28 +9432,28 @@ function convertL4toRGBA(u, f, h) {
9431
9432
  }
9432
9433
  return c;
9433
9434
  }
9434
- function convertL8toRGBA(u, f, h) {
9435
- const c = new Uint8ClampedArray(f * h * 4), d = Math.min(u.length, f * h);
9435
+ function convertL8toRGBA(a, f, h) {
9436
+ const c = new Uint8ClampedArray(f * h * 4), d = Math.min(a.length, f * h);
9436
9437
  for (let n = 0; n < d; n++) {
9437
- const e = u[n], r = n * 4;
9438
+ const e = a[n], r = n * 4;
9438
9439
  c[r] = e, c[r + 1] = e, c[r + 2] = e, c[r + 3] = 255;
9439
9440
  }
9440
9441
  return c;
9441
9442
  }
9442
- function convertRGB888toRGBA(u, f, h) {
9443
+ function convertRGB888toRGBA(a, f, h) {
9443
9444
  const c = new Uint8ClampedArray(f * h * 4), d = f * h;
9444
9445
  for (let n = 0; n < d; n++) {
9445
9446
  const e = n * 3, r = n * 4;
9446
- e + 2 < u.length && (c[r] = u[e + 2], c[r + 1] = u[e + 1], c[r + 2] = u[e], c[r + 3] = 255);
9447
+ e + 2 < a.length && (c[r] = a[e + 2], c[r + 1] = a[e + 1], c[r + 2] = a[e], c[r + 3] = 255);
9447
9448
  }
9448
9449
  return c;
9449
9450
  }
9450
- async function processFrame(u) {
9451
- if (!u.data || !u.width || !u.height)
9451
+ async function processFrame(a) {
9452
+ if (!a.data || !a.width || !a.height)
9452
9453
  return null;
9453
- let f = u.data;
9454
- const h = u.pixelFormat === 0 ? 3 : 1;
9455
- switch (u.encoding) {
9454
+ let f = a.data;
9455
+ const h = a.pixelFormat === 0 ? 3 : 1;
9456
+ switch (a.encoding) {
9456
9457
  case 1:
9457
9458
  f = decompressRLE(f, h);
9458
9459
  break;
@@ -9463,24 +9464,24 @@ async function processFrame(u) {
9463
9464
  f = await decompressDeflate(f), f = decompressRLE(f, h);
9464
9465
  break;
9465
9466
  }
9466
- switch (u.pixelFormat) {
9467
+ switch (a.pixelFormat) {
9467
9468
  case 2:
9468
- return convertL4toRGBA(f, u.width, u.height);
9469
+ return convertL4toRGBA(f, a.width, a.height);
9469
9470
  case 1:
9470
- return convertL8toRGBA(f, u.width, u.height);
9471
+ return convertL8toRGBA(f, a.width, a.height);
9471
9472
  case 0:
9472
- return convertRGB888toRGBA(f, u.width, u.height);
9473
+ return convertRGB888toRGBA(f, a.width, a.height);
9473
9474
  default:
9474
- return new Uint8ClampedArray(u.width * u.height * 4);
9475
+ return new Uint8ClampedArray(a.width * a.height * 4);
9475
9476
  }
9476
9477
  }
9477
- const root = protobufjsExports.Root.fromJSON(bundle), StateType = root.lookupType("BSB_State.State"), AUTH_CODE = 3e3, RECONNECT_CODES = /* @__PURE__ */ new Set([1001, 1006, 1012, 1013, 1014, 3008]);
9478
- let maxAuthAttempts = DEFAULT_MAX_AUTH_ATTEMPTS, maxReconnectAttempts = DEFAULT_MAX_RECONNECT_ATTEMPTS, socket = null, isBinaryMode = !0, currentMode = "local", currentToken, currentAddr = "", retryCount = 0, authRetryCount = 0, isAuthReported = !1, stabilityTimeout;
9478
+ const root = protobufjsExports.Root.fromJSON(bundle), StateType = root.lookupType("BSB_State.State"), AUTH_CODE = 3e3;
9479
+ let maxAuthAttempts = DEFAULT_MAX_AUTH_ATTEMPTS, maxReconnectAttempts = DEFAULT_MAX_RECONNECT_ATTEMPTS, reconnectDelay = DEFAULT_DELAY_RECONNECT, socket = null, isBinaryMode = !0, currentMode = "local", currentToken, currentAddr = "", retryCount = 0, authRetryCount = 0, isAuthReported = !1;
9479
9480
  const activePorts = /* @__PURE__ */ new Set(), subscriptions = /* @__PURE__ */ new Map();
9480
9481
  let processingQueue = Promise.resolve();
9481
- function broadcast(u) {
9482
+ function broadcast(a) {
9482
9483
  for (const f of activePorts)
9483
- f.postMessage(u);
9484
+ f.postMessage(a);
9484
9485
  }
9485
9486
  function sendAuth() {
9486
9487
  currentMode === "remote" && currentToken && (socket == null ? void 0 : socket.readyState) === WebSocket.OPEN && (broadcast({ type: "STATUS_UPDATE", auth: AuthStatus.AUTHENTICATING }), socket.send(JSON.stringify({ token: currentToken })));
@@ -9492,16 +9493,17 @@ function sendSubscriptions() {
9492
9493
  })
9493
9494
  );
9494
9495
  }
9496
+ function stopSocket() {
9497
+ socket && (socket.onopen = null, socket.onmessage = null, socket.onerror = null, socket.onclose = null, socket.close(), socket = null);
9498
+ }
9495
9499
  function stopAndCleanup() {
9496
- socket && (socket.close(), socket = null), stabilityTimeout && (clearTimeout(stabilityTimeout), stabilityTimeout = void 0), subscriptions.clear(), activePorts.clear(), retryCount = 0, authRetryCount = 0, isAuthReported = !1;
9500
+ stopSocket(), subscriptions.clear(), activePorts.clear(), retryCount = 0, authRetryCount = 0, isAuthReported = !1;
9497
9501
  }
9498
- function connect(u, f, h = !0, c = "local") {
9499
- socket && socket.close(), broadcast({ type: "STATUS_UPDATE", connection: ConnectionStatus.CONNECTING }), currentAddr = u, isBinaryMode = h, currentMode = c, currentToken = f, isAuthReported = !1;
9500
- const d = new URL(u);
9502
+ function connect(a, f, h = !0, c = "local") {
9503
+ stopSocket(), broadcast({ type: "STATUS_UPDATE", connection: ConnectionStatus.CONNECTING }), currentAddr = a, isBinaryMode = h, currentMode = c, currentToken = f, isAuthReported = !1;
9504
+ const d = new URL(a);
9501
9505
  socket = new WebSocket(d.toString()), socket.binaryType = "arraybuffer", socket.onopen = () => {
9502
- broadcast({ type: "CONNECTED" }), currentMode === "local" && (socket == null || socket.send(JSON.stringify({ enable: !0 }))), sendAuth(), stabilityTimeout && clearTimeout(stabilityTimeout), stabilityTimeout = setTimeout(() => {
9503
- retryCount = 0, authRetryCount = 0, console.log("[Worker] Connection stable. All retry counters reset.");
9504
- }, 5e3), currentMode === "remote" && subscriptions.size > 0 && sendSubscriptions(), currentMode === "local" && broadcast({ type: "STATUS_UPDATE", auth: AuthStatus.AUTHENTICATED });
9506
+ broadcast({ type: "CONNECTED" }), currentMode === "local" && (socket == null || socket.send(JSON.stringify({ enable: !0 }))), sendAuth(), retryCount = 0, authRetryCount = 0, console.log("[Worker] Connection stable. All retry counters reset."), currentMode === "remote" && subscriptions.size > 0 && sendSubscriptions(), currentMode === "local" && broadcast({ type: "STATUS_UPDATE", auth: AuthStatus.AUTHENTICATED });
9505
9507
  }, socket.onmessage = (n) => {
9506
9508
  processingQueue = processingQueue.then(async () => {
9507
9509
  try {
@@ -9520,19 +9522,19 @@ function connect(u, f, h = !0, c = "local") {
9520
9522
  defaults: !0
9521
9523
  });
9522
9524
  if (l.error) {
9523
- const { cause: s, severity: a } = l.error;
9524
- if (s != null && a != null) {
9525
- const o = root.lookupEnum("BSB_Error.Cause"), p = root.lookupEnum("BSB_Error.Severity"), y = o.valuesById[s] || "UNKNOWN", E = p.valuesById[a] || "UNKNOWN";
9525
+ const { cause: s, severity: u } = l.error;
9526
+ if (s != null && u != null) {
9527
+ const o = root.lookupEnum("BSB_Error.Cause"), p = root.lookupEnum("BSB_Error.Severity"), y = o.valuesById[s] || "UNKNOWN", E = p.valuesById[u] || "UNKNOWN";
9526
9528
  if (broadcast({
9527
9529
  type: "ERROR",
9528
9530
  code: StateStreamErrorCode.DEVICE_ERROR,
9529
9531
  message: \`Server reported \${E}: \${y}\`,
9530
9532
  data: l.error
9531
- }), a === p.values.FATAL) {
9533
+ }), u === p.values.FATAL) {
9532
9534
  stopAndCleanup();
9533
9535
  return;
9534
9536
  }
9535
- if (a === p.values.ERROR)
9537
+ if (u === p.values.ERROR)
9536
9538
  return;
9537
9539
  } else
9538
9540
  broadcast({
@@ -9544,17 +9546,17 @@ function connect(u, f, h = !0, c = "local") {
9544
9546
  }
9545
9547
  if (l.updates)
9546
9548
  for (const s of l.updates) {
9547
- const a = s.frame;
9548
- if (a && a.data)
9549
+ const u = s.frame;
9550
+ if (u && u.data)
9549
9551
  try {
9550
- const o = await processFrame(a);
9551
- o && (a.data = o);
9552
+ const o = await processFrame(u);
9553
+ o && (u.data = o);
9552
9554
  } catch (o) {
9553
9555
  broadcast({
9554
9556
  type: "ERROR",
9555
9557
  code: StateStreamErrorCode.FRAME_PROCESS_ERROR,
9556
9558
  message: o instanceof Error ? o.message : String(o),
9557
- data: a.data
9559
+ data: u.data
9558
9560
  });
9559
9561
  }
9560
9562
  }
@@ -9575,7 +9577,7 @@ function connect(u, f, h = !0, c = "local") {
9575
9577
  }, socket.onerror = () => {
9576
9578
  broadcast({ type: "ERROR", code: StateStreamErrorCode.CONNECTION_FAILED, message: "WebSocket connection error" });
9577
9579
  }, socket.onclose = (n) => {
9578
- if (console.log("[Worker] Socket closed:", n), stabilityTimeout && (clearTimeout(stabilityTimeout), stabilityTimeout = void 0), !socket || activePorts.size === 0) {
9580
+ if (console.log("[Worker] Socket closed:", n), !socket || activePorts.size === 0) {
9579
9581
  console.log("[Worker] Connection closed or no active ports. No retries.");
9580
9582
  return;
9581
9583
  }
@@ -9587,11 +9589,11 @@ function connect(u, f, h = !0, c = "local") {
9587
9589
  }));
9588
9590
  return;
9589
9591
  }
9590
- if (RECONNECT_CODES.has(n.code)) {
9592
+ if (n.code !== 1e3) {
9591
9593
  if (retryCount < maxReconnectAttempts) {
9592
9594
  retryCount++;
9593
- const e = Math.min(1e3 * retryCount, 5e3);
9594
- console.log(\`[Worker] Reconnecting (network code: \${n.code}) in \${e}ms... (Attempt \${retryCount}/\${maxReconnectAttempts})\`), broadcast({ type: "STATUS_UPDATE", connection: ConnectionStatus.RECONNECTING, connectionAttempts: retryCount }), setTimeout(() => {
9595
+ let e = Math.min(1e3 * retryCount, 5e3);
9596
+ reconnectDelay && (e = reconnectDelay), console.log(\`[Worker] Reconnecting (network code: \${n.code}) in \${e}ms... (Attempt \${retryCount}/\${maxReconnectAttempts})\`), broadcast({ type: "STATUS_UPDATE", connection: ConnectionStatus.RECONNECTING, connectionAttempts: retryCount }), setTimeout(() => {
9595
9597
  activePorts.size > 0 && socket && connect(currentAddr, currentToken, isBinaryMode, currentMode);
9596
9598
  }, e);
9597
9599
  } else
@@ -9609,10 +9611,10 @@ function connect(u, f, h = !0, c = "local") {
9609
9611
  });
9610
9612
  };
9611
9613
  }
9612
- function handleCommand(u, f) {
9613
- switch (u.type) {
9614
+ function handleCommand(a, f) {
9615
+ switch (a.type) {
9614
9616
  case "START":
9615
- maxAuthAttempts = u.maxAuthAttempts ?? DEFAULT_MAX_AUTH_ATTEMPTS, maxReconnectAttempts = u.maxReconnectAttempts ?? DEFAULT_MAX_RECONNECT_ATTEMPTS, activePorts.add(f), socket && socket.readyState === WebSocket.OPEN && currentAddr === u.addr ? (f.postMessage({ type: "CONNECTED" }), f.postMessage({ type: "STATUS_UPDATE", auth: AuthStatus.AUTHENTICATED })) : connect(u.addr, u.token, u.isBinary, u.mode);
9617
+ maxAuthAttempts = a.maxAuthAttempts ?? DEFAULT_MAX_AUTH_ATTEMPTS, maxReconnectAttempts = a.maxReconnectAttempts ?? DEFAULT_MAX_RECONNECT_ATTEMPTS, reconnectDelay = a.reconnectDelay ?? DEFAULT_DELAY_RECONNECT, activePorts.add(f), socket && socket.readyState === WebSocket.OPEN && currentAddr === a.addr ? (f.postMessage({ type: "CONNECTED" }), f.postMessage({ type: "STATUS_UPDATE", auth: AuthStatus.AUTHENTICATED })) : connect(a.addr, a.token, a.isBinary, a.mode);
9616
9618
  break;
9617
9619
  case "STOP":
9618
9620
  activePorts.delete(f);
@@ -9622,41 +9624,41 @@ function handleCommand(u, f) {
9622
9624
  break;
9623
9625
  case "UPDATE_TOKEN":
9624
9626
  const h = currentToken;
9625
- if (currentToken = u.token, currentMode === "remote") {
9627
+ if (currentToken = a.token, currentMode === "remote") {
9626
9628
  const e = socket && socket.readyState === WebSocket.OPEN;
9627
- if (e && h === u.token)
9629
+ if (e && h === a.token)
9628
9630
  return;
9629
- e ? sendAuth() : h !== u.token && currentAddr && activePorts.size > 0 && connect(currentAddr, currentToken, isBinaryMode, currentMode);
9631
+ e ? sendAuth() : h !== a.token && currentAddr && activePorts.size > 0 && connect(currentAddr, currentToken, isBinaryMode, currentMode);
9630
9632
  }
9631
9633
  break;
9632
9634
  case "SUBSCRIBE":
9633
- let c = subscriptions.get(u.guid);
9634
- c || (c = /* @__PURE__ */ new Set(), subscriptions.set(u.guid, c));
9635
+ let c = subscriptions.get(a.guid);
9636
+ c || (c = /* @__PURE__ */ new Set(), subscriptions.set(a.guid, c));
9635
9637
  const d = c.size === 0;
9636
- c.add(f), d && (socket == null ? void 0 : socket.readyState) === WebSocket.OPEN && currentMode === "remote" && socket.send(JSON.stringify({ subscribe: [u.guid] }));
9638
+ c.add(f), d && (socket == null ? void 0 : socket.readyState) === WebSocket.OPEN && currentMode === "remote" && socket.send(JSON.stringify({ subscribe: [a.guid] }));
9637
9639
  break;
9638
9640
  case "UNSUBSCRIBE":
9639
- const n = subscriptions.get(u.guid);
9640
- n && (n.delete(f), n.size === 0 && (subscriptions.delete(u.guid), (socket == null ? void 0 : socket.readyState) === WebSocket.OPEN && currentMode === "remote" && socket.send(JSON.stringify({ unsubscribe: [u.guid] }))));
9641
+ const n = subscriptions.get(a.guid);
9642
+ n && (n.delete(f), n.size === 0 && (subscriptions.delete(a.guid), (socket == null ? void 0 : socket.readyState) === WebSocket.OPEN && currentMode === "remote" && socket.send(JSON.stringify({ unsubscribe: [a.guid] }))));
9641
9643
  break;
9642
9644
  }
9643
9645
  }
9644
9646
  if ("SharedWorkerGlobalScope" in self) {
9645
- const u = self;
9646
- u.onconnect = (f) => {
9647
+ const a = self;
9648
+ a.onconnect = (f) => {
9647
9649
  const h = f.ports[0];
9648
9650
  h && (h.onmessage = (c) => handleCommand(c.data, h), h.start());
9649
9651
  };
9650
9652
  } else {
9651
- const u = self;
9652
- u.onmessage = (f) => {
9653
- handleCommand(f.data, u);
9653
+ const a = self;
9654
+ a.onmessage = (f) => {
9655
+ handleCommand(f.data, a);
9654
9656
  };
9655
9657
  }
9656
9658
  `;
9657
- function _e(e) {
9659
+ function Ae(e) {
9658
9660
  return new SharedWorker(
9659
- "data:text/javascript;charset=utf-8," + encodeURIComponent(Ee),
9661
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(_e),
9660
9662
  {
9661
9663
  type: "module",
9662
9664
  name: e == null ? void 0 : e.name
@@ -9672,6 +9674,7 @@ const g = class g {
9672
9674
  u(this, "dataTimeout");
9673
9675
  u(this, "maxReconnectAttempts");
9674
9676
  u(this, "maxAuthAttempts");
9677
+ u(this, "reconnectDelay");
9675
9678
  u(this, "worker", null);
9676
9679
  u(this, "connectionTimer", null);
9677
9680
  u(this, "dataTimer", null);
@@ -9681,7 +9684,7 @@ const g = class g {
9681
9684
  u(this, "rawDataCallback");
9682
9685
  u(this, "errorCallback");
9683
9686
  u(this, "statusCallback");
9684
- this.addr = n.addr || "", this.token = n.token, this.isBinary = n.isBinary ?? !0, this.connectTimeout = (t == null ? void 0 : t.timeout) ?? 5e3, this.dataTimeout = (t == null ? void 0 : t.dataTimeout) ?? 15e3, this.maxReconnectAttempts = (t == null ? void 0 : t.maxReconnectAttempts) ?? ge, this.maxAuthAttempts = L, this._status = {
9687
+ this.addr = n.addr || "", this.token = n.token, this.isBinary = n.isBinary ?? !0, this.connectTimeout = (t == null ? void 0 : t.timeout) ?? 5e3, this.dataTimeout = (t == null ? void 0 : t.dataTimeout) ?? 15e3, this.maxReconnectAttempts = (t == null ? void 0 : t.maxReconnectAttempts) ?? ge, this.maxAuthAttempts = j, this.reconnectDelay = (t == null ? void 0 : t.reconnectDelay) ?? be, this._status = {
9685
9688
  main: { status: d.IDLE },
9686
9689
  connection: { status: m.DISCONNECTED },
9687
9690
  auth: { status: v.UNAUTHENTICATED },
@@ -9736,7 +9739,8 @@ const g = class g {
9736
9739
  isBinary: this.isBinary,
9737
9740
  mode: this.streamMode,
9738
9741
  maxReconnectAttempts: this.maxReconnectAttempts,
9739
- maxAuthAttempts: this.maxAuthAttempts
9742
+ maxAuthAttempts: this.maxAuthAttempts,
9743
+ reconnectDelay: this.reconnectDelay
9740
9744
  }), this.clearConnectionTimer(), this.connectionTimer = setTimeout(() => {
9741
9745
  const o = new y(c.CONNECTION_TIMEOUT, `Connection timed out after ${this.connectTimeout}ms`);
9742
9746
  this.mapErrorToStatus(o), this.errorCallback && this.errorCallback(o), this.stop();
@@ -9781,7 +9785,7 @@ const g = class g {
9781
9785
  const n = btoa(this.addr);
9782
9786
  try {
9783
9787
  if (this.updateStatusComponent("worker", { status: _.INITIALIZING, lastError: void 0 }), window.SharedWorker) {
9784
- const t = new _e({
9788
+ const t = new Ae({
9785
9789
  name: n
9786
9790
  });
9787
9791
  this.worker = {
@@ -9790,7 +9794,7 @@ const g = class g {
9790
9794
  this.handleWorkerMessage(r.data);
9791
9795
  }, t.port.start();
9792
9796
  } else {
9793
- const t = new be();
9797
+ const t = new Ee();
9794
9798
  this.worker = {
9795
9799
  port: t,
9796
9800
  terminate: () => t.terminate()
@@ -9926,7 +9930,7 @@ const g = class g {
9926
9930
  /** Static map to deduplicate token refresh requests across all instances in this JS context */
9927
9931
  u(g, "tokenRefreshPromises", /* @__PURE__ */ new Map());
9928
9932
  let T = g;
9929
- class Re extends T {
9933
+ class Oe extends T {
9930
9934
  constructor(t = {}, r) {
9931
9935
  let i = t.addr;
9932
9936
  i || (typeof window < "u" ? i = window.location.origin : i = "10.0.4.20");
@@ -9950,7 +9954,7 @@ class Re extends T {
9950
9954
  return (i.pathname === "/" || !i.pathname) && (i.pathname = "/api/status/ws"), this.token && i.searchParams.set("x-api-token", this.token), i.toString();
9951
9955
  }
9952
9956
  }
9953
- class Oe extends T {
9957
+ class we extends T {
9954
9958
  constructor(t, r) {
9955
9959
  super(
9956
9960
  {
@@ -9963,7 +9967,7 @@ class Oe extends T {
9963
9967
  u(this, "streamMode", "remote");
9964
9968
  u(this, "tokenProvider");
9965
9969
  u(this, "maxAuthAttempts");
9966
- this.tokenProvider = t.tokenProvider, this.maxAuthAttempts = (r == null ? void 0 : r.maxAuthAttempts) ?? L;
9970
+ this.tokenProvider = t.tokenProvider, this.maxAuthAttempts = (r == null ? void 0 : r.maxAuthAttempts) ?? j;
9967
9971
  }
9968
9972
  /**
9969
9973
  * Subscribes to updates for a specific device GUID.
@@ -10160,7 +10164,7 @@ const b = class b {
10160
10164
  };
10161
10165
  u(b, "instance", null);
10162
10166
  let N = b;
10163
- const we = new N();
10167
+ const Ne = new N();
10164
10168
  export {
10165
10169
  v as AuthStatus,
10166
10170
  D as BSB_Error,
@@ -10172,9 +10176,9 @@ export {
10172
10176
  me as BusyBar,
10173
10177
  m as ConnectionStatus,
10174
10178
  E as DataStatus,
10175
- we as LEDRenderer,
10176
- Re as LocalStateStream,
10177
- Oe as RemoteStateStream,
10179
+ Ne as LEDRenderer,
10180
+ Oe as LocalStateStream,
10181
+ we as RemoteStateStream,
10178
10182
  y as StateStreamError,
10179
10183
  c as StateStreamErrorCode,
10180
10184
  d as StreamLifecycle,