@nil-/xit 0.1.27 → 0.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/assets/index.js CHANGED
@@ -1,415 +1,442 @@
1
- var P = (i) => {
2
- throw TypeError(i);
1
+ var U = (f) => {
2
+ throw TypeError(f);
3
3
  };
4
- var C = (i, e, n) => e.has(i) || P("Cannot " + n);
5
- var w = (i, e, n) => (C(i, e, "read from private field"), n ? n.call(i) : e.get(i)), F = (i, e, n) => e.has(i) ? P("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, n), $ = (i, e, n, u) => (C(i, e, "write to private field"), u ? u.call(i, n) : e.set(i, n), n), W = (i, e, n) => (C(i, e, "access private method"), n);
4
+ var j = (f, o, d) => o.has(f) || U("Cannot " + d);
5
+ var w = (f, o, d) => (j(f, o, "read from private field"), d ? d.call(f) : o.get(f)), B = (f, o, d) => o.has(f) ? U("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(f) : o.set(f, d), S = (f, o, d, u) => (j(f, o, "write to private field"), u ? u.call(f, d) : o.set(f, d), d), P = (f, o, d) => (j(f, o, "access private method"), d);
6
6
  import { w as writable, g as get } from "./svelte/store.js";
7
- var j, I, k, M, D, L, N, S, U;
8
- let Service$1 = (U = class {
9
- constructor(e) {
10
- F(this, j);
11
- F(this, k);
7
+ var I, J, k, D, L, C, M, A;
8
+ class Service {
9
+ constructor(o) {
10
+ B(this, I);
11
+ B(this, k);
12
12
  // 0 idle, 1 has connected, 2 keep reconnecting, 3 stopped
13
- F(this, M);
14
- F(this, D);
15
- F(this, L);
16
- F(this, N);
17
- F(this, S);
18
- $(this, N, e), $(this, k, 0), $(this, M, null), $(this, D, null), $(this, L, null), $(this, S, null);
13
+ B(this, D);
14
+ B(this, L);
15
+ B(this, C);
16
+ B(this, M);
17
+ B(this, A);
18
+ S(this, M, o), S(this, k, 0), S(this, D, null), S(this, L, null), S(this, C, null), S(this, A, null);
19
19
  }
20
- on_message(e) {
21
- $(this, L, e);
20
+ on_message(o) {
21
+ S(this, C, o);
22
22
  }
23
- on_connect(e) {
24
- $(this, M, e);
23
+ on_connect(o) {
24
+ S(this, D, o);
25
25
  }
26
- on_disconnect(e) {
27
- $(this, D, e);
26
+ on_disconnect(o) {
27
+ S(this, L, o);
28
28
  }
29
29
  // non-blocking (run is blocking in c++)
30
30
  // calling it again should not do anything
31
31
  start() {
32
- w(this, S) == null && w(this, k) !== 1 && w(this, k) !== 3 && ($(this, S, new WebSocket(`ws://${w(this, N)}`)), w(this, S).binaryType = "arraybuffer", w(this, S).onopen = () => {
33
- w(this, k) == 3 ? this.stop() : ($(this, k, 1), w(this, M) && w(this, M).call(this, w(this, N)));
34
- }, w(this, S).onclose = () => {
35
- w(this, k) === 1 && (w(this, D) && w(this, D).call(this, w(this, N)), $(this, k, 2), W(this, j, I).call(this));
36
- }, w(this, S).onerror = () => {
37
- w(this, k) !== 1 && w(this, k) !== 3 ? ($(this, k, 2), W(this, j, I).call(this)) : w(this, k) === 3 && this.stop();
38
- }, w(this, S).onmessage = (e) => {
39
- w(this, L) && w(this, L).call(this, w(this, N), new Uint8Array(e.data));
32
+ w(this, A) == null && w(this, k) !== 1 && w(this, k) !== 3 && (S(this, A, new WebSocket(`ws://${w(this, M)}`)), w(this, A).binaryType = "arraybuffer", w(this, A).onopen = () => {
33
+ w(this, k) == 3 ? this.stop() : (S(this, k, 1), w(this, D) && w(this, D).call(this, w(this, M)));
34
+ }, w(this, A).onclose = () => {
35
+ w(this, k) === 1 && (w(this, L) && w(this, L).call(this, w(this, M)), S(this, k, 2), P(this, I, J).call(this));
36
+ }, w(this, A).onerror = () => {
37
+ w(this, k) !== 1 && w(this, k) !== 3 ? (S(this, k, 2), P(this, I, J).call(this)) : w(this, k) === 3 && this.stop();
38
+ }, w(this, A).onmessage = (o) => {
39
+ w(this, C) && w(this, C).call(this, w(this, M), new Uint8Array(o.data));
40
40
  });
41
41
  }
42
42
  stop() {
43
- $(this, k, 3), w(this, S) != null && w(this, S).readyState !== WebSocket.CONNECTING && (w(this, S).close(), $(this, S, null));
43
+ S(this, k, 3), w(this, A) != null && w(this, A).readyState !== WebSocket.CONNECTING && (w(this, A).close(), S(this, A, null));
44
44
  }
45
45
  restart() {
46
- $(this, k, 0);
47
- }
48
- publish(e) {
49
- w(this, S) != null && w(this, k) == 1 && w(this, S).send(e);
50
- }
51
- send(e, n) {
52
- e === w(this, N) && this.publish(n);
53
- }
54
- }, j = new WeakSet(), I = function() {
55
- w(this, S) != null && (w(this, S).close(), $(this, S, null)), setTimeout(() => this.start(), 1e3);
56
- }, k = new WeakMap(), M = new WeakMap(), D = new WeakMap(), L = new WeakMap(), N = new WeakMap(), S = new WeakMap(), U);
57
- const header = (i) => {
58
- const e = new Uint8Array(4);
59
- return new DataView(e.buffer).setUint32(0, i, !1), e;
60
- }, concat = (i) => {
61
- const e = new Uint8Array(i.reduce((u, f) => u + f.length, 0));
62
- let n = 0;
63
- for (const u of i)
64
- e.set(u, n), n += u.length;
65
- return e;
66
- }, test_connection = async (i) => new Promise((e, n) => {
67
- const u = new Service$1(i), f = setTimeout(() => {
68
- u.stop(), n("connection failed... stopping");
46
+ S(this, k, 0);
47
+ }
48
+ publish(o) {
49
+ w(this, A) != null && w(this, k) == 1 && w(this, A).send(o);
50
+ }
51
+ send(o, d) {
52
+ o === w(this, M) && this.publish(d);
53
+ }
54
+ }
55
+ I = new WeakSet(), J = function() {
56
+ w(this, A) != null && (w(this, A).close(), S(this, A, null)), setTimeout(() => this.start(), 1e3);
57
+ }, k = new WeakMap(), D = new WeakMap(), L = new WeakMap(), C = new WeakMap(), M = new WeakMap(), A = new WeakMap();
58
+ const header = (f) => {
59
+ const o = new Uint8Array(4);
60
+ return new DataView(o.buffer).setUint32(0, f, !1), o;
61
+ }, concat = (f) => {
62
+ const o = new Uint8Array(f.reduce((u, a) => u + a.length, 0));
63
+ let d = 0;
64
+ for (const u of f)
65
+ o.set(u, d), d += u.length;
66
+ return o;
67
+ }, test_connection = async (f) => new Promise((o, d) => {
68
+ const u = new Service(f), a = setTimeout(() => {
69
+ u.stop(), d("connection failed... stopping");
69
70
  }, 2500);
70
71
  u.on_connect(() => {
71
- clearTimeout(f), u.stop(), e();
72
+ clearTimeout(a), u.stop(), o();
72
73
  }), u.start();
73
- }), service_fetch = async (i, e, n, u) => new Promise((f, a) => {
74
- const t = new Service$1(i), s = setTimeout(() => {
75
- t.stop(), a("timed out, cancelled");
76
- }, 2500), o = concat([header(e), n]);
77
- t.on_connect(() => t.publish(o)), t.on_message((r, l) => {
78
- const d = new DataView(l.buffer).getUint32(0, !1), h = l.slice(4), c = u(d, h);
79
- c != null && (clearTimeout(s), t.stop(), f(c));
80
- }), t.start();
81
- }), service_publish = (i, e, n) => {
82
- const u = new Service$1(i), f = setTimeout(() => {
74
+ }), service_fetch = async (f, o, d, u) => new Promise((a, r) => {
75
+ const e = new Service(f), t = setTimeout(() => {
76
+ e.stop(), r("timed out, cancelled");
77
+ }, 2500), i = concat([header(o), d]);
78
+ e.on_connect(() => e.publish(i)), e.on_message((n, c) => {
79
+ const s = new DataView(c.buffer).getUint32(0, !1), l = c.slice(4), h = u(s, l);
80
+ h != null && (clearTimeout(t), e.stop(), a(h));
81
+ }), e.start();
82
+ }), service_publish = (f, o, d) => {
83
+ const u = new Service(f), a = setTimeout(() => {
83
84
  u.stop();
84
85
  }, 2500);
85
86
  u.on_connect(() => {
86
- clearTimeout(f);
87
- const a = concat([header(e), n]);
88
- u.publish(a), u.stop();
87
+ clearTimeout(a);
88
+ const r = concat([header(o), d]);
89
+ u.publish(r), u.stop();
89
90
  }), u.start();
90
91
  };
91
- function WorkerWrapper(i) {
92
+ function WorkerWrapper(f) {
92
93
  return new Worker(
93
94
  "/assets/bundler.js",
94
95
  {
95
- name: i == null ? void 0 : i.name
96
+ name: f == null ? void 0 : f.name
96
97
  }
97
98
  );
98
99
  }
99
100
  var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
100
- function getDefaultExportFromCjs(i) {
101
- return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
101
+ function getDefaultExportFromCjs(f) {
102
+ return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
102
103
  }
103
- var indexLight = { exports: {} }, indexMinimal = {}, minimal = {}, aspromise = asPromise$1;
104
- function asPromise$1(i, e) {
105
- for (var n = new Array(arguments.length - 1), u = 0, f = 2, a = !0; f < arguments.length; )
106
- n[u++] = arguments[f++];
107
- return new Promise(function(s, o) {
108
- n[u] = function(l) {
109
- if (a)
110
- if (a = !1, l)
111
- o(l);
112
- else {
113
- for (var d = new Array(arguments.length - 1), h = 0; h < d.length; )
114
- d[h++] = arguments[h];
115
- s.apply(null, d);
116
- }
117
- };
118
- try {
119
- i.apply(e || null, n);
120
- } catch (r) {
121
- a && (a = !1, o(r));
122
- }
123
- });
104
+ var indexLight = { exports: {} }, indexMinimal = {}, minimal = {}, aspromise, hasRequiredAspromise;
105
+ function requireAspromise() {
106
+ if (hasRequiredAspromise) return aspromise;
107
+ hasRequiredAspromise = 1, aspromise = f;
108
+ function f(o, d) {
109
+ for (var u = new Array(arguments.length - 1), a = 0, r = 2, e = !0; r < arguments.length; )
110
+ u[a++] = arguments[r++];
111
+ return new Promise(function(i, n) {
112
+ u[a] = function(s) {
113
+ if (e)
114
+ if (e = !1, s)
115
+ n(s);
116
+ else {
117
+ for (var l = new Array(arguments.length - 1), h = 0; h < l.length; )
118
+ l[h++] = arguments[h];
119
+ i.apply(null, l);
120
+ }
121
+ };
122
+ try {
123
+ o.apply(d || null, u);
124
+ } catch (c) {
125
+ e && (e = !1, n(c));
126
+ }
127
+ });
128
+ }
129
+ return aspromise;
124
130
  }
125
- var base64$1 = {};
126
- (function(i) {
127
- var e = i;
128
- e.length = function(s) {
129
- var o = s.length;
130
- if (!o)
131
- return 0;
132
- for (var r = 0; --o % 4 > 1 && s.charAt(o) === "="; )
133
- ++r;
134
- return Math.ceil(s.length * 3) / 4 - r;
135
- };
136
- for (var n = new Array(64), u = new Array(123), f = 0; f < 64; )
137
- u[n[f] = f < 26 ? f + 65 : f < 52 ? f + 71 : f < 62 ? f - 4 : f - 59 | 43] = f++;
138
- e.encode = function(s, o, r) {
139
- for (var l = null, d = [], h = 0, c = 0, p; o < r; ) {
140
- var m = s[o++];
141
- switch (c) {
142
- case 0:
143
- d[h++] = n[m >> 2], p = (m & 3) << 4, c = 1;
144
- break;
145
- case 1:
146
- d[h++] = n[p | m >> 4], p = (m & 15) << 2, c = 2;
147
- break;
148
- case 2:
149
- d[h++] = n[p | m >> 6], d[h++] = n[m & 63], c = 0;
150
- break;
131
+ var base64 = {}, hasRequiredBase64;
132
+ function requireBase64() {
133
+ return hasRequiredBase64 || (hasRequiredBase64 = 1, function(f) {
134
+ var o = f;
135
+ o.length = function(t) {
136
+ var i = t.length;
137
+ if (!i)
138
+ return 0;
139
+ for (var n = 0; --i % 4 > 1 && t.charAt(i) === "="; )
140
+ ++n;
141
+ return Math.ceil(t.length * 3) / 4 - n;
142
+ };
143
+ for (var d = new Array(64), u = new Array(123), a = 0; a < 64; )
144
+ u[d[a] = a < 26 ? a + 65 : a < 52 ? a + 71 : a < 62 ? a - 4 : a - 59 | 43] = a++;
145
+ o.encode = function(t, i, n) {
146
+ for (var c = null, s = [], l = 0, h = 0, p; i < n; ) {
147
+ var m = t[i++];
148
+ switch (h) {
149
+ case 0:
150
+ s[l++] = d[m >> 2], p = (m & 3) << 4, h = 1;
151
+ break;
152
+ case 1:
153
+ s[l++] = d[p | m >> 4], p = (m & 15) << 2, h = 2;
154
+ break;
155
+ case 2:
156
+ s[l++] = d[p | m >> 6], s[l++] = d[m & 63], h = 0;
157
+ break;
158
+ }
159
+ l > 8191 && ((c || (c = [])).push(String.fromCharCode.apply(String, s)), l = 0);
151
160
  }
152
- h > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, d)), h = 0);
153
- }
154
- return c && (d[h++] = n[p], d[h++] = 61, c === 1 && (d[h++] = 61)), l ? (h && l.push(String.fromCharCode.apply(String, d.slice(0, h))), l.join("")) : String.fromCharCode.apply(String, d.slice(0, h));
155
- };
156
- var a = "invalid encoding";
157
- e.decode = function(s, o, r) {
158
- for (var l = r, d = 0, h, c = 0; c < s.length; ) {
159
- var p = s.charCodeAt(c++);
160
- if (p === 61 && d > 1)
161
- break;
162
- if ((p = u[p]) === void 0)
163
- throw Error(a);
164
- switch (d) {
165
- case 0:
166
- h = p, d = 1;
167
- break;
168
- case 1:
169
- o[r++] = h << 2 | (p & 48) >> 4, h = p, d = 2;
170
- break;
171
- case 2:
172
- o[r++] = (h & 15) << 4 | (p & 60) >> 2, h = p, d = 3;
173
- break;
174
- case 3:
175
- o[r++] = (h & 3) << 6 | p, d = 0;
161
+ return h && (s[l++] = d[p], s[l++] = 61, h === 1 && (s[l++] = 61)), c ? (l && c.push(String.fromCharCode.apply(String, s.slice(0, l))), c.join("")) : String.fromCharCode.apply(String, s.slice(0, l));
162
+ };
163
+ var r = "invalid encoding";
164
+ o.decode = function(t, i, n) {
165
+ for (var c = n, s = 0, l, h = 0; h < t.length; ) {
166
+ var p = t.charCodeAt(h++);
167
+ if (p === 61 && s > 1)
176
168
  break;
169
+ if ((p = u[p]) === void 0)
170
+ throw Error(r);
171
+ switch (s) {
172
+ case 0:
173
+ l = p, s = 1;
174
+ break;
175
+ case 1:
176
+ i[n++] = l << 2 | (p & 48) >> 4, l = p, s = 2;
177
+ break;
178
+ case 2:
179
+ i[n++] = (l & 15) << 4 | (p & 60) >> 2, l = p, s = 3;
180
+ break;
181
+ case 3:
182
+ i[n++] = (l & 3) << 6 | p, s = 0;
183
+ break;
184
+ }
177
185
  }
178
- }
179
- if (d === 1)
180
- throw Error(a);
181
- return r - l;
182
- }, e.test = function(s) {
183
- return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s);
184
- };
185
- })(base64$1);
186
- var eventemitter = EventEmitter;
187
- function EventEmitter() {
188
- this._listeners = {};
186
+ if (s === 1)
187
+ throw Error(r);
188
+ return n - c;
189
+ }, o.test = function(t) {
190
+ return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t);
191
+ };
192
+ }(base64)), base64;
189
193
  }
190
- EventEmitter.prototype.on = function(e, n, u) {
191
- return (this._listeners[e] || (this._listeners[e] = [])).push({
192
- fn: n,
193
- ctx: u || this
194
- }), this;
195
- };
196
- EventEmitter.prototype.off = function(e, n) {
197
- if (e === void 0)
194
+ var eventemitter, hasRequiredEventemitter;
195
+ function requireEventemitter() {
196
+ if (hasRequiredEventemitter) return eventemitter;
197
+ hasRequiredEventemitter = 1, eventemitter = f;
198
+ function f() {
198
199
  this._listeners = {};
199
- else if (n === void 0)
200
- this._listeners[e] = [];
201
- else
202
- for (var u = this._listeners[e], f = 0; f < u.length; )
203
- u[f].fn === n ? u.splice(f, 1) : ++f;
204
- return this;
205
- };
206
- EventEmitter.prototype.emit = function(e) {
207
- var n = this._listeners[e];
208
- if (n) {
209
- for (var u = [], f = 1; f < arguments.length; )
210
- u.push(arguments[f++]);
211
- for (f = 0; f < n.length; )
212
- n[f].fn.apply(n[f++].ctx, u);
213
- }
214
- return this;
215
- };
216
- var float = factory(factory);
217
- function factory(i) {
218
- return typeof Float32Array < "u" ? function() {
219
- var e = new Float32Array([-0]), n = new Uint8Array(e.buffer), u = n[3] === 128;
220
- function f(o, r, l) {
221
- e[0] = o, r[l] = n[0], r[l + 1] = n[1], r[l + 2] = n[2], r[l + 3] = n[3];
222
- }
223
- function a(o, r, l) {
224
- e[0] = o, r[l] = n[3], r[l + 1] = n[2], r[l + 2] = n[1], r[l + 3] = n[0];
225
- }
226
- i.writeFloatLE = u ? f : a, i.writeFloatBE = u ? a : f;
227
- function t(o, r) {
228
- return n[0] = o[r], n[1] = o[r + 1], n[2] = o[r + 2], n[3] = o[r + 3], e[0];
229
- }
230
- function s(o, r) {
231
- return n[3] = o[r], n[2] = o[r + 1], n[1] = o[r + 2], n[0] = o[r + 3], e[0];
200
+ }
201
+ return f.prototype.on = function(d, u, a) {
202
+ return (this._listeners[d] || (this._listeners[d] = [])).push({
203
+ fn: u,
204
+ ctx: a || this
205
+ }), this;
206
+ }, f.prototype.off = function(d, u) {
207
+ if (d === void 0)
208
+ this._listeners = {};
209
+ else if (u === void 0)
210
+ this._listeners[d] = [];
211
+ else
212
+ for (var a = this._listeners[d], r = 0; r < a.length; )
213
+ a[r].fn === u ? a.splice(r, 1) : ++r;
214
+ return this;
215
+ }, f.prototype.emit = function(d) {
216
+ var u = this._listeners[d];
217
+ if (u) {
218
+ for (var a = [], r = 1; r < arguments.length; )
219
+ a.push(arguments[r++]);
220
+ for (r = 0; r < u.length; )
221
+ u[r].fn.apply(u[r++].ctx, a);
232
222
  }
233
- i.readFloatLE = u ? t : s, i.readFloatBE = u ? s : t;
234
- }() : function() {
235
- function e(u, f, a, t) {
236
- var s = f < 0 ? 1 : 0;
237
- if (s && (f = -f), f === 0)
238
- u(1 / f > 0 ? (
239
- /* positive */
240
- 0
241
- ) : (
242
- /* negative 0 */
243
- 2147483648
244
- ), a, t);
245
- else if (isNaN(f))
246
- u(2143289344, a, t);
247
- else if (f > 34028234663852886e22)
248
- u((s << 31 | 2139095040) >>> 0, a, t);
249
- else if (f < 11754943508222875e-54)
250
- u((s << 31 | Math.round(f / 1401298464324817e-60)) >>> 0, a, t);
251
- else {
252
- var o = Math.floor(Math.log(f) / Math.LN2), r = Math.round(f * Math.pow(2, -o) * 8388608) & 8388607;
253
- u((s << 31 | o + 127 << 23 | r) >>> 0, a, t);
223
+ return this;
224
+ }, eventemitter;
225
+ }
226
+ var float, hasRequiredFloat;
227
+ function requireFloat() {
228
+ if (hasRequiredFloat) return float;
229
+ hasRequiredFloat = 1, float = f(f);
230
+ function f(r) {
231
+ return typeof Float32Array < "u" ? function() {
232
+ var e = new Float32Array([-0]), t = new Uint8Array(e.buffer), i = t[3] === 128;
233
+ function n(h, p, m) {
234
+ e[0] = h, p[m] = t[0], p[m + 1] = t[1], p[m + 2] = t[2], p[m + 3] = t[3];
254
235
  }
255
- }
256
- i.writeFloatLE = e.bind(null, writeUintLE), i.writeFloatBE = e.bind(null, writeUintBE);
257
- function n(u, f, a) {
258
- var t = u(f, a), s = (t >> 31) * 2 + 1, o = t >>> 23 & 255, r = t & 8388607;
259
- return o === 255 ? r ? NaN : s * (1 / 0) : o === 0 ? s * 1401298464324817e-60 * r : s * Math.pow(2, o - 150) * (r + 8388608);
260
- }
261
- i.readFloatLE = n.bind(null, readUintLE), i.readFloatBE = n.bind(null, readUintBE);
262
- }(), typeof Float64Array < "u" ? function() {
263
- var e = new Float64Array([-0]), n = new Uint8Array(e.buffer), u = n[7] === 128;
264
- function f(o, r, l) {
265
- e[0] = o, r[l] = n[0], r[l + 1] = n[1], r[l + 2] = n[2], r[l + 3] = n[3], r[l + 4] = n[4], r[l + 5] = n[5], r[l + 6] = n[6], r[l + 7] = n[7];
266
- }
267
- function a(o, r, l) {
268
- e[0] = o, r[l] = n[7], r[l + 1] = n[6], r[l + 2] = n[5], r[l + 3] = n[4], r[l + 4] = n[3], r[l + 5] = n[2], r[l + 6] = n[1], r[l + 7] = n[0];
269
- }
270
- i.writeDoubleLE = u ? f : a, i.writeDoubleBE = u ? a : f;
271
- function t(o, r) {
272
- return n[0] = o[r], n[1] = o[r + 1], n[2] = o[r + 2], n[3] = o[r + 3], n[4] = o[r + 4], n[5] = o[r + 5], n[6] = o[r + 6], n[7] = o[r + 7], e[0];
273
- }
274
- function s(o, r) {
275
- return n[7] = o[r], n[6] = o[r + 1], n[5] = o[r + 2], n[4] = o[r + 3], n[3] = o[r + 4], n[2] = o[r + 5], n[1] = o[r + 6], n[0] = o[r + 7], e[0];
276
- }
277
- i.readDoubleLE = u ? t : s, i.readDoubleBE = u ? s : t;
278
- }() : function() {
279
- function e(u, f, a, t, s, o) {
280
- var r = t < 0 ? 1 : 0;
281
- if (r && (t = -t), t === 0)
282
- u(0, s, o + f), u(1 / t > 0 ? (
283
- /* positive */
284
- 0
285
- ) : (
286
- /* negative 0 */
287
- 2147483648
288
- ), s, o + a);
289
- else if (isNaN(t))
290
- u(0, s, o + f), u(2146959360, s, o + a);
291
- else if (t > 17976931348623157e292)
292
- u(0, s, o + f), u((r << 31 | 2146435072) >>> 0, s, o + a);
293
- else {
294
- var l;
295
- if (t < 22250738585072014e-324)
296
- l = t / 5e-324, u(l >>> 0, s, o + f), u((r << 31 | l / 4294967296) >>> 0, s, o + a);
236
+ function c(h, p, m) {
237
+ e[0] = h, p[m] = t[3], p[m + 1] = t[2], p[m + 2] = t[1], p[m + 3] = t[0];
238
+ }
239
+ r.writeFloatLE = i ? n : c, r.writeFloatBE = i ? c : n;
240
+ function s(h, p) {
241
+ return t[0] = h[p], t[1] = h[p + 1], t[2] = h[p + 2], t[3] = h[p + 3], e[0];
242
+ }
243
+ function l(h, p) {
244
+ return t[3] = h[p], t[2] = h[p + 1], t[1] = h[p + 2], t[0] = h[p + 3], e[0];
245
+ }
246
+ r.readFloatLE = i ? s : l, r.readFloatBE = i ? l : s;
247
+ }() : function() {
248
+ function e(i, n, c, s) {
249
+ var l = n < 0 ? 1 : 0;
250
+ if (l && (n = -n), n === 0)
251
+ i(1 / n > 0 ? (
252
+ /* positive */
253
+ 0
254
+ ) : (
255
+ /* negative 0 */
256
+ 2147483648
257
+ ), c, s);
258
+ else if (isNaN(n))
259
+ i(2143289344, c, s);
260
+ else if (n > 34028234663852886e22)
261
+ i((l << 31 | 2139095040) >>> 0, c, s);
262
+ else if (n < 11754943508222875e-54)
263
+ i((l << 31 | Math.round(n / 1401298464324817e-60)) >>> 0, c, s);
297
264
  else {
298
- var d = Math.floor(Math.log(t) / Math.LN2);
299
- d === 1024 && (d = 1023), l = t * Math.pow(2, -d), u(l * 4503599627370496 >>> 0, s, o + f), u((r << 31 | d + 1023 << 20 | l * 1048576 & 1048575) >>> 0, s, o + a);
265
+ var h = Math.floor(Math.log(n) / Math.LN2), p = Math.round(n * Math.pow(2, -h) * 8388608) & 8388607;
266
+ i((l << 31 | h + 127 << 23 | p) >>> 0, c, s);
300
267
  }
301
268
  }
302
- }
303
- i.writeDoubleLE = e.bind(null, writeUintLE, 0, 4), i.writeDoubleBE = e.bind(null, writeUintBE, 4, 0);
304
- function n(u, f, a, t, s) {
305
- var o = u(t, s + f), r = u(t, s + a), l = (r >> 31) * 2 + 1, d = r >>> 20 & 2047, h = 4294967296 * (r & 1048575) + o;
306
- return d === 2047 ? h ? NaN : l * (1 / 0) : d === 0 ? l * 5e-324 * h : l * Math.pow(2, d - 1075) * (h + 4503599627370496);
307
- }
308
- i.readDoubleLE = n.bind(null, readUintLE, 0, 4), i.readDoubleBE = n.bind(null, readUintBE, 4, 0);
309
- }(), i;
310
- }
311
- function writeUintLE(i, e, n) {
312
- e[n] = i & 255, e[n + 1] = i >>> 8 & 255, e[n + 2] = i >>> 16 & 255, e[n + 3] = i >>> 24;
313
- }
314
- function writeUintBE(i, e, n) {
315
- e[n] = i >>> 24, e[n + 1] = i >>> 16 & 255, e[n + 2] = i >>> 8 & 255, e[n + 3] = i & 255;
316
- }
317
- function readUintLE(i, e) {
318
- return (i[e] | i[e + 1] << 8 | i[e + 2] << 16 | i[e + 3] << 24) >>> 0;
269
+ r.writeFloatLE = e.bind(null, o), r.writeFloatBE = e.bind(null, d);
270
+ function t(i, n, c) {
271
+ var s = i(n, c), l = (s >> 31) * 2 + 1, h = s >>> 23 & 255, p = s & 8388607;
272
+ return h === 255 ? p ? NaN : l * (1 / 0) : h === 0 ? l * 1401298464324817e-60 * p : l * Math.pow(2, h - 150) * (p + 8388608);
273
+ }
274
+ r.readFloatLE = t.bind(null, u), r.readFloatBE = t.bind(null, a);
275
+ }(), typeof Float64Array < "u" ? function() {
276
+ var e = new Float64Array([-0]), t = new Uint8Array(e.buffer), i = t[7] === 128;
277
+ function n(h, p, m) {
278
+ e[0] = h, p[m] = t[0], p[m + 1] = t[1], p[m + 2] = t[2], p[m + 3] = t[3], p[m + 4] = t[4], p[m + 5] = t[5], p[m + 6] = t[6], p[m + 7] = t[7];
279
+ }
280
+ function c(h, p, m) {
281
+ e[0] = h, p[m] = t[7], p[m + 1] = t[6], p[m + 2] = t[5], p[m + 3] = t[4], p[m + 4] = t[3], p[m + 5] = t[2], p[m + 6] = t[1], p[m + 7] = t[0];
282
+ }
283
+ r.writeDoubleLE = i ? n : c, r.writeDoubleBE = i ? c : n;
284
+ function s(h, p) {
285
+ return t[0] = h[p], t[1] = h[p + 1], t[2] = h[p + 2], t[3] = h[p + 3], t[4] = h[p + 4], t[5] = h[p + 5], t[6] = h[p + 6], t[7] = h[p + 7], e[0];
286
+ }
287
+ function l(h, p) {
288
+ return t[7] = h[p], t[6] = h[p + 1], t[5] = h[p + 2], t[4] = h[p + 3], t[3] = h[p + 4], t[2] = h[p + 5], t[1] = h[p + 6], t[0] = h[p + 7], e[0];
289
+ }
290
+ r.readDoubleLE = i ? s : l, r.readDoubleBE = i ? l : s;
291
+ }() : function() {
292
+ function e(i, n, c, s, l, h) {
293
+ var p = s < 0 ? 1 : 0;
294
+ if (p && (s = -s), s === 0)
295
+ i(0, l, h + n), i(1 / s > 0 ? (
296
+ /* positive */
297
+ 0
298
+ ) : (
299
+ /* negative 0 */
300
+ 2147483648
301
+ ), l, h + c);
302
+ else if (isNaN(s))
303
+ i(0, l, h + n), i(2146959360, l, h + c);
304
+ else if (s > 17976931348623157e292)
305
+ i(0, l, h + n), i((p << 31 | 2146435072) >>> 0, l, h + c);
306
+ else {
307
+ var m;
308
+ if (s < 22250738585072014e-324)
309
+ m = s / 5e-324, i(m >>> 0, l, h + n), i((p << 31 | m / 4294967296) >>> 0, l, h + c);
310
+ else {
311
+ var g = Math.floor(Math.log(s) / Math.LN2);
312
+ g === 1024 && (g = 1023), m = s * Math.pow(2, -g), i(m * 4503599627370496 >>> 0, l, h + n), i((p << 31 | g + 1023 << 20 | m * 1048576 & 1048575) >>> 0, l, h + c);
313
+ }
314
+ }
315
+ }
316
+ r.writeDoubleLE = e.bind(null, o, 0, 4), r.writeDoubleBE = e.bind(null, d, 4, 0);
317
+ function t(i, n, c, s, l) {
318
+ var h = i(s, l + n), p = i(s, l + c), m = (p >> 31) * 2 + 1, g = p >>> 20 & 2047, v = 4294967296 * (p & 1048575) + h;
319
+ return g === 2047 ? v ? NaN : m * (1 / 0) : g === 0 ? m * 5e-324 * v : m * Math.pow(2, g - 1075) * (v + 4503599627370496);
320
+ }
321
+ r.readDoubleLE = t.bind(null, u, 0, 4), r.readDoubleBE = t.bind(null, a, 4, 0);
322
+ }(), r;
323
+ }
324
+ function o(r, e, t) {
325
+ e[t] = r & 255, e[t + 1] = r >>> 8 & 255, e[t + 2] = r >>> 16 & 255, e[t + 3] = r >>> 24;
326
+ }
327
+ function d(r, e, t) {
328
+ e[t] = r >>> 24, e[t + 1] = r >>> 16 & 255, e[t + 2] = r >>> 8 & 255, e[t + 3] = r & 255;
329
+ }
330
+ function u(r, e) {
331
+ return (r[e] | r[e + 1] << 8 | r[e + 2] << 16 | r[e + 3] << 24) >>> 0;
332
+ }
333
+ function a(r, e) {
334
+ return (r[e] << 24 | r[e + 1] << 16 | r[e + 2] << 8 | r[e + 3]) >>> 0;
335
+ }
336
+ return float;
319
337
  }
320
- function readUintBE(i, e) {
321
- return (i[e] << 24 | i[e + 1] << 16 | i[e + 2] << 8 | i[e + 3]) >>> 0;
338
+ var inquire_1, hasRequiredInquire;
339
+ function requireInquire() {
340
+ if (hasRequiredInquire) return inquire_1;
341
+ hasRequiredInquire = 1, inquire_1 = inquire;
342
+ function inquire(moduleName) {
343
+ try {
344
+ var mod = eval("quire".replace(/^/, "re"))(moduleName);
345
+ if (mod && (mod.length || Object.keys(mod).length))
346
+ return mod;
347
+ } catch (f) {
348
+ }
349
+ return null;
350
+ }
351
+ return inquire_1;
322
352
  }
323
- var inquire_1 = inquire$1;
324
- function inquire$1(moduleName) {
325
- try {
326
- var mod = eval("quire".replace(/^/, "re"))(moduleName);
327
- if (mod && (mod.length || Object.keys(mod).length))
328
- return mod;
329
- } catch (i) {
330
- }
331
- return null;
353
+ var utf8 = {}, hasRequiredUtf8;
354
+ function requireUtf8() {
355
+ return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(f) {
356
+ var o = f;
357
+ o.length = function(u) {
358
+ for (var a = 0, r = 0, e = 0; e < u.length; ++e)
359
+ r = u.charCodeAt(e), r < 128 ? a += 1 : r < 2048 ? a += 2 : (r & 64512) === 55296 && (u.charCodeAt(e + 1) & 64512) === 56320 ? (++e, a += 4) : a += 3;
360
+ return a;
361
+ }, o.read = function(u, a, r) {
362
+ var e = r - a;
363
+ if (e < 1)
364
+ return "";
365
+ for (var t = null, i = [], n = 0, c; a < r; )
366
+ c = u[a++], c < 128 ? i[n++] = c : c > 191 && c < 224 ? i[n++] = (c & 31) << 6 | u[a++] & 63 : c > 239 && c < 365 ? (c = ((c & 7) << 18 | (u[a++] & 63) << 12 | (u[a++] & 63) << 6 | u[a++] & 63) - 65536, i[n++] = 55296 + (c >> 10), i[n++] = 56320 + (c & 1023)) : i[n++] = (c & 15) << 12 | (u[a++] & 63) << 6 | u[a++] & 63, n > 8191 && ((t || (t = [])).push(String.fromCharCode.apply(String, i)), n = 0);
367
+ return t ? (n && t.push(String.fromCharCode.apply(String, i.slice(0, n))), t.join("")) : String.fromCharCode.apply(String, i.slice(0, n));
368
+ }, o.write = function(u, a, r) {
369
+ for (var e = r, t, i, n = 0; n < u.length; ++n)
370
+ t = u.charCodeAt(n), t < 128 ? a[r++] = t : t < 2048 ? (a[r++] = t >> 6 | 192, a[r++] = t & 63 | 128) : (t & 64512) === 55296 && ((i = u.charCodeAt(n + 1)) & 64512) === 56320 ? (t = 65536 + ((t & 1023) << 10) + (i & 1023), ++n, a[r++] = t >> 18 | 240, a[r++] = t >> 12 & 63 | 128, a[r++] = t >> 6 & 63 | 128, a[r++] = t & 63 | 128) : (a[r++] = t >> 12 | 224, a[r++] = t >> 6 & 63 | 128, a[r++] = t & 63 | 128);
371
+ return r - e;
372
+ };
373
+ }(utf8)), utf8;
332
374
  }
333
- var utf8$2 = {};
334
- (function(i) {
335
- var e = i;
336
- e.length = function(u) {
337
- for (var f = 0, a = 0, t = 0; t < u.length; ++t)
338
- a = u.charCodeAt(t), a < 128 ? f += 1 : a < 2048 ? f += 2 : (a & 64512) === 55296 && (u.charCodeAt(t + 1) & 64512) === 56320 ? (++t, f += 4) : f += 3;
339
- return f;
340
- }, e.read = function(u, f, a) {
341
- var t = a - f;
342
- if (t < 1)
343
- return "";
344
- for (var s = null, o = [], r = 0, l; f < a; )
345
- l = u[f++], l < 128 ? o[r++] = l : l > 191 && l < 224 ? o[r++] = (l & 31) << 6 | u[f++] & 63 : l > 239 && l < 365 ? (l = ((l & 7) << 18 | (u[f++] & 63) << 12 | (u[f++] & 63) << 6 | u[f++] & 63) - 65536, o[r++] = 55296 + (l >> 10), o[r++] = 56320 + (l & 1023)) : o[r++] = (l & 15) << 12 | (u[f++] & 63) << 6 | u[f++] & 63, r > 8191 && ((s || (s = [])).push(String.fromCharCode.apply(String, o)), r = 0);
346
- return s ? (r && s.push(String.fromCharCode.apply(String, o.slice(0, r))), s.join("")) : String.fromCharCode.apply(String, o.slice(0, r));
347
- }, e.write = function(u, f, a) {
348
- for (var t = a, s, o, r = 0; r < u.length; ++r)
349
- s = u.charCodeAt(r), s < 128 ? f[a++] = s : s < 2048 ? (f[a++] = s >> 6 | 192, f[a++] = s & 63 | 128) : (s & 64512) === 55296 && ((o = u.charCodeAt(r + 1)) & 64512) === 56320 ? (s = 65536 + ((s & 1023) << 10) + (o & 1023), ++r, f[a++] = s >> 18 | 240, f[a++] = s >> 12 & 63 | 128, f[a++] = s >> 6 & 63 | 128, f[a++] = s & 63 | 128) : (f[a++] = s >> 12 | 224, f[a++] = s >> 6 & 63 | 128, f[a++] = s & 63 | 128);
350
- return a - t;
351
- };
352
- })(utf8$2);
353
- var pool_1 = pool;
354
- function pool(i, e, n) {
355
- var u = n || 8192, f = u >>> 1, a = null, t = u;
356
- return function(o) {
357
- if (o < 1 || o > f)
358
- return i(o);
359
- t + o > u && (a = i(u), t = 0);
360
- var r = e.call(a, t, t += o);
361
- return t & 7 && (t = (t | 7) + 1), r;
362
- };
375
+ var pool_1, hasRequiredPool;
376
+ function requirePool() {
377
+ if (hasRequiredPool) return pool_1;
378
+ hasRequiredPool = 1, pool_1 = f;
379
+ function f(o, d, u) {
380
+ var a = u || 8192, r = a >>> 1, e = null, t = a;
381
+ return function(n) {
382
+ if (n < 1 || n > r)
383
+ return o(n);
384
+ t + n > a && (e = o(a), t = 0);
385
+ var c = d.call(e, t, t += n);
386
+ return t & 7 && (t = (t | 7) + 1), c;
387
+ };
388
+ }
389
+ return pool_1;
363
390
  }
364
391
  var longbits, hasRequiredLongbits;
365
392
  function requireLongbits() {
366
393
  if (hasRequiredLongbits) return longbits;
367
- hasRequiredLongbits = 1, longbits = e;
368
- var i = requireMinimal();
369
- function e(a, t) {
370
- this.lo = a >>> 0, this.hi = t >>> 0;
394
+ hasRequiredLongbits = 1, longbits = o;
395
+ var f = requireMinimal();
396
+ function o(r, e) {
397
+ this.lo = r >>> 0, this.hi = e >>> 0;
371
398
  }
372
- var n = e.zero = new e(0, 0);
373
- n.toNumber = function() {
399
+ var d = o.zero = new o(0, 0);
400
+ d.toNumber = function() {
374
401
  return 0;
375
- }, n.zzEncode = n.zzDecode = function() {
402
+ }, d.zzEncode = d.zzDecode = function() {
376
403
  return this;
377
- }, n.length = function() {
404
+ }, d.length = function() {
378
405
  return 1;
379
406
  };
380
- var u = e.zeroHash = "\0\0\0\0\0\0\0\0";
381
- e.fromNumber = function(t) {
382
- if (t === 0)
383
- return n;
384
- var s = t < 0;
385
- s && (t = -t);
386
- var o = t >>> 0, r = (t - o) / 4294967296 >>> 0;
387
- return s && (r = ~r >>> 0, o = ~o >>> 0, ++o > 4294967295 && (o = 0, ++r > 4294967295 && (r = 0))), new e(o, r);
388
- }, e.from = function(t) {
389
- if (typeof t == "number")
390
- return e.fromNumber(t);
391
- if (i.isString(t))
392
- if (i.Long)
393
- t = i.Long.fromString(t);
407
+ var u = o.zeroHash = "\0\0\0\0\0\0\0\0";
408
+ o.fromNumber = function(e) {
409
+ if (e === 0)
410
+ return d;
411
+ var t = e < 0;
412
+ t && (e = -e);
413
+ var i = e >>> 0, n = (e - i) / 4294967296 >>> 0;
414
+ return t && (n = ~n >>> 0, i = ~i >>> 0, ++i > 4294967295 && (i = 0, ++n > 4294967295 && (n = 0))), new o(i, n);
415
+ }, o.from = function(e) {
416
+ if (typeof e == "number")
417
+ return o.fromNumber(e);
418
+ if (f.isString(e))
419
+ if (f.Long)
420
+ e = f.Long.fromString(e);
394
421
  else
395
- return e.fromNumber(parseInt(t, 10));
396
- return t.low || t.high ? new e(t.low >>> 0, t.high >>> 0) : n;
397
- }, e.prototype.toNumber = function(t) {
398
- if (!t && this.hi >>> 31) {
399
- var s = ~this.lo + 1 >>> 0, o = ~this.hi >>> 0;
400
- return s || (o = o + 1 >>> 0), -(s + o * 4294967296);
422
+ return o.fromNumber(parseInt(e, 10));
423
+ return e.low || e.high ? new o(e.low >>> 0, e.high >>> 0) : d;
424
+ }, o.prototype.toNumber = function(e) {
425
+ if (!e && this.hi >>> 31) {
426
+ var t = ~this.lo + 1 >>> 0, i = ~this.hi >>> 0;
427
+ return t || (i = i + 1 >>> 0), -(t + i * 4294967296);
401
428
  }
402
429
  return this.lo + this.hi * 4294967296;
403
- }, e.prototype.toLong = function(t) {
404
- return i.Long ? new i.Long(this.lo | 0, this.hi | 0, !!t) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!t };
430
+ }, o.prototype.toLong = function(e) {
431
+ return f.Long ? new f.Long(this.lo | 0, this.hi | 0, !!e) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!e };
405
432
  };
406
- var f = String.prototype.charCodeAt;
407
- return e.fromHash = function(t) {
408
- return t === u ? n : new e(
409
- (f.call(t, 0) | f.call(t, 1) << 8 | f.call(t, 2) << 16 | f.call(t, 3) << 24) >>> 0,
410
- (f.call(t, 4) | f.call(t, 5) << 8 | f.call(t, 6) << 16 | f.call(t, 7) << 24) >>> 0
433
+ var a = String.prototype.charCodeAt;
434
+ return o.fromHash = function(e) {
435
+ return e === u ? d : new o(
436
+ (a.call(e, 0) | a.call(e, 1) << 8 | a.call(e, 2) << 16 | a.call(e, 3) << 24) >>> 0,
437
+ (a.call(e, 4) | a.call(e, 5) << 8 | a.call(e, 6) << 16 | a.call(e, 7) << 24) >>> 0
411
438
  );
412
- }, e.prototype.toHash = function() {
439
+ }, o.prototype.toHash = function() {
413
440
  return String.fromCharCode(
414
441
  this.lo & 255,
415
442
  this.lo >>> 8 & 255,
@@ -420,90 +447,90 @@ function requireLongbits() {
420
447
  this.hi >>> 16 & 255,
421
448
  this.hi >>> 24
422
449
  );
423
- }, e.prototype.zzEncode = function() {
424
- var t = this.hi >> 31;
425
- return this.hi = ((this.hi << 1 | this.lo >>> 31) ^ t) >>> 0, this.lo = (this.lo << 1 ^ t) >>> 0, this;
426
- }, e.prototype.zzDecode = function() {
427
- var t = -(this.lo & 1);
428
- return this.lo = ((this.lo >>> 1 | this.hi << 31) ^ t) >>> 0, this.hi = (this.hi >>> 1 ^ t) >>> 0, this;
429
- }, e.prototype.length = function() {
430
- var t = this.lo, s = (this.lo >>> 28 | this.hi << 4) >>> 0, o = this.hi >>> 24;
431
- return o === 0 ? s === 0 ? t < 16384 ? t < 128 ? 1 : 2 : t < 2097152 ? 3 : 4 : s < 16384 ? s < 128 ? 5 : 6 : s < 2097152 ? 7 : 8 : o < 128 ? 9 : 10;
450
+ }, o.prototype.zzEncode = function() {
451
+ var e = this.hi >> 31;
452
+ return this.hi = ((this.hi << 1 | this.lo >>> 31) ^ e) >>> 0, this.lo = (this.lo << 1 ^ e) >>> 0, this;
453
+ }, o.prototype.zzDecode = function() {
454
+ var e = -(this.lo & 1);
455
+ return this.lo = ((this.lo >>> 1 | this.hi << 31) ^ e) >>> 0, this.hi = (this.hi >>> 1 ^ e) >>> 0, this;
456
+ }, o.prototype.length = function() {
457
+ var e = this.lo, t = (this.lo >>> 28 | this.hi << 4) >>> 0, i = this.hi >>> 24;
458
+ return i === 0 ? t === 0 ? e < 16384 ? e < 128 ? 1 : 2 : e < 2097152 ? 3 : 4 : t < 16384 ? t < 128 ? 5 : 6 : t < 2097152 ? 7 : 8 : i < 128 ? 9 : 10;
432
459
  }, longbits;
433
460
  }
434
461
  var hasRequiredMinimal;
435
462
  function requireMinimal() {
436
- return hasRequiredMinimal || (hasRequiredMinimal = 1, function(i) {
437
- var e = i;
438
- e.asPromise = aspromise, e.base64 = base64$1, e.EventEmitter = eventemitter, e.float = float, e.inquire = inquire_1, e.utf8 = utf8$2, e.pool = pool_1, e.LongBits = requireLongbits(), e.isNode = !!(typeof commonjsGlobal < "u" && commonjsGlobal && commonjsGlobal.process && commonjsGlobal.process.versions && commonjsGlobal.process.versions.node), e.global = e.isNode && commonjsGlobal || typeof window < "u" && window || typeof self < "u" && self || commonjsGlobal, e.emptyArray = Object.freeze ? Object.freeze([]) : (
463
+ return hasRequiredMinimal || (hasRequiredMinimal = 1, function(f) {
464
+ var o = f;
465
+ o.asPromise = requireAspromise(), o.base64 = requireBase64(), o.EventEmitter = requireEventemitter(), o.float = requireFloat(), o.inquire = requireInquire(), o.utf8 = requireUtf8(), o.pool = requirePool(), o.LongBits = requireLongbits(), o.isNode = !!(typeof commonjsGlobal < "u" && commonjsGlobal && commonjsGlobal.process && commonjsGlobal.process.versions && commonjsGlobal.process.versions.node), o.global = o.isNode && commonjsGlobal || typeof window < "u" && window || typeof self < "u" && self || minimal, o.emptyArray = Object.freeze ? Object.freeze([]) : (
439
466
  /* istanbul ignore next */
440
467
  []
441
- ), e.emptyObject = Object.freeze ? Object.freeze({}) : (
468
+ ), o.emptyObject = Object.freeze ? Object.freeze({}) : (
442
469
  /* istanbul ignore next */
443
470
  {}
444
- ), e.isInteger = Number.isInteger || /* istanbul ignore next */
445
- function(a) {
446
- return typeof a == "number" && isFinite(a) && Math.floor(a) === a;
447
- }, e.isString = function(a) {
448
- return typeof a == "string" || a instanceof String;
449
- }, e.isObject = function(a) {
450
- return a && typeof a == "object";
451
- }, e.isset = /**
471
+ ), o.isInteger = Number.isInteger || /* istanbul ignore next */
472
+ function(r) {
473
+ return typeof r == "number" && isFinite(r) && Math.floor(r) === r;
474
+ }, o.isString = function(r) {
475
+ return typeof r == "string" || r instanceof String;
476
+ }, o.isObject = function(r) {
477
+ return r && typeof r == "object";
478
+ }, o.isset = /**
452
479
  * Checks if a property on a message is considered to be present.
453
480
  * @param {Object} obj Plain object or message instance
454
481
  * @param {string} prop Property name
455
482
  * @returns {boolean} `true` if considered to be present, otherwise `false`
456
483
  */
457
- e.isSet = function(a, t) {
458
- var s = a[t];
459
- return s != null && a.hasOwnProperty(t) ? typeof s != "object" || (Array.isArray(s) ? s.length : Object.keys(s).length) > 0 : !1;
460
- }, e.Buffer = function() {
484
+ o.isSet = function(r, e) {
485
+ var t = r[e];
486
+ return t != null && r.hasOwnProperty(e) ? typeof t != "object" || (Array.isArray(t) ? t.length : Object.keys(t).length) > 0 : !1;
487
+ }, o.Buffer = function() {
461
488
  try {
462
- var f = e.inquire("buffer").Buffer;
463
- return f.prototype.utf8Write ? f : (
489
+ var a = o.inquire("buffer").Buffer;
490
+ return a.prototype.utf8Write ? a : (
464
491
  /* istanbul ignore next */
465
492
  null
466
493
  );
467
494
  } catch {
468
495
  return null;
469
496
  }
470
- }(), e._Buffer_from = null, e._Buffer_allocUnsafe = null, e.newBuffer = function(a) {
471
- return typeof a == "number" ? e.Buffer ? e._Buffer_allocUnsafe(a) : new e.Array(a) : e.Buffer ? e._Buffer_from(a) : typeof Uint8Array > "u" ? a : new Uint8Array(a);
472
- }, e.Array = typeof Uint8Array < "u" ? Uint8Array : Array, e.Long = /* istanbul ignore next */
473
- e.global.dcodeIO && /* istanbul ignore next */
474
- e.global.dcodeIO.Long || /* istanbul ignore next */
475
- e.global.Long || e.inquire("long"), e.key2Re = /^true|false|0|1$/, e.key32Re = /^-?(?:0|[1-9][0-9]*)$/, e.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, e.longToHash = function(a) {
476
- return a ? e.LongBits.from(a).toHash() : e.LongBits.zeroHash;
477
- }, e.longFromHash = function(a, t) {
478
- var s = e.LongBits.fromHash(a);
479
- return e.Long ? e.Long.fromBits(s.lo, s.hi, t) : s.toNumber(!!t);
497
+ }(), o._Buffer_from = null, o._Buffer_allocUnsafe = null, o.newBuffer = function(r) {
498
+ return typeof r == "number" ? o.Buffer ? o._Buffer_allocUnsafe(r) : new o.Array(r) : o.Buffer ? o._Buffer_from(r) : typeof Uint8Array > "u" ? r : new Uint8Array(r);
499
+ }, o.Array = typeof Uint8Array < "u" ? Uint8Array : Array, o.Long = /* istanbul ignore next */
500
+ o.global.dcodeIO && /* istanbul ignore next */
501
+ o.global.dcodeIO.Long || /* istanbul ignore next */
502
+ o.global.Long || o.inquire("long"), o.key2Re = /^true|false|0|1$/, o.key32Re = /^-?(?:0|[1-9][0-9]*)$/, o.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, o.longToHash = function(r) {
503
+ return r ? o.LongBits.from(r).toHash() : o.LongBits.zeroHash;
504
+ }, o.longFromHash = function(r, e) {
505
+ var t = o.LongBits.fromHash(r);
506
+ return o.Long ? o.Long.fromBits(t.lo, t.hi, e) : t.toNumber(!!e);
480
507
  };
481
- function n(f, a, t) {
482
- for (var s = Object.keys(a), o = 0; o < s.length; ++o)
483
- (f[s[o]] === void 0 || !t) && (f[s[o]] = a[s[o]]);
484
- return f;
508
+ function d(a, r, e) {
509
+ for (var t = Object.keys(r), i = 0; i < t.length; ++i)
510
+ (a[t[i]] === void 0 || !e) && (a[t[i]] = r[t[i]]);
511
+ return a;
485
512
  }
486
- e.merge = n, e.lcFirst = function(a) {
487
- return a.charAt(0).toLowerCase() + a.substring(1);
513
+ o.merge = d, o.lcFirst = function(r) {
514
+ return r.charAt(0).toLowerCase() + r.substring(1);
488
515
  };
489
- function u(f) {
490
- function a(t, s) {
491
- if (!(this instanceof a))
492
- return new a(t, s);
516
+ function u(a) {
517
+ function r(e, t) {
518
+ if (!(this instanceof r))
519
+ return new r(e, t);
493
520
  Object.defineProperty(this, "message", { get: function() {
494
- return t;
495
- } }), Error.captureStackTrace ? Error.captureStackTrace(this, a) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), s && n(this, s);
521
+ return e;
522
+ } }), Error.captureStackTrace ? Error.captureStackTrace(this, r) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), t && d(this, t);
496
523
  }
497
- return a.prototype = Object.create(Error.prototype, {
524
+ return r.prototype = Object.create(Error.prototype, {
498
525
  constructor: {
499
- value: a,
526
+ value: r,
500
527
  writable: !0,
501
528
  enumerable: !1,
502
529
  configurable: !0
503
530
  },
504
531
  name: {
505
532
  get: function() {
506
- return f;
533
+ return a;
507
534
  },
508
535
  set: void 0,
509
536
  enumerable: !1,
@@ -521,561 +548,570 @@ function requireMinimal() {
521
548
  enumerable: !1,
522
549
  configurable: !0
523
550
  }
524
- }), a;
551
+ }), r;
525
552
  }
526
- e.newError = u, e.ProtocolError = u("ProtocolError"), e.oneOfGetter = function(a) {
527
- for (var t = {}, s = 0; s < a.length; ++s)
528
- t[a[s]] = 1;
553
+ o.newError = u, o.ProtocolError = u("ProtocolError"), o.oneOfGetter = function(r) {
554
+ for (var e = {}, t = 0; t < r.length; ++t)
555
+ e[r[t]] = 1;
529
556
  return function() {
530
- for (var o = Object.keys(this), r = o.length - 1; r > -1; --r)
531
- if (t[o[r]] === 1 && this[o[r]] !== void 0 && this[o[r]] !== null)
532
- return o[r];
557
+ for (var i = Object.keys(this), n = i.length - 1; n > -1; --n)
558
+ if (e[i[n]] === 1 && this[i[n]] !== void 0 && this[i[n]] !== null)
559
+ return i[n];
533
560
  };
534
- }, e.oneOfSetter = function(a) {
535
- return function(t) {
536
- for (var s = 0; s < a.length; ++s)
537
- a[s] !== t && delete this[a[s]];
561
+ }, o.oneOfSetter = function(r) {
562
+ return function(e) {
563
+ for (var t = 0; t < r.length; ++t)
564
+ r[t] !== e && delete this[r[t]];
538
565
  };
539
- }, e.toJSONOptions = {
566
+ }, o.toJSONOptions = {
540
567
  longs: String,
541
568
  enums: String,
542
569
  bytes: String,
543
570
  json: !0
544
- }, e._configure = function() {
545
- var f = e.Buffer;
546
- if (!f) {
547
- e._Buffer_from = e._Buffer_allocUnsafe = null;
571
+ }, o._configure = function() {
572
+ var a = o.Buffer;
573
+ if (!a) {
574
+ o._Buffer_from = o._Buffer_allocUnsafe = null;
548
575
  return;
549
576
  }
550
- e._Buffer_from = f.from !== Uint8Array.from && f.from || /* istanbul ignore next */
551
- function(t, s) {
552
- return new f(t, s);
553
- }, e._Buffer_allocUnsafe = f.allocUnsafe || /* istanbul ignore next */
554
- function(t) {
555
- return new f(t);
577
+ o._Buffer_from = a.from !== Uint8Array.from && a.from || /* istanbul ignore next */
578
+ function(e, t) {
579
+ return new a(e, t);
580
+ }, o._Buffer_allocUnsafe = a.allocUnsafe || /* istanbul ignore next */
581
+ function(e) {
582
+ return new a(e);
556
583
  };
557
584
  };
558
585
  }(minimal)), minimal;
559
586
  }
560
- var writer = Writer$1, util$6 = requireMinimal(), BufferWriter$1, LongBits$1 = util$6.LongBits, base64 = util$6.base64, utf8$1 = util$6.utf8;
561
- function Op(i, e, n) {
562
- this.fn = i, this.len = e, this.next = void 0, this.val = n;
563
- }
564
- function noop$1() {
565
- }
566
- function State(i) {
567
- this.head = i.head, this.tail = i.tail, this.len = i.len, this.next = i.states;
568
- }
569
- function Writer$1() {
570
- this.len = 0, this.head = new Op(noop$1, 0, 0), this.tail = this.head, this.states = null;
571
- }
572
- var create$1 = function i() {
573
- return util$6.Buffer ? function() {
574
- return (Writer$1.create = function() {
575
- return new BufferWriter$1();
576
- })();
577
- } : function() {
578
- return new Writer$1();
587
+ var writer, hasRequiredWriter;
588
+ function requireWriter() {
589
+ if (hasRequiredWriter) return writer;
590
+ hasRequiredWriter = 1, writer = i;
591
+ var f = requireMinimal(), o, d = f.LongBits, u = f.base64, a = f.utf8;
592
+ function r(g, v, y) {
593
+ this.fn = g, this.len = v, this.next = void 0, this.val = y;
594
+ }
595
+ function e() {
596
+ }
597
+ function t(g) {
598
+ this.head = g.head, this.tail = g.tail, this.len = g.len, this.next = g.states;
599
+ }
600
+ function i() {
601
+ this.len = 0, this.head = new r(e, 0, 0), this.tail = this.head, this.states = null;
602
+ }
603
+ var n = function() {
604
+ return f.Buffer ? function() {
605
+ return (i.create = function() {
606
+ return new o();
607
+ })();
608
+ } : function() {
609
+ return new i();
610
+ };
579
611
  };
580
- };
581
- Writer$1.create = create$1();
582
- Writer$1.alloc = function i(e) {
583
- return new util$6.Array(e);
584
- };
585
- util$6.Array !== Array && (Writer$1.alloc = util$6.pool(Writer$1.alloc, util$6.Array.prototype.subarray));
586
- Writer$1.prototype._push = function i(e, n, u) {
587
- return this.tail = this.tail.next = new Op(e, n, u), this.len += n, this;
588
- };
589
- function writeByte(i, e, n) {
590
- e[n] = i & 255;
591
- }
592
- function writeVarint32(i, e, n) {
593
- for (; i > 127; )
594
- e[n++] = i & 127 | 128, i >>>= 7;
595
- e[n] = i;
596
- }
597
- function VarintOp(i, e) {
598
- this.len = i, this.next = void 0, this.val = e;
599
- }
600
- VarintOp.prototype = Object.create(Op.prototype);
601
- VarintOp.prototype.fn = writeVarint32;
602
- Writer$1.prototype.uint32 = function i(e) {
603
- return this.len += (this.tail = this.tail.next = new VarintOp(
604
- (e = e >>> 0) < 128 ? 1 : e < 16384 ? 2 : e < 2097152 ? 3 : e < 268435456 ? 4 : 5,
605
- e
606
- )).len, this;
607
- };
608
- Writer$1.prototype.int32 = function i(e) {
609
- return e < 0 ? this._push(writeVarint64, 10, LongBits$1.fromNumber(e)) : this.uint32(e);
610
- };
611
- Writer$1.prototype.sint32 = function i(e) {
612
- return this.uint32((e << 1 ^ e >> 31) >>> 0);
613
- };
614
- function writeVarint64(i, e, n) {
615
- for (; i.hi; )
616
- e[n++] = i.lo & 127 | 128, i.lo = (i.lo >>> 7 | i.hi << 25) >>> 0, i.hi >>>= 7;
617
- for (; i.lo > 127; )
618
- e[n++] = i.lo & 127 | 128, i.lo = i.lo >>> 7;
619
- e[n++] = i.lo;
620
- }
621
- Writer$1.prototype.uint64 = function i(e) {
622
- var n = LongBits$1.from(e);
623
- return this._push(writeVarint64, n.length(), n);
624
- };
625
- Writer$1.prototype.int64 = Writer$1.prototype.uint64;
626
- Writer$1.prototype.sint64 = function i(e) {
627
- var n = LongBits$1.from(e).zzEncode();
628
- return this._push(writeVarint64, n.length(), n);
629
- };
630
- Writer$1.prototype.bool = function i(e) {
631
- return this._push(writeByte, 1, e ? 1 : 0);
632
- };
633
- function writeFixed32(i, e, n) {
634
- e[n] = i & 255, e[n + 1] = i >>> 8 & 255, e[n + 2] = i >>> 16 & 255, e[n + 3] = i >>> 24;
635
- }
636
- Writer$1.prototype.fixed32 = function i(e) {
637
- return this._push(writeFixed32, 4, e >>> 0);
638
- };
639
- Writer$1.prototype.sfixed32 = Writer$1.prototype.fixed32;
640
- Writer$1.prototype.fixed64 = function i(e) {
641
- var n = LongBits$1.from(e);
642
- return this._push(writeFixed32, 4, n.lo)._push(writeFixed32, 4, n.hi);
643
- };
644
- Writer$1.prototype.sfixed64 = Writer$1.prototype.fixed64;
645
- Writer$1.prototype.float = function i(e) {
646
- return this._push(util$6.float.writeFloatLE, 4, e);
647
- };
648
- Writer$1.prototype.double = function i(e) {
649
- return this._push(util$6.float.writeDoubleLE, 8, e);
650
- };
651
- var writeBytes = util$6.Array.prototype.set ? function i(e, n, u) {
652
- n.set(e, u);
653
- } : function i(e, n, u) {
654
- for (var f = 0; f < e.length; ++f)
655
- n[u + f] = e[f];
656
- };
657
- Writer$1.prototype.bytes = function i(e) {
658
- var n = e.length >>> 0;
659
- if (!n)
660
- return this._push(writeByte, 1, 0);
661
- if (util$6.isString(e)) {
662
- var u = Writer$1.alloc(n = base64.length(e));
663
- base64.decode(e, u, 0), e = u;
664
- }
665
- return this.uint32(n)._push(writeBytes, n, e);
666
- };
667
- Writer$1.prototype.string = function i(e) {
668
- var n = utf8$1.length(e);
669
- return n ? this.uint32(n)._push(utf8$1.write, n, e) : this._push(writeByte, 1, 0);
670
- };
671
- Writer$1.prototype.fork = function i() {
672
- return this.states = new State(this), this.head = this.tail = new Op(noop$1, 0, 0), this.len = 0, this;
673
- };
674
- Writer$1.prototype.reset = function i() {
675
- return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new Op(noop$1, 0, 0), this.len = 0), this;
676
- };
677
- Writer$1.prototype.ldelim = function i() {
678
- var e = this.head, n = this.tail, u = this.len;
679
- return this.reset().uint32(u), u && (this.tail.next = e.next, this.tail = n, this.len += u), this;
680
- };
681
- Writer$1.prototype.finish = function i() {
682
- for (var e = this.head.next, n = this.constructor.alloc(this.len), u = 0; e; )
683
- e.fn(e.val, n, u), u += e.len, e = e.next;
684
- return n;
685
- };
686
- Writer$1._configure = function(i) {
687
- BufferWriter$1 = i, Writer$1.create = create$1(), BufferWriter$1._configure();
688
- };
689
- var writer_buffer = BufferWriter, Writer = writer;
690
- (BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
691
- var util$5 = requireMinimal();
692
- function BufferWriter() {
693
- Writer.call(this);
694
- }
695
- BufferWriter._configure = function() {
696
- BufferWriter.alloc = util$5._Buffer_allocUnsafe, BufferWriter.writeBytesBuffer = util$5.Buffer && util$5.Buffer.prototype instanceof Uint8Array && util$5.Buffer.prototype.set.name === "set" ? function(e, n, u) {
697
- n.set(e, u);
698
- } : function(e, n, u) {
699
- if (e.copy)
700
- e.copy(n, u, 0, e.length);
701
- else for (var f = 0; f < e.length; )
702
- n[u++] = e[f++];
612
+ i.create = n(), i.alloc = function(v) {
613
+ return new f.Array(v);
614
+ }, f.Array !== Array && (i.alloc = f.pool(i.alloc, f.Array.prototype.subarray)), i.prototype._push = function(v, y, _) {
615
+ return this.tail = this.tail.next = new r(v, y, _), this.len += y, this;
703
616
  };
704
- };
705
- BufferWriter.prototype.bytes = function i(e) {
706
- util$5.isString(e) && (e = util$5._Buffer_from(e, "base64"));
707
- var n = e.length >>> 0;
708
- return this.uint32(n), n && this._push(BufferWriter.writeBytesBuffer, n, e), this;
709
- };
710
- function writeStringBuffer(i, e, n) {
711
- i.length < 40 ? util$5.utf8.write(i, e, n) : e.utf8Write ? e.utf8Write(i, n) : e.write(i, n);
712
- }
713
- BufferWriter.prototype.string = function i(e) {
714
- var n = util$5.Buffer.byteLength(e);
715
- return this.uint32(n), n && this._push(writeStringBuffer, n, e), this;
716
- };
717
- BufferWriter._configure();
718
- var reader = Reader$1, util$4 = requireMinimal(), BufferReader$1, LongBits = util$4.LongBits, utf8 = util$4.utf8;
719
- function indexOutOfRange(i, e) {
720
- return RangeError("index out of range: " + i.pos + " + " + (e || 1) + " > " + i.len);
617
+ function c(g, v, y) {
618
+ v[y] = g & 255;
619
+ }
620
+ function s(g, v, y) {
621
+ for (; g > 127; )
622
+ v[y++] = g & 127 | 128, g >>>= 7;
623
+ v[y] = g;
624
+ }
625
+ function l(g, v) {
626
+ this.len = g, this.next = void 0, this.val = v;
627
+ }
628
+ l.prototype = Object.create(r.prototype), l.prototype.fn = s, i.prototype.uint32 = function(v) {
629
+ return this.len += (this.tail = this.tail.next = new l(
630
+ (v = v >>> 0) < 128 ? 1 : v < 16384 ? 2 : v < 2097152 ? 3 : v < 268435456 ? 4 : 5,
631
+ v
632
+ )).len, this;
633
+ }, i.prototype.int32 = function(v) {
634
+ return v < 0 ? this._push(h, 10, d.fromNumber(v)) : this.uint32(v);
635
+ }, i.prototype.sint32 = function(v) {
636
+ return this.uint32((v << 1 ^ v >> 31) >>> 0);
637
+ };
638
+ function h(g, v, y) {
639
+ for (; g.hi; )
640
+ v[y++] = g.lo & 127 | 128, g.lo = (g.lo >>> 7 | g.hi << 25) >>> 0, g.hi >>>= 7;
641
+ for (; g.lo > 127; )
642
+ v[y++] = g.lo & 127 | 128, g.lo = g.lo >>> 7;
643
+ v[y++] = g.lo;
644
+ }
645
+ i.prototype.uint64 = function(v) {
646
+ var y = d.from(v);
647
+ return this._push(h, y.length(), y);
648
+ }, i.prototype.int64 = i.prototype.uint64, i.prototype.sint64 = function(v) {
649
+ var y = d.from(v).zzEncode();
650
+ return this._push(h, y.length(), y);
651
+ }, i.prototype.bool = function(v) {
652
+ return this._push(c, 1, v ? 1 : 0);
653
+ };
654
+ function p(g, v, y) {
655
+ v[y] = g & 255, v[y + 1] = g >>> 8 & 255, v[y + 2] = g >>> 16 & 255, v[y + 3] = g >>> 24;
656
+ }
657
+ i.prototype.fixed32 = function(v) {
658
+ return this._push(p, 4, v >>> 0);
659
+ }, i.prototype.sfixed32 = i.prototype.fixed32, i.prototype.fixed64 = function(v) {
660
+ var y = d.from(v);
661
+ return this._push(p, 4, y.lo)._push(p, 4, y.hi);
662
+ }, i.prototype.sfixed64 = i.prototype.fixed64, i.prototype.float = function(v) {
663
+ return this._push(f.float.writeFloatLE, 4, v);
664
+ }, i.prototype.double = function(v) {
665
+ return this._push(f.float.writeDoubleLE, 8, v);
666
+ };
667
+ var m = f.Array.prototype.set ? function(v, y, _) {
668
+ y.set(v, _);
669
+ } : function(v, y, _) {
670
+ for (var b = 0; b < v.length; ++b)
671
+ y[_ + b] = v[b];
672
+ };
673
+ return i.prototype.bytes = function(v) {
674
+ var y = v.length >>> 0;
675
+ if (!y)
676
+ return this._push(c, 1, 0);
677
+ if (f.isString(v)) {
678
+ var _ = i.alloc(y = u.length(v));
679
+ u.decode(v, _, 0), v = _;
680
+ }
681
+ return this.uint32(y)._push(m, y, v);
682
+ }, i.prototype.string = function(v) {
683
+ var y = a.length(v);
684
+ return y ? this.uint32(y)._push(a.write, y, v) : this._push(c, 1, 0);
685
+ }, i.prototype.fork = function() {
686
+ return this.states = new t(this), this.head = this.tail = new r(e, 0, 0), this.len = 0, this;
687
+ }, i.prototype.reset = function() {
688
+ return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new r(e, 0, 0), this.len = 0), this;
689
+ }, i.prototype.ldelim = function() {
690
+ var v = this.head, y = this.tail, _ = this.len;
691
+ return this.reset().uint32(_), _ && (this.tail.next = v.next, this.tail = y, this.len += _), this;
692
+ }, i.prototype.finish = function() {
693
+ for (var v = this.head.next, y = this.constructor.alloc(this.len), _ = 0; v; )
694
+ v.fn(v.val, y, _), _ += v.len, v = v.next;
695
+ return y;
696
+ }, i._configure = function(g) {
697
+ o = g, i.create = n(), o._configure();
698
+ }, writer;
721
699
  }
722
- function Reader$1(i) {
723
- this.buf = i, this.pos = 0, this.len = i.length;
700
+ var writer_buffer, hasRequiredWriter_buffer;
701
+ function requireWriter_buffer() {
702
+ if (hasRequiredWriter_buffer) return writer_buffer;
703
+ hasRequiredWriter_buffer = 1, writer_buffer = d;
704
+ var f = requireWriter();
705
+ (d.prototype = Object.create(f.prototype)).constructor = d;
706
+ var o = requireMinimal();
707
+ function d() {
708
+ f.call(this);
709
+ }
710
+ d._configure = function() {
711
+ d.alloc = o._Buffer_allocUnsafe, d.writeBytesBuffer = o.Buffer && o.Buffer.prototype instanceof Uint8Array && o.Buffer.prototype.set.name === "set" ? function(r, e, t) {
712
+ e.set(r, t);
713
+ } : function(r, e, t) {
714
+ if (r.copy)
715
+ r.copy(e, t, 0, r.length);
716
+ else for (var i = 0; i < r.length; )
717
+ e[t++] = r[i++];
718
+ };
719
+ }, d.prototype.bytes = function(r) {
720
+ o.isString(r) && (r = o._Buffer_from(r, "base64"));
721
+ var e = r.length >>> 0;
722
+ return this.uint32(e), e && this._push(d.writeBytesBuffer, e, r), this;
723
+ };
724
+ function u(a, r, e) {
725
+ a.length < 40 ? o.utf8.write(a, r, e) : r.utf8Write ? r.utf8Write(a, e) : r.write(a, e);
726
+ }
727
+ return d.prototype.string = function(r) {
728
+ var e = o.Buffer.byteLength(r);
729
+ return this.uint32(e), e && this._push(u, e, r), this;
730
+ }, d._configure(), writer_buffer;
724
731
  }
725
- var create_array = typeof Uint8Array < "u" ? function i(e) {
726
- if (e instanceof Uint8Array || Array.isArray(e))
727
- return new Reader$1(e);
728
- throw Error("illegal buffer");
729
- } : function i(e) {
730
- if (Array.isArray(e))
731
- return new Reader$1(e);
732
- throw Error("illegal buffer");
733
- }, create = function i() {
734
- return util$4.Buffer ? function(n) {
735
- return (Reader$1.create = function(f) {
736
- return util$4.Buffer.isBuffer(f) ? new BufferReader$1(f) : create_array(f);
737
- })(n);
738
- } : create_array;
739
- };
740
- Reader$1.create = create();
741
- Reader$1.prototype._slice = util$4.Array.prototype.subarray || /* istanbul ignore next */
742
- util$4.Array.prototype.slice;
743
- Reader$1.prototype.uint32 = /* @__PURE__ */ function i() {
744
- var e = 4294967295;
745
- return function() {
746
- if (e = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (e = (e | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (e = (e | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (e = (e | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (e = (e | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return e;
747
- if ((this.pos += 5) > this.len)
748
- throw this.pos = this.len, indexOutOfRange(this, 10);
749
- return e;
732
+ var reader, hasRequiredReader;
733
+ function requireReader() {
734
+ if (hasRequiredReader) return reader;
735
+ hasRequiredReader = 1, reader = r;
736
+ var f = requireMinimal(), o, d = f.LongBits, u = f.utf8;
737
+ function a(s, l) {
738
+ return RangeError("index out of range: " + s.pos + " + " + (l || 1) + " > " + s.len);
739
+ }
740
+ function r(s) {
741
+ this.buf = s, this.pos = 0, this.len = s.length;
742
+ }
743
+ var e = typeof Uint8Array < "u" ? function(l) {
744
+ if (l instanceof Uint8Array || Array.isArray(l))
745
+ return new r(l);
746
+ throw Error("illegal buffer");
747
+ } : function(l) {
748
+ if (Array.isArray(l))
749
+ return new r(l);
750
+ throw Error("illegal buffer");
751
+ }, t = function() {
752
+ return f.Buffer ? function(h) {
753
+ return (r.create = function(m) {
754
+ return f.Buffer.isBuffer(m) ? new o(m) : e(m);
755
+ })(h);
756
+ } : e;
750
757
  };
751
- }();
752
- Reader$1.prototype.int32 = function i() {
753
- return this.uint32() | 0;
754
- };
755
- Reader$1.prototype.sint32 = function i() {
756
- var e = this.uint32();
757
- return e >>> 1 ^ -(e & 1) | 0;
758
- };
759
- function readLongVarint() {
760
- var i = new LongBits(0, 0), e = 0;
761
- if (this.len - this.pos > 4) {
762
- for (; e < 4; ++e)
763
- if (i.lo = (i.lo | (this.buf[this.pos] & 127) << e * 7) >>> 0, this.buf[this.pos++] < 128)
764
- return i;
765
- if (i.lo = (i.lo | (this.buf[this.pos] & 127) << 28) >>> 0, i.hi = (i.hi | (this.buf[this.pos] & 127) >> 4) >>> 0, this.buf[this.pos++] < 128)
766
- return i;
767
- e = 0;
768
- } else {
769
- for (; e < 3; ++e) {
770
- if (this.pos >= this.len)
771
- throw indexOutOfRange(this);
772
- if (i.lo = (i.lo | (this.buf[this.pos] & 127) << e * 7) >>> 0, this.buf[this.pos++] < 128)
773
- return i;
758
+ r.create = t(), r.prototype._slice = f.Array.prototype.subarray || /* istanbul ignore next */
759
+ f.Array.prototype.slice, r.prototype.uint32 = /* @__PURE__ */ function() {
760
+ var l = 4294967295;
761
+ return function() {
762
+ if (l = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (l = (l | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (l = (l | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (l = (l | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (l = (l | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return l;
763
+ if ((this.pos += 5) > this.len)
764
+ throw this.pos = this.len, a(this, 10);
765
+ return l;
766
+ };
767
+ }(), r.prototype.int32 = function() {
768
+ return this.uint32() | 0;
769
+ }, r.prototype.sint32 = function() {
770
+ var l = this.uint32();
771
+ return l >>> 1 ^ -(l & 1) | 0;
772
+ };
773
+ function i() {
774
+ var s = new d(0, 0), l = 0;
775
+ if (this.len - this.pos > 4) {
776
+ for (; l < 4; ++l)
777
+ if (s.lo = (s.lo | (this.buf[this.pos] & 127) << l * 7) >>> 0, this.buf[this.pos++] < 128)
778
+ return s;
779
+ 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)
780
+ return s;
781
+ l = 0;
782
+ } else {
783
+ for (; l < 3; ++l) {
784
+ if (this.pos >= this.len)
785
+ throw a(this);
786
+ if (s.lo = (s.lo | (this.buf[this.pos] & 127) << l * 7) >>> 0, this.buf[this.pos++] < 128)
787
+ return s;
788
+ }
789
+ return s.lo = (s.lo | (this.buf[this.pos++] & 127) << l * 7) >>> 0, s;
774
790
  }
775
- return i.lo = (i.lo | (this.buf[this.pos++] & 127) << e * 7) >>> 0, i;
776
- }
777
- if (this.len - this.pos > 4) {
778
- for (; e < 5; ++e)
779
- if (i.hi = (i.hi | (this.buf[this.pos] & 127) << e * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
780
- return i;
781
- } else
782
- for (; e < 5; ++e) {
783
- if (this.pos >= this.len)
784
- throw indexOutOfRange(this);
785
- if (i.hi = (i.hi | (this.buf[this.pos] & 127) << e * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
786
- return i;
791
+ if (this.len - this.pos > 4) {
792
+ for (; l < 5; ++l)
793
+ if (s.hi = (s.hi | (this.buf[this.pos] & 127) << l * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
794
+ return s;
795
+ } else
796
+ for (; l < 5; ++l) {
797
+ if (this.pos >= this.len)
798
+ throw a(this);
799
+ if (s.hi = (s.hi | (this.buf[this.pos] & 127) << l * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
800
+ return s;
801
+ }
802
+ throw Error("invalid varint encoding");
803
+ }
804
+ r.prototype.bool = function() {
805
+ return this.uint32() !== 0;
806
+ };
807
+ function n(s, l) {
808
+ return (s[l - 4] | s[l - 3] << 8 | s[l - 2] << 16 | s[l - 1] << 24) >>> 0;
809
+ }
810
+ r.prototype.fixed32 = function() {
811
+ if (this.pos + 4 > this.len)
812
+ throw a(this, 4);
813
+ return n(this.buf, this.pos += 4);
814
+ }, r.prototype.sfixed32 = function() {
815
+ if (this.pos + 4 > this.len)
816
+ throw a(this, 4);
817
+ return n(this.buf, this.pos += 4) | 0;
818
+ };
819
+ function c() {
820
+ if (this.pos + 8 > this.len)
821
+ throw a(this, 8);
822
+ return new d(n(this.buf, this.pos += 4), n(this.buf, this.pos += 4));
823
+ }
824
+ return r.prototype.float = function() {
825
+ if (this.pos + 4 > this.len)
826
+ throw a(this, 4);
827
+ var l = f.float.readFloatLE(this.buf, this.pos);
828
+ return this.pos += 4, l;
829
+ }, r.prototype.double = function() {
830
+ if (this.pos + 8 > this.len)
831
+ throw a(this, 4);
832
+ var l = f.float.readDoubleLE(this.buf, this.pos);
833
+ return this.pos += 8, l;
834
+ }, r.prototype.bytes = function() {
835
+ var l = this.uint32(), h = this.pos, p = this.pos + l;
836
+ if (p > this.len)
837
+ throw a(this, l);
838
+ if (this.pos += l, Array.isArray(this.buf))
839
+ return this.buf.slice(h, p);
840
+ if (h === p) {
841
+ var m = f.Buffer;
842
+ return m ? m.alloc(0) : new this.buf.constructor(0);
843
+ }
844
+ return this._slice.call(this.buf, h, p);
845
+ }, r.prototype.string = function() {
846
+ var l = this.bytes();
847
+ return u.read(l, 0, l.length);
848
+ }, r.prototype.skip = function(l) {
849
+ if (typeof l == "number") {
850
+ if (this.pos + l > this.len)
851
+ throw a(this, l);
852
+ this.pos += l;
853
+ } else
854
+ do
855
+ if (this.pos >= this.len)
856
+ throw a(this);
857
+ while (this.buf[this.pos++] & 128);
858
+ return this;
859
+ }, r.prototype.skipType = function(s) {
860
+ switch (s) {
861
+ case 0:
862
+ this.skip();
863
+ break;
864
+ case 1:
865
+ this.skip(8);
866
+ break;
867
+ case 2:
868
+ this.skip(this.uint32());
869
+ break;
870
+ case 3:
871
+ for (; (s = this.uint32() & 7) !== 4; )
872
+ this.skipType(s);
873
+ break;
874
+ case 5:
875
+ this.skip(4);
876
+ break;
877
+ /* istanbul ignore next */
878
+ default:
879
+ throw Error("invalid wire type " + s + " at offset " + this.pos);
787
880
  }
788
- throw Error("invalid varint encoding");
789
- }
790
- Reader$1.prototype.bool = function i() {
791
- return this.uint32() !== 0;
792
- };
793
- function readFixed32_end(i, e) {
794
- return (i[e - 4] | i[e - 3] << 8 | i[e - 2] << 16 | i[e - 1] << 24) >>> 0;
881
+ return this;
882
+ }, r._configure = function(s) {
883
+ o = s, r.create = t(), o._configure();
884
+ var l = f.Long ? "toLong" : (
885
+ /* istanbul ignore next */
886
+ "toNumber"
887
+ );
888
+ f.merge(r.prototype, {
889
+ int64: function() {
890
+ return i.call(this)[l](!1);
891
+ },
892
+ uint64: function() {
893
+ return i.call(this)[l](!0);
894
+ },
895
+ sint64: function() {
896
+ return i.call(this).zzDecode()[l](!1);
897
+ },
898
+ fixed64: function() {
899
+ return c.call(this)[l](!0);
900
+ },
901
+ sfixed64: function() {
902
+ return c.call(this)[l](!1);
903
+ }
904
+ });
905
+ }, reader;
795
906
  }
796
- Reader$1.prototype.fixed32 = function i() {
797
- if (this.pos + 4 > this.len)
798
- throw indexOutOfRange(this, 4);
799
- return readFixed32_end(this.buf, this.pos += 4);
800
- };
801
- Reader$1.prototype.sfixed32 = function i() {
802
- if (this.pos + 4 > this.len)
803
- throw indexOutOfRange(this, 4);
804
- return readFixed32_end(this.buf, this.pos += 4) | 0;
805
- };
806
- function readFixed64() {
807
- if (this.pos + 8 > this.len)
808
- throw indexOutOfRange(this, 8);
809
- return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));
907
+ var reader_buffer, hasRequiredReader_buffer;
908
+ function requireReader_buffer() {
909
+ if (hasRequiredReader_buffer) return reader_buffer;
910
+ hasRequiredReader_buffer = 1, reader_buffer = d;
911
+ var f = requireReader();
912
+ (d.prototype = Object.create(f.prototype)).constructor = d;
913
+ var o = requireMinimal();
914
+ function d(u) {
915
+ f.call(this, u);
916
+ }
917
+ return d._configure = function() {
918
+ o.Buffer && (d.prototype._slice = o.Buffer.prototype.slice);
919
+ }, d.prototype.string = function() {
920
+ var a = this.uint32();
921
+ return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + a, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + a, this.len));
922
+ }, d._configure(), reader_buffer;
810
923
  }
811
- Reader$1.prototype.float = function i() {
812
- if (this.pos + 4 > this.len)
813
- throw indexOutOfRange(this, 4);
814
- var e = util$4.float.readFloatLE(this.buf, this.pos);
815
- return this.pos += 4, e;
816
- };
817
- Reader$1.prototype.double = function i() {
818
- if (this.pos + 8 > this.len)
819
- throw indexOutOfRange(this, 4);
820
- var e = util$4.float.readDoubleLE(this.buf, this.pos);
821
- return this.pos += 8, e;
822
- };
823
- Reader$1.prototype.bytes = function i() {
824
- var e = this.uint32(), n = this.pos, u = this.pos + e;
825
- if (u > this.len)
826
- throw indexOutOfRange(this, e);
827
- if (this.pos += e, Array.isArray(this.buf))
828
- return this.buf.slice(n, u);
829
- if (n === u) {
830
- var f = util$4.Buffer;
831
- return f ? f.alloc(0) : new this.buf.constructor(0);
832
- }
833
- return this._slice.call(this.buf, n, u);
834
- };
835
- Reader$1.prototype.string = function i() {
836
- var e = this.bytes();
837
- return utf8.read(e, 0, e.length);
838
- };
839
- Reader$1.prototype.skip = function i(e) {
840
- if (typeof e == "number") {
841
- if (this.pos + e > this.len)
842
- throw indexOutOfRange(this, e);
843
- this.pos += e;
844
- } else
845
- do
846
- if (this.pos >= this.len)
847
- throw indexOutOfRange(this);
848
- while (this.buf[this.pos++] & 128);
849
- return this;
850
- };
851
- Reader$1.prototype.skipType = function(i) {
852
- switch (i) {
853
- case 0:
854
- this.skip();
855
- break;
856
- case 1:
857
- this.skip(8);
858
- break;
859
- case 2:
860
- this.skip(this.uint32());
861
- break;
862
- case 3:
863
- for (; (i = this.uint32() & 7) !== 4; )
864
- this.skipType(i);
865
- break;
866
- case 5:
867
- this.skip(4);
868
- break;
869
- default:
870
- throw Error("invalid wire type " + i + " at offset " + this.pos);
871
- }
872
- return this;
873
- };
874
- Reader$1._configure = function(i) {
875
- BufferReader$1 = i, Reader$1.create = create(), BufferReader$1._configure();
876
- var e = util$4.Long ? "toLong" : (
877
- /* istanbul ignore next */
878
- "toNumber"
879
- );
880
- util$4.merge(Reader$1.prototype, {
881
- int64: function() {
882
- return readLongVarint.call(this)[e](!1);
883
- },
884
- uint64: function() {
885
- return readLongVarint.call(this)[e](!0);
886
- },
887
- sint64: function() {
888
- return readLongVarint.call(this).zzDecode()[e](!1);
889
- },
890
- fixed64: function() {
891
- return readFixed64.call(this)[e](!0);
892
- },
893
- sfixed64: function() {
894
- return readFixed64.call(this)[e](!1);
924
+ var rpc = {}, service$1, hasRequiredService$1;
925
+ function requireService$1() {
926
+ if (hasRequiredService$1) return service$1;
927
+ hasRequiredService$1 = 1, service$1 = o;
928
+ var f = requireMinimal();
929
+ (o.prototype = Object.create(f.EventEmitter.prototype)).constructor = o;
930
+ function o(d, u, a) {
931
+ if (typeof d != "function")
932
+ throw TypeError("rpcImpl must be a function");
933
+ f.EventEmitter.call(this), this.rpcImpl = d, this.requestDelimited = !!u, this.responseDelimited = !!a;
934
+ }
935
+ return o.prototype.rpcCall = function d(u, a, r, e, t) {
936
+ if (!e)
937
+ throw TypeError("request must be specified");
938
+ var i = this;
939
+ if (!t)
940
+ return f.asPromise(d, i, u, a, r, e);
941
+ if (!i.rpcImpl) {
942
+ setTimeout(function() {
943
+ t(Error("already ended"));
944
+ }, 0);
945
+ return;
895
946
  }
896
- });
897
- };
898
- var reader_buffer = BufferReader, Reader = reader;
899
- (BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;
900
- var util$3 = requireMinimal();
901
- function BufferReader(i) {
902
- Reader.call(this, i);
947
+ try {
948
+ return i.rpcImpl(
949
+ u,
950
+ a[i.requestDelimited ? "encodeDelimited" : "encode"](e).finish(),
951
+ function(c, s) {
952
+ if (c)
953
+ return i.emit("error", c, u), t(c);
954
+ if (s === null) {
955
+ i.end(
956
+ /* endedByRPC */
957
+ !0
958
+ );
959
+ return;
960
+ }
961
+ if (!(s instanceof r))
962
+ try {
963
+ s = r[i.responseDelimited ? "decodeDelimited" : "decode"](s);
964
+ } catch (l) {
965
+ return i.emit("error", l, u), t(l);
966
+ }
967
+ return i.emit("data", s, u), t(null, s);
968
+ }
969
+ );
970
+ } catch (n) {
971
+ i.emit("error", n, u), setTimeout(function() {
972
+ t(n);
973
+ }, 0);
974
+ return;
975
+ }
976
+ }, o.prototype.end = function(u) {
977
+ return this.rpcImpl && (u || this.rpcImpl(null, null, null), this.rpcImpl = null, this.emit("end").off()), this;
978
+ }, service$1;
903
979
  }
904
- BufferReader._configure = function() {
905
- util$3.Buffer && (BufferReader.prototype._slice = util$3.Buffer.prototype.slice);
906
- };
907
- BufferReader.prototype.string = function i() {
908
- var e = this.uint32();
909
- return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + e, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + e, this.len));
910
- };
911
- BufferReader._configure();
912
- var rpc = {}, service$1 = Service, util$2 = requireMinimal();
913
- (Service.prototype = Object.create(util$2.EventEmitter.prototype)).constructor = Service;
914
- function Service(i, e, n) {
915
- if (typeof i != "function")
916
- throw TypeError("rpcImpl must be a function");
917
- util$2.EventEmitter.call(this), this.rpcImpl = i, this.requestDelimited = !!e, this.responseDelimited = !!n;
980
+ var hasRequiredRpc;
981
+ function requireRpc() {
982
+ return hasRequiredRpc || (hasRequiredRpc = 1, function(f) {
983
+ var o = f;
984
+ o.Service = requireService$1();
985
+ }(rpc)), rpc;
918
986
  }
919
- Service.prototype.rpcCall = function i(e, n, u, f, a) {
920
- if (!f)
921
- throw TypeError("request must be specified");
922
- var t = this;
923
- if (!a)
924
- return util$2.asPromise(i, t, e, n, u, f);
925
- if (!t.rpcImpl) {
926
- setTimeout(function() {
927
- a(Error("already ended"));
928
- }, 0);
929
- return;
930
- }
931
- try {
932
- return t.rpcImpl(
933
- e,
934
- n[t.requestDelimited ? "encodeDelimited" : "encode"](f).finish(),
935
- function(o, r) {
936
- if (o)
937
- return t.emit("error", o, e), a(o);
938
- if (r === null) {
939
- t.end(
940
- /* endedByRPC */
941
- !0
942
- );
943
- return;
987
+ var roots, hasRequiredRoots;
988
+ function requireRoots() {
989
+ return hasRequiredRoots || (hasRequiredRoots = 1, roots = {}), roots;
990
+ }
991
+ var hasRequiredIndexMinimal;
992
+ function requireIndexMinimal() {
993
+ return hasRequiredIndexMinimal || (hasRequiredIndexMinimal = 1, function(f) {
994
+ var o = f;
995
+ o.build = "minimal", o.Writer = requireWriter(), o.BufferWriter = requireWriter_buffer(), o.Reader = requireReader(), o.BufferReader = requireReader_buffer(), o.util = requireMinimal(), o.rpc = requireRpc(), o.roots = requireRoots(), o.configure = d;
996
+ function d() {
997
+ o.util._configure(), o.Writer._configure(o.BufferWriter), o.Reader._configure(o.BufferReader);
998
+ }
999
+ d();
1000
+ }(indexMinimal)), indexMinimal;
1001
+ }
1002
+ var util = { exports: {} }, codegen_1, hasRequiredCodegen;
1003
+ function requireCodegen() {
1004
+ if (hasRequiredCodegen) return codegen_1;
1005
+ hasRequiredCodegen = 1, codegen_1 = f;
1006
+ function f(o, d) {
1007
+ typeof o == "string" && (d = o, o = void 0);
1008
+ var u = [];
1009
+ function a(e) {
1010
+ if (typeof e != "string") {
1011
+ var t = r();
1012
+ if (f.verbose && console.log("codegen: " + t), t = "return " + t, e) {
1013
+ for (var i = Object.keys(e), n = new Array(i.length + 1), c = new Array(i.length), s = 0; s < i.length; )
1014
+ n[s] = i[s], c[s] = e[i[s++]];
1015
+ return n[s] = t, Function.apply(null, n).apply(null, c);
944
1016
  }
945
- if (!(r instanceof u))
946
- try {
947
- r = u[t.responseDelimited ? "decodeDelimited" : "decode"](r);
948
- } catch (l) {
949
- return t.emit("error", l, e), a(l);
950
- }
951
- return t.emit("data", r, e), a(null, r);
1017
+ return Function(t)();
952
1018
  }
953
- );
954
- } catch (s) {
955
- t.emit("error", s, e), setTimeout(function() {
956
- a(s);
957
- }, 0);
958
- return;
959
- }
960
- };
961
- Service.prototype.end = function i(e) {
962
- return this.rpcImpl && (e || this.rpcImpl(null, null, null), this.rpcImpl = null, this.emit("end").off()), this;
963
- };
964
- (function(i) {
965
- var e = i;
966
- e.Service = service$1;
967
- })(rpc);
968
- var roots = {};
969
- (function(i) {
970
- var e = i;
971
- e.build = "minimal", e.Writer = writer, e.BufferWriter = writer_buffer, e.Reader = reader, e.BufferReader = reader_buffer, e.util = requireMinimal(), e.rpc = rpc, e.roots = roots, e.configure = n;
972
- function n() {
973
- e.util._configure(), e.Writer._configure(e.BufferWriter), e.Reader._configure(e.BufferReader);
974
- }
975
- n();
976
- })(indexMinimal);
977
- var util$1 = { exports: {} }, codegen_1 = codegen;
978
- function codegen(i, e) {
979
- typeof i == "string" && (e = i, i = void 0);
980
- var n = [];
981
- function u(a) {
982
- if (typeof a != "string") {
983
- var t = f();
984
- if (codegen.verbose && console.log("codegen: " + t), t = "return " + t, a) {
985
- for (var s = Object.keys(a), o = new Array(s.length + 1), r = new Array(s.length), l = 0; l < s.length; )
986
- o[l] = s[l], r[l] = a[s[l++]];
987
- return o[l] = t, Function.apply(null, o).apply(null, r);
988
- }
989
- return Function(t)();
990
- }
991
- for (var d = new Array(arguments.length - 1), h = 0; h < d.length; )
992
- d[h] = arguments[++h];
993
- if (h = 0, a = a.replace(/%([%dfijs])/g, function(p, m) {
994
- var b = d[h++];
995
- switch (m) {
996
- case "d":
997
- case "f":
998
- return String(Number(b));
999
- case "i":
1000
- return String(Math.floor(b));
1001
- case "j":
1002
- return JSON.stringify(b);
1003
- case "s":
1004
- return String(b);
1005
- }
1006
- return "%";
1007
- }), h !== d.length)
1008
- throw Error("parameter count mismatch");
1009
- return n.push(a), u;
1010
- }
1011
- function f(a) {
1012
- return "function " + (a || e || "") + "(" + (i && i.join(",") || "") + `){
1013
- ` + n.join(`
1019
+ for (var l = new Array(arguments.length - 1), h = 0; h < l.length; )
1020
+ l[h] = arguments[++h];
1021
+ if (h = 0, e = e.replace(/%([%dfijs])/g, function(m, g) {
1022
+ var v = l[h++];
1023
+ switch (g) {
1024
+ case "d":
1025
+ case "f":
1026
+ return String(Number(v));
1027
+ case "i":
1028
+ return String(Math.floor(v));
1029
+ case "j":
1030
+ return JSON.stringify(v);
1031
+ case "s":
1032
+ return String(v);
1033
+ }
1034
+ return "%";
1035
+ }), h !== l.length)
1036
+ throw Error("parameter count mismatch");
1037
+ return u.push(e), a;
1038
+ }
1039
+ function r(e) {
1040
+ return "function " + (e || d || "") + "(" + (o && o.join(",") || "") + `){
1041
+ ` + u.join(`
1014
1042
  `) + `
1015
1043
  }`;
1044
+ }
1045
+ return a.toString = r, a;
1016
1046
  }
1017
- return u.toString = f, u;
1047
+ return f.verbose = !1, codegen_1;
1018
1048
  }
1019
- codegen.verbose = !1;
1020
- var fetch_1 = fetch, asPromise = aspromise, inquire = inquire_1, fs = inquire("fs");
1021
- function fetch(i, e, n) {
1022
- return typeof e == "function" ? (n = e, e = {}) : e || (e = {}), n ? !e.xhr && fs && fs.readFile ? fs.readFile(i, function(f, a) {
1023
- return f && typeof XMLHttpRequest < "u" ? fetch.xhr(i, e, n) : f ? n(f) : n(null, e.binary ? a : a.toString("utf8"));
1024
- }) : fetch.xhr(i, e, n) : asPromise(fetch, this, i, e);
1025
- }
1026
- fetch.xhr = function i(e, n, u) {
1027
- var f = new XMLHttpRequest();
1028
- f.onreadystatechange = function() {
1029
- if (f.readyState === 4) {
1030
- if (f.status !== 0 && f.status !== 200)
1031
- return u(Error("status " + f.status));
1032
- if (n.binary) {
1033
- var t = f.response;
1034
- if (!t) {
1035
- t = [];
1036
- for (var s = 0; s < f.responseText.length; ++s)
1037
- t.push(f.responseText.charCodeAt(s) & 255);
1049
+ var fetch_1, hasRequiredFetch;
1050
+ function requireFetch() {
1051
+ if (hasRequiredFetch) return fetch_1;
1052
+ hasRequiredFetch = 1, fetch_1 = u;
1053
+ var f = requireAspromise(), o = requireInquire(), d = o("fs");
1054
+ function u(a, r, e) {
1055
+ return typeof r == "function" ? (e = r, r = {}) : r || (r = {}), e ? !r.xhr && d && d.readFile ? d.readFile(a, function(i, n) {
1056
+ return i && typeof XMLHttpRequest < "u" ? u.xhr(a, r, e) : i ? e(i) : e(null, r.binary ? n : n.toString("utf8"));
1057
+ }) : u.xhr(a, r, e) : f(u, this, a, r);
1058
+ }
1059
+ return u.xhr = function(r, e, t) {
1060
+ var i = new XMLHttpRequest();
1061
+ i.onreadystatechange = function() {
1062
+ if (i.readyState === 4) {
1063
+ if (i.status !== 0 && i.status !== 200)
1064
+ return t(Error("status " + i.status));
1065
+ if (e.binary) {
1066
+ var c = i.response;
1067
+ if (!c) {
1068
+ c = [];
1069
+ for (var s = 0; s < i.responseText.length; ++s)
1070
+ c.push(i.responseText.charCodeAt(s) & 255);
1071
+ }
1072
+ return t(null, typeof Uint8Array < "u" ? new Uint8Array(c) : c);
1038
1073
  }
1039
- return u(null, typeof Uint8Array < "u" ? new Uint8Array(t) : t);
1074
+ return t(null, i.responseText);
1040
1075
  }
1041
- return u(null, f.responseText);
1042
- }
1043
- }, n.binary && ("overrideMimeType" in f && f.overrideMimeType("text/plain; charset=x-user-defined"), f.responseType = "arraybuffer"), f.open("GET", e), f.send();
1044
- };
1045
- var path = {};
1046
- (function(i) {
1047
- var e = i, n = (
1048
- /**
1049
- * Tests if the specified path is absolute.
1050
- * @param {string} path Path to test
1051
- * @returns {boolean} `true` if path is absolute
1052
- */
1053
- e.isAbsolute = function(a) {
1054
- return /^(?:\/|\w+:)/.test(a);
1055
- }
1056
- ), u = (
1057
- /**
1058
- * Normalizes the specified path.
1059
- * @param {string} path Path to normalize
1060
- * @returns {string} Normalized path
1061
- */
1062
- e.normalize = function(a) {
1063
- a = a.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
1064
- var t = a.split("/"), s = n(a), o = "";
1065
- s && (o = t.shift() + "/");
1066
- for (var r = 0; r < t.length; )
1067
- t[r] === ".." ? r > 0 && t[r - 1] !== ".." ? t.splice(--r, 2) : s ? t.splice(r, 1) : ++r : t[r] === "." ? t.splice(r, 1) : ++r;
1068
- return o + t.join("/");
1069
- }
1070
- );
1071
- e.resolve = function(a, t, s) {
1072
- return s || (t = u(t)), n(t) ? t : (s || (a = u(a)), (a = a.replace(/(?:\/|^)[^/]+$/, "")).length ? u(a + "/" + t) : t);
1073
- };
1074
- })(path);
1076
+ }, e.binary && ("overrideMimeType" in i && i.overrideMimeType("text/plain; charset=x-user-defined"), i.responseType = "arraybuffer"), i.open("GET", r), i.send();
1077
+ }, fetch_1;
1078
+ }
1079
+ var path = {}, hasRequiredPath;
1080
+ function requirePath() {
1081
+ return hasRequiredPath || (hasRequiredPath = 1, function(f) {
1082
+ var o = f, d = (
1083
+ /**
1084
+ * Tests if the specified path is absolute.
1085
+ * @param {string} path Path to test
1086
+ * @returns {boolean} `true` if path is absolute
1087
+ */
1088
+ o.isAbsolute = function(r) {
1089
+ return /^(?:\/|\w+:)/.test(r);
1090
+ }
1091
+ ), u = (
1092
+ /**
1093
+ * Normalizes the specified path.
1094
+ * @param {string} path Path to normalize
1095
+ * @returns {string} Normalized path
1096
+ */
1097
+ o.normalize = function(r) {
1098
+ r = r.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
1099
+ var e = r.split("/"), t = d(r), i = "";
1100
+ t && (i = e.shift() + "/");
1101
+ for (var n = 0; n < e.length; )
1102
+ e[n] === ".." ? n > 0 && e[n - 1] !== ".." ? e.splice(--n, 2) : t ? e.splice(n, 1) : ++n : e[n] === "." ? e.splice(n, 1) : ++n;
1103
+ return i + e.join("/");
1104
+ }
1105
+ );
1106
+ o.resolve = function(r, e, t) {
1107
+ return t || (e = u(e)), d(e) ? e : (t || (r = u(r)), (r = r.replace(/(?:\/|^)[^/]+$/, "")).length ? u(r + "/" + e) : e);
1108
+ };
1109
+ }(path)), path;
1110
+ }
1075
1111
  var types = {}, hasRequiredTypes;
1076
1112
  function requireTypes() {
1077
- return hasRequiredTypes || (hasRequiredTypes = 1, function(i) {
1078
- var e = i, n = requireUtil(), u = [
1113
+ return hasRequiredTypes || (hasRequiredTypes = 1, function(f) {
1114
+ var o = f, d = requireUtil(), u = [
1079
1115
  "double",
1080
1116
  // 0
1081
1117
  "float",
@@ -1107,12 +1143,12 @@ function requireTypes() {
1107
1143
  "bytes"
1108
1144
  // 14
1109
1145
  ];
1110
- function f(a, t) {
1111
- var s = 0, o = {};
1112
- for (t |= 0; s < a.length; ) o[u[s + t]] = a[s++];
1113
- return o;
1146
+ function a(r, e) {
1147
+ var t = 0, i = {};
1148
+ for (e |= 0; t < r.length; ) i[u[t + e]] = r[t++];
1149
+ return i;
1114
1150
  }
1115
- e.basic = f([
1151
+ o.basic = a([
1116
1152
  /* double */
1117
1153
  1,
1118
1154
  /* float */
@@ -1143,7 +1179,7 @@ function requireTypes() {
1143
1179
  2,
1144
1180
  /* bytes */
1145
1181
  2
1146
- ]), e.defaults = f([
1182
+ ]), o.defaults = a([
1147
1183
  /* double */
1148
1184
  0,
1149
1185
  /* float */
@@ -1173,10 +1209,10 @@ function requireTypes() {
1173
1209
  /* string */
1174
1210
  "",
1175
1211
  /* bytes */
1176
- n.emptyArray,
1212
+ d.emptyArray,
1177
1213
  /* message */
1178
1214
  null
1179
- ]), e.long = f([
1215
+ ]), o.long = a([
1180
1216
  /* int64 */
1181
1217
  0,
1182
1218
  /* uint64 */
@@ -1187,7 +1223,7 @@ function requireTypes() {
1187
1223
  1,
1188
1224
  /* sfixed64 */
1189
1225
  1
1190
- ], 7), e.mapKey = f([
1226
+ ], 7), o.mapKey = a([
1191
1227
  /* int32 */
1192
1228
  0,
1193
1229
  /* uint32 */
@@ -1212,7 +1248,7 @@ function requireTypes() {
1212
1248
  0,
1213
1249
  /* string */
1214
1250
  2
1215
- ], 2), e.packed = f([
1251
+ ], 2), o.packed = a([
1216
1252
  /* double */
1217
1253
  1,
1218
1254
  /* float */
@@ -1245,35 +1281,35 @@ function requireTypes() {
1245
1281
  var field, hasRequiredField;
1246
1282
  function requireField() {
1247
1283
  if (hasRequiredField) return field;
1248
- hasRequiredField = 1, field = t;
1249
- var i = requireObject();
1250
- ((t.prototype = Object.create(i.prototype)).constructor = t).className = "Field";
1251
- var e = require_enum(), n = requireTypes(), u = requireUtil(), f, a = /^required|optional|repeated$/;
1252
- t.fromJSON = function(o, r) {
1253
- return new t(o, r.id, r.type, r.rule, r.extend, r.options, r.comment);
1284
+ hasRequiredField = 1, field = e;
1285
+ var f = requireObject();
1286
+ ((e.prototype = Object.create(f.prototype)).constructor = e).className = "Field";
1287
+ var o = require_enum(), d = requireTypes(), u = requireUtil(), a, r = /^required|optional|repeated$/;
1288
+ e.fromJSON = function(i, n) {
1289
+ return new e(i, n.id, n.type, n.rule, n.extend, n.options, n.comment);
1254
1290
  };
1255
- function t(s, o, r, l, d, h, c) {
1256
- if (u.isObject(l) ? (c = d, h = l, l = d = void 0) : u.isObject(d) && (c = h, h = d, d = void 0), i.call(this, s, h), !u.isInteger(o) || o < 0)
1291
+ function e(t, i, n, c, s, l, h) {
1292
+ if (u.isObject(c) ? (h = s, l = c, c = s = void 0) : u.isObject(s) && (h = l, l = s, s = void 0), f.call(this, t, l), !u.isInteger(i) || i < 0)
1257
1293
  throw TypeError("id must be a non-negative integer");
1258
- if (!u.isString(r))
1294
+ if (!u.isString(n))
1259
1295
  throw TypeError("type must be a string");
1260
- if (l !== void 0 && !a.test(l = l.toString().toLowerCase()))
1296
+ if (c !== void 0 && !r.test(c = c.toString().toLowerCase()))
1261
1297
  throw TypeError("rule must be a string rule");
1262
- if (d !== void 0 && !u.isString(d))
1298
+ if (s !== void 0 && !u.isString(s))
1263
1299
  throw TypeError("extend must be a string");
1264
- l === "proto3_optional" && (l = "optional"), this.rule = l && l !== "optional" ? l : void 0, this.type = r, this.id = o, this.extend = d || void 0, this.required = l === "required", this.optional = !this.required, this.repeated = l === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = u.Long ? n.long[r] !== void 0 : (
1300
+ c === "proto3_optional" && (c = "optional"), this.rule = c && c !== "optional" ? c : void 0, this.type = n, this.id = i, this.extend = s || void 0, this.required = c === "required", this.optional = !this.required, this.repeated = c === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = u.Long ? d.long[n] !== void 0 : (
1265
1301
  /* istanbul ignore next */
1266
1302
  !1
1267
- ), this.bytes = r === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment = c;
1303
+ ), this.bytes = n === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment = h;
1268
1304
  }
1269
- return Object.defineProperty(t.prototype, "packed", {
1305
+ return Object.defineProperty(e.prototype, "packed", {
1270
1306
  get: function() {
1271
1307
  return this._packed === null && (this._packed = this.getOption("packed") !== !1), this._packed;
1272
1308
  }
1273
- }), t.prototype.setOption = function(o, r, l) {
1274
- return o === "packed" && (this._packed = null), i.prototype.setOption.call(this, o, r, l);
1275
- }, t.prototype.toJSON = function(o) {
1276
- var r = o ? !!o.keepComments : !1;
1309
+ }), e.prototype.setOption = function(i, n, c) {
1310
+ return i === "packed" && (this._packed = null), f.prototype.setOption.call(this, i, n, c);
1311
+ }, e.prototype.toJSON = function(i) {
1312
+ var n = i ? !!i.keepComments : !1;
1277
1313
  return u.toObject([
1278
1314
  "rule",
1279
1315
  this.rule !== "optional" && this.rule || void 0,
@@ -1286,85 +1322,85 @@ function requireField() {
1286
1322
  "options",
1287
1323
  this.options,
1288
1324
  "comment",
1289
- r ? this.comment : void 0
1325
+ n ? this.comment : void 0
1290
1326
  ]);
1291
- }, t.prototype.resolve = function() {
1327
+ }, e.prototype.resolve = function() {
1292
1328
  if (this.resolved)
1293
1329
  return this;
1294
- if ((this.typeDefault = n.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof f ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]) : this.options && this.options.proto3_optional && (this.typeDefault = null), this.options && this.options.default != null && (this.typeDefault = this.options.default, this.resolvedType instanceof e && typeof this.typeDefault == "string" && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && ((this.options.packed === !0 || this.options.packed !== void 0 && this.resolvedType && !(this.resolvedType instanceof e)) && delete this.options.packed, Object.keys(this.options).length || (this.options = void 0)), this.long)
1330
+ if ((this.typeDefault = d.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof a ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]) : this.options && this.options.proto3_optional && (this.typeDefault = null), this.options && this.options.default != null && (this.typeDefault = this.options.default, this.resolvedType instanceof o && typeof this.typeDefault == "string" && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && ((this.options.packed === !0 || this.options.packed !== void 0 && this.resolvedType && !(this.resolvedType instanceof o)) && delete this.options.packed, Object.keys(this.options).length || (this.options = void 0)), this.long)
1295
1331
  this.typeDefault = u.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"), Object.freeze && Object.freeze(this.typeDefault);
1296
1332
  else if (this.bytes && typeof this.typeDefault == "string") {
1297
- var o;
1298
- u.base64.test(this.typeDefault) ? u.base64.decode(this.typeDefault, o = u.newBuffer(u.base64.length(this.typeDefault)), 0) : u.utf8.write(this.typeDefault, o = u.newBuffer(u.utf8.length(this.typeDefault)), 0), this.typeDefault = o;
1333
+ var i;
1334
+ u.base64.test(this.typeDefault) ? u.base64.decode(this.typeDefault, i = u.newBuffer(u.base64.length(this.typeDefault)), 0) : u.utf8.write(this.typeDefault, i = u.newBuffer(u.utf8.length(this.typeDefault)), 0), this.typeDefault = i;
1299
1335
  }
1300
- return this.map ? this.defaultValue = u.emptyObject : this.repeated ? this.defaultValue = u.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof f && (this.parent.ctor.prototype[this.name] = this.defaultValue), i.prototype.resolve.call(this);
1301
- }, t.d = function(o, r, l, d) {
1302
- return typeof r == "function" ? r = u.decorateType(r).name : r && typeof r == "object" && (r = u.decorateEnum(r).name), function(c, p) {
1303
- u.decorateType(c.constructor).add(new t(p, o, r, l, { default: d }));
1336
+ return this.map ? this.defaultValue = u.emptyObject : this.repeated ? this.defaultValue = u.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof a && (this.parent.ctor.prototype[this.name] = this.defaultValue), f.prototype.resolve.call(this);
1337
+ }, e.d = function(i, n, c, s) {
1338
+ return typeof n == "function" ? n = u.decorateType(n).name : n && typeof n == "object" && (n = u.decorateEnum(n).name), function(h, p) {
1339
+ u.decorateType(h.constructor).add(new e(p, i, n, c, { default: s }));
1304
1340
  };
1305
- }, t._configure = function(o) {
1306
- f = o;
1341
+ }, e._configure = function(i) {
1342
+ a = i;
1307
1343
  }, field;
1308
1344
  }
1309
1345
  var oneof, hasRequiredOneof;
1310
1346
  function requireOneof() {
1311
1347
  if (hasRequiredOneof) return oneof;
1312
1348
  hasRequiredOneof = 1, oneof = u;
1313
- var i = requireObject();
1314
- ((u.prototype = Object.create(i.prototype)).constructor = u).className = "OneOf";
1315
- var e = requireField(), n = requireUtil();
1316
- function u(a, t, s, o) {
1317
- if (Array.isArray(t) || (s = t, t = void 0), i.call(this, a, s), !(t === void 0 || Array.isArray(t)))
1349
+ var f = requireObject();
1350
+ ((u.prototype = Object.create(f.prototype)).constructor = u).className = "OneOf";
1351
+ var o = requireField(), d = requireUtil();
1352
+ function u(r, e, t, i) {
1353
+ if (Array.isArray(e) || (t = e, e = void 0), f.call(this, r, t), !(e === void 0 || Array.isArray(e)))
1318
1354
  throw TypeError("fieldNames must be an Array");
1319
- this.oneof = t || [], this.fieldsArray = [], this.comment = o;
1355
+ this.oneof = e || [], this.fieldsArray = [], this.comment = i;
1320
1356
  }
1321
- u.fromJSON = function(t, s) {
1322
- return new u(t, s.oneof, s.options, s.comment);
1323
- }, u.prototype.toJSON = function(t) {
1324
- var s = t ? !!t.keepComments : !1;
1325
- return n.toObject([
1357
+ u.fromJSON = function(e, t) {
1358
+ return new u(e, t.oneof, t.options, t.comment);
1359
+ }, u.prototype.toJSON = function(e) {
1360
+ var t = e ? !!e.keepComments : !1;
1361
+ return d.toObject([
1326
1362
  "options",
1327
1363
  this.options,
1328
1364
  "oneof",
1329
1365
  this.oneof,
1330
1366
  "comment",
1331
- s ? this.comment : void 0
1367
+ t ? this.comment : void 0
1332
1368
  ]);
1333
1369
  };
1334
- function f(a) {
1335
- if (a.parent)
1336
- for (var t = 0; t < a.fieldsArray.length; ++t)
1337
- a.fieldsArray[t].parent || a.parent.add(a.fieldsArray[t]);
1370
+ function a(r) {
1371
+ if (r.parent)
1372
+ for (var e = 0; e < r.fieldsArray.length; ++e)
1373
+ r.fieldsArray[e].parent || r.parent.add(r.fieldsArray[e]);
1338
1374
  }
1339
- return u.prototype.add = function(t) {
1340
- if (!(t instanceof e))
1375
+ return u.prototype.add = function(e) {
1376
+ if (!(e instanceof o))
1341
1377
  throw TypeError("field must be a Field");
1342
- return t.parent && t.parent !== this.parent && t.parent.remove(t), this.oneof.push(t.name), this.fieldsArray.push(t), t.partOf = this, f(this), this;
1343
- }, u.prototype.remove = function(t) {
1344
- if (!(t instanceof e))
1378
+ return e.parent && e.parent !== this.parent && e.parent.remove(e), this.oneof.push(e.name), this.fieldsArray.push(e), e.partOf = this, a(this), this;
1379
+ }, u.prototype.remove = function(e) {
1380
+ if (!(e instanceof o))
1345
1381
  throw TypeError("field must be a Field");
1346
- var s = this.fieldsArray.indexOf(t);
1347
- if (s < 0)
1348
- throw Error(t + " is not a member of " + this);
1349
- return this.fieldsArray.splice(s, 1), s = this.oneof.indexOf(t.name), s > -1 && this.oneof.splice(s, 1), t.partOf = null, this;
1350
- }, u.prototype.onAdd = function(t) {
1351
- i.prototype.onAdd.call(this, t);
1352
- for (var s = this, o = 0; o < this.oneof.length; ++o) {
1353
- var r = t.get(this.oneof[o]);
1354
- r && !r.partOf && (r.partOf = s, s.fieldsArray.push(r));
1355
- }
1356
- f(this);
1357
- }, u.prototype.onRemove = function(t) {
1358
- for (var s = 0, o; s < this.fieldsArray.length; ++s)
1359
- (o = this.fieldsArray[s]).parent && o.parent.remove(o);
1360
- i.prototype.onRemove.call(this, t);
1382
+ var t = this.fieldsArray.indexOf(e);
1383
+ if (t < 0)
1384
+ throw Error(e + " is not a member of " + this);
1385
+ return this.fieldsArray.splice(t, 1), t = this.oneof.indexOf(e.name), t > -1 && this.oneof.splice(t, 1), e.partOf = null, this;
1386
+ }, u.prototype.onAdd = function(e) {
1387
+ f.prototype.onAdd.call(this, e);
1388
+ for (var t = this, i = 0; i < this.oneof.length; ++i) {
1389
+ var n = e.get(this.oneof[i]);
1390
+ n && !n.partOf && (n.partOf = t, t.fieldsArray.push(n));
1391
+ }
1392
+ a(this);
1393
+ }, u.prototype.onRemove = function(e) {
1394
+ for (var t = 0, i; t < this.fieldsArray.length; ++t)
1395
+ (i = this.fieldsArray[t]).parent && i.parent.remove(i);
1396
+ f.prototype.onRemove.call(this, e);
1361
1397
  }, u.d = function() {
1362
- for (var t = new Array(arguments.length), s = 0; s < arguments.length; )
1363
- t[s] = arguments[s++];
1364
- return function(r, l) {
1365
- n.decorateType(r.constructor).add(new u(l, t)), Object.defineProperty(r, l, {
1366
- get: n.oneOfGetter(t),
1367
- set: n.oneOfSetter(t)
1398
+ for (var e = new Array(arguments.length), t = 0; t < arguments.length; )
1399
+ e[t] = arguments[t++];
1400
+ return function(n, c) {
1401
+ d.decorateType(n.constructor).add(new u(c, e)), Object.defineProperty(n, c, {
1402
+ get: d.oneOfGetter(e),
1403
+ set: d.oneOfSetter(e)
1368
1404
  });
1369
1405
  };
1370
1406
  }, oneof;
@@ -1372,171 +1408,171 @@ function requireOneof() {
1372
1408
  var namespace, hasRequiredNamespace;
1373
1409
  function requireNamespace() {
1374
1410
  if (hasRequiredNamespace) return namespace;
1375
- hasRequiredNamespace = 1, namespace = o;
1376
- var i = requireObject();
1377
- ((o.prototype = Object.create(i.prototype)).constructor = o).className = "Namespace";
1378
- var e = requireField(), n = requireUtil(), u = requireOneof(), f, a, t;
1379
- o.fromJSON = function(d, h) {
1380
- return new o(d, h.options).addJSON(h.nested);
1411
+ hasRequiredNamespace = 1, namespace = i;
1412
+ var f = requireObject();
1413
+ ((i.prototype = Object.create(f.prototype)).constructor = i).className = "Namespace";
1414
+ var o = requireField(), d = requireUtil(), u = requireOneof(), a, r, e;
1415
+ i.fromJSON = function(s, l) {
1416
+ return new i(s, l.options).addJSON(l.nested);
1381
1417
  };
1382
- function s(l, d) {
1383
- if (l && l.length) {
1384
- for (var h = {}, c = 0; c < l.length; ++c)
1385
- h[l[c].name] = l[c].toJSON(d);
1386
- return h;
1418
+ function t(c, s) {
1419
+ if (c && c.length) {
1420
+ for (var l = {}, h = 0; h < c.length; ++h)
1421
+ l[c[h].name] = c[h].toJSON(s);
1422
+ return l;
1387
1423
  }
1388
1424
  }
1389
- o.arrayToJSON = s, o.isReservedId = function(d, h) {
1390
- if (d) {
1391
- for (var c = 0; c < d.length; ++c)
1392
- if (typeof d[c] != "string" && d[c][0] <= h && d[c][1] > h)
1425
+ i.arrayToJSON = t, i.isReservedId = function(s, l) {
1426
+ if (s) {
1427
+ for (var h = 0; h < s.length; ++h)
1428
+ if (typeof s[h] != "string" && s[h][0] <= l && s[h][1] > l)
1393
1429
  return !0;
1394
1430
  }
1395
1431
  return !1;
1396
- }, o.isReservedName = function(d, h) {
1397
- if (d) {
1398
- for (var c = 0; c < d.length; ++c)
1399
- if (d[c] === h)
1432
+ }, i.isReservedName = function(s, l) {
1433
+ if (s) {
1434
+ for (var h = 0; h < s.length; ++h)
1435
+ if (s[h] === l)
1400
1436
  return !0;
1401
1437
  }
1402
1438
  return !1;
1403
1439
  };
1404
- function o(l, d) {
1405
- i.call(this, l, d), this.nested = void 0, this._nestedArray = null;
1440
+ function i(c, s) {
1441
+ f.call(this, c, s), this.nested = void 0, this._nestedArray = null;
1406
1442
  }
1407
- function r(l) {
1408
- return l._nestedArray = null, l;
1443
+ function n(c) {
1444
+ return c._nestedArray = null, c;
1409
1445
  }
1410
- return Object.defineProperty(o.prototype, "nestedArray", {
1446
+ return Object.defineProperty(i.prototype, "nestedArray", {
1411
1447
  get: function() {
1412
- return this._nestedArray || (this._nestedArray = n.toArray(this.nested));
1448
+ return this._nestedArray || (this._nestedArray = d.toArray(this.nested));
1413
1449
  }
1414
- }), o.prototype.toJSON = function(d) {
1415
- return n.toObject([
1450
+ }), i.prototype.toJSON = function(s) {
1451
+ return d.toObject([
1416
1452
  "options",
1417
1453
  this.options,
1418
1454
  "nested",
1419
- s(this.nestedArray, d)
1455
+ t(this.nestedArray, s)
1420
1456
  ]);
1421
- }, o.prototype.addJSON = function(d) {
1422
- var h = this;
1423
- if (d)
1424
- for (var c = Object.keys(d), p = 0, m; p < c.length; ++p)
1425
- m = d[c[p]], h.add(
1457
+ }, i.prototype.addJSON = function(s) {
1458
+ var l = this;
1459
+ if (s)
1460
+ for (var h = Object.keys(s), p = 0, m; p < h.length; ++p)
1461
+ m = s[h[p]], l.add(
1426
1462
  // most to least likely
1427
- (m.fields !== void 0 ? f.fromJSON : m.values !== void 0 ? t.fromJSON : m.methods !== void 0 ? a.fromJSON : m.id !== void 0 ? e.fromJSON : o.fromJSON)(c[p], m)
1463
+ (m.fields !== void 0 ? a.fromJSON : m.values !== void 0 ? e.fromJSON : m.methods !== void 0 ? r.fromJSON : m.id !== void 0 ? o.fromJSON : i.fromJSON)(h[p], m)
1428
1464
  );
1429
1465
  return this;
1430
- }, o.prototype.get = function(d) {
1431
- return this.nested && this.nested[d] || null;
1432
- }, o.prototype.getEnum = function(d) {
1433
- if (this.nested && this.nested[d] instanceof t)
1434
- return this.nested[d].values;
1435
- throw Error("no such enum: " + d);
1436
- }, o.prototype.add = function(d) {
1437
- if (!(d instanceof e && d.extend !== void 0 || d instanceof f || d instanceof u || d instanceof t || d instanceof a || d instanceof o))
1466
+ }, i.prototype.get = function(s) {
1467
+ return this.nested && this.nested[s] || null;
1468
+ }, i.prototype.getEnum = function(s) {
1469
+ if (this.nested && this.nested[s] instanceof e)
1470
+ return this.nested[s].values;
1471
+ throw Error("no such enum: " + s);
1472
+ }, i.prototype.add = function(s) {
1473
+ if (!(s instanceof o && s.extend !== void 0 || s instanceof a || s instanceof u || s instanceof e || s instanceof r || s instanceof i))
1438
1474
  throw TypeError("object must be a valid nested object");
1439
1475
  if (!this.nested)
1440
1476
  this.nested = {};
1441
1477
  else {
1442
- var h = this.get(d.name);
1443
- if (h)
1444
- if (h instanceof o && d instanceof o && !(h instanceof f || h instanceof a)) {
1445
- for (var c = h.nestedArray, p = 0; p < c.length; ++p)
1446
- d.add(c[p]);
1447
- this.remove(h), this.nested || (this.nested = {}), d.setOptions(h.options, !0);
1478
+ var l = this.get(s.name);
1479
+ if (l)
1480
+ if (l instanceof i && s instanceof i && !(l instanceof a || l instanceof r)) {
1481
+ for (var h = l.nestedArray, p = 0; p < h.length; ++p)
1482
+ s.add(h[p]);
1483
+ this.remove(l), this.nested || (this.nested = {}), s.setOptions(l.options, !0);
1448
1484
  } else
1449
- throw Error("duplicate name '" + d.name + "' in " + this);
1485
+ throw Error("duplicate name '" + s.name + "' in " + this);
1450
1486
  }
1451
- return this.nested[d.name] = d, d.onAdd(this), r(this);
1452
- }, o.prototype.remove = function(d) {
1453
- if (!(d instanceof i))
1487
+ return this.nested[s.name] = s, s.onAdd(this), n(this);
1488
+ }, i.prototype.remove = function(s) {
1489
+ if (!(s instanceof f))
1454
1490
  throw TypeError("object must be a ReflectionObject");
1455
- if (d.parent !== this)
1456
- throw Error(d + " is not a member of " + this);
1457
- return delete this.nested[d.name], Object.keys(this.nested).length || (this.nested = void 0), d.onRemove(this), r(this);
1458
- }, o.prototype.define = function(d, h) {
1459
- if (n.isString(d))
1460
- d = d.split(".");
1461
- else if (!Array.isArray(d))
1491
+ if (s.parent !== this)
1492
+ throw Error(s + " is not a member of " + this);
1493
+ return delete this.nested[s.name], Object.keys(this.nested).length || (this.nested = void 0), s.onRemove(this), n(this);
1494
+ }, i.prototype.define = function(s, l) {
1495
+ if (d.isString(s))
1496
+ s = s.split(".");
1497
+ else if (!Array.isArray(s))
1462
1498
  throw TypeError("illegal path");
1463
- if (d && d.length && d[0] === "")
1499
+ if (s && s.length && s[0] === "")
1464
1500
  throw Error("path must be relative");
1465
- for (var c = this; d.length > 0; ) {
1466
- var p = d.shift();
1467
- if (c.nested && c.nested[p]) {
1468
- if (c = c.nested[p], !(c instanceof o))
1501
+ for (var h = this; s.length > 0; ) {
1502
+ var p = s.shift();
1503
+ if (h.nested && h.nested[p]) {
1504
+ if (h = h.nested[p], !(h instanceof i))
1469
1505
  throw Error("path conflicts with non-namespace objects");
1470
1506
  } else
1471
- c.add(c = new o(p));
1507
+ h.add(h = new i(p));
1472
1508
  }
1473
- return h && c.addJSON(h), c;
1474
- }, o.prototype.resolveAll = function() {
1475
- for (var d = this.nestedArray, h = 0; h < d.length; )
1476
- d[h] instanceof o ? d[h++].resolveAll() : d[h++].resolve();
1509
+ return l && h.addJSON(l), h;
1510
+ }, i.prototype.resolveAll = function() {
1511
+ for (var s = this.nestedArray, l = 0; l < s.length; )
1512
+ s[l] instanceof i ? s[l++].resolveAll() : s[l++].resolve();
1477
1513
  return this.resolve();
1478
- }, o.prototype.lookup = function(d, h, c) {
1479
- if (typeof h == "boolean" ? (c = h, h = void 0) : h && !Array.isArray(h) && (h = [h]), n.isString(d) && d.length) {
1480
- if (d === ".")
1514
+ }, i.prototype.lookup = function(s, l, h) {
1515
+ if (typeof l == "boolean" ? (h = l, l = void 0) : l && !Array.isArray(l) && (l = [l]), d.isString(s) && s.length) {
1516
+ if (s === ".")
1481
1517
  return this.root;
1482
- d = d.split(".");
1483
- } else if (!d.length)
1518
+ s = s.split(".");
1519
+ } else if (!s.length)
1484
1520
  return this;
1485
- if (d[0] === "")
1486
- return this.root.lookup(d.slice(1), h);
1487
- var p = this.get(d[0]);
1521
+ if (s[0] === "")
1522
+ return this.root.lookup(s.slice(1), l);
1523
+ var p = this.get(s[0]);
1488
1524
  if (p) {
1489
- if (d.length === 1) {
1490
- if (!h || h.indexOf(p.constructor) > -1)
1525
+ if (s.length === 1) {
1526
+ if (!l || l.indexOf(p.constructor) > -1)
1491
1527
  return p;
1492
- } else if (p instanceof o && (p = p.lookup(d.slice(1), h, !0)))
1528
+ } else if (p instanceof i && (p = p.lookup(s.slice(1), l, !0)))
1493
1529
  return p;
1494
1530
  } else
1495
1531
  for (var m = 0; m < this.nestedArray.length; ++m)
1496
- if (this._nestedArray[m] instanceof o && (p = this._nestedArray[m].lookup(d, h, !0)))
1532
+ if (this._nestedArray[m] instanceof i && (p = this._nestedArray[m].lookup(s, l, !0)))
1497
1533
  return p;
1498
- return this.parent === null || c ? null : this.parent.lookup(d, h);
1499
- }, o.prototype.lookupType = function(d) {
1500
- var h = this.lookup(d, [f]);
1501
- if (!h)
1502
- throw Error("no such type: " + d);
1503
- return h;
1504
- }, o.prototype.lookupEnum = function(d) {
1505
- var h = this.lookup(d, [t]);
1506
- if (!h)
1507
- throw Error("no such Enum '" + d + "' in " + this);
1508
- return h;
1509
- }, o.prototype.lookupTypeOrEnum = function(d) {
1510
- var h = this.lookup(d, [f, t]);
1511
- if (!h)
1512
- throw Error("no such Type or Enum '" + d + "' in " + this);
1513
- return h;
1514
- }, o.prototype.lookupService = function(d) {
1515
- var h = this.lookup(d, [a]);
1516
- if (!h)
1517
- throw Error("no such Service '" + d + "' in " + this);
1518
- return h;
1519
- }, o._configure = function(l, d, h) {
1520
- f = l, a = d, t = h;
1534
+ return this.parent === null || h ? null : this.parent.lookup(s, l);
1535
+ }, i.prototype.lookupType = function(s) {
1536
+ var l = this.lookup(s, [a]);
1537
+ if (!l)
1538
+ throw Error("no such type: " + s);
1539
+ return l;
1540
+ }, i.prototype.lookupEnum = function(s) {
1541
+ var l = this.lookup(s, [e]);
1542
+ if (!l)
1543
+ throw Error("no such Enum '" + s + "' in " + this);
1544
+ return l;
1545
+ }, i.prototype.lookupTypeOrEnum = function(s) {
1546
+ var l = this.lookup(s, [a, e]);
1547
+ if (!l)
1548
+ throw Error("no such Type or Enum '" + s + "' in " + this);
1549
+ return l;
1550
+ }, i.prototype.lookupService = function(s) {
1551
+ var l = this.lookup(s, [r]);
1552
+ if (!l)
1553
+ throw Error("no such Service '" + s + "' in " + this);
1554
+ return l;
1555
+ }, i._configure = function(c, s, l) {
1556
+ a = c, r = s, e = l;
1521
1557
  }, namespace;
1522
1558
  }
1523
1559
  var mapfield, hasRequiredMapfield;
1524
1560
  function requireMapfield() {
1525
1561
  if (hasRequiredMapfield) return mapfield;
1526
1562
  hasRequiredMapfield = 1, mapfield = u;
1527
- var i = requireField();
1528
- ((u.prototype = Object.create(i.prototype)).constructor = u).className = "MapField";
1529
- var e = requireTypes(), n = requireUtil();
1530
- function u(f, a, t, s, o, r) {
1531
- if (i.call(this, f, a, s, void 0, void 0, o, r), !n.isString(t))
1563
+ var f = requireField();
1564
+ ((u.prototype = Object.create(f.prototype)).constructor = u).className = "MapField";
1565
+ var o = requireTypes(), d = requireUtil();
1566
+ function u(a, r, e, t, i, n) {
1567
+ if (f.call(this, a, r, t, void 0, void 0, i, n), !d.isString(e))
1532
1568
  throw TypeError("keyType must be a string");
1533
- this.keyType = t, this.resolvedKeyType = null, this.map = !0;
1569
+ this.keyType = e, this.resolvedKeyType = null, this.map = !0;
1534
1570
  }
1535
- return u.fromJSON = function(a, t) {
1536
- return new u(a, t.id, t.keyType, t.type, t.options, t.comment);
1537
- }, u.prototype.toJSON = function(a) {
1538
- var t = a ? !!a.keepComments : !1;
1539
- return n.toObject([
1571
+ return u.fromJSON = function(r, e) {
1572
+ return new u(r, e.id, e.keyType, e.type, e.options, e.comment);
1573
+ }, u.prototype.toJSON = function(r) {
1574
+ var e = r ? !!r.keepComments : !1;
1575
+ return d.toObject([
1540
1576
  "keyType",
1541
1577
  this.keyType,
1542
1578
  "type",
@@ -1548,41 +1584,41 @@ function requireMapfield() {
1548
1584
  "options",
1549
1585
  this.options,
1550
1586
  "comment",
1551
- t ? this.comment : void 0
1587
+ e ? this.comment : void 0
1552
1588
  ]);
1553
1589
  }, u.prototype.resolve = function() {
1554
1590
  if (this.resolved)
1555
1591
  return this;
1556
- if (e.mapKey[this.keyType] === void 0)
1592
+ if (o.mapKey[this.keyType] === void 0)
1557
1593
  throw Error("invalid key type: " + this.keyType);
1558
- return i.prototype.resolve.call(this);
1559
- }, u.d = function(a, t, s) {
1560
- return typeof s == "function" ? s = n.decorateType(s).name : s && typeof s == "object" && (s = n.decorateEnum(s).name), function(r, l) {
1561
- n.decorateType(r.constructor).add(new u(l, a, t, s));
1594
+ return f.prototype.resolve.call(this);
1595
+ }, u.d = function(r, e, t) {
1596
+ return typeof t == "function" ? t = d.decorateType(t).name : t && typeof t == "object" && (t = d.decorateEnum(t).name), function(n, c) {
1597
+ d.decorateType(n.constructor).add(new u(c, r, e, t));
1562
1598
  };
1563
1599
  }, mapfield;
1564
1600
  }
1565
1601
  var method, hasRequiredMethod;
1566
1602
  function requireMethod() {
1567
1603
  if (hasRequiredMethod) return method;
1568
- hasRequiredMethod = 1, method = n;
1569
- var i = requireObject();
1570
- ((n.prototype = Object.create(i.prototype)).constructor = n).className = "Method";
1571
- var e = requireUtil();
1572
- function n(u, f, a, t, s, o, r, l, d) {
1573
- if (e.isObject(s) ? (r = s, s = o = void 0) : e.isObject(o) && (r = o, o = void 0), !(f === void 0 || e.isString(f)))
1604
+ hasRequiredMethod = 1, method = d;
1605
+ var f = requireObject();
1606
+ ((d.prototype = Object.create(f.prototype)).constructor = d).className = "Method";
1607
+ var o = requireUtil();
1608
+ function d(u, a, r, e, t, i, n, c, s) {
1609
+ if (o.isObject(t) ? (n = t, t = i = void 0) : o.isObject(i) && (n = i, i = void 0), !(a === void 0 || o.isString(a)))
1574
1610
  throw TypeError("type must be a string");
1575
- if (!e.isString(a))
1611
+ if (!o.isString(r))
1576
1612
  throw TypeError("requestType must be a string");
1577
- if (!e.isString(t))
1613
+ if (!o.isString(e))
1578
1614
  throw TypeError("responseType must be a string");
1579
- i.call(this, u, r), this.type = f || "rpc", this.requestType = a, this.requestStream = s ? !0 : void 0, this.responseType = t, this.responseStream = o ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = l, this.parsedOptions = d;
1615
+ f.call(this, u, n), this.type = a || "rpc", this.requestType = r, this.requestStream = t ? !0 : void 0, this.responseType = e, this.responseStream = i ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = c, this.parsedOptions = s;
1580
1616
  }
1581
- return n.fromJSON = function(f, a) {
1582
- return new n(f, a.type, a.requestType, a.responseType, a.requestStream, a.responseStream, a.options, a.comment, a.parsedOptions);
1583
- }, n.prototype.toJSON = function(f) {
1584
- var a = f ? !!f.keepComments : !1;
1585
- return e.toObject([
1617
+ return d.fromJSON = function(a, r) {
1618
+ return new d(a, r.type, r.requestType, r.responseType, r.requestStream, r.responseStream, r.options, r.comment, r.parsedOptions);
1619
+ }, d.prototype.toJSON = function(a) {
1620
+ var r = a ? !!a.keepComments : !1;
1621
+ return o.toObject([
1586
1622
  "type",
1587
1623
  this.type !== "rpc" && /* istanbul ignore next */
1588
1624
  this.type || void 0,
@@ -1597,433 +1633,434 @@ function requireMethod() {
1597
1633
  "options",
1598
1634
  this.options,
1599
1635
  "comment",
1600
- a ? this.comment : void 0,
1636
+ r ? this.comment : void 0,
1601
1637
  "parsedOptions",
1602
1638
  this.parsedOptions
1603
1639
  ]);
1604
- }, n.prototype.resolve = function() {
1605
- return this.resolved ? this : (this.resolvedRequestType = this.parent.lookupType(this.requestType), this.resolvedResponseType = this.parent.lookupType(this.responseType), i.prototype.resolve.call(this));
1640
+ }, d.prototype.resolve = function() {
1641
+ return this.resolved ? this : (this.resolvedRequestType = this.parent.lookupType(this.requestType), this.resolvedResponseType = this.parent.lookupType(this.responseType), f.prototype.resolve.call(this));
1606
1642
  }, method;
1607
1643
  }
1608
1644
  var service, hasRequiredService;
1609
1645
  function requireService() {
1610
1646
  if (hasRequiredService) return service;
1611
- hasRequiredService = 1, service = f;
1612
- var i = requireNamespace();
1613
- ((f.prototype = Object.create(i.prototype)).constructor = f).className = "Service";
1614
- var e = requireMethod(), n = requireUtil(), u = rpc;
1615
- function f(t, s) {
1616
- i.call(this, t, s), this.methods = {}, this._methodsArray = null;
1617
- }
1618
- f.fromJSON = function(s, o) {
1619
- var r = new f(s, o.options);
1620
- if (o.methods)
1621
- for (var l = Object.keys(o.methods), d = 0; d < l.length; ++d)
1622
- r.add(e.fromJSON(l[d], o.methods[l[d]]));
1623
- return o.nested && r.addJSON(o.nested), r.comment = o.comment, r;
1624
- }, f.prototype.toJSON = function(s) {
1625
- var o = i.prototype.toJSON.call(this, s), r = s ? !!s.keepComments : !1;
1626
- return n.toObject([
1647
+ hasRequiredService = 1, service = a;
1648
+ var f = requireNamespace();
1649
+ ((a.prototype = Object.create(f.prototype)).constructor = a).className = "Service";
1650
+ var o = requireMethod(), d = requireUtil(), u = requireRpc();
1651
+ function a(e, t) {
1652
+ f.call(this, e, t), this.methods = {}, this._methodsArray = null;
1653
+ }
1654
+ a.fromJSON = function(t, i) {
1655
+ var n = new a(t, i.options);
1656
+ if (i.methods)
1657
+ for (var c = Object.keys(i.methods), s = 0; s < c.length; ++s)
1658
+ n.add(o.fromJSON(c[s], i.methods[c[s]]));
1659
+ return i.nested && n.addJSON(i.nested), n.comment = i.comment, n;
1660
+ }, a.prototype.toJSON = function(t) {
1661
+ var i = f.prototype.toJSON.call(this, t), n = t ? !!t.keepComments : !1;
1662
+ return d.toObject([
1627
1663
  "options",
1628
- o && o.options || void 0,
1664
+ i && i.options || void 0,
1629
1665
  "methods",
1630
- i.arrayToJSON(this.methodsArray, s) || /* istanbul ignore next */
1666
+ f.arrayToJSON(this.methodsArray, t) || /* istanbul ignore next */
1631
1667
  {},
1632
1668
  "nested",
1633
- o && o.nested || void 0,
1669
+ i && i.nested || void 0,
1634
1670
  "comment",
1635
- r ? this.comment : void 0
1671
+ n ? this.comment : void 0
1636
1672
  ]);
1637
- }, Object.defineProperty(f.prototype, "methodsArray", {
1673
+ }, Object.defineProperty(a.prototype, "methodsArray", {
1638
1674
  get: function() {
1639
- return this._methodsArray || (this._methodsArray = n.toArray(this.methods));
1675
+ return this._methodsArray || (this._methodsArray = d.toArray(this.methods));
1640
1676
  }
1641
1677
  });
1642
- function a(t) {
1643
- return t._methodsArray = null, t;
1644
- }
1645
- return f.prototype.get = function(s) {
1646
- return this.methods[s] || i.prototype.get.call(this, s);
1647
- }, f.prototype.resolveAll = function() {
1648
- for (var s = this.methodsArray, o = 0; o < s.length; ++o)
1649
- s[o].resolve();
1650
- return i.prototype.resolve.call(this);
1651
- }, f.prototype.add = function(s) {
1652
- if (this.get(s.name))
1653
- throw Error("duplicate name '" + s.name + "' in " + this);
1654
- return s instanceof e ? (this.methods[s.name] = s, s.parent = this, a(this)) : i.prototype.add.call(this, s);
1655
- }, f.prototype.remove = function(s) {
1656
- if (s instanceof e) {
1657
- if (this.methods[s.name] !== s)
1658
- throw Error(s + " is not a member of " + this);
1659
- return delete this.methods[s.name], s.parent = null, a(this);
1660
- }
1661
- return i.prototype.remove.call(this, s);
1662
- }, f.prototype.create = function(s, o, r) {
1663
- for (var l = new u.Service(s, o, r), d = 0, h; d < /* initializes */
1664
- this.methodsArray.length; ++d) {
1665
- var c = n.lcFirst((h = this._methodsArray[d]).resolve().name).replace(/[^$\w_]/g, "");
1666
- l[c] = n.codegen(["r", "c"], n.isReserved(c) ? c + "_" : c)("return this.rpcCall(m,q,s,r,c)")({
1667
- m: h,
1668
- q: h.resolvedRequestType.ctor,
1669
- s: h.resolvedResponseType.ctor
1678
+ function r(e) {
1679
+ return e._methodsArray = null, e;
1680
+ }
1681
+ return a.prototype.get = function(t) {
1682
+ return this.methods[t] || f.prototype.get.call(this, t);
1683
+ }, a.prototype.resolveAll = function() {
1684
+ for (var t = this.methodsArray, i = 0; i < t.length; ++i)
1685
+ t[i].resolve();
1686
+ return f.prototype.resolve.call(this);
1687
+ }, a.prototype.add = function(t) {
1688
+ if (this.get(t.name))
1689
+ throw Error("duplicate name '" + t.name + "' in " + this);
1690
+ return t instanceof o ? (this.methods[t.name] = t, t.parent = this, r(this)) : f.prototype.add.call(this, t);
1691
+ }, a.prototype.remove = function(t) {
1692
+ if (t instanceof o) {
1693
+ if (this.methods[t.name] !== t)
1694
+ throw Error(t + " is not a member of " + this);
1695
+ return delete this.methods[t.name], t.parent = null, r(this);
1696
+ }
1697
+ return f.prototype.remove.call(this, t);
1698
+ }, a.prototype.create = function(t, i, n) {
1699
+ for (var c = new u.Service(t, i, n), s = 0, l; s < /* initializes */
1700
+ this.methodsArray.length; ++s) {
1701
+ var h = d.lcFirst((l = this._methodsArray[s]).resolve().name).replace(/[^$\w_]/g, "");
1702
+ c[h] = d.codegen(["r", "c"], d.isReserved(h) ? h + "_" : h)("return this.rpcCall(m,q,s,r,c)")({
1703
+ m: l,
1704
+ q: l.resolvedRequestType.ctor,
1705
+ s: l.resolvedResponseType.ctor
1670
1706
  });
1671
1707
  }
1672
- return l;
1708
+ return c;
1673
1709
  }, service;
1674
1710
  }
1675
- var message = Message, util = requireMinimal();
1676
- function Message(i) {
1677
- if (i)
1678
- for (var e = Object.keys(i), n = 0; n < e.length; ++n)
1679
- this[e[n]] = i[e[n]];
1711
+ var message, hasRequiredMessage;
1712
+ function requireMessage() {
1713
+ if (hasRequiredMessage) return message;
1714
+ hasRequiredMessage = 1, message = o;
1715
+ var f = requireMinimal();
1716
+ function o(d) {
1717
+ if (d)
1718
+ for (var u = Object.keys(d), a = 0; a < u.length; ++a)
1719
+ this[u[a]] = d[u[a]];
1720
+ }
1721
+ return o.create = function(u) {
1722
+ return this.$type.create(u);
1723
+ }, o.encode = function(u, a) {
1724
+ return this.$type.encode(u, a);
1725
+ }, o.encodeDelimited = function(u, a) {
1726
+ return this.$type.encodeDelimited(u, a);
1727
+ }, o.decode = function(u) {
1728
+ return this.$type.decode(u);
1729
+ }, o.decodeDelimited = function(u) {
1730
+ return this.$type.decodeDelimited(u);
1731
+ }, o.verify = function(u) {
1732
+ return this.$type.verify(u);
1733
+ }, o.fromObject = function(u) {
1734
+ return this.$type.fromObject(u);
1735
+ }, o.toObject = function(u, a) {
1736
+ return this.$type.toObject(u, a);
1737
+ }, o.prototype.toJSON = function() {
1738
+ return this.$type.toObject(this, f.toJSONOptions);
1739
+ }, message;
1680
1740
  }
1681
- Message.create = function i(e) {
1682
- return this.$type.create(e);
1683
- };
1684
- Message.encode = function i(e, n) {
1685
- return this.$type.encode(e, n);
1686
- };
1687
- Message.encodeDelimited = function i(e, n) {
1688
- return this.$type.encodeDelimited(e, n);
1689
- };
1690
- Message.decode = function i(e) {
1691
- return this.$type.decode(e);
1692
- };
1693
- Message.decodeDelimited = function i(e) {
1694
- return this.$type.decodeDelimited(e);
1695
- };
1696
- Message.verify = function i(e) {
1697
- return this.$type.verify(e);
1698
- };
1699
- Message.fromObject = function i(e) {
1700
- return this.$type.fromObject(e);
1701
- };
1702
- Message.toObject = function i(e, n) {
1703
- return this.$type.toObject(e, n);
1704
- };
1705
- Message.prototype.toJSON = function i() {
1706
- return this.$type.toObject(this, util.toJSONOptions);
1707
- };
1708
1741
  var decoder_1, hasRequiredDecoder;
1709
1742
  function requireDecoder() {
1710
1743
  if (hasRequiredDecoder) return decoder_1;
1711
- hasRequiredDecoder = 1, decoder_1 = f;
1712
- var i = require_enum(), e = requireTypes(), n = requireUtil();
1713
- function u(a) {
1714
- return "missing required '" + a.name + "'";
1715
- }
1716
- function f(a) {
1717
- var t = n.codegen(["r", "l"], a.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (a.fieldsArray.filter(function(h) {
1718
- return h.map;
1744
+ hasRequiredDecoder = 1, decoder_1 = a;
1745
+ var f = require_enum(), o = requireTypes(), d = requireUtil();
1746
+ function u(r) {
1747
+ return "missing required '" + r.name + "'";
1748
+ }
1749
+ function a(r) {
1750
+ var e = d.codegen(["r", "l"], r.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (r.fieldsArray.filter(function(l) {
1751
+ return l.map;
1719
1752
  }).length ? ",k,value" : ""))("while(r.pos<c){")("var t=r.uint32()");
1720
- a.group && t("if((t&7)===4)")("break"), t("switch(t>>>3){");
1721
- for (var s = 0; s < /* initializes */
1722
- a.fieldsArray.length; ++s) {
1723
- var o = a._fieldsArray[s].resolve(), r = o.resolvedType instanceof i ? "int32" : o.type, l = "m" + n.safeProp(o.name);
1724
- t("case %i: {", o.id), o.map ? (t("if(%s===util.emptyObject)", l)("%s={}", l)("var c2 = r.uint32()+r.pos"), e.defaults[o.keyType] !== void 0 ? t("k=%j", e.defaults[o.keyType]) : t("k=null"), e.defaults[r] !== void 0 ? t("value=%j", e.defaults[r]) : t("value=null"), t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break", o.keyType)("case 2:"), e.basic[r] === void 0 ? t("value=types[%i].decode(r,r.uint32())", s) : t("value=r.%s()", r), t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), e.long[o.keyType] !== void 0 ? t('%s[typeof k==="object"?util.longToHash(k):k]=value', l) : t("%s[k]=value", l)) : o.repeated ? (t("if(!(%s&&%s.length))", l, l)("%s=[]", l), e.packed[r] !== void 0 && t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", l, r)("}else"), e.basic[r] === void 0 ? t(o.resolvedType.group ? "%s.push(types[%i].decode(r))" : "%s.push(types[%i].decode(r,r.uint32()))", l, s) : t("%s.push(r.%s())", l, r)) : e.basic[r] === void 0 ? t(o.resolvedType.group ? "%s=types[%i].decode(r)" : "%s=types[%i].decode(r,r.uint32())", l, s) : t("%s=r.%s()", l, r), t("break")("}");
1753
+ r.group && e("if((t&7)===4)")("break"), e("switch(t>>>3){");
1754
+ for (var t = 0; t < /* initializes */
1755
+ r.fieldsArray.length; ++t) {
1756
+ var i = r._fieldsArray[t].resolve(), n = i.resolvedType instanceof f ? "int32" : i.type, c = "m" + d.safeProp(i.name);
1757
+ e("case %i: {", i.id), i.map ? (e("if(%s===util.emptyObject)", c)("%s={}", c)("var c2 = r.uint32()+r.pos"), o.defaults[i.keyType] !== void 0 ? e("k=%j", o.defaults[i.keyType]) : e("k=null"), o.defaults[n] !== void 0 ? e("value=%j", o.defaults[n]) : 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:"), o.basic[n] === void 0 ? e("value=types[%i].decode(r,r.uint32())", t) : e("value=r.%s()", n), e("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), o.long[i.keyType] !== void 0 ? e('%s[typeof k==="object"?util.longToHash(k):k]=value', c) : e("%s[k]=value", c)) : i.repeated ? (e("if(!(%s&&%s.length))", c, c)("%s=[]", c), o.packed[n] !== void 0 && e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", c, n)("}else"), o.basic[n] === void 0 ? e(i.resolvedType.group ? "%s.push(types[%i].decode(r))" : "%s.push(types[%i].decode(r,r.uint32()))", c, t) : e("%s.push(r.%s())", c, n)) : o.basic[n] === void 0 ? e(i.resolvedType.group ? "%s=types[%i].decode(r)" : "%s=types[%i].decode(r,r.uint32())", c, t) : e("%s=r.%s()", c, n), e("break")("}");
1725
1758
  }
1726
- for (t("default:")("r.skipType(t&7)")("break")("}")("}"), s = 0; s < a._fieldsArray.length; ++s) {
1727
- var d = a._fieldsArray[s];
1728
- d.required && t("if(!m.hasOwnProperty(%j))", d.name)("throw util.ProtocolError(%j,{instance:m})", u(d));
1759
+ for (e("default:")("r.skipType(t&7)")("break")("}")("}"), t = 0; t < r._fieldsArray.length; ++t) {
1760
+ var s = r._fieldsArray[t];
1761
+ s.required && e("if(!m.hasOwnProperty(%j))", s.name)("throw util.ProtocolError(%j,{instance:m})", u(s));
1729
1762
  }
1730
- return t("return m");
1763
+ return e("return m");
1731
1764
  }
1732
1765
  return decoder_1;
1733
1766
  }
1734
1767
  var verifier_1, hasRequiredVerifier;
1735
1768
  function requireVerifier() {
1736
1769
  if (hasRequiredVerifier) return verifier_1;
1737
- hasRequiredVerifier = 1, verifier_1 = a;
1738
- var i = require_enum(), e = requireUtil();
1739
- function n(t, s) {
1740
- return t.name + ": " + s + (t.repeated && s !== "array" ? "[]" : t.map && s !== "object" ? "{k:" + t.keyType + "}" : "") + " expected";
1741
- }
1742
- function u(t, s, o, r) {
1743
- if (s.resolvedType)
1744
- if (s.resolvedType instanceof i) {
1745
- t("switch(%s){", r)("default:")("return%j", n(s, "enum value"));
1746
- for (var l = Object.keys(s.resolvedType.values), d = 0; d < l.length; ++d) t("case %i:", s.resolvedType.values[l[d]]);
1747
- t("break")("}");
1770
+ hasRequiredVerifier = 1, verifier_1 = r;
1771
+ var f = require_enum(), o = requireUtil();
1772
+ function d(e, t) {
1773
+ return e.name + ": " + t + (e.repeated && t !== "array" ? "[]" : e.map && t !== "object" ? "{k:" + e.keyType + "}" : "") + " expected";
1774
+ }
1775
+ function u(e, t, i, n) {
1776
+ if (t.resolvedType)
1777
+ if (t.resolvedType instanceof f) {
1778
+ e("switch(%s){", n)("default:")("return%j", d(t, "enum value"));
1779
+ for (var c = Object.keys(t.resolvedType.values), s = 0; s < c.length; ++s) e("case %i:", t.resolvedType.values[c[s]]);
1780
+ e("break")("}");
1748
1781
  } else
1749
- t("{")("var e=types[%i].verify(%s);", o, r)("if(e)")("return%j+e", s.name + ".")("}");
1782
+ e("{")("var e=types[%i].verify(%s);", i, n)("if(e)")("return%j+e", t.name + ".")("}");
1750
1783
  else
1751
- switch (s.type) {
1784
+ switch (t.type) {
1752
1785
  case "int32":
1753
1786
  case "uint32":
1754
1787
  case "sint32":
1755
1788
  case "fixed32":
1756
1789
  case "sfixed32":
1757
- t("if(!util.isInteger(%s))", r)("return%j", n(s, "integer"));
1790
+ e("if(!util.isInteger(%s))", n)("return%j", d(t, "integer"));
1758
1791
  break;
1759
1792
  case "int64":
1760
1793
  case "uint64":
1761
1794
  case "sint64":
1762
1795
  case "fixed64":
1763
1796
  case "sfixed64":
1764
- t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", r, r, r, r)("return%j", n(s, "integer|Long"));
1797
+ e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", n, n, n, n)("return%j", d(t, "integer|Long"));
1765
1798
  break;
1766
1799
  case "float":
1767
1800
  case "double":
1768
- t('if(typeof %s!=="number")', r)("return%j", n(s, "number"));
1801
+ e('if(typeof %s!=="number")', n)("return%j", d(t, "number"));
1769
1802
  break;
1770
1803
  case "bool":
1771
- t('if(typeof %s!=="boolean")', r)("return%j", n(s, "boolean"));
1804
+ e('if(typeof %s!=="boolean")', n)("return%j", d(t, "boolean"));
1772
1805
  break;
1773
1806
  case "string":
1774
- t("if(!util.isString(%s))", r)("return%j", n(s, "string"));
1807
+ e("if(!util.isString(%s))", n)("return%j", d(t, "string"));
1775
1808
  break;
1776
1809
  case "bytes":
1777
- t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))', r, r, r)("return%j", n(s, "buffer"));
1810
+ e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))', n, n, n)("return%j", d(t, "buffer"));
1778
1811
  break;
1779
1812
  }
1780
- return t;
1813
+ return e;
1781
1814
  }
1782
- function f(t, s, o) {
1783
- switch (s.keyType) {
1815
+ function a(e, t, i) {
1816
+ switch (t.keyType) {
1784
1817
  case "int32":
1785
1818
  case "uint32":
1786
1819
  case "sint32":
1787
1820
  case "fixed32":
1788
1821
  case "sfixed32":
1789
- t("if(!util.key32Re.test(%s))", o)("return%j", n(s, "integer key"));
1822
+ e("if(!util.key32Re.test(%s))", i)("return%j", d(t, "integer key"));
1790
1823
  break;
1791
1824
  case "int64":
1792
1825
  case "uint64":
1793
1826
  case "sint64":
1794
1827
  case "fixed64":
1795
1828
  case "sfixed64":
1796
- t("if(!util.key64Re.test(%s))", o)("return%j", n(s, "integer|Long key"));
1829
+ e("if(!util.key64Re.test(%s))", i)("return%j", d(t, "integer|Long key"));
1797
1830
  break;
1798
1831
  case "bool":
1799
- t("if(!util.key2Re.test(%s))", o)("return%j", n(s, "boolean key"));
1832
+ e("if(!util.key2Re.test(%s))", i)("return%j", d(t, "boolean key"));
1800
1833
  break;
1801
1834
  }
1802
- return t;
1803
- }
1804
- function a(t) {
1805
- var s = e.codegen(["m"], t.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected"), o = t.oneofsArray, r = {};
1806
- o.length && s("var p={}");
1807
- for (var l = 0; l < /* initializes */
1808
- t.fieldsArray.length; ++l) {
1809
- var d = t._fieldsArray[l].resolve(), h = "m" + e.safeProp(d.name);
1810
- if (d.optional && s("if(%s!=null&&m.hasOwnProperty(%j)){", h, d.name), d.map)
1811
- s("if(!util.isObject(%s))", h)("return%j", n(d, "object"))("var k=Object.keys(%s)", h)("for(var i=0;i<k.length;++i){"), f(s, d, "k[i]"), u(s, d, l, h + "[k[i]]")("}");
1812
- else if (d.repeated)
1813
- s("if(!Array.isArray(%s))", h)("return%j", n(d, "array"))("for(var i=0;i<%s.length;++i){", h), u(s, d, l, h + "[i]")("}");
1835
+ return e;
1836
+ }
1837
+ function r(e) {
1838
+ var t = o.codegen(["m"], e.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected"), i = e.oneofsArray, n = {};
1839
+ i.length && t("var p={}");
1840
+ for (var c = 0; c < /* initializes */
1841
+ e.fieldsArray.length; ++c) {
1842
+ var s = e._fieldsArray[c].resolve(), l = "m" + o.safeProp(s.name);
1843
+ if (s.optional && t("if(%s!=null&&m.hasOwnProperty(%j)){", l, s.name), s.map)
1844
+ t("if(!util.isObject(%s))", l)("return%j", d(s, "object"))("var k=Object.keys(%s)", l)("for(var i=0;i<k.length;++i){"), a(t, s, "k[i]"), u(t, s, c, l + "[k[i]]")("}");
1845
+ else if (s.repeated)
1846
+ t("if(!Array.isArray(%s))", l)("return%j", d(s, "array"))("for(var i=0;i<%s.length;++i){", l), u(t, s, c, l + "[i]")("}");
1814
1847
  else {
1815
- if (d.partOf) {
1816
- var c = e.safeProp(d.partOf.name);
1817
- r[d.partOf.name] === 1 && s("if(p%s===1)", c)("return%j", d.partOf.name + ": multiple values"), r[d.partOf.name] = 1, s("p%s=1", c);
1848
+ if (s.partOf) {
1849
+ var h = o.safeProp(s.partOf.name);
1850
+ n[s.partOf.name] === 1 && t("if(p%s===1)", h)("return%j", s.partOf.name + ": multiple values"), n[s.partOf.name] = 1, t("p%s=1", h);
1818
1851
  }
1819
- u(s, d, l, h);
1852
+ u(t, s, c, l);
1820
1853
  }
1821
- d.optional && s("}");
1854
+ s.optional && t("}");
1822
1855
  }
1823
- return s("return null");
1856
+ return t("return null");
1824
1857
  }
1825
1858
  return verifier_1;
1826
1859
  }
1827
1860
  var converter = {}, hasRequiredConverter;
1828
1861
  function requireConverter() {
1829
- return hasRequiredConverter || (hasRequiredConverter = 1, function(i) {
1830
- var e = i, n = require_enum(), u = requireUtil();
1831
- function f(t, s, o, r) {
1832
- var l = !1;
1833
- if (s.resolvedType)
1834
- if (s.resolvedType instanceof n) {
1835
- t("switch(d%s){", r);
1836
- for (var d = s.resolvedType.values, h = Object.keys(d), c = 0; c < h.length; ++c)
1837
- d[h[c]] === s.typeDefault && !l && (t("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', r, r, r), s.repeated || t("break"), l = !0), t("case%j:", h[c])("case %i:", d[h[c]])("m%s=%j", r, d[h[c]])("break");
1838
- t("}");
1839
- } else t('if(typeof d%s!=="object")', r)("throw TypeError(%j)", s.fullName + ": object expected")("m%s=types[%i].fromObject(d%s)", r, o, r);
1862
+ return hasRequiredConverter || (hasRequiredConverter = 1, function(f) {
1863
+ var o = f, d = require_enum(), u = requireUtil();
1864
+ function a(e, t, i, n) {
1865
+ var c = !1;
1866
+ if (t.resolvedType)
1867
+ if (t.resolvedType instanceof d) {
1868
+ e("switch(d%s){", n);
1869
+ for (var s = t.resolvedType.values, l = Object.keys(s), h = 0; h < l.length; ++h)
1870
+ s[l[h]] === t.typeDefault && !c && (e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', n, n, n), t.repeated || e("break"), c = !0), e("case%j:", l[h])("case %i:", s[l[h]])("m%s=%j", n, s[l[h]])("break");
1871
+ e("}");
1872
+ } else e('if(typeof d%s!=="object")', n)("throw TypeError(%j)", t.fullName + ": object expected")("m%s=types[%i].fromObject(d%s)", n, i, n);
1840
1873
  else {
1841
1874
  var p = !1;
1842
- switch (s.type) {
1875
+ switch (t.type) {
1843
1876
  case "double":
1844
1877
  case "float":
1845
- t("m%s=Number(d%s)", r, r);
1878
+ e("m%s=Number(d%s)", n, n);
1846
1879
  break;
1847
1880
  case "uint32":
1848
1881
  case "fixed32":
1849
- t("m%s=d%s>>>0", r, r);
1882
+ e("m%s=d%s>>>0", n, n);
1850
1883
  break;
1851
1884
  case "int32":
1852
1885
  case "sint32":
1853
1886
  case "sfixed32":
1854
- t("m%s=d%s|0", r, r);
1887
+ e("m%s=d%s|0", n, n);
1855
1888
  break;
1856
1889
  case "uint64":
1857
1890
  p = !0;
1891
+ // eslint-disable-next-line no-fallthrough
1858
1892
  case "int64":
1859
1893
  case "sint64":
1860
1894
  case "fixed64":
1861
1895
  case "sfixed64":
1862
- t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j", r, r, p)('else if(typeof d%s==="string")', r)("m%s=parseInt(d%s,10)", r, r)('else if(typeof d%s==="number")', r)("m%s=d%s", r, r)('else if(typeof d%s==="object")', r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", r, r, r, p ? "true" : "");
1896
+ e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j", n, n, p)('else if(typeof d%s==="string")', n)("m%s=parseInt(d%s,10)", n, n)('else if(typeof d%s==="number")', n)("m%s=d%s", n, n)('else if(typeof d%s==="object")', n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", n, n, n, p ? "true" : "");
1863
1897
  break;
1864
1898
  case "bytes":
1865
- t('if(typeof d%s==="string")', r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", r, r, r)("else if(d%s.length >= 0)", r)("m%s=d%s", r, r);
1899
+ e('if(typeof d%s==="string")', n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", n, n, n)("else if(d%s.length >= 0)", n)("m%s=d%s", n, n);
1866
1900
  break;
1867
1901
  case "string":
1868
- t("m%s=String(d%s)", r, r);
1902
+ e("m%s=String(d%s)", n, n);
1869
1903
  break;
1870
1904
  case "bool":
1871
- t("m%s=Boolean(d%s)", r, r);
1905
+ e("m%s=Boolean(d%s)", n, n);
1872
1906
  break;
1873
1907
  }
1874
1908
  }
1875
- return t;
1876
- }
1877
- e.fromObject = function(s) {
1878
- var o = s.fieldsArray, r = u.codegen(["d"], s.name + "$fromObject")("if(d instanceof this.ctor)")("return d");
1879
- if (!o.length) return r("return new this.ctor");
1880
- r("var m=new this.ctor");
1881
- for (var l = 0; l < o.length; ++l) {
1882
- var d = o[l].resolve(), h = u.safeProp(d.name);
1883
- d.map ? (r("if(d%s){", h)('if(typeof d%s!=="object")', h)("throw TypeError(%j)", d.fullName + ": object expected")("m%s={}", h)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", h), f(
1884
- r,
1885
- d,
1909
+ return e;
1910
+ }
1911
+ o.fromObject = function(t) {
1912
+ var i = t.fieldsArray, n = u.codegen(["d"], t.name + "$fromObject")("if(d instanceof this.ctor)")("return d");
1913
+ if (!i.length) return n("return new this.ctor");
1914
+ n("var m=new this.ctor");
1915
+ for (var c = 0; c < i.length; ++c) {
1916
+ var s = i[c].resolve(), l = u.safeProp(s.name);
1917
+ s.map ? (n("if(d%s){", l)('if(typeof d%s!=="object")', l)("throw TypeError(%j)", s.fullName + ": object expected")("m%s={}", l)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", l), a(
1918
+ n,
1919
+ s,
1886
1920
  /* not sorted */
1887
- l,
1888
- h + "[ks[i]]"
1889
- )("}")("}")) : d.repeated ? (r("if(d%s){", h)("if(!Array.isArray(d%s))", h)("throw TypeError(%j)", d.fullName + ": array expected")("m%s=[]", h)("for(var i=0;i<d%s.length;++i){", h), f(
1890
- r,
1891
- d,
1921
+ c,
1922
+ l + "[ks[i]]"
1923
+ )("}")("}")) : s.repeated ? (n("if(d%s){", l)("if(!Array.isArray(d%s))", l)("throw TypeError(%j)", s.fullName + ": array expected")("m%s=[]", l)("for(var i=0;i<d%s.length;++i){", l), a(
1924
+ n,
1925
+ s,
1892
1926
  /* not sorted */
1893
- l,
1894
- h + "[i]"
1895
- )("}")("}")) : (d.resolvedType instanceof n || r("if(d%s!=null){", h), f(
1896
- r,
1897
- d,
1927
+ c,
1928
+ l + "[i]"
1929
+ )("}")("}")) : (s.resolvedType instanceof d || n("if(d%s!=null){", l), a(
1930
+ n,
1931
+ s,
1898
1932
  /* not sorted */
1899
- l,
1900
- h
1901
- ), d.resolvedType instanceof n || r("}"));
1933
+ c,
1934
+ l
1935
+ ), s.resolvedType instanceof d || n("}"));
1902
1936
  }
1903
- return r("return m");
1937
+ return n("return m");
1904
1938
  };
1905
- function a(t, s, o, r) {
1906
- if (s.resolvedType)
1907
- s.resolvedType instanceof n ? t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s", r, o, r, r, o, r, r) : t("d%s=types[%i].toObject(m%s,o)", r, o, r);
1939
+ function r(e, t, i, n) {
1940
+ if (t.resolvedType)
1941
+ t.resolvedType instanceof d ? e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s", n, i, n, n, i, n, n) : e("d%s=types[%i].toObject(m%s,o)", n, i, n);
1908
1942
  else {
1909
- var l = !1;
1910
- switch (s.type) {
1943
+ var c = !1;
1944
+ switch (t.type) {
1911
1945
  case "double":
1912
1946
  case "float":
1913
- t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", r, r, r, r);
1947
+ e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", n, n, n, n);
1914
1948
  break;
1915
1949
  case "uint64":
1916
- l = !0;
1950
+ c = !0;
1951
+ // eslint-disable-next-line no-fallthrough
1917
1952
  case "int64":
1918
1953
  case "sint64":
1919
1954
  case "fixed64":
1920
1955
  case "sfixed64":
1921
- t('if(typeof m%s==="number")', r)("d%s=o.longs===String?String(m%s):m%s", r, r, r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", r, r, r, r, l ? "true" : "", r);
1956
+ e('if(typeof m%s==="number")', n)("d%s=o.longs===String?String(m%s):m%s", n, n, n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", n, n, n, n, c ? "true" : "", n);
1922
1957
  break;
1923
1958
  case "bytes":
1924
- t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", r, r, r, r, r);
1959
+ e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", n, n, n, n, n);
1925
1960
  break;
1926
1961
  default:
1927
- t("d%s=m%s", r, r);
1962
+ e("d%s=m%s", n, n);
1928
1963
  break;
1929
1964
  }
1930
1965
  }
1931
- return t;
1966
+ return e;
1932
1967
  }
1933
- e.toObject = function(s) {
1934
- var o = s.fieldsArray.slice().sort(u.compareFieldsById);
1935
- if (!o.length)
1968
+ o.toObject = function(t) {
1969
+ var i = t.fieldsArray.slice().sort(u.compareFieldsById);
1970
+ if (!i.length)
1936
1971
  return u.codegen()("return {}");
1937
- for (var r = u.codegen(["m", "o"], s.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], d = [], h = [], c = 0; c < o.length; ++c)
1938
- o[c].partOf || (o[c].resolve().repeated ? l : o[c].map ? d : h).push(o[c]);
1939
- if (l.length) {
1940
- for (r("if(o.arrays||o.defaults){"), c = 0; c < l.length; ++c) r("d%s=[]", u.safeProp(l[c].name));
1941
- r("}");
1972
+ for (var n = u.codegen(["m", "o"], t.name + "$toObject")("if(!o)")("o={}")("var d={}"), c = [], s = [], l = [], h = 0; h < i.length; ++h)
1973
+ i[h].partOf || (i[h].resolve().repeated ? c : i[h].map ? s : l).push(i[h]);
1974
+ if (c.length) {
1975
+ for (n("if(o.arrays||o.defaults){"), h = 0; h < c.length; ++h) n("d%s=[]", u.safeProp(c[h].name));
1976
+ n("}");
1942
1977
  }
1943
- if (d.length) {
1944
- for (r("if(o.objects||o.defaults){"), c = 0; c < d.length; ++c) r("d%s={}", u.safeProp(d[c].name));
1945
- r("}");
1978
+ if (s.length) {
1979
+ for (n("if(o.objects||o.defaults){"), h = 0; h < s.length; ++h) n("d%s={}", u.safeProp(s[h].name));
1980
+ n("}");
1946
1981
  }
1947
- if (h.length) {
1948
- for (r("if(o.defaults){"), c = 0; c < h.length; ++c) {
1949
- var p = h[c], m = u.safeProp(p.name);
1950
- if (p.resolvedType instanceof n) r("d%s=o.enums===String?%j:%j", m, p.resolvedType.valuesById[p.typeDefault], p.typeDefault);
1951
- else if (p.long) r("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", m)("}else")("d%s=o.longs===String?%j:%i", m, p.typeDefault.toString(), p.typeDefault.toNumber());
1982
+ if (l.length) {
1983
+ for (n("if(o.defaults){"), h = 0; h < l.length; ++h) {
1984
+ var p = l[h], m = u.safeProp(p.name);
1985
+ if (p.resolvedType instanceof d) n("d%s=o.enums===String?%j:%j", m, p.resolvedType.valuesById[p.typeDefault], p.typeDefault);
1986
+ else if (p.long) n("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", m)("}else")("d%s=o.longs===String?%j:%i", m, p.typeDefault.toString(), p.typeDefault.toNumber());
1952
1987
  else if (p.bytes) {
1953
- var b = "[" + Array.prototype.slice.call(p.typeDefault).join(",") + "]";
1954
- r("if(o.bytes===String)d%s=%j", m, String.fromCharCode.apply(String, p.typeDefault))("else{")("d%s=%s", m, b)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", m, m)("}");
1955
- } else r("d%s=%j", m, p.typeDefault);
1988
+ var g = "[" + Array.prototype.slice.call(p.typeDefault).join(",") + "]";
1989
+ n("if(o.bytes===String)d%s=%j", m, String.fromCharCode.apply(String, p.typeDefault))("else{")("d%s=%s", m, g)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", m, m)("}");
1990
+ } else n("d%s=%j", m, p.typeDefault);
1956
1991
  }
1957
- r("}");
1992
+ n("}");
1958
1993
  }
1959
1994
  var v = !1;
1960
- for (c = 0; c < o.length; ++c) {
1961
- var p = o[c], y = s._fieldsArray.indexOf(p), m = u.safeProp(p.name);
1962
- p.map ? (v || (v = !0, r("var ks2")), r("if(m%s&&(ks2=Object.keys(m%s)).length){", m, m)("d%s={}", m)("for(var j=0;j<ks2.length;++j){"), a(
1963
- r,
1995
+ for (h = 0; h < i.length; ++h) {
1996
+ var p = i[h], y = t._fieldsArray.indexOf(p), m = u.safeProp(p.name);
1997
+ p.map ? (v || (v = !0, n("var ks2")), n("if(m%s&&(ks2=Object.keys(m%s)).length){", m, m)("d%s={}", m)("for(var j=0;j<ks2.length;++j){"), r(
1998
+ n,
1964
1999
  p,
1965
2000
  /* sorted */
1966
2001
  y,
1967
2002
  m + "[ks2[j]]"
1968
- )("}")) : p.repeated ? (r("if(m%s&&m%s.length){", m, m)("d%s=[]", m)("for(var j=0;j<m%s.length;++j){", m), a(
1969
- r,
2003
+ )("}")) : p.repeated ? (n("if(m%s&&m%s.length){", m, m)("d%s=[]", m)("for(var j=0;j<m%s.length;++j){", m), r(
2004
+ n,
1970
2005
  p,
1971
2006
  /* sorted */
1972
2007
  y,
1973
2008
  m + "[j]"
1974
- )("}")) : (r("if(m%s!=null&&m.hasOwnProperty(%j)){", m, p.name), a(
1975
- r,
2009
+ )("}")) : (n("if(m%s!=null&&m.hasOwnProperty(%j)){", m, p.name), r(
2010
+ n,
1976
2011
  p,
1977
2012
  /* sorted */
1978
2013
  y,
1979
2014
  m
1980
- ), p.partOf && r("if(o.oneofs)")("d%s=%j", u.safeProp(p.partOf.name), p.name)), r("}");
2015
+ ), p.partOf && n("if(o.oneofs)")("d%s=%j", u.safeProp(p.partOf.name), p.name)), n("}");
1981
2016
  }
1982
- return r("return d");
2017
+ return n("return d");
1983
2018
  };
1984
2019
  }(converter)), converter;
1985
2020
  }
1986
- var wrappers = {};
1987
- (function(i) {
1988
- var e = i, n = message;
1989
- e[".google.protobuf.Any"] = {
1990
- fromObject: function(u) {
1991
- if (u && u["@type"]) {
1992
- var f = u["@type"].substring(u["@type"].lastIndexOf("/") + 1), a = this.lookup(f);
1993
- if (a) {
1994
- var t = u["@type"].charAt(0) === "." ? u["@type"].slice(1) : u["@type"];
1995
- return t.indexOf("/") === -1 && (t = "/" + t), this.create({
1996
- type_url: t,
1997
- value: a.encode(a.fromObject(u)).finish()
1998
- });
2021
+ var wrappers = {}, hasRequiredWrappers;
2022
+ function requireWrappers() {
2023
+ return hasRequiredWrappers || (hasRequiredWrappers = 1, function(f) {
2024
+ var o = f, d = requireMessage();
2025
+ o[".google.protobuf.Any"] = {
2026
+ fromObject: function(u) {
2027
+ if (u && u["@type"]) {
2028
+ var a = u["@type"].substring(u["@type"].lastIndexOf("/") + 1), r = this.lookup(a);
2029
+ if (r) {
2030
+ var e = u["@type"].charAt(0) === "." ? u["@type"].slice(1) : u["@type"];
2031
+ return e.indexOf("/") === -1 && (e = "/" + e), this.create({
2032
+ type_url: e,
2033
+ value: r.encode(r.fromObject(u)).finish()
2034
+ });
2035
+ }
1999
2036
  }
2037
+ return this.fromObject(u);
2038
+ },
2039
+ toObject: function(u, a) {
2040
+ var r = "type.googleapis.com/", e = "", t = "";
2041
+ if (a && a.json && u.type_url && u.value) {
2042
+ t = u.type_url.substring(u.type_url.lastIndexOf("/") + 1), e = u.type_url.substring(0, u.type_url.lastIndexOf("/") + 1);
2043
+ var i = this.lookup(t);
2044
+ i && (u = i.decode(u.value));
2045
+ }
2046
+ if (!(u instanceof this.ctor) && u instanceof d) {
2047
+ var n = u.$type.toObject(u, a), c = u.$type.fullName[0] === "." ? u.$type.fullName.slice(1) : u.$type.fullName;
2048
+ return e === "" && (e = r), t = e + c, n["@type"] = t, n;
2049
+ }
2050
+ return this.toObject(u, a);
2000
2051
  }
2001
- return this.fromObject(u);
2002
- },
2003
- toObject: function(u, f) {
2004
- var a = "type.googleapis.com/", t = "", s = "";
2005
- if (f && f.json && u.type_url && u.value) {
2006
- s = u.type_url.substring(u.type_url.lastIndexOf("/") + 1), t = u.type_url.substring(0, u.type_url.lastIndexOf("/") + 1);
2007
- var o = this.lookup(s);
2008
- o && (u = o.decode(u.value));
2009
- }
2010
- if (!(u instanceof this.ctor) && u instanceof n) {
2011
- var r = u.$type.toObject(u, f), l = u.$type.fullName[0] === "." ? u.$type.fullName.slice(1) : u.$type.fullName;
2012
- return t === "" && (t = a), s = t + l, r["@type"] = s, r;
2013
- }
2014
- return this.toObject(u, f);
2015
- }
2016
- };
2017
- })(wrappers);
2052
+ };
2053
+ }(wrappers)), wrappers;
2054
+ }
2018
2055
  var type, hasRequiredType;
2019
2056
  function requireType() {
2020
2057
  if (hasRequiredType) return type;
2021
2058
  hasRequiredType = 1, type = m;
2022
- var i = requireNamespace();
2023
- ((m.prototype = Object.create(i.prototype)).constructor = m).className = "Type";
2024
- var e = require_enum(), n = requireOneof(), u = requireField(), f = requireMapfield(), a = requireService(), t = message, s = reader, o = writer, r = requireUtil(), l = requireEncoder(), d = requireDecoder(), h = requireVerifier(), c = requireConverter(), p = wrappers;
2059
+ var f = requireNamespace();
2060
+ ((m.prototype = Object.create(f.prototype)).constructor = m).className = "Type";
2061
+ var o = require_enum(), d = requireOneof(), u = requireField(), a = requireMapfield(), r = requireService(), e = requireMessage(), t = requireReader(), i = requireWriter(), n = requireUtil(), c = requireEncoder(), s = requireDecoder(), l = requireVerifier(), h = requireConverter(), p = requireWrappers();
2025
2062
  function m(v, y) {
2026
- i.call(this, v, y), 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;
2063
+ f.call(this, v, y), 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;
2027
2064
  }
2028
2065
  Object.defineProperties(m.prototype, {
2029
2066
  /**
@@ -2038,10 +2075,10 @@ function requireType() {
2038
2075
  return this._fieldsById;
2039
2076
  this._fieldsById = {};
2040
2077
  for (var v = Object.keys(this.fields), y = 0; y < v.length; ++y) {
2041
- var g = this.fields[v[y]], _ = g.id;
2042
- if (this._fieldsById[_])
2043
- throw Error("duplicate id " + _ + " in " + this);
2044
- this._fieldsById[_] = g;
2078
+ var _ = this.fields[v[y]], b = _.id;
2079
+ if (this._fieldsById[b])
2080
+ throw Error("duplicate id " + b + " in " + this);
2081
+ this._fieldsById[b] = _;
2045
2082
  }
2046
2083
  return this._fieldsById;
2047
2084
  }
@@ -2054,7 +2091,7 @@ function requireType() {
2054
2091
  */
2055
2092
  fieldsArray: {
2056
2093
  get: function() {
2057
- return this._fieldsArray || (this._fieldsArray = r.toArray(this.fields));
2094
+ return this._fieldsArray || (this._fieldsArray = n.toArray(this.fields));
2058
2095
  }
2059
2096
  },
2060
2097
  /**
@@ -2065,7 +2102,7 @@ function requireType() {
2065
2102
  */
2066
2103
  oneofsArray: {
2067
2104
  get: function() {
2068
- return this._oneofsArray || (this._oneofsArray = r.toArray(this.oneofs));
2105
+ return this._oneofsArray || (this._oneofsArray = n.toArray(this.oneofs));
2069
2106
  }
2070
2107
  },
2071
2108
  /**
@@ -2080,57 +2117,57 @@ function requireType() {
2080
2117
  },
2081
2118
  set: function(v) {
2082
2119
  var y = v.prototype;
2083
- y instanceof t || ((v.prototype = new t()).constructor = v, r.merge(v.prototype, y)), v.$type = v.prototype.$type = this, r.merge(v, t, !0), this._ctor = v;
2084
- for (var g = 0; g < /* initializes */
2085
- this.fieldsArray.length; ++g)
2086
- this._fieldsArray[g].resolve();
2087
- var _ = {};
2088
- for (g = 0; g < /* initializes */
2089
- this.oneofsArray.length; ++g)
2090
- _[this._oneofsArray[g].resolve().name] = {
2091
- get: r.oneOfGetter(this._oneofsArray[g].oneof),
2092
- set: r.oneOfSetter(this._oneofsArray[g].oneof)
2120
+ y instanceof e || ((v.prototype = new e()).constructor = v, n.merge(v.prototype, y)), v.$type = v.prototype.$type = this, n.merge(v, e, !0), this._ctor = v;
2121
+ for (var _ = 0; _ < /* initializes */
2122
+ this.fieldsArray.length; ++_)
2123
+ this._fieldsArray[_].resolve();
2124
+ var b = {};
2125
+ for (_ = 0; _ < /* initializes */
2126
+ this.oneofsArray.length; ++_)
2127
+ b[this._oneofsArray[_].resolve().name] = {
2128
+ get: n.oneOfGetter(this._oneofsArray[_].oneof),
2129
+ set: n.oneOfSetter(this._oneofsArray[_].oneof)
2093
2130
  };
2094
- g && Object.defineProperties(v.prototype, _);
2131
+ _ && Object.defineProperties(v.prototype, b);
2095
2132
  }
2096
2133
  }
2097
2134
  }), m.generateConstructor = function(y) {
2098
- for (var g = r.codegen(["p"], y.name), _ = 0, R; _ < y.fieldsArray.length; ++_)
2099
- (R = y._fieldsArray[_]).map ? g("this%s={}", r.safeProp(R.name)) : R.repeated && g("this%s=[]", r.safeProp(R.name));
2100
- return g("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]");
2135
+ for (var _ = n.codegen(["p"], y.name), b = 0, O; b < y.fieldsArray.length; ++b)
2136
+ (O = y._fieldsArray[b]).map ? _("this%s={}", n.safeProp(O.name)) : O.repeated && _("this%s=[]", n.safeProp(O.name));
2137
+ return _("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]");
2101
2138
  };
2102
- function b(v) {
2139
+ function g(v) {
2103
2140
  return v._fieldsById = v._fieldsArray = v._oneofsArray = null, delete v.encode, delete v.decode, delete v.verify, v;
2104
2141
  }
2105
- return m.fromJSON = function(y, g) {
2106
- var _ = new m(y, g.options);
2107
- _.extensions = g.extensions, _.reserved = g.reserved;
2108
- for (var R = Object.keys(g.fields), O = 0; O < R.length; ++O)
2109
- _.add(
2110
- (typeof g.fields[R[O]].keyType < "u" ? f.fromJSON : u.fromJSON)(R[O], g.fields[R[O]])
2142
+ return m.fromJSON = function(y, _) {
2143
+ var b = new m(y, _.options);
2144
+ b.extensions = _.extensions, b.reserved = _.reserved;
2145
+ for (var O = Object.keys(_.fields), q = 0; q < O.length; ++q)
2146
+ b.add(
2147
+ (typeof _.fields[O[q]].keyType < "u" ? a.fromJSON : u.fromJSON)(O[q], _.fields[O[q]])
2111
2148
  );
2112
- if (g.oneofs)
2113
- for (R = Object.keys(g.oneofs), O = 0; O < R.length; ++O)
2114
- _.add(n.fromJSON(R[O], g.oneofs[R[O]]));
2115
- if (g.nested)
2116
- for (R = Object.keys(g.nested), O = 0; O < R.length; ++O) {
2117
- var T = g.nested[R[O]];
2118
- _.add(
2149
+ if (_.oneofs)
2150
+ for (O = Object.keys(_.oneofs), q = 0; q < O.length; ++q)
2151
+ b.add(d.fromJSON(O[q], _.oneofs[O[q]]));
2152
+ if (_.nested)
2153
+ for (O = Object.keys(_.nested), q = 0; q < O.length; ++q) {
2154
+ var N = _.nested[O[q]];
2155
+ b.add(
2119
2156
  // most to least likely
2120
- (T.id !== void 0 ? u.fromJSON : T.fields !== void 0 ? m.fromJSON : T.values !== void 0 ? e.fromJSON : T.methods !== void 0 ? a.fromJSON : i.fromJSON)(R[O], T)
2157
+ (N.id !== void 0 ? u.fromJSON : N.fields !== void 0 ? m.fromJSON : N.values !== void 0 ? o.fromJSON : N.methods !== void 0 ? r.fromJSON : f.fromJSON)(O[q], N)
2121
2158
  );
2122
2159
  }
2123
- return g.extensions && g.extensions.length && (_.extensions = g.extensions), g.reserved && g.reserved.length && (_.reserved = g.reserved), g.group && (_.group = !0), g.comment && (_.comment = g.comment), _;
2160
+ return _.extensions && _.extensions.length && (b.extensions = _.extensions), _.reserved && _.reserved.length && (b.reserved = _.reserved), _.group && (b.group = !0), _.comment && (b.comment = _.comment), b;
2124
2161
  }, m.prototype.toJSON = function(y) {
2125
- var g = i.prototype.toJSON.call(this, y), _ = y ? !!y.keepComments : !1;
2126
- return r.toObject([
2162
+ var _ = f.prototype.toJSON.call(this, y), b = y ? !!y.keepComments : !1;
2163
+ return n.toObject([
2127
2164
  "options",
2128
- g && g.options || void 0,
2165
+ _ && _.options || void 0,
2129
2166
  "oneofs",
2130
- i.arrayToJSON(this.oneofsArray, y),
2167
+ f.arrayToJSON(this.oneofsArray, y),
2131
2168
  "fields",
2132
- i.arrayToJSON(this.fieldsArray.filter(function(R) {
2133
- return !R.declaringField;
2169
+ f.arrayToJSON(this.fieldsArray.filter(function(O) {
2170
+ return !O.declaringField;
2134
2171
  }), y) || {},
2135
2172
  "extensions",
2136
2173
  this.extensions && this.extensions.length ? this.extensions : void 0,
@@ -2139,17 +2176,17 @@ function requireType() {
2139
2176
  "group",
2140
2177
  this.group || void 0,
2141
2178
  "nested",
2142
- g && g.nested || void 0,
2179
+ _ && _.nested || void 0,
2143
2180
  "comment",
2144
- _ ? this.comment : void 0
2181
+ b ? this.comment : void 0
2145
2182
  ]);
2146
2183
  }, m.prototype.resolveAll = function() {
2147
- for (var y = this.fieldsArray, g = 0; g < y.length; )
2148
- y[g++].resolve();
2149
- var _ = this.oneofsArray;
2150
- for (g = 0; g < _.length; )
2151
- _[g++].resolve();
2152
- return i.prototype.resolveAll.call(this);
2184
+ for (var y = this.fieldsArray, _ = 0; _ < y.length; )
2185
+ y[_++].resolve();
2186
+ var b = this.oneofsArray;
2187
+ for (_ = 0; _ < b.length; )
2188
+ b[_++].resolve();
2189
+ return f.prototype.resolveAll.call(this);
2153
2190
  }, m.prototype.get = function(y) {
2154
2191
  return this.fields[y] || this.oneofs && this.oneofs[y] || this.nested && this.nested[y] || null;
2155
2192
  }, m.prototype.add = function(y) {
@@ -2165,315 +2202,315 @@ function requireType() {
2165
2202
  throw Error("id " + y.id + " is reserved in " + this);
2166
2203
  if (this.isReservedName(y.name))
2167
2204
  throw Error("name '" + y.name + "' is reserved in " + this);
2168
- return y.parent && y.parent.remove(y), this.fields[y.name] = y, y.message = this, y.onAdd(this), b(this);
2205
+ return y.parent && y.parent.remove(y), this.fields[y.name] = y, y.message = this, y.onAdd(this), g(this);
2169
2206
  }
2170
- return y instanceof n ? (this.oneofs || (this.oneofs = {}), this.oneofs[y.name] = y, y.onAdd(this), b(this)) : i.prototype.add.call(this, y);
2207
+ return y instanceof d ? (this.oneofs || (this.oneofs = {}), this.oneofs[y.name] = y, y.onAdd(this), g(this)) : f.prototype.add.call(this, y);
2171
2208
  }, m.prototype.remove = function(y) {
2172
2209
  if (y instanceof u && y.extend === void 0) {
2173
2210
  if (!this.fields || this.fields[y.name] !== y)
2174
2211
  throw Error(y + " is not a member of " + this);
2175
- return delete this.fields[y.name], y.parent = null, y.onRemove(this), b(this);
2212
+ return delete this.fields[y.name], y.parent = null, y.onRemove(this), g(this);
2176
2213
  }
2177
- if (y instanceof n) {
2214
+ if (y instanceof d) {
2178
2215
  if (!this.oneofs || this.oneofs[y.name] !== y)
2179
2216
  throw Error(y + " is not a member of " + this);
2180
- return delete this.oneofs[y.name], y.parent = null, y.onRemove(this), b(this);
2217
+ return delete this.oneofs[y.name], y.parent = null, y.onRemove(this), g(this);
2181
2218
  }
2182
- return i.prototype.remove.call(this, y);
2219
+ return f.prototype.remove.call(this, y);
2183
2220
  }, m.prototype.isReservedId = function(y) {
2184
- return i.isReservedId(this.reserved, y);
2221
+ return f.isReservedId(this.reserved, y);
2185
2222
  }, m.prototype.isReservedName = function(y) {
2186
- return i.isReservedName(this.reserved, y);
2223
+ return f.isReservedName(this.reserved, y);
2187
2224
  }, m.prototype.create = function(y) {
2188
2225
  return new this.ctor(y);
2189
2226
  }, m.prototype.setup = function() {
2190
- for (var y = this.fullName, g = [], _ = 0; _ < /* initializes */
2191
- this.fieldsArray.length; ++_)
2192
- g.push(this._fieldsArray[_].resolve().resolvedType);
2193
- this.encode = l(this)({
2194
- Writer: o,
2195
- types: g,
2196
- util: r
2197
- }), this.decode = d(this)({
2198
- Reader: s,
2199
- types: g,
2200
- util: r
2201
- }), this.verify = h(this)({
2202
- types: g,
2203
- util: r
2204
- }), this.fromObject = c.fromObject(this)({
2205
- types: g,
2206
- util: r
2207
- }), this.toObject = c.toObject(this)({
2208
- types: g,
2209
- util: r
2227
+ for (var y = this.fullName, _ = [], b = 0; b < /* initializes */
2228
+ this.fieldsArray.length; ++b)
2229
+ _.push(this._fieldsArray[b].resolve().resolvedType);
2230
+ this.encode = c(this)({
2231
+ Writer: i,
2232
+ types: _,
2233
+ util: n
2234
+ }), this.decode = s(this)({
2235
+ Reader: t,
2236
+ types: _,
2237
+ util: n
2238
+ }), this.verify = l(this)({
2239
+ types: _,
2240
+ util: n
2241
+ }), this.fromObject = h.fromObject(this)({
2242
+ types: _,
2243
+ util: n
2244
+ }), this.toObject = h.toObject(this)({
2245
+ types: _,
2246
+ util: n
2210
2247
  });
2211
- var R = p[y];
2212
- if (R) {
2213
- var O = Object.create(this);
2214
- O.fromObject = this.fromObject, this.fromObject = R.fromObject.bind(O), O.toObject = this.toObject, this.toObject = R.toObject.bind(O);
2248
+ var O = p[y];
2249
+ if (O) {
2250
+ var q = Object.create(this);
2251
+ q.fromObject = this.fromObject, this.fromObject = O.fromObject.bind(q), q.toObject = this.toObject, this.toObject = O.toObject.bind(q);
2215
2252
  }
2216
2253
  return this;
2217
- }, m.prototype.encode = function(y, g) {
2218
- return this.setup().encode(y, g);
2219
- }, m.prototype.encodeDelimited = function(y, g) {
2220
- return this.encode(y, g && g.len ? g.fork() : g).ldelim();
2221
- }, m.prototype.decode = function(y, g) {
2222
- return this.setup().decode(y, g);
2254
+ }, m.prototype.encode = function(y, _) {
2255
+ return this.setup().encode(y, _);
2256
+ }, m.prototype.encodeDelimited = function(y, _) {
2257
+ return this.encode(y, _ && _.len ? _.fork() : _).ldelim();
2258
+ }, m.prototype.decode = function(y, _) {
2259
+ return this.setup().decode(y, _);
2223
2260
  }, m.prototype.decodeDelimited = function(y) {
2224
- return y instanceof s || (y = s.create(y)), this.decode(y, y.uint32());
2261
+ return y instanceof t || (y = t.create(y)), this.decode(y, y.uint32());
2225
2262
  }, m.prototype.verify = function(y) {
2226
2263
  return this.setup().verify(y);
2227
2264
  }, m.prototype.fromObject = function(y) {
2228
2265
  return this.setup().fromObject(y);
2229
- }, m.prototype.toObject = function(y, g) {
2230
- return this.setup().toObject(y, g);
2266
+ }, m.prototype.toObject = function(y, _) {
2267
+ return this.setup().toObject(y, _);
2231
2268
  }, m.d = function(y) {
2232
- return function(_) {
2233
- r.decorateType(_, y);
2269
+ return function(b) {
2270
+ n.decorateType(b, y);
2234
2271
  };
2235
2272
  }, type;
2236
2273
  }
2237
2274
  var root, hasRequiredRoot;
2238
2275
  function requireRoot() {
2239
2276
  if (hasRequiredRoot) return root;
2240
- hasRequiredRoot = 1, root = o;
2241
- var i = requireNamespace();
2242
- ((o.prototype = Object.create(i.prototype)).constructor = o).className = "Root";
2243
- var e = requireField(), n = require_enum(), u = requireOneof(), f = requireUtil(), a, t, s;
2244
- function o(h) {
2245
- i.call(this, "", h), this.deferred = [], this.files = [];
2246
- }
2247
- o.fromJSON = function(c, p) {
2248
- return p || (p = new o()), c.options && p.setOptions(c.options), p.addJSON(c.nested);
2249
- }, o.prototype.resolvePath = f.path.resolve, o.prototype.fetch = f.fetch;
2250
- function r() {
2251
- }
2252
- o.prototype.load = function h(c, p, m) {
2277
+ hasRequiredRoot = 1, root = i;
2278
+ var f = requireNamespace();
2279
+ ((i.prototype = Object.create(f.prototype)).constructor = i).className = "Root";
2280
+ var o = requireField(), d = require_enum(), u = requireOneof(), a = requireUtil(), r, e, t;
2281
+ function i(l) {
2282
+ f.call(this, "", l), this.deferred = [], this.files = [];
2283
+ }
2284
+ i.fromJSON = function(h, p) {
2285
+ return p || (p = new i()), h.options && p.setOptions(h.options), p.addJSON(h.nested);
2286
+ }, i.prototype.resolvePath = a.path.resolve, i.prototype.fetch = a.fetch;
2287
+ function n() {
2288
+ }
2289
+ i.prototype.load = function l(h, p, m) {
2253
2290
  typeof p == "function" && (m = p, p = void 0);
2254
- var b = this;
2291
+ var g = this;
2255
2292
  if (!m)
2256
- return f.asPromise(h, b, c, p);
2257
- var v = m === r;
2258
- function y(q, A) {
2293
+ return a.asPromise(l, g, h, p);
2294
+ var v = m === n;
2295
+ function y(R, x) {
2259
2296
  if (m) {
2260
2297
  if (v)
2261
- throw q;
2262
- var x = m;
2263
- m = null, x(q, A);
2298
+ throw R;
2299
+ var T = m;
2300
+ m = null, T(R, x);
2264
2301
  }
2265
2302
  }
2266
- function g(q) {
2267
- var A = q.lastIndexOf("google/protobuf/");
2268
- if (A > -1) {
2269
- var x = q.substring(A);
2270
- if (x in s) return x;
2303
+ function _(R) {
2304
+ var x = R.lastIndexOf("google/protobuf/");
2305
+ if (x > -1) {
2306
+ var T = R.substring(x);
2307
+ if (T in t) return T;
2271
2308
  }
2272
2309
  return null;
2273
2310
  }
2274
- function _(q, A) {
2311
+ function b(R, x) {
2275
2312
  try {
2276
- if (f.isString(A) && A.charAt(0) === "{" && (A = JSON.parse(A)), !f.isString(A))
2277
- b.setOptions(A.options).addJSON(A.nested);
2313
+ if (a.isString(x) && x.charAt(0) === "{" && (x = JSON.parse(x)), !a.isString(x))
2314
+ g.setOptions(x.options).addJSON(x.nested);
2278
2315
  else {
2279
- t.filename = q;
2280
- var x = t(A, b, p), B, E = 0;
2281
- if (x.imports)
2282
- for (; E < x.imports.length; ++E)
2283
- (B = g(x.imports[E]) || b.resolvePath(q, x.imports[E])) && R(B);
2284
- if (x.weakImports)
2285
- for (E = 0; E < x.weakImports.length; ++E)
2286
- (B = g(x.weakImports[E]) || b.resolvePath(q, x.weakImports[E])) && R(B, !0);
2316
+ e.filename = R;
2317
+ var T = e(x, g, p), F, E = 0;
2318
+ if (T.imports)
2319
+ for (; E < T.imports.length; ++E)
2320
+ (F = _(T.imports[E]) || g.resolvePath(R, T.imports[E])) && O(F);
2321
+ if (T.weakImports)
2322
+ for (E = 0; E < T.weakImports.length; ++E)
2323
+ (F = _(T.weakImports[E]) || g.resolvePath(R, T.weakImports[E])) && O(F, !0);
2287
2324
  }
2288
- } catch (V) {
2289
- y(V);
2325
+ } catch (W) {
2326
+ y(W);
2290
2327
  }
2291
- !v && !O && y(null, b);
2328
+ !v && !q && y(null, g);
2292
2329
  }
2293
- function R(q, A) {
2294
- if (q = g(q) || q, !(b.files.indexOf(q) > -1)) {
2295
- if (b.files.push(q), q in s) {
2296
- v ? _(q, s[q]) : (++O, setTimeout(function() {
2297
- --O, _(q, s[q]);
2330
+ function O(R, x) {
2331
+ if (R = _(R) || R, !(g.files.indexOf(R) > -1)) {
2332
+ if (g.files.push(R), R in t) {
2333
+ v ? b(R, t[R]) : (++q, setTimeout(function() {
2334
+ --q, b(R, t[R]);
2298
2335
  }));
2299
2336
  return;
2300
2337
  }
2301
2338
  if (v) {
2302
- var x;
2339
+ var T;
2303
2340
  try {
2304
- x = f.fs.readFileSync(q).toString("utf8");
2305
- } catch (B) {
2306
- A || y(B);
2341
+ T = a.fs.readFileSync(R).toString("utf8");
2342
+ } catch (F) {
2343
+ x || y(F);
2307
2344
  return;
2308
2345
  }
2309
- _(q, x);
2346
+ b(R, T);
2310
2347
  } else
2311
- ++O, b.fetch(q, function(B, E) {
2312
- if (--O, !!m) {
2313
- if (B) {
2314
- A ? O || y(null, b) : y(B);
2348
+ ++q, g.fetch(R, function(F, E) {
2349
+ if (--q, !!m) {
2350
+ if (F) {
2351
+ x ? q || y(null, g) : y(F);
2315
2352
  return;
2316
2353
  }
2317
- _(q, E);
2354
+ b(R, E);
2318
2355
  }
2319
2356
  });
2320
2357
  }
2321
2358
  }
2322
- var O = 0;
2323
- f.isString(c) && (c = [c]);
2324
- for (var T = 0, J; T < c.length; ++T)
2325
- (J = b.resolvePath("", c[T])) && R(J);
2359
+ var q = 0;
2360
+ a.isString(h) && (h = [h]);
2361
+ for (var N = 0, $; N < h.length; ++N)
2362
+ ($ = g.resolvePath("", h[N])) && O($);
2326
2363
  if (v)
2327
- return b;
2328
- O || y(null, b);
2329
- }, o.prototype.loadSync = function(c, p) {
2330
- if (!f.isNode)
2364
+ return g;
2365
+ q || y(null, g);
2366
+ }, i.prototype.loadSync = function(h, p) {
2367
+ if (!a.isNode)
2331
2368
  throw Error("not supported");
2332
- return this.load(c, p, r);
2333
- }, o.prototype.resolveAll = function() {
2369
+ return this.load(h, p, n);
2370
+ }, i.prototype.resolveAll = function() {
2334
2371
  if (this.deferred.length)
2335
- throw Error("unresolvable extensions: " + this.deferred.map(function(c) {
2336
- return "'extend " + c.extend + "' in " + c.parent.fullName;
2372
+ throw Error("unresolvable extensions: " + this.deferred.map(function(h) {
2373
+ return "'extend " + h.extend + "' in " + h.parent.fullName;
2337
2374
  }).join(", "));
2338
- return i.prototype.resolveAll.call(this);
2375
+ return f.prototype.resolveAll.call(this);
2339
2376
  };
2340
- var l = /^[A-Z]/;
2341
- function d(h, c) {
2342
- var p = c.parent.lookup(c.extend);
2377
+ var c = /^[A-Z]/;
2378
+ function s(l, h) {
2379
+ var p = h.parent.lookup(h.extend);
2343
2380
  if (p) {
2344
- var m = new e(c.fullName, c.id, c.type, c.rule, void 0, c.options);
2345
- return p.get(m.name) || (m.declaringField = c, c.extensionField = m, p.add(m)), !0;
2381
+ var m = new o(h.fullName, h.id, h.type, h.rule, void 0, h.options);
2382
+ return p.get(m.name) || (m.declaringField = h, h.extensionField = m, p.add(m)), !0;
2346
2383
  }
2347
2384
  return !1;
2348
2385
  }
2349
- return o.prototype._handleAdd = function(c) {
2350
- if (c instanceof e)
2386
+ return i.prototype._handleAdd = function(h) {
2387
+ if (h instanceof o)
2351
2388
  /* an extension field (implies not part of a oneof) */
2352
- c.extend !== void 0 && /* not already handled */
2353
- !c.extensionField && (d(this, c) || this.deferred.push(c));
2354
- else if (c instanceof n)
2355
- l.test(c.name) && (c.parent[c.name] = c.values);
2356
- else if (!(c instanceof u)) {
2357
- if (c instanceof a)
2389
+ h.extend !== void 0 && /* not already handled */
2390
+ !h.extensionField && (s(this, h) || this.deferred.push(h));
2391
+ else if (h instanceof d)
2392
+ c.test(h.name) && (h.parent[h.name] = h.values);
2393
+ else if (!(h instanceof u)) {
2394
+ if (h instanceof r)
2358
2395
  for (var p = 0; p < this.deferred.length; )
2359
- d(this, this.deferred[p]) ? this.deferred.splice(p, 1) : ++p;
2396
+ s(this, this.deferred[p]) ? this.deferred.splice(p, 1) : ++p;
2360
2397
  for (var m = 0; m < /* initializes */
2361
- c.nestedArray.length; ++m)
2362
- this._handleAdd(c._nestedArray[m]);
2363
- l.test(c.name) && (c.parent[c.name] = c);
2398
+ h.nestedArray.length; ++m)
2399
+ this._handleAdd(h._nestedArray[m]);
2400
+ c.test(h.name) && (h.parent[h.name] = h);
2364
2401
  }
2365
- }, o.prototype._handleRemove = function(c) {
2366
- if (c instanceof e) {
2402
+ }, i.prototype._handleRemove = function(h) {
2403
+ if (h instanceof o) {
2367
2404
  if (
2368
2405
  /* an extension field */
2369
- c.extend !== void 0
2406
+ h.extend !== void 0
2370
2407
  )
2371
2408
  if (
2372
2409
  /* already handled */
2373
- c.extensionField
2410
+ h.extensionField
2374
2411
  )
2375
- c.extensionField.parent.remove(c.extensionField), c.extensionField = null;
2412
+ h.extensionField.parent.remove(h.extensionField), h.extensionField = null;
2376
2413
  else {
2377
- var p = this.deferred.indexOf(c);
2414
+ var p = this.deferred.indexOf(h);
2378
2415
  p > -1 && this.deferred.splice(p, 1);
2379
2416
  }
2380
- } else if (c instanceof n)
2381
- l.test(c.name) && delete c.parent[c.name];
2382
- else if (c instanceof i) {
2417
+ } else if (h instanceof d)
2418
+ c.test(h.name) && delete h.parent[h.name];
2419
+ else if (h instanceof f) {
2383
2420
  for (var m = 0; m < /* initializes */
2384
- c.nestedArray.length; ++m)
2385
- this._handleRemove(c._nestedArray[m]);
2386
- l.test(c.name) && delete c.parent[c.name];
2421
+ h.nestedArray.length; ++m)
2422
+ this._handleRemove(h._nestedArray[m]);
2423
+ c.test(h.name) && delete h.parent[h.name];
2387
2424
  }
2388
- }, o._configure = function(h, c, p) {
2389
- a = h, t = c, s = p;
2425
+ }, i._configure = function(l, h, p) {
2426
+ r = l, e = h, t = p;
2390
2427
  }, root;
2391
2428
  }
2392
2429
  var hasRequiredUtil;
2393
2430
  function requireUtil() {
2394
- if (hasRequiredUtil) return util$1.exports;
2431
+ if (hasRequiredUtil) return util.exports;
2395
2432
  hasRequiredUtil = 1;
2396
- var i = util$1.exports = requireMinimal(), e = roots, n, u;
2397
- i.codegen = codegen_1, i.fetch = fetch_1, i.path = path, i.fs = i.inquire("fs"), i.toArray = function(r) {
2398
- if (r) {
2399
- for (var l = Object.keys(r), d = new Array(l.length), h = 0; h < l.length; )
2400
- d[h] = r[l[h++]];
2401
- return d;
2433
+ var f = util.exports = requireMinimal(), o = requireRoots(), d, u;
2434
+ f.codegen = requireCodegen(), f.fetch = requireFetch(), f.path = requirePath(), f.fs = f.inquire("fs"), f.toArray = function(n) {
2435
+ if (n) {
2436
+ for (var c = Object.keys(n), s = new Array(c.length), l = 0; l < c.length; )
2437
+ s[l] = n[c[l++]];
2438
+ return s;
2402
2439
  }
2403
2440
  return [];
2404
- }, i.toObject = function(r) {
2405
- for (var l = {}, d = 0; d < r.length; ) {
2406
- var h = r[d++], c = r[d++];
2407
- c !== void 0 && (l[h] = c);
2441
+ }, f.toObject = function(n) {
2442
+ for (var c = {}, s = 0; s < n.length; ) {
2443
+ var l = n[s++], h = n[s++];
2444
+ h !== void 0 && (c[l] = h);
2408
2445
  }
2409
- return l;
2446
+ return c;
2410
2447
  };
2411
- var f = /\\/g, a = /"/g;
2412
- i.isReserved = function(r) {
2413
- 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(r);
2414
- }, i.safeProp = function(r) {
2415
- return !/^[$\w_]+$/.test(r) || i.isReserved(r) ? '["' + r.replace(f, "\\\\").replace(a, '\\"') + '"]' : "." + r;
2416
- }, i.ucFirst = function(r) {
2417
- return r.charAt(0).toUpperCase() + r.substring(1);
2448
+ var a = /\\/g, r = /"/g;
2449
+ f.isReserved = function(n) {
2450
+ 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(n);
2451
+ }, f.safeProp = function(n) {
2452
+ return !/^[$\w_]+$/.test(n) || f.isReserved(n) ? '["' + n.replace(a, "\\\\").replace(r, '\\"') + '"]' : "." + n;
2453
+ }, f.ucFirst = function(n) {
2454
+ return n.charAt(0).toUpperCase() + n.substring(1);
2418
2455
  };
2419
- var t = /_([a-z])/g;
2420
- i.camelCase = function(r) {
2421
- return r.substring(0, 1) + r.substring(1).replace(t, function(l, d) {
2422
- return d.toUpperCase();
2456
+ var e = /_([a-z])/g;
2457
+ f.camelCase = function(n) {
2458
+ return n.substring(0, 1) + n.substring(1).replace(e, function(c, s) {
2459
+ return s.toUpperCase();
2423
2460
  });
2424
- }, i.compareFieldsById = function(r, l) {
2425
- return r.id - l.id;
2426
- }, i.decorateType = function(r, l) {
2427
- if (r.$type)
2428
- return l && r.$type.name !== l && (i.decorateRoot.remove(r.$type), r.$type.name = l, i.decorateRoot.add(r.$type)), r.$type;
2429
- n || (n = requireType());
2430
- var d = new n(l || r.name);
2431
- return i.decorateRoot.add(d), d.ctor = r, Object.defineProperty(r, "$type", { value: d, enumerable: !1 }), Object.defineProperty(r.prototype, "$type", { value: d, enumerable: !1 }), d;
2461
+ }, f.compareFieldsById = function(n, c) {
2462
+ return n.id - c.id;
2463
+ }, f.decorateType = function(n, c) {
2464
+ if (n.$type)
2465
+ return c && n.$type.name !== c && (f.decorateRoot.remove(n.$type), n.$type.name = c, f.decorateRoot.add(n.$type)), n.$type;
2466
+ d || (d = requireType());
2467
+ var s = new d(c || n.name);
2468
+ return f.decorateRoot.add(s), s.ctor = n, Object.defineProperty(n, "$type", { value: s, enumerable: !1 }), Object.defineProperty(n.prototype, "$type", { value: s, enumerable: !1 }), s;
2432
2469
  };
2433
- var s = 0;
2434
- return i.decorateEnum = function(r) {
2435
- if (r.$type)
2436
- return r.$type;
2470
+ var t = 0;
2471
+ return f.decorateEnum = function(n) {
2472
+ if (n.$type)
2473
+ return n.$type;
2437
2474
  u || (u = require_enum());
2438
- var l = new u("Enum" + s++, r);
2439
- return i.decorateRoot.add(l), Object.defineProperty(r, "$type", { value: l, enumerable: !1 }), l;
2440
- }, i.setProperty = function(r, l, d) {
2441
- function h(c, p, m) {
2442
- var b = p.shift();
2443
- if (b === "__proto__" || b === "prototype")
2444
- return c;
2475
+ var c = new u("Enum" + t++, n);
2476
+ return f.decorateRoot.add(c), Object.defineProperty(n, "$type", { value: c, enumerable: !1 }), c;
2477
+ }, f.setProperty = function(n, c, s) {
2478
+ function l(h, p, m) {
2479
+ var g = p.shift();
2480
+ if (g === "__proto__" || g === "prototype")
2481
+ return h;
2445
2482
  if (p.length > 0)
2446
- c[b] = h(c[b] || {}, p, m);
2483
+ h[g] = l(h[g] || {}, p, m);
2447
2484
  else {
2448
- var v = c[b];
2449
- v && (m = [].concat(v).concat(m)), c[b] = m;
2485
+ var v = h[g];
2486
+ v && (m = [].concat(v).concat(m)), h[g] = m;
2450
2487
  }
2451
- return c;
2488
+ return h;
2452
2489
  }
2453
- if (typeof r != "object")
2490
+ if (typeof n != "object")
2454
2491
  throw TypeError("dst must be an object");
2455
- if (!l)
2492
+ if (!c)
2456
2493
  throw TypeError("path must be specified");
2457
- return l = l.split("."), h(r, l, d);
2458
- }, Object.defineProperty(i, "decorateRoot", {
2494
+ return c = c.split("."), l(n, c, s);
2495
+ }, Object.defineProperty(f, "decorateRoot", {
2459
2496
  get: function() {
2460
- return e.decorated || (e.decorated = new (requireRoot())());
2497
+ return o.decorated || (o.decorated = new (requireRoot())());
2461
2498
  }
2462
- }), util$1.exports;
2499
+ }), util.exports;
2463
2500
  }
2464
2501
  var object, hasRequiredObject;
2465
2502
  function requireObject() {
2466
2503
  if (hasRequiredObject) return object;
2467
- hasRequiredObject = 1, object = n, n.className = "ReflectionObject";
2468
- var i = requireUtil(), e;
2469
- function n(u, f) {
2470
- if (!i.isString(u))
2504
+ hasRequiredObject = 1, object = d, d.className = "ReflectionObject";
2505
+ var f = requireUtil(), o;
2506
+ function d(u, a) {
2507
+ if (!f.isString(u))
2471
2508
  throw TypeError("name must be a string");
2472
- if (f && !i.isObject(f))
2509
+ if (a && !f.isObject(a))
2473
2510
  throw TypeError("options must be an object");
2474
- this.options = f, this.parsedOptions = null, this.name = u, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
2511
+ this.options = a, this.parsedOptions = null, this.name = u, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
2475
2512
  }
2476
- return Object.defineProperties(n.prototype, {
2513
+ return Object.defineProperties(d.prototype, {
2477
2514
  /**
2478
2515
  * Reference to the root namespace.
2479
2516
  * @name ReflectionObject#root
@@ -2495,77 +2532,77 @@ function requireObject() {
2495
2532
  */
2496
2533
  fullName: {
2497
2534
  get: function() {
2498
- for (var u = [this.name], f = this.parent; f; )
2499
- u.unshift(f.name), f = f.parent;
2535
+ for (var u = [this.name], a = this.parent; a; )
2536
+ u.unshift(a.name), a = a.parent;
2500
2537
  return u.join(".");
2501
2538
  }
2502
2539
  }
2503
- }), n.prototype.toJSON = /* istanbul ignore next */
2540
+ }), d.prototype.toJSON = /* istanbul ignore next */
2504
2541
  function() {
2505
2542
  throw Error();
2506
- }, n.prototype.onAdd = function(f) {
2507
- this.parent && this.parent !== f && this.parent.remove(this), this.parent = f, this.resolved = !1;
2508
- var a = f.root;
2509
- a instanceof e && a._handleAdd(this);
2510
- }, n.prototype.onRemove = function(f) {
2511
- var a = f.root;
2512
- a instanceof e && a._handleRemove(this), this.parent = null, this.resolved = !1;
2513
- }, n.prototype.resolve = function() {
2514
- return this.resolved ? this : (this.root instanceof e && (this.resolved = !0), this);
2515
- }, n.prototype.getOption = function(f) {
2543
+ }, d.prototype.onAdd = function(a) {
2544
+ this.parent && this.parent !== a && this.parent.remove(this), this.parent = a, this.resolved = !1;
2545
+ var r = a.root;
2546
+ r instanceof o && r._handleAdd(this);
2547
+ }, d.prototype.onRemove = function(a) {
2548
+ var r = a.root;
2549
+ r instanceof o && r._handleRemove(this), this.parent = null, this.resolved = !1;
2550
+ }, d.prototype.resolve = function() {
2551
+ return this.resolved ? this : (this.root instanceof o && (this.resolved = !0), this);
2552
+ }, d.prototype.getOption = function(a) {
2516
2553
  if (this.options)
2517
- return this.options[f];
2518
- }, n.prototype.setOption = function(f, a, t) {
2519
- return (!t || !this.options || this.options[f] === void 0) && ((this.options || (this.options = {}))[f] = a), this;
2520
- }, n.prototype.setParsedOption = function(f, a, t) {
2554
+ return this.options[a];
2555
+ }, d.prototype.setOption = function(a, r, e) {
2556
+ return (!e || !this.options || this.options[a] === void 0) && ((this.options || (this.options = {}))[a] = r), this;
2557
+ }, d.prototype.setParsedOption = function(a, r, e) {
2521
2558
  this.parsedOptions || (this.parsedOptions = []);
2522
- var s = this.parsedOptions;
2523
- if (t) {
2524
- var o = s.find(function(d) {
2525
- return Object.prototype.hasOwnProperty.call(d, f);
2559
+ var t = this.parsedOptions;
2560
+ if (e) {
2561
+ var i = t.find(function(s) {
2562
+ return Object.prototype.hasOwnProperty.call(s, a);
2526
2563
  });
2527
- if (o) {
2528
- var r = o[f];
2529
- i.setProperty(r, t, a);
2564
+ if (i) {
2565
+ var n = i[a];
2566
+ f.setProperty(n, e, r);
2530
2567
  } else
2531
- o = {}, o[f] = i.setProperty({}, t, a), s.push(o);
2568
+ i = {}, i[a] = f.setProperty({}, e, r), t.push(i);
2532
2569
  } else {
2533
- var l = {};
2534
- l[f] = a, s.push(l);
2570
+ var c = {};
2571
+ c[a] = r, t.push(c);
2535
2572
  }
2536
2573
  return this;
2537
- }, n.prototype.setOptions = function(f, a) {
2538
- if (f)
2539
- for (var t = Object.keys(f), s = 0; s < t.length; ++s)
2540
- this.setOption(t[s], f[t[s]], a);
2574
+ }, d.prototype.setOptions = function(a, r) {
2575
+ if (a)
2576
+ for (var e = Object.keys(a), t = 0; t < e.length; ++t)
2577
+ this.setOption(e[t], a[e[t]], r);
2541
2578
  return this;
2542
- }, n.prototype.toString = function() {
2543
- var f = this.constructor.className, a = this.fullName;
2544
- return a.length ? f + " " + a : f;
2545
- }, n._configure = function(u) {
2546
- e = u;
2579
+ }, d.prototype.toString = function() {
2580
+ var a = this.constructor.className, r = this.fullName;
2581
+ return r.length ? a + " " + r : a;
2582
+ }, d._configure = function(u) {
2583
+ o = u;
2547
2584
  }, object;
2548
2585
  }
2549
2586
  var _enum, hasRequired_enum;
2550
2587
  function require_enum() {
2551
2588
  if (hasRequired_enum) return _enum;
2552
2589
  hasRequired_enum = 1, _enum = u;
2553
- var i = requireObject();
2554
- ((u.prototype = Object.create(i.prototype)).constructor = u).className = "Enum";
2555
- var e = requireNamespace(), n = requireUtil();
2556
- function u(f, a, t, s, o, r) {
2557
- if (i.call(this, f, t), a && typeof a != "object")
2590
+ var f = requireObject();
2591
+ ((u.prototype = Object.create(f.prototype)).constructor = u).className = "Enum";
2592
+ var o = requireNamespace(), d = requireUtil();
2593
+ function u(a, r, e, t, i, n) {
2594
+ if (f.call(this, a, e), r && typeof r != "object")
2558
2595
  throw TypeError("values must be an object");
2559
- if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = s, this.comments = o || {}, this.valuesOptions = r, this.reserved = void 0, a)
2560
- for (var l = Object.keys(a), d = 0; d < l.length; ++d)
2561
- typeof a[l[d]] == "number" && (this.valuesById[this.values[l[d]] = a[l[d]]] = l[d]);
2562
- }
2563
- return u.fromJSON = function(a, t) {
2564
- var s = new u(a, t.values, t.options, t.comment, t.comments);
2565
- return s.reserved = t.reserved, s;
2566
- }, u.prototype.toJSON = function(a) {
2567
- var t = a ? !!a.keepComments : !1;
2568
- return n.toObject([
2596
+ if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = t, this.comments = i || {}, this.valuesOptions = n, this.reserved = void 0, r)
2597
+ for (var c = Object.keys(r), s = 0; s < c.length; ++s)
2598
+ typeof r[c[s]] == "number" && (this.valuesById[this.values[c[s]] = r[c[s]]] = c[s]);
2599
+ }
2600
+ return u.fromJSON = function(r, e) {
2601
+ var t = new u(r, e.values, e.options, e.comment, e.comments);
2602
+ return t.reserved = e.reserved, t;
2603
+ }, u.prototype.toJSON = function(r) {
2604
+ var e = r ? !!r.keepComments : !1;
2605
+ return d.toObject([
2569
2606
  "options",
2570
2607
  this.options,
2571
2608
  "valuesOptions",
@@ -2575,198 +2612,185 @@ function require_enum() {
2575
2612
  "reserved",
2576
2613
  this.reserved && this.reserved.length ? this.reserved : void 0,
2577
2614
  "comment",
2578
- t ? this.comment : void 0,
2615
+ e ? this.comment : void 0,
2579
2616
  "comments",
2580
- t ? this.comments : void 0
2617
+ e ? this.comments : void 0
2581
2618
  ]);
2582
- }, u.prototype.add = function(a, t, s, o) {
2583
- if (!n.isString(a))
2619
+ }, u.prototype.add = function(r, e, t, i) {
2620
+ if (!d.isString(r))
2584
2621
  throw TypeError("name must be a string");
2585
- if (!n.isInteger(t))
2622
+ if (!d.isInteger(e))
2586
2623
  throw TypeError("id must be an integer");
2587
- if (this.values[a] !== void 0)
2588
- throw Error("duplicate name '" + a + "' in " + this);
2589
- if (this.isReservedId(t))
2590
- throw Error("id " + t + " is reserved in " + this);
2591
- if (this.isReservedName(a))
2592
- throw Error("name '" + a + "' is reserved in " + this);
2593
- if (this.valuesById[t] !== void 0) {
2624
+ if (this.values[r] !== void 0)
2625
+ throw Error("duplicate name '" + r + "' in " + this);
2626
+ if (this.isReservedId(e))
2627
+ throw Error("id " + e + " is reserved in " + this);
2628
+ if (this.isReservedName(r))
2629
+ throw Error("name '" + r + "' is reserved in " + this);
2630
+ if (this.valuesById[e] !== void 0) {
2594
2631
  if (!(this.options && this.options.allow_alias))
2595
- throw Error("duplicate id " + t + " in " + this);
2596
- this.values[a] = t;
2632
+ throw Error("duplicate id " + e + " in " + this);
2633
+ this.values[r] = e;
2597
2634
  } else
2598
- this.valuesById[this.values[a] = t] = a;
2599
- return o && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[a] = o || null), this.comments[a] = s || null, this;
2600
- }, u.prototype.remove = function(a) {
2601
- if (!n.isString(a))
2635
+ this.valuesById[this.values[r] = e] = r;
2636
+ return i && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[r] = i || null), this.comments[r] = t || null, this;
2637
+ }, u.prototype.remove = function(r) {
2638
+ if (!d.isString(r))
2602
2639
  throw TypeError("name must be a string");
2603
- var t = this.values[a];
2604
- if (t == null)
2605
- throw Error("name '" + a + "' does not exist in " + this);
2606
- return delete this.valuesById[t], delete this.values[a], delete this.comments[a], this.valuesOptions && delete this.valuesOptions[a], this;
2607
- }, u.prototype.isReservedId = function(a) {
2608
- return e.isReservedId(this.reserved, a);
2609
- }, u.prototype.isReservedName = function(a) {
2610
- return e.isReservedName(this.reserved, a);
2640
+ var e = this.values[r];
2641
+ if (e == null)
2642
+ throw Error("name '" + r + "' does not exist in " + this);
2643
+ return delete this.valuesById[e], delete this.values[r], delete this.comments[r], this.valuesOptions && delete this.valuesOptions[r], this;
2644
+ }, u.prototype.isReservedId = function(r) {
2645
+ return o.isReservedId(this.reserved, r);
2646
+ }, u.prototype.isReservedName = function(r) {
2647
+ return o.isReservedName(this.reserved, r);
2611
2648
  }, _enum;
2612
2649
  }
2613
2650
  var encoder_1, hasRequiredEncoder;
2614
2651
  function requireEncoder() {
2615
2652
  if (hasRequiredEncoder) return encoder_1;
2616
- hasRequiredEncoder = 1, encoder_1 = f;
2617
- var i = require_enum(), e = requireTypes(), n = requireUtil();
2618
- function u(a, t, s, o) {
2619
- return t.resolvedType.group ? a("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", s, o, (t.id << 3 | 3) >>> 0, (t.id << 3 | 4) >>> 0) : a("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", s, o, (t.id << 3 | 2) >>> 0);
2653
+ hasRequiredEncoder = 1, encoder_1 = a;
2654
+ var f = require_enum(), o = requireTypes(), d = requireUtil();
2655
+ function u(r, e, t, i) {
2656
+ return e.resolvedType.group ? r("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", t, i, (e.id << 3 | 3) >>> 0, (e.id << 3 | 4) >>> 0) : r("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", t, i, (e.id << 3 | 2) >>> 0);
2620
2657
  }
2621
- function f(a) {
2622
- for (var t = n.codegen(["m", "w"], a.name + "$encode")("if(!w)")("w=Writer.create()"), s, o, r = (
2658
+ function a(r) {
2659
+ for (var e = d.codegen(["m", "w"], r.name + "$encode")("if(!w)")("w=Writer.create()"), t, i, n = (
2623
2660
  /* initializes */
2624
- a.fieldsArray.slice().sort(n.compareFieldsById)
2625
- ), s = 0; s < r.length; ++s) {
2626
- var l = r[s].resolve(), d = a._fieldsArray.indexOf(l), h = l.resolvedType instanceof i ? "int32" : l.type, c = e.basic[h];
2627
- o = "m" + n.safeProp(l.name), l.map ? (t("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", o, l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", o)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (l.id << 3 | 2) >>> 0, 8 | e.mapKey[l.keyType], l.keyType), c === void 0 ? t("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", d, o) : t(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | c, h, o), t("}")("}")) : l.repeated ? (t("if(%s!=null&&%s.length){", o, o), l.packed && e.packed[h] !== void 0 ? t("w.uint32(%i).fork()", (l.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", o)("w.%s(%s[i])", h, o)("w.ldelim()") : (t("for(var i=0;i<%s.length;++i)", o), c === void 0 ? u(t, l, d, o + "[i]") : t("w.uint32(%i).%s(%s[i])", (l.id << 3 | c) >>> 0, h, o)), t("}")) : (l.optional && t("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", o, l.name), c === void 0 ? u(t, l, d, o) : t("w.uint32(%i).%s(%s)", (l.id << 3 | c) >>> 0, h, o));
2661
+ r.fieldsArray.slice().sort(d.compareFieldsById)
2662
+ ), t = 0; t < n.length; ++t) {
2663
+ var c = n[t].resolve(), s = r._fieldsArray.indexOf(c), l = c.resolvedType instanceof f ? "int32" : c.type, h = o.basic[l];
2664
+ i = "m" + d.safeProp(c.name), c.map ? (e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", i, c.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (c.id << 3 | 2) >>> 0, 8 | o.mapKey[c.keyType], c.keyType), h === 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 | h, l, i), e("}")("}")) : c.repeated ? (e("if(%s!=null&&%s.length){", i, i), c.packed && o.packed[l] !== void 0 ? e("w.uint32(%i).fork()", (c.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", i)("w.%s(%s[i])", l, i)("w.ldelim()") : (e("for(var i=0;i<%s.length;++i)", i), h === void 0 ? u(e, c, s, i + "[i]") : e("w.uint32(%i).%s(%s[i])", (c.id << 3 | h) >>> 0, l, i)), e("}")) : (c.optional && e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", i, c.name), h === void 0 ? u(e, c, s, i) : e("w.uint32(%i).%s(%s)", (c.id << 3 | h) >>> 0, l, i));
2628
2665
  }
2629
- return t("return w");
2666
+ return e("return w");
2630
2667
  }
2631
2668
  return encoder_1;
2632
2669
  }
2633
- var protobuf = indexLight.exports = indexMinimal;
2634
- protobuf.build = "light";
2635
- function load(i, e, n) {
2636
- return typeof e == "function" ? (n = e, e = new protobuf.Root()) : e || (e = new protobuf.Root()), e.load(i, n);
2670
+ var hasRequiredIndexLight;
2671
+ function requireIndexLight() {
2672
+ if (hasRequiredIndexLight) return indexLight.exports;
2673
+ hasRequiredIndexLight = 1;
2674
+ var f = indexLight.exports = requireIndexMinimal();
2675
+ f.build = "light";
2676
+ function o(u, a, r) {
2677
+ return typeof a == "function" ? (r = a, a = new f.Root()) : a || (a = new f.Root()), a.load(u, r);
2678
+ }
2679
+ f.load = o;
2680
+ function d(u, a) {
2681
+ return a || (a = new f.Root()), a.loadSync(u);
2682
+ }
2683
+ return f.loadSync = d, f.encoder = requireEncoder(), f.decoder = requireDecoder(), f.verifier = requireVerifier(), f.converter = requireConverter(), f.ReflectionObject = requireObject(), f.Namespace = requireNamespace(), f.Root = requireRoot(), f.Enum = require_enum(), f.Type = requireType(), f.Field = requireField(), f.OneOf = requireOneof(), f.MapField = requireMapfield(), f.Service = requireService(), f.Method = requireMethod(), f.Message = requireMessage(), f.wrappers = requireWrappers(), f.types = requireTypes(), f.util = requireUtil(), f.ReflectionObject._configure(f.Root), f.Namespace._configure(f.Type, f.Service, f.Enum), f.Root._configure(f.Type), f.Field._configure(f.Type), indexLight.exports;
2637
2684
  }
2638
- protobuf.load = load;
2639
- function loadSync(i, e) {
2640
- return e || (e = new protobuf.Root()), e.loadSync(i);
2685
+ var light, hasRequiredLight;
2686
+ function requireLight() {
2687
+ return hasRequiredLight || (hasRequiredLight = 1, light = requireIndexLight()), light;
2641
2688
  }
2642
- protobuf.loadSync = loadSync;
2643
- protobuf.encoder = requireEncoder();
2644
- protobuf.decoder = requireDecoder();
2645
- protobuf.verifier = requireVerifier();
2646
- protobuf.converter = requireConverter();
2647
- protobuf.ReflectionObject = requireObject();
2648
- protobuf.Namespace = requireNamespace();
2649
- protobuf.Root = requireRoot();
2650
- protobuf.Enum = require_enum();
2651
- protobuf.Type = requireType();
2652
- protobuf.Field = requireField();
2653
- protobuf.OneOf = requireOneof();
2654
- protobuf.MapField = requireMapfield();
2655
- protobuf.Service = requireService();
2656
- protobuf.Method = requireMethod();
2657
- protobuf.Message = message;
2658
- protobuf.wrappers = wrappers;
2659
- protobuf.types = requireTypes();
2660
- protobuf.util = requireUtil();
2661
- protobuf.ReflectionObject._configure(protobuf.Root);
2662
- protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);
2663
- protobuf.Root._configure(protobuf.Type);
2664
- protobuf.Field._configure(protobuf.Type);
2665
- var indexLightExports = indexLight.exports, light = indexLightExports;
2666
- const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data = { options: { syntax: "proto3", optimize_for: "LITE_RUNTIME" }, nested: { nil: { nested: { xit: { nested: { proto: { nested: { MessageType: { values: { MessageType_FrameRequest: 0, MessageType_FrameResponse: 1, MessageType_FrameCache: 2, MessageType_FrameLoaded: 3, MessageType_FrameSubscribe: 4, MessageType_FrameUnsubscribe: 5, MessageType_ValueRequest: 6, MessageType_ValueResponse: 7, MessageType_ValueUpdate: 8, MessageType_SignalRequest: 9, MessageType_SignalResponse: 10, MessageType_SignalNotify: 11, MessageType_FileRequest: 12, MessageType_FileResponse: 13 } }, FrameRequest: { fields: { id: { type: "string", id: 1 } } }, FrameResponse: { oneofs: { value: { oneof: ["file", "content"] } }, fields: { id: { type: "string", id: 1 }, file: { type: "string", id: 2 }, content: { type: "string", id: 3 } } }, FrameCache: { fields: { id: { type: "string", id: 1 }, content: { type: "string", id: 2 }, files: { rule: "repeated", type: "FileInfo", id: 3 } } }, FrameLoaded: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, FrameSubscribe: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, FrameUnsubscribe: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, Value: { oneofs: { value: { oneof: ["value_boolean", "value_number", "value_double", "value_string", "value_buffer"] } }, fields: { id: { type: "string", id: 1 }, value_boolean: { type: "bool", id: 2 }, value_number: { type: "int64", id: 3 }, value_double: { type: "double", id: 4 }, value_string: { type: "string", id: 5 }, value_buffer: { type: "bytes", id: 6 } } }, ValueRequest: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, ValueResponse: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, values: { rule: "repeated", type: "Value", id: 3 } } }, ValueUpdate: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, value: { type: "Value", id: 3 } } }, SignalRequest: { fields: { id: { type: "string", id: 1 } } }, Signal: { oneofs: { _type: { oneof: ["type"] } }, fields: { id: { type: "string", id: 1 }, type: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, SignalResponse: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, signals: { rule: "repeated", type: "Signal", id: 3 } } }, SignalNotify: { oneofs: { _tag: { oneof: ["tag"] }, arg: { oneof: ["arg_boolean", "arg_number", "arg_double", "arg_string", "arg_buffer"] } }, fields: { frame_id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, signal_id: { type: "string", id: 3 }, arg_boolean: { type: "bool", id: 4 }, arg_number: { type: "int64", id: 5 }, arg_double: { type: "double", id: 6 }, arg_string: { type: "string", id: 7 }, arg_buffer: { type: "bytes", id: 8 } } }, FileRequest: { fields: { target: { type: "string", id: 1 } } }, FileResponse: { fields: { target: { type: "string", id: 1 }, content: { type: "string", id: 2 }, metadata: { type: "bytes", id: 3 } } }, FileInfo: { fields: { target: { type: "string", id: 1 }, metadata: { type: "bytes", id: 2 } } } } } } } } } } }, nil_xit_proto = protobufjs.Root.fromJSON(proto_data).lookup(
2689
+ var lightExports = requireLight();
2690
+ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(lightExports), proto_data = { options: { syntax: "proto3", optimize_for: "LITE_RUNTIME" }, nested: { nil: { nested: { xit: { nested: { proto: { nested: { MessageType: { values: { MessageType_FrameRequest: 0, MessageType_FrameResponse: 1, MessageType_FrameCache: 2, MessageType_FrameLoaded: 3, MessageType_FrameSubscribe: 4, MessageType_FrameUnsubscribe: 5, MessageType_ValueRequest: 6, MessageType_ValueResponse: 7, MessageType_ValueUpdate: 8, MessageType_SignalRequest: 9, MessageType_SignalResponse: 10, MessageType_SignalNotify: 11, MessageType_FileRequest: 12, MessageType_FileResponse: 13 } }, FrameRequest: { fields: { id: { type: "string", id: 1 } } }, FrameResponse: { oneofs: { value: { oneof: ["file", "content"] } }, fields: { id: { type: "string", id: 1 }, file: { type: "string", id: 2 }, content: { type: "string", id: 3 } } }, FrameCache: { fields: { id: { type: "string", id: 1 }, content: { type: "string", id: 2 }, files: { rule: "repeated", type: "FileInfo", id: 3 } } }, FrameLoaded: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, FrameSubscribe: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, FrameUnsubscribe: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, Value: { oneofs: { value: { oneof: ["value_boolean", "value_number", "value_double", "value_string", "value_buffer"] } }, fields: { id: { type: "string", id: 1 }, value_boolean: { type: "bool", id: 2 }, value_number: { type: "int64", id: 3 }, value_double: { type: "double", id: 4 }, value_string: { type: "string", id: 5 }, value_buffer: { type: "bytes", id: 6 } } }, ValueRequest: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, ValueResponse: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, values: { rule: "repeated", type: "Value", id: 3 } } }, ValueUpdate: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, value: { type: "Value", id: 3 } } }, SignalRequest: { fields: { id: { type: "string", id: 1 } } }, Signal: { oneofs: { _type: { oneof: ["type"] } }, fields: { id: { type: "string", id: 1 }, type: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, SignalResponse: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, signals: { rule: "repeated", type: "Signal", id: 3 } } }, SignalNotify: { oneofs: { _tag: { oneof: ["tag"] }, arg: { oneof: ["arg_boolean", "arg_number", "arg_double", "arg_string", "arg_buffer"] } }, fields: { frame_id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, signal_id: { type: "string", id: 3 }, arg_boolean: { type: "bool", id: 4 }, arg_number: { type: "int64", id: 5 }, arg_double: { type: "double", id: 6 }, arg_string: { type: "string", id: 7 }, arg_buffer: { type: "bytes", id: 8 } } }, FileRequest: { fields: { target: { type: "string", id: 1 } } }, FileResponse: { fields: { target: { type: "string", id: 1 }, content: { type: "string", id: 2 }, metadata: { type: "bytes", id: 3 } } }, FileInfo: { fields: { target: { type: "string", id: 1 }, metadata: { type: "bytes", id: 2 } } } } } } } } } } }, nil_xit_proto = protobufjs.Root.fromJSON(proto_data).lookup(
2667
2691
  "nil.xit.proto"
2668
- ), bundle = async (i) => new Promise((e, n) => {
2692
+ ), bundle = async (f) => new Promise((o, d) => {
2669
2693
  const u = new WorkerWrapper();
2670
- u.postMessage({ type: "init", host: i.host, id: i.id, cdn_url: i.cdn_url }), u.addEventListener("message", async (f) => {
2671
- f.data.ok ? (f.data.files && service_publish(
2672
- i.host,
2694
+ u.postMessage({ type: "init", host: f.host, id: f.id, cdn_url: f.cdn_url }), u.addEventListener("message", async (a) => {
2695
+ a.data.ok ? (a.data.files && service_publish(
2696
+ f.host,
2673
2697
  nil_xit_proto.MessageType.MessageType_FrameCache,
2674
2698
  nil_xit_proto.FrameCache.encode({
2675
- id: i.id,
2676
- content: f.data.code,
2677
- files: f.data.files
2699
+ id: f.id,
2700
+ content: a.data.code,
2701
+ files: a.data.files
2678
2702
  }).finish()
2679
- ), e(await import(
2703
+ ), o(await import(
2680
2704
  /* @vite-ignore */
2681
- f.data.code
2682
- ))) : n(f.data.err), u.terminate();
2705
+ a.data.code
2706
+ ))) : d(a.data.err), u.terminate();
2683
2707
  });
2684
- }), noop = (i) => {
2708
+ }), noop = (f) => {
2685
2709
  }, make_values = async ({
2686
- id: i,
2687
- tag: e,
2688
- host: n,
2710
+ id: f,
2711
+ tag: o,
2712
+ host: d,
2689
2713
  service: u
2690
2714
  }) => {
2691
- const f = await service_fetch(
2692
- n,
2715
+ const a = await service_fetch(
2716
+ d,
2693
2717
  nil_xit_proto.MessageType.MessageType_ValueRequest,
2694
- nil_xit_proto.ValueRequest.encode({ id: i, tag: e }).finish(),
2695
- (s, o) => {
2696
- if (s === nil_xit_proto.MessageType.MessageType_ValueResponse) {
2697
- const r = nil_xit_proto.ValueResponse.decode(o);
2698
- if (r.id === i && e === r.tag)
2699
- return r.values;
2718
+ nil_xit_proto.ValueRequest.encode({ id: f, tag: o }).finish(),
2719
+ (t, i) => {
2720
+ if (t === nil_xit_proto.MessageType.MessageType_ValueResponse) {
2721
+ const n = nil_xit_proto.ValueResponse.decode(i);
2722
+ if (n.id === f && o === n.tag)
2723
+ return n.values;
2700
2724
  }
2701
2725
  }
2702
- ), a = {
2726
+ ), r = {
2703
2727
  value_boolean: /* @__PURE__ */ new Map(),
2704
2728
  value_double: /* @__PURE__ */ new Map(),
2705
2729
  value_number: /* @__PURE__ */ new Map(),
2706
2730
  value_string: /* @__PURE__ */ new Map(),
2707
2731
  value_buffer: /* @__PURE__ */ new Map()
2708
2732
  };
2709
- let t = !1;
2710
- for (const s of f) {
2711
- const o = s.id, r = s.value, l = writable(s[r]);
2712
- l.subscribe((d) => {
2713
- if (t)
2733
+ let e = !1;
2734
+ for (const t of a) {
2735
+ const i = t.id, n = t.value, c = writable(t[n]);
2736
+ c.subscribe((s) => {
2737
+ if (e)
2714
2738
  return;
2715
- const h = { id: o, [r]: d, value: r }, c = { id: i, tag: e, value: h };
2739
+ const l = { id: i, [n]: s, value: n }, h = { id: f, tag: o, value: l };
2716
2740
  u.publish(
2717
2741
  concat([
2718
2742
  header(nil_xit_proto.MessageType.MessageType_ValueUpdate),
2719
- nil_xit_proto.ValueUpdate.encode(c).finish()
2743
+ nil_xit_proto.ValueUpdate.encode(h).finish()
2720
2744
  ])
2721
2745
  );
2722
- }), a[r].set(o, l);
2723
- }
2724
- return u.on_message((s, o) => {
2725
- var d;
2726
- const r = new DataView(o.buffer).getUint32(0, !1), l = o.slice(4);
2727
- if (r === nil_xit_proto.MessageType.MessageType_ValueUpdate) {
2728
- const h = nil_xit_proto.ValueUpdate.decode(l);
2729
- if (h.id === i && (h.tag === null || e === h.tag)) {
2730
- t = !0;
2731
- const c = h.value.value, p = (d = a[c]) == null ? void 0 : d.get(h.value.id);
2732
- if (c === "value_buffer") {
2733
- const m = h.value[c], b = get(p);
2746
+ }), r[n].set(i, c);
2747
+ }
2748
+ return u.on_message((t, i) => {
2749
+ var s;
2750
+ const n = new DataView(i.buffer).getUint32(0, !1), c = i.slice(4);
2751
+ if (n === nil_xit_proto.MessageType.MessageType_ValueUpdate) {
2752
+ const l = nil_xit_proto.ValueUpdate.decode(c);
2753
+ if (l.id === f && (l.tag === null || o === l.tag)) {
2754
+ e = !0;
2755
+ const h = l.value.value, p = (s = r[h]) == null ? void 0 : s.get(l.value.id);
2756
+ if (h === "value_buffer") {
2757
+ const m = l.value[h], g = get(p);
2734
2758
  let v = !0;
2735
- if (m.length != b.length)
2759
+ if (m.length != g.length)
2736
2760
  v = !1;
2737
2761
  else {
2738
2762
  const y = m.length;
2739
- for (let g = 0; g < y; g++)
2740
- if (m[g] !== b[g]) {
2763
+ for (let _ = 0; _ < y; _++)
2764
+ if (m[_] !== g[_]) {
2741
2765
  v = !1;
2742
2766
  break;
2743
2767
  }
2744
2768
  }
2745
2769
  v || p == null || p.set(m);
2746
2770
  } else
2747
- p == null || p.set(h.value[c]);
2748
- t = !1;
2771
+ p == null || p.set(l.value[h]);
2772
+ e = !1;
2749
2773
  }
2750
2774
  }
2751
- }), a;
2775
+ }), r;
2752
2776
  }, make_signals = async ({
2753
- id: i,
2754
- tag: e,
2755
- host: n,
2777
+ id: f,
2778
+ tag: o,
2779
+ host: d,
2756
2780
  service: u
2757
2781
  }) => {
2758
- const f = await service_fetch(
2759
- n,
2782
+ const a = await service_fetch(
2783
+ d,
2760
2784
  nil_xit_proto.MessageType.MessageType_SignalRequest,
2761
- nil_xit_proto.SignalRequest.encode({ id: i }).finish(),
2762
- (t, s) => {
2763
- if (t === nil_xit_proto.MessageType.MessageType_SignalResponse) {
2764
- const o = nil_xit_proto.SignalResponse.decode(s);
2765
- if (o.id === i)
2766
- return o.signals;
2785
+ nil_xit_proto.SignalRequest.encode({ id: f }).finish(),
2786
+ (e, t) => {
2787
+ if (e === nil_xit_proto.MessageType.MessageType_SignalResponse) {
2788
+ const i = nil_xit_proto.SignalResponse.decode(t);
2789
+ if (i.id === f)
2790
+ return i.signals;
2767
2791
  }
2768
2792
  }
2769
- ), a = {
2793
+ ), r = {
2770
2794
  arg_none: /* @__PURE__ */ new Map(),
2771
2795
  arg_boolean: /* @__PURE__ */ new Map(),
2772
2796
  arg_double: /* @__PURE__ */ new Map(),
@@ -2774,162 +2798,162 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
2774
2798
  arg_string: /* @__PURE__ */ new Map(),
2775
2799
  arg_buffer: /* @__PURE__ */ new Map()
2776
2800
  };
2777
- for (const { id: t, type: s } of f)
2778
- s == null ? a.arg_none.set(t, () => {
2779
- const o = { frame_id: i, signal_id: t, tag: e };
2801
+ for (const { id: e, type: t } of a)
2802
+ t == null ? r.arg_none.set(e, () => {
2803
+ const i = { frame_id: f, signal_id: e, tag: o };
2780
2804
  u.publish(
2781
2805
  concat([
2782
2806
  header(nil_xit_proto.MessageType.MessageType_SignalNotify),
2783
- nil_xit_proto.SignalNotify.encode(o).finish()
2807
+ nil_xit_proto.SignalNotify.encode(i).finish()
2784
2808
  ])
2785
2809
  );
2786
- }) : a[s].set(t, (o) => {
2787
- const r = { frame_id: i, signal_id: t, tag: e, [s]: o };
2810
+ }) : r[t].set(e, (i) => {
2811
+ const n = { frame_id: f, signal_id: e, tag: o, [t]: i };
2788
2812
  u.publish(
2789
2813
  concat([
2790
2814
  header(nil_xit_proto.MessageType.MessageType_SignalNotify),
2791
- nil_xit_proto.SignalNotify.encode(r).finish()
2815
+ nil_xit_proto.SignalNotify.encode(n).finish()
2792
2816
  ])
2793
2817
  );
2794
2818
  });
2795
- return a;
2796
- }, create_context_values = (i) => ({
2797
- boolean: (e, n) => i.value_boolean.get(e) ?? writable(n),
2798
- double: (e, n) => i.value_double.get(e) ?? writable(n),
2799
- string: (e, n) => i.value_string.get(e) ?? writable(n),
2800
- number: (e, n) => i.value_number.get(e) ?? writable(n),
2801
- buffer: (e, n) => i.value_buffer.get(e) ?? writable(n),
2802
- json: (e, n, u) => {
2803
- const f = i.value_buffer.get(e);
2804
- if (f != null) {
2805
- let a = get(f), t = u.decode(a);
2819
+ return r;
2820
+ }, create_context_values = (f) => ({
2821
+ boolean: (o, d) => f.value_boolean.get(o) ?? writable(d),
2822
+ double: (o, d) => f.value_double.get(o) ?? writable(d),
2823
+ string: (o, d) => f.value_string.get(o) ?? writable(d),
2824
+ number: (o, d) => f.value_number.get(o) ?? writable(d),
2825
+ buffer: (o, d) => f.value_buffer.get(o) ?? writable(d),
2826
+ json: (o, d, u) => {
2827
+ const a = f.value_buffer.get(o);
2828
+ if (a != null) {
2829
+ let r = get(a), e = u.decode(r);
2806
2830
  return {
2807
- set: (s) => {
2808
- t = s, a = u.encode(t), f.set(a);
2831
+ set: (t) => {
2832
+ e = t, r = u.encode(e), a.set(r);
2809
2833
  },
2810
- subscribe: (s) => f.subscribe((o) => {
2811
- o !== a && (a = o, t = u.decode(a)), s(t);
2834
+ subscribe: (t) => a.subscribe((i) => {
2835
+ i !== r && (r = i, e = u.decode(r)), t(e);
2812
2836
  }),
2813
- update: (s) => {
2814
- f.update((o) => (t = s(t), a = u.encode(t), a));
2837
+ update: (t) => {
2838
+ a.update((i) => (e = t(e), r = u.encode(e), r));
2815
2839
  }
2816
2840
  };
2817
2841
  }
2818
- return writable(n);
2842
+ return writable(d);
2819
2843
  }
2820
- }), create_context_signals = (i) => ({
2821
- none: (e) => i.arg_none.get(e) ?? (() => {
2844
+ }), create_context_signals = (f) => ({
2845
+ none: (o) => f.arg_none.get(o) ?? (() => {
2822
2846
  }),
2823
- boolean: (e) => i.arg_boolean.get(e) ?? noop,
2824
- double: (e) => i.arg_double.get(e) ?? noop,
2825
- number: (e) => i.arg_number.get(e) ?? noop,
2826
- string: (e) => i.arg_string.get(e) ?? noop,
2827
- buffer: (e) => i.arg_buffer.get(e) ?? noop,
2828
- json: (e, n) => {
2829
- const u = i.arg_buffer.get(e);
2830
- return u != null ? (f) => u(n(f)) : noop;
2831
- }
2832
- }), create_component$1 = async (i, e, n, u, f, a) => {
2833
- await test_connection(i);
2834
- const t = new Service$1(i), [s, o, { nil_xit_fn: r }] = await Promise.all([
2835
- make_values({ id: e, tag: n, host: i, service: t }),
2836
- make_signals({ id: e, tag: n, host: i, service: t }),
2837
- bundle({ host: i, cdn_url: u, id: e })
2838
- ]), l = {
2839
- svelte: () => import("./svelte/index.js").then((c) => c.bW),
2840
- "svelte/store": () => import("./svelte/store.js").then((c) => c.i),
2847
+ boolean: (o) => f.arg_boolean.get(o) ?? noop,
2848
+ double: (o) => f.arg_double.get(o) ?? noop,
2849
+ number: (o) => f.arg_number.get(o) ?? noop,
2850
+ string: (o) => f.arg_string.get(o) ?? noop,
2851
+ buffer: (o) => f.arg_buffer.get(o) ?? noop,
2852
+ json: (o, d) => {
2853
+ const u = f.arg_buffer.get(o);
2854
+ return u != null ? (a) => u(d(a)) : noop;
2855
+ }
2856
+ }), create_component$1 = async (f, o, d, u, a, r) => {
2857
+ await test_connection(f);
2858
+ const e = new Service(f), [t, i, { nil_xit_fn: n }] = await Promise.all([
2859
+ make_values({ id: o, tag: d, host: f, service: e }),
2860
+ make_signals({ id: o, tag: d, host: f, service: e }),
2861
+ bundle({ host: f, cdn_url: u, id: o })
2862
+ ]), c = {
2863
+ svelte: () => import("./svelte/index.js").then((h) => h.c5),
2864
+ "svelte/store": () => import("./svelte/store.js").then((h) => h.i),
2841
2865
  "svelte/animate": () => import("./svelte/animate.js"),
2842
2866
  "svelte/easing": () => import("./svelte/easing.js"),
2843
2867
  "svelte/events": () => import("./svelte/events.js"),
2844
- "svelte/motion": () => import("./svelte/motion.js").then((c) => c.i),
2868
+ "svelte/motion": () => import("./svelte/motion.js").then((h) => h.i),
2845
2869
  "svelte/transition": () => import("./svelte/transition.js"),
2846
2870
  // @ts-ignore
2847
2871
  "svelte/internal/disclose-version": () => import("./svelte/internal/disclose-version.js"),
2848
2872
  // @ts-ignore
2849
2873
  "svelte/internal/client": () => import("./svelte/internal/client.js")
2850
- }, d = (c) => c in l ? l[c]() : import(
2874
+ }, s = (h) => h in c ? c[h]() : import(
2851
2875
  /* @vite-ignore */
2852
- c
2853
- ), { action: h } = await r(d);
2854
- return t.on_connect(() => {
2855
- t.publish(
2876
+ h
2877
+ ), { action: l } = await n(s);
2878
+ return e.on_connect(() => {
2879
+ e.publish(
2856
2880
  concat([
2857
2881
  header(nil_xit_proto.MessageType.MessageType_FrameSubscribe),
2858
- nil_xit_proto.FrameLoaded.encode({ id: e, tag: n }).finish()
2882
+ nil_xit_proto.FrameLoaded.encode({ id: o, tag: d }).finish()
2859
2883
  ])
2860
2884
  );
2861
- }), t.start(), service_publish(
2862
- i,
2885
+ }), e.start(), service_publish(
2886
+ f,
2863
2887
  nil_xit_proto.MessageType.MessageType_FrameLoaded,
2864
- nil_xit_proto.FrameLoaded.encode({ id: e, tag: n }).finish()
2865
- ), (c) => {
2888
+ nil_xit_proto.FrameLoaded.encode({ id: o, tag: d }).finish()
2889
+ ), (h) => {
2866
2890
  const p = /* @__PURE__ */ new Map();
2867
2891
  p.set("nil.xit", {
2868
- values: create_context_values(s),
2869
- signals: create_context_signals(o),
2870
- frame_ui: f,
2871
- frame: a,
2872
- resub: () => t.start(),
2873
- unsub: () => t.stop(),
2874
- id: e,
2875
- tag: n
2892
+ values: create_context_values(t),
2893
+ signals: create_context_signals(i),
2894
+ frame_ui: a,
2895
+ frame: r,
2896
+ resub: () => e.start(),
2897
+ unsub: () => e.stop(),
2898
+ id: o,
2899
+ tag: d
2876
2900
  });
2877
- const { destroy: m } = h(c, p);
2901
+ const { destroy: m } = l(h, p);
2878
2902
  return {
2879
2903
  destroy: () => {
2880
- t.stop(), m();
2904
+ e.stop(), m();
2881
2905
  }
2882
2906
  };
2883
2907
  };
2884
2908
  }, create_frame = async ({
2885
- host: i,
2886
- frame: e,
2887
- tag: n
2909
+ host: f,
2910
+ frame: o,
2911
+ tag: d
2888
2912
  }) => {
2889
- const u = new Service$1(i), [f, a] = await Promise.all([
2890
- make_values({ id: e, tag: n ?? null, host: i, service: u }),
2891
- make_signals({ id: e, tag: n ?? null, host: i, service: u })
2913
+ const u = new Service(f), [a, r] = await Promise.all([
2914
+ make_values({ id: o, tag: d ?? null, host: f, service: u }),
2915
+ make_signals({ id: o, tag: d ?? null, host: f, service: u })
2892
2916
  ]);
2893
2917
  return u.on_connect(() => {
2894
- const t = concat([
2918
+ const e = concat([
2895
2919
  header(nil_xit_proto.MessageType.MessageType_FrameSubscribe),
2896
- nil_xit_proto.FrameLoaded.encode({ id: e, tag: n ?? null }).finish()
2920
+ nil_xit_proto.FrameLoaded.encode({ id: o, tag: d ?? null }).finish()
2897
2921
  ]);
2898
- u.publish(t);
2922
+ u.publish(e);
2899
2923
  }), u.start(), service_publish(
2900
- i,
2924
+ f,
2901
2925
  nil_xit_proto.MessageType.MessageType_FrameLoaded,
2902
- nil_xit_proto.FrameLoaded.encode({ id: e, tag: n ?? null }).finish()
2926
+ nil_xit_proto.FrameLoaded.encode({ id: o, tag: d ?? null }).finish()
2903
2927
  ), {
2904
- values: create_context_values(f),
2905
- signals: create_context_signals(a),
2928
+ values: create_context_values(a),
2929
+ signals: create_context_signals(r),
2906
2930
  resub: () => u.start(),
2907
2931
  unsub: () => u.stop()
2908
2932
  };
2909
2933
  }, create_frame_ui = async ({
2910
- host: i,
2911
- cdn_url: e,
2912
- frame: n,
2934
+ host: f,
2935
+ cdn_url: o,
2936
+ frame: d,
2913
2937
  tag: u
2914
2938
  }) => {
2915
- const f = async (a, t) => {
2916
- const s = await create_frame_ui({
2917
- host: i,
2918
- cdn_url: e,
2919
- frame: a,
2920
- tag: t
2939
+ const a = async (r, e) => {
2940
+ const t = await create_frame_ui({
2941
+ host: f,
2942
+ cdn_url: o,
2943
+ frame: r,
2944
+ tag: e
2921
2945
  });
2922
- return (o) => s(o);
2946
+ return (i) => t(i);
2923
2947
  };
2924
2948
  return create_component$1(
2925
- i,
2926
- n,
2949
+ f,
2950
+ d,
2927
2951
  u ?? null,
2928
- e,
2929
- async (a, t) => f(a, t),
2930
- async (a, t) => create_frame({ host: i, frame: a, tag: t })
2952
+ o,
2953
+ async (r, e) => a(r, e),
2954
+ async (r, e) => create_frame({ host: f, frame: r, tag: e })
2931
2955
  );
2932
- }, create_component = async (i, e) => (await create_frame_ui(e))(i);
2956
+ }, create_component = async (f, o) => (await create_frame_ui(o))(f);
2933
2957
  export {
2934
2958
  create_component,
2935
2959
  create_frame,