core-3nweb-client-lib 0.48.6 → 0.49.0

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.
@@ -41,7 +41,7 @@ $root.ipc = (function() {
41
41
  this.path = [];
42
42
  if (properties)
43
43
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
44
- if (properties[keys[i]] != null)
44
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
45
45
  this[keys[i]] = properties[keys[i]];
46
46
  }
47
47
 
@@ -90,13 +90,17 @@ $root.ipc = (function() {
90
90
  * @param {$protobuf.Writer} [writer] Writer to encode to
91
91
  * @returns {$protobuf.Writer} Writer
92
92
  */
93
- EnvelopeHeaders.encode = function encode(message, writer) {
93
+ EnvelopeHeaders.encode = function encode(message, writer, q) {
94
94
  if (!writer)
95
95
  writer = $Writer.create();
96
+ if (q === undefined)
97
+ q = 0;
98
+ if (q > $util.recursionLimit)
99
+ throw Error("max depth exceeded");
96
100
  if (message.msgType != null && Object.hasOwnProperty.call(message, "msgType"))
97
101
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.msgType);
98
102
  if (message.fnCallNum != null && Object.hasOwnProperty.call(message, "fnCallNum"))
99
- $root.common.UInt64Value.encode(message.fnCallNum, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
103
+ $root.common.UInt64Value.encode(message.fnCallNum, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim();
100
104
  if (message.path != null && message.path.length)
101
105
  for (var i = 0; i < message.path.length; ++i)
102
106
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.path[i]);
@@ -113,7 +117,7 @@ $root.ipc = (function() {
113
117
  * @returns {$protobuf.Writer} Writer
114
118
  */
115
119
  EnvelopeHeaders.encodeDelimited = function encodeDelimited(message, writer) {
116
- return this.encode(message, writer).ldelim();
120
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
117
121
  };
118
122
 
119
123
  /**
@@ -127,9 +131,13 @@ $root.ipc = (function() {
127
131
  * @throws {Error} If the payload is not a reader or valid buffer
128
132
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
129
133
  */
130
- EnvelopeHeaders.decode = function decode(reader, length, error) {
134
+ EnvelopeHeaders.decode = function decode(reader, length, error, long) {
131
135
  if (!(reader instanceof $Reader))
132
136
  reader = $Reader.create(reader);
137
+ if (long === undefined)
138
+ long = 0;
139
+ if (long > $Reader.recursionLimit)
140
+ throw Error("maximum nesting depth exceeded");
133
141
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ipc.EnvelopeHeaders();
134
142
  while (reader.pos < end) {
135
143
  var tag = reader.uint32();
@@ -141,7 +149,7 @@ $root.ipc = (function() {
141
149
  break;
142
150
  }
143
151
  case 2: {
144
- message.fnCallNum = $root.common.UInt64Value.decode(reader, reader.uint32());
152
+ message.fnCallNum = $root.common.UInt64Value.decode(reader, reader.uint32(), undefined, long + 1);
145
153
  break;
146
154
  }
147
155
  case 3: {
@@ -151,7 +159,7 @@ $root.ipc = (function() {
151
159
  break;
152
160
  }
153
161
  default:
154
- reader.skipType(tag & 7);
162
+ reader.skipType(tag & 7, long);
155
163
  break;
156
164
  }
157
165
  }
@@ -182,18 +190,22 @@ $root.ipc = (function() {
182
190
  * @param {Object.<string,*>} message Plain object to verify
183
191
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
184
192
  */
185
- EnvelopeHeaders.verify = function verify(message) {
193
+ EnvelopeHeaders.verify = function verify(message, long) {
186
194
  if (typeof message !== "object" || message === null)
187
195
  return "object expected";
188
- if (message.msgType != null && message.hasOwnProperty("msgType"))
196
+ if (long === undefined)
197
+ long = 0;
198
+ if (long > $util.recursionLimit)
199
+ return "maximum nesting depth exceeded";
200
+ if (message.msgType != null && Object.hasOwnProperty.call(message, "msgType"))
189
201
  if (!$util.isString(message.msgType))
190
202
  return "msgType: string expected";
191
- if (message.fnCallNum != null && message.hasOwnProperty("fnCallNum")) {
192
- var error = $root.common.UInt64Value.verify(message.fnCallNum);
203
+ if (message.fnCallNum != null && Object.hasOwnProperty.call(message, "fnCallNum")) {
204
+ var error = $root.common.UInt64Value.verify(message.fnCallNum, long + 1);
193
205
  if (error)
194
206
  return "fnCallNum." + error;
195
207
  }
196
- if (message.path != null && message.hasOwnProperty("path")) {
208
+ if (message.path != null && Object.hasOwnProperty.call(message, "path")) {
197
209
  if (!Array.isArray(message.path))
198
210
  return "path: array expected";
199
211
  for (var i = 0; i < message.path.length; ++i)
@@ -211,16 +223,22 @@ $root.ipc = (function() {
211
223
  * @param {Object.<string,*>} object Plain object
212
224
  * @returns {ipc.EnvelopeHeaders} EnvelopeHeaders
213
225
  */
214
- EnvelopeHeaders.fromObject = function fromObject(object) {
226
+ EnvelopeHeaders.fromObject = function fromObject(object, long) {
215
227
  if (object instanceof $root.ipc.EnvelopeHeaders)
216
228
  return object;
229
+ if (!$util.isObject(object))
230
+ throw TypeError(".ipc.EnvelopeHeaders: object expected");
231
+ if (long === undefined)
232
+ long = 0;
233
+ if (long > $util.recursionLimit)
234
+ throw Error("maximum nesting depth exceeded");
217
235
  var message = new $root.ipc.EnvelopeHeaders();
218
236
  if (object.msgType != null)
219
237
  message.msgType = String(object.msgType);
220
238
  if (object.fnCallNum != null) {
221
- if (typeof object.fnCallNum !== "object")
239
+ if (!$util.isObject(object.fnCallNum))
222
240
  throw TypeError(".ipc.EnvelopeHeaders.fnCallNum: object expected");
223
- message.fnCallNum = $root.common.UInt64Value.fromObject(object.fnCallNum);
241
+ message.fnCallNum = $root.common.UInt64Value.fromObject(object.fnCallNum, long + 1);
224
242
  }
225
243
  if (object.path) {
226
244
  if (!Array.isArray(object.path))
@@ -241,9 +259,13 @@ $root.ipc = (function() {
241
259
  * @param {$protobuf.IConversionOptions} [options] Conversion options
242
260
  * @returns {Object.<string,*>} Plain object
243
261
  */
244
- EnvelopeHeaders.toObject = function toObject(message, options) {
262
+ EnvelopeHeaders.toObject = function toObject(message, options, q) {
245
263
  if (!options)
246
264
  options = {};
265
+ if (q === undefined)
266
+ q = 0;
267
+ if (q > $util.recursionLimit)
268
+ throw Error("max depth exceeded");
247
269
  var object = {};
248
270
  if (options.arrays || options.defaults)
249
271
  object.path = [];
@@ -251,10 +273,10 @@ $root.ipc = (function() {
251
273
  object.msgType = "";
252
274
  object.fnCallNum = null;
253
275
  }
254
- if (message.msgType != null && message.hasOwnProperty("msgType"))
276
+ if (message.msgType != null && Object.hasOwnProperty.call(message, "msgType"))
255
277
  object.msgType = message.msgType;
256
- if (message.fnCallNum != null && message.hasOwnProperty("fnCallNum"))
257
- object.fnCallNum = $root.common.UInt64Value.toObject(message.fnCallNum, options);
278
+ if (message.fnCallNum != null && Object.hasOwnProperty.call(message, "fnCallNum"))
279
+ object.fnCallNum = $root.common.UInt64Value.toObject(message.fnCallNum, options, q + 1);
258
280
  if (message.path && message.path.length) {
259
281
  object.path = [];
260
282
  for (var j = 0; j < message.path.length; ++j)
@@ -313,7 +335,7 @@ $root.ipc = (function() {
313
335
  function Envelope(properties) {
314
336
  if (properties)
315
337
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
316
- if (properties[keys[i]] != null)
338
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
317
339
  this[keys[i]] = properties[keys[i]];
318
340
  }
319
341
 
@@ -354,13 +376,17 @@ $root.ipc = (function() {
354
376
  * @param {$protobuf.Writer} [writer] Writer to encode to
355
377
  * @returns {$protobuf.Writer} Writer
356
378
  */
357
- Envelope.encode = function encode(message, writer) {
379
+ Envelope.encode = function encode(message, writer, q) {
358
380
  if (!writer)
359
381
  writer = $Writer.create();
382
+ if (q === undefined)
383
+ q = 0;
384
+ if (q > $util.recursionLimit)
385
+ throw Error("max depth exceeded");
360
386
  if (message.headers != null && Object.hasOwnProperty.call(message, "headers"))
361
- $root.ipc.EnvelopeHeaders.encode(message.headers, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
387
+ $root.ipc.EnvelopeHeaders.encode(message.headers, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim();
362
388
  if (message.body != null && Object.hasOwnProperty.call(message, "body"))
363
- $root.common.BytesValue.encode(message.body, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
389
+ $root.common.BytesValue.encode(message.body, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim();
364
390
  return writer;
365
391
  };
366
392
 
@@ -374,7 +400,7 @@ $root.ipc = (function() {
374
400
  * @returns {$protobuf.Writer} Writer
375
401
  */
376
402
  Envelope.encodeDelimited = function encodeDelimited(message, writer) {
377
- return this.encode(message, writer).ldelim();
403
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
378
404
  };
379
405
 
380
406
  /**
@@ -388,9 +414,13 @@ $root.ipc = (function() {
388
414
  * @throws {Error} If the payload is not a reader or valid buffer
389
415
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
390
416
  */
391
- Envelope.decode = function decode(reader, length, error) {
417
+ Envelope.decode = function decode(reader, length, error, long) {
392
418
  if (!(reader instanceof $Reader))
393
419
  reader = $Reader.create(reader);
420
+ if (long === undefined)
421
+ long = 0;
422
+ if (long > $Reader.recursionLimit)
423
+ throw Error("maximum nesting depth exceeded");
394
424
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ipc.Envelope();
395
425
  while (reader.pos < end) {
396
426
  var tag = reader.uint32();
@@ -398,15 +428,15 @@ $root.ipc = (function() {
398
428
  break;
399
429
  switch (tag >>> 3) {
400
430
  case 1: {
401
- message.headers = $root.ipc.EnvelopeHeaders.decode(reader, reader.uint32());
431
+ message.headers = $root.ipc.EnvelopeHeaders.decode(reader, reader.uint32(), undefined, long + 1);
402
432
  break;
403
433
  }
404
434
  case 2: {
405
- message.body = $root.common.BytesValue.decode(reader, reader.uint32());
435
+ message.body = $root.common.BytesValue.decode(reader, reader.uint32(), undefined, long + 1);
406
436
  break;
407
437
  }
408
438
  default:
409
- reader.skipType(tag & 7);
439
+ reader.skipType(tag & 7, long);
410
440
  break;
411
441
  }
412
442
  }
@@ -437,16 +467,20 @@ $root.ipc = (function() {
437
467
  * @param {Object.<string,*>} message Plain object to verify
438
468
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
439
469
  */
440
- Envelope.verify = function verify(message) {
470
+ Envelope.verify = function verify(message, long) {
441
471
  if (typeof message !== "object" || message === null)
442
472
  return "object expected";
443
- if (message.headers != null && message.hasOwnProperty("headers")) {
444
- var error = $root.ipc.EnvelopeHeaders.verify(message.headers);
473
+ if (long === undefined)
474
+ long = 0;
475
+ if (long > $util.recursionLimit)
476
+ return "maximum nesting depth exceeded";
477
+ if (message.headers != null && Object.hasOwnProperty.call(message, "headers")) {
478
+ var error = $root.ipc.EnvelopeHeaders.verify(message.headers, long + 1);
445
479
  if (error)
446
480
  return "headers." + error;
447
481
  }
448
- if (message.body != null && message.hasOwnProperty("body")) {
449
- var error = $root.common.BytesValue.verify(message.body);
482
+ if (message.body != null && Object.hasOwnProperty.call(message, "body")) {
483
+ var error = $root.common.BytesValue.verify(message.body, long + 1);
450
484
  if (error)
451
485
  return "body." + error;
452
486
  }
@@ -461,19 +495,25 @@ $root.ipc = (function() {
461
495
  * @param {Object.<string,*>} object Plain object
462
496
  * @returns {ipc.Envelope} Envelope
463
497
  */
464
- Envelope.fromObject = function fromObject(object) {
498
+ Envelope.fromObject = function fromObject(object, long) {
465
499
  if (object instanceof $root.ipc.Envelope)
466
500
  return object;
501
+ if (!$util.isObject(object))
502
+ throw TypeError(".ipc.Envelope: object expected");
503
+ if (long === undefined)
504
+ long = 0;
505
+ if (long > $util.recursionLimit)
506
+ throw Error("maximum nesting depth exceeded");
467
507
  var message = new $root.ipc.Envelope();
468
508
  if (object.headers != null) {
469
- if (typeof object.headers !== "object")
509
+ if (!$util.isObject(object.headers))
470
510
  throw TypeError(".ipc.Envelope.headers: object expected");
471
- message.headers = $root.ipc.EnvelopeHeaders.fromObject(object.headers);
511
+ message.headers = $root.ipc.EnvelopeHeaders.fromObject(object.headers, long + 1);
472
512
  }
473
513
  if (object.body != null) {
474
- if (typeof object.body !== "object")
514
+ if (!$util.isObject(object.body))
475
515
  throw TypeError(".ipc.Envelope.body: object expected");
476
- message.body = $root.common.BytesValue.fromObject(object.body);
516
+ message.body = $root.common.BytesValue.fromObject(object.body, long + 1);
477
517
  }
478
518
  return message;
479
519
  };
@@ -487,18 +527,22 @@ $root.ipc = (function() {
487
527
  * @param {$protobuf.IConversionOptions} [options] Conversion options
488
528
  * @returns {Object.<string,*>} Plain object
489
529
  */
490
- Envelope.toObject = function toObject(message, options) {
530
+ Envelope.toObject = function toObject(message, options, q) {
491
531
  if (!options)
492
532
  options = {};
533
+ if (q === undefined)
534
+ q = 0;
535
+ if (q > $util.recursionLimit)
536
+ throw Error("max depth exceeded");
493
537
  var object = {};
494
538
  if (options.defaults) {
495
539
  object.headers = null;
496
540
  object.body = null;
497
541
  }
498
- if (message.headers != null && message.hasOwnProperty("headers"))
499
- object.headers = $root.ipc.EnvelopeHeaders.toObject(message.headers, options);
500
- if (message.body != null && message.hasOwnProperty("body"))
501
- object.body = $root.common.BytesValue.toObject(message.body, options);
542
+ if (message.headers != null && Object.hasOwnProperty.call(message, "headers"))
543
+ object.headers = $root.ipc.EnvelopeHeaders.toObject(message.headers, options, q + 1);
544
+ if (message.body != null && Object.hasOwnProperty.call(message, "body"))
545
+ object.body = $root.common.BytesValue.toObject(message.body, options, q + 1);
502
546
  return object;
503
547
  };
504
548
 
@@ -565,7 +609,7 @@ $root.common = (function() {
565
609
  this.path = [];
566
610
  if (properties)
567
611
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
568
- if (properties[keys[i]] != null)
612
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
569
613
  this[keys[i]] = properties[keys[i]];
570
614
  }
571
615
 
@@ -606,9 +650,13 @@ $root.common = (function() {
606
650
  * @param {$protobuf.Writer} [writer] Writer to encode to
607
651
  * @returns {$protobuf.Writer} Writer
608
652
  */
609
- ObjectReference.encode = function encode(message, writer) {
653
+ ObjectReference.encode = function encode(message, writer, q) {
610
654
  if (!writer)
611
655
  writer = $Writer.create();
656
+ if (q === undefined)
657
+ q = 0;
658
+ if (q > $util.recursionLimit)
659
+ throw Error("max depth exceeded");
612
660
  if (message.objType != null && Object.hasOwnProperty.call(message, "objType"))
613
661
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.objType);
614
662
  if (message.path != null && message.path.length)
@@ -627,7 +675,7 @@ $root.common = (function() {
627
675
  * @returns {$protobuf.Writer} Writer
628
676
  */
629
677
  ObjectReference.encodeDelimited = function encodeDelimited(message, writer) {
630
- return this.encode(message, writer).ldelim();
678
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
631
679
  };
632
680
 
633
681
  /**
@@ -641,9 +689,13 @@ $root.common = (function() {
641
689
  * @throws {Error} If the payload is not a reader or valid buffer
642
690
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
643
691
  */
644
- ObjectReference.decode = function decode(reader, length, error) {
692
+ ObjectReference.decode = function decode(reader, length, error, long) {
645
693
  if (!(reader instanceof $Reader))
646
694
  reader = $Reader.create(reader);
695
+ if (long === undefined)
696
+ long = 0;
697
+ if (long > $Reader.recursionLimit)
698
+ throw Error("maximum nesting depth exceeded");
647
699
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.ObjectReference();
648
700
  while (reader.pos < end) {
649
701
  var tag = reader.uint32();
@@ -661,7 +713,7 @@ $root.common = (function() {
661
713
  break;
662
714
  }
663
715
  default:
664
- reader.skipType(tag & 7);
716
+ reader.skipType(tag & 7, long);
665
717
  break;
666
718
  }
667
719
  }
@@ -692,13 +744,17 @@ $root.common = (function() {
692
744
  * @param {Object.<string,*>} message Plain object to verify
693
745
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
694
746
  */
695
- ObjectReference.verify = function verify(message) {
747
+ ObjectReference.verify = function verify(message, long) {
696
748
  if (typeof message !== "object" || message === null)
697
749
  return "object expected";
698
- if (message.objType != null && message.hasOwnProperty("objType"))
750
+ if (long === undefined)
751
+ long = 0;
752
+ if (long > $util.recursionLimit)
753
+ return "maximum nesting depth exceeded";
754
+ if (message.objType != null && Object.hasOwnProperty.call(message, "objType"))
699
755
  if (!$util.isString(message.objType))
700
756
  return "objType: string expected";
701
- if (message.path != null && message.hasOwnProperty("path")) {
757
+ if (message.path != null && Object.hasOwnProperty.call(message, "path")) {
702
758
  if (!Array.isArray(message.path))
703
759
  return "path: array expected";
704
760
  for (var i = 0; i < message.path.length; ++i)
@@ -716,9 +772,15 @@ $root.common = (function() {
716
772
  * @param {Object.<string,*>} object Plain object
717
773
  * @returns {common.ObjectReference} ObjectReference
718
774
  */
719
- ObjectReference.fromObject = function fromObject(object) {
775
+ ObjectReference.fromObject = function fromObject(object, long) {
720
776
  if (object instanceof $root.common.ObjectReference)
721
777
  return object;
778
+ if (!$util.isObject(object))
779
+ throw TypeError(".common.ObjectReference: object expected");
780
+ if (long === undefined)
781
+ long = 0;
782
+ if (long > $util.recursionLimit)
783
+ throw Error("maximum nesting depth exceeded");
722
784
  var message = new $root.common.ObjectReference();
723
785
  if (object.objType != null)
724
786
  message.objType = String(object.objType);
@@ -741,15 +803,19 @@ $root.common = (function() {
741
803
  * @param {$protobuf.IConversionOptions} [options] Conversion options
742
804
  * @returns {Object.<string,*>} Plain object
743
805
  */
744
- ObjectReference.toObject = function toObject(message, options) {
806
+ ObjectReference.toObject = function toObject(message, options, q) {
745
807
  if (!options)
746
808
  options = {};
809
+ if (q === undefined)
810
+ q = 0;
811
+ if (q > $util.recursionLimit)
812
+ throw Error("max depth exceeded");
747
813
  var object = {};
748
814
  if (options.arrays || options.defaults)
749
815
  object.path = [];
750
816
  if (options.defaults)
751
817
  object.objType = "";
752
- if (message.objType != null && message.hasOwnProperty("objType"))
818
+ if (message.objType != null && Object.hasOwnProperty.call(message, "objType"))
753
819
  object.objType = message.objType;
754
820
  if (message.path && message.path.length) {
755
821
  object.path = [];
@@ -808,7 +874,7 @@ $root.common = (function() {
808
874
  function BooleanValue(properties) {
809
875
  if (properties)
810
876
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
811
- if (properties[keys[i]] != null)
877
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
812
878
  this[keys[i]] = properties[keys[i]];
813
879
  }
814
880
 
@@ -841,9 +907,13 @@ $root.common = (function() {
841
907
  * @param {$protobuf.Writer} [writer] Writer to encode to
842
908
  * @returns {$protobuf.Writer} Writer
843
909
  */
844
- BooleanValue.encode = function encode(message, writer) {
910
+ BooleanValue.encode = function encode(message, writer, q) {
845
911
  if (!writer)
846
912
  writer = $Writer.create();
913
+ if (q === undefined)
914
+ q = 0;
915
+ if (q > $util.recursionLimit)
916
+ throw Error("max depth exceeded");
847
917
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
848
918
  writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value);
849
919
  return writer;
@@ -859,7 +929,7 @@ $root.common = (function() {
859
929
  * @returns {$protobuf.Writer} Writer
860
930
  */
861
931
  BooleanValue.encodeDelimited = function encodeDelimited(message, writer) {
862
- return this.encode(message, writer).ldelim();
932
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
863
933
  };
864
934
 
865
935
  /**
@@ -873,9 +943,13 @@ $root.common = (function() {
873
943
  * @throws {Error} If the payload is not a reader or valid buffer
874
944
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
875
945
  */
876
- BooleanValue.decode = function decode(reader, length, error) {
946
+ BooleanValue.decode = function decode(reader, length, error, long) {
877
947
  if (!(reader instanceof $Reader))
878
948
  reader = $Reader.create(reader);
949
+ if (long === undefined)
950
+ long = 0;
951
+ if (long > $Reader.recursionLimit)
952
+ throw Error("maximum nesting depth exceeded");
879
953
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.BooleanValue();
880
954
  while (reader.pos < end) {
881
955
  var tag = reader.uint32();
@@ -887,7 +961,7 @@ $root.common = (function() {
887
961
  break;
888
962
  }
889
963
  default:
890
- reader.skipType(tag & 7);
964
+ reader.skipType(tag & 7, long);
891
965
  break;
892
966
  }
893
967
  }
@@ -918,10 +992,14 @@ $root.common = (function() {
918
992
  * @param {Object.<string,*>} message Plain object to verify
919
993
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
920
994
  */
921
- BooleanValue.verify = function verify(message) {
995
+ BooleanValue.verify = function verify(message, long) {
922
996
  if (typeof message !== "object" || message === null)
923
997
  return "object expected";
924
- if (message.value != null && message.hasOwnProperty("value"))
998
+ if (long === undefined)
999
+ long = 0;
1000
+ if (long > $util.recursionLimit)
1001
+ return "maximum nesting depth exceeded";
1002
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
925
1003
  if (typeof message.value !== "boolean")
926
1004
  return "value: boolean expected";
927
1005
  return null;
@@ -935,9 +1013,15 @@ $root.common = (function() {
935
1013
  * @param {Object.<string,*>} object Plain object
936
1014
  * @returns {common.BooleanValue} BooleanValue
937
1015
  */
938
- BooleanValue.fromObject = function fromObject(object) {
1016
+ BooleanValue.fromObject = function fromObject(object, long) {
939
1017
  if (object instanceof $root.common.BooleanValue)
940
1018
  return object;
1019
+ if (!$util.isObject(object))
1020
+ throw TypeError(".common.BooleanValue: object expected");
1021
+ if (long === undefined)
1022
+ long = 0;
1023
+ if (long > $util.recursionLimit)
1024
+ throw Error("maximum nesting depth exceeded");
941
1025
  var message = new $root.common.BooleanValue();
942
1026
  if (object.value != null)
943
1027
  message.value = Boolean(object.value);
@@ -953,13 +1037,17 @@ $root.common = (function() {
953
1037
  * @param {$protobuf.IConversionOptions} [options] Conversion options
954
1038
  * @returns {Object.<string,*>} Plain object
955
1039
  */
956
- BooleanValue.toObject = function toObject(message, options) {
1040
+ BooleanValue.toObject = function toObject(message, options, q) {
957
1041
  if (!options)
958
1042
  options = {};
1043
+ if (q === undefined)
1044
+ q = 0;
1045
+ if (q > $util.recursionLimit)
1046
+ throw Error("max depth exceeded");
959
1047
  var object = {};
960
1048
  if (options.defaults)
961
1049
  object.value = false;
962
- if (message.value != null && message.hasOwnProperty("value"))
1050
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
963
1051
  object.value = message.value;
964
1052
  return object;
965
1053
  };
@@ -1014,7 +1102,7 @@ $root.common = (function() {
1014
1102
  this.values = [];
1015
1103
  if (properties)
1016
1104
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1017
- if (properties[keys[i]] != null)
1105
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
1018
1106
  this[keys[i]] = properties[keys[i]];
1019
1107
  }
1020
1108
 
@@ -1047,9 +1135,13 @@ $root.common = (function() {
1047
1135
  * @param {$protobuf.Writer} [writer] Writer to encode to
1048
1136
  * @returns {$protobuf.Writer} Writer
1049
1137
  */
1050
- StringArrayValue.encode = function encode(message, writer) {
1138
+ StringArrayValue.encode = function encode(message, writer, q) {
1051
1139
  if (!writer)
1052
1140
  writer = $Writer.create();
1141
+ if (q === undefined)
1142
+ q = 0;
1143
+ if (q > $util.recursionLimit)
1144
+ throw Error("max depth exceeded");
1053
1145
  if (message.values != null && message.values.length)
1054
1146
  for (var i = 0; i < message.values.length; ++i)
1055
1147
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]);
@@ -1066,7 +1158,7 @@ $root.common = (function() {
1066
1158
  * @returns {$protobuf.Writer} Writer
1067
1159
  */
1068
1160
  StringArrayValue.encodeDelimited = function encodeDelimited(message, writer) {
1069
- return this.encode(message, writer).ldelim();
1161
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
1070
1162
  };
1071
1163
 
1072
1164
  /**
@@ -1080,9 +1172,13 @@ $root.common = (function() {
1080
1172
  * @throws {Error} If the payload is not a reader or valid buffer
1081
1173
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
1082
1174
  */
1083
- StringArrayValue.decode = function decode(reader, length, error) {
1175
+ StringArrayValue.decode = function decode(reader, length, error, long) {
1084
1176
  if (!(reader instanceof $Reader))
1085
1177
  reader = $Reader.create(reader);
1178
+ if (long === undefined)
1179
+ long = 0;
1180
+ if (long > $Reader.recursionLimit)
1181
+ throw Error("maximum nesting depth exceeded");
1086
1182
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.StringArrayValue();
1087
1183
  while (reader.pos < end) {
1088
1184
  var tag = reader.uint32();
@@ -1096,7 +1192,7 @@ $root.common = (function() {
1096
1192
  break;
1097
1193
  }
1098
1194
  default:
1099
- reader.skipType(tag & 7);
1195
+ reader.skipType(tag & 7, long);
1100
1196
  break;
1101
1197
  }
1102
1198
  }
@@ -1127,10 +1223,14 @@ $root.common = (function() {
1127
1223
  * @param {Object.<string,*>} message Plain object to verify
1128
1224
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
1129
1225
  */
1130
- StringArrayValue.verify = function verify(message) {
1226
+ StringArrayValue.verify = function verify(message, long) {
1131
1227
  if (typeof message !== "object" || message === null)
1132
1228
  return "object expected";
1133
- if (message.values != null && message.hasOwnProperty("values")) {
1229
+ if (long === undefined)
1230
+ long = 0;
1231
+ if (long > $util.recursionLimit)
1232
+ return "maximum nesting depth exceeded";
1233
+ if (message.values != null && Object.hasOwnProperty.call(message, "values")) {
1134
1234
  if (!Array.isArray(message.values))
1135
1235
  return "values: array expected";
1136
1236
  for (var i = 0; i < message.values.length; ++i)
@@ -1148,9 +1248,15 @@ $root.common = (function() {
1148
1248
  * @param {Object.<string,*>} object Plain object
1149
1249
  * @returns {common.StringArrayValue} StringArrayValue
1150
1250
  */
1151
- StringArrayValue.fromObject = function fromObject(object) {
1251
+ StringArrayValue.fromObject = function fromObject(object, long) {
1152
1252
  if (object instanceof $root.common.StringArrayValue)
1153
1253
  return object;
1254
+ if (!$util.isObject(object))
1255
+ throw TypeError(".common.StringArrayValue: object expected");
1256
+ if (long === undefined)
1257
+ long = 0;
1258
+ if (long > $util.recursionLimit)
1259
+ throw Error("maximum nesting depth exceeded");
1154
1260
  var message = new $root.common.StringArrayValue();
1155
1261
  if (object.values) {
1156
1262
  if (!Array.isArray(object.values))
@@ -1171,9 +1277,13 @@ $root.common = (function() {
1171
1277
  * @param {$protobuf.IConversionOptions} [options] Conversion options
1172
1278
  * @returns {Object.<string,*>} Plain object
1173
1279
  */
1174
- StringArrayValue.toObject = function toObject(message, options) {
1280
+ StringArrayValue.toObject = function toObject(message, options, q) {
1175
1281
  if (!options)
1176
1282
  options = {};
1283
+ if (q === undefined)
1284
+ q = 0;
1285
+ if (q > $util.recursionLimit)
1286
+ throw Error("max depth exceeded");
1177
1287
  var object = {};
1178
1288
  if (options.arrays || options.defaults)
1179
1289
  object.values = [];
@@ -1234,7 +1344,7 @@ $root.common = (function() {
1234
1344
  function UInt64Value(properties) {
1235
1345
  if (properties)
1236
1346
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1237
- if (properties[keys[i]] != null)
1347
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
1238
1348
  this[keys[i]] = properties[keys[i]];
1239
1349
  }
1240
1350
 
@@ -1267,9 +1377,13 @@ $root.common = (function() {
1267
1377
  * @param {$protobuf.Writer} [writer] Writer to encode to
1268
1378
  * @returns {$protobuf.Writer} Writer
1269
1379
  */
1270
- UInt64Value.encode = function encode(message, writer) {
1380
+ UInt64Value.encode = function encode(message, writer, q) {
1271
1381
  if (!writer)
1272
1382
  writer = $Writer.create();
1383
+ if (q === undefined)
1384
+ q = 0;
1385
+ if (q > $util.recursionLimit)
1386
+ throw Error("max depth exceeded");
1273
1387
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1274
1388
  writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value);
1275
1389
  return writer;
@@ -1285,7 +1399,7 @@ $root.common = (function() {
1285
1399
  * @returns {$protobuf.Writer} Writer
1286
1400
  */
1287
1401
  UInt64Value.encodeDelimited = function encodeDelimited(message, writer) {
1288
- return this.encode(message, writer).ldelim();
1402
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
1289
1403
  };
1290
1404
 
1291
1405
  /**
@@ -1299,9 +1413,13 @@ $root.common = (function() {
1299
1413
  * @throws {Error} If the payload is not a reader or valid buffer
1300
1414
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
1301
1415
  */
1302
- UInt64Value.decode = function decode(reader, length, error) {
1416
+ UInt64Value.decode = function decode(reader, length, error, long) {
1303
1417
  if (!(reader instanceof $Reader))
1304
1418
  reader = $Reader.create(reader);
1419
+ if (long === undefined)
1420
+ long = 0;
1421
+ if (long > $Reader.recursionLimit)
1422
+ throw Error("maximum nesting depth exceeded");
1305
1423
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.UInt64Value();
1306
1424
  while (reader.pos < end) {
1307
1425
  var tag = reader.uint32();
@@ -1313,7 +1431,7 @@ $root.common = (function() {
1313
1431
  break;
1314
1432
  }
1315
1433
  default:
1316
- reader.skipType(tag & 7);
1434
+ reader.skipType(tag & 7, long);
1317
1435
  break;
1318
1436
  }
1319
1437
  }
@@ -1344,10 +1462,14 @@ $root.common = (function() {
1344
1462
  * @param {Object.<string,*>} message Plain object to verify
1345
1463
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
1346
1464
  */
1347
- UInt64Value.verify = function verify(message) {
1465
+ UInt64Value.verify = function verify(message, long) {
1348
1466
  if (typeof message !== "object" || message === null)
1349
1467
  return "object expected";
1350
- if (message.value != null && message.hasOwnProperty("value"))
1468
+ if (long === undefined)
1469
+ long = 0;
1470
+ if (long > $util.recursionLimit)
1471
+ return "maximum nesting depth exceeded";
1472
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1351
1473
  if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high)))
1352
1474
  return "value: integer|Long expected";
1353
1475
  return null;
@@ -1361,13 +1483,19 @@ $root.common = (function() {
1361
1483
  * @param {Object.<string,*>} object Plain object
1362
1484
  * @returns {common.UInt64Value} UInt64Value
1363
1485
  */
1364
- UInt64Value.fromObject = function fromObject(object) {
1486
+ UInt64Value.fromObject = function fromObject(object, long) {
1365
1487
  if (object instanceof $root.common.UInt64Value)
1366
1488
  return object;
1489
+ if (!$util.isObject(object))
1490
+ throw TypeError(".common.UInt64Value: object expected");
1491
+ if (long === undefined)
1492
+ long = 0;
1493
+ if (long > $util.recursionLimit)
1494
+ throw Error("maximum nesting depth exceeded");
1367
1495
  var message = new $root.common.UInt64Value();
1368
1496
  if (object.value != null)
1369
1497
  if ($util.Long)
1370
- (message.value = $util.Long.fromValue(object.value)).unsigned = true;
1498
+ message.value = $util.Long.fromValue(object.value, true);
1371
1499
  else if (typeof object.value === "string")
1372
1500
  message.value = parseInt(object.value, 10);
1373
1501
  else if (typeof object.value === "number")
@@ -1386,18 +1514,24 @@ $root.common = (function() {
1386
1514
  * @param {$protobuf.IConversionOptions} [options] Conversion options
1387
1515
  * @returns {Object.<string,*>} Plain object
1388
1516
  */
1389
- UInt64Value.toObject = function toObject(message, options) {
1517
+ UInt64Value.toObject = function toObject(message, options, q) {
1390
1518
  if (!options)
1391
1519
  options = {};
1520
+ if (q === undefined)
1521
+ q = 0;
1522
+ if (q > $util.recursionLimit)
1523
+ throw Error("max depth exceeded");
1392
1524
  var object = {};
1393
1525
  if (options.defaults)
1394
1526
  if ($util.Long) {
1395
1527
  var long = new $util.Long(0, 0, true);
1396
- object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
1528
+ object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
1397
1529
  } else
1398
- object.value = options.longs === String ? "0" : 0;
1399
- if (message.value != null && message.hasOwnProperty("value"))
1400
- if (typeof message.value === "number")
1530
+ object.value = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
1531
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1532
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
1533
+ object.value = typeof message.value === "number" ? BigInt(message.value) : $util.Long.fromBits(message.value.low >>> 0, message.value.high >>> 0, true).toBigInt();
1534
+ else if (typeof message.value === "number")
1401
1535
  object.value = options.longs === String ? String(message.value) : message.value;
1402
1536
  else
1403
1537
  object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value;
@@ -1453,7 +1587,7 @@ $root.common = (function() {
1453
1587
  function UInt32Value(properties) {
1454
1588
  if (properties)
1455
1589
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1456
- if (properties[keys[i]] != null)
1590
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
1457
1591
  this[keys[i]] = properties[keys[i]];
1458
1592
  }
1459
1593
 
@@ -1486,9 +1620,13 @@ $root.common = (function() {
1486
1620
  * @param {$protobuf.Writer} [writer] Writer to encode to
1487
1621
  * @returns {$protobuf.Writer} Writer
1488
1622
  */
1489
- UInt32Value.encode = function encode(message, writer) {
1623
+ UInt32Value.encode = function encode(message, writer, q) {
1490
1624
  if (!writer)
1491
1625
  writer = $Writer.create();
1626
+ if (q === undefined)
1627
+ q = 0;
1628
+ if (q > $util.recursionLimit)
1629
+ throw Error("max depth exceeded");
1492
1630
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1493
1631
  writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value);
1494
1632
  return writer;
@@ -1504,7 +1642,7 @@ $root.common = (function() {
1504
1642
  * @returns {$protobuf.Writer} Writer
1505
1643
  */
1506
1644
  UInt32Value.encodeDelimited = function encodeDelimited(message, writer) {
1507
- return this.encode(message, writer).ldelim();
1645
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
1508
1646
  };
1509
1647
 
1510
1648
  /**
@@ -1518,9 +1656,13 @@ $root.common = (function() {
1518
1656
  * @throws {Error} If the payload is not a reader or valid buffer
1519
1657
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
1520
1658
  */
1521
- UInt32Value.decode = function decode(reader, length, error) {
1659
+ UInt32Value.decode = function decode(reader, length, error, long) {
1522
1660
  if (!(reader instanceof $Reader))
1523
1661
  reader = $Reader.create(reader);
1662
+ if (long === undefined)
1663
+ long = 0;
1664
+ if (long > $Reader.recursionLimit)
1665
+ throw Error("maximum nesting depth exceeded");
1524
1666
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.UInt32Value();
1525
1667
  while (reader.pos < end) {
1526
1668
  var tag = reader.uint32();
@@ -1532,7 +1674,7 @@ $root.common = (function() {
1532
1674
  break;
1533
1675
  }
1534
1676
  default:
1535
- reader.skipType(tag & 7);
1677
+ reader.skipType(tag & 7, long);
1536
1678
  break;
1537
1679
  }
1538
1680
  }
@@ -1563,10 +1705,14 @@ $root.common = (function() {
1563
1705
  * @param {Object.<string,*>} message Plain object to verify
1564
1706
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
1565
1707
  */
1566
- UInt32Value.verify = function verify(message) {
1708
+ UInt32Value.verify = function verify(message, long) {
1567
1709
  if (typeof message !== "object" || message === null)
1568
1710
  return "object expected";
1569
- if (message.value != null && message.hasOwnProperty("value"))
1711
+ if (long === undefined)
1712
+ long = 0;
1713
+ if (long > $util.recursionLimit)
1714
+ return "maximum nesting depth exceeded";
1715
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1570
1716
  if (!$util.isInteger(message.value))
1571
1717
  return "value: integer expected";
1572
1718
  return null;
@@ -1580,9 +1726,15 @@ $root.common = (function() {
1580
1726
  * @param {Object.<string,*>} object Plain object
1581
1727
  * @returns {common.UInt32Value} UInt32Value
1582
1728
  */
1583
- UInt32Value.fromObject = function fromObject(object) {
1729
+ UInt32Value.fromObject = function fromObject(object, long) {
1584
1730
  if (object instanceof $root.common.UInt32Value)
1585
1731
  return object;
1732
+ if (!$util.isObject(object))
1733
+ throw TypeError(".common.UInt32Value: object expected");
1734
+ if (long === undefined)
1735
+ long = 0;
1736
+ if (long > $util.recursionLimit)
1737
+ throw Error("maximum nesting depth exceeded");
1586
1738
  var message = new $root.common.UInt32Value();
1587
1739
  if (object.value != null)
1588
1740
  message.value = object.value >>> 0;
@@ -1598,13 +1750,17 @@ $root.common = (function() {
1598
1750
  * @param {$protobuf.IConversionOptions} [options] Conversion options
1599
1751
  * @returns {Object.<string,*>} Plain object
1600
1752
  */
1601
- UInt32Value.toObject = function toObject(message, options) {
1753
+ UInt32Value.toObject = function toObject(message, options, q) {
1602
1754
  if (!options)
1603
1755
  options = {};
1756
+ if (q === undefined)
1757
+ q = 0;
1758
+ if (q > $util.recursionLimit)
1759
+ throw Error("max depth exceeded");
1604
1760
  var object = {};
1605
1761
  if (options.defaults)
1606
1762
  object.value = 0;
1607
- if (message.value != null && message.hasOwnProperty("value"))
1763
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1608
1764
  object.value = message.value;
1609
1765
  return object;
1610
1766
  };
@@ -1658,7 +1814,7 @@ $root.common = (function() {
1658
1814
  function StringValue(properties) {
1659
1815
  if (properties)
1660
1816
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1661
- if (properties[keys[i]] != null)
1817
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
1662
1818
  this[keys[i]] = properties[keys[i]];
1663
1819
  }
1664
1820
 
@@ -1691,9 +1847,13 @@ $root.common = (function() {
1691
1847
  * @param {$protobuf.Writer} [writer] Writer to encode to
1692
1848
  * @returns {$protobuf.Writer} Writer
1693
1849
  */
1694
- StringValue.encode = function encode(message, writer) {
1850
+ StringValue.encode = function encode(message, writer, q) {
1695
1851
  if (!writer)
1696
1852
  writer = $Writer.create();
1853
+ if (q === undefined)
1854
+ q = 0;
1855
+ if (q > $util.recursionLimit)
1856
+ throw Error("max depth exceeded");
1697
1857
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1698
1858
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.value);
1699
1859
  return writer;
@@ -1709,7 +1869,7 @@ $root.common = (function() {
1709
1869
  * @returns {$protobuf.Writer} Writer
1710
1870
  */
1711
1871
  StringValue.encodeDelimited = function encodeDelimited(message, writer) {
1712
- return this.encode(message, writer).ldelim();
1872
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
1713
1873
  };
1714
1874
 
1715
1875
  /**
@@ -1723,9 +1883,13 @@ $root.common = (function() {
1723
1883
  * @throws {Error} If the payload is not a reader or valid buffer
1724
1884
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
1725
1885
  */
1726
- StringValue.decode = function decode(reader, length, error) {
1886
+ StringValue.decode = function decode(reader, length, error, long) {
1727
1887
  if (!(reader instanceof $Reader))
1728
1888
  reader = $Reader.create(reader);
1889
+ if (long === undefined)
1890
+ long = 0;
1891
+ if (long > $Reader.recursionLimit)
1892
+ throw Error("maximum nesting depth exceeded");
1729
1893
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.StringValue();
1730
1894
  while (reader.pos < end) {
1731
1895
  var tag = reader.uint32();
@@ -1737,7 +1901,7 @@ $root.common = (function() {
1737
1901
  break;
1738
1902
  }
1739
1903
  default:
1740
- reader.skipType(tag & 7);
1904
+ reader.skipType(tag & 7, long);
1741
1905
  break;
1742
1906
  }
1743
1907
  }
@@ -1768,10 +1932,14 @@ $root.common = (function() {
1768
1932
  * @param {Object.<string,*>} message Plain object to verify
1769
1933
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
1770
1934
  */
1771
- StringValue.verify = function verify(message) {
1935
+ StringValue.verify = function verify(message, long) {
1772
1936
  if (typeof message !== "object" || message === null)
1773
1937
  return "object expected";
1774
- if (message.value != null && message.hasOwnProperty("value"))
1938
+ if (long === undefined)
1939
+ long = 0;
1940
+ if (long > $util.recursionLimit)
1941
+ return "maximum nesting depth exceeded";
1942
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1775
1943
  if (!$util.isString(message.value))
1776
1944
  return "value: string expected";
1777
1945
  return null;
@@ -1785,9 +1953,15 @@ $root.common = (function() {
1785
1953
  * @param {Object.<string,*>} object Plain object
1786
1954
  * @returns {common.StringValue} StringValue
1787
1955
  */
1788
- StringValue.fromObject = function fromObject(object) {
1956
+ StringValue.fromObject = function fromObject(object, long) {
1789
1957
  if (object instanceof $root.common.StringValue)
1790
1958
  return object;
1959
+ if (!$util.isObject(object))
1960
+ throw TypeError(".common.StringValue: object expected");
1961
+ if (long === undefined)
1962
+ long = 0;
1963
+ if (long > $util.recursionLimit)
1964
+ throw Error("maximum nesting depth exceeded");
1791
1965
  var message = new $root.common.StringValue();
1792
1966
  if (object.value != null)
1793
1967
  message.value = String(object.value);
@@ -1803,13 +1977,17 @@ $root.common = (function() {
1803
1977
  * @param {$protobuf.IConversionOptions} [options] Conversion options
1804
1978
  * @returns {Object.<string,*>} Plain object
1805
1979
  */
1806
- StringValue.toObject = function toObject(message, options) {
1980
+ StringValue.toObject = function toObject(message, options, q) {
1807
1981
  if (!options)
1808
1982
  options = {};
1983
+ if (q === undefined)
1984
+ q = 0;
1985
+ if (q > $util.recursionLimit)
1986
+ throw Error("max depth exceeded");
1809
1987
  var object = {};
1810
1988
  if (options.defaults)
1811
1989
  object.value = "";
1812
- if (message.value != null && message.hasOwnProperty("value"))
1990
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1813
1991
  object.value = message.value;
1814
1992
  return object;
1815
1993
  };
@@ -1863,7 +2041,7 @@ $root.common = (function() {
1863
2041
  function BytesValue(properties) {
1864
2042
  if (properties)
1865
2043
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1866
- if (properties[keys[i]] != null)
2044
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
1867
2045
  this[keys[i]] = properties[keys[i]];
1868
2046
  }
1869
2047
 
@@ -1896,9 +2074,13 @@ $root.common = (function() {
1896
2074
  * @param {$protobuf.Writer} [writer] Writer to encode to
1897
2075
  * @returns {$protobuf.Writer} Writer
1898
2076
  */
1899
- BytesValue.encode = function encode(message, writer) {
2077
+ BytesValue.encode = function encode(message, writer, q) {
1900
2078
  if (!writer)
1901
2079
  writer = $Writer.create();
2080
+ if (q === undefined)
2081
+ q = 0;
2082
+ if (q > $util.recursionLimit)
2083
+ throw Error("max depth exceeded");
1902
2084
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1903
2085
  writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value);
1904
2086
  return writer;
@@ -1914,7 +2096,7 @@ $root.common = (function() {
1914
2096
  * @returns {$protobuf.Writer} Writer
1915
2097
  */
1916
2098
  BytesValue.encodeDelimited = function encodeDelimited(message, writer) {
1917
- return this.encode(message, writer).ldelim();
2099
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
1918
2100
  };
1919
2101
 
1920
2102
  /**
@@ -1928,9 +2110,13 @@ $root.common = (function() {
1928
2110
  * @throws {Error} If the payload is not a reader or valid buffer
1929
2111
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
1930
2112
  */
1931
- BytesValue.decode = function decode(reader, length, error) {
2113
+ BytesValue.decode = function decode(reader, length, error, long) {
1932
2114
  if (!(reader instanceof $Reader))
1933
2115
  reader = $Reader.create(reader);
2116
+ if (long === undefined)
2117
+ long = 0;
2118
+ if (long > $Reader.recursionLimit)
2119
+ throw Error("maximum nesting depth exceeded");
1934
2120
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.BytesValue();
1935
2121
  while (reader.pos < end) {
1936
2122
  var tag = reader.uint32();
@@ -1942,7 +2128,7 @@ $root.common = (function() {
1942
2128
  break;
1943
2129
  }
1944
2130
  default:
1945
- reader.skipType(tag & 7);
2131
+ reader.skipType(tag & 7, long);
1946
2132
  break;
1947
2133
  }
1948
2134
  }
@@ -1973,10 +2159,14 @@ $root.common = (function() {
1973
2159
  * @param {Object.<string,*>} message Plain object to verify
1974
2160
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
1975
2161
  */
1976
- BytesValue.verify = function verify(message) {
2162
+ BytesValue.verify = function verify(message, long) {
1977
2163
  if (typeof message !== "object" || message === null)
1978
2164
  return "object expected";
1979
- if (message.value != null && message.hasOwnProperty("value"))
2165
+ if (long === undefined)
2166
+ long = 0;
2167
+ if (long > $util.recursionLimit)
2168
+ return "maximum nesting depth exceeded";
2169
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1980
2170
  if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
1981
2171
  return "value: buffer expected";
1982
2172
  return null;
@@ -1990,9 +2180,15 @@ $root.common = (function() {
1990
2180
  * @param {Object.<string,*>} object Plain object
1991
2181
  * @returns {common.BytesValue} BytesValue
1992
2182
  */
1993
- BytesValue.fromObject = function fromObject(object) {
2183
+ BytesValue.fromObject = function fromObject(object, long) {
1994
2184
  if (object instanceof $root.common.BytesValue)
1995
2185
  return object;
2186
+ if (!$util.isObject(object))
2187
+ throw TypeError(".common.BytesValue: object expected");
2188
+ if (long === undefined)
2189
+ long = 0;
2190
+ if (long > $util.recursionLimit)
2191
+ throw Error("maximum nesting depth exceeded");
1996
2192
  var message = new $root.common.BytesValue();
1997
2193
  if (object.value != null)
1998
2194
  if (typeof object.value === "string")
@@ -2011,9 +2207,13 @@ $root.common = (function() {
2011
2207
  * @param {$protobuf.IConversionOptions} [options] Conversion options
2012
2208
  * @returns {Object.<string,*>} Plain object
2013
2209
  */
2014
- BytesValue.toObject = function toObject(message, options) {
2210
+ BytesValue.toObject = function toObject(message, options, q) {
2015
2211
  if (!options)
2016
2212
  options = {};
2213
+ if (q === undefined)
2214
+ q = 0;
2215
+ if (q > $util.recursionLimit)
2216
+ throw Error("max depth exceeded");
2017
2217
  var object = {};
2018
2218
  if (options.defaults)
2019
2219
  if (options.bytes === String)
@@ -2023,7 +2223,7 @@ $root.common = (function() {
2023
2223
  if (options.bytes !== Array)
2024
2224
  object.value = $util.newBuffer(object.value);
2025
2225
  }
2026
- if (message.value != null && message.hasOwnProperty("value"))
2226
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
2027
2227
  object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value;
2028
2228
  return object;
2029
2229
  };
@@ -2078,7 +2278,7 @@ $root.common = (function() {
2078
2278
  function ErrorValue(properties) {
2079
2279
  if (properties)
2080
2280
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2081
- if (properties[keys[i]] != null)
2281
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
2082
2282
  this[keys[i]] = properties[keys[i]];
2083
2283
  }
2084
2284
 
@@ -2119,9 +2319,13 @@ $root.common = (function() {
2119
2319
  * @param {$protobuf.Writer} [writer] Writer to encode to
2120
2320
  * @returns {$protobuf.Writer} Writer
2121
2321
  */
2122
- ErrorValue.encode = function encode(message, writer) {
2322
+ ErrorValue.encode = function encode(message, writer, q) {
2123
2323
  if (!writer)
2124
2324
  writer = $Writer.create();
2325
+ if (q === undefined)
2326
+ q = 0;
2327
+ if (q > $util.recursionLimit)
2328
+ throw Error("max depth exceeded");
2125
2329
  if (message.runtimeExcJson != null && Object.hasOwnProperty.call(message, "runtimeExcJson"))
2126
2330
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.runtimeExcJson);
2127
2331
  if (message.err != null && Object.hasOwnProperty.call(message, "err"))
@@ -2139,7 +2343,7 @@ $root.common = (function() {
2139
2343
  * @returns {$protobuf.Writer} Writer
2140
2344
  */
2141
2345
  ErrorValue.encodeDelimited = function encodeDelimited(message, writer) {
2142
- return this.encode(message, writer).ldelim();
2346
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
2143
2347
  };
2144
2348
 
2145
2349
  /**
@@ -2153,9 +2357,13 @@ $root.common = (function() {
2153
2357
  * @throws {Error} If the payload is not a reader or valid buffer
2154
2358
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
2155
2359
  */
2156
- ErrorValue.decode = function decode(reader, length, error) {
2360
+ ErrorValue.decode = function decode(reader, length, error, long) {
2157
2361
  if (!(reader instanceof $Reader))
2158
2362
  reader = $Reader.create(reader);
2363
+ if (long === undefined)
2364
+ long = 0;
2365
+ if (long > $Reader.recursionLimit)
2366
+ throw Error("maximum nesting depth exceeded");
2159
2367
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.ErrorValue();
2160
2368
  while (reader.pos < end) {
2161
2369
  var tag = reader.uint32();
@@ -2171,7 +2379,7 @@ $root.common = (function() {
2171
2379
  break;
2172
2380
  }
2173
2381
  default:
2174
- reader.skipType(tag & 7);
2382
+ reader.skipType(tag & 7, long);
2175
2383
  break;
2176
2384
  }
2177
2385
  }
@@ -2202,13 +2410,17 @@ $root.common = (function() {
2202
2410
  * @param {Object.<string,*>} message Plain object to verify
2203
2411
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
2204
2412
  */
2205
- ErrorValue.verify = function verify(message) {
2413
+ ErrorValue.verify = function verify(message, long) {
2206
2414
  if (typeof message !== "object" || message === null)
2207
2415
  return "object expected";
2208
- if (message.runtimeExcJson != null && message.hasOwnProperty("runtimeExcJson"))
2416
+ if (long === undefined)
2417
+ long = 0;
2418
+ if (long > $util.recursionLimit)
2419
+ return "maximum nesting depth exceeded";
2420
+ if (message.runtimeExcJson != null && Object.hasOwnProperty.call(message, "runtimeExcJson"))
2209
2421
  if (!$util.isString(message.runtimeExcJson))
2210
2422
  return "runtimeExcJson: string expected";
2211
- if (message.err != null && message.hasOwnProperty("err"))
2423
+ if (message.err != null && Object.hasOwnProperty.call(message, "err"))
2212
2424
  if (!$util.isString(message.err))
2213
2425
  return "err: string expected";
2214
2426
  return null;
@@ -2222,9 +2434,15 @@ $root.common = (function() {
2222
2434
  * @param {Object.<string,*>} object Plain object
2223
2435
  * @returns {common.ErrorValue} ErrorValue
2224
2436
  */
2225
- ErrorValue.fromObject = function fromObject(object) {
2437
+ ErrorValue.fromObject = function fromObject(object, long) {
2226
2438
  if (object instanceof $root.common.ErrorValue)
2227
2439
  return object;
2440
+ if (!$util.isObject(object))
2441
+ throw TypeError(".common.ErrorValue: object expected");
2442
+ if (long === undefined)
2443
+ long = 0;
2444
+ if (long > $util.recursionLimit)
2445
+ throw Error("maximum nesting depth exceeded");
2228
2446
  var message = new $root.common.ErrorValue();
2229
2447
  if (object.runtimeExcJson != null)
2230
2448
  message.runtimeExcJson = String(object.runtimeExcJson);
@@ -2242,17 +2460,21 @@ $root.common = (function() {
2242
2460
  * @param {$protobuf.IConversionOptions} [options] Conversion options
2243
2461
  * @returns {Object.<string,*>} Plain object
2244
2462
  */
2245
- ErrorValue.toObject = function toObject(message, options) {
2463
+ ErrorValue.toObject = function toObject(message, options, q) {
2246
2464
  if (!options)
2247
2465
  options = {};
2466
+ if (q === undefined)
2467
+ q = 0;
2468
+ if (q > $util.recursionLimit)
2469
+ throw Error("max depth exceeded");
2248
2470
  var object = {};
2249
2471
  if (options.defaults) {
2250
2472
  object.runtimeExcJson = "";
2251
2473
  object.err = "";
2252
2474
  }
2253
- if (message.runtimeExcJson != null && message.hasOwnProperty("runtimeExcJson"))
2475
+ if (message.runtimeExcJson != null && Object.hasOwnProperty.call(message, "runtimeExcJson"))
2254
2476
  object.runtimeExcJson = message.runtimeExcJson;
2255
- if (message.err != null && message.hasOwnProperty("err"))
2477
+ if (message.err != null && Object.hasOwnProperty.call(message, "err"))
2256
2478
  object.err = message.err;
2257
2479
  return object;
2258
2480
  };
@@ -2308,7 +2530,7 @@ $root.common = (function() {
2308
2530
  function AnyValue(properties) {
2309
2531
  if (properties)
2310
2532
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2311
- if (properties[keys[i]] != null)
2533
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
2312
2534
  this[keys[i]] = properties[keys[i]];
2313
2535
  }
2314
2536
 
@@ -2357,15 +2579,19 @@ $root.common = (function() {
2357
2579
  * @param {$protobuf.Writer} [writer] Writer to encode to
2358
2580
  * @returns {$protobuf.Writer} Writer
2359
2581
  */
2360
- AnyValue.encode = function encode(message, writer) {
2582
+ AnyValue.encode = function encode(message, writer, q) {
2361
2583
  if (!writer)
2362
2584
  writer = $Writer.create();
2585
+ if (q === undefined)
2586
+ q = 0;
2587
+ if (q > $util.recursionLimit)
2588
+ throw Error("max depth exceeded");
2363
2589
  if (message.type != null && Object.hasOwnProperty.call(message, "type"))
2364
2590
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
2365
2591
  if (message.json != null && Object.hasOwnProperty.call(message, "json"))
2366
- $root.common.StringValue.encode(message.json, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
2592
+ $root.common.StringValue.encode(message.json, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim();
2367
2593
  if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes"))
2368
- $root.common.BytesValue.encode(message.bytes, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
2594
+ $root.common.BytesValue.encode(message.bytes, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim();
2369
2595
  return writer;
2370
2596
  };
2371
2597
 
@@ -2379,7 +2605,7 @@ $root.common = (function() {
2379
2605
  * @returns {$protobuf.Writer} Writer
2380
2606
  */
2381
2607
  AnyValue.encodeDelimited = function encodeDelimited(message, writer) {
2382
- return this.encode(message, writer).ldelim();
2608
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
2383
2609
  };
2384
2610
 
2385
2611
  /**
@@ -2393,9 +2619,13 @@ $root.common = (function() {
2393
2619
  * @throws {Error} If the payload is not a reader or valid buffer
2394
2620
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
2395
2621
  */
2396
- AnyValue.decode = function decode(reader, length, error) {
2622
+ AnyValue.decode = function decode(reader, length, error, long) {
2397
2623
  if (!(reader instanceof $Reader))
2398
2624
  reader = $Reader.create(reader);
2625
+ if (long === undefined)
2626
+ long = 0;
2627
+ if (long > $Reader.recursionLimit)
2628
+ throw Error("maximum nesting depth exceeded");
2399
2629
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.AnyValue();
2400
2630
  while (reader.pos < end) {
2401
2631
  var tag = reader.uint32();
@@ -2407,15 +2637,15 @@ $root.common = (function() {
2407
2637
  break;
2408
2638
  }
2409
2639
  case 2: {
2410
- message.json = $root.common.StringValue.decode(reader, reader.uint32());
2640
+ message.json = $root.common.StringValue.decode(reader, reader.uint32(), undefined, long + 1);
2411
2641
  break;
2412
2642
  }
2413
2643
  case 3: {
2414
- message.bytes = $root.common.BytesValue.decode(reader, reader.uint32());
2644
+ message.bytes = $root.common.BytesValue.decode(reader, reader.uint32(), undefined, long + 1);
2415
2645
  break;
2416
2646
  }
2417
2647
  default:
2418
- reader.skipType(tag & 7);
2648
+ reader.skipType(tag & 7, long);
2419
2649
  break;
2420
2650
  }
2421
2651
  }
@@ -2446,19 +2676,23 @@ $root.common = (function() {
2446
2676
  * @param {Object.<string,*>} message Plain object to verify
2447
2677
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
2448
2678
  */
2449
- AnyValue.verify = function verify(message) {
2679
+ AnyValue.verify = function verify(message, long) {
2450
2680
  if (typeof message !== "object" || message === null)
2451
2681
  return "object expected";
2452
- if (message.type != null && message.hasOwnProperty("type"))
2682
+ if (long === undefined)
2683
+ long = 0;
2684
+ if (long > $util.recursionLimit)
2685
+ return "maximum nesting depth exceeded";
2686
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
2453
2687
  if (!$util.isString(message.type))
2454
2688
  return "type: string expected";
2455
- if (message.json != null && message.hasOwnProperty("json")) {
2456
- var error = $root.common.StringValue.verify(message.json);
2689
+ if (message.json != null && Object.hasOwnProperty.call(message, "json")) {
2690
+ var error = $root.common.StringValue.verify(message.json, long + 1);
2457
2691
  if (error)
2458
2692
  return "json." + error;
2459
2693
  }
2460
- if (message.bytes != null && message.hasOwnProperty("bytes")) {
2461
- var error = $root.common.BytesValue.verify(message.bytes);
2694
+ if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) {
2695
+ var error = $root.common.BytesValue.verify(message.bytes, long + 1);
2462
2696
  if (error)
2463
2697
  return "bytes." + error;
2464
2698
  }
@@ -2473,21 +2707,27 @@ $root.common = (function() {
2473
2707
  * @param {Object.<string,*>} object Plain object
2474
2708
  * @returns {common.AnyValue} AnyValue
2475
2709
  */
2476
- AnyValue.fromObject = function fromObject(object) {
2710
+ AnyValue.fromObject = function fromObject(object, long) {
2477
2711
  if (object instanceof $root.common.AnyValue)
2478
2712
  return object;
2713
+ if (!$util.isObject(object))
2714
+ throw TypeError(".common.AnyValue: object expected");
2715
+ if (long === undefined)
2716
+ long = 0;
2717
+ if (long > $util.recursionLimit)
2718
+ throw Error("maximum nesting depth exceeded");
2479
2719
  var message = new $root.common.AnyValue();
2480
2720
  if (object.type != null)
2481
2721
  message.type = String(object.type);
2482
2722
  if (object.json != null) {
2483
- if (typeof object.json !== "object")
2723
+ if (!$util.isObject(object.json))
2484
2724
  throw TypeError(".common.AnyValue.json: object expected");
2485
- message.json = $root.common.StringValue.fromObject(object.json);
2725
+ message.json = $root.common.StringValue.fromObject(object.json, long + 1);
2486
2726
  }
2487
2727
  if (object.bytes != null) {
2488
- if (typeof object.bytes !== "object")
2728
+ if (!$util.isObject(object.bytes))
2489
2729
  throw TypeError(".common.AnyValue.bytes: object expected");
2490
- message.bytes = $root.common.BytesValue.fromObject(object.bytes);
2730
+ message.bytes = $root.common.BytesValue.fromObject(object.bytes, long + 1);
2491
2731
  }
2492
2732
  return message;
2493
2733
  };
@@ -2501,21 +2741,25 @@ $root.common = (function() {
2501
2741
  * @param {$protobuf.IConversionOptions} [options] Conversion options
2502
2742
  * @returns {Object.<string,*>} Plain object
2503
2743
  */
2504
- AnyValue.toObject = function toObject(message, options) {
2744
+ AnyValue.toObject = function toObject(message, options, q) {
2505
2745
  if (!options)
2506
2746
  options = {};
2747
+ if (q === undefined)
2748
+ q = 0;
2749
+ if (q > $util.recursionLimit)
2750
+ throw Error("max depth exceeded");
2507
2751
  var object = {};
2508
2752
  if (options.defaults) {
2509
2753
  object.type = "";
2510
2754
  object.json = null;
2511
2755
  object.bytes = null;
2512
2756
  }
2513
- if (message.type != null && message.hasOwnProperty("type"))
2757
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
2514
2758
  object.type = message.type;
2515
- if (message.json != null && message.hasOwnProperty("json"))
2516
- object.json = $root.common.StringValue.toObject(message.json, options);
2517
- if (message.bytes != null && message.hasOwnProperty("bytes"))
2518
- object.bytes = $root.common.BytesValue.toObject(message.bytes, options);
2759
+ if (message.json != null && Object.hasOwnProperty.call(message, "json"))
2760
+ object.json = $root.common.StringValue.toObject(message.json, options, q + 1);
2761
+ if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes"))
2762
+ object.bytes = $root.common.BytesValue.toObject(message.bytes, options, q + 1);
2519
2763
  return object;
2520
2764
  };
2521
2765