mezon-js-protobuf 1.7.18 → 1.7.19

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.
@@ -24,1378 +24,10 @@ var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__
24
24
  mod2
25
25
  ));
26
26
 
27
- // ../../node_modules/@protobufjs/aspromise/index.js
28
- var require_aspromise = __commonJS({
29
- "../../node_modules/@protobufjs/aspromise/index.js"(exports2, module2) {
30
- "use strict";
31
- module2.exports = asPromise;
32
- function asPromise(fn, ctx) {
33
- var params = new Array(arguments.length - 1), offset = 0, index = 2, pending = true;
34
- while (index < arguments.length)
35
- params[offset++] = arguments[index++];
36
- return new Promise(function executor(resolve, reject) {
37
- params[offset] = function callback(err) {
38
- if (pending) {
39
- pending = false;
40
- if (err)
41
- reject(err);
42
- else {
43
- var params2 = new Array(arguments.length - 1), offset2 = 0;
44
- while (offset2 < params2.length)
45
- params2[offset2++] = arguments[offset2];
46
- resolve.apply(null, params2);
47
- }
48
- }
49
- };
50
- try {
51
- fn.apply(ctx || null, params);
52
- } catch (err) {
53
- if (pending) {
54
- pending = false;
55
- reject(err);
56
- }
57
- }
58
- });
59
- }
60
- }
61
- });
62
-
63
- // ../../node_modules/@protobufjs/base64/index.js
64
- var require_base64 = __commonJS({
65
- "../../node_modules/@protobufjs/base64/index.js"(exports2) {
66
- "use strict";
67
- var base64 = exports2;
68
- base64.length = function length(string) {
69
- var p = string.length;
70
- if (!p)
71
- return 0;
72
- var n = 0;
73
- while (--p % 4 > 1 && string.charAt(p) === "=")
74
- ++n;
75
- return Math.ceil(string.length * 3) / 4 - n;
76
- };
77
- var b64 = new Array(64);
78
- var s64 = new Array(123);
79
- for (i = 0; i < 64; )
80
- s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
81
- var i;
82
- base64.encode = function encode(buffer, start, end) {
83
- var parts = null, chunk = [];
84
- var i2 = 0, j = 0, t;
85
- while (start < end) {
86
- var b = buffer[start++];
87
- switch (j) {
88
- case 0:
89
- chunk[i2++] = b64[b >> 2];
90
- t = (b & 3) << 4;
91
- j = 1;
92
- break;
93
- case 1:
94
- chunk[i2++] = b64[t | b >> 4];
95
- t = (b & 15) << 2;
96
- j = 2;
97
- break;
98
- case 2:
99
- chunk[i2++] = b64[t | b >> 6];
100
- chunk[i2++] = b64[b & 63];
101
- j = 0;
102
- break;
103
- }
104
- if (i2 > 8191) {
105
- (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
106
- i2 = 0;
107
- }
108
- }
109
- if (j) {
110
- chunk[i2++] = b64[t];
111
- chunk[i2++] = 61;
112
- if (j === 1)
113
- chunk[i2++] = 61;
114
- }
115
- if (parts) {
116
- if (i2)
117
- parts.push(String.fromCharCode.apply(String, chunk.slice(0, i2)));
118
- return parts.join("");
119
- }
120
- return String.fromCharCode.apply(String, chunk.slice(0, i2));
121
- };
122
- var invalidEncoding = "invalid encoding";
123
- base64.decode = function decode(string, buffer, offset) {
124
- var start = offset;
125
- var j = 0, t;
126
- for (var i2 = 0; i2 < string.length; ) {
127
- var c = string.charCodeAt(i2++);
128
- if (c === 61 && j > 1)
129
- break;
130
- if ((c = s64[c]) === void 0)
131
- throw Error(invalidEncoding);
132
- switch (j) {
133
- case 0:
134
- t = c;
135
- j = 1;
136
- break;
137
- case 1:
138
- buffer[offset++] = t << 2 | (c & 48) >> 4;
139
- t = c;
140
- j = 2;
141
- break;
142
- case 2:
143
- buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
144
- t = c;
145
- j = 3;
146
- break;
147
- case 3:
148
- buffer[offset++] = (t & 3) << 6 | c;
149
- j = 0;
150
- break;
151
- }
152
- }
153
- if (j === 1)
154
- throw Error(invalidEncoding);
155
- return offset - start;
156
- };
157
- base64.test = function test(string) {
158
- return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
159
- };
160
- }
161
- });
162
-
163
- // ../../node_modules/@protobufjs/eventemitter/index.js
164
- var require_eventemitter = __commonJS({
165
- "../../node_modules/@protobufjs/eventemitter/index.js"(exports2, module2) {
166
- "use strict";
167
- module2.exports = EventEmitter;
168
- function EventEmitter() {
169
- this._listeners = {};
170
- }
171
- EventEmitter.prototype.on = function on(evt, fn, ctx) {
172
- (this._listeners[evt] || (this._listeners[evt] = [])).push({
173
- fn,
174
- ctx: ctx || this
175
- });
176
- return this;
177
- };
178
- EventEmitter.prototype.off = function off(evt, fn) {
179
- if (evt === void 0)
180
- this._listeners = {};
181
- else {
182
- if (fn === void 0)
183
- this._listeners[evt] = [];
184
- else {
185
- var listeners = this._listeners[evt];
186
- for (var i = 0; i < listeners.length; )
187
- if (listeners[i].fn === fn)
188
- listeners.splice(i, 1);
189
- else
190
- ++i;
191
- }
192
- }
193
- return this;
194
- };
195
- EventEmitter.prototype.emit = function emit(evt) {
196
- var listeners = this._listeners[evt];
197
- if (listeners) {
198
- var args = [], i = 1;
199
- for (; i < arguments.length; )
200
- args.push(arguments[i++]);
201
- for (i = 0; i < listeners.length; )
202
- listeners[i].fn.apply(listeners[i++].ctx, args);
203
- }
204
- return this;
205
- };
206
- }
207
- });
208
-
209
- // ../../node_modules/@protobufjs/float/index.js
210
- var require_float = __commonJS({
211
- "../../node_modules/@protobufjs/float/index.js"(exports2, module2) {
212
- "use strict";
213
- module2.exports = factory(factory);
214
- function factory(exports3) {
215
- if (typeof Float32Array !== "undefined")
216
- (function() {
217
- var f32 = new Float32Array([-0]), f8b = new Uint8Array(f32.buffer), le = f8b[3] === 128;
218
- function writeFloat_f32_cpy(val, buf, pos) {
219
- f32[0] = val;
220
- buf[pos] = f8b[0];
221
- buf[pos + 1] = f8b[1];
222
- buf[pos + 2] = f8b[2];
223
- buf[pos + 3] = f8b[3];
224
- }
225
- function writeFloat_f32_rev(val, buf, pos) {
226
- f32[0] = val;
227
- buf[pos] = f8b[3];
228
- buf[pos + 1] = f8b[2];
229
- buf[pos + 2] = f8b[1];
230
- buf[pos + 3] = f8b[0];
231
- }
232
- exports3.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
233
- exports3.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
234
- function readFloat_f32_cpy(buf, pos) {
235
- f8b[0] = buf[pos];
236
- f8b[1] = buf[pos + 1];
237
- f8b[2] = buf[pos + 2];
238
- f8b[3] = buf[pos + 3];
239
- return f32[0];
240
- }
241
- function readFloat_f32_rev(buf, pos) {
242
- f8b[3] = buf[pos];
243
- f8b[2] = buf[pos + 1];
244
- f8b[1] = buf[pos + 2];
245
- f8b[0] = buf[pos + 3];
246
- return f32[0];
247
- }
248
- exports3.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
249
- exports3.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
250
- })();
251
- else
252
- (function() {
253
- function writeFloat_ieee754(writeUint, val, buf, pos) {
254
- var sign = val < 0 ? 1 : 0;
255
- if (sign)
256
- val = -val;
257
- if (val === 0)
258
- writeUint(1 / val > 0 ? (
259
- /* positive */
260
- 0
261
- ) : (
262
- /* negative 0 */
263
- 2147483648
264
- ), buf, pos);
265
- else if (isNaN(val))
266
- writeUint(2143289344, buf, pos);
267
- else if (val > 34028234663852886e22)
268
- writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
269
- else if (val < 11754943508222875e-54)
270
- writeUint((sign << 31 | Math.round(val / 1401298464324817e-60)) >>> 0, buf, pos);
271
- else {
272
- var exponent = Math.floor(Math.log(val) / Math.LN2), mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
273
- writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
274
- }
275
- }
276
- exports3.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
277
- exports3.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
278
- function readFloat_ieee754(readUint, buf, pos) {
279
- var uint = readUint(buf, pos), sign = (uint >> 31) * 2 + 1, exponent = uint >>> 23 & 255, mantissa = uint & 8388607;
280
- return exponent === 255 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 1401298464324817e-60 * mantissa : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
281
- }
282
- exports3.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
283
- exports3.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
284
- })();
285
- if (typeof Float64Array !== "undefined")
286
- (function() {
287
- var f64 = new Float64Array([-0]), f8b = new Uint8Array(f64.buffer), le = f8b[7] === 128;
288
- function writeDouble_f64_cpy(val, buf, pos) {
289
- f64[0] = val;
290
- buf[pos] = f8b[0];
291
- buf[pos + 1] = f8b[1];
292
- buf[pos + 2] = f8b[2];
293
- buf[pos + 3] = f8b[3];
294
- buf[pos + 4] = f8b[4];
295
- buf[pos + 5] = f8b[5];
296
- buf[pos + 6] = f8b[6];
297
- buf[pos + 7] = f8b[7];
298
- }
299
- function writeDouble_f64_rev(val, buf, pos) {
300
- f64[0] = val;
301
- buf[pos] = f8b[7];
302
- buf[pos + 1] = f8b[6];
303
- buf[pos + 2] = f8b[5];
304
- buf[pos + 3] = f8b[4];
305
- buf[pos + 4] = f8b[3];
306
- buf[pos + 5] = f8b[2];
307
- buf[pos + 6] = f8b[1];
308
- buf[pos + 7] = f8b[0];
309
- }
310
- exports3.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
311
- exports3.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
312
- function readDouble_f64_cpy(buf, pos) {
313
- f8b[0] = buf[pos];
314
- f8b[1] = buf[pos + 1];
315
- f8b[2] = buf[pos + 2];
316
- f8b[3] = buf[pos + 3];
317
- f8b[4] = buf[pos + 4];
318
- f8b[5] = buf[pos + 5];
319
- f8b[6] = buf[pos + 6];
320
- f8b[7] = buf[pos + 7];
321
- return f64[0];
322
- }
323
- function readDouble_f64_rev(buf, pos) {
324
- f8b[7] = buf[pos];
325
- f8b[6] = buf[pos + 1];
326
- f8b[5] = buf[pos + 2];
327
- f8b[4] = buf[pos + 3];
328
- f8b[3] = buf[pos + 4];
329
- f8b[2] = buf[pos + 5];
330
- f8b[1] = buf[pos + 6];
331
- f8b[0] = buf[pos + 7];
332
- return f64[0];
333
- }
334
- exports3.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
335
- exports3.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
336
- })();
337
- else
338
- (function() {
339
- function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
340
- var sign = val < 0 ? 1 : 0;
341
- if (sign)
342
- val = -val;
343
- if (val === 0) {
344
- writeUint(0, buf, pos + off0);
345
- writeUint(1 / val > 0 ? (
346
- /* positive */
347
- 0
348
- ) : (
349
- /* negative 0 */
350
- 2147483648
351
- ), buf, pos + off1);
352
- } else if (isNaN(val)) {
353
- writeUint(0, buf, pos + off0);
354
- writeUint(2146959360, buf, pos + off1);
355
- } else if (val > 17976931348623157e292) {
356
- writeUint(0, buf, pos + off0);
357
- writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
358
- } else {
359
- var mantissa;
360
- if (val < 22250738585072014e-324) {
361
- mantissa = val / 5e-324;
362
- writeUint(mantissa >>> 0, buf, pos + off0);
363
- writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
364
- } else {
365
- var exponent = Math.floor(Math.log(val) / Math.LN2);
366
- if (exponent === 1024)
367
- exponent = 1023;
368
- mantissa = val * Math.pow(2, -exponent);
369
- writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
370
- writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
371
- }
372
- }
373
- }
374
- exports3.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
375
- exports3.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
376
- function readDouble_ieee754(readUint, off0, off1, buf, pos) {
377
- var lo = readUint(buf, pos + off0), hi = readUint(buf, pos + off1);
378
- var sign = (hi >> 31) * 2 + 1, exponent = hi >>> 20 & 2047, mantissa = 4294967296 * (hi & 1048575) + lo;
379
- return exponent === 2047 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 5e-324 * mantissa : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
380
- }
381
- exports3.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
382
- exports3.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
383
- })();
384
- return exports3;
385
- }
386
- function writeUintLE(val, buf, pos) {
387
- buf[pos] = val & 255;
388
- buf[pos + 1] = val >>> 8 & 255;
389
- buf[pos + 2] = val >>> 16 & 255;
390
- buf[pos + 3] = val >>> 24;
391
- }
392
- function writeUintBE(val, buf, pos) {
393
- buf[pos] = val >>> 24;
394
- buf[pos + 1] = val >>> 16 & 255;
395
- buf[pos + 2] = val >>> 8 & 255;
396
- buf[pos + 3] = val & 255;
397
- }
398
- function readUintLE(buf, pos) {
399
- return (buf[pos] | buf[pos + 1] << 8 | buf[pos + 2] << 16 | buf[pos + 3] << 24) >>> 0;
400
- }
401
- function readUintBE(buf, pos) {
402
- return (buf[pos] << 24 | buf[pos + 1] << 16 | buf[pos + 2] << 8 | buf[pos + 3]) >>> 0;
403
- }
404
- }
405
- });
406
-
407
- // ../../node_modules/@protobufjs/inquire/index.js
408
- var require_inquire = __commonJS({
409
- "../../node_modules/@protobufjs/inquire/index.js"(exports, module) {
410
- "use strict";
411
- module.exports = inquire;
412
- function inquire(moduleName) {
413
- try {
414
- var mod = eval("quire".replace(/^/, "re"))(moduleName);
415
- if (mod && (mod.length || Object.keys(mod).length))
416
- return mod;
417
- } catch (e) {
418
- }
419
- return null;
420
- }
421
- }
422
- });
423
-
424
- // ../../node_modules/@protobufjs/utf8/index.js
425
- var require_utf8 = __commonJS({
426
- "../../node_modules/@protobufjs/utf8/index.js"(exports2) {
427
- "use strict";
428
- var utf8 = exports2;
429
- utf8.length = function utf8_length(string) {
430
- var len = 0, c = 0;
431
- for (var i = 0; i < string.length; ++i) {
432
- c = string.charCodeAt(i);
433
- if (c < 128)
434
- len += 1;
435
- else if (c < 2048)
436
- len += 2;
437
- else if ((c & 64512) === 55296 && (string.charCodeAt(i + 1) & 64512) === 56320) {
438
- ++i;
439
- len += 4;
440
- } else
441
- len += 3;
442
- }
443
- return len;
444
- };
445
- utf8.read = function utf8_read(buffer, start, end) {
446
- var len = end - start;
447
- if (len < 1)
448
- return "";
449
- var parts = null, chunk = [], i = 0, t;
450
- while (start < end) {
451
- t = buffer[start++];
452
- if (t < 128)
453
- chunk[i++] = t;
454
- else if (t > 191 && t < 224)
455
- chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
456
- else if (t > 239 && t < 365) {
457
- t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 65536;
458
- chunk[i++] = 55296 + (t >> 10);
459
- chunk[i++] = 56320 + (t & 1023);
460
- } else
461
- chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
462
- if (i > 8191) {
463
- (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
464
- i = 0;
465
- }
466
- }
467
- if (parts) {
468
- if (i)
469
- parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
470
- return parts.join("");
471
- }
472
- return String.fromCharCode.apply(String, chunk.slice(0, i));
473
- };
474
- utf8.write = function utf8_write(string, buffer, offset) {
475
- var start = offset, c1, c2;
476
- for (var i = 0; i < string.length; ++i) {
477
- c1 = string.charCodeAt(i);
478
- if (c1 < 128) {
479
- buffer[offset++] = c1;
480
- } else if (c1 < 2048) {
481
- buffer[offset++] = c1 >> 6 | 192;
482
- buffer[offset++] = c1 & 63 | 128;
483
- } else if ((c1 & 64512) === 55296 && ((c2 = string.charCodeAt(i + 1)) & 64512) === 56320) {
484
- c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023);
485
- ++i;
486
- buffer[offset++] = c1 >> 18 | 240;
487
- buffer[offset++] = c1 >> 12 & 63 | 128;
488
- buffer[offset++] = c1 >> 6 & 63 | 128;
489
- buffer[offset++] = c1 & 63 | 128;
490
- } else {
491
- buffer[offset++] = c1 >> 12 | 224;
492
- buffer[offset++] = c1 >> 6 & 63 | 128;
493
- buffer[offset++] = c1 & 63 | 128;
494
- }
495
- }
496
- return offset - start;
497
- };
498
- }
499
- });
500
-
501
- // ../../node_modules/@protobufjs/pool/index.js
502
- var require_pool = __commonJS({
503
- "../../node_modules/@protobufjs/pool/index.js"(exports2, module2) {
504
- "use strict";
505
- module2.exports = pool;
506
- function pool(alloc, slice, size) {
507
- var SIZE = size || 8192;
508
- var MAX = SIZE >>> 1;
509
- var slab = null;
510
- var offset = SIZE;
511
- return function pool_alloc(size2) {
512
- if (size2 < 1 || size2 > MAX)
513
- return alloc(size2);
514
- if (offset + size2 > SIZE) {
515
- slab = alloc(SIZE);
516
- offset = 0;
517
- }
518
- var buf = slice.call(slab, offset, offset += size2);
519
- if (offset & 7)
520
- offset = (offset | 7) + 1;
521
- return buf;
522
- };
523
- }
524
- }
525
- });
526
-
527
- // ../../node_modules/protobufjs/src/util/longbits.js
528
- var require_longbits = __commonJS({
529
- "../../node_modules/protobufjs/src/util/longbits.js"(exports2, module2) {
530
- "use strict";
531
- module2.exports = LongBits;
532
- var util = require_minimal();
533
- function LongBits(lo, hi) {
534
- this.lo = lo >>> 0;
535
- this.hi = hi >>> 0;
536
- }
537
- var zero = LongBits.zero = new LongBits(0, 0);
538
- zero.toNumber = function() {
539
- return 0;
540
- };
541
- zero.zzEncode = zero.zzDecode = function() {
542
- return this;
543
- };
544
- zero.length = function() {
545
- return 1;
546
- };
547
- var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0";
548
- LongBits.fromNumber = function fromNumber(value) {
549
- if (value === 0)
550
- return zero;
551
- var sign = value < 0;
552
- if (sign)
553
- value = -value;
554
- var lo = value >>> 0, hi = (value - lo) / 4294967296 >>> 0;
555
- if (sign) {
556
- hi = ~hi >>> 0;
557
- lo = ~lo >>> 0;
558
- if (++lo > 4294967295) {
559
- lo = 0;
560
- if (++hi > 4294967295)
561
- hi = 0;
562
- }
563
- }
564
- return new LongBits(lo, hi);
565
- };
566
- LongBits.from = function from(value) {
567
- if (typeof value === "number")
568
- return LongBits.fromNumber(value);
569
- if (util.isString(value)) {
570
- if (util.Long)
571
- value = util.Long.fromString(value);
572
- else
573
- return LongBits.fromNumber(parseInt(value, 10));
574
- }
575
- return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;
576
- };
577
- LongBits.prototype.toNumber = function toNumber(unsigned) {
578
- if (!unsigned && this.hi >>> 31) {
579
- var lo = ~this.lo + 1 >>> 0, hi = ~this.hi >>> 0;
580
- if (!lo)
581
- hi = hi + 1 >>> 0;
582
- return -(lo + hi * 4294967296);
583
- }
584
- return this.lo + this.hi * 4294967296;
585
- };
586
- LongBits.prototype.toLong = function toLong(unsigned) {
587
- return util.Long ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };
588
- };
589
- var charCodeAt = String.prototype.charCodeAt;
590
- LongBits.fromHash = function fromHash(hash) {
591
- if (hash === zeroHash)
592
- return zero;
593
- return new LongBits(
594
- (charCodeAt.call(hash, 0) | charCodeAt.call(hash, 1) << 8 | charCodeAt.call(hash, 2) << 16 | charCodeAt.call(hash, 3) << 24) >>> 0,
595
- (charCodeAt.call(hash, 4) | charCodeAt.call(hash, 5) << 8 | charCodeAt.call(hash, 6) << 16 | charCodeAt.call(hash, 7) << 24) >>> 0
596
- );
597
- };
598
- LongBits.prototype.toHash = function toHash() {
599
- return String.fromCharCode(
600
- this.lo & 255,
601
- this.lo >>> 8 & 255,
602
- this.lo >>> 16 & 255,
603
- this.lo >>> 24,
604
- this.hi & 255,
605
- this.hi >>> 8 & 255,
606
- this.hi >>> 16 & 255,
607
- this.hi >>> 24
608
- );
609
- };
610
- LongBits.prototype.zzEncode = function zzEncode() {
611
- var mask = this.hi >> 31;
612
- this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;
613
- this.lo = (this.lo << 1 ^ mask) >>> 0;
614
- return this;
615
- };
616
- LongBits.prototype.zzDecode = function zzDecode() {
617
- var mask = -(this.lo & 1);
618
- this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;
619
- this.hi = (this.hi >>> 1 ^ mask) >>> 0;
620
- return this;
621
- };
622
- LongBits.prototype.length = function length() {
623
- var part0 = this.lo, part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, part2 = this.hi >>> 24;
624
- return part2 === 0 ? part1 === 0 ? part0 < 16384 ? part0 < 128 ? 1 : 2 : part0 < 2097152 ? 3 : 4 : part1 < 16384 ? part1 < 128 ? 5 : 6 : part1 < 2097152 ? 7 : 8 : part2 < 128 ? 9 : 10;
625
- };
626
- }
627
- });
628
-
629
- // ../../node_modules/protobufjs/src/util/minimal.js
630
- var require_minimal = __commonJS({
631
- "../../node_modules/protobufjs/src/util/minimal.js"(exports2) {
632
- "use strict";
633
- var util = exports2;
634
- util.asPromise = require_aspromise();
635
- util.base64 = require_base64();
636
- util.EventEmitter = require_eventemitter();
637
- util.float = require_float();
638
- util.inquire = require_inquire();
639
- util.utf8 = require_utf8();
640
- util.pool = require_pool();
641
- util.LongBits = require_longbits();
642
- util.isNode = Boolean(typeof global !== "undefined" && global && global.process && global.process.versions && global.process.versions.node);
643
- util.global = util.isNode && global || typeof window !== "undefined" && window || typeof self !== "undefined" && self || exports2;
644
- util.emptyArray = Object.freeze ? Object.freeze([]) : (
645
- /* istanbul ignore next */
646
- []
647
- );
648
- util.emptyObject = Object.freeze ? Object.freeze({}) : (
649
- /* istanbul ignore next */
650
- {}
651
- );
652
- util.isInteger = Number.isInteger || /* istanbul ignore next */
653
- function isInteger(value) {
654
- return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
655
- };
656
- util.isString = function isString(value) {
657
- return typeof value === "string" || value instanceof String;
658
- };
659
- util.isObject = function isObject2(value) {
660
- return value && typeof value === "object";
661
- };
662
- util.isset = /**
663
- * Checks if a property on a message is considered to be present.
664
- * @param {Object} obj Plain object or message instance
665
- * @param {string} prop Property name
666
- * @returns {boolean} `true` if considered to be present, otherwise `false`
667
- */
668
- util.isSet = function isSet5(obj, prop) {
669
- var value = obj[prop];
670
- if (value != null && obj.hasOwnProperty(prop))
671
- return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
672
- return false;
673
- };
674
- util.Buffer = function() {
675
- try {
676
- var Buffer2 = util.inquire("buffer").Buffer;
677
- return Buffer2.prototype.utf8Write ? Buffer2 : (
678
- /* istanbul ignore next */
679
- null
680
- );
681
- } catch (e) {
682
- return null;
683
- }
684
- }();
685
- util._Buffer_from = null;
686
- util._Buffer_allocUnsafe = null;
687
- util.newBuffer = function newBuffer(sizeOrArray) {
688
- return typeof sizeOrArray === "number" ? util.Buffer ? util._Buffer_allocUnsafe(sizeOrArray) : new util.Array(sizeOrArray) : util.Buffer ? util._Buffer_from(sizeOrArray) : typeof Uint8Array === "undefined" ? sizeOrArray : new Uint8Array(sizeOrArray);
689
- };
690
- util.Array = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
691
- util.Long = /* istanbul ignore next */
692
- util.global.dcodeIO && /* istanbul ignore next */
693
- util.global.dcodeIO.Long || /* istanbul ignore next */
694
- util.global.Long || util.inquire("long");
695
- util.key2Re = /^true|false|0|1$/;
696
- util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
697
- util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
698
- util.longToHash = function longToHash(value) {
699
- return value ? util.LongBits.from(value).toHash() : util.LongBits.zeroHash;
700
- };
701
- util.longFromHash = function longFromHash(hash, unsigned) {
702
- var bits = util.LongBits.fromHash(hash);
703
- if (util.Long)
704
- return util.Long.fromBits(bits.lo, bits.hi, unsigned);
705
- return bits.toNumber(Boolean(unsigned));
706
- };
707
- function merge(dst, src, ifNotSet) {
708
- for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
709
- if (dst[keys[i]] === void 0 || !ifNotSet)
710
- dst[keys[i]] = src[keys[i]];
711
- return dst;
712
- }
713
- util.merge = merge;
714
- util.lcFirst = function lcFirst(str) {
715
- return str.charAt(0).toLowerCase() + str.substring(1);
716
- };
717
- function newError(name) {
718
- function CustomError(message, properties) {
719
- if (!(this instanceof CustomError))
720
- return new CustomError(message, properties);
721
- Object.defineProperty(this, "message", { get: function() {
722
- return message;
723
- } });
724
- if (Error.captureStackTrace)
725
- Error.captureStackTrace(this, CustomError);
726
- else
727
- Object.defineProperty(this, "stack", { value: new Error().stack || "" });
728
- if (properties)
729
- merge(this, properties);
730
- }
731
- (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;
732
- Object.defineProperty(CustomError.prototype, "name", { get: function() {
733
- return name;
734
- } });
735
- CustomError.prototype.toString = function toString() {
736
- return this.name + ": " + this.message;
737
- };
738
- return CustomError;
739
- }
740
- util.newError = newError;
741
- util.ProtocolError = newError("ProtocolError");
742
- util.oneOfGetter = function getOneOf(fieldNames) {
743
- var fieldMap = {};
744
- for (var i = 0; i < fieldNames.length; ++i)
745
- fieldMap[fieldNames[i]] = 1;
746
- return function() {
747
- for (var keys = Object.keys(this), i2 = keys.length - 1; i2 > -1; --i2)
748
- if (fieldMap[keys[i2]] === 1 && this[keys[i2]] !== void 0 && this[keys[i2]] !== null)
749
- return keys[i2];
750
- };
751
- };
752
- util.oneOfSetter = function setOneOf(fieldNames) {
753
- return function(name) {
754
- for (var i = 0; i < fieldNames.length; ++i)
755
- if (fieldNames[i] !== name)
756
- delete this[fieldNames[i]];
757
- };
758
- };
759
- util.toJSONOptions = {
760
- longs: String,
761
- enums: String,
762
- bytes: String,
763
- json: true
764
- };
765
- util._configure = function() {
766
- var Buffer2 = util.Buffer;
767
- if (!Buffer2) {
768
- util._Buffer_from = util._Buffer_allocUnsafe = null;
769
- return;
770
- }
771
- util._Buffer_from = Buffer2.from !== Uint8Array.from && Buffer2.from || /* istanbul ignore next */
772
- function Buffer_from(value, encoding) {
773
- return new Buffer2(value, encoding);
774
- };
775
- util._Buffer_allocUnsafe = Buffer2.allocUnsafe || /* istanbul ignore next */
776
- function Buffer_allocUnsafe(size) {
777
- return new Buffer2(size);
778
- };
779
- };
780
- }
781
- });
782
-
783
- // ../../node_modules/protobufjs/src/writer.js
784
- var require_writer = __commonJS({
785
- "../../node_modules/protobufjs/src/writer.js"(exports2, module2) {
786
- "use strict";
787
- module2.exports = Writer;
788
- var util = require_minimal();
789
- var BufferWriter;
790
- var LongBits = util.LongBits;
791
- var base64 = util.base64;
792
- var utf8 = util.utf8;
793
- function Op(fn, len, val) {
794
- this.fn = fn;
795
- this.len = len;
796
- this.next = void 0;
797
- this.val = val;
798
- }
799
- function noop() {
800
- }
801
- function State(writer) {
802
- this.head = writer.head;
803
- this.tail = writer.tail;
804
- this.len = writer.len;
805
- this.next = writer.states;
806
- }
807
- function Writer() {
808
- this.len = 0;
809
- this.head = new Op(noop, 0, 0);
810
- this.tail = this.head;
811
- this.states = null;
812
- }
813
- var create = function create2() {
814
- return util.Buffer ? function create_buffer_setup() {
815
- return (Writer.create = function create_buffer() {
816
- return new BufferWriter();
817
- })();
818
- } : function create_array() {
819
- return new Writer();
820
- };
821
- };
822
- Writer.create = create();
823
- Writer.alloc = function alloc(size) {
824
- return new util.Array(size);
825
- };
826
- if (util.Array !== Array)
827
- Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
828
- Writer.prototype._push = function push(fn, len, val) {
829
- this.tail = this.tail.next = new Op(fn, len, val);
830
- this.len += len;
831
- return this;
832
- };
833
- function writeByte(val, buf, pos) {
834
- buf[pos] = val & 255;
835
- }
836
- function writeVarint32(val, buf, pos) {
837
- while (val > 127) {
838
- buf[pos++] = val & 127 | 128;
839
- val >>>= 7;
840
- }
841
- buf[pos] = val;
842
- }
843
- function VarintOp(len, val) {
844
- this.len = len;
845
- this.next = void 0;
846
- this.val = val;
847
- }
848
- VarintOp.prototype = Object.create(Op.prototype);
849
- VarintOp.prototype.fn = writeVarint32;
850
- Writer.prototype.uint32 = function write_uint32(value) {
851
- this.len += (this.tail = this.tail.next = new VarintOp(
852
- (value = value >>> 0) < 128 ? 1 : value < 16384 ? 2 : value < 2097152 ? 3 : value < 268435456 ? 4 : 5,
853
- value
854
- )).len;
855
- return this;
856
- };
857
- Writer.prototype.int32 = function write_int32(value) {
858
- return value < 0 ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) : this.uint32(value);
859
- };
860
- Writer.prototype.sint32 = function write_sint32(value) {
861
- return this.uint32((value << 1 ^ value >> 31) >>> 0);
862
- };
863
- function writeVarint64(val, buf, pos) {
864
- while (val.hi) {
865
- buf[pos++] = val.lo & 127 | 128;
866
- val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;
867
- val.hi >>>= 7;
868
- }
869
- while (val.lo > 127) {
870
- buf[pos++] = val.lo & 127 | 128;
871
- val.lo = val.lo >>> 7;
872
- }
873
- buf[pos++] = val.lo;
874
- }
875
- Writer.prototype.uint64 = function write_uint64(value) {
876
- var bits = LongBits.from(value);
877
- return this._push(writeVarint64, bits.length(), bits);
878
- };
879
- Writer.prototype.int64 = Writer.prototype.uint64;
880
- Writer.prototype.sint64 = function write_sint64(value) {
881
- var bits = LongBits.from(value).zzEncode();
882
- return this._push(writeVarint64, bits.length(), bits);
883
- };
884
- Writer.prototype.bool = function write_bool(value) {
885
- return this._push(writeByte, 1, value ? 1 : 0);
886
- };
887
- function writeFixed32(val, buf, pos) {
888
- buf[pos] = val & 255;
889
- buf[pos + 1] = val >>> 8 & 255;
890
- buf[pos + 2] = val >>> 16 & 255;
891
- buf[pos + 3] = val >>> 24;
892
- }
893
- Writer.prototype.fixed32 = function write_fixed32(value) {
894
- return this._push(writeFixed32, 4, value >>> 0);
895
- };
896
- Writer.prototype.sfixed32 = Writer.prototype.fixed32;
897
- Writer.prototype.fixed64 = function write_fixed64(value) {
898
- var bits = LongBits.from(value);
899
- return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
900
- };
901
- Writer.prototype.sfixed64 = Writer.prototype.fixed64;
902
- Writer.prototype.float = function write_float(value) {
903
- return this._push(util.float.writeFloatLE, 4, value);
904
- };
905
- Writer.prototype.double = function write_double(value) {
906
- return this._push(util.float.writeDoubleLE, 8, value);
907
- };
908
- var writeBytes = util.Array.prototype.set ? function writeBytes_set(val, buf, pos) {
909
- buf.set(val, pos);
910
- } : function writeBytes_for(val, buf, pos) {
911
- for (var i = 0; i < val.length; ++i)
912
- buf[pos + i] = val[i];
913
- };
914
- Writer.prototype.bytes = function write_bytes(value) {
915
- var len = value.length >>> 0;
916
- if (!len)
917
- return this._push(writeByte, 1, 0);
918
- if (util.isString(value)) {
919
- var buf = Writer.alloc(len = base64.length(value));
920
- base64.decode(value, buf, 0);
921
- value = buf;
922
- }
923
- return this.uint32(len)._push(writeBytes, len, value);
924
- };
925
- Writer.prototype.string = function write_string(value) {
926
- var len = utf8.length(value);
927
- return len ? this.uint32(len)._push(utf8.write, len, value) : this._push(writeByte, 1, 0);
928
- };
929
- Writer.prototype.fork = function fork() {
930
- this.states = new State(this);
931
- this.head = this.tail = new Op(noop, 0, 0);
932
- this.len = 0;
933
- return this;
934
- };
935
- Writer.prototype.reset = function reset() {
936
- if (this.states) {
937
- this.head = this.states.head;
938
- this.tail = this.states.tail;
939
- this.len = this.states.len;
940
- this.states = this.states.next;
941
- } else {
942
- this.head = this.tail = new Op(noop, 0, 0);
943
- this.len = 0;
944
- }
945
- return this;
946
- };
947
- Writer.prototype.ldelim = function ldelim() {
948
- var head = this.head, tail = this.tail, len = this.len;
949
- this.reset().uint32(len);
950
- if (len) {
951
- this.tail.next = head.next;
952
- this.tail = tail;
953
- this.len += len;
954
- }
955
- return this;
956
- };
957
- Writer.prototype.finish = function finish() {
958
- var head = this.head.next, buf = this.constructor.alloc(this.len), pos = 0;
959
- while (head) {
960
- head.fn(head.val, buf, pos);
961
- pos += head.len;
962
- head = head.next;
963
- }
964
- return buf;
965
- };
966
- Writer._configure = function(BufferWriter_) {
967
- BufferWriter = BufferWriter_;
968
- Writer.create = create();
969
- BufferWriter._configure();
970
- };
971
- }
972
- });
973
-
974
- // ../../node_modules/protobufjs/src/writer_buffer.js
975
- var require_writer_buffer = __commonJS({
976
- "../../node_modules/protobufjs/src/writer_buffer.js"(exports2, module2) {
977
- "use strict";
978
- module2.exports = BufferWriter;
979
- var Writer = require_writer();
980
- (BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
981
- var util = require_minimal();
982
- function BufferWriter() {
983
- Writer.call(this);
984
- }
985
- BufferWriter._configure = function() {
986
- BufferWriter.alloc = util._Buffer_allocUnsafe;
987
- BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" ? function writeBytesBuffer_set(val, buf, pos) {
988
- buf.set(val, pos);
989
- } : function writeBytesBuffer_copy(val, buf, pos) {
990
- if (val.copy)
991
- val.copy(buf, pos, 0, val.length);
992
- else
993
- for (var i = 0; i < val.length; )
994
- buf[pos++] = val[i++];
995
- };
996
- };
997
- BufferWriter.prototype.bytes = function write_bytes_buffer(value) {
998
- if (util.isString(value))
999
- value = util._Buffer_from(value, "base64");
1000
- var len = value.length >>> 0;
1001
- this.uint32(len);
1002
- if (len)
1003
- this._push(BufferWriter.writeBytesBuffer, len, value);
1004
- return this;
1005
- };
1006
- function writeStringBuffer(val, buf, pos) {
1007
- if (val.length < 40)
1008
- util.utf8.write(val, buf, pos);
1009
- else if (buf.utf8Write)
1010
- buf.utf8Write(val, pos);
1011
- else
1012
- buf.write(val, pos);
1013
- }
1014
- BufferWriter.prototype.string = function write_string_buffer(value) {
1015
- var len = util.Buffer.byteLength(value);
1016
- this.uint32(len);
1017
- if (len)
1018
- this._push(writeStringBuffer, len, value);
1019
- return this;
1020
- };
1021
- BufferWriter._configure();
1022
- }
1023
- });
1024
-
1025
- // ../../node_modules/protobufjs/src/reader.js
1026
- var require_reader = __commonJS({
1027
- "../../node_modules/protobufjs/src/reader.js"(exports2, module2) {
1028
- "use strict";
1029
- module2.exports = Reader;
1030
- var util = require_minimal();
1031
- var BufferReader;
1032
- var LongBits = util.LongBits;
1033
- var utf8 = util.utf8;
1034
- function indexOutOfRange(reader, writeLength) {
1035
- return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
1036
- }
1037
- function Reader(buffer) {
1038
- this.buf = buffer;
1039
- this.pos = 0;
1040
- this.len = buffer.length;
1041
- }
1042
- var create_array = typeof Uint8Array !== "undefined" ? function create_typed_array(buffer) {
1043
- if (buffer instanceof Uint8Array || Array.isArray(buffer))
1044
- return new Reader(buffer);
1045
- throw Error("illegal buffer");
1046
- } : function create_array2(buffer) {
1047
- if (Array.isArray(buffer))
1048
- return new Reader(buffer);
1049
- throw Error("illegal buffer");
1050
- };
1051
- var create = function create2() {
1052
- return util.Buffer ? function create_buffer_setup(buffer) {
1053
- return (Reader.create = function create_buffer(buffer2) {
1054
- return util.Buffer.isBuffer(buffer2) ? new BufferReader(buffer2) : create_array(buffer2);
1055
- })(buffer);
1056
- } : create_array;
1057
- };
1058
- Reader.create = create();
1059
- Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */
1060
- util.Array.prototype.slice;
1061
- Reader.prototype.uint32 = function read_uint32_setup() {
1062
- var value = 4294967295;
1063
- return function read_uint32() {
1064
- value = (this.buf[this.pos] & 127) >>> 0;
1065
- if (this.buf[this.pos++] < 128)
1066
- return value;
1067
- value = (value | (this.buf[this.pos] & 127) << 7) >>> 0;
1068
- if (this.buf[this.pos++] < 128)
1069
- return value;
1070
- value = (value | (this.buf[this.pos] & 127) << 14) >>> 0;
1071
- if (this.buf[this.pos++] < 128)
1072
- return value;
1073
- value = (value | (this.buf[this.pos] & 127) << 21) >>> 0;
1074
- if (this.buf[this.pos++] < 128)
1075
- return value;
1076
- value = (value | (this.buf[this.pos] & 15) << 28) >>> 0;
1077
- if (this.buf[this.pos++] < 128)
1078
- return value;
1079
- if ((this.pos += 5) > this.len) {
1080
- this.pos = this.len;
1081
- throw indexOutOfRange(this, 10);
1082
- }
1083
- return value;
1084
- };
1085
- }();
1086
- Reader.prototype.int32 = function read_int32() {
1087
- return this.uint32() | 0;
1088
- };
1089
- Reader.prototype.sint32 = function read_sint32() {
1090
- var value = this.uint32();
1091
- return value >>> 1 ^ -(value & 1) | 0;
1092
- };
1093
- function readLongVarint() {
1094
- var bits = new LongBits(0, 0);
1095
- var i = 0;
1096
- if (this.len - this.pos > 4) {
1097
- for (; i < 4; ++i) {
1098
- bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
1099
- if (this.buf[this.pos++] < 128)
1100
- return bits;
1101
- }
1102
- bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
1103
- bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
1104
- if (this.buf[this.pos++] < 128)
1105
- return bits;
1106
- i = 0;
1107
- } else {
1108
- for (; i < 3; ++i) {
1109
- if (this.pos >= this.len)
1110
- throw indexOutOfRange(this);
1111
- bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
1112
- if (this.buf[this.pos++] < 128)
1113
- return bits;
1114
- }
1115
- bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
1116
- return bits;
1117
- }
1118
- if (this.len - this.pos > 4) {
1119
- for (; i < 5; ++i) {
1120
- bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
1121
- if (this.buf[this.pos++] < 128)
1122
- return bits;
1123
- }
1124
- } else {
1125
- for (; i < 5; ++i) {
1126
- if (this.pos >= this.len)
1127
- throw indexOutOfRange(this);
1128
- bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
1129
- if (this.buf[this.pos++] < 128)
1130
- return bits;
1131
- }
1132
- }
1133
- throw Error("invalid varint encoding");
1134
- }
1135
- Reader.prototype.bool = function read_bool() {
1136
- return this.uint32() !== 0;
1137
- };
1138
- function readFixed32_end(buf, end) {
1139
- return (buf[end - 4] | buf[end - 3] << 8 | buf[end - 2] << 16 | buf[end - 1] << 24) >>> 0;
1140
- }
1141
- Reader.prototype.fixed32 = function read_fixed32() {
1142
- if (this.pos + 4 > this.len)
1143
- throw indexOutOfRange(this, 4);
1144
- return readFixed32_end(this.buf, this.pos += 4);
1145
- };
1146
- Reader.prototype.sfixed32 = function read_sfixed32() {
1147
- if (this.pos + 4 > this.len)
1148
- throw indexOutOfRange(this, 4);
1149
- return readFixed32_end(this.buf, this.pos += 4) | 0;
1150
- };
1151
- function readFixed64() {
1152
- if (this.pos + 8 > this.len)
1153
- throw indexOutOfRange(this, 8);
1154
- return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));
1155
- }
1156
- Reader.prototype.float = function read_float() {
1157
- if (this.pos + 4 > this.len)
1158
- throw indexOutOfRange(this, 4);
1159
- var value = util.float.readFloatLE(this.buf, this.pos);
1160
- this.pos += 4;
1161
- return value;
1162
- };
1163
- Reader.prototype.double = function read_double() {
1164
- if (this.pos + 8 > this.len)
1165
- throw indexOutOfRange(this, 4);
1166
- var value = util.float.readDoubleLE(this.buf, this.pos);
1167
- this.pos += 8;
1168
- return value;
1169
- };
1170
- Reader.prototype.bytes = function read_bytes() {
1171
- var length = this.uint32(), start = this.pos, end = this.pos + length;
1172
- if (end > this.len)
1173
- throw indexOutOfRange(this, length);
1174
- this.pos += length;
1175
- if (Array.isArray(this.buf))
1176
- return this.buf.slice(start, end);
1177
- return start === end ? new this.buf.constructor(0) : this._slice.call(this.buf, start, end);
1178
- };
1179
- Reader.prototype.string = function read_string() {
1180
- var bytes = this.bytes();
1181
- return utf8.read(bytes, 0, bytes.length);
1182
- };
1183
- Reader.prototype.skip = function skip(length) {
1184
- if (typeof length === "number") {
1185
- if (this.pos + length > this.len)
1186
- throw indexOutOfRange(this, length);
1187
- this.pos += length;
1188
- } else {
1189
- do {
1190
- if (this.pos >= this.len)
1191
- throw indexOutOfRange(this);
1192
- } while (this.buf[this.pos++] & 128);
1193
- }
1194
- return this;
1195
- };
1196
- Reader.prototype.skipType = function(wireType) {
1197
- switch (wireType) {
1198
- case 0:
1199
- this.skip();
1200
- break;
1201
- case 1:
1202
- this.skip(8);
1203
- break;
1204
- case 2:
1205
- this.skip(this.uint32());
1206
- break;
1207
- case 3:
1208
- while ((wireType = this.uint32() & 7) !== 4) {
1209
- this.skipType(wireType);
1210
- }
1211
- break;
1212
- case 5:
1213
- this.skip(4);
1214
- break;
1215
- default:
1216
- throw Error("invalid wire type " + wireType + " at offset " + this.pos);
1217
- }
1218
- return this;
1219
- };
1220
- Reader._configure = function(BufferReader_) {
1221
- BufferReader = BufferReader_;
1222
- Reader.create = create();
1223
- BufferReader._configure();
1224
- var fn = util.Long ? "toLong" : (
1225
- /* istanbul ignore next */
1226
- "toNumber"
1227
- );
1228
- util.merge(Reader.prototype, {
1229
- int64: function read_int64() {
1230
- return readLongVarint.call(this)[fn](false);
1231
- },
1232
- uint64: function read_uint64() {
1233
- return readLongVarint.call(this)[fn](true);
1234
- },
1235
- sint64: function read_sint64() {
1236
- return readLongVarint.call(this).zzDecode()[fn](false);
1237
- },
1238
- fixed64: function read_fixed64() {
1239
- return readFixed64.call(this)[fn](true);
1240
- },
1241
- sfixed64: function read_sfixed64() {
1242
- return readFixed64.call(this)[fn](false);
1243
- }
1244
- });
1245
- };
1246
- }
1247
- });
1248
-
1249
- // ../../node_modules/protobufjs/src/reader_buffer.js
1250
- var require_reader_buffer = __commonJS({
1251
- "../../node_modules/protobufjs/src/reader_buffer.js"(exports2, module2) {
1252
- "use strict";
1253
- module2.exports = BufferReader;
1254
- var Reader = require_reader();
1255
- (BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;
1256
- var util = require_minimal();
1257
- function BufferReader(buffer) {
1258
- Reader.call(this, buffer);
1259
- }
1260
- BufferReader._configure = function() {
1261
- if (util.Buffer)
1262
- BufferReader.prototype._slice = util.Buffer.prototype.slice;
1263
- };
1264
- BufferReader.prototype.string = function read_string_buffer() {
1265
- var len = this.uint32();
1266
- return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len));
1267
- };
1268
- BufferReader._configure();
1269
- }
1270
- });
1271
-
1272
- // ../../node_modules/protobufjs/src/rpc/service.js
1273
- var require_service = __commonJS({
1274
- "../../node_modules/protobufjs/src/rpc/service.js"(exports2, module2) {
1275
- "use strict";
1276
- module2.exports = Service;
1277
- var util = require_minimal();
1278
- (Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;
1279
- function Service(rpcImpl, requestDelimited, responseDelimited) {
1280
- if (typeof rpcImpl !== "function")
1281
- throw TypeError("rpcImpl must be a function");
1282
- util.EventEmitter.call(this);
1283
- this.rpcImpl = rpcImpl;
1284
- this.requestDelimited = Boolean(requestDelimited);
1285
- this.responseDelimited = Boolean(responseDelimited);
1286
- }
1287
- Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {
1288
- if (!request)
1289
- throw TypeError("request must be specified");
1290
- var self2 = this;
1291
- if (!callback)
1292
- return util.asPromise(rpcCall, self2, method, requestCtor, responseCtor, request);
1293
- if (!self2.rpcImpl) {
1294
- setTimeout(function() {
1295
- callback(Error("already ended"));
1296
- }, 0);
1297
- return void 0;
1298
- }
1299
- try {
1300
- return self2.rpcImpl(
1301
- method,
1302
- requestCtor[self2.requestDelimited ? "encodeDelimited" : "encode"](request).finish(),
1303
- function rpcCallback(err, response) {
1304
- if (err) {
1305
- self2.emit("error", err, method);
1306
- return callback(err);
1307
- }
1308
- if (response === null) {
1309
- self2.end(
1310
- /* endedByRPC */
1311
- true
1312
- );
1313
- return void 0;
1314
- }
1315
- if (!(response instanceof responseCtor)) {
1316
- try {
1317
- response = responseCtor[self2.responseDelimited ? "decodeDelimited" : "decode"](response);
1318
- } catch (err2) {
1319
- self2.emit("error", err2, method);
1320
- return callback(err2);
1321
- }
1322
- }
1323
- self2.emit("data", response, method);
1324
- return callback(null, response);
1325
- }
1326
- );
1327
- } catch (err) {
1328
- self2.emit("error", err, method);
1329
- setTimeout(function() {
1330
- callback(err);
1331
- }, 0);
1332
- return void 0;
1333
- }
1334
- };
1335
- Service.prototype.end = function end(endedByRPC) {
1336
- if (this.rpcImpl) {
1337
- if (!endedByRPC)
1338
- this.rpcImpl(null, null, null);
1339
- this.rpcImpl = null;
1340
- this.emit("end").off();
1341
- }
1342
- return this;
1343
- };
1344
- }
1345
- });
1346
-
1347
- // ../../node_modules/protobufjs/src/rpc.js
1348
- var require_rpc = __commonJS({
1349
- "../../node_modules/protobufjs/src/rpc.js"(exports2) {
1350
- "use strict";
1351
- var rpc = exports2;
1352
- rpc.Service = require_service();
1353
- }
1354
- });
1355
-
1356
- // ../../node_modules/protobufjs/src/roots.js
1357
- var require_roots = __commonJS({
1358
- "../../node_modules/protobufjs/src/roots.js"(exports2, module2) {
1359
- "use strict";
1360
- module2.exports = {};
1361
- }
1362
- });
1363
-
1364
- // ../../node_modules/protobufjs/src/index-minimal.js
1365
- var require_index_minimal = __commonJS({
1366
- "../../node_modules/protobufjs/src/index-minimal.js"(exports2) {
1367
- "use strict";
1368
- var protobuf = exports2;
1369
- protobuf.build = "minimal";
1370
- protobuf.Writer = require_writer();
1371
- protobuf.BufferWriter = require_writer_buffer();
1372
- protobuf.Reader = require_reader();
1373
- protobuf.BufferReader = require_reader_buffer();
1374
- protobuf.util = require_minimal();
1375
- protobuf.rpc = require_rpc();
1376
- protobuf.roots = require_roots();
1377
- protobuf.configure = configure;
1378
- function configure() {
1379
- protobuf.util._configure();
1380
- protobuf.Writer._configure(protobuf.BufferWriter);
1381
- protobuf.Reader._configure(protobuf.BufferReader);
1382
- }
1383
- configure();
1384
- }
1385
- });
1386
-
1387
- // ../../node_modules/protobufjs/minimal.js
1388
- var require_minimal2 = __commonJS({
1389
- "../../node_modules/protobufjs/minimal.js"(exports2, module2) {
1390
- "use strict";
1391
- module2.exports = require_index_minimal();
1392
- }
1393
- });
1394
-
1395
27
  // ../../node_modules/long/src/long.js
1396
28
  var require_long = __commonJS({
1397
29
  "../../node_modules/long/src/long.js"(exports2, module2) {
1398
- module2.exports = Long4;
30
+ module2.exports = Long5;
1399
31
  var wasm = null;
1400
32
  try {
1401
33
  wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([
@@ -1688,574 +320,1943 @@ var require_long = __commonJS({
1688
320
  ])), {}).exports;
1689
321
  } catch (e) {
1690
322
  }
1691
- function Long4(low, high, unsigned) {
1692
- this.low = low | 0;
1693
- this.high = high | 0;
1694
- this.unsigned = !!unsigned;
323
+ function Long5(low, high, unsigned) {
324
+ this.low = low | 0;
325
+ this.high = high | 0;
326
+ this.unsigned = !!unsigned;
327
+ }
328
+ Long5.prototype.__isLong__;
329
+ Object.defineProperty(Long5.prototype, "__isLong__", { value: true });
330
+ function isLong(obj) {
331
+ return (obj && obj["__isLong__"]) === true;
332
+ }
333
+ Long5.isLong = isLong;
334
+ var INT_CACHE = {};
335
+ var UINT_CACHE = {};
336
+ function fromInt(value, unsigned) {
337
+ var obj, cachedObj, cache;
338
+ if (unsigned) {
339
+ value >>>= 0;
340
+ if (cache = 0 <= value && value < 256) {
341
+ cachedObj = UINT_CACHE[value];
342
+ if (cachedObj)
343
+ return cachedObj;
344
+ }
345
+ obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);
346
+ if (cache)
347
+ UINT_CACHE[value] = obj;
348
+ return obj;
349
+ } else {
350
+ value |= 0;
351
+ if (cache = -128 <= value && value < 128) {
352
+ cachedObj = INT_CACHE[value];
353
+ if (cachedObj)
354
+ return cachedObj;
355
+ }
356
+ obj = fromBits(value, value < 0 ? -1 : 0, false);
357
+ if (cache)
358
+ INT_CACHE[value] = obj;
359
+ return obj;
360
+ }
361
+ }
362
+ Long5.fromInt = fromInt;
363
+ function fromNumber(value, unsigned) {
364
+ if (isNaN(value))
365
+ return unsigned ? UZERO : ZERO;
366
+ if (unsigned) {
367
+ if (value < 0)
368
+ return UZERO;
369
+ if (value >= TWO_PWR_64_DBL)
370
+ return MAX_UNSIGNED_VALUE;
371
+ } else {
372
+ if (value <= -TWO_PWR_63_DBL)
373
+ return MIN_VALUE;
374
+ if (value + 1 >= TWO_PWR_63_DBL)
375
+ return MAX_VALUE;
376
+ }
377
+ if (value < 0)
378
+ return fromNumber(-value, unsigned).neg();
379
+ return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned);
380
+ }
381
+ Long5.fromNumber = fromNumber;
382
+ function fromBits(lowBits, highBits, unsigned) {
383
+ return new Long5(lowBits, highBits, unsigned);
384
+ }
385
+ Long5.fromBits = fromBits;
386
+ var pow_dbl = Math.pow;
387
+ function fromString(str, unsigned, radix) {
388
+ if (str.length === 0)
389
+ throw Error("empty string");
390
+ if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity")
391
+ return ZERO;
392
+ if (typeof unsigned === "number") {
393
+ radix = unsigned, unsigned = false;
394
+ } else {
395
+ unsigned = !!unsigned;
396
+ }
397
+ radix = radix || 10;
398
+ if (radix < 2 || 36 < radix)
399
+ throw RangeError("radix");
400
+ var p;
401
+ if ((p = str.indexOf("-")) > 0)
402
+ throw Error("interior hyphen");
403
+ else if (p === 0) {
404
+ return fromString(str.substring(1), unsigned, radix).neg();
405
+ }
406
+ var radixToPower = fromNumber(pow_dbl(radix, 8));
407
+ var result = ZERO;
408
+ for (var i = 0; i < str.length; i += 8) {
409
+ var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
410
+ if (size < 8) {
411
+ var power = fromNumber(pow_dbl(radix, size));
412
+ result = result.mul(power).add(fromNumber(value));
413
+ } else {
414
+ result = result.mul(radixToPower);
415
+ result = result.add(fromNumber(value));
416
+ }
417
+ }
418
+ result.unsigned = unsigned;
419
+ return result;
420
+ }
421
+ Long5.fromString = fromString;
422
+ function fromValue(val, unsigned) {
423
+ if (typeof val === "number")
424
+ return fromNumber(val, unsigned);
425
+ if (typeof val === "string")
426
+ return fromString(val, unsigned);
427
+ return fromBits(val.low, val.high, typeof unsigned === "boolean" ? unsigned : val.unsigned);
428
+ }
429
+ Long5.fromValue = fromValue;
430
+ var TWO_PWR_16_DBL = 1 << 16;
431
+ var TWO_PWR_24_DBL = 1 << 24;
432
+ var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
433
+ var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
434
+ var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
435
+ var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
436
+ var ZERO = fromInt(0);
437
+ Long5.ZERO = ZERO;
438
+ var UZERO = fromInt(0, true);
439
+ Long5.UZERO = UZERO;
440
+ var ONE = fromInt(1);
441
+ Long5.ONE = ONE;
442
+ var UONE = fromInt(1, true);
443
+ Long5.UONE = UONE;
444
+ var NEG_ONE = fromInt(-1);
445
+ Long5.NEG_ONE = NEG_ONE;
446
+ var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);
447
+ Long5.MAX_VALUE = MAX_VALUE;
448
+ var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);
449
+ Long5.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
450
+ var MIN_VALUE = fromBits(0, 2147483648 | 0, false);
451
+ Long5.MIN_VALUE = MIN_VALUE;
452
+ var LongPrototype = Long5.prototype;
453
+ LongPrototype.toInt = function toInt() {
454
+ return this.unsigned ? this.low >>> 0 : this.low;
455
+ };
456
+ LongPrototype.toNumber = function toNumber() {
457
+ if (this.unsigned)
458
+ return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
459
+ return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
460
+ };
461
+ LongPrototype.toString = function toString(radix) {
462
+ radix = radix || 10;
463
+ if (radix < 2 || 36 < radix)
464
+ throw RangeError("radix");
465
+ if (this.isZero())
466
+ return "0";
467
+ if (this.isNegative()) {
468
+ if (this.eq(MIN_VALUE)) {
469
+ var radixLong = fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
470
+ return div.toString(radix) + rem1.toInt().toString(radix);
471
+ } else
472
+ return "-" + this.neg().toString(radix);
473
+ }
474
+ var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;
475
+ var result = "";
476
+ while (true) {
477
+ var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);
478
+ rem = remDiv;
479
+ if (rem.isZero())
480
+ return digits + result;
481
+ else {
482
+ while (digits.length < 6)
483
+ digits = "0" + digits;
484
+ result = "" + digits + result;
485
+ }
486
+ }
487
+ };
488
+ LongPrototype.getHighBits = function getHighBits() {
489
+ return this.high;
490
+ };
491
+ LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {
492
+ return this.high >>> 0;
493
+ };
494
+ LongPrototype.getLowBits = function getLowBits() {
495
+ return this.low;
496
+ };
497
+ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {
498
+ return this.low >>> 0;
499
+ };
500
+ LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
501
+ if (this.isNegative())
502
+ return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
503
+ var val = this.high != 0 ? this.high : this.low;
504
+ for (var bit = 31; bit > 0; bit--)
505
+ if ((val & 1 << bit) != 0)
506
+ break;
507
+ return this.high != 0 ? bit + 33 : bit + 1;
508
+ };
509
+ LongPrototype.isZero = function isZero() {
510
+ return this.high === 0 && this.low === 0;
511
+ };
512
+ LongPrototype.eqz = LongPrototype.isZero;
513
+ LongPrototype.isNegative = function isNegative() {
514
+ return !this.unsigned && this.high < 0;
515
+ };
516
+ LongPrototype.isPositive = function isPositive() {
517
+ return this.unsigned || this.high >= 0;
518
+ };
519
+ LongPrototype.isOdd = function isOdd() {
520
+ return (this.low & 1) === 1;
521
+ };
522
+ LongPrototype.isEven = function isEven() {
523
+ return (this.low & 1) === 0;
524
+ };
525
+ LongPrototype.equals = function equals(other) {
526
+ if (!isLong(other))
527
+ other = fromValue(other);
528
+ if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
529
+ return false;
530
+ return this.high === other.high && this.low === other.low;
531
+ };
532
+ LongPrototype.eq = LongPrototype.equals;
533
+ LongPrototype.notEquals = function notEquals(other) {
534
+ return !this.eq(
535
+ /* validates */
536
+ other
537
+ );
538
+ };
539
+ LongPrototype.neq = LongPrototype.notEquals;
540
+ LongPrototype.ne = LongPrototype.notEquals;
541
+ LongPrototype.lessThan = function lessThan(other) {
542
+ return this.comp(
543
+ /* validates */
544
+ other
545
+ ) < 0;
546
+ };
547
+ LongPrototype.lt = LongPrototype.lessThan;
548
+ LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
549
+ return this.comp(
550
+ /* validates */
551
+ other
552
+ ) <= 0;
553
+ };
554
+ LongPrototype.lte = LongPrototype.lessThanOrEqual;
555
+ LongPrototype.le = LongPrototype.lessThanOrEqual;
556
+ LongPrototype.greaterThan = function greaterThan(other) {
557
+ return this.comp(
558
+ /* validates */
559
+ other
560
+ ) > 0;
561
+ };
562
+ LongPrototype.gt = LongPrototype.greaterThan;
563
+ LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
564
+ return this.comp(
565
+ /* validates */
566
+ other
567
+ ) >= 0;
568
+ };
569
+ LongPrototype.gte = LongPrototype.greaterThanOrEqual;
570
+ LongPrototype.ge = LongPrototype.greaterThanOrEqual;
571
+ LongPrototype.compare = function compare(other) {
572
+ if (!isLong(other))
573
+ other = fromValue(other);
574
+ if (this.eq(other))
575
+ return 0;
576
+ var thisNeg = this.isNegative(), otherNeg = other.isNegative();
577
+ if (thisNeg && !otherNeg)
578
+ return -1;
579
+ if (!thisNeg && otherNeg)
580
+ return 1;
581
+ if (!this.unsigned)
582
+ return this.sub(other).isNegative() ? -1 : 1;
583
+ return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;
584
+ };
585
+ LongPrototype.comp = LongPrototype.compare;
586
+ LongPrototype.negate = function negate() {
587
+ if (!this.unsigned && this.eq(MIN_VALUE))
588
+ return MIN_VALUE;
589
+ return this.not().add(ONE);
590
+ };
591
+ LongPrototype.neg = LongPrototype.negate;
592
+ LongPrototype.add = function add(addend) {
593
+ if (!isLong(addend))
594
+ addend = fromValue(addend);
595
+ var a48 = this.high >>> 16;
596
+ var a32 = this.high & 65535;
597
+ var a16 = this.low >>> 16;
598
+ var a00 = this.low & 65535;
599
+ var b48 = addend.high >>> 16;
600
+ var b32 = addend.high & 65535;
601
+ var b16 = addend.low >>> 16;
602
+ var b00 = addend.low & 65535;
603
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
604
+ c00 += a00 + b00;
605
+ c16 += c00 >>> 16;
606
+ c00 &= 65535;
607
+ c16 += a16 + b16;
608
+ c32 += c16 >>> 16;
609
+ c16 &= 65535;
610
+ c32 += a32 + b32;
611
+ c48 += c32 >>> 16;
612
+ c32 &= 65535;
613
+ c48 += a48 + b48;
614
+ c48 &= 65535;
615
+ return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
616
+ };
617
+ LongPrototype.subtract = function subtract(subtrahend) {
618
+ if (!isLong(subtrahend))
619
+ subtrahend = fromValue(subtrahend);
620
+ return this.add(subtrahend.neg());
621
+ };
622
+ LongPrototype.sub = LongPrototype.subtract;
623
+ LongPrototype.multiply = function multiply(multiplier) {
624
+ if (this.isZero())
625
+ return ZERO;
626
+ if (!isLong(multiplier))
627
+ multiplier = fromValue(multiplier);
628
+ if (wasm) {
629
+ var low = wasm.mul(
630
+ this.low,
631
+ this.high,
632
+ multiplier.low,
633
+ multiplier.high
634
+ );
635
+ return fromBits(low, wasm.get_high(), this.unsigned);
636
+ }
637
+ if (multiplier.isZero())
638
+ return ZERO;
639
+ if (this.eq(MIN_VALUE))
640
+ return multiplier.isOdd() ? MIN_VALUE : ZERO;
641
+ if (multiplier.eq(MIN_VALUE))
642
+ return this.isOdd() ? MIN_VALUE : ZERO;
643
+ if (this.isNegative()) {
644
+ if (multiplier.isNegative())
645
+ return this.neg().mul(multiplier.neg());
646
+ else
647
+ return this.neg().mul(multiplier).neg();
648
+ } else if (multiplier.isNegative())
649
+ return this.mul(multiplier.neg()).neg();
650
+ if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
651
+ return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
652
+ var a48 = this.high >>> 16;
653
+ var a32 = this.high & 65535;
654
+ var a16 = this.low >>> 16;
655
+ var a00 = this.low & 65535;
656
+ var b48 = multiplier.high >>> 16;
657
+ var b32 = multiplier.high & 65535;
658
+ var b16 = multiplier.low >>> 16;
659
+ var b00 = multiplier.low & 65535;
660
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
661
+ c00 += a00 * b00;
662
+ c16 += c00 >>> 16;
663
+ c00 &= 65535;
664
+ c16 += a16 * b00;
665
+ c32 += c16 >>> 16;
666
+ c16 &= 65535;
667
+ c16 += a00 * b16;
668
+ c32 += c16 >>> 16;
669
+ c16 &= 65535;
670
+ c32 += a32 * b00;
671
+ c48 += c32 >>> 16;
672
+ c32 &= 65535;
673
+ c32 += a16 * b16;
674
+ c48 += c32 >>> 16;
675
+ c32 &= 65535;
676
+ c32 += a00 * b32;
677
+ c48 += c32 >>> 16;
678
+ c32 &= 65535;
679
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
680
+ c48 &= 65535;
681
+ return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
682
+ };
683
+ LongPrototype.mul = LongPrototype.multiply;
684
+ LongPrototype.divide = function divide(divisor) {
685
+ if (!isLong(divisor))
686
+ divisor = fromValue(divisor);
687
+ if (divisor.isZero())
688
+ throw Error("division by zero");
689
+ if (wasm) {
690
+ if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {
691
+ return this;
692
+ }
693
+ var low = (this.unsigned ? wasm.div_u : wasm.div_s)(
694
+ this.low,
695
+ this.high,
696
+ divisor.low,
697
+ divisor.high
698
+ );
699
+ return fromBits(low, wasm.get_high(), this.unsigned);
700
+ }
701
+ if (this.isZero())
702
+ return this.unsigned ? UZERO : ZERO;
703
+ var approx, rem, res;
704
+ if (!this.unsigned) {
705
+ if (this.eq(MIN_VALUE)) {
706
+ if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
707
+ return MIN_VALUE;
708
+ else if (divisor.eq(MIN_VALUE))
709
+ return ONE;
710
+ else {
711
+ var halfThis = this.shr(1);
712
+ approx = halfThis.div(divisor).shl(1);
713
+ if (approx.eq(ZERO)) {
714
+ return divisor.isNegative() ? ONE : NEG_ONE;
715
+ } else {
716
+ rem = this.sub(divisor.mul(approx));
717
+ res = approx.add(rem.div(divisor));
718
+ return res;
719
+ }
720
+ }
721
+ } else if (divisor.eq(MIN_VALUE))
722
+ return this.unsigned ? UZERO : ZERO;
723
+ if (this.isNegative()) {
724
+ if (divisor.isNegative())
725
+ return this.neg().div(divisor.neg());
726
+ return this.neg().div(divisor).neg();
727
+ } else if (divisor.isNegative())
728
+ return this.div(divisor.neg()).neg();
729
+ res = ZERO;
730
+ } else {
731
+ if (!divisor.unsigned)
732
+ divisor = divisor.toUnsigned();
733
+ if (divisor.gt(this))
734
+ return UZERO;
735
+ if (divisor.gt(this.shru(1)))
736
+ return UONE;
737
+ res = UZERO;
738
+ }
739
+ rem = this;
740
+ while (rem.gte(divisor)) {
741
+ approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
742
+ var log2 = Math.ceil(Math.log(approx) / Math.LN2), delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48), approxRes = fromNumber(approx), approxRem = approxRes.mul(divisor);
743
+ while (approxRem.isNegative() || approxRem.gt(rem)) {
744
+ approx -= delta;
745
+ approxRes = fromNumber(approx, this.unsigned);
746
+ approxRem = approxRes.mul(divisor);
747
+ }
748
+ if (approxRes.isZero())
749
+ approxRes = ONE;
750
+ res = res.add(approxRes);
751
+ rem = rem.sub(approxRem);
752
+ }
753
+ return res;
754
+ };
755
+ LongPrototype.div = LongPrototype.divide;
756
+ LongPrototype.modulo = function modulo(divisor) {
757
+ if (!isLong(divisor))
758
+ divisor = fromValue(divisor);
759
+ if (wasm) {
760
+ var low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(
761
+ this.low,
762
+ this.high,
763
+ divisor.low,
764
+ divisor.high
765
+ );
766
+ return fromBits(low, wasm.get_high(), this.unsigned);
767
+ }
768
+ return this.sub(this.div(divisor).mul(divisor));
769
+ };
770
+ LongPrototype.mod = LongPrototype.modulo;
771
+ LongPrototype.rem = LongPrototype.modulo;
772
+ LongPrototype.not = function not() {
773
+ return fromBits(~this.low, ~this.high, this.unsigned);
774
+ };
775
+ LongPrototype.and = function and(other) {
776
+ if (!isLong(other))
777
+ other = fromValue(other);
778
+ return fromBits(this.low & other.low, this.high & other.high, this.unsigned);
779
+ };
780
+ LongPrototype.or = function or(other) {
781
+ if (!isLong(other))
782
+ other = fromValue(other);
783
+ return fromBits(this.low | other.low, this.high | other.high, this.unsigned);
784
+ };
785
+ LongPrototype.xor = function xor(other) {
786
+ if (!isLong(other))
787
+ other = fromValue(other);
788
+ return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
789
+ };
790
+ LongPrototype.shiftLeft = function shiftLeft(numBits) {
791
+ if (isLong(numBits))
792
+ numBits = numBits.toInt();
793
+ if ((numBits &= 63) === 0)
794
+ return this;
795
+ else if (numBits < 32)
796
+ return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned);
797
+ else
798
+ return fromBits(0, this.low << numBits - 32, this.unsigned);
799
+ };
800
+ LongPrototype.shl = LongPrototype.shiftLeft;
801
+ LongPrototype.shiftRight = function shiftRight(numBits) {
802
+ if (isLong(numBits))
803
+ numBits = numBits.toInt();
804
+ if ((numBits &= 63) === 0)
805
+ return this;
806
+ else if (numBits < 32)
807
+ return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned);
808
+ else
809
+ return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned);
810
+ };
811
+ LongPrototype.shr = LongPrototype.shiftRight;
812
+ LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
813
+ if (isLong(numBits))
814
+ numBits = numBits.toInt();
815
+ numBits &= 63;
816
+ if (numBits === 0)
817
+ return this;
818
+ else {
819
+ var high = this.high;
820
+ if (numBits < 32) {
821
+ var low = this.low;
822
+ return fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits, this.unsigned);
823
+ } else if (numBits === 32)
824
+ return fromBits(high, 0, this.unsigned);
825
+ else
826
+ return fromBits(high >>> numBits - 32, 0, this.unsigned);
827
+ }
828
+ };
829
+ LongPrototype.shru = LongPrototype.shiftRightUnsigned;
830
+ LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
831
+ LongPrototype.toSigned = function toSigned() {
832
+ if (!this.unsigned)
833
+ return this;
834
+ return fromBits(this.low, this.high, false);
835
+ };
836
+ LongPrototype.toUnsigned = function toUnsigned() {
837
+ if (this.unsigned)
838
+ return this;
839
+ return fromBits(this.low, this.high, true);
840
+ };
841
+ LongPrototype.toBytes = function toBytes(le) {
842
+ return le ? this.toBytesLE() : this.toBytesBE();
843
+ };
844
+ LongPrototype.toBytesLE = function toBytesLE() {
845
+ var hi = this.high, lo = this.low;
846
+ return [
847
+ lo & 255,
848
+ lo >>> 8 & 255,
849
+ lo >>> 16 & 255,
850
+ lo >>> 24,
851
+ hi & 255,
852
+ hi >>> 8 & 255,
853
+ hi >>> 16 & 255,
854
+ hi >>> 24
855
+ ];
856
+ };
857
+ LongPrototype.toBytesBE = function toBytesBE() {
858
+ var hi = this.high, lo = this.low;
859
+ return [
860
+ hi >>> 24,
861
+ hi >>> 16 & 255,
862
+ hi >>> 8 & 255,
863
+ hi & 255,
864
+ lo >>> 24,
865
+ lo >>> 16 & 255,
866
+ lo >>> 8 & 255,
867
+ lo & 255
868
+ ];
869
+ };
870
+ Long5.fromBytes = function fromBytes(bytes, unsigned, le) {
871
+ return le ? Long5.fromBytesLE(bytes, unsigned) : Long5.fromBytesBE(bytes, unsigned);
872
+ };
873
+ Long5.fromBytesLE = function fromBytesLE(bytes, unsigned) {
874
+ return new Long5(
875
+ bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24,
876
+ bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24,
877
+ unsigned
878
+ );
879
+ };
880
+ Long5.fromBytesBE = function fromBytesBE(bytes, unsigned) {
881
+ return new Long5(
882
+ bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7],
883
+ bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3],
884
+ unsigned
885
+ );
886
+ };
887
+ }
888
+ });
889
+
890
+ // ../../node_modules/@protobufjs/aspromise/index.js
891
+ var require_aspromise = __commonJS({
892
+ "../../node_modules/@protobufjs/aspromise/index.js"(exports2, module2) {
893
+ "use strict";
894
+ module2.exports = asPromise;
895
+ function asPromise(fn, ctx) {
896
+ var params = new Array(arguments.length - 1), offset = 0, index = 2, pending = true;
897
+ while (index < arguments.length)
898
+ params[offset++] = arguments[index++];
899
+ return new Promise(function executor(resolve, reject) {
900
+ params[offset] = function callback(err) {
901
+ if (pending) {
902
+ pending = false;
903
+ if (err)
904
+ reject(err);
905
+ else {
906
+ var params2 = new Array(arguments.length - 1), offset2 = 0;
907
+ while (offset2 < params2.length)
908
+ params2[offset2++] = arguments[offset2];
909
+ resolve.apply(null, params2);
910
+ }
911
+ }
912
+ };
913
+ try {
914
+ fn.apply(ctx || null, params);
915
+ } catch (err) {
916
+ if (pending) {
917
+ pending = false;
918
+ reject(err);
919
+ }
920
+ }
921
+ });
922
+ }
923
+ }
924
+ });
925
+
926
+ // ../../node_modules/@protobufjs/base64/index.js
927
+ var require_base64 = __commonJS({
928
+ "../../node_modules/@protobufjs/base64/index.js"(exports2) {
929
+ "use strict";
930
+ var base64 = exports2;
931
+ base64.length = function length(string) {
932
+ var p = string.length;
933
+ if (!p)
934
+ return 0;
935
+ var n = 0;
936
+ while (--p % 4 > 1 && string.charAt(p) === "=")
937
+ ++n;
938
+ return Math.ceil(string.length * 3) / 4 - n;
939
+ };
940
+ var b64 = new Array(64);
941
+ var s64 = new Array(123);
942
+ for (i = 0; i < 64; )
943
+ s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
944
+ var i;
945
+ base64.encode = function encode(buffer, start, end) {
946
+ var parts = null, chunk = [];
947
+ var i2 = 0, j = 0, t;
948
+ while (start < end) {
949
+ var b = buffer[start++];
950
+ switch (j) {
951
+ case 0:
952
+ chunk[i2++] = b64[b >> 2];
953
+ t = (b & 3) << 4;
954
+ j = 1;
955
+ break;
956
+ case 1:
957
+ chunk[i2++] = b64[t | b >> 4];
958
+ t = (b & 15) << 2;
959
+ j = 2;
960
+ break;
961
+ case 2:
962
+ chunk[i2++] = b64[t | b >> 6];
963
+ chunk[i2++] = b64[b & 63];
964
+ j = 0;
965
+ break;
966
+ }
967
+ if (i2 > 8191) {
968
+ (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
969
+ i2 = 0;
970
+ }
971
+ }
972
+ if (j) {
973
+ chunk[i2++] = b64[t];
974
+ chunk[i2++] = 61;
975
+ if (j === 1)
976
+ chunk[i2++] = 61;
977
+ }
978
+ if (parts) {
979
+ if (i2)
980
+ parts.push(String.fromCharCode.apply(String, chunk.slice(0, i2)));
981
+ return parts.join("");
982
+ }
983
+ return String.fromCharCode.apply(String, chunk.slice(0, i2));
984
+ };
985
+ var invalidEncoding = "invalid encoding";
986
+ base64.decode = function decode(string, buffer, offset) {
987
+ var start = offset;
988
+ var j = 0, t;
989
+ for (var i2 = 0; i2 < string.length; ) {
990
+ var c = string.charCodeAt(i2++);
991
+ if (c === 61 && j > 1)
992
+ break;
993
+ if ((c = s64[c]) === void 0)
994
+ throw Error(invalidEncoding);
995
+ switch (j) {
996
+ case 0:
997
+ t = c;
998
+ j = 1;
999
+ break;
1000
+ case 1:
1001
+ buffer[offset++] = t << 2 | (c & 48) >> 4;
1002
+ t = c;
1003
+ j = 2;
1004
+ break;
1005
+ case 2:
1006
+ buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
1007
+ t = c;
1008
+ j = 3;
1009
+ break;
1010
+ case 3:
1011
+ buffer[offset++] = (t & 3) << 6 | c;
1012
+ j = 0;
1013
+ break;
1014
+ }
1015
+ }
1016
+ if (j === 1)
1017
+ throw Error(invalidEncoding);
1018
+ return offset - start;
1019
+ };
1020
+ base64.test = function test(string) {
1021
+ return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
1022
+ };
1023
+ }
1024
+ });
1025
+
1026
+ // ../../node_modules/@protobufjs/eventemitter/index.js
1027
+ var require_eventemitter = __commonJS({
1028
+ "../../node_modules/@protobufjs/eventemitter/index.js"(exports2, module2) {
1029
+ "use strict";
1030
+ module2.exports = EventEmitter;
1031
+ function EventEmitter() {
1032
+ this._listeners = {};
1033
+ }
1034
+ EventEmitter.prototype.on = function on(evt, fn, ctx) {
1035
+ (this._listeners[evt] || (this._listeners[evt] = [])).push({
1036
+ fn,
1037
+ ctx: ctx || this
1038
+ });
1039
+ return this;
1040
+ };
1041
+ EventEmitter.prototype.off = function off(evt, fn) {
1042
+ if (evt === void 0)
1043
+ this._listeners = {};
1044
+ else {
1045
+ if (fn === void 0)
1046
+ this._listeners[evt] = [];
1047
+ else {
1048
+ var listeners = this._listeners[evt];
1049
+ for (var i = 0; i < listeners.length; )
1050
+ if (listeners[i].fn === fn)
1051
+ listeners.splice(i, 1);
1052
+ else
1053
+ ++i;
1054
+ }
1055
+ }
1056
+ return this;
1057
+ };
1058
+ EventEmitter.prototype.emit = function emit(evt) {
1059
+ var listeners = this._listeners[evt];
1060
+ if (listeners) {
1061
+ var args = [], i = 1;
1062
+ for (; i < arguments.length; )
1063
+ args.push(arguments[i++]);
1064
+ for (i = 0; i < listeners.length; )
1065
+ listeners[i].fn.apply(listeners[i++].ctx, args);
1066
+ }
1067
+ return this;
1068
+ };
1069
+ }
1070
+ });
1071
+
1072
+ // ../../node_modules/@protobufjs/float/index.js
1073
+ var require_float = __commonJS({
1074
+ "../../node_modules/@protobufjs/float/index.js"(exports2, module2) {
1075
+ "use strict";
1076
+ module2.exports = factory(factory);
1077
+ function factory(exports3) {
1078
+ if (typeof Float32Array !== "undefined")
1079
+ (function() {
1080
+ var f32 = new Float32Array([-0]), f8b = new Uint8Array(f32.buffer), le = f8b[3] === 128;
1081
+ function writeFloat_f32_cpy(val, buf, pos) {
1082
+ f32[0] = val;
1083
+ buf[pos] = f8b[0];
1084
+ buf[pos + 1] = f8b[1];
1085
+ buf[pos + 2] = f8b[2];
1086
+ buf[pos + 3] = f8b[3];
1087
+ }
1088
+ function writeFloat_f32_rev(val, buf, pos) {
1089
+ f32[0] = val;
1090
+ buf[pos] = f8b[3];
1091
+ buf[pos + 1] = f8b[2];
1092
+ buf[pos + 2] = f8b[1];
1093
+ buf[pos + 3] = f8b[0];
1094
+ }
1095
+ exports3.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
1096
+ exports3.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
1097
+ function readFloat_f32_cpy(buf, pos) {
1098
+ f8b[0] = buf[pos];
1099
+ f8b[1] = buf[pos + 1];
1100
+ f8b[2] = buf[pos + 2];
1101
+ f8b[3] = buf[pos + 3];
1102
+ return f32[0];
1103
+ }
1104
+ function readFloat_f32_rev(buf, pos) {
1105
+ f8b[3] = buf[pos];
1106
+ f8b[2] = buf[pos + 1];
1107
+ f8b[1] = buf[pos + 2];
1108
+ f8b[0] = buf[pos + 3];
1109
+ return f32[0];
1110
+ }
1111
+ exports3.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
1112
+ exports3.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
1113
+ })();
1114
+ else
1115
+ (function() {
1116
+ function writeFloat_ieee754(writeUint, val, buf, pos) {
1117
+ var sign = val < 0 ? 1 : 0;
1118
+ if (sign)
1119
+ val = -val;
1120
+ if (val === 0)
1121
+ writeUint(1 / val > 0 ? (
1122
+ /* positive */
1123
+ 0
1124
+ ) : (
1125
+ /* negative 0 */
1126
+ 2147483648
1127
+ ), buf, pos);
1128
+ else if (isNaN(val))
1129
+ writeUint(2143289344, buf, pos);
1130
+ else if (val > 34028234663852886e22)
1131
+ writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
1132
+ else if (val < 11754943508222875e-54)
1133
+ writeUint((sign << 31 | Math.round(val / 1401298464324817e-60)) >>> 0, buf, pos);
1134
+ else {
1135
+ var exponent = Math.floor(Math.log(val) / Math.LN2), mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
1136
+ writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
1137
+ }
1138
+ }
1139
+ exports3.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
1140
+ exports3.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
1141
+ function readFloat_ieee754(readUint, buf, pos) {
1142
+ var uint = readUint(buf, pos), sign = (uint >> 31) * 2 + 1, exponent = uint >>> 23 & 255, mantissa = uint & 8388607;
1143
+ return exponent === 255 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 1401298464324817e-60 * mantissa : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
1144
+ }
1145
+ exports3.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
1146
+ exports3.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
1147
+ })();
1148
+ if (typeof Float64Array !== "undefined")
1149
+ (function() {
1150
+ var f64 = new Float64Array([-0]), f8b = new Uint8Array(f64.buffer), le = f8b[7] === 128;
1151
+ function writeDouble_f64_cpy(val, buf, pos) {
1152
+ f64[0] = val;
1153
+ buf[pos] = f8b[0];
1154
+ buf[pos + 1] = f8b[1];
1155
+ buf[pos + 2] = f8b[2];
1156
+ buf[pos + 3] = f8b[3];
1157
+ buf[pos + 4] = f8b[4];
1158
+ buf[pos + 5] = f8b[5];
1159
+ buf[pos + 6] = f8b[6];
1160
+ buf[pos + 7] = f8b[7];
1161
+ }
1162
+ function writeDouble_f64_rev(val, buf, pos) {
1163
+ f64[0] = val;
1164
+ buf[pos] = f8b[7];
1165
+ buf[pos + 1] = f8b[6];
1166
+ buf[pos + 2] = f8b[5];
1167
+ buf[pos + 3] = f8b[4];
1168
+ buf[pos + 4] = f8b[3];
1169
+ buf[pos + 5] = f8b[2];
1170
+ buf[pos + 6] = f8b[1];
1171
+ buf[pos + 7] = f8b[0];
1172
+ }
1173
+ exports3.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
1174
+ exports3.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
1175
+ function readDouble_f64_cpy(buf, pos) {
1176
+ f8b[0] = buf[pos];
1177
+ f8b[1] = buf[pos + 1];
1178
+ f8b[2] = buf[pos + 2];
1179
+ f8b[3] = buf[pos + 3];
1180
+ f8b[4] = buf[pos + 4];
1181
+ f8b[5] = buf[pos + 5];
1182
+ f8b[6] = buf[pos + 6];
1183
+ f8b[7] = buf[pos + 7];
1184
+ return f64[0];
1185
+ }
1186
+ function readDouble_f64_rev(buf, pos) {
1187
+ f8b[7] = buf[pos];
1188
+ f8b[6] = buf[pos + 1];
1189
+ f8b[5] = buf[pos + 2];
1190
+ f8b[4] = buf[pos + 3];
1191
+ f8b[3] = buf[pos + 4];
1192
+ f8b[2] = buf[pos + 5];
1193
+ f8b[1] = buf[pos + 6];
1194
+ f8b[0] = buf[pos + 7];
1195
+ return f64[0];
1196
+ }
1197
+ exports3.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
1198
+ exports3.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
1199
+ })();
1200
+ else
1201
+ (function() {
1202
+ function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
1203
+ var sign = val < 0 ? 1 : 0;
1204
+ if (sign)
1205
+ val = -val;
1206
+ if (val === 0) {
1207
+ writeUint(0, buf, pos + off0);
1208
+ writeUint(1 / val > 0 ? (
1209
+ /* positive */
1210
+ 0
1211
+ ) : (
1212
+ /* negative 0 */
1213
+ 2147483648
1214
+ ), buf, pos + off1);
1215
+ } else if (isNaN(val)) {
1216
+ writeUint(0, buf, pos + off0);
1217
+ writeUint(2146959360, buf, pos + off1);
1218
+ } else if (val > 17976931348623157e292) {
1219
+ writeUint(0, buf, pos + off0);
1220
+ writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
1221
+ } else {
1222
+ var mantissa;
1223
+ if (val < 22250738585072014e-324) {
1224
+ mantissa = val / 5e-324;
1225
+ writeUint(mantissa >>> 0, buf, pos + off0);
1226
+ writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
1227
+ } else {
1228
+ var exponent = Math.floor(Math.log(val) / Math.LN2);
1229
+ if (exponent === 1024)
1230
+ exponent = 1023;
1231
+ mantissa = val * Math.pow(2, -exponent);
1232
+ writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
1233
+ writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
1234
+ }
1235
+ }
1236
+ }
1237
+ exports3.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
1238
+ exports3.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
1239
+ function readDouble_ieee754(readUint, off0, off1, buf, pos) {
1240
+ var lo = readUint(buf, pos + off0), hi = readUint(buf, pos + off1);
1241
+ var sign = (hi >> 31) * 2 + 1, exponent = hi >>> 20 & 2047, mantissa = 4294967296 * (hi & 1048575) + lo;
1242
+ return exponent === 2047 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 5e-324 * mantissa : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
1243
+ }
1244
+ exports3.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
1245
+ exports3.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
1246
+ })();
1247
+ return exports3;
1248
+ }
1249
+ function writeUintLE(val, buf, pos) {
1250
+ buf[pos] = val & 255;
1251
+ buf[pos + 1] = val >>> 8 & 255;
1252
+ buf[pos + 2] = val >>> 16 & 255;
1253
+ buf[pos + 3] = val >>> 24;
1254
+ }
1255
+ function writeUintBE(val, buf, pos) {
1256
+ buf[pos] = val >>> 24;
1257
+ buf[pos + 1] = val >>> 16 & 255;
1258
+ buf[pos + 2] = val >>> 8 & 255;
1259
+ buf[pos + 3] = val & 255;
1260
+ }
1261
+ function readUintLE(buf, pos) {
1262
+ return (buf[pos] | buf[pos + 1] << 8 | buf[pos + 2] << 16 | buf[pos + 3] << 24) >>> 0;
1263
+ }
1264
+ function readUintBE(buf, pos) {
1265
+ return (buf[pos] << 24 | buf[pos + 1] << 16 | buf[pos + 2] << 8 | buf[pos + 3]) >>> 0;
1266
+ }
1267
+ }
1268
+ });
1269
+
1270
+ // ../../node_modules/@protobufjs/inquire/index.js
1271
+ var require_inquire = __commonJS({
1272
+ "../../node_modules/@protobufjs/inquire/index.js"(exports, module) {
1273
+ "use strict";
1274
+ module.exports = inquire;
1275
+ function inquire(moduleName) {
1276
+ try {
1277
+ var mod = eval("quire".replace(/^/, "re"))(moduleName);
1278
+ if (mod && (mod.length || Object.keys(mod).length))
1279
+ return mod;
1280
+ } catch (e) {
1281
+ }
1282
+ return null;
1283
+ }
1284
+ }
1285
+ });
1286
+
1287
+ // ../../node_modules/@protobufjs/utf8/index.js
1288
+ var require_utf8 = __commonJS({
1289
+ "../../node_modules/@protobufjs/utf8/index.js"(exports2) {
1290
+ "use strict";
1291
+ var utf8 = exports2;
1292
+ utf8.length = function utf8_length(string) {
1293
+ var len = 0, c = 0;
1294
+ for (var i = 0; i < string.length; ++i) {
1295
+ c = string.charCodeAt(i);
1296
+ if (c < 128)
1297
+ len += 1;
1298
+ else if (c < 2048)
1299
+ len += 2;
1300
+ else if ((c & 64512) === 55296 && (string.charCodeAt(i + 1) & 64512) === 56320) {
1301
+ ++i;
1302
+ len += 4;
1303
+ } else
1304
+ len += 3;
1305
+ }
1306
+ return len;
1307
+ };
1308
+ utf8.read = function utf8_read(buffer, start, end) {
1309
+ var len = end - start;
1310
+ if (len < 1)
1311
+ return "";
1312
+ var parts = null, chunk = [], i = 0, t;
1313
+ while (start < end) {
1314
+ t = buffer[start++];
1315
+ if (t < 128)
1316
+ chunk[i++] = t;
1317
+ else if (t > 191 && t < 224)
1318
+ chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
1319
+ else if (t > 239 && t < 365) {
1320
+ t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 65536;
1321
+ chunk[i++] = 55296 + (t >> 10);
1322
+ chunk[i++] = 56320 + (t & 1023);
1323
+ } else
1324
+ chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
1325
+ if (i > 8191) {
1326
+ (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
1327
+ i = 0;
1328
+ }
1329
+ }
1330
+ if (parts) {
1331
+ if (i)
1332
+ parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
1333
+ return parts.join("");
1334
+ }
1335
+ return String.fromCharCode.apply(String, chunk.slice(0, i));
1336
+ };
1337
+ utf8.write = function utf8_write(string, buffer, offset) {
1338
+ var start = offset, c1, c2;
1339
+ for (var i = 0; i < string.length; ++i) {
1340
+ c1 = string.charCodeAt(i);
1341
+ if (c1 < 128) {
1342
+ buffer[offset++] = c1;
1343
+ } else if (c1 < 2048) {
1344
+ buffer[offset++] = c1 >> 6 | 192;
1345
+ buffer[offset++] = c1 & 63 | 128;
1346
+ } else if ((c1 & 64512) === 55296 && ((c2 = string.charCodeAt(i + 1)) & 64512) === 56320) {
1347
+ c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023);
1348
+ ++i;
1349
+ buffer[offset++] = c1 >> 18 | 240;
1350
+ buffer[offset++] = c1 >> 12 & 63 | 128;
1351
+ buffer[offset++] = c1 >> 6 & 63 | 128;
1352
+ buffer[offset++] = c1 & 63 | 128;
1353
+ } else {
1354
+ buffer[offset++] = c1 >> 12 | 224;
1355
+ buffer[offset++] = c1 >> 6 & 63 | 128;
1356
+ buffer[offset++] = c1 & 63 | 128;
1357
+ }
1358
+ }
1359
+ return offset - start;
1360
+ };
1361
+ }
1362
+ });
1363
+
1364
+ // ../../node_modules/@protobufjs/pool/index.js
1365
+ var require_pool = __commonJS({
1366
+ "../../node_modules/@protobufjs/pool/index.js"(exports2, module2) {
1367
+ "use strict";
1368
+ module2.exports = pool;
1369
+ function pool(alloc, slice, size) {
1370
+ var SIZE = size || 8192;
1371
+ var MAX = SIZE >>> 1;
1372
+ var slab = null;
1373
+ var offset = SIZE;
1374
+ return function pool_alloc(size2) {
1375
+ if (size2 < 1 || size2 > MAX)
1376
+ return alloc(size2);
1377
+ if (offset + size2 > SIZE) {
1378
+ slab = alloc(SIZE);
1379
+ offset = 0;
1380
+ }
1381
+ var buf = slice.call(slab, offset, offset += size2);
1382
+ if (offset & 7)
1383
+ offset = (offset | 7) + 1;
1384
+ return buf;
1385
+ };
1386
+ }
1387
+ }
1388
+ });
1389
+
1390
+ // ../../node_modules/protobufjs/src/util/longbits.js
1391
+ var require_longbits = __commonJS({
1392
+ "../../node_modules/protobufjs/src/util/longbits.js"(exports2, module2) {
1393
+ "use strict";
1394
+ module2.exports = LongBits;
1395
+ var util = require_minimal();
1396
+ function LongBits(lo, hi) {
1397
+ this.lo = lo >>> 0;
1398
+ this.hi = hi >>> 0;
1399
+ }
1400
+ var zero = LongBits.zero = new LongBits(0, 0);
1401
+ zero.toNumber = function() {
1402
+ return 0;
1403
+ };
1404
+ zero.zzEncode = zero.zzDecode = function() {
1405
+ return this;
1406
+ };
1407
+ zero.length = function() {
1408
+ return 1;
1409
+ };
1410
+ var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0";
1411
+ LongBits.fromNumber = function fromNumber(value) {
1412
+ if (value === 0)
1413
+ return zero;
1414
+ var sign = value < 0;
1415
+ if (sign)
1416
+ value = -value;
1417
+ var lo = value >>> 0, hi = (value - lo) / 4294967296 >>> 0;
1418
+ if (sign) {
1419
+ hi = ~hi >>> 0;
1420
+ lo = ~lo >>> 0;
1421
+ if (++lo > 4294967295) {
1422
+ lo = 0;
1423
+ if (++hi > 4294967295)
1424
+ hi = 0;
1425
+ }
1426
+ }
1427
+ return new LongBits(lo, hi);
1428
+ };
1429
+ LongBits.from = function from(value) {
1430
+ if (typeof value === "number")
1431
+ return LongBits.fromNumber(value);
1432
+ if (util.isString(value)) {
1433
+ if (util.Long)
1434
+ value = util.Long.fromString(value);
1435
+ else
1436
+ return LongBits.fromNumber(parseInt(value, 10));
1437
+ }
1438
+ return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;
1439
+ };
1440
+ LongBits.prototype.toNumber = function toNumber(unsigned) {
1441
+ if (!unsigned && this.hi >>> 31) {
1442
+ var lo = ~this.lo + 1 >>> 0, hi = ~this.hi >>> 0;
1443
+ if (!lo)
1444
+ hi = hi + 1 >>> 0;
1445
+ return -(lo + hi * 4294967296);
1446
+ }
1447
+ return this.lo + this.hi * 4294967296;
1448
+ };
1449
+ LongBits.prototype.toLong = function toLong(unsigned) {
1450
+ return util.Long ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };
1451
+ };
1452
+ var charCodeAt = String.prototype.charCodeAt;
1453
+ LongBits.fromHash = function fromHash(hash) {
1454
+ if (hash === zeroHash)
1455
+ return zero;
1456
+ return new LongBits(
1457
+ (charCodeAt.call(hash, 0) | charCodeAt.call(hash, 1) << 8 | charCodeAt.call(hash, 2) << 16 | charCodeAt.call(hash, 3) << 24) >>> 0,
1458
+ (charCodeAt.call(hash, 4) | charCodeAt.call(hash, 5) << 8 | charCodeAt.call(hash, 6) << 16 | charCodeAt.call(hash, 7) << 24) >>> 0
1459
+ );
1460
+ };
1461
+ LongBits.prototype.toHash = function toHash() {
1462
+ return String.fromCharCode(
1463
+ this.lo & 255,
1464
+ this.lo >>> 8 & 255,
1465
+ this.lo >>> 16 & 255,
1466
+ this.lo >>> 24,
1467
+ this.hi & 255,
1468
+ this.hi >>> 8 & 255,
1469
+ this.hi >>> 16 & 255,
1470
+ this.hi >>> 24
1471
+ );
1472
+ };
1473
+ LongBits.prototype.zzEncode = function zzEncode() {
1474
+ var mask = this.hi >> 31;
1475
+ this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;
1476
+ this.lo = (this.lo << 1 ^ mask) >>> 0;
1477
+ return this;
1478
+ };
1479
+ LongBits.prototype.zzDecode = function zzDecode() {
1480
+ var mask = -(this.lo & 1);
1481
+ this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;
1482
+ this.hi = (this.hi >>> 1 ^ mask) >>> 0;
1483
+ return this;
1484
+ };
1485
+ LongBits.prototype.length = function length() {
1486
+ var part0 = this.lo, part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, part2 = this.hi >>> 24;
1487
+ return part2 === 0 ? part1 === 0 ? part0 < 16384 ? part0 < 128 ? 1 : 2 : part0 < 2097152 ? 3 : 4 : part1 < 16384 ? part1 < 128 ? 5 : 6 : part1 < 2097152 ? 7 : 8 : part2 < 128 ? 9 : 10;
1488
+ };
1489
+ }
1490
+ });
1491
+
1492
+ // ../../node_modules/protobufjs/src/util/minimal.js
1493
+ var require_minimal = __commonJS({
1494
+ "../../node_modules/protobufjs/src/util/minimal.js"(exports2) {
1495
+ "use strict";
1496
+ var util = exports2;
1497
+ util.asPromise = require_aspromise();
1498
+ util.base64 = require_base64();
1499
+ util.EventEmitter = require_eventemitter();
1500
+ util.float = require_float();
1501
+ util.inquire = require_inquire();
1502
+ util.utf8 = require_utf8();
1503
+ util.pool = require_pool();
1504
+ util.LongBits = require_longbits();
1505
+ util.isNode = Boolean(typeof global !== "undefined" && global && global.process && global.process.versions && global.process.versions.node);
1506
+ util.global = util.isNode && global || typeof window !== "undefined" && window || typeof self !== "undefined" && self || exports2;
1507
+ util.emptyArray = Object.freeze ? Object.freeze([]) : (
1508
+ /* istanbul ignore next */
1509
+ []
1510
+ );
1511
+ util.emptyObject = Object.freeze ? Object.freeze({}) : (
1512
+ /* istanbul ignore next */
1513
+ {}
1514
+ );
1515
+ util.isInteger = Number.isInteger || /* istanbul ignore next */
1516
+ function isInteger(value) {
1517
+ return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
1518
+ };
1519
+ util.isString = function isString(value) {
1520
+ return typeof value === "string" || value instanceof String;
1521
+ };
1522
+ util.isObject = function isObject2(value) {
1523
+ return value && typeof value === "object";
1524
+ };
1525
+ util.isset = /**
1526
+ * Checks if a property on a message is considered to be present.
1527
+ * @param {Object} obj Plain object or message instance
1528
+ * @param {string} prop Property name
1529
+ * @returns {boolean} `true` if considered to be present, otherwise `false`
1530
+ */
1531
+ util.isSet = function isSet5(obj, prop) {
1532
+ var value = obj[prop];
1533
+ if (value != null && obj.hasOwnProperty(prop))
1534
+ return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
1535
+ return false;
1536
+ };
1537
+ util.Buffer = function() {
1538
+ try {
1539
+ var Buffer2 = util.inquire("buffer").Buffer;
1540
+ return Buffer2.prototype.utf8Write ? Buffer2 : (
1541
+ /* istanbul ignore next */
1542
+ null
1543
+ );
1544
+ } catch (e) {
1545
+ return null;
1546
+ }
1547
+ }();
1548
+ util._Buffer_from = null;
1549
+ util._Buffer_allocUnsafe = null;
1550
+ util.newBuffer = function newBuffer(sizeOrArray) {
1551
+ return typeof sizeOrArray === "number" ? util.Buffer ? util._Buffer_allocUnsafe(sizeOrArray) : new util.Array(sizeOrArray) : util.Buffer ? util._Buffer_from(sizeOrArray) : typeof Uint8Array === "undefined" ? sizeOrArray : new Uint8Array(sizeOrArray);
1552
+ };
1553
+ util.Array = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
1554
+ util.Long = /* istanbul ignore next */
1555
+ util.global.dcodeIO && /* istanbul ignore next */
1556
+ util.global.dcodeIO.Long || /* istanbul ignore next */
1557
+ util.global.Long || util.inquire("long");
1558
+ util.key2Re = /^true|false|0|1$/;
1559
+ util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
1560
+ util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
1561
+ util.longToHash = function longToHash(value) {
1562
+ return value ? util.LongBits.from(value).toHash() : util.LongBits.zeroHash;
1563
+ };
1564
+ util.longFromHash = function longFromHash(hash, unsigned) {
1565
+ var bits = util.LongBits.fromHash(hash);
1566
+ if (util.Long)
1567
+ return util.Long.fromBits(bits.lo, bits.hi, unsigned);
1568
+ return bits.toNumber(Boolean(unsigned));
1569
+ };
1570
+ function merge(dst, src, ifNotSet) {
1571
+ for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
1572
+ if (dst[keys[i]] === void 0 || !ifNotSet)
1573
+ dst[keys[i]] = src[keys[i]];
1574
+ return dst;
1695
1575
  }
1696
- Long4.prototype.__isLong__;
1697
- Object.defineProperty(Long4.prototype, "__isLong__", { value: true });
1698
- function isLong(obj) {
1699
- return (obj && obj["__isLong__"]) === true;
1576
+ util.merge = merge;
1577
+ util.lcFirst = function lcFirst(str) {
1578
+ return str.charAt(0).toLowerCase() + str.substring(1);
1579
+ };
1580
+ function newError(name) {
1581
+ function CustomError(message, properties) {
1582
+ if (!(this instanceof CustomError))
1583
+ return new CustomError(message, properties);
1584
+ Object.defineProperty(this, "message", { get: function() {
1585
+ return message;
1586
+ } });
1587
+ if (Error.captureStackTrace)
1588
+ Error.captureStackTrace(this, CustomError);
1589
+ else
1590
+ Object.defineProperty(this, "stack", { value: new Error().stack || "" });
1591
+ if (properties)
1592
+ merge(this, properties);
1593
+ }
1594
+ (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;
1595
+ Object.defineProperty(CustomError.prototype, "name", { get: function() {
1596
+ return name;
1597
+ } });
1598
+ CustomError.prototype.toString = function toString() {
1599
+ return this.name + ": " + this.message;
1600
+ };
1601
+ return CustomError;
1700
1602
  }
1701
- Long4.isLong = isLong;
1702
- var INT_CACHE = {};
1703
- var UINT_CACHE = {};
1704
- function fromInt(value, unsigned) {
1705
- var obj, cachedObj, cache;
1706
- if (unsigned) {
1707
- value >>>= 0;
1708
- if (cache = 0 <= value && value < 256) {
1709
- cachedObj = UINT_CACHE[value];
1710
- if (cachedObj)
1711
- return cachedObj;
1712
- }
1713
- obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);
1714
- if (cache)
1715
- UINT_CACHE[value] = obj;
1716
- return obj;
1717
- } else {
1718
- value |= 0;
1719
- if (cache = -128 <= value && value < 128) {
1720
- cachedObj = INT_CACHE[value];
1721
- if (cachedObj)
1722
- return cachedObj;
1723
- }
1724
- obj = fromBits(value, value < 0 ? -1 : 0, false);
1725
- if (cache)
1726
- INT_CACHE[value] = obj;
1727
- return obj;
1603
+ util.newError = newError;
1604
+ util.ProtocolError = newError("ProtocolError");
1605
+ util.oneOfGetter = function getOneOf(fieldNames) {
1606
+ var fieldMap = {};
1607
+ for (var i = 0; i < fieldNames.length; ++i)
1608
+ fieldMap[fieldNames[i]] = 1;
1609
+ return function() {
1610
+ for (var keys = Object.keys(this), i2 = keys.length - 1; i2 > -1; --i2)
1611
+ if (fieldMap[keys[i2]] === 1 && this[keys[i2]] !== void 0 && this[keys[i2]] !== null)
1612
+ return keys[i2];
1613
+ };
1614
+ };
1615
+ util.oneOfSetter = function setOneOf(fieldNames) {
1616
+ return function(name) {
1617
+ for (var i = 0; i < fieldNames.length; ++i)
1618
+ if (fieldNames[i] !== name)
1619
+ delete this[fieldNames[i]];
1620
+ };
1621
+ };
1622
+ util.toJSONOptions = {
1623
+ longs: String,
1624
+ enums: String,
1625
+ bytes: String,
1626
+ json: true
1627
+ };
1628
+ util._configure = function() {
1629
+ var Buffer2 = util.Buffer;
1630
+ if (!Buffer2) {
1631
+ util._Buffer_from = util._Buffer_allocUnsafe = null;
1632
+ return;
1728
1633
  }
1634
+ util._Buffer_from = Buffer2.from !== Uint8Array.from && Buffer2.from || /* istanbul ignore next */
1635
+ function Buffer_from(value, encoding) {
1636
+ return new Buffer2(value, encoding);
1637
+ };
1638
+ util._Buffer_allocUnsafe = Buffer2.allocUnsafe || /* istanbul ignore next */
1639
+ function Buffer_allocUnsafe(size) {
1640
+ return new Buffer2(size);
1641
+ };
1642
+ };
1643
+ }
1644
+ });
1645
+
1646
+ // ../../node_modules/protobufjs/src/writer.js
1647
+ var require_writer = __commonJS({
1648
+ "../../node_modules/protobufjs/src/writer.js"(exports2, module2) {
1649
+ "use strict";
1650
+ module2.exports = Writer;
1651
+ var util = require_minimal();
1652
+ var BufferWriter;
1653
+ var LongBits = util.LongBits;
1654
+ var base64 = util.base64;
1655
+ var utf8 = util.utf8;
1656
+ function Op(fn, len, val) {
1657
+ this.fn = fn;
1658
+ this.len = len;
1659
+ this.next = void 0;
1660
+ this.val = val;
1661
+ }
1662
+ function noop() {
1729
1663
  }
1730
- Long4.fromInt = fromInt;
1731
- function fromNumber(value, unsigned) {
1732
- if (isNaN(value))
1733
- return unsigned ? UZERO : ZERO;
1734
- if (unsigned) {
1735
- if (value < 0)
1736
- return UZERO;
1737
- if (value >= TWO_PWR_64_DBL)
1738
- return MAX_UNSIGNED_VALUE;
1739
- } else {
1740
- if (value <= -TWO_PWR_63_DBL)
1741
- return MIN_VALUE;
1742
- if (value + 1 >= TWO_PWR_63_DBL)
1743
- return MAX_VALUE;
1744
- }
1745
- if (value < 0)
1746
- return fromNumber(-value, unsigned).neg();
1747
- return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned);
1664
+ function State(writer) {
1665
+ this.head = writer.head;
1666
+ this.tail = writer.tail;
1667
+ this.len = writer.len;
1668
+ this.next = writer.states;
1748
1669
  }
1749
- Long4.fromNumber = fromNumber;
1750
- function fromBits(lowBits, highBits, unsigned) {
1751
- return new Long4(lowBits, highBits, unsigned);
1670
+ function Writer() {
1671
+ this.len = 0;
1672
+ this.head = new Op(noop, 0, 0);
1673
+ this.tail = this.head;
1674
+ this.states = null;
1752
1675
  }
1753
- Long4.fromBits = fromBits;
1754
- var pow_dbl = Math.pow;
1755
- function fromString(str, unsigned, radix) {
1756
- if (str.length === 0)
1757
- throw Error("empty string");
1758
- if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity")
1759
- return ZERO;
1760
- if (typeof unsigned === "number") {
1761
- radix = unsigned, unsigned = false;
1762
- } else {
1763
- unsigned = !!unsigned;
1764
- }
1765
- radix = radix || 10;
1766
- if (radix < 2 || 36 < radix)
1767
- throw RangeError("radix");
1768
- var p;
1769
- if ((p = str.indexOf("-")) > 0)
1770
- throw Error("interior hyphen");
1771
- else if (p === 0) {
1772
- return fromString(str.substring(1), unsigned, radix).neg();
1773
- }
1774
- var radixToPower = fromNumber(pow_dbl(radix, 8));
1775
- var result = ZERO;
1776
- for (var i = 0; i < str.length; i += 8) {
1777
- var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
1778
- if (size < 8) {
1779
- var power = fromNumber(pow_dbl(radix, size));
1780
- result = result.mul(power).add(fromNumber(value));
1781
- } else {
1782
- result = result.mul(radixToPower);
1783
- result = result.add(fromNumber(value));
1784
- }
1676
+ var create = function create2() {
1677
+ return util.Buffer ? function create_buffer_setup() {
1678
+ return (Writer.create = function create_buffer() {
1679
+ return new BufferWriter();
1680
+ })();
1681
+ } : function create_array() {
1682
+ return new Writer();
1683
+ };
1684
+ };
1685
+ Writer.create = create();
1686
+ Writer.alloc = function alloc(size) {
1687
+ return new util.Array(size);
1688
+ };
1689
+ if (util.Array !== Array)
1690
+ Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
1691
+ Writer.prototype._push = function push(fn, len, val) {
1692
+ this.tail = this.tail.next = new Op(fn, len, val);
1693
+ this.len += len;
1694
+ return this;
1695
+ };
1696
+ function writeByte(val, buf, pos) {
1697
+ buf[pos] = val & 255;
1698
+ }
1699
+ function writeVarint32(val, buf, pos) {
1700
+ while (val > 127) {
1701
+ buf[pos++] = val & 127 | 128;
1702
+ val >>>= 7;
1785
1703
  }
1786
- result.unsigned = unsigned;
1787
- return result;
1704
+ buf[pos] = val;
1788
1705
  }
1789
- Long4.fromString = fromString;
1790
- function fromValue(val, unsigned) {
1791
- if (typeof val === "number")
1792
- return fromNumber(val, unsigned);
1793
- if (typeof val === "string")
1794
- return fromString(val, unsigned);
1795
- return fromBits(val.low, val.high, typeof unsigned === "boolean" ? unsigned : val.unsigned);
1706
+ function VarintOp(len, val) {
1707
+ this.len = len;
1708
+ this.next = void 0;
1709
+ this.val = val;
1796
1710
  }
1797
- Long4.fromValue = fromValue;
1798
- var TWO_PWR_16_DBL = 1 << 16;
1799
- var TWO_PWR_24_DBL = 1 << 24;
1800
- var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
1801
- var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
1802
- var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
1803
- var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
1804
- var ZERO = fromInt(0);
1805
- Long4.ZERO = ZERO;
1806
- var UZERO = fromInt(0, true);
1807
- Long4.UZERO = UZERO;
1808
- var ONE = fromInt(1);
1809
- Long4.ONE = ONE;
1810
- var UONE = fromInt(1, true);
1811
- Long4.UONE = UONE;
1812
- var NEG_ONE = fromInt(-1);
1813
- Long4.NEG_ONE = NEG_ONE;
1814
- var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);
1815
- Long4.MAX_VALUE = MAX_VALUE;
1816
- var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);
1817
- Long4.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
1818
- var MIN_VALUE = fromBits(0, 2147483648 | 0, false);
1819
- Long4.MIN_VALUE = MIN_VALUE;
1820
- var LongPrototype = Long4.prototype;
1821
- LongPrototype.toInt = function toInt() {
1822
- return this.unsigned ? this.low >>> 0 : this.low;
1711
+ VarintOp.prototype = Object.create(Op.prototype);
1712
+ VarintOp.prototype.fn = writeVarint32;
1713
+ Writer.prototype.uint32 = function write_uint32(value) {
1714
+ this.len += (this.tail = this.tail.next = new VarintOp(
1715
+ (value = value >>> 0) < 128 ? 1 : value < 16384 ? 2 : value < 2097152 ? 3 : value < 268435456 ? 4 : 5,
1716
+ value
1717
+ )).len;
1718
+ return this;
1823
1719
  };
1824
- LongPrototype.toNumber = function toNumber() {
1825
- if (this.unsigned)
1826
- return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
1827
- return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
1720
+ Writer.prototype.int32 = function write_int32(value) {
1721
+ return value < 0 ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) : this.uint32(value);
1828
1722
  };
1829
- LongPrototype.toString = function toString(radix) {
1830
- radix = radix || 10;
1831
- if (radix < 2 || 36 < radix)
1832
- throw RangeError("radix");
1833
- if (this.isZero())
1834
- return "0";
1835
- if (this.isNegative()) {
1836
- if (this.eq(MIN_VALUE)) {
1837
- var radixLong = fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
1838
- return div.toString(radix) + rem1.toInt().toString(radix);
1839
- } else
1840
- return "-" + this.neg().toString(radix);
1723
+ Writer.prototype.sint32 = function write_sint32(value) {
1724
+ return this.uint32((value << 1 ^ value >> 31) >>> 0);
1725
+ };
1726
+ function writeVarint64(val, buf, pos) {
1727
+ while (val.hi) {
1728
+ buf[pos++] = val.lo & 127 | 128;
1729
+ val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;
1730
+ val.hi >>>= 7;
1841
1731
  }
1842
- var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;
1843
- var result = "";
1844
- while (true) {
1845
- var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);
1846
- rem = remDiv;
1847
- if (rem.isZero())
1848
- return digits + result;
1849
- else {
1850
- while (digits.length < 6)
1851
- digits = "0" + digits;
1852
- result = "" + digits + result;
1853
- }
1732
+ while (val.lo > 127) {
1733
+ buf[pos++] = val.lo & 127 | 128;
1734
+ val.lo = val.lo >>> 7;
1854
1735
  }
1736
+ buf[pos++] = val.lo;
1737
+ }
1738
+ Writer.prototype.uint64 = function write_uint64(value) {
1739
+ var bits = LongBits.from(value);
1740
+ return this._push(writeVarint64, bits.length(), bits);
1855
1741
  };
1856
- LongPrototype.getHighBits = function getHighBits() {
1857
- return this.high;
1858
- };
1859
- LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {
1860
- return this.high >>> 0;
1861
- };
1862
- LongPrototype.getLowBits = function getLowBits() {
1863
- return this.low;
1742
+ Writer.prototype.int64 = Writer.prototype.uint64;
1743
+ Writer.prototype.sint64 = function write_sint64(value) {
1744
+ var bits = LongBits.from(value).zzEncode();
1745
+ return this._push(writeVarint64, bits.length(), bits);
1864
1746
  };
1865
- LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {
1866
- return this.low >>> 0;
1747
+ Writer.prototype.bool = function write_bool(value) {
1748
+ return this._push(writeByte, 1, value ? 1 : 0);
1867
1749
  };
1868
- LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
1869
- if (this.isNegative())
1870
- return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
1871
- var val = this.high != 0 ? this.high : this.low;
1872
- for (var bit = 31; bit > 0; bit--)
1873
- if ((val & 1 << bit) != 0)
1874
- break;
1875
- return this.high != 0 ? bit + 33 : bit + 1;
1750
+ function writeFixed32(val, buf, pos) {
1751
+ buf[pos] = val & 255;
1752
+ buf[pos + 1] = val >>> 8 & 255;
1753
+ buf[pos + 2] = val >>> 16 & 255;
1754
+ buf[pos + 3] = val >>> 24;
1755
+ }
1756
+ Writer.prototype.fixed32 = function write_fixed32(value) {
1757
+ return this._push(writeFixed32, 4, value >>> 0);
1876
1758
  };
1877
- LongPrototype.isZero = function isZero() {
1878
- return this.high === 0 && this.low === 0;
1759
+ Writer.prototype.sfixed32 = Writer.prototype.fixed32;
1760
+ Writer.prototype.fixed64 = function write_fixed64(value) {
1761
+ var bits = LongBits.from(value);
1762
+ return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
1879
1763
  };
1880
- LongPrototype.eqz = LongPrototype.isZero;
1881
- LongPrototype.isNegative = function isNegative() {
1882
- return !this.unsigned && this.high < 0;
1764
+ Writer.prototype.sfixed64 = Writer.prototype.fixed64;
1765
+ Writer.prototype.float = function write_float(value) {
1766
+ return this._push(util.float.writeFloatLE, 4, value);
1883
1767
  };
1884
- LongPrototype.isPositive = function isPositive() {
1885
- return this.unsigned || this.high >= 0;
1768
+ Writer.prototype.double = function write_double(value) {
1769
+ return this._push(util.float.writeDoubleLE, 8, value);
1886
1770
  };
1887
- LongPrototype.isOdd = function isOdd() {
1888
- return (this.low & 1) === 1;
1771
+ var writeBytes = util.Array.prototype.set ? function writeBytes_set(val, buf, pos) {
1772
+ buf.set(val, pos);
1773
+ } : function writeBytes_for(val, buf, pos) {
1774
+ for (var i = 0; i < val.length; ++i)
1775
+ buf[pos + i] = val[i];
1889
1776
  };
1890
- LongPrototype.isEven = function isEven() {
1891
- return (this.low & 1) === 0;
1777
+ Writer.prototype.bytes = function write_bytes(value) {
1778
+ var len = value.length >>> 0;
1779
+ if (!len)
1780
+ return this._push(writeByte, 1, 0);
1781
+ if (util.isString(value)) {
1782
+ var buf = Writer.alloc(len = base64.length(value));
1783
+ base64.decode(value, buf, 0);
1784
+ value = buf;
1785
+ }
1786
+ return this.uint32(len)._push(writeBytes, len, value);
1892
1787
  };
1893
- LongPrototype.equals = function equals(other) {
1894
- if (!isLong(other))
1895
- other = fromValue(other);
1896
- if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
1897
- return false;
1898
- return this.high === other.high && this.low === other.low;
1788
+ Writer.prototype.string = function write_string(value) {
1789
+ var len = utf8.length(value);
1790
+ return len ? this.uint32(len)._push(utf8.write, len, value) : this._push(writeByte, 1, 0);
1899
1791
  };
1900
- LongPrototype.eq = LongPrototype.equals;
1901
- LongPrototype.notEquals = function notEquals(other) {
1902
- return !this.eq(
1903
- /* validates */
1904
- other
1905
- );
1792
+ Writer.prototype.fork = function fork() {
1793
+ this.states = new State(this);
1794
+ this.head = this.tail = new Op(noop, 0, 0);
1795
+ this.len = 0;
1796
+ return this;
1906
1797
  };
1907
- LongPrototype.neq = LongPrototype.notEquals;
1908
- LongPrototype.ne = LongPrototype.notEquals;
1909
- LongPrototype.lessThan = function lessThan(other) {
1910
- return this.comp(
1911
- /* validates */
1912
- other
1913
- ) < 0;
1798
+ Writer.prototype.reset = function reset() {
1799
+ if (this.states) {
1800
+ this.head = this.states.head;
1801
+ this.tail = this.states.tail;
1802
+ this.len = this.states.len;
1803
+ this.states = this.states.next;
1804
+ } else {
1805
+ this.head = this.tail = new Op(noop, 0, 0);
1806
+ this.len = 0;
1807
+ }
1808
+ return this;
1914
1809
  };
1915
- LongPrototype.lt = LongPrototype.lessThan;
1916
- LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
1917
- return this.comp(
1918
- /* validates */
1919
- other
1920
- ) <= 0;
1810
+ Writer.prototype.ldelim = function ldelim() {
1811
+ var head = this.head, tail = this.tail, len = this.len;
1812
+ this.reset().uint32(len);
1813
+ if (len) {
1814
+ this.tail.next = head.next;
1815
+ this.tail = tail;
1816
+ this.len += len;
1817
+ }
1818
+ return this;
1921
1819
  };
1922
- LongPrototype.lte = LongPrototype.lessThanOrEqual;
1923
- LongPrototype.le = LongPrototype.lessThanOrEqual;
1924
- LongPrototype.greaterThan = function greaterThan(other) {
1925
- return this.comp(
1926
- /* validates */
1927
- other
1928
- ) > 0;
1820
+ Writer.prototype.finish = function finish() {
1821
+ var head = this.head.next, buf = this.constructor.alloc(this.len), pos = 0;
1822
+ while (head) {
1823
+ head.fn(head.val, buf, pos);
1824
+ pos += head.len;
1825
+ head = head.next;
1826
+ }
1827
+ return buf;
1929
1828
  };
1930
- LongPrototype.gt = LongPrototype.greaterThan;
1931
- LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
1932
- return this.comp(
1933
- /* validates */
1934
- other
1935
- ) >= 0;
1829
+ Writer._configure = function(BufferWriter_) {
1830
+ BufferWriter = BufferWriter_;
1831
+ Writer.create = create();
1832
+ BufferWriter._configure();
1936
1833
  };
1937
- LongPrototype.gte = LongPrototype.greaterThanOrEqual;
1938
- LongPrototype.ge = LongPrototype.greaterThanOrEqual;
1939
- LongPrototype.compare = function compare(other) {
1940
- if (!isLong(other))
1941
- other = fromValue(other);
1942
- if (this.eq(other))
1943
- return 0;
1944
- var thisNeg = this.isNegative(), otherNeg = other.isNegative();
1945
- if (thisNeg && !otherNeg)
1946
- return -1;
1947
- if (!thisNeg && otherNeg)
1948
- return 1;
1949
- if (!this.unsigned)
1950
- return this.sub(other).isNegative() ? -1 : 1;
1951
- return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;
1834
+ }
1835
+ });
1836
+
1837
+ // ../../node_modules/protobufjs/src/writer_buffer.js
1838
+ var require_writer_buffer = __commonJS({
1839
+ "../../node_modules/protobufjs/src/writer_buffer.js"(exports2, module2) {
1840
+ "use strict";
1841
+ module2.exports = BufferWriter;
1842
+ var Writer = require_writer();
1843
+ (BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
1844
+ var util = require_minimal();
1845
+ function BufferWriter() {
1846
+ Writer.call(this);
1847
+ }
1848
+ BufferWriter._configure = function() {
1849
+ BufferWriter.alloc = util._Buffer_allocUnsafe;
1850
+ BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" ? function writeBytesBuffer_set(val, buf, pos) {
1851
+ buf.set(val, pos);
1852
+ } : function writeBytesBuffer_copy(val, buf, pos) {
1853
+ if (val.copy)
1854
+ val.copy(buf, pos, 0, val.length);
1855
+ else
1856
+ for (var i = 0; i < val.length; )
1857
+ buf[pos++] = val[i++];
1858
+ };
1952
1859
  };
1953
- LongPrototype.comp = LongPrototype.compare;
1954
- LongPrototype.negate = function negate() {
1955
- if (!this.unsigned && this.eq(MIN_VALUE))
1956
- return MIN_VALUE;
1957
- return this.not().add(ONE);
1860
+ BufferWriter.prototype.bytes = function write_bytes_buffer(value) {
1861
+ if (util.isString(value))
1862
+ value = util._Buffer_from(value, "base64");
1863
+ var len = value.length >>> 0;
1864
+ this.uint32(len);
1865
+ if (len)
1866
+ this._push(BufferWriter.writeBytesBuffer, len, value);
1867
+ return this;
1958
1868
  };
1959
- LongPrototype.neg = LongPrototype.negate;
1960
- LongPrototype.add = function add(addend) {
1961
- if (!isLong(addend))
1962
- addend = fromValue(addend);
1963
- var a48 = this.high >>> 16;
1964
- var a32 = this.high & 65535;
1965
- var a16 = this.low >>> 16;
1966
- var a00 = this.low & 65535;
1967
- var b48 = addend.high >>> 16;
1968
- var b32 = addend.high & 65535;
1969
- var b16 = addend.low >>> 16;
1970
- var b00 = addend.low & 65535;
1971
- var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
1972
- c00 += a00 + b00;
1973
- c16 += c00 >>> 16;
1974
- c00 &= 65535;
1975
- c16 += a16 + b16;
1976
- c32 += c16 >>> 16;
1977
- c16 &= 65535;
1978
- c32 += a32 + b32;
1979
- c48 += c32 >>> 16;
1980
- c32 &= 65535;
1981
- c48 += a48 + b48;
1982
- c48 &= 65535;
1983
- return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
1869
+ function writeStringBuffer(val, buf, pos) {
1870
+ if (val.length < 40)
1871
+ util.utf8.write(val, buf, pos);
1872
+ else if (buf.utf8Write)
1873
+ buf.utf8Write(val, pos);
1874
+ else
1875
+ buf.write(val, pos);
1876
+ }
1877
+ BufferWriter.prototype.string = function write_string_buffer(value) {
1878
+ var len = util.Buffer.byteLength(value);
1879
+ this.uint32(len);
1880
+ if (len)
1881
+ this._push(writeStringBuffer, len, value);
1882
+ return this;
1984
1883
  };
1985
- LongPrototype.subtract = function subtract(subtrahend) {
1986
- if (!isLong(subtrahend))
1987
- subtrahend = fromValue(subtrahend);
1988
- return this.add(subtrahend.neg());
1884
+ BufferWriter._configure();
1885
+ }
1886
+ });
1887
+
1888
+ // ../../node_modules/protobufjs/src/reader.js
1889
+ var require_reader = __commonJS({
1890
+ "../../node_modules/protobufjs/src/reader.js"(exports2, module2) {
1891
+ "use strict";
1892
+ module2.exports = Reader;
1893
+ var util = require_minimal();
1894
+ var BufferReader;
1895
+ var LongBits = util.LongBits;
1896
+ var utf8 = util.utf8;
1897
+ function indexOutOfRange(reader, writeLength) {
1898
+ return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
1899
+ }
1900
+ function Reader(buffer) {
1901
+ this.buf = buffer;
1902
+ this.pos = 0;
1903
+ this.len = buffer.length;
1904
+ }
1905
+ var create_array = typeof Uint8Array !== "undefined" ? function create_typed_array(buffer) {
1906
+ if (buffer instanceof Uint8Array || Array.isArray(buffer))
1907
+ return new Reader(buffer);
1908
+ throw Error("illegal buffer");
1909
+ } : function create_array2(buffer) {
1910
+ if (Array.isArray(buffer))
1911
+ return new Reader(buffer);
1912
+ throw Error("illegal buffer");
1989
1913
  };
1990
- LongPrototype.sub = LongPrototype.subtract;
1991
- LongPrototype.multiply = function multiply(multiplier) {
1992
- if (this.isZero())
1993
- return ZERO;
1994
- if (!isLong(multiplier))
1995
- multiplier = fromValue(multiplier);
1996
- if (wasm) {
1997
- var low = wasm.mul(
1998
- this.low,
1999
- this.high,
2000
- multiplier.low,
2001
- multiplier.high
2002
- );
2003
- return fromBits(low, wasm.get_high(), this.unsigned);
2004
- }
2005
- if (multiplier.isZero())
2006
- return ZERO;
2007
- if (this.eq(MIN_VALUE))
2008
- return multiplier.isOdd() ? MIN_VALUE : ZERO;
2009
- if (multiplier.eq(MIN_VALUE))
2010
- return this.isOdd() ? MIN_VALUE : ZERO;
2011
- if (this.isNegative()) {
2012
- if (multiplier.isNegative())
2013
- return this.neg().mul(multiplier.neg());
2014
- else
2015
- return this.neg().mul(multiplier).neg();
2016
- } else if (multiplier.isNegative())
2017
- return this.mul(multiplier.neg()).neg();
2018
- if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
2019
- return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
2020
- var a48 = this.high >>> 16;
2021
- var a32 = this.high & 65535;
2022
- var a16 = this.low >>> 16;
2023
- var a00 = this.low & 65535;
2024
- var b48 = multiplier.high >>> 16;
2025
- var b32 = multiplier.high & 65535;
2026
- var b16 = multiplier.low >>> 16;
2027
- var b00 = multiplier.low & 65535;
2028
- var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
2029
- c00 += a00 * b00;
2030
- c16 += c00 >>> 16;
2031
- c00 &= 65535;
2032
- c16 += a16 * b00;
2033
- c32 += c16 >>> 16;
2034
- c16 &= 65535;
2035
- c16 += a00 * b16;
2036
- c32 += c16 >>> 16;
2037
- c16 &= 65535;
2038
- c32 += a32 * b00;
2039
- c48 += c32 >>> 16;
2040
- c32 &= 65535;
2041
- c32 += a16 * b16;
2042
- c48 += c32 >>> 16;
2043
- c32 &= 65535;
2044
- c32 += a00 * b32;
2045
- c48 += c32 >>> 16;
2046
- c32 &= 65535;
2047
- c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
2048
- c48 &= 65535;
2049
- return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
1914
+ var create = function create2() {
1915
+ return util.Buffer ? function create_buffer_setup(buffer) {
1916
+ return (Reader.create = function create_buffer(buffer2) {
1917
+ return util.Buffer.isBuffer(buffer2) ? new BufferReader(buffer2) : create_array(buffer2);
1918
+ })(buffer);
1919
+ } : create_array;
1920
+ };
1921
+ Reader.create = create();
1922
+ Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */
1923
+ util.Array.prototype.slice;
1924
+ Reader.prototype.uint32 = function read_uint32_setup() {
1925
+ var value = 4294967295;
1926
+ return function read_uint32() {
1927
+ value = (this.buf[this.pos] & 127) >>> 0;
1928
+ if (this.buf[this.pos++] < 128)
1929
+ return value;
1930
+ value = (value | (this.buf[this.pos] & 127) << 7) >>> 0;
1931
+ if (this.buf[this.pos++] < 128)
1932
+ return value;
1933
+ value = (value | (this.buf[this.pos] & 127) << 14) >>> 0;
1934
+ if (this.buf[this.pos++] < 128)
1935
+ return value;
1936
+ value = (value | (this.buf[this.pos] & 127) << 21) >>> 0;
1937
+ if (this.buf[this.pos++] < 128)
1938
+ return value;
1939
+ value = (value | (this.buf[this.pos] & 15) << 28) >>> 0;
1940
+ if (this.buf[this.pos++] < 128)
1941
+ return value;
1942
+ if ((this.pos += 5) > this.len) {
1943
+ this.pos = this.len;
1944
+ throw indexOutOfRange(this, 10);
1945
+ }
1946
+ return value;
1947
+ };
1948
+ }();
1949
+ Reader.prototype.int32 = function read_int32() {
1950
+ return this.uint32() | 0;
2050
1951
  };
2051
- LongPrototype.mul = LongPrototype.multiply;
2052
- LongPrototype.divide = function divide(divisor) {
2053
- if (!isLong(divisor))
2054
- divisor = fromValue(divisor);
2055
- if (divisor.isZero())
2056
- throw Error("division by zero");
2057
- if (wasm) {
2058
- if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {
2059
- return this;
1952
+ Reader.prototype.sint32 = function read_sint32() {
1953
+ var value = this.uint32();
1954
+ return value >>> 1 ^ -(value & 1) | 0;
1955
+ };
1956
+ function readLongVarint() {
1957
+ var bits = new LongBits(0, 0);
1958
+ var i = 0;
1959
+ if (this.len - this.pos > 4) {
1960
+ for (; i < 4; ++i) {
1961
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
1962
+ if (this.buf[this.pos++] < 128)
1963
+ return bits;
2060
1964
  }
2061
- var low = (this.unsigned ? wasm.div_u : wasm.div_s)(
2062
- this.low,
2063
- this.high,
2064
- divisor.low,
2065
- divisor.high
2066
- );
2067
- return fromBits(low, wasm.get_high(), this.unsigned);
2068
- }
2069
- if (this.isZero())
2070
- return this.unsigned ? UZERO : ZERO;
2071
- var approx, rem, res;
2072
- if (!this.unsigned) {
2073
- if (this.eq(MIN_VALUE)) {
2074
- if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
2075
- return MIN_VALUE;
2076
- else if (divisor.eq(MIN_VALUE))
2077
- return ONE;
2078
- else {
2079
- var halfThis = this.shr(1);
2080
- approx = halfThis.div(divisor).shl(1);
2081
- if (approx.eq(ZERO)) {
2082
- return divisor.isNegative() ? ONE : NEG_ONE;
2083
- } else {
2084
- rem = this.sub(divisor.mul(approx));
2085
- res = approx.add(rem.div(divisor));
2086
- return res;
2087
- }
2088
- }
2089
- } else if (divisor.eq(MIN_VALUE))
2090
- return this.unsigned ? UZERO : ZERO;
2091
- if (this.isNegative()) {
2092
- if (divisor.isNegative())
2093
- return this.neg().div(divisor.neg());
2094
- return this.neg().div(divisor).neg();
2095
- } else if (divisor.isNegative())
2096
- return this.div(divisor.neg()).neg();
2097
- res = ZERO;
1965
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
1966
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
1967
+ if (this.buf[this.pos++] < 128)
1968
+ return bits;
1969
+ i = 0;
2098
1970
  } else {
2099
- if (!divisor.unsigned)
2100
- divisor = divisor.toUnsigned();
2101
- if (divisor.gt(this))
2102
- return UZERO;
2103
- if (divisor.gt(this.shru(1)))
2104
- return UONE;
2105
- res = UZERO;
2106
- }
2107
- rem = this;
2108
- while (rem.gte(divisor)) {
2109
- approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
2110
- var log2 = Math.ceil(Math.log(approx) / Math.LN2), delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48), approxRes = fromNumber(approx), approxRem = approxRes.mul(divisor);
2111
- while (approxRem.isNegative() || approxRem.gt(rem)) {
2112
- approx -= delta;
2113
- approxRes = fromNumber(approx, this.unsigned);
2114
- approxRem = approxRes.mul(divisor);
1971
+ for (; i < 3; ++i) {
1972
+ if (this.pos >= this.len)
1973
+ throw indexOutOfRange(this);
1974
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
1975
+ if (this.buf[this.pos++] < 128)
1976
+ return bits;
2115
1977
  }
2116
- if (approxRes.isZero())
2117
- approxRes = ONE;
2118
- res = res.add(approxRes);
2119
- rem = rem.sub(approxRem);
1978
+ bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
1979
+ return bits;
2120
1980
  }
2121
- return res;
2122
- };
2123
- LongPrototype.div = LongPrototype.divide;
2124
- LongPrototype.modulo = function modulo(divisor) {
2125
- if (!isLong(divisor))
2126
- divisor = fromValue(divisor);
2127
- if (wasm) {
2128
- var low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(
2129
- this.low,
2130
- this.high,
2131
- divisor.low,
2132
- divisor.high
2133
- );
2134
- return fromBits(low, wasm.get_high(), this.unsigned);
1981
+ if (this.len - this.pos > 4) {
1982
+ for (; i < 5; ++i) {
1983
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
1984
+ if (this.buf[this.pos++] < 128)
1985
+ return bits;
1986
+ }
1987
+ } else {
1988
+ for (; i < 5; ++i) {
1989
+ if (this.pos >= this.len)
1990
+ throw indexOutOfRange(this);
1991
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
1992
+ if (this.buf[this.pos++] < 128)
1993
+ return bits;
1994
+ }
2135
1995
  }
2136
- return this.sub(this.div(divisor).mul(divisor));
2137
- };
2138
- LongPrototype.mod = LongPrototype.modulo;
2139
- LongPrototype.rem = LongPrototype.modulo;
2140
- LongPrototype.not = function not() {
2141
- return fromBits(~this.low, ~this.high, this.unsigned);
2142
- };
2143
- LongPrototype.and = function and(other) {
2144
- if (!isLong(other))
2145
- other = fromValue(other);
2146
- return fromBits(this.low & other.low, this.high & other.high, this.unsigned);
1996
+ throw Error("invalid varint encoding");
1997
+ }
1998
+ Reader.prototype.bool = function read_bool() {
1999
+ return this.uint32() !== 0;
2147
2000
  };
2148
- LongPrototype.or = function or(other) {
2149
- if (!isLong(other))
2150
- other = fromValue(other);
2151
- return fromBits(this.low | other.low, this.high | other.high, this.unsigned);
2001
+ function readFixed32_end(buf, end) {
2002
+ return (buf[end - 4] | buf[end - 3] << 8 | buf[end - 2] << 16 | buf[end - 1] << 24) >>> 0;
2003
+ }
2004
+ Reader.prototype.fixed32 = function read_fixed32() {
2005
+ if (this.pos + 4 > this.len)
2006
+ throw indexOutOfRange(this, 4);
2007
+ return readFixed32_end(this.buf, this.pos += 4);
2152
2008
  };
2153
- LongPrototype.xor = function xor(other) {
2154
- if (!isLong(other))
2155
- other = fromValue(other);
2156
- return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
2009
+ Reader.prototype.sfixed32 = function read_sfixed32() {
2010
+ if (this.pos + 4 > this.len)
2011
+ throw indexOutOfRange(this, 4);
2012
+ return readFixed32_end(this.buf, this.pos += 4) | 0;
2157
2013
  };
2158
- LongPrototype.shiftLeft = function shiftLeft(numBits) {
2159
- if (isLong(numBits))
2160
- numBits = numBits.toInt();
2161
- if ((numBits &= 63) === 0)
2162
- return this;
2163
- else if (numBits < 32)
2164
- return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned);
2165
- else
2166
- return fromBits(0, this.low << numBits - 32, this.unsigned);
2014
+ function readFixed64() {
2015
+ if (this.pos + 8 > this.len)
2016
+ throw indexOutOfRange(this, 8);
2017
+ return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));
2018
+ }
2019
+ Reader.prototype.float = function read_float() {
2020
+ if (this.pos + 4 > this.len)
2021
+ throw indexOutOfRange(this, 4);
2022
+ var value = util.float.readFloatLE(this.buf, this.pos);
2023
+ this.pos += 4;
2024
+ return value;
2167
2025
  };
2168
- LongPrototype.shl = LongPrototype.shiftLeft;
2169
- LongPrototype.shiftRight = function shiftRight(numBits) {
2170
- if (isLong(numBits))
2171
- numBits = numBits.toInt();
2172
- if ((numBits &= 63) === 0)
2173
- return this;
2174
- else if (numBits < 32)
2175
- return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned);
2176
- else
2177
- return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned);
2026
+ Reader.prototype.double = function read_double() {
2027
+ if (this.pos + 8 > this.len)
2028
+ throw indexOutOfRange(this, 4);
2029
+ var value = util.float.readDoubleLE(this.buf, this.pos);
2030
+ this.pos += 8;
2031
+ return value;
2178
2032
  };
2179
- LongPrototype.shr = LongPrototype.shiftRight;
2180
- LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
2181
- if (isLong(numBits))
2182
- numBits = numBits.toInt();
2183
- numBits &= 63;
2184
- if (numBits === 0)
2185
- return this;
2186
- else {
2187
- var high = this.high;
2188
- if (numBits < 32) {
2189
- var low = this.low;
2190
- return fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits, this.unsigned);
2191
- } else if (numBits === 32)
2192
- return fromBits(high, 0, this.unsigned);
2193
- else
2194
- return fromBits(high >>> numBits - 32, 0, this.unsigned);
2195
- }
2033
+ Reader.prototype.bytes = function read_bytes() {
2034
+ var length = this.uint32(), start = this.pos, end = this.pos + length;
2035
+ if (end > this.len)
2036
+ throw indexOutOfRange(this, length);
2037
+ this.pos += length;
2038
+ if (Array.isArray(this.buf))
2039
+ return this.buf.slice(start, end);
2040
+ return start === end ? new this.buf.constructor(0) : this._slice.call(this.buf, start, end);
2196
2041
  };
2197
- LongPrototype.shru = LongPrototype.shiftRightUnsigned;
2198
- LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
2199
- LongPrototype.toSigned = function toSigned() {
2200
- if (!this.unsigned)
2201
- return this;
2202
- return fromBits(this.low, this.high, false);
2042
+ Reader.prototype.string = function read_string() {
2043
+ var bytes = this.bytes();
2044
+ return utf8.read(bytes, 0, bytes.length);
2203
2045
  };
2204
- LongPrototype.toUnsigned = function toUnsigned() {
2205
- if (this.unsigned)
2206
- return this;
2207
- return fromBits(this.low, this.high, true);
2046
+ Reader.prototype.skip = function skip(length) {
2047
+ if (typeof length === "number") {
2048
+ if (this.pos + length > this.len)
2049
+ throw indexOutOfRange(this, length);
2050
+ this.pos += length;
2051
+ } else {
2052
+ do {
2053
+ if (this.pos >= this.len)
2054
+ throw indexOutOfRange(this);
2055
+ } while (this.buf[this.pos++] & 128);
2056
+ }
2057
+ return this;
2208
2058
  };
2209
- LongPrototype.toBytes = function toBytes(le) {
2210
- return le ? this.toBytesLE() : this.toBytesBE();
2059
+ Reader.prototype.skipType = function(wireType) {
2060
+ switch (wireType) {
2061
+ case 0:
2062
+ this.skip();
2063
+ break;
2064
+ case 1:
2065
+ this.skip(8);
2066
+ break;
2067
+ case 2:
2068
+ this.skip(this.uint32());
2069
+ break;
2070
+ case 3:
2071
+ while ((wireType = this.uint32() & 7) !== 4) {
2072
+ this.skipType(wireType);
2073
+ }
2074
+ break;
2075
+ case 5:
2076
+ this.skip(4);
2077
+ break;
2078
+ default:
2079
+ throw Error("invalid wire type " + wireType + " at offset " + this.pos);
2080
+ }
2081
+ return this;
2211
2082
  };
2212
- LongPrototype.toBytesLE = function toBytesLE() {
2213
- var hi = this.high, lo = this.low;
2214
- return [
2215
- lo & 255,
2216
- lo >>> 8 & 255,
2217
- lo >>> 16 & 255,
2218
- lo >>> 24,
2219
- hi & 255,
2220
- hi >>> 8 & 255,
2221
- hi >>> 16 & 255,
2222
- hi >>> 24
2223
- ];
2083
+ Reader._configure = function(BufferReader_) {
2084
+ BufferReader = BufferReader_;
2085
+ Reader.create = create();
2086
+ BufferReader._configure();
2087
+ var fn = util.Long ? "toLong" : (
2088
+ /* istanbul ignore next */
2089
+ "toNumber"
2090
+ );
2091
+ util.merge(Reader.prototype, {
2092
+ int64: function read_int64() {
2093
+ return readLongVarint.call(this)[fn](false);
2094
+ },
2095
+ uint64: function read_uint64() {
2096
+ return readLongVarint.call(this)[fn](true);
2097
+ },
2098
+ sint64: function read_sint64() {
2099
+ return readLongVarint.call(this).zzDecode()[fn](false);
2100
+ },
2101
+ fixed64: function read_fixed64() {
2102
+ return readFixed64.call(this)[fn](true);
2103
+ },
2104
+ sfixed64: function read_sfixed64() {
2105
+ return readFixed64.call(this)[fn](false);
2106
+ }
2107
+ });
2224
2108
  };
2225
- LongPrototype.toBytesBE = function toBytesBE() {
2226
- var hi = this.high, lo = this.low;
2227
- return [
2228
- hi >>> 24,
2229
- hi >>> 16 & 255,
2230
- hi >>> 8 & 255,
2231
- hi & 255,
2232
- lo >>> 24,
2233
- lo >>> 16 & 255,
2234
- lo >>> 8 & 255,
2235
- lo & 255
2236
- ];
2109
+ }
2110
+ });
2111
+
2112
+ // ../../node_modules/protobufjs/src/reader_buffer.js
2113
+ var require_reader_buffer = __commonJS({
2114
+ "../../node_modules/protobufjs/src/reader_buffer.js"(exports2, module2) {
2115
+ "use strict";
2116
+ module2.exports = BufferReader;
2117
+ var Reader = require_reader();
2118
+ (BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;
2119
+ var util = require_minimal();
2120
+ function BufferReader(buffer) {
2121
+ Reader.call(this, buffer);
2122
+ }
2123
+ BufferReader._configure = function() {
2124
+ if (util.Buffer)
2125
+ BufferReader.prototype._slice = util.Buffer.prototype.slice;
2237
2126
  };
2238
- Long4.fromBytes = function fromBytes(bytes, unsigned, le) {
2239
- return le ? Long4.fromBytesLE(bytes, unsigned) : Long4.fromBytesBE(bytes, unsigned);
2127
+ BufferReader.prototype.string = function read_string_buffer() {
2128
+ var len = this.uint32();
2129
+ return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len));
2240
2130
  };
2241
- Long4.fromBytesLE = function fromBytesLE(bytes, unsigned) {
2242
- return new Long4(
2243
- bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24,
2244
- bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24,
2245
- unsigned
2246
- );
2131
+ BufferReader._configure();
2132
+ }
2133
+ });
2134
+
2135
+ // ../../node_modules/protobufjs/src/rpc/service.js
2136
+ var require_service = __commonJS({
2137
+ "../../node_modules/protobufjs/src/rpc/service.js"(exports2, module2) {
2138
+ "use strict";
2139
+ module2.exports = Service;
2140
+ var util = require_minimal();
2141
+ (Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;
2142
+ function Service(rpcImpl, requestDelimited, responseDelimited) {
2143
+ if (typeof rpcImpl !== "function")
2144
+ throw TypeError("rpcImpl must be a function");
2145
+ util.EventEmitter.call(this);
2146
+ this.rpcImpl = rpcImpl;
2147
+ this.requestDelimited = Boolean(requestDelimited);
2148
+ this.responseDelimited = Boolean(responseDelimited);
2149
+ }
2150
+ Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {
2151
+ if (!request)
2152
+ throw TypeError("request must be specified");
2153
+ var self2 = this;
2154
+ if (!callback)
2155
+ return util.asPromise(rpcCall, self2, method, requestCtor, responseCtor, request);
2156
+ if (!self2.rpcImpl) {
2157
+ setTimeout(function() {
2158
+ callback(Error("already ended"));
2159
+ }, 0);
2160
+ return void 0;
2161
+ }
2162
+ try {
2163
+ return self2.rpcImpl(
2164
+ method,
2165
+ requestCtor[self2.requestDelimited ? "encodeDelimited" : "encode"](request).finish(),
2166
+ function rpcCallback(err, response) {
2167
+ if (err) {
2168
+ self2.emit("error", err, method);
2169
+ return callback(err);
2170
+ }
2171
+ if (response === null) {
2172
+ self2.end(
2173
+ /* endedByRPC */
2174
+ true
2175
+ );
2176
+ return void 0;
2177
+ }
2178
+ if (!(response instanceof responseCtor)) {
2179
+ try {
2180
+ response = responseCtor[self2.responseDelimited ? "decodeDelimited" : "decode"](response);
2181
+ } catch (err2) {
2182
+ self2.emit("error", err2, method);
2183
+ return callback(err2);
2184
+ }
2185
+ }
2186
+ self2.emit("data", response, method);
2187
+ return callback(null, response);
2188
+ }
2189
+ );
2190
+ } catch (err) {
2191
+ self2.emit("error", err, method);
2192
+ setTimeout(function() {
2193
+ callback(err);
2194
+ }, 0);
2195
+ return void 0;
2196
+ }
2247
2197
  };
2248
- Long4.fromBytesBE = function fromBytesBE(bytes, unsigned) {
2249
- return new Long4(
2250
- bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7],
2251
- bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3],
2252
- unsigned
2253
- );
2198
+ Service.prototype.end = function end(endedByRPC) {
2199
+ if (this.rpcImpl) {
2200
+ if (!endedByRPC)
2201
+ this.rpcImpl(null, null, null);
2202
+ this.rpcImpl = null;
2203
+ this.emit("end").off();
2204
+ }
2205
+ return this;
2254
2206
  };
2255
2207
  }
2256
2208
  });
2257
2209
 
2210
+ // ../../node_modules/protobufjs/src/rpc.js
2211
+ var require_rpc = __commonJS({
2212
+ "../../node_modules/protobufjs/src/rpc.js"(exports2) {
2213
+ "use strict";
2214
+ var rpc = exports2;
2215
+ rpc.Service = require_service();
2216
+ }
2217
+ });
2218
+
2219
+ // ../../node_modules/protobufjs/src/roots.js
2220
+ var require_roots = __commonJS({
2221
+ "../../node_modules/protobufjs/src/roots.js"(exports2, module2) {
2222
+ "use strict";
2223
+ module2.exports = {};
2224
+ }
2225
+ });
2226
+
2227
+ // ../../node_modules/protobufjs/src/index-minimal.js
2228
+ var require_index_minimal = __commonJS({
2229
+ "../../node_modules/protobufjs/src/index-minimal.js"(exports2) {
2230
+ "use strict";
2231
+ var protobuf = exports2;
2232
+ protobuf.build = "minimal";
2233
+ protobuf.Writer = require_writer();
2234
+ protobuf.BufferWriter = require_writer_buffer();
2235
+ protobuf.Reader = require_reader();
2236
+ protobuf.BufferReader = require_reader_buffer();
2237
+ protobuf.util = require_minimal();
2238
+ protobuf.rpc = require_rpc();
2239
+ protobuf.roots = require_roots();
2240
+ protobuf.configure = configure;
2241
+ function configure() {
2242
+ protobuf.util._configure();
2243
+ protobuf.Writer._configure(protobuf.BufferWriter);
2244
+ protobuf.Reader._configure(protobuf.BufferReader);
2245
+ }
2246
+ configure();
2247
+ }
2248
+ });
2249
+
2250
+ // ../../node_modules/protobufjs/minimal.js
2251
+ var require_minimal2 = __commonJS({
2252
+ "../../node_modules/protobufjs/minimal.js"(exports2, module2) {
2253
+ "use strict";
2254
+ module2.exports = require_index_minimal();
2255
+ }
2256
+ });
2257
+
2258
2258
  // rtapi/realtime.ts
2259
+ var import_long4 = __toESM(require_long());
2259
2260
  var import_minimal5 = __toESM(require_minimal2());
2260
2261
 
2261
2262
  // api/api.ts
@@ -13624,7 +13625,8 @@ function createBaseUserProfileRedis() {
13624
13625
  fcm_tokens: [],
13625
13626
  online: false,
13626
13627
  metadata: "",
13627
- is_disabled: false
13628
+ is_disabled: false,
13629
+ joined_clans: []
13628
13630
  };
13629
13631
  }
13630
13632
  var UserProfileRedis = {
@@ -13662,6 +13664,11 @@ var UserProfileRedis = {
13662
13664
  if (message.is_disabled !== false) {
13663
13665
  writer.uint32(88).bool(message.is_disabled);
13664
13666
  }
13667
+ writer.uint32(98).fork();
13668
+ for (const v of message.joined_clans) {
13669
+ writer.int64(v);
13670
+ }
13671
+ writer.ldelim();
13665
13672
  return writer;
13666
13673
  },
13667
13674
  decode(input, length) {
@@ -13737,6 +13744,19 @@ var UserProfileRedis = {
13737
13744
  }
13738
13745
  message.is_disabled = reader.bool();
13739
13746
  continue;
13747
+ case 12:
13748
+ if (tag === 96) {
13749
+ message.joined_clans.push(longToNumber3(reader.int64()));
13750
+ continue;
13751
+ }
13752
+ if (tag === 98) {
13753
+ const end2 = reader.uint32() + reader.pos;
13754
+ while (reader.pos < end2) {
13755
+ message.joined_clans.push(longToNumber3(reader.int64()));
13756
+ }
13757
+ continue;
13758
+ }
13759
+ break;
13740
13760
  }
13741
13761
  if ((tag & 7) === 4 || tag === 0) {
13742
13762
  break;
@@ -13757,11 +13777,12 @@ var UserProfileRedis = {
13757
13777
  fcm_tokens: globalThis.Array.isArray(object == null ? void 0 : object.fcm_tokens) ? object.fcm_tokens.map((e) => FCMTokens.fromJSON(e)) : [],
13758
13778
  online: isSet4(object.online) ? globalThis.Boolean(object.online) : false,
13759
13779
  metadata: isSet4(object.metadata) ? globalThis.String(object.metadata) : "",
13760
- is_disabled: isSet4(object.is_disabled) ? globalThis.Boolean(object.is_disabled) : false
13780
+ is_disabled: isSet4(object.is_disabled) ? globalThis.Boolean(object.is_disabled) : false,
13781
+ joined_clans: globalThis.Array.isArray(object == null ? void 0 : object.joined_clans) ? object.joined_clans.map((e) => globalThis.Number(e)) : []
13761
13782
  };
13762
13783
  },
13763
13784
  toJSON(message) {
13764
- var _a;
13785
+ var _a, _b;
13765
13786
  const obj = {};
13766
13787
  if (message.user_id !== "") {
13767
13788
  obj.user_id = message.user_id;
@@ -13796,13 +13817,16 @@ var UserProfileRedis = {
13796
13817
  if (message.is_disabled !== false) {
13797
13818
  obj.is_disabled = message.is_disabled;
13798
13819
  }
13820
+ if ((_b = message.joined_clans) == null ? void 0 : _b.length) {
13821
+ obj.joined_clans = message.joined_clans.map((e) => Math.round(e));
13822
+ }
13799
13823
  return obj;
13800
13824
  },
13801
13825
  create(base) {
13802
13826
  return UserProfileRedis.fromPartial(base != null ? base : {});
13803
13827
  },
13804
13828
  fromPartial(object) {
13805
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
13829
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
13806
13830
  const message = createBaseUserProfileRedis();
13807
13831
  message.user_id = (_a = object.user_id) != null ? _a : "";
13808
13832
  message.username = (_b = object.username) != null ? _b : "";
@@ -13815,6 +13839,7 @@ var UserProfileRedis = {
13815
13839
  message.online = (_i = object.online) != null ? _i : false;
13816
13840
  message.metadata = (_j = object.metadata) != null ? _j : "";
13817
13841
  message.is_disabled = (_k = object.is_disabled) != null ? _k : false;
13842
+ message.joined_clans = ((_l = object.joined_clans) == null ? void 0 : _l.map((e) => e)) || [];
13818
13843
  return message;
13819
13844
  }
13820
13845
  };
@@ -15142,6 +15167,19 @@ function fromJsonTimestamp2(o) {
15142
15167
  return fromTimestamp2(Timestamp.fromJSON(o));
15143
15168
  }
15144
15169
  }
15170
+ function longToNumber3(long) {
15171
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
15172
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
15173
+ }
15174
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
15175
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
15176
+ }
15177
+ return long.toNumber();
15178
+ }
15179
+ if (import_minimal5.default.util.Long !== import_long4.default) {
15180
+ import_minimal5.default.util.Long = import_long4.default;
15181
+ import_minimal5.default.configure();
15182
+ }
15145
15183
  function isObject(value) {
15146
15184
  return typeof value === "object" && value !== null;
15147
15185
  }