@nhtio/validation 0.1.0-master-cb87a6f9 → 0.1.0-master-952eca46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -48,13 +48,13 @@ var require_stringify = __commonJSMin((exports, module) => {
48
48
  var require_assert$1 = __commonJSMin((exports, module) => {
49
49
  const AssertError$2 = require_assertError();
50
50
  const Stringify = require_stringify();
51
- const assert$53 = module.exports = function(condition, ...args$1) {
51
+ const assert$54 = module.exports = function(condition, ...args$1) {
52
52
  if (condition) return;
53
53
  if (args$1.length === 1 && args$1[0] instanceof Error) throw args$1[0];
54
54
  const msgs = args$1.filter((arg) => arg !== "").map((arg) => {
55
55
  return typeof arg === "string" ? arg : arg instanceof Error ? arg.message : Stringify(arg);
56
56
  });
57
- throw new AssertError$2(msgs.join(" "), assert$53);
57
+ throw new AssertError$2(msgs.join(" "), assert$54);
58
58
  };
59
59
  });
60
60
  var dist_exports = {};
@@ -246,14 +246,14 @@ var init_dist$1 = __esmMin(() => {
246
246
  const base64 = base64Js$1;
247
247
  const ieee754$1$1 = ieee754$1;
248
248
  const customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
249
- exports$1.Buffer = Buffer$27;
249
+ exports$1.Buffer = Buffer$29;
250
250
  exports$1.SlowBuffer = SlowBuffer$1;
251
251
  exports$1.INSPECT_MAX_BYTES = 50;
252
252
  const K_MAX_LENGTH = 2147483647;
253
253
  exports$1.kMaxLength = K_MAX_LENGTH;
254
254
  const { Uint8Array: GlobalUint8Array, ArrayBuffer: GlobalArrayBuffer, SharedArrayBuffer: GlobalSharedArrayBuffer } = globalThis;
255
- Buffer$27.TYPED_ARRAY_SUPPORT = typedArraySupport();
256
- if (!Buffer$27.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
255
+ Buffer$29.TYPED_ARRAY_SUPPORT = typedArraySupport();
256
+ if (!Buffer$29.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
257
257
  function typedArraySupport() {
258
258
  try {
259
259
  const arr = new GlobalUint8Array(1);
@@ -267,34 +267,34 @@ var init_dist$1 = __esmMin(() => {
267
267
  return false;
268
268
  }
269
269
  }
270
- Object.defineProperty(Buffer$27.prototype, "parent", {
270
+ Object.defineProperty(Buffer$29.prototype, "parent", {
271
271
  enumerable: true,
272
272
  get: function() {
273
- if (!Buffer$27.isBuffer(this)) return void 0;
273
+ if (!Buffer$29.isBuffer(this)) return void 0;
274
274
  return this.buffer;
275
275
  }
276
276
  });
277
- Object.defineProperty(Buffer$27.prototype, "offset", {
277
+ Object.defineProperty(Buffer$29.prototype, "offset", {
278
278
  enumerable: true,
279
279
  get: function() {
280
- if (!Buffer$27.isBuffer(this)) return void 0;
280
+ if (!Buffer$29.isBuffer(this)) return void 0;
281
281
  return this.byteOffset;
282
282
  }
283
283
  });
284
284
  function createBuffer(length) {
285
285
  if (length > K_MAX_LENGTH) throw new RangeError("The value \"" + length + "\" is invalid for option \"size\"");
286
286
  const buf = new GlobalUint8Array(length);
287
- Object.setPrototypeOf(buf, Buffer$27.prototype);
287
+ Object.setPrototypeOf(buf, Buffer$29.prototype);
288
288
  return buf;
289
289
  }
290
- function Buffer$27(arg, encodingOrOffset, length) {
290
+ function Buffer$29(arg, encodingOrOffset, length) {
291
291
  if (typeof arg === "number") {
292
292
  if (typeof encodingOrOffset === "string") throw new TypeError("The \"string\" argument must be of type string. Received type number");
293
293
  return allocUnsafe$1(arg);
294
294
  }
295
295
  return from$2(arg, encodingOrOffset, length);
296
296
  }
297
- Buffer$27.poolSize = 8192;
297
+ Buffer$29.poolSize = 8192;
298
298
  function from$2(value, encodingOrOffset, length) {
299
299
  if (typeof value === "string") return fromString(value, encodingOrOffset);
300
300
  if (GlobalArrayBuffer.isView(value)) return fromArrayView(value);
@@ -303,17 +303,17 @@ var init_dist$1 = __esmMin(() => {
303
303
  if (typeof GlobalSharedArrayBuffer !== "undefined" && (isInstance(value, GlobalSharedArrayBuffer) || value && isInstance(value.buffer, GlobalSharedArrayBuffer))) return fromArrayBuffer(value, encodingOrOffset, length);
304
304
  if (typeof value === "number") throw new TypeError("The \"value\" argument must not be of type number. Received type number");
305
305
  const valueOf = value.valueOf && value.valueOf();
306
- if (valueOf != null && valueOf !== value) return Buffer$27.from(valueOf, encodingOrOffset, length);
306
+ if (valueOf != null && valueOf !== value) return Buffer$29.from(valueOf, encodingOrOffset, length);
307
307
  const b = fromObject(value);
308
308
  if (b) return b;
309
- if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") return Buffer$27.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
309
+ if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") return Buffer$29.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
310
310
  throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
311
311
  }
312
- Buffer$27.from = function(value, encodingOrOffset, length) {
312
+ Buffer$29.from = function(value, encodingOrOffset, length) {
313
313
  return from$2(value, encodingOrOffset, length);
314
314
  };
315
- Object.setPrototypeOf(Buffer$27.prototype, GlobalUint8Array.prototype);
316
- Object.setPrototypeOf(Buffer$27, GlobalUint8Array);
315
+ Object.setPrototypeOf(Buffer$29.prototype, GlobalUint8Array.prototype);
316
+ Object.setPrototypeOf(Buffer$29, GlobalUint8Array);
317
317
  function assertSize$1(size) {
318
318
  if (typeof size !== "number") throw new TypeError("\"size\" argument must be of type number");
319
319
  else if (size < 0) throw new RangeError("The value \"" + size + "\" is invalid for option \"size\"");
@@ -324,22 +324,22 @@ var init_dist$1 = __esmMin(() => {
324
324
  if (fill !== void 0) return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
325
325
  return createBuffer(size);
326
326
  }
327
- Buffer$27.alloc = function(size, fill, encoding) {
327
+ Buffer$29.alloc = function(size, fill, encoding) {
328
328
  return alloc(size, fill, encoding);
329
329
  };
330
330
  function allocUnsafe$1(size) {
331
331
  assertSize$1(size);
332
332
  return createBuffer(size < 0 ? 0 : checked(size) | 0);
333
333
  }
334
- Buffer$27.allocUnsafe = function(size) {
334
+ Buffer$29.allocUnsafe = function(size) {
335
335
  return allocUnsafe$1(size);
336
336
  };
337
- Buffer$27.allocUnsafeSlow = function(size) {
337
+ Buffer$29.allocUnsafeSlow = function(size) {
338
338
  return allocUnsafe$1(size);
339
339
  };
340
340
  function fromString(string, encoding) {
341
341
  if (typeof encoding !== "string" || encoding === "") encoding = "utf8";
342
- if (!Buffer$27.isEncoding(encoding)) throw new TypeError("Unknown encoding: " + encoding);
342
+ if (!Buffer$29.isEncoding(encoding)) throw new TypeError("Unknown encoding: " + encoding);
343
343
  const length = byteLength$2(string, encoding) | 0;
344
344
  let buf = createBuffer(length);
345
345
  const actual = buf.write(string, encoding);
@@ -366,11 +366,11 @@ var init_dist$1 = __esmMin(() => {
366
366
  if (byteOffset === void 0 && length === void 0) buf = new GlobalUint8Array(array);
367
367
  else if (length === void 0) buf = new GlobalUint8Array(array, byteOffset);
368
368
  else buf = new GlobalUint8Array(array, byteOffset, length);
369
- Object.setPrototypeOf(buf, Buffer$27.prototype);
369
+ Object.setPrototypeOf(buf, Buffer$29.prototype);
370
370
  return buf;
371
371
  }
372
372
  function fromObject(obj) {
373
- if (Buffer$27.isBuffer(obj)) {
373
+ if (Buffer$29.isBuffer(obj)) {
374
374
  const len$2 = checked(obj.length) | 0;
375
375
  const buf = createBuffer(len$2);
376
376
  if (buf.length === 0) return buf;
@@ -389,15 +389,15 @@ var init_dist$1 = __esmMin(() => {
389
389
  }
390
390
  function SlowBuffer$1(length) {
391
391
  if (+length != length) length = 0;
392
- return Buffer$27.alloc(+length);
392
+ return Buffer$29.alloc(+length);
393
393
  }
394
- Buffer$27.isBuffer = function isBuffer$6(b) {
395
- return b != null && b._isBuffer === true && b !== Buffer$27.prototype;
394
+ Buffer$29.isBuffer = function isBuffer$6(b) {
395
+ return b != null && b._isBuffer === true && b !== Buffer$29.prototype;
396
396
  };
397
- Buffer$27.compare = function compare$16(a$2, b) {
398
- if (isInstance(a$2, GlobalUint8Array)) a$2 = Buffer$27.from(a$2, a$2.offset, a$2.byteLength);
399
- if (isInstance(b, GlobalUint8Array)) b = Buffer$27.from(b, b.offset, b.byteLength);
400
- if (!Buffer$27.isBuffer(a$2) || !Buffer$27.isBuffer(b)) throw new TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");
397
+ Buffer$29.compare = function compare$16(a$2, b) {
398
+ if (isInstance(a$2, GlobalUint8Array)) a$2 = Buffer$29.from(a$2, a$2.offset, a$2.byteLength);
399
+ if (isInstance(b, GlobalUint8Array)) b = Buffer$29.from(b, b.offset, b.byteLength);
400
+ if (!Buffer$29.isBuffer(a$2) || !Buffer$29.isBuffer(b)) throw new TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");
401
401
  if (a$2 === b) return 0;
402
402
  let x$1 = a$2.length;
403
403
  let y$1 = b.length;
@@ -410,7 +410,7 @@ var init_dist$1 = __esmMin(() => {
410
410
  if (y$1 < x$1) return 1;
411
411
  return 0;
412
412
  };
413
- Buffer$27.isEncoding = function isEncoding$1(encoding) {
413
+ Buffer$29.isEncoding = function isEncoding$1(encoding) {
414
414
  switch (String(encoding).toLowerCase()) {
415
415
  case "hex":
416
416
  case "utf8":
@@ -426,30 +426,30 @@ var init_dist$1 = __esmMin(() => {
426
426
  default: return false;
427
427
  }
428
428
  };
429
- Buffer$27.concat = function concat$1(list, length) {
429
+ Buffer$29.concat = function concat$1(list, length) {
430
430
  if (!Array.isArray(list)) throw new TypeError("\"list\" argument must be an Array of Buffers");
431
- if (list.length === 0) return Buffer$27.alloc(0);
431
+ if (list.length === 0) return Buffer$29.alloc(0);
432
432
  let i$4;
433
433
  if (length === void 0) {
434
434
  length = 0;
435
435
  for (i$4 = 0; i$4 < list.length; ++i$4) length += list[i$4].length;
436
436
  }
437
- const buffer$3 = Buffer$27.allocUnsafe(length);
437
+ const buffer$3 = Buffer$29.allocUnsafe(length);
438
438
  let pos = 0;
439
439
  for (i$4 = 0; i$4 < list.length; ++i$4) {
440
440
  let buf = list[i$4];
441
441
  if (isInstance(buf, GlobalUint8Array)) if (pos + buf.length > buffer$3.length) {
442
- if (!Buffer$27.isBuffer(buf)) buf = Buffer$27.from(buf);
442
+ if (!Buffer$29.isBuffer(buf)) buf = Buffer$29.from(buf);
443
443
  buf.copy(buffer$3, pos);
444
444
  } else GlobalUint8Array.prototype.set.call(buffer$3, buf, pos);
445
- else if (!Buffer$27.isBuffer(buf)) throw new TypeError("\"list\" argument must be an Array of Buffers");
445
+ else if (!Buffer$29.isBuffer(buf)) throw new TypeError("\"list\" argument must be an Array of Buffers");
446
446
  else buf.copy(buffer$3, pos);
447
447
  pos += buf.length;
448
448
  }
449
449
  return buffer$3;
450
450
  };
451
451
  function byteLength$2(string, encoding) {
452
- if (Buffer$27.isBuffer(string)) return string.length;
452
+ if (Buffer$29.isBuffer(string)) return string.length;
453
453
  if (GlobalArrayBuffer.isView(string) || isInstance(string, GlobalArrayBuffer)) return string.byteLength;
454
454
  if (typeof string !== "string") throw new TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type " + typeof string);
455
455
  const len$2 = string.length;
@@ -474,7 +474,7 @@ var init_dist$1 = __esmMin(() => {
474
474
  loweredCase = true;
475
475
  }
476
476
  }
477
- Buffer$27.byteLength = byteLength$2;
477
+ Buffer$29.byteLength = byteLength$2;
478
478
  function slowToString(encoding, start, end) {
479
479
  let loweredCase = false;
480
480
  if (start === void 0 || start < 0) start = 0;
@@ -503,19 +503,19 @@ var init_dist$1 = __esmMin(() => {
503
503
  loweredCase = true;
504
504
  }
505
505
  }
506
- Buffer$27.prototype._isBuffer = true;
506
+ Buffer$29.prototype._isBuffer = true;
507
507
  function swap(b, n$4, m$3) {
508
508
  const i$4 = b[n$4];
509
509
  b[n$4] = b[m$3];
510
510
  b[m$3] = i$4;
511
511
  }
512
- Buffer$27.prototype.swap16 = function swap16() {
512
+ Buffer$29.prototype.swap16 = function swap16() {
513
513
  const len$2 = this.length;
514
514
  if (len$2 % 2 !== 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
515
515
  for (let i$4 = 0; i$4 < len$2; i$4 += 2) swap(this, i$4, i$4 + 1);
516
516
  return this;
517
517
  };
518
- Buffer$27.prototype.swap32 = function swap32() {
518
+ Buffer$29.prototype.swap32 = function swap32() {
519
519
  const len$2 = this.length;
520
520
  if (len$2 % 4 !== 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
521
521
  for (let i$4 = 0; i$4 < len$2; i$4 += 4) {
@@ -524,7 +524,7 @@ var init_dist$1 = __esmMin(() => {
524
524
  }
525
525
  return this;
526
526
  };
527
- Buffer$27.prototype.swap64 = function swap64() {
527
+ Buffer$29.prototype.swap64 = function swap64() {
528
528
  const len$2 = this.length;
529
529
  if (len$2 % 8 !== 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
530
530
  for (let i$4 = 0; i$4 < len$2; i$4 += 8) {
@@ -535,29 +535,29 @@ var init_dist$1 = __esmMin(() => {
535
535
  }
536
536
  return this;
537
537
  };
538
- Buffer$27.prototype.toString = function toString$4() {
538
+ Buffer$29.prototype.toString = function toString$4() {
539
539
  const length = this.length;
540
540
  if (length === 0) return "";
541
541
  if (arguments.length === 0) return utf8Slice(this, 0, length);
542
542
  return slowToString.apply(this, arguments);
543
543
  };
544
- Buffer$27.prototype.toLocaleString = Buffer$27.prototype.toString;
545
- Buffer$27.prototype.equals = function equals(b) {
546
- if (!Buffer$27.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
544
+ Buffer$29.prototype.toLocaleString = Buffer$29.prototype.toString;
545
+ Buffer$29.prototype.equals = function equals(b) {
546
+ if (!Buffer$29.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
547
547
  if (this === b) return true;
548
- return Buffer$27.compare(this, b) === 0;
548
+ return Buffer$29.compare(this, b) === 0;
549
549
  };
550
- Buffer$27.prototype.inspect = function inspect$4() {
550
+ Buffer$29.prototype.inspect = function inspect$4() {
551
551
  let str = "";
552
552
  const max$3 = exports$1.INSPECT_MAX_BYTES;
553
553
  str = this.toString("hex", 0, max$3).replace(/(.{2})/g, "$1 ").trim();
554
554
  if (this.length > max$3) str += " ... ";
555
555
  return "<Buffer " + str + ">";
556
556
  };
557
- if (customInspectSymbol) Buffer$27.prototype[customInspectSymbol] = Buffer$27.prototype.inspect;
558
- Buffer$27.prototype.compare = function compare$16(target, start, end, thisStart, thisEnd) {
559
- if (isInstance(target, GlobalUint8Array)) target = Buffer$27.from(target, target.offset, target.byteLength);
560
- if (!Buffer$27.isBuffer(target)) throw new TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof target);
557
+ if (customInspectSymbol) Buffer$29.prototype[customInspectSymbol] = Buffer$29.prototype.inspect;
558
+ Buffer$29.prototype.compare = function compare$16(target, start, end, thisStart, thisEnd) {
559
+ if (isInstance(target, GlobalUint8Array)) target = Buffer$29.from(target, target.offset, target.byteLength);
560
+ if (!Buffer$29.isBuffer(target)) throw new TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof target);
561
561
  if (start === void 0) start = 0;
562
562
  if (end === void 0) end = target ? target.length : 0;
563
563
  if (thisStart === void 0) thisStart = 0;
@@ -599,8 +599,8 @@ var init_dist$1 = __esmMin(() => {
599
599
  else byteOffset = buffer$3.length - 1;
600
600
  else if (byteOffset < 0) if (dir) byteOffset = 0;
601
601
  else return -1;
602
- if (typeof val === "string") val = Buffer$27.from(val, encoding);
603
- if (Buffer$27.isBuffer(val)) {
602
+ if (typeof val === "string") val = Buffer$29.from(val, encoding);
603
+ if (Buffer$29.isBuffer(val)) {
604
604
  if (val.length === 0) return -1;
605
605
  return arrayIndexOf(buffer$3, val, byteOffset, encoding, dir);
606
606
  } else if (typeof val === "number") {
@@ -652,13 +652,13 @@ var init_dist$1 = __esmMin(() => {
652
652
  }
653
653
  return -1;
654
654
  }
655
- Buffer$27.prototype.includes = function includes$2(val, byteOffset, encoding) {
655
+ Buffer$29.prototype.includes = function includes$2(val, byteOffset, encoding) {
656
656
  return this.indexOf(val, byteOffset, encoding) !== -1;
657
657
  };
658
- Buffer$27.prototype.indexOf = function indexOf$3(val, byteOffset, encoding) {
658
+ Buffer$29.prototype.indexOf = function indexOf$3(val, byteOffset, encoding) {
659
659
  return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
660
660
  };
661
- Buffer$27.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
661
+ Buffer$29.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
662
662
  return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
663
663
  };
664
664
  function hexWrite(buf, string, offset$2, length) {
@@ -691,7 +691,7 @@ var init_dist$1 = __esmMin(() => {
691
691
  function ucs2Write(buf, string, offset$2, length) {
692
692
  return blitBuffer(utf16leToBytes(string, buf.length - offset$2), buf, offset$2, length);
693
693
  }
694
- Buffer$27.prototype.write = function write(string, offset$2, length, encoding) {
694
+ Buffer$29.prototype.write = function write(string, offset$2, length, encoding) {
695
695
  if (offset$2 === void 0) {
696
696
  encoding = "utf8";
697
697
  length = this.length;
@@ -733,7 +733,7 @@ var init_dist$1 = __esmMin(() => {
733
733
  loweredCase = true;
734
734
  }
735
735
  };
736
- Buffer$27.prototype.toJSON = function toJSON() {
736
+ Buffer$29.prototype.toJSON = function toJSON() {
737
737
  return {
738
738
  type: "Buffer",
739
739
  data: Array.prototype.slice.call(this._arr || this, 0)
@@ -830,7 +830,7 @@ var init_dist$1 = __esmMin(() => {
830
830
  for (let i$4 = 0; i$4 < bytes.length - 1; i$4 += 2) res += String.fromCharCode(bytes[i$4] + bytes[i$4 + 1] * 256);
831
831
  return res;
832
832
  }
833
- Buffer$27.prototype.slice = function slice$1(start, end) {
833
+ Buffer$29.prototype.slice = function slice$1(start, end) {
834
834
  const len$2 = this.length;
835
835
  start = ~~start;
836
836
  end = end === void 0 ? len$2 : ~~end;
@@ -844,14 +844,14 @@ var init_dist$1 = __esmMin(() => {
844
844
  } else if (end > len$2) end = len$2;
845
845
  if (end < start) end = start;
846
846
  const newBuf = this.subarray(start, end);
847
- Object.setPrototypeOf(newBuf, Buffer$27.prototype);
847
+ Object.setPrototypeOf(newBuf, Buffer$29.prototype);
848
848
  return newBuf;
849
849
  };
850
850
  function checkOffset(offset$2, ext, length) {
851
851
  if (offset$2 % 1 !== 0 || offset$2 < 0) throw new RangeError("offset is not uint");
852
852
  if (offset$2 + ext > length) throw new RangeError("Trying to access beyond buffer length");
853
853
  }
854
- Buffer$27.prototype.readUintLE = Buffer$27.prototype.readUIntLE = function readUIntLE(offset$2, byteLength$3, noAssert) {
854
+ Buffer$29.prototype.readUintLE = Buffer$29.prototype.readUIntLE = function readUIntLE(offset$2, byteLength$3, noAssert) {
855
855
  offset$2 = offset$2 >>> 0;
856
856
  byteLength$3 = byteLength$3 >>> 0;
857
857
  if (!noAssert) checkOffset(offset$2, byteLength$3, this.length);
@@ -861,7 +861,7 @@ var init_dist$1 = __esmMin(() => {
861
861
  while (++i$4 < byteLength$3 && (mul *= 256)) val += this[offset$2 + i$4] * mul;
862
862
  return val;
863
863
  };
864
- Buffer$27.prototype.readUintBE = Buffer$27.prototype.readUIntBE = function readUIntBE(offset$2, byteLength$3, noAssert) {
864
+ Buffer$29.prototype.readUintBE = Buffer$29.prototype.readUIntBE = function readUIntBE(offset$2, byteLength$3, noAssert) {
865
865
  offset$2 = offset$2 >>> 0;
866
866
  byteLength$3 = byteLength$3 >>> 0;
867
867
  if (!noAssert) checkOffset(offset$2, byteLength$3, this.length);
@@ -870,32 +870,32 @@ var init_dist$1 = __esmMin(() => {
870
870
  while (byteLength$3 > 0 && (mul *= 256)) val += this[offset$2 + --byteLength$3] * mul;
871
871
  return val;
872
872
  };
873
- Buffer$27.prototype.readUint8 = Buffer$27.prototype.readUInt8 = function readUInt8(offset$2, noAssert) {
873
+ Buffer$29.prototype.readUint8 = Buffer$29.prototype.readUInt8 = function readUInt8(offset$2, noAssert) {
874
874
  offset$2 = offset$2 >>> 0;
875
875
  if (!noAssert) checkOffset(offset$2, 1, this.length);
876
876
  return this[offset$2];
877
877
  };
878
- Buffer$27.prototype.readUint16LE = Buffer$27.prototype.readUInt16LE = function readUInt16LE(offset$2, noAssert) {
878
+ Buffer$29.prototype.readUint16LE = Buffer$29.prototype.readUInt16LE = function readUInt16LE(offset$2, noAssert) {
879
879
  offset$2 = offset$2 >>> 0;
880
880
  if (!noAssert) checkOffset(offset$2, 2, this.length);
881
881
  return this[offset$2] | this[offset$2 + 1] << 8;
882
882
  };
883
- Buffer$27.prototype.readUint16BE = Buffer$27.prototype.readUInt16BE = function readUInt16BE(offset$2, noAssert) {
883
+ Buffer$29.prototype.readUint16BE = Buffer$29.prototype.readUInt16BE = function readUInt16BE(offset$2, noAssert) {
884
884
  offset$2 = offset$2 >>> 0;
885
885
  if (!noAssert) checkOffset(offset$2, 2, this.length);
886
886
  return this[offset$2] << 8 | this[offset$2 + 1];
887
887
  };
888
- Buffer$27.prototype.readUint32LE = Buffer$27.prototype.readUInt32LE = function readUInt32LE(offset$2, noAssert) {
888
+ Buffer$29.prototype.readUint32LE = Buffer$29.prototype.readUInt32LE = function readUInt32LE(offset$2, noAssert) {
889
889
  offset$2 = offset$2 >>> 0;
890
890
  if (!noAssert) checkOffset(offset$2, 4, this.length);
891
891
  return (this[offset$2] | this[offset$2 + 1] << 8 | this[offset$2 + 2] << 16) + this[offset$2 + 3] * 16777216;
892
892
  };
893
- Buffer$27.prototype.readUint32BE = Buffer$27.prototype.readUInt32BE = function readUInt32BE(offset$2, noAssert) {
893
+ Buffer$29.prototype.readUint32BE = Buffer$29.prototype.readUInt32BE = function readUInt32BE(offset$2, noAssert) {
894
894
  offset$2 = offset$2 >>> 0;
895
895
  if (!noAssert) checkOffset(offset$2, 4, this.length);
896
896
  return this[offset$2] * 16777216 + (this[offset$2 + 1] << 16 | this[offset$2 + 2] << 8 | this[offset$2 + 3]);
897
897
  };
898
- Buffer$27.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset$2) {
898
+ Buffer$29.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset$2) {
899
899
  offset$2 = offset$2 >>> 0;
900
900
  validateNumber(offset$2, "offset");
901
901
  const first$1 = this[offset$2];
@@ -905,7 +905,7 @@ var init_dist$1 = __esmMin(() => {
905
905
  const hi = this[++offset$2] + this[++offset$2] * 2 ** 8 + this[++offset$2] * 2 ** 16 + last$2 * 2 ** 24;
906
906
  return BigInt(lo) + (BigInt(hi) << BigInt(32));
907
907
  });
908
- Buffer$27.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset$2) {
908
+ Buffer$29.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset$2) {
909
909
  offset$2 = offset$2 >>> 0;
910
910
  validateNumber(offset$2, "offset");
911
911
  const first$1 = this[offset$2];
@@ -915,7 +915,7 @@ var init_dist$1 = __esmMin(() => {
915
915
  const lo = this[++offset$2] * 2 ** 24 + this[++offset$2] * 2 ** 16 + this[++offset$2] * 2 ** 8 + last$2;
916
916
  return (BigInt(hi) << BigInt(32)) + BigInt(lo);
917
917
  });
918
- Buffer$27.prototype.readIntLE = function readIntLE(offset$2, byteLength$3, noAssert) {
918
+ Buffer$29.prototype.readIntLE = function readIntLE(offset$2, byteLength$3, noAssert) {
919
919
  offset$2 = offset$2 >>> 0;
920
920
  byteLength$3 = byteLength$3 >>> 0;
921
921
  if (!noAssert) checkOffset(offset$2, byteLength$3, this.length);
@@ -927,7 +927,7 @@ var init_dist$1 = __esmMin(() => {
927
927
  if (val >= mul) val -= Math.pow(2, 8 * byteLength$3);
928
928
  return val;
929
929
  };
930
- Buffer$27.prototype.readIntBE = function readIntBE(offset$2, byteLength$3, noAssert) {
930
+ Buffer$29.prototype.readIntBE = function readIntBE(offset$2, byteLength$3, noAssert) {
931
931
  offset$2 = offset$2 >>> 0;
932
932
  byteLength$3 = byteLength$3 >>> 0;
933
933
  if (!noAssert) checkOffset(offset$2, byteLength$3, this.length);
@@ -939,35 +939,35 @@ var init_dist$1 = __esmMin(() => {
939
939
  if (val >= mul) val -= Math.pow(2, 8 * byteLength$3);
940
940
  return val;
941
941
  };
942
- Buffer$27.prototype.readInt8 = function readInt8(offset$2, noAssert) {
942
+ Buffer$29.prototype.readInt8 = function readInt8(offset$2, noAssert) {
943
943
  offset$2 = offset$2 >>> 0;
944
944
  if (!noAssert) checkOffset(offset$2, 1, this.length);
945
945
  if (!(this[offset$2] & 128)) return this[offset$2];
946
946
  return (255 - this[offset$2] + 1) * -1;
947
947
  };
948
- Buffer$27.prototype.readInt16LE = function readInt16LE(offset$2, noAssert) {
948
+ Buffer$29.prototype.readInt16LE = function readInt16LE(offset$2, noAssert) {
949
949
  offset$2 = offset$2 >>> 0;
950
950
  if (!noAssert) checkOffset(offset$2, 2, this.length);
951
951
  const val = this[offset$2] | this[offset$2 + 1] << 8;
952
952
  return val & 32768 ? val | 4294901760 : val;
953
953
  };
954
- Buffer$27.prototype.readInt16BE = function readInt16BE(offset$2, noAssert) {
954
+ Buffer$29.prototype.readInt16BE = function readInt16BE(offset$2, noAssert) {
955
955
  offset$2 = offset$2 >>> 0;
956
956
  if (!noAssert) checkOffset(offset$2, 2, this.length);
957
957
  const val = this[offset$2 + 1] | this[offset$2] << 8;
958
958
  return val & 32768 ? val | 4294901760 : val;
959
959
  };
960
- Buffer$27.prototype.readInt32LE = function readInt32LE(offset$2, noAssert) {
960
+ Buffer$29.prototype.readInt32LE = function readInt32LE(offset$2, noAssert) {
961
961
  offset$2 = offset$2 >>> 0;
962
962
  if (!noAssert) checkOffset(offset$2, 4, this.length);
963
963
  return this[offset$2] | this[offset$2 + 1] << 8 | this[offset$2 + 2] << 16 | this[offset$2 + 3] << 24;
964
964
  };
965
- Buffer$27.prototype.readInt32BE = function readInt32BE(offset$2, noAssert) {
965
+ Buffer$29.prototype.readInt32BE = function readInt32BE(offset$2, noAssert) {
966
966
  offset$2 = offset$2 >>> 0;
967
967
  if (!noAssert) checkOffset(offset$2, 4, this.length);
968
968
  return this[offset$2] << 24 | this[offset$2 + 1] << 16 | this[offset$2 + 2] << 8 | this[offset$2 + 3];
969
969
  };
970
- Buffer$27.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset$2) {
970
+ Buffer$29.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset$2) {
971
971
  offset$2 = offset$2 >>> 0;
972
972
  validateNumber(offset$2, "offset");
973
973
  const first$1 = this[offset$2];
@@ -976,7 +976,7 @@ var init_dist$1 = __esmMin(() => {
976
976
  const val = this[offset$2 + 4] + this[offset$2 + 5] * 2 ** 8 + this[offset$2 + 6] * 2 ** 16 + (last$2 << 24);
977
977
  return (BigInt(val) << BigInt(32)) + BigInt(first$1 + this[++offset$2] * 2 ** 8 + this[++offset$2] * 2 ** 16 + this[++offset$2] * 2 ** 24);
978
978
  });
979
- Buffer$27.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset$2) {
979
+ Buffer$29.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset$2) {
980
980
  offset$2 = offset$2 >>> 0;
981
981
  validateNumber(offset$2, "offset");
982
982
  const first$1 = this[offset$2];
@@ -985,32 +985,32 @@ var init_dist$1 = __esmMin(() => {
985
985
  const val = (first$1 << 24) + this[++offset$2] * 2 ** 16 + this[++offset$2] * 2 ** 8 + this[++offset$2];
986
986
  return (BigInt(val) << BigInt(32)) + BigInt(this[++offset$2] * 2 ** 24 + this[++offset$2] * 2 ** 16 + this[++offset$2] * 2 ** 8 + last$2);
987
987
  });
988
- Buffer$27.prototype.readFloatLE = function readFloatLE(offset$2, noAssert) {
988
+ Buffer$29.prototype.readFloatLE = function readFloatLE(offset$2, noAssert) {
989
989
  offset$2 = offset$2 >>> 0;
990
990
  if (!noAssert) checkOffset(offset$2, 4, this.length);
991
991
  return ieee754$1$1.read(this, offset$2, true, 23, 4);
992
992
  };
993
- Buffer$27.prototype.readFloatBE = function readFloatBE(offset$2, noAssert) {
993
+ Buffer$29.prototype.readFloatBE = function readFloatBE(offset$2, noAssert) {
994
994
  offset$2 = offset$2 >>> 0;
995
995
  if (!noAssert) checkOffset(offset$2, 4, this.length);
996
996
  return ieee754$1$1.read(this, offset$2, false, 23, 4);
997
997
  };
998
- Buffer$27.prototype.readDoubleLE = function readDoubleLE(offset$2, noAssert) {
998
+ Buffer$29.prototype.readDoubleLE = function readDoubleLE(offset$2, noAssert) {
999
999
  offset$2 = offset$2 >>> 0;
1000
1000
  if (!noAssert) checkOffset(offset$2, 8, this.length);
1001
1001
  return ieee754$1$1.read(this, offset$2, true, 52, 8);
1002
1002
  };
1003
- Buffer$27.prototype.readDoubleBE = function readDoubleBE(offset$2, noAssert) {
1003
+ Buffer$29.prototype.readDoubleBE = function readDoubleBE(offset$2, noAssert) {
1004
1004
  offset$2 = offset$2 >>> 0;
1005
1005
  if (!noAssert) checkOffset(offset$2, 8, this.length);
1006
1006
  return ieee754$1$1.read(this, offset$2, false, 52, 8);
1007
1007
  };
1008
1008
  function checkInt(buf, value, offset$2, ext, max$3, min$1) {
1009
- if (!Buffer$27.isBuffer(buf)) throw new TypeError("\"buffer\" argument must be a Buffer instance");
1009
+ if (!Buffer$29.isBuffer(buf)) throw new TypeError("\"buffer\" argument must be a Buffer instance");
1010
1010
  if (value > max$3 || value < min$1) throw new RangeError("\"value\" argument is out of bounds");
1011
1011
  if (offset$2 + ext > buf.length) throw new RangeError("Index out of range");
1012
1012
  }
1013
- Buffer$27.prototype.writeUintLE = Buffer$27.prototype.writeUIntLE = function writeUIntLE(value, offset$2, byteLength$3, noAssert) {
1013
+ Buffer$29.prototype.writeUintLE = Buffer$29.prototype.writeUIntLE = function writeUIntLE(value, offset$2, byteLength$3, noAssert) {
1014
1014
  value = +value;
1015
1015
  offset$2 = offset$2 >>> 0;
1016
1016
  byteLength$3 = byteLength$3 >>> 0;
@@ -1024,7 +1024,7 @@ var init_dist$1 = __esmMin(() => {
1024
1024
  while (++i$4 < byteLength$3 && (mul *= 256)) this[offset$2 + i$4] = value / mul & 255;
1025
1025
  return offset$2 + byteLength$3;
1026
1026
  };
1027
- Buffer$27.prototype.writeUintBE = Buffer$27.prototype.writeUIntBE = function writeUIntBE(value, offset$2, byteLength$3, noAssert) {
1027
+ Buffer$29.prototype.writeUintBE = Buffer$29.prototype.writeUIntBE = function writeUIntBE(value, offset$2, byteLength$3, noAssert) {
1028
1028
  value = +value;
1029
1029
  offset$2 = offset$2 >>> 0;
1030
1030
  byteLength$3 = byteLength$3 >>> 0;
@@ -1038,14 +1038,14 @@ var init_dist$1 = __esmMin(() => {
1038
1038
  while (--i$4 >= 0 && (mul *= 256)) this[offset$2 + i$4] = value / mul & 255;
1039
1039
  return offset$2 + byteLength$3;
1040
1040
  };
1041
- Buffer$27.prototype.writeUint8 = Buffer$27.prototype.writeUInt8 = function writeUInt8(value, offset$2, noAssert) {
1041
+ Buffer$29.prototype.writeUint8 = Buffer$29.prototype.writeUInt8 = function writeUInt8(value, offset$2, noAssert) {
1042
1042
  value = +value;
1043
1043
  offset$2 = offset$2 >>> 0;
1044
1044
  if (!noAssert) checkInt(this, value, offset$2, 1, 255, 0);
1045
1045
  this[offset$2] = value & 255;
1046
1046
  return offset$2 + 1;
1047
1047
  };
1048
- Buffer$27.prototype.writeUint16LE = Buffer$27.prototype.writeUInt16LE = function writeUInt16LE(value, offset$2, noAssert) {
1048
+ Buffer$29.prototype.writeUint16LE = Buffer$29.prototype.writeUInt16LE = function writeUInt16LE(value, offset$2, noAssert) {
1049
1049
  value = +value;
1050
1050
  offset$2 = offset$2 >>> 0;
1051
1051
  if (!noAssert) checkInt(this, value, offset$2, 2, 65535, 0);
@@ -1053,7 +1053,7 @@ var init_dist$1 = __esmMin(() => {
1053
1053
  this[offset$2 + 1] = value >>> 8;
1054
1054
  return offset$2 + 2;
1055
1055
  };
1056
- Buffer$27.prototype.writeUint16BE = Buffer$27.prototype.writeUInt16BE = function writeUInt16BE(value, offset$2, noAssert) {
1056
+ Buffer$29.prototype.writeUint16BE = Buffer$29.prototype.writeUInt16BE = function writeUInt16BE(value, offset$2, noAssert) {
1057
1057
  value = +value;
1058
1058
  offset$2 = offset$2 >>> 0;
1059
1059
  if (!noAssert) checkInt(this, value, offset$2, 2, 65535, 0);
@@ -1061,7 +1061,7 @@ var init_dist$1 = __esmMin(() => {
1061
1061
  this[offset$2 + 1] = value & 255;
1062
1062
  return offset$2 + 2;
1063
1063
  };
1064
- Buffer$27.prototype.writeUint32LE = Buffer$27.prototype.writeUInt32LE = function writeUInt32LE(value, offset$2, noAssert) {
1064
+ Buffer$29.prototype.writeUint32LE = Buffer$29.prototype.writeUInt32LE = function writeUInt32LE(value, offset$2, noAssert) {
1065
1065
  value = +value;
1066
1066
  offset$2 = offset$2 >>> 0;
1067
1067
  if (!noAssert) checkInt(this, value, offset$2, 4, 4294967295, 0);
@@ -1071,7 +1071,7 @@ var init_dist$1 = __esmMin(() => {
1071
1071
  this[offset$2] = value & 255;
1072
1072
  return offset$2 + 4;
1073
1073
  };
1074
- Buffer$27.prototype.writeUint32BE = Buffer$27.prototype.writeUInt32BE = function writeUInt32BE(value, offset$2, noAssert) {
1074
+ Buffer$29.prototype.writeUint32BE = Buffer$29.prototype.writeUInt32BE = function writeUInt32BE(value, offset$2, noAssert) {
1075
1075
  value = +value;
1076
1076
  offset$2 = offset$2 >>> 0;
1077
1077
  if (!noAssert) checkInt(this, value, offset$2, 4, 4294967295, 0);
@@ -1121,13 +1121,13 @@ var init_dist$1 = __esmMin(() => {
1121
1121
  buf[offset$2] = hi;
1122
1122
  return offset$2 + 8;
1123
1123
  }
1124
- Buffer$27.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset$2 = 0) {
1124
+ Buffer$29.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset$2 = 0) {
1125
1125
  return wrtBigUInt64LE(this, value, offset$2, BigInt(0), BigInt("0xffffffffffffffff"));
1126
1126
  });
1127
- Buffer$27.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset$2 = 0) {
1127
+ Buffer$29.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset$2 = 0) {
1128
1128
  return wrtBigUInt64BE(this, value, offset$2, BigInt(0), BigInt("0xffffffffffffffff"));
1129
1129
  });
1130
- Buffer$27.prototype.writeIntLE = function writeIntLE(value, offset$2, byteLength$3, noAssert) {
1130
+ Buffer$29.prototype.writeIntLE = function writeIntLE(value, offset$2, byteLength$3, noAssert) {
1131
1131
  value = +value;
1132
1132
  offset$2 = offset$2 >>> 0;
1133
1133
  if (!noAssert) {
@@ -1144,7 +1144,7 @@ var init_dist$1 = __esmMin(() => {
1144
1144
  }
1145
1145
  return offset$2 + byteLength$3;
1146
1146
  };
1147
- Buffer$27.prototype.writeIntBE = function writeIntBE(value, offset$2, byteLength$3, noAssert) {
1147
+ Buffer$29.prototype.writeIntBE = function writeIntBE(value, offset$2, byteLength$3, noAssert) {
1148
1148
  value = +value;
1149
1149
  offset$2 = offset$2 >>> 0;
1150
1150
  if (!noAssert) {
@@ -1161,7 +1161,7 @@ var init_dist$1 = __esmMin(() => {
1161
1161
  }
1162
1162
  return offset$2 + byteLength$3;
1163
1163
  };
1164
- Buffer$27.prototype.writeInt8 = function writeInt8(value, offset$2, noAssert) {
1164
+ Buffer$29.prototype.writeInt8 = function writeInt8(value, offset$2, noAssert) {
1165
1165
  value = +value;
1166
1166
  offset$2 = offset$2 >>> 0;
1167
1167
  if (!noAssert) checkInt(this, value, offset$2, 1, 127, -128);
@@ -1169,7 +1169,7 @@ var init_dist$1 = __esmMin(() => {
1169
1169
  this[offset$2] = value & 255;
1170
1170
  return offset$2 + 1;
1171
1171
  };
1172
- Buffer$27.prototype.writeInt16LE = function writeInt16LE(value, offset$2, noAssert) {
1172
+ Buffer$29.prototype.writeInt16LE = function writeInt16LE(value, offset$2, noAssert) {
1173
1173
  value = +value;
1174
1174
  offset$2 = offset$2 >>> 0;
1175
1175
  if (!noAssert) checkInt(this, value, offset$2, 2, 32767, -32768);
@@ -1177,7 +1177,7 @@ var init_dist$1 = __esmMin(() => {
1177
1177
  this[offset$2 + 1] = value >>> 8;
1178
1178
  return offset$2 + 2;
1179
1179
  };
1180
- Buffer$27.prototype.writeInt16BE = function writeInt16BE(value, offset$2, noAssert) {
1180
+ Buffer$29.prototype.writeInt16BE = function writeInt16BE(value, offset$2, noAssert) {
1181
1181
  value = +value;
1182
1182
  offset$2 = offset$2 >>> 0;
1183
1183
  if (!noAssert) checkInt(this, value, offset$2, 2, 32767, -32768);
@@ -1185,7 +1185,7 @@ var init_dist$1 = __esmMin(() => {
1185
1185
  this[offset$2 + 1] = value & 255;
1186
1186
  return offset$2 + 2;
1187
1187
  };
1188
- Buffer$27.prototype.writeInt32LE = function writeInt32LE(value, offset$2, noAssert) {
1188
+ Buffer$29.prototype.writeInt32LE = function writeInt32LE(value, offset$2, noAssert) {
1189
1189
  value = +value;
1190
1190
  offset$2 = offset$2 >>> 0;
1191
1191
  if (!noAssert) checkInt(this, value, offset$2, 4, 2147483647, -2147483648);
@@ -1195,7 +1195,7 @@ var init_dist$1 = __esmMin(() => {
1195
1195
  this[offset$2 + 3] = value >>> 24;
1196
1196
  return offset$2 + 4;
1197
1197
  };
1198
- Buffer$27.prototype.writeInt32BE = function writeInt32BE(value, offset$2, noAssert) {
1198
+ Buffer$29.prototype.writeInt32BE = function writeInt32BE(value, offset$2, noAssert) {
1199
1199
  value = +value;
1200
1200
  offset$2 = offset$2 >>> 0;
1201
1201
  if (!noAssert) checkInt(this, value, offset$2, 4, 2147483647, -2147483648);
@@ -1206,10 +1206,10 @@ var init_dist$1 = __esmMin(() => {
1206
1206
  this[offset$2 + 3] = value & 255;
1207
1207
  return offset$2 + 4;
1208
1208
  };
1209
- Buffer$27.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset$2 = 0) {
1209
+ Buffer$29.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset$2 = 0) {
1210
1210
  return wrtBigUInt64LE(this, value, offset$2, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1211
1211
  });
1212
- Buffer$27.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset$2 = 0) {
1212
+ Buffer$29.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset$2 = 0) {
1213
1213
  return wrtBigUInt64BE(this, value, offset$2, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1214
1214
  });
1215
1215
  function checkIEEE754(buf, value, offset$2, ext, max$3, min$1) {
@@ -1223,10 +1223,10 @@ var init_dist$1 = __esmMin(() => {
1223
1223
  ieee754$1$1.write(buf, value, offset$2, littleEndian, 23, 4);
1224
1224
  return offset$2 + 4;
1225
1225
  }
1226
- Buffer$27.prototype.writeFloatLE = function writeFloatLE(value, offset$2, noAssert) {
1226
+ Buffer$29.prototype.writeFloatLE = function writeFloatLE(value, offset$2, noAssert) {
1227
1227
  return writeFloat(this, value, offset$2, true, noAssert);
1228
1228
  };
1229
- Buffer$27.prototype.writeFloatBE = function writeFloatBE(value, offset$2, noAssert) {
1229
+ Buffer$29.prototype.writeFloatBE = function writeFloatBE(value, offset$2, noAssert) {
1230
1230
  return writeFloat(this, value, offset$2, false, noAssert);
1231
1231
  };
1232
1232
  function writeDouble(buf, value, offset$2, littleEndian, noAssert) {
@@ -1236,14 +1236,14 @@ var init_dist$1 = __esmMin(() => {
1236
1236
  ieee754$1$1.write(buf, value, offset$2, littleEndian, 52, 8);
1237
1237
  return offset$2 + 8;
1238
1238
  }
1239
- Buffer$27.prototype.writeDoubleLE = function writeDoubleLE(value, offset$2, noAssert) {
1239
+ Buffer$29.prototype.writeDoubleLE = function writeDoubleLE(value, offset$2, noAssert) {
1240
1240
  return writeDouble(this, value, offset$2, true, noAssert);
1241
1241
  };
1242
- Buffer$27.prototype.writeDoubleBE = function writeDoubleBE(value, offset$2, noAssert) {
1242
+ Buffer$29.prototype.writeDoubleBE = function writeDoubleBE(value, offset$2, noAssert) {
1243
1243
  return writeDouble(this, value, offset$2, false, noAssert);
1244
1244
  };
1245
- Buffer$27.prototype.copy = function copy(target, targetStart, start, end) {
1246
- if (!Buffer$27.isBuffer(target)) throw new TypeError("argument should be a Buffer");
1245
+ Buffer$29.prototype.copy = function copy(target, targetStart, start, end) {
1246
+ if (!Buffer$29.isBuffer(target)) throw new TypeError("argument should be a Buffer");
1247
1247
  if (!start) start = 0;
1248
1248
  if (!end && end !== 0) end = this.length;
1249
1249
  if (targetStart >= target.length) targetStart = target.length;
@@ -1261,7 +1261,7 @@ var init_dist$1 = __esmMin(() => {
1261
1261
  else GlobalUint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
1262
1262
  return len$2;
1263
1263
  };
1264
- Buffer$27.prototype.fill = function fill(val, start, end, encoding) {
1264
+ Buffer$29.prototype.fill = function fill(val, start, end, encoding) {
1265
1265
  if (typeof val === "string") {
1266
1266
  if (typeof start === "string") {
1267
1267
  encoding = start;
@@ -1272,7 +1272,7 @@ var init_dist$1 = __esmMin(() => {
1272
1272
  end = this.length;
1273
1273
  }
1274
1274
  if (encoding !== void 0 && typeof encoding !== "string") throw new TypeError("encoding must be a string");
1275
- if (typeof encoding === "string" && !Buffer$27.isEncoding(encoding)) throw new TypeError("Unknown encoding: " + encoding);
1275
+ if (typeof encoding === "string" && !Buffer$29.isEncoding(encoding)) throw new TypeError("Unknown encoding: " + encoding);
1276
1276
  if (val.length === 1) {
1277
1277
  const code$2 = val.charCodeAt(0);
1278
1278
  if (encoding === "utf8" && code$2 < 128 || encoding === "latin1") val = code$2;
@@ -1287,7 +1287,7 @@ var init_dist$1 = __esmMin(() => {
1287
1287
  let i$4;
1288
1288
  if (typeof val === "number") for (i$4 = start; i$4 < end; ++i$4) this[i$4] = val;
1289
1289
  else {
1290
- const bytes = Buffer$27.isBuffer(val) ? val : Buffer$27.from(val, encoding);
1290
+ const bytes = Buffer$29.isBuffer(val) ? val : Buffer$29.from(val, encoding);
1291
1291
  const len$2 = bytes.length;
1292
1292
  if (len$2 === 0) throw new TypeError("The value \"" + val + "\" is invalid for argument \"value\"");
1293
1293
  for (i$4 = 0; i$4 < end - start; ++i$4) this[i$4 + start] = bytes[i$4 % len$2];
@@ -1502,7 +1502,7 @@ var init_dist$1 = __esmMin(() => {
1502
1502
  });
1503
1503
  var require_reach = __commonJSMin((exports, module) => {
1504
1504
  const Assert$5 = require_assert$1();
1505
- const internals$40 = {};
1505
+ const internals$41 = {};
1506
1506
  module.exports = function(obj, chain, options) {
1507
1507
  if (chain === false || chain === null || chain === void 0) return obj;
1508
1508
  options = options || {};
@@ -1513,7 +1513,7 @@ var require_reach = __commonJSMin((exports, module) => {
1513
1513
  let ref = obj;
1514
1514
  for (let i$4 = 0; i$4 < path.length; ++i$4) {
1515
1515
  let key = path[i$4];
1516
- const type = options.iterables && internals$40.iterables(ref);
1516
+ const type = options.iterables && internals$41.iterables(ref);
1517
1517
  if (Array.isArray(ref) || type === "set") {
1518
1518
  const number = Number(key);
1519
1519
  if (Number.isInteger(number)) key = number < 0 ? ref.length + number : number;
@@ -1530,14 +1530,14 @@ var require_reach = __commonJSMin((exports, module) => {
1530
1530
  }
1531
1531
  return ref;
1532
1532
  };
1533
- internals$40.iterables = function(ref) {
1533
+ internals$41.iterables = function(ref) {
1534
1534
  if (ref instanceof Set) return "set";
1535
1535
  if (ref instanceof Map) return "map";
1536
1536
  };
1537
1537
  });
1538
1538
  var require_types$1 = __commonJSMin((exports, module) => {
1539
1539
  init_dist$1();
1540
- const internals$39 = {};
1540
+ const internals$40 = {};
1541
1541
  exports = module.exports = {
1542
1542
  array: Array.prototype,
1543
1543
  buffer: Buffer$1 && Buffer$1.prototype,
@@ -1552,7 +1552,7 @@ var require_types$1 = __commonJSMin((exports, module) => {
1552
1552
  weakMap: WeakMap.prototype,
1553
1553
  weakSet: WeakSet.prototype
1554
1554
  };
1555
- internals$39.typeMap = new Map([
1555
+ internals$40.typeMap = new Map([
1556
1556
  ["[object Error]", exports.error],
1557
1557
  ["[object Map]", exports.map],
1558
1558
  ["[object Promise]", exports.promise],
@@ -1568,7 +1568,7 @@ var require_types$1 = __commonJSMin((exports, module) => {
1568
1568
  if (obj instanceof RegExp) return exports.regex;
1569
1569
  if (obj instanceof Error) return exports.error;
1570
1570
  const objName = Object.prototype.toString.call(obj);
1571
- return internals$39.typeMap.get(objName) || exports.generic;
1571
+ return internals$40.typeMap.get(objName) || exports.generic;
1572
1572
  };
1573
1573
  });
1574
1574
  var require_utils$7 = __commonJSMin((exports) => {
@@ -1581,7 +1581,7 @@ var require_clone$1 = __commonJSMin((exports, module) => {
1581
1581
  const Reach$2 = require_reach();
1582
1582
  const Types$1 = require_types$1();
1583
1583
  const Utils$3 = require_utils$7();
1584
- const internals$38 = {
1584
+ const internals$39 = {
1585
1585
  needsProtoHack: new Set([
1586
1586
  Types$1.set,
1587
1587
  Types$1.map,
@@ -1590,13 +1590,13 @@ var require_clone$1 = __commonJSMin((exports, module) => {
1590
1590
  ]),
1591
1591
  structuredCloneExists: typeof structuredClone === "function"
1592
1592
  };
1593
- module.exports = internals$38.clone = function(obj, options = {}, _seen = null) {
1593
+ module.exports = internals$39.clone = function(obj, options = {}, _seen = null) {
1594
1594
  if (typeof obj !== "object" || obj === null) return obj;
1595
- let clone$20 = internals$38.clone;
1595
+ let clone$21 = internals$39.clone;
1596
1596
  let seen = _seen;
1597
1597
  if (options.shallow) {
1598
- if (options.shallow !== true) return internals$38.cloneWithShallow(obj, options);
1599
- clone$20 = (value) => value;
1598
+ if (options.shallow !== true) return internals$39.cloneWithShallow(obj, options);
1599
+ clone$21 = (value) => value;
1600
1600
  } else if (seen) {
1601
1601
  const lookup$2 = seen.get(obj);
1602
1602
  if (lookup$2) return lookup$2;
@@ -1608,11 +1608,11 @@ var require_clone$1 = __commonJSMin((exports, module) => {
1608
1608
  case Types$1.regex:
1609
1609
  case Types$1.url: return new baseProto.constructor(obj);
1610
1610
  }
1611
- const newObj = internals$38.base(obj, baseProto, options);
1611
+ const newObj = internals$39.base(obj, baseProto, options);
1612
1612
  if (newObj === obj) return obj;
1613
1613
  if (seen) seen.set(obj, newObj);
1614
- if (baseProto === Types$1.set) for (const value of obj) newObj.add(clone$20(value, options, seen));
1615
- else if (baseProto === Types$1.map) for (const [key, value] of obj) newObj.set(key, clone$20(value, options, seen));
1614
+ if (baseProto === Types$1.set) for (const value of obj) newObj.add(clone$21(value, options, seen));
1615
+ else if (baseProto === Types$1.map) for (const [key, value] of obj) newObj.set(key, clone$21(value, options, seen));
1616
1616
  const keys$10 = Utils$3.keys(obj, options);
1617
1617
  for (const key of keys$10) {
1618
1618
  if (key === "__proto__") continue;
@@ -1620,26 +1620,26 @@ var require_clone$1 = __commonJSMin((exports, module) => {
1620
1620
  newObj.length = obj.length;
1621
1621
  continue;
1622
1622
  }
1623
- if (internals$38.structuredCloneExists && baseProto === Types$1.error && key === "stack") continue;
1623
+ if (internals$39.structuredCloneExists && baseProto === Types$1.error && key === "stack") continue;
1624
1624
  const descriptor = Object.getOwnPropertyDescriptor(obj, key);
1625
1625
  if (descriptor) if (descriptor.get || descriptor.set) Object.defineProperty(newObj, key, descriptor);
1626
- else if (descriptor.enumerable) newObj[key] = clone$20(obj[key], options, seen);
1626
+ else if (descriptor.enumerable) newObj[key] = clone$21(obj[key], options, seen);
1627
1627
  else Object.defineProperty(newObj, key, {
1628
1628
  enumerable: false,
1629
1629
  writable: true,
1630
1630
  configurable: true,
1631
- value: clone$20(obj[key], options, seen)
1631
+ value: clone$21(obj[key], options, seen)
1632
1632
  });
1633
1633
  else Object.defineProperty(newObj, key, {
1634
1634
  enumerable: true,
1635
1635
  writable: true,
1636
1636
  configurable: true,
1637
- value: clone$20(obj[key], options, seen)
1637
+ value: clone$21(obj[key], options, seen)
1638
1638
  });
1639
1639
  }
1640
1640
  return newObj;
1641
1641
  };
1642
- internals$38.cloneWithShallow = function(source, options) {
1642
+ internals$39.cloneWithShallow = function(source, options) {
1643
1643
  const keys$10 = options.shallow;
1644
1644
  options = Object.assign({}, options);
1645
1645
  options.shallow = false;
@@ -1648,11 +1648,11 @@ var require_clone$1 = __commonJSMin((exports, module) => {
1648
1648
  const ref = Reach$2(source, key);
1649
1649
  if (typeof ref === "object" || typeof ref === "function") seen.set(ref, ref);
1650
1650
  }
1651
- return internals$38.clone(source, options, seen);
1651
+ return internals$39.clone(source, options, seen);
1652
1652
  };
1653
- internals$38.base = function(obj, baseProto, options) {
1653
+ internals$39.base = function(obj, baseProto, options) {
1654
1654
  if (options.prototype === false) {
1655
- if (internals$38.needsProtoHack.has(baseProto)) return new baseProto.constructor();
1655
+ if (internals$39.needsProtoHack.has(baseProto)) return new baseProto.constructor();
1656
1656
  return baseProto === Types$1.array ? [] : {};
1657
1657
  }
1658
1658
  const proto = Object.getPrototypeOf(obj);
@@ -1661,12 +1661,12 @@ var require_clone$1 = __commonJSMin((exports, module) => {
1661
1661
  const newObj = [];
1662
1662
  if (proto !== baseProto) Object.setPrototypeOf(newObj, proto);
1663
1663
  return newObj;
1664
- } else if (baseProto === Types$1.error && internals$38.structuredCloneExists && (proto === baseProto || Error.isPrototypeOf(proto.constructor))) {
1664
+ } else if (baseProto === Types$1.error && internals$39.structuredCloneExists && (proto === baseProto || Error.isPrototypeOf(proto.constructor))) {
1665
1665
  const err$1 = structuredClone(obj);
1666
1666
  if (Object.getPrototypeOf(err$1) !== proto) Object.setPrototypeOf(err$1, proto);
1667
1667
  return err$1;
1668
1668
  }
1669
- if (internals$38.needsProtoHack.has(baseProto)) {
1669
+ if (internals$39.needsProtoHack.has(baseProto)) {
1670
1670
  const newObj = new proto.constructor();
1671
1671
  if (proto !== baseProto) Object.setPrototypeOf(newObj, proto);
1672
1672
  return newObj;
@@ -1679,8 +1679,8 @@ var require_merge = __commonJSMin((exports, module) => {
1679
1679
  const Assert$4 = require_assert$1();
1680
1680
  const Clone$2 = require_clone$1();
1681
1681
  const Utils$2 = require_utils$7();
1682
- const internals$37 = {};
1683
- module.exports = internals$37.merge = function(target, source, options) {
1682
+ const internals$38 = {};
1683
+ module.exports = internals$38.merge = function(target, source, options) {
1684
1684
  Assert$4(target && typeof target === "object", "Invalid target value: must be an object");
1685
1685
  Assert$4(source === null || source === void 0 || typeof source === "object", "Invalid source value: must be null, undefined, or an object");
1686
1686
  if (!source) return target;
@@ -1702,7 +1702,7 @@ var require_merge = __commonJSMin((exports, module) => {
1702
1702
  if (value && typeof value === "object") {
1703
1703
  if (target[key] === value) continue;
1704
1704
  if (!target[key] || typeof target[key] !== "object" || Array.isArray(target[key]) !== Array.isArray(value) || value instanceof Date || Buffer$1 && Buffer$1.isBuffer(value) || value instanceof RegExp) target[key] = Clone$2(value, { symbols: options.symbols });
1705
- else internals$37.merge(target[key], value, options);
1705
+ else internals$38.merge(target[key], value, options);
1706
1706
  } else if (value !== null && value !== void 0) target[key] = value;
1707
1707
  else if (options.nullOverride) target[key] = value;
1708
1708
  }
@@ -1714,13 +1714,13 @@ var require_applyToDefaults = __commonJSMin((exports, module) => {
1714
1714
  const Clone$1 = require_clone$1();
1715
1715
  const Merge = require_merge();
1716
1716
  const Reach$1 = require_reach();
1717
- const internals$36 = {};
1717
+ const internals$37 = {};
1718
1718
  module.exports = function(defaults$3, source, options = {}) {
1719
1719
  Assert$3(defaults$3 && typeof defaults$3 === "object", "Invalid defaults value: must be an object");
1720
1720
  Assert$3(!source || source === true || typeof source === "object", "Invalid source value: must be true, falsy or an object");
1721
1721
  Assert$3(typeof options === "object", "Invalid options: must be an object");
1722
1722
  if (!source) return null;
1723
- if (options.shallow) return internals$36.applyToDefaultsWithShallow(defaults$3, source, options);
1723
+ if (options.shallow) return internals$37.applyToDefaultsWithShallow(defaults$3, source, options);
1724
1724
  const copy = Clone$1(defaults$3);
1725
1725
  if (source === true) return copy;
1726
1726
  const nullOverride = options.nullOverride !== void 0 ? options.nullOverride : false;
@@ -1729,7 +1729,7 @@ var require_applyToDefaults = __commonJSMin((exports, module) => {
1729
1729
  mergeArrays: false
1730
1730
  });
1731
1731
  };
1732
- internals$36.applyToDefaultsWithShallow = function(defaults$3, source, options) {
1732
+ internals$37.applyToDefaultsWithShallow = function(defaults$3, source, options) {
1733
1733
  const keys$10 = options.shallow;
1734
1734
  Assert$3(Array.isArray(keys$10), "Invalid keys");
1735
1735
  const seen = new Map();
@@ -1742,14 +1742,14 @@ var require_applyToDefaults = __commonJSMin((exports, module) => {
1742
1742
  }
1743
1743
  const copy = Clone$1(defaults$3, {}, seen);
1744
1744
  if (!merge$4) return copy;
1745
- for (const key of merge$4) internals$36.reachCopy(copy, source, key);
1745
+ for (const key of merge$4) internals$37.reachCopy(copy, source, key);
1746
1746
  const nullOverride = options.nullOverride !== void 0 ? options.nullOverride : false;
1747
1747
  return Merge(copy, source, {
1748
1748
  nullOverride,
1749
1749
  mergeArrays: false
1750
1750
  });
1751
1751
  };
1752
- internals$36.reachCopy = function(dst, src$1, path) {
1752
+ internals$37.reachCopy = function(dst, src$1, path) {
1753
1753
  for (const segment of path) {
1754
1754
  if (!(segment in src$1)) return;
1755
1755
  const val = src$1[segment];
@@ -1900,17 +1900,17 @@ var init_dist = __esmMin(() => {
1900
1900
  });
1901
1901
  var require_bench = __commonJSMin((exports, module) => {
1902
1902
  init_dist();
1903
- const internals$35 = {};
1904
- module.exports = internals$35.Bench = class {
1903
+ const internals$36 = {};
1904
+ module.exports = internals$36.Bench = class {
1905
1905
  constructor() {
1906
1906
  this.ts = 0;
1907
1907
  this.reset();
1908
1908
  }
1909
1909
  reset() {
1910
- this.ts = internals$35.Bench.now();
1910
+ this.ts = internals$36.Bench.now();
1911
1911
  }
1912
1912
  elapsed() {
1913
- return internals$35.Bench.now() - this.ts;
1913
+ return internals$36.Bench.now() - this.ts;
1914
1914
  }
1915
1915
  static now() {
1916
1916
  const ts = process$1.hrtime();
@@ -1930,12 +1930,12 @@ var require_block = __commonJSMin((exports, module) => {
1930
1930
  var require_deepEqual = __commonJSMin((exports, module) => {
1931
1931
  init_dist$1();
1932
1932
  const Types = require_types$1();
1933
- const internals$34 = { mismatched: null };
1933
+ const internals$35 = { mismatched: null };
1934
1934
  module.exports = function(obj, ref, options) {
1935
1935
  options = Object.assign({ prototype: true }, options);
1936
- return !!internals$34.isDeepEqual(obj, ref, options, []);
1936
+ return !!internals$35.isDeepEqual(obj, ref, options, []);
1937
1937
  };
1938
- internals$34.isDeepEqual = function(obj, ref, options, seen) {
1938
+ internals$35.isDeepEqual = function(obj, ref, options, seen) {
1939
1939
  if (obj === ref) return obj !== 0 || 1 / obj === 1 / ref;
1940
1940
  const type = typeof obj;
1941
1941
  if (type !== typeof ref) return false;
@@ -1943,32 +1943,32 @@ var require_deepEqual = __commonJSMin((exports, module) => {
1943
1943
  if (type === "function") {
1944
1944
  if (!options.deepFunction || obj.toString() !== ref.toString()) return false;
1945
1945
  } else if (type !== "object") return obj !== obj && ref !== ref;
1946
- const instanceType = internals$34.getSharedType(obj, ref, !!options.prototype);
1946
+ const instanceType = internals$35.getSharedType(obj, ref, !!options.prototype);
1947
1947
  switch (instanceType) {
1948
1948
  case Types.buffer: return Buffer$1 && Buffer$1.prototype.equals.call(obj, ref);
1949
1949
  case Types.promise: return obj === ref;
1950
1950
  case Types.regex:
1951
1951
  case Types.url: return obj.toString() === ref.toString();
1952
- case internals$34.mismatched: return false;
1952
+ case internals$35.mismatched: return false;
1953
1953
  }
1954
1954
  for (let i$4 = seen.length - 1; i$4 >= 0; --i$4) if (seen[i$4].isSame(obj, ref)) return true;
1955
- seen.push(new internals$34.SeenEntry(obj, ref));
1955
+ seen.push(new internals$35.SeenEntry(obj, ref));
1956
1956
  try {
1957
- return !!internals$34.isDeepEqualObj(instanceType, obj, ref, options, seen);
1957
+ return !!internals$35.isDeepEqualObj(instanceType, obj, ref, options, seen);
1958
1958
  } finally {
1959
1959
  seen.pop();
1960
1960
  }
1961
1961
  };
1962
- internals$34.getSharedType = function(obj, ref, checkPrototype) {
1962
+ internals$35.getSharedType = function(obj, ref, checkPrototype) {
1963
1963
  if (checkPrototype) {
1964
- if (Object.getPrototypeOf(obj) !== Object.getPrototypeOf(ref)) return internals$34.mismatched;
1964
+ if (Object.getPrototypeOf(obj) !== Object.getPrototypeOf(ref)) return internals$35.mismatched;
1965
1965
  return Types.getInternalProto(obj);
1966
1966
  }
1967
1967
  const type = Types.getInternalProto(obj);
1968
- if (type !== Types.getInternalProto(ref)) return internals$34.mismatched;
1968
+ if (type !== Types.getInternalProto(ref)) return internals$35.mismatched;
1969
1969
  return type;
1970
1970
  };
1971
- internals$34.valueOf = function(obj) {
1971
+ internals$35.valueOf = function(obj) {
1972
1972
  const objValueOf = obj.valueOf;
1973
1973
  if (objValueOf === void 0) return obj;
1974
1974
  try {
@@ -1977,15 +1977,15 @@ var require_deepEqual = __commonJSMin((exports, module) => {
1977
1977
  return err$1;
1978
1978
  }
1979
1979
  };
1980
- internals$34.hasOwnEnumerableProperty = function(obj, key) {
1980
+ internals$35.hasOwnEnumerableProperty = function(obj, key) {
1981
1981
  return Object.prototype.propertyIsEnumerable.call(obj, key);
1982
1982
  };
1983
- internals$34.isSetSimpleEqual = function(obj, ref) {
1983
+ internals$35.isSetSimpleEqual = function(obj, ref) {
1984
1984
  for (const entry of Set.prototype.values.call(obj)) if (!Set.prototype.has.call(ref, entry)) return false;
1985
1985
  return true;
1986
1986
  };
1987
- internals$34.isDeepEqualObj = function(instanceType, obj, ref, options, seen) {
1988
- const { isDeepEqual: isDeepEqual$2, valueOf, hasOwnEnumerableProperty } = internals$34;
1987
+ internals$35.isDeepEqualObj = function(instanceType, obj, ref, options, seen) {
1988
+ const { isDeepEqual: isDeepEqual$2, valueOf, hasOwnEnumerableProperty } = internals$35;
1989
1989
  const { keys: keys$10, getOwnPropertySymbols } = Object;
1990
1990
  if (instanceType === Types.array) if (options.part) {
1991
1991
  for (const objValue of obj) for (const refValue of ref) if (isDeepEqual$2(objValue, refValue, options, seen)) return true;
@@ -1996,7 +1996,7 @@ var require_deepEqual = __commonJSMin((exports, module) => {
1996
1996
  }
1997
1997
  else if (instanceType === Types.set) {
1998
1998
  if (obj.size !== ref.size) return false;
1999
- if (!internals$34.isSetSimpleEqual(obj, ref)) {
1999
+ if (!internals$35.isSetSimpleEqual(obj, ref)) {
2000
2000
  const ref2 = new Set(Set.prototype.values.call(ref));
2001
2001
  for (const objEntry of Set.prototype.values.call(obj)) {
2002
2002
  if (ref2.delete(objEntry)) continue;
@@ -2049,7 +2049,7 @@ var require_deepEqual = __commonJSMin((exports, module) => {
2049
2049
  }
2050
2050
  return true;
2051
2051
  };
2052
- internals$34.SeenEntry = class {
2052
+ internals$35.SeenEntry = class {
2053
2053
  constructor(obj, ref) {
2054
2054
  this.obj = obj;
2055
2055
  this.ref = ref;
@@ -2069,16 +2069,16 @@ var require_contain = __commonJSMin((exports, module) => {
2069
2069
  const DeepEqual = require_deepEqual();
2070
2070
  const EscapeRegex = require_escapeRegex();
2071
2071
  const Utils$1 = require_utils$7();
2072
- const internals$33 = {};
2072
+ const internals$34 = {};
2073
2073
  module.exports = function(ref, values$3, options = {}) {
2074
2074
  if (typeof values$3 !== "object") values$3 = [values$3];
2075
2075
  Assert$2(!Array.isArray(values$3) || values$3.length, "Values array cannot be empty");
2076
- if (typeof ref === "string") return internals$33.string(ref, values$3, options);
2077
- if (Array.isArray(ref)) return internals$33.array(ref, values$3, options);
2076
+ if (typeof ref === "string") return internals$34.string(ref, values$3, options);
2077
+ if (Array.isArray(ref)) return internals$34.array(ref, values$3, options);
2078
2078
  Assert$2(typeof ref === "object", "Reference must be string or an object");
2079
- return internals$33.object(ref, values$3, options);
2079
+ return internals$34.object(ref, values$3, options);
2080
2080
  };
2081
- internals$33.array = function(ref, values$3, options) {
2081
+ internals$34.array = function(ref, values$3, options) {
2082
2082
  if (!Array.isArray(values$3)) values$3 = [values$3];
2083
2083
  if (!ref.length) return false;
2084
2084
  if (options.only && options.once && ref.length !== values$3.length) return false;
@@ -2092,7 +2092,7 @@ var require_contain = __commonJSMin((exports, module) => {
2092
2092
  hits: 0
2093
2093
  });
2094
2094
  } else {
2095
- compare$16 = compare$16 ?? internals$33.compare(options);
2095
+ compare$16 = compare$16 ?? internals$34.compare(options);
2096
2096
  let found = false;
2097
2097
  for (const [key, existing] of map$8.entries()) if (compare$16(key, value)) {
2098
2098
  ++existing.allowed;
@@ -2109,7 +2109,7 @@ var require_contain = __commonJSMin((exports, module) => {
2109
2109
  let match$2;
2110
2110
  if (!options.deep || !item || typeof item !== "object") match$2 = map$8.get(item);
2111
2111
  else {
2112
- compare$16 = compare$16 ?? internals$33.compare(options);
2112
+ compare$16 = compare$16 ?? internals$34.compare(options);
2113
2113
  for (const [key, existing] of map$8.entries()) if (compare$16(key, item)) {
2114
2114
  match$2 = existing;
2115
2115
  break;
@@ -2128,14 +2128,14 @@ var require_contain = __commonJSMin((exports, module) => {
2128
2128
  }
2129
2129
  return !!hits;
2130
2130
  };
2131
- internals$33.object = function(ref, values$3, options) {
2131
+ internals$34.object = function(ref, values$3, options) {
2132
2132
  Assert$2(options.once === void 0, "Cannot use option once with object");
2133
2133
  const keys$10 = Utils$1.keys(ref, options);
2134
2134
  if (!keys$10.length) return false;
2135
- if (Array.isArray(values$3)) return internals$33.array(keys$10, values$3, options);
2135
+ if (Array.isArray(values$3)) return internals$34.array(keys$10, values$3, options);
2136
2136
  const symbols = Object.getOwnPropertySymbols(values$3).filter((sym) => values$3.propertyIsEnumerable(sym));
2137
2137
  const targets = [...Object.keys(values$3), ...symbols];
2138
- const compare$16 = internals$33.compare(options);
2138
+ const compare$16 = internals$34.compare(options);
2139
2139
  const set = new Set(targets);
2140
2140
  for (const key of keys$10) {
2141
2141
  if (!set.has(key)) {
@@ -2148,7 +2148,7 @@ var require_contain = __commonJSMin((exports, module) => {
2148
2148
  if (set.size) return options.part ? set.size < targets.length : false;
2149
2149
  return true;
2150
2150
  };
2151
- internals$33.string = function(ref, values$3, options) {
2151
+ internals$34.string = function(ref, values$3, options) {
2152
2152
  if (ref === "") return values$3.length === 1 && values$3[0] === "" || !options.once && !values$3.some((v$1) => v$1 !== "");
2153
2153
  const map$8 = new Map();
2154
2154
  const patterns = [];
@@ -2182,8 +2182,8 @@ var require_contain = __commonJSMin((exports, module) => {
2182
2182
  }
2183
2183
  return !!any;
2184
2184
  };
2185
- internals$33.compare = function(options) {
2186
- if (!options.deep) return internals$33.shallow;
2185
+ internals$34.compare = function(options) {
2186
+ if (!options.deep) return internals$34.shallow;
2187
2187
  const hasOnly = options.only !== void 0;
2188
2188
  const hasPart = options.part !== void 0;
2189
2189
  const flags = {
@@ -2192,7 +2192,7 @@ var require_contain = __commonJSMin((exports, module) => {
2192
2192
  };
2193
2193
  return (a$2, b) => DeepEqual(a$2, b, flags);
2194
2194
  };
2195
- internals$33.shallow = function(a$2, b) {
2195
+ internals$34.shallow = function(a$2, b) {
2196
2196
  return a$2 === b;
2197
2197
  };
2198
2198
  });
@@ -2204,28 +2204,28 @@ var require_escapeHeaderAttribute = __commonJSMin((exports, module) => {
2204
2204
  };
2205
2205
  });
2206
2206
  var require_escapeHtml = __commonJSMin((exports, module) => {
2207
- const internals$32 = {};
2207
+ const internals$33 = {};
2208
2208
  module.exports = function(input) {
2209
2209
  if (!input) return "";
2210
2210
  let escaped = "";
2211
2211
  for (let i$4 = 0; i$4 < input.length; ++i$4) {
2212
2212
  const charCode = input.charCodeAt(i$4);
2213
- if (internals$32.isSafe(charCode)) escaped += input[i$4];
2214
- else escaped += internals$32.escapeHtmlChar(charCode);
2213
+ if (internals$33.isSafe(charCode)) escaped += input[i$4];
2214
+ else escaped += internals$33.escapeHtmlChar(charCode);
2215
2215
  }
2216
2216
  return escaped;
2217
2217
  };
2218
- internals$32.escapeHtmlChar = function(charCode) {
2219
- const namedEscape = internals$32.namedHtml.get(charCode);
2218
+ internals$33.escapeHtmlChar = function(charCode) {
2219
+ const namedEscape = internals$33.namedHtml.get(charCode);
2220
2220
  if (namedEscape) return namedEscape;
2221
2221
  if (charCode >= 256) return "&#" + charCode + ";";
2222
2222
  const hexValue = charCode.toString(16).padStart(2, "0");
2223
2223
  return `&#x${hexValue};`;
2224
2224
  };
2225
- internals$32.isSafe = function(charCode) {
2226
- return internals$32.safeCharCodes.has(charCode);
2225
+ internals$33.isSafe = function(charCode) {
2226
+ return internals$33.safeCharCodes.has(charCode);
2227
2227
  };
2228
- internals$32.namedHtml = new Map([
2228
+ internals$33.namedHtml = new Map([
2229
2229
  [38, "&amp;"],
2230
2230
  [60, "&lt;"],
2231
2231
  [62, "&gt;"],
@@ -2237,22 +2237,22 @@ var require_escapeHtml = __commonJSMin((exports, module) => {
2237
2237
  [169, "&copy;"],
2238
2238
  [174, "&reg;"]
2239
2239
  ]);
2240
- internals$32.safeCharCodes = function() {
2240
+ internals$33.safeCharCodes = function() {
2241
2241
  const safe = new Set();
2242
2242
  for (let i$4 = 32; i$4 < 123; ++i$4) if (i$4 >= 97 || i$4 >= 65 && i$4 <= 90 || i$4 >= 48 && i$4 <= 57 || i$4 === 32 || i$4 === 46 || i$4 === 44 || i$4 === 45 || i$4 === 58 || i$4 === 95) safe.add(i$4);
2243
2243
  return safe;
2244
2244
  }();
2245
2245
  });
2246
2246
  var require_escapeJson = __commonJSMin((exports, module) => {
2247
- const internals$31 = {};
2247
+ const internals$32 = {};
2248
2248
  module.exports = function(input) {
2249
2249
  if (!input) return "";
2250
- return input.replace(/[<>&\u2028\u2029]/g, internals$31.escape);
2250
+ return input.replace(/[<>&\u2028\u2029]/g, internals$32.escape);
2251
2251
  };
2252
- internals$31.escape = function(char) {
2253
- return internals$31.replacements.get(char);
2252
+ internals$32.escape = function(char) {
2253
+ return internals$32.replacements.get(char);
2254
2254
  };
2255
- internals$31.replacements = new Map([
2255
+ internals$32.replacements = new Map([
2256
2256
  ["<", "\\u003c"],
2257
2257
  [">", "\\u003e"],
2258
2258
  ["&", "\\u0026"],
@@ -2261,29 +2261,29 @@ var require_escapeJson = __commonJSMin((exports, module) => {
2261
2261
  ]);
2262
2262
  });
2263
2263
  var require_flatten$1 = __commonJSMin((exports, module) => {
2264
- const internals$30 = {};
2265
- module.exports = internals$30.flatten = function(array, target) {
2264
+ const internals$31 = {};
2265
+ module.exports = internals$31.flatten = function(array, target) {
2266
2266
  const result = target || [];
2267
- for (const entry of array) if (Array.isArray(entry)) internals$30.flatten(entry, result);
2267
+ for (const entry of array) if (Array.isArray(entry)) internals$31.flatten(entry, result);
2268
2268
  else result.push(entry);
2269
2269
  return result;
2270
2270
  };
2271
2271
  });
2272
2272
  var require_intersect = __commonJSMin((exports, module) => {
2273
- const internals$29 = {};
2273
+ const internals$30 = {};
2274
2274
  module.exports = function(array1, array2, options = {}) {
2275
2275
  if (!array1 || !array2) return options.first ? null : [];
2276
2276
  const common$4 = [];
2277
2277
  const hash$4 = Array.isArray(array1) ? new Set(array1) : array1;
2278
2278
  const found = new Set();
2279
- for (const value of array2) if (internals$29.has(hash$4, value) && !found.has(value)) {
2279
+ for (const value of array2) if (internals$30.has(hash$4, value) && !found.has(value)) {
2280
2280
  if (options.first) return value;
2281
2281
  common$4.push(value);
2282
2282
  found.add(value);
2283
2283
  }
2284
2284
  return options.first ? null : common$4;
2285
2285
  };
2286
- internals$29.has = function(ref, key) {
2286
+ internals$30.has = function(ref, key) {
2287
2287
  if (typeof ref.has === "function") return ref.has(key);
2288
2288
  return ref[key] !== void 0;
2289
2289
  };
@@ -2294,9 +2294,9 @@ var require_isPromise = __commonJSMin((exports, module) => {
2294
2294
  };
2295
2295
  });
2296
2296
  var require_once = __commonJSMin((exports, module) => {
2297
- const internals$28 = { wrapped: Symbol("wrapped") };
2297
+ const internals$29 = { wrapped: Symbol("wrapped") };
2298
2298
  module.exports = function(method$1) {
2299
- if (method$1[internals$28.wrapped]) return method$1;
2299
+ if (method$1[internals$29.wrapped]) return method$1;
2300
2300
  let once$4 = false;
2301
2301
  const wrappedFn = function(...args$1) {
2302
2302
  if (!once$4) {
@@ -2304,7 +2304,7 @@ var require_once = __commonJSMin((exports, module) => {
2304
2304
  method$1(...args$1);
2305
2305
  }
2306
2306
  };
2307
- wrappedFn[internals$28.wrapped] = true;
2307
+ wrappedFn[internals$29.wrapped] = true;
2308
2308
  return wrappedFn;
2309
2309
  };
2310
2310
  });
@@ -2318,7 +2318,7 @@ var require_reachTemplate = __commonJSMin((exports, module) => {
2318
2318
  };
2319
2319
  });
2320
2320
  var require_wait = __commonJSMin((exports, module) => {
2321
- const internals$27 = { maxTimer: 2 ** 31 - 1 };
2321
+ const internals$28 = { maxTimer: 2 ** 31 - 1 };
2322
2322
  module.exports = function(timeout$5, returnValue, options) {
2323
2323
  if (typeof timeout$5 === "bigint") timeout$5 = Number(timeout$5);
2324
2324
  if (timeout$5 >= Number.MAX_SAFE_INTEGER) timeout$5 = Infinity;
@@ -2326,7 +2326,7 @@ var require_wait = __commonJSMin((exports, module) => {
2326
2326
  return new Promise((resolve) => {
2327
2327
  const _setTimeout = options ? options.setTimeout : setTimeout;
2328
2328
  const activate = () => {
2329
- const time = Math.min(timeout$5, internals$27.maxTimer);
2329
+ const time = Math.min(timeout$5, internals$28.maxTimer);
2330
2330
  timeout$5 -= time;
2331
2331
  _setTimeout(() => timeout$5 > 0 ? activate() : resolve(returnValue), time);
2332
2332
  };
@@ -2433,9 +2433,9 @@ var init_package$1 = __esmMin(() => {
2433
2433
  };
2434
2434
  });
2435
2435
  var require_cache = __commonJSMin((exports) => {
2436
- const { assert: assert$52, clone: clone$19 } = require_lib$4();
2437
- const Common$24 = require_common$3();
2438
- const internals$26 = {
2436
+ const { assert: assert$53, clone: clone$20 } = require_lib$4();
2437
+ const Common$25 = require_common$3();
2438
+ const internals$27 = {
2439
2439
  max: 1e3,
2440
2440
  supported: new Set([
2441
2441
  "undefined",
@@ -2445,21 +2445,21 @@ var require_cache = __commonJSMin((exports) => {
2445
2445
  ])
2446
2446
  };
2447
2447
  exports.provider = { provision(options) {
2448
- return new internals$26.Cache(options);
2448
+ return new internals$27.Cache(options);
2449
2449
  } };
2450
- internals$26.Cache = class {
2450
+ internals$27.Cache = class {
2451
2451
  constructor(options = {}) {
2452
- Common$24.assertOptions(options, ["max"]);
2453
- assert$52(options.max === void 0 || options.max && options.max > 0 && isFinite(options.max), "Invalid max cache size");
2454
- this._max = options.max || internals$26.max;
2452
+ Common$25.assertOptions(options, ["max"]);
2453
+ assert$53(options.max === void 0 || options.max && options.max > 0 && isFinite(options.max), "Invalid max cache size");
2454
+ this._max = options.max || internals$27.max;
2455
2455
  this._map = new Map();
2456
- this._list = new internals$26.List();
2456
+ this._list = new internals$27.List();
2457
2457
  }
2458
2458
  get length() {
2459
2459
  return this._map.size;
2460
2460
  }
2461
2461
  set(key, value) {
2462
- if (key !== null && !internals$26.supported.has(typeof key)) return;
2462
+ if (key !== null && !internals$27.supported.has(typeof key)) return;
2463
2463
  let node = this._map.get(key);
2464
2464
  if (node) {
2465
2465
  node.value = value;
@@ -2477,7 +2477,7 @@ var require_cache = __commonJSMin((exports) => {
2477
2477
  const node = this._map.get(key);
2478
2478
  if (node) {
2479
2479
  this._list.first(node);
2480
- return clone$19(node.value);
2480
+ return clone$20(node.value);
2481
2481
  }
2482
2482
  }
2483
2483
  _compact() {
@@ -2487,7 +2487,7 @@ var require_cache = __commonJSMin((exports) => {
2487
2487
  }
2488
2488
  }
2489
2489
  };
2490
- internals$26.List = class {
2490
+ internals$27.List = class {
2491
2491
  constructor() {
2492
2492
  this.tail = null;
2493
2493
  this.head = null;
@@ -2520,7 +2520,7 @@ var require_cache = __commonJSMin((exports) => {
2520
2520
  };
2521
2521
  });
2522
2522
  var require_lib$3 = __commonJSMin((exports) => {
2523
- const internals$25 = {
2523
+ const internals$26 = {
2524
2524
  operators: [
2525
2525
  "!",
2526
2526
  "^",
@@ -2586,7 +2586,7 @@ var require_lib$3 = __commonJSMin((exports) => {
2586
2586
  };
2587
2587
  exports.Parser = class {
2588
2588
  constructor(string, options = {}) {
2589
- if (!options[internals$25.settings] && options.constants) for (const constant$3 in options.constants) {
2589
+ if (!options[internals$26.settings] && options.constants) for (const constant$3 in options.constants) {
2590
2590
  const value = options.constants[constant$3];
2591
2591
  if (value !== null && ![
2592
2592
  "boolean",
@@ -2594,8 +2594,8 @@ var require_lib$3 = __commonJSMin((exports) => {
2594
2594
  "string"
2595
2595
  ].includes(typeof value)) throw new Error(`Formula constant ${constant$3} contains invalid ${typeof value} value type`);
2596
2596
  }
2597
- this.settings = options[internals$25.settings] ? options : Object.assign({
2598
- [internals$25.settings]: true,
2597
+ this.settings = options[internals$26.settings] ? options : Object.assign({
2598
+ [internals$26.settings]: true,
2599
2599
  constants: {},
2600
2600
  functions: {}
2601
2601
  }, options);
@@ -2637,12 +2637,12 @@ var require_lib$3 = __commonJSMin((exports) => {
2637
2637
  type: "literal",
2638
2638
  value: current
2639
2639
  });
2640
- } else if (internals$25.operatorCharacters.includes(current)) if (last$2 && last$2.type === "operator" && internals$25.operators.includes(last$2.value + current)) last$2.value += current;
2640
+ } else if (internals$26.operatorCharacters.includes(current)) if (last$2 && last$2.type === "operator" && internals$26.operators.includes(last$2.value + current)) last$2.value += current;
2641
2641
  else parts.push({
2642
2642
  type: "operator",
2643
2643
  value: current
2644
2644
  });
2645
- else if (current.match(internals$25.numberRx)) parts.push({
2645
+ else if (current.match(internals$26.numberRx)) parts.push({
2646
2646
  type: "constant",
2647
2647
  value: parseFloat(current)
2648
2648
  });
@@ -2651,7 +2651,7 @@ var require_lib$3 = __commonJSMin((exports) => {
2651
2651
  value: this.settings.constants[current]
2652
2652
  });
2653
2653
  else {
2654
- if (!current.match(internals$25.tokenRx)) throw new Error(`Formula contains invalid token: ${current}`);
2654
+ if (!current.match(internals$26.tokenRx)) throw new Error(`Formula contains invalid token: ${current}`);
2655
2655
  parts.push({
2656
2656
  type: "reference",
2657
2657
  value: current
@@ -2671,11 +2671,11 @@ var require_lib$3 = __commonJSMin((exports) => {
2671
2671
  if (!parenthesis) flush(c$1);
2672
2672
  else current += c$1;
2673
2673
  } else current += c$1;
2674
- else if (c$1 in internals$25.literals) literal = internals$25.literals[c$1];
2674
+ else if (c$1 in internals$26.literals) literal = internals$26.literals[c$1];
2675
2675
  else if (c$1 === "(") {
2676
2676
  flush();
2677
2677
  ++parenthesis;
2678
- } else if (internals$25.operatorCharacters.includes(c$1)) {
2678
+ } else if (internals$26.operatorCharacters.includes(c$1)) {
2679
2679
  flush();
2680
2680
  current = c$1;
2681
2681
  flush();
@@ -2692,9 +2692,9 @@ var require_lib$3 = __commonJSMin((exports) => {
2692
2692
  let operator$1 = false;
2693
2693
  for (const part of parts) {
2694
2694
  if (part.type === "operator") {
2695
- if (internals$25.operatorsPrefix.includes(part.value)) continue;
2695
+ if (internals$26.operatorsPrefix.includes(part.value)) continue;
2696
2696
  if (!operator$1) throw new Error("Formula contains an operator in invalid position");
2697
- if (!internals$25.operators.includes(part.value)) throw new Error(`Formula contains an unknown operator ${part.value}`);
2697
+ if (!internals$26.operators.includes(part.value)) throw new Error(`Formula contains an unknown operator ${part.value}`);
2698
2698
  } else if (operator$1) throw new Error("Formula missing expected operator");
2699
2699
  operator$1 = !operator$1;
2700
2700
  }
@@ -2708,11 +2708,11 @@ var require_lib$3 = __commonJSMin((exports) => {
2708
2708
  value: parts[0].value
2709
2709
  };
2710
2710
  this._parts = parts.map((part) => {
2711
- if (part.type === "operator") return internals$25.operatorsPrefix.includes(part.value) ? part : part.value;
2711
+ if (part.type === "operator") return internals$26.operatorsPrefix.includes(part.value) ? part : part.value;
2712
2712
  if (part.type !== "reference") return part.value;
2713
2713
  if (this.settings.tokenRx && !this.settings.tokenRx.test(part.value)) throw new Error(`Formula contains invalid reference ${part.value}`);
2714
2714
  if (this.settings.reference) return this.settings.reference(part.value);
2715
- return internals$25.reference(part.value);
2715
+ return internals$26.reference(part.value);
2716
2716
  });
2717
2717
  }
2718
2718
  _subFormula(string, name$2) {
@@ -2733,9 +2733,9 @@ var require_lib$3 = __commonJSMin((exports) => {
2733
2733
  if (literal) {
2734
2734
  current += c$1;
2735
2735
  if (c$1 === literal) literal = false;
2736
- } else if (c$1 in internals$25.literals && !parenthesis) {
2736
+ } else if (c$1 in internals$26.literals && !parenthesis) {
2737
2737
  current += c$1;
2738
- literal = internals$25.literals[c$1];
2738
+ literal = internals$26.literals[c$1];
2739
2739
  } else if (c$1 === "," && !parenthesis) flush();
2740
2740
  else {
2741
2741
  current += c$1;
@@ -2759,47 +2759,47 @@ var require_lib$3 = __commonJSMin((exports) => {
2759
2759
  if (part && part.type === "operator") {
2760
2760
  const current = parts[i$4 + 1];
2761
2761
  parts.splice(i$4 + 1, 1);
2762
- const value = internals$25.evaluate(current, context);
2763
- parts[i$4] = internals$25.single(part.value, value);
2762
+ const value = internals$26.evaluate(current, context);
2763
+ parts[i$4] = internals$26.single(part.value, value);
2764
2764
  }
2765
2765
  }
2766
- internals$25.operatorsOrder.forEach((set) => {
2766
+ internals$26.operatorsOrder.forEach((set) => {
2767
2767
  for (let i$4 = 1; i$4 < parts.length - 1;) if (set.includes(parts[i$4])) {
2768
2768
  const operator$1 = parts[i$4];
2769
- const left = internals$25.evaluate(parts[i$4 - 1], context);
2770
- const right = internals$25.evaluate(parts[i$4 + 1], context);
2769
+ const left = internals$26.evaluate(parts[i$4 - 1], context);
2770
+ const right = internals$26.evaluate(parts[i$4 + 1], context);
2771
2771
  parts.splice(i$4, 2);
2772
- const result = internals$25.calculate(operator$1, left, right);
2772
+ const result = internals$26.calculate(operator$1, left, right);
2773
2773
  parts[i$4 - 1] = result === 0 ? 0 : result;
2774
2774
  } else i$4 += 2;
2775
2775
  });
2776
- return internals$25.evaluate(parts[0], context);
2776
+ return internals$26.evaluate(parts[0], context);
2777
2777
  }
2778
2778
  };
2779
- exports.Parser.prototype[internals$25.symbol] = true;
2780
- internals$25.reference = function(name$2) {
2779
+ exports.Parser.prototype[internals$26.symbol] = true;
2780
+ internals$26.reference = function(name$2) {
2781
2781
  return function(context) {
2782
2782
  return context && context[name$2] !== void 0 ? context[name$2] : null;
2783
2783
  };
2784
2784
  };
2785
- internals$25.evaluate = function(part, context) {
2785
+ internals$26.evaluate = function(part, context) {
2786
2786
  if (part === null) return null;
2787
2787
  if (typeof part === "function") return part(context);
2788
- if (part[internals$25.symbol]) return part.evaluate(context);
2788
+ if (part[internals$26.symbol]) return part.evaluate(context);
2789
2789
  return part;
2790
2790
  };
2791
- internals$25.single = function(operator$1, value) {
2791
+ internals$26.single = function(operator$1, value) {
2792
2792
  if (operator$1 === "!") return value ? false : true;
2793
2793
  const negative = -value;
2794
2794
  if (negative === 0) return 0;
2795
2795
  return negative;
2796
2796
  };
2797
- internals$25.calculate = function(operator$1, left, right) {
2798
- if (operator$1 === "??") return internals$25.exists(left) ? left : right;
2797
+ internals$26.calculate = function(operator$1, left, right) {
2798
+ if (operator$1 === "??") return internals$26.exists(left) ? left : right;
2799
2799
  if (typeof left === "string" || typeof right === "string") {
2800
2800
  if (operator$1 === "+") {
2801
- left = internals$25.exists(left) ? left : "";
2802
- right = internals$25.exists(right) ? right : "";
2801
+ left = internals$26.exists(left) ? left : "";
2802
+ right = internals$26.exists(right) ? right : "";
2803
2803
  return left + right;
2804
2804
  }
2805
2805
  } else switch (operator$1) {
@@ -2822,17 +2822,17 @@ var require_lib$3 = __commonJSMin((exports) => {
2822
2822
  }
2823
2823
  return null;
2824
2824
  };
2825
- internals$25.exists = function(value) {
2825
+ internals$26.exists = function(value) {
2826
2826
  return value !== null && value !== void 0;
2827
2827
  };
2828
2828
  });
2829
2829
  var require_template = __commonJSMin((exports, module) => {
2830
- const { assert: assert$51, clone: clone$18, escapeHtml: escapeHtml$1 } = require_lib$4();
2830
+ const { assert: assert$52, clone: clone$19, escapeHtml: escapeHtml$1 } = require_lib$4();
2831
2831
  const Formula = require_lib$3();
2832
- const Common$23 = require_common$3();
2832
+ const Common$24 = require_common$3();
2833
2833
  const Errors$8 = require_errors$2();
2834
- const Ref$11 = require_ref$2();
2835
- const internals$24 = {
2834
+ const Ref$12 = require_ref$2();
2835
+ const internals$25 = {
2836
2836
  symbol: Symbol("template"),
2837
2837
  opens: new Array(1e3).join("\0"),
2838
2838
  closes: new Array(1e3).join(""),
@@ -2844,20 +2844,20 @@ var require_template = __commonJSMin((exports, module) => {
2844
2844
  utc: Date.prototype.toUTCString
2845
2845
  }
2846
2846
  };
2847
- module.exports = exports = internals$24.Template = class {
2847
+ module.exports = exports = internals$25.Template = class {
2848
2848
  constructor(source, options) {
2849
- assert$51(typeof source === "string", "Template source must be a string");
2850
- assert$51(!source.includes("\0") && !source.includes(""), "Template source cannot contain reserved control characters");
2849
+ assert$52(typeof source === "string", "Template source must be a string");
2850
+ assert$52(!source.includes("\0") && !source.includes(""), "Template source cannot contain reserved control characters");
2851
2851
  this.source = source;
2852
2852
  this.rendered = source;
2853
2853
  this._template = null;
2854
2854
  if (options) {
2855
2855
  const { functions,...opts } = options;
2856
- this._settings = Object.keys(opts).length ? clone$18(opts) : void 0;
2856
+ this._settings = Object.keys(opts).length ? clone$19(opts) : void 0;
2857
2857
  this._functions = functions;
2858
2858
  if (this._functions) {
2859
- assert$51(Object.keys(this._functions).every((key) => typeof key === "string"), "Functions keys must be strings");
2860
- assert$51(Object.values(this._functions).every((key) => typeof key === "function"), "Functions values must be functions");
2859
+ assert$52(Object.keys(this._functions).every((key) => typeof key === "string"), "Functions keys must be strings");
2860
+ assert$52(Object.values(this._functions).every((key) => typeof key === "function"), "Functions values must be functions");
2861
2861
  }
2862
2862
  } else {
2863
2863
  this._settings = void 0;
@@ -2867,8 +2867,8 @@ var require_template = __commonJSMin((exports, module) => {
2867
2867
  }
2868
2868
  _parse() {
2869
2869
  if (!this.source.includes("{")) return;
2870
- const encoded = internals$24.encode(this.source);
2871
- const parts = internals$24.split(encoded);
2870
+ const encoded = internals$25.encode(this.source);
2871
+ const parts = internals$25.split(encoded);
2872
2872
  let refs = false;
2873
2873
  const processed = [];
2874
2874
  const head$1 = parts.shift();
@@ -2878,20 +2878,20 @@ var require_template = __commonJSMin((exports, module) => {
2878
2878
  const ender = raw ? "}" : "}}";
2879
2879
  const end = part.indexOf(ender);
2880
2880
  if (end === -1 || part[1] === "{") {
2881
- processed.push(`{${internals$24.decode(part)}`);
2881
+ processed.push(`{${internals$25.decode(part)}`);
2882
2882
  continue;
2883
2883
  }
2884
2884
  let variable = part.slice(raw ? 0 : 1, end);
2885
2885
  const wrapped = variable[0] === ":";
2886
2886
  if (wrapped) variable = variable.slice(1);
2887
- const dynamic = this._ref(internals$24.decode(variable), {
2887
+ const dynamic = this._ref(internals$25.decode(variable), {
2888
2888
  raw,
2889
2889
  wrapped
2890
2890
  });
2891
2891
  processed.push(dynamic);
2892
2892
  if (typeof dynamic !== "string") refs = true;
2893
2893
  const rest = part.slice(end + ender.length);
2894
- if (rest) processed.push(internals$24.decode(rest));
2894
+ if (rest) processed.push(internals$25.decode(rest));
2895
2895
  }
2896
2896
  if (!refs) {
2897
2897
  this.rendered = processed.join("");
@@ -2900,7 +2900,7 @@ var require_template = __commonJSMin((exports, module) => {
2900
2900
  this._template = processed;
2901
2901
  }
2902
2902
  static date(date, prefs) {
2903
- return internals$24.dateFormat[prefs.dateFormat].call(date);
2903
+ return internals$25.dateFormat[prefs.dateFormat].call(date);
2904
2904
  }
2905
2905
  describe(options = {}) {
2906
2906
  if (!this._settings && options.compact) return this.source;
@@ -2910,7 +2910,7 @@ var require_template = __commonJSMin((exports, module) => {
2910
2910
  return desc$1;
2911
2911
  }
2912
2912
  static build(desc$1) {
2913
- return new internals$24.Template(desc$1.template, desc$1.options || desc$1.functions ? {
2913
+ return new internals$25.Template(desc$1.template, desc$1.options || desc$1.functions ? {
2914
2914
  ...desc$1.options,
2915
2915
  functions: desc$1.functions
2916
2916
  } : void 0);
@@ -2919,7 +2919,7 @@ var require_template = __commonJSMin((exports, module) => {
2919
2919
  return !!this._template;
2920
2920
  }
2921
2921
  static isTemplate(template) {
2922
- return template ? !!template[Common$23.symbols.template] : false;
2922
+ return template ? !!template[Common$24.symbols.template] : false;
2923
2923
  }
2924
2924
  refs() {
2925
2925
  if (!this._template) return;
@@ -2941,10 +2941,10 @@ var require_template = __commonJSMin((exports, module) => {
2941
2941
  for (const part of this._template) if (typeof part === "string") parts.push(part);
2942
2942
  else {
2943
2943
  const rendered = this._part(part, value, state, prefs, local, options);
2944
- const string = internals$24.stringify(rendered, value, state, prefs, local, options);
2944
+ const string = internals$25.stringify(rendered, value, state, prefs, local, options);
2945
2945
  if (string !== void 0) {
2946
2946
  const result = part.raw || (options.errors && options.errors.escapeHtml) === false ? string : escapeHtml$1(string);
2947
- parts.push(internals$24.wrap(result, part.wrapped && prefs.errors.wrap.label));
2947
+ parts.push(internals$25.wrap(result, part.wrapped && prefs.errors.wrap.label));
2948
2948
  }
2949
2949
  }
2950
2950
  return parts.join("");
@@ -2952,7 +2952,7 @@ var require_template = __commonJSMin((exports, module) => {
2952
2952
  _ref(content, { raw, wrapped }) {
2953
2953
  const refs = [];
2954
2954
  const reference = (variable) => {
2955
- const ref = Ref$11.create(variable, this._settings);
2955
+ const ref = Ref$12.create(variable, this._settings);
2956
2956
  refs.push(ref);
2957
2957
  return (context) => {
2958
2958
  const resolved = ref.resolve(...context);
@@ -2961,13 +2961,13 @@ var require_template = __commonJSMin((exports, module) => {
2961
2961
  };
2962
2962
  try {
2963
2963
  const functions = this._functions ? {
2964
- ...internals$24.functions,
2964
+ ...internals$25.functions,
2965
2965
  ...this._functions
2966
- } : internals$24.functions;
2966
+ } : internals$25.functions;
2967
2967
  var formula = new Formula.Parser(content, {
2968
2968
  reference,
2969
2969
  functions,
2970
- constants: internals$24.constants
2970
+ constants: internals$25.constants
2971
2971
  });
2972
2972
  } catch (err$1) {
2973
2973
  err$1.message = `Invalid template variable "${content}" fails due to: ${err$1.message}`;
@@ -2983,7 +2983,7 @@ var require_template = __commonJSMin((exports, module) => {
2983
2983
  wrapped: wrapped || ref.type === "local" && ref.key === "label"
2984
2984
  };
2985
2985
  }
2986
- return internals$24.stringify(formula.single.value);
2986
+ return internals$25.stringify(formula.single.value);
2987
2987
  }
2988
2988
  return {
2989
2989
  formula,
@@ -2995,19 +2995,19 @@ var require_template = __commonJSMin((exports, module) => {
2995
2995
  return this.source;
2996
2996
  }
2997
2997
  };
2998
- internals$24.Template.prototype[Common$23.symbols.template] = true;
2999
- internals$24.Template.prototype.isImmutable = true;
3000
- internals$24.encode = function(string) {
2998
+ internals$25.Template.prototype[Common$24.symbols.template] = true;
2999
+ internals$25.Template.prototype.isImmutable = true;
3000
+ internals$25.encode = function(string) {
3001
3001
  return string.replace(/\\(\{+)/g, ($0, $1) => {
3002
- return internals$24.opens.slice(0, $1.length);
3002
+ return internals$25.opens.slice(0, $1.length);
3003
3003
  }).replace(/\\(\}+)/g, ($0, $1) => {
3004
- return internals$24.closes.slice(0, $1.length);
3004
+ return internals$25.closes.slice(0, $1.length);
3005
3005
  });
3006
3006
  };
3007
- internals$24.decode = function(string) {
3007
+ internals$25.decode = function(string) {
3008
3008
  return string.replace(/\u0000/g, "{").replace(/\u0001/g, "}");
3009
3009
  };
3010
- internals$24.split = function(string) {
3010
+ internals$25.split = function(string) {
3011
3011
  const parts = [];
3012
3012
  let current = "";
3013
3013
  for (let i$4 = 0; i$4 < string.length; ++i$4) {
@@ -3025,16 +3025,16 @@ var require_template = __commonJSMin((exports, module) => {
3025
3025
  parts.push(current);
3026
3026
  return parts;
3027
3027
  };
3028
- internals$24.wrap = function(value, ends) {
3028
+ internals$25.wrap = function(value, ends) {
3029
3029
  if (!ends) return value;
3030
3030
  if (ends.length === 1) return `${ends}${value}${ends}`;
3031
3031
  return `${ends[0]}${value}${ends[1]}`;
3032
3032
  };
3033
- internals$24.stringify = function(value, original, state, prefs, local, options = {}) {
3033
+ internals$25.stringify = function(value, original, state, prefs, local, options = {}) {
3034
3034
  const type = typeof value;
3035
3035
  const wrap$2 = prefs && prefs.errors && prefs.errors.wrap || {};
3036
3036
  let skipWrap = false;
3037
- if (Ref$11.isRef(value) && value.render) {
3037
+ if (Ref$12.isRef(value) && value.render) {
3038
3038
  skipWrap = value.in;
3039
3039
  value = value.resolve(original, state, prefs, local, {
3040
3040
  in: value.in,
@@ -3042,10 +3042,10 @@ var require_template = __commonJSMin((exports, module) => {
3042
3042
  });
3043
3043
  }
3044
3044
  if (value === null) return "null";
3045
- if (type === "string") return internals$24.wrap(value, options.arrayItems && wrap$2.string);
3045
+ if (type === "string") return internals$25.wrap(value, options.arrayItems && wrap$2.string);
3046
3046
  if (type === "number" || type === "function" || type === "symbol") return value.toString();
3047
3047
  if (type !== "object") return JSON.stringify(value);
3048
- if (value instanceof Date) return internals$24.Template.date(value, prefs);
3048
+ if (value instanceof Date) return internals$25.Template.date(value, prefs);
3049
3049
  if (value instanceof Map) {
3050
3050
  const pairs = [];
3051
3051
  for (const [key, sym] of value.entries()) pairs.push(`${key.toString()} -> ${sym.toString()}`);
@@ -3053,13 +3053,13 @@ var require_template = __commonJSMin((exports, module) => {
3053
3053
  }
3054
3054
  if (!Array.isArray(value)) return value.toString();
3055
3055
  const values$3 = [];
3056
- for (const item of value) values$3.push(internals$24.stringify(item, original, state, prefs, local, {
3056
+ for (const item of value) values$3.push(internals$25.stringify(item, original, state, prefs, local, {
3057
3057
  arrayItems: true,
3058
3058
  ...options
3059
3059
  }));
3060
- return internals$24.wrap(values$3.join(", "), !skipWrap && wrap$2.array);
3060
+ return internals$25.wrap(values$3.join(", "), !skipWrap && wrap$2.array);
3061
3061
  };
3062
- internals$24.constants = {
3062
+ internals$25.constants = {
3063
3063
  true: true,
3064
3064
  false: false,
3065
3065
  null: null,
@@ -3068,7 +3068,7 @@ var require_template = __commonJSMin((exports, module) => {
3068
3068
  hour: 60 * 60 * 1e3,
3069
3069
  day: 24 * 60 * 60 * 1e3
3070
3070
  };
3071
- internals$24.functions = {
3071
+ internals$25.functions = {
3072
3072
  if(condition, then, otherwise) {
3073
3073
  return condition ? then : otherwise;
3074
3074
  },
@@ -3096,10 +3096,10 @@ var require_template = __commonJSMin((exports, module) => {
3096
3096
  };
3097
3097
  });
3098
3098
  var require_ref$2 = __commonJSMin((exports) => {
3099
- const { assert: assert$50, clone: clone$17, reach: reach$4 } = require_lib$4();
3100
- const Common$22 = require_common$3();
3101
- let Template$7;
3102
- const internals$23 = {
3099
+ const { assert: assert$51, clone: clone$18, reach: reach$4 } = require_lib$4();
3100
+ const Common$23 = require_common$3();
3101
+ let Template$8;
3102
+ const internals$24 = {
3103
3103
  symbol: Symbol("ref"),
3104
3104
  defaults: {
3105
3105
  adjust: null,
@@ -3111,8 +3111,8 @@ var require_ref$2 = __commonJSMin((exports) => {
3111
3111
  }
3112
3112
  };
3113
3113
  exports.create = function(key, options = {}) {
3114
- assert$50(typeof key === "string", "Invalid reference key:", key);
3115
- Common$22.assertOptions(options, [
3114
+ assert$51(typeof key === "string", "Invalid reference key:", key);
3115
+ Common$23.assertOptions(options, [
3116
3116
  "adjust",
3117
3117
  "ancestor",
3118
3118
  "in",
@@ -3122,25 +3122,25 @@ var require_ref$2 = __commonJSMin((exports) => {
3122
3122
  "render",
3123
3123
  "separator"
3124
3124
  ]);
3125
- assert$50(!options.prefix || typeof options.prefix === "object", "options.prefix must be of type object");
3126
- const ref = Object.assign({}, internals$23.defaults, options);
3125
+ assert$51(!options.prefix || typeof options.prefix === "object", "options.prefix must be of type object");
3126
+ const ref = Object.assign({}, internals$24.defaults, options);
3127
3127
  delete ref.prefix;
3128
3128
  const separator = ref.separator;
3129
- const context = internals$23.context(key, separator, options.prefix);
3129
+ const context = internals$24.context(key, separator, options.prefix);
3130
3130
  ref.type = context.type;
3131
3131
  key = context.key;
3132
3132
  if (ref.type === "value") {
3133
3133
  if (context.root) {
3134
- assert$50(!separator || key[0] !== separator, "Cannot specify relative path with root prefix");
3134
+ assert$51(!separator || key[0] !== separator, "Cannot specify relative path with root prefix");
3135
3135
  ref.ancestor = "root";
3136
3136
  if (!key) key = null;
3137
3137
  }
3138
3138
  if (separator && separator === key) {
3139
3139
  key = null;
3140
3140
  ref.ancestor = 0;
3141
- } else if (ref.ancestor !== void 0) assert$50(!separator || !key || key[0] !== separator, "Cannot combine prefix with ancestor option");
3141
+ } else if (ref.ancestor !== void 0) assert$51(!separator || !key || key[0] !== separator, "Cannot combine prefix with ancestor option");
3142
3142
  else {
3143
- const [ancestor, slice$1] = internals$23.ancestor(key, separator);
3143
+ const [ancestor, slice$1] = internals$24.ancestor(key, separator);
3144
3144
  if (slice$1) {
3145
3145
  key = key.slice(slice$1);
3146
3146
  if (key === "") key = null;
@@ -3149,7 +3149,7 @@ var require_ref$2 = __commonJSMin((exports) => {
3149
3149
  }
3150
3150
  }
3151
3151
  ref.path = separator ? key === null ? [] : key.split(separator) : [key];
3152
- return new internals$23.Ref(ref);
3152
+ return new internals$24.Ref(ref);
3153
3153
  };
3154
3154
  exports.in = function(key, options = {}) {
3155
3155
  return exports.create(key, {
@@ -3158,12 +3158,12 @@ var require_ref$2 = __commonJSMin((exports) => {
3158
3158
  });
3159
3159
  };
3160
3160
  exports.isRef = function(ref) {
3161
- return ref ? !!ref[Common$22.symbols.ref] : false;
3161
+ return ref ? !!ref[Common$23.symbols.ref] : false;
3162
3162
  };
3163
- internals$23.Ref = class {
3163
+ internals$24.Ref = class {
3164
3164
  constructor(options) {
3165
- assert$50(typeof options === "object", "Invalid reference construction");
3166
- Common$22.assertOptions(options, [
3165
+ assert$51(typeof options === "object", "Invalid reference construction");
3166
+ Common$23.assertOptions(options, [
3167
3167
  "adjust",
3168
3168
  "ancestor",
3169
3169
  "in",
@@ -3178,12 +3178,12 @@ var require_ref$2 = __commonJSMin((exports) => {
3178
3178
  "root",
3179
3179
  "display"
3180
3180
  ]);
3181
- assert$50([false, void 0].includes(options.separator) || typeof options.separator === "string" && options.separator.length === 1, "Invalid separator");
3182
- assert$50(!options.adjust || typeof options.adjust === "function", "options.adjust must be a function");
3183
- assert$50(!options.map || Array.isArray(options.map), "options.map must be an array");
3184
- assert$50(!options.map || !options.adjust, "Cannot set both map and adjust options");
3185
- Object.assign(this, internals$23.defaults, options);
3186
- assert$50(this.type === "value" || this.ancestor === void 0, "Non-value references cannot reference ancestors");
3181
+ assert$51([false, void 0].includes(options.separator) || typeof options.separator === "string" && options.separator.length === 1, "Invalid separator");
3182
+ assert$51(!options.adjust || typeof options.adjust === "function", "options.adjust must be a function");
3183
+ assert$51(!options.map || Array.isArray(options.map), "options.map must be an array");
3184
+ assert$51(!options.map || !options.adjust, "Cannot set both map and adjust options");
3185
+ Object.assign(this, internals$24.defaults, options);
3186
+ assert$51(this.type === "value" || this.ancestor === void 0, "Non-value references cannot reference ancestors");
3187
3187
  if (Array.isArray(this.map)) this.map = new Map(this.map);
3188
3188
  this.depth = this.path.length;
3189
3189
  this.key = this.path.length ? this.path.join(this.separator) : null;
@@ -3191,12 +3191,12 @@ var require_ref$2 = __commonJSMin((exports) => {
3191
3191
  this.updateDisplay();
3192
3192
  }
3193
3193
  resolve(value, state, prefs, local, options = {}) {
3194
- assert$50(!this.in || options.in, "Invalid in() reference usage");
3194
+ assert$51(!this.in || options.in, "Invalid in() reference usage");
3195
3195
  if (this.type === "global") return this._resolve(prefs.context, state, options);
3196
3196
  if (this.type === "local") return this._resolve(local, state, options);
3197
3197
  if (!this.ancestor) return this._resolve(value, state, options);
3198
3198
  if (this.ancestor === "root") return this._resolve(state.ancestors[state.ancestors.length - 1], state, options);
3199
- assert$50(this.ancestor <= state.ancestors.length, "Invalid reference exceeds the schema root:", this.display);
3199
+ assert$51(this.ancestor <= state.ancestors.length, "Invalid reference exceeds the schema root:", this.display);
3200
3200
  return this._resolve(state.ancestors[this.ancestor - 1], state, options);
3201
3201
  }
3202
3202
  _resolve(target, state, options) {
@@ -3221,7 +3221,7 @@ var require_ref$2 = __commonJSMin((exports) => {
3221
3221
  return [...state.path.slice(0, -this.ancestor), ...this.path];
3222
3222
  }
3223
3223
  clone() {
3224
- return new internals$23.Ref(this);
3224
+ return new internals$24.Ref(this);
3225
3225
  }
3226
3226
  describe() {
3227
3227
  const ref = { path: this.path };
@@ -3263,13 +3263,13 @@ var require_ref$2 = __commonJSMin((exports) => {
3263
3263
  this.display = `ref:${lead}${key || ""}`;
3264
3264
  }
3265
3265
  };
3266
- internals$23.Ref.prototype[Common$22.symbols.ref] = true;
3266
+ internals$24.Ref.prototype[Common$23.symbols.ref] = true;
3267
3267
  exports.build = function(desc$1) {
3268
- desc$1 = Object.assign({}, internals$23.defaults, desc$1);
3268
+ desc$1 = Object.assign({}, internals$24.defaults, desc$1);
3269
3269
  if (desc$1.type === "value" && desc$1.ancestor === void 0) desc$1.ancestor = 1;
3270
- return new internals$23.Ref(desc$1);
3270
+ return new internals$24.Ref(desc$1);
3271
3271
  };
3272
- internals$23.context = function(key, separator, prefix = {}) {
3272
+ internals$24.context = function(key, separator, prefix = {}) {
3273
3273
  key = key.trim();
3274
3274
  if (prefix) {
3275
3275
  const globalp = prefix.global === void 0 ? "$" : prefix.global;
@@ -3294,7 +3294,7 @@ var require_ref$2 = __commonJSMin((exports) => {
3294
3294
  type: "value"
3295
3295
  };
3296
3296
  };
3297
- internals$23.ancestor = function(key, separator) {
3297
+ internals$24.ancestor = function(key, separator) {
3298
3298
  if (!separator) return [1, 0];
3299
3299
  if (key[0] !== separator) return [1, 0];
3300
3300
  if (key[1] !== separator) return [0, 1];
@@ -3315,7 +3315,7 @@ var require_ref$2 = __commonJSMin((exports) => {
3315
3315
  for (const ref of source) this.register(ref, target);
3316
3316
  return;
3317
3317
  }
3318
- if (Common$22.isSchema(source)) {
3318
+ if (Common$23.isSchema(source)) {
3319
3319
  for (const item of source._refs.refs) if (item.ancestor - target >= 0) this.refs.push({
3320
3320
  ancestor: item.ancestor - target,
3321
3321
  root: item.root
@@ -3326,15 +3326,15 @@ var require_ref$2 = __commonJSMin((exports) => {
3326
3326
  ancestor: source.ancestor - target,
3327
3327
  root: source.root
3328
3328
  });
3329
- Template$7 = Template$7 || require_template();
3330
- if (Template$7.isTemplate(source)) this.register(source.refs(), target);
3329
+ Template$8 = Template$8 || require_template();
3330
+ if (Template$8.isTemplate(source)) this.register(source.refs(), target);
3331
3331
  }
3332
3332
  get length() {
3333
3333
  return this.refs.length;
3334
3334
  }
3335
3335
  clone() {
3336
3336
  const copy = new exports.Manager();
3337
- copy.refs = clone$17(this.refs);
3337
+ copy.refs = clone$18(this.refs);
3338
3338
  return copy;
3339
3339
  }
3340
3340
  reset() {
@@ -3346,80 +3346,80 @@ var require_ref$2 = __commonJSMin((exports) => {
3346
3346
  };
3347
3347
  });
3348
3348
  var require_compile = __commonJSMin((exports) => {
3349
- const { assert: assert$49 } = require_lib$4();
3350
- const Common$21 = require_common$3();
3351
- const Ref$10 = require_ref$2();
3352
- const internals$22 = {};
3349
+ const { assert: assert$50 } = require_lib$4();
3350
+ const Common$22 = require_common$3();
3351
+ const Ref$11 = require_ref$2();
3352
+ const internals$23 = {};
3353
3353
  exports.schema = function(Joi$2, config, options = {}) {
3354
- Common$21.assertOptions(options, ["appendPath", "override"]);
3354
+ Common$22.assertOptions(options, ["appendPath", "override"]);
3355
3355
  try {
3356
- return internals$22.schema(Joi$2, config, options);
3356
+ return internals$23.schema(Joi$2, config, options);
3357
3357
  } catch (err$1) {
3358
3358
  if (options.appendPath && err$1.path !== void 0) err$1.message = `${err$1.message} (${err$1.path})`;
3359
3359
  throw err$1;
3360
3360
  }
3361
3361
  };
3362
- internals$22.schema = function(Joi$2, config, options) {
3363
- assert$49(config !== void 0, "Invalid undefined schema");
3362
+ internals$23.schema = function(Joi$2, config, options) {
3363
+ assert$50(config !== void 0, "Invalid undefined schema");
3364
3364
  if (Array.isArray(config)) {
3365
- assert$49(config.length, "Invalid empty array schema");
3365
+ assert$50(config.length, "Invalid empty array schema");
3366
3366
  if (config.length === 1) config = config[0];
3367
3367
  }
3368
3368
  const valid$2 = (base$3, ...values$3) => {
3369
3369
  if (options.override !== false) return base$3.valid(Joi$2.override, ...values$3);
3370
3370
  return base$3.valid(...values$3);
3371
3371
  };
3372
- if (internals$22.simple(config)) return valid$2(Joi$2, config);
3372
+ if (internals$23.simple(config)) return valid$2(Joi$2, config);
3373
3373
  if (typeof config === "function") return Joi$2.custom(config);
3374
- assert$49(typeof config === "object", "Invalid schema content:", typeof config);
3375
- if (Common$21.isResolvable(config)) return valid$2(Joi$2, config);
3376
- if (Common$21.isSchema(config)) return config;
3374
+ assert$50(typeof config === "object", "Invalid schema content:", typeof config);
3375
+ if (Common$22.isResolvable(config)) return valid$2(Joi$2, config);
3376
+ if (Common$22.isSchema(config)) return config;
3377
3377
  if (Array.isArray(config)) {
3378
- for (const item of config) if (!internals$22.simple(item)) return Joi$2.alternatives().try(...config);
3378
+ for (const item of config) if (!internals$23.simple(item)) return Joi$2.alternatives().try(...config);
3379
3379
  return valid$2(Joi$2, ...config);
3380
3380
  }
3381
3381
  if (config instanceof RegExp) return Joi$2.string().regex(config);
3382
3382
  if (config instanceof Date) return valid$2(Joi$2.date(), config);
3383
- assert$49(Object.getPrototypeOf(config) === Object.getPrototypeOf({}), "Schema can only contain plain objects");
3383
+ assert$50(Object.getPrototypeOf(config) === Object.getPrototypeOf({}), "Schema can only contain plain objects");
3384
3384
  return Joi$2.object().keys(config);
3385
3385
  };
3386
3386
  exports.ref = function(id, options) {
3387
- return Ref$10.isRef(id) ? id : Ref$10.create(id, options);
3387
+ return Ref$11.isRef(id) ? id : Ref$11.create(id, options);
3388
3388
  };
3389
3389
  exports.compile = function(root$11, schema$2, options = {}) {
3390
- Common$21.assertOptions(options, ["legacy"]);
3391
- const any = schema$2 && schema$2[Common$21.symbols.any];
3390
+ Common$22.assertOptions(options, ["legacy"]);
3391
+ const any = schema$2 && schema$2[Common$22.symbols.any];
3392
3392
  if (any) {
3393
- assert$49(options.legacy || any.version === Common$21.version, "Cannot mix different versions of joi schemas:", any.version, Common$21.version);
3393
+ assert$50(options.legacy || any.version === Common$22.version, "Cannot mix different versions of joi schemas:", any.version, Common$22.version);
3394
3394
  return schema$2;
3395
3395
  }
3396
3396
  if (typeof schema$2 !== "object" || !options.legacy) return exports.schema(root$11, schema$2, { appendPath: true });
3397
- const compiler = internals$22.walk(schema$2);
3397
+ const compiler = internals$23.walk(schema$2);
3398
3398
  if (!compiler) return exports.schema(root$11, schema$2, { appendPath: true });
3399
3399
  return compiler.compile(compiler.root, schema$2);
3400
3400
  };
3401
- internals$22.walk = function(schema$2) {
3401
+ internals$23.walk = function(schema$2) {
3402
3402
  if (typeof schema$2 !== "object") return null;
3403
3403
  if (Array.isArray(schema$2)) {
3404
3404
  for (const item of schema$2) {
3405
- const compiler = internals$22.walk(item);
3405
+ const compiler = internals$23.walk(item);
3406
3406
  if (compiler) return compiler;
3407
3407
  }
3408
3408
  return null;
3409
3409
  }
3410
- const any = schema$2[Common$21.symbols.any];
3410
+ const any = schema$2[Common$22.symbols.any];
3411
3411
  if (any) return {
3412
3412
  root: schema$2[any.root],
3413
3413
  compile: any.compile
3414
3414
  };
3415
- assert$49(Object.getPrototypeOf(schema$2) === Object.getPrototypeOf({}), "Schema can only contain plain objects");
3415
+ assert$50(Object.getPrototypeOf(schema$2) === Object.getPrototypeOf({}), "Schema can only contain plain objects");
3416
3416
  for (const key in schema$2) {
3417
- const compiler = internals$22.walk(schema$2[key]);
3417
+ const compiler = internals$23.walk(schema$2[key]);
3418
3418
  if (compiler) return compiler;
3419
3419
  }
3420
3420
  return null;
3421
3421
  };
3422
- internals$22.simple = function(value) {
3422
+ internals$23.simple = function(value) {
3423
3423
  return value === null || [
3424
3424
  "boolean",
3425
3425
  "string",
@@ -3428,12 +3428,12 @@ var require_compile = __commonJSMin((exports) => {
3428
3428
  };
3429
3429
  exports.when = function(schema$2, condition, options) {
3430
3430
  if (options === void 0) {
3431
- assert$49(condition && typeof condition === "object", "Missing options");
3431
+ assert$50(condition && typeof condition === "object", "Missing options");
3432
3432
  options = condition;
3433
- condition = Ref$10.create(".");
3433
+ condition = Ref$11.create(".");
3434
3434
  }
3435
3435
  if (Array.isArray(options)) options = { switch: options };
3436
- Common$21.assertOptions(options, [
3436
+ Common$22.assertOptions(options, [
3437
3437
  "is",
3438
3438
  "not",
3439
3439
  "then",
@@ -3441,19 +3441,19 @@ var require_compile = __commonJSMin((exports) => {
3441
3441
  "switch",
3442
3442
  "break"
3443
3443
  ]);
3444
- if (Common$21.isSchema(condition)) {
3445
- assert$49(options.is === void 0, "\"is\" can not be used with a schema condition");
3446
- assert$49(options.not === void 0, "\"not\" can not be used with a schema condition");
3447
- assert$49(options.switch === void 0, "\"switch\" can not be used with a schema condition");
3448
- return internals$22.condition(schema$2, {
3444
+ if (Common$22.isSchema(condition)) {
3445
+ assert$50(options.is === void 0, "\"is\" can not be used with a schema condition");
3446
+ assert$50(options.not === void 0, "\"not\" can not be used with a schema condition");
3447
+ assert$50(options.switch === void 0, "\"switch\" can not be used with a schema condition");
3448
+ return internals$23.condition(schema$2, {
3449
3449
  is: condition,
3450
3450
  then: options.then,
3451
3451
  otherwise: options.otherwise,
3452
3452
  break: options.break
3453
3453
  });
3454
3454
  }
3455
- assert$49(Ref$10.isRef(condition) || typeof condition === "string", "Invalid condition:", condition);
3456
- assert$49(options.not === void 0 || options.is === void 0, "Cannot combine \"is\" with \"not\"");
3455
+ assert$50(Ref$11.isRef(condition) || typeof condition === "string", "Invalid condition:", condition);
3456
+ assert$50(options.not === void 0 || options.is === void 0, "Cannot combine \"is\" with \"not\"");
3457
3457
  if (options.switch === void 0) {
3458
3458
  let rule$1 = options;
3459
3459
  if (options.not !== void 0) rule$1 = {
@@ -3463,10 +3463,10 @@ var require_compile = __commonJSMin((exports) => {
3463
3463
  break: options.break
3464
3464
  };
3465
3465
  let is = rule$1.is !== void 0 ? schema$2.$_compile(rule$1.is) : schema$2.$_root.invalid(null, false, 0, "").required();
3466
- assert$49(rule$1.then !== void 0 || rule$1.otherwise !== void 0, "options must have at least one of \"then\", \"otherwise\", or \"switch\"");
3467
- assert$49(rule$1.break === void 0 || rule$1.then === void 0 || rule$1.otherwise === void 0, "Cannot specify then, otherwise, and break all together");
3468
- if (options.is !== void 0 && !Ref$10.isRef(options.is) && !Common$21.isSchema(options.is)) is = is.required();
3469
- return internals$22.condition(schema$2, {
3466
+ assert$50(rule$1.then !== void 0 || rule$1.otherwise !== void 0, "options must have at least one of \"then\", \"otherwise\", or \"switch\"");
3467
+ assert$50(rule$1.break === void 0 || rule$1.then === void 0 || rule$1.otherwise === void 0, "Cannot specify then, otherwise, and break all together");
3468
+ if (options.is !== void 0 && !Ref$11.isRef(options.is) && !Common$22.isSchema(options.is)) is = is.required();
3469
+ return internals$23.condition(schema$2, {
3470
3470
  ref: exports.ref(condition),
3471
3471
  is,
3472
3472
  then: rule$1.then,
@@ -3474,10 +3474,10 @@ var require_compile = __commonJSMin((exports) => {
3474
3474
  break: rule$1.break
3475
3475
  });
3476
3476
  }
3477
- assert$49(Array.isArray(options.switch), "\"switch\" must be an array");
3478
- assert$49(options.is === void 0, "Cannot combine \"switch\" with \"is\"");
3479
- assert$49(options.not === void 0, "Cannot combine \"switch\" with \"not\"");
3480
- assert$49(options.then === void 0, "Cannot combine \"switch\" with \"then\"");
3477
+ assert$50(Array.isArray(options.switch), "\"switch\" must be an array");
3478
+ assert$50(options.is === void 0, "Cannot combine \"switch\" with \"is\"");
3479
+ assert$50(options.not === void 0, "Cannot combine \"switch\" with \"not\"");
3480
+ assert$50(options.then === void 0, "Cannot combine \"switch\" with \"then\"");
3481
3481
  const rule = {
3482
3482
  ref: exports.ref(condition),
3483
3483
  switch: [],
@@ -3486,23 +3486,23 @@ var require_compile = __commonJSMin((exports) => {
3486
3486
  for (let i$4 = 0; i$4 < options.switch.length; ++i$4) {
3487
3487
  const test = options.switch[i$4];
3488
3488
  const last$2 = i$4 === options.switch.length - 1;
3489
- Common$21.assertOptions(test, last$2 ? [
3489
+ Common$22.assertOptions(test, last$2 ? [
3490
3490
  "is",
3491
3491
  "then",
3492
3492
  "otherwise"
3493
3493
  ] : ["is", "then"]);
3494
- assert$49(test.is !== void 0, "Switch statement missing \"is\"");
3495
- assert$49(test.then !== void 0, "Switch statement missing \"then\"");
3494
+ assert$50(test.is !== void 0, "Switch statement missing \"is\"");
3495
+ assert$50(test.then !== void 0, "Switch statement missing \"then\"");
3496
3496
  const item = {
3497
3497
  is: schema$2.$_compile(test.is),
3498
3498
  then: schema$2.$_compile(test.then)
3499
3499
  };
3500
- if (!Ref$10.isRef(test.is) && !Common$21.isSchema(test.is)) item.is = item.is.required();
3500
+ if (!Ref$11.isRef(test.is) && !Common$22.isSchema(test.is)) item.is = item.is.required();
3501
3501
  if (last$2) {
3502
- assert$49(options.otherwise === void 0 || test.otherwise === void 0, "Cannot specify \"otherwise\" inside and outside a \"switch\"");
3502
+ assert$50(options.otherwise === void 0 || test.otherwise === void 0, "Cannot specify \"otherwise\" inside and outside a \"switch\"");
3503
3503
  const otherwise = options.otherwise !== void 0 ? options.otherwise : test.otherwise;
3504
3504
  if (otherwise !== void 0) {
3505
- assert$49(rule.break === void 0, "Cannot specify both otherwise and break");
3505
+ assert$50(rule.break === void 0, "Cannot specify both otherwise and break");
3506
3506
  item.otherwise = schema$2.$_compile(otherwise);
3507
3507
  }
3508
3508
  }
@@ -3510,47 +3510,47 @@ var require_compile = __commonJSMin((exports) => {
3510
3510
  }
3511
3511
  return rule;
3512
3512
  };
3513
- internals$22.condition = function(schema$2, condition) {
3513
+ internals$23.condition = function(schema$2, condition) {
3514
3514
  for (const key of ["then", "otherwise"]) if (condition[key] === void 0) delete condition[key];
3515
3515
  else condition[key] = schema$2.$_compile(condition[key]);
3516
3516
  return condition;
3517
3517
  };
3518
3518
  });
3519
3519
  var require_messages = __commonJSMin((exports) => {
3520
- const { assert: assert$48, clone: clone$16 } = require_lib$4();
3521
- const Template$6 = require_template();
3520
+ const { assert: assert$49, clone: clone$17 } = require_lib$4();
3521
+ const Template$7 = require_template();
3522
3522
  exports.compile = function(messages$3, target) {
3523
3523
  if (typeof messages$3 === "string") {
3524
- assert$48(!target, "Cannot set single message string");
3525
- return new Template$6(messages$3);
3524
+ assert$49(!target, "Cannot set single message string");
3525
+ return new Template$7(messages$3);
3526
3526
  }
3527
- if (Template$6.isTemplate(messages$3)) {
3528
- assert$48(!target, "Cannot set single message template");
3527
+ if (Template$7.isTemplate(messages$3)) {
3528
+ assert$49(!target, "Cannot set single message template");
3529
3529
  return messages$3;
3530
3530
  }
3531
- assert$48(typeof messages$3 === "object" && !Array.isArray(messages$3), "Invalid message options");
3532
- target = target ? clone$16(target) : {};
3531
+ assert$49(typeof messages$3 === "object" && !Array.isArray(messages$3), "Invalid message options");
3532
+ target = target ? clone$17(target) : {};
3533
3533
  for (let code$2 in messages$3) {
3534
3534
  const message = messages$3[code$2];
3535
- if (code$2 === "root" || Template$6.isTemplate(message)) {
3535
+ if (code$2 === "root" || Template$7.isTemplate(message)) {
3536
3536
  target[code$2] = message;
3537
3537
  continue;
3538
3538
  }
3539
3539
  if (typeof message === "string") {
3540
- target[code$2] = new Template$6(message);
3540
+ target[code$2] = new Template$7(message);
3541
3541
  continue;
3542
3542
  }
3543
- assert$48(typeof message === "object" && !Array.isArray(message), "Invalid message for", code$2);
3543
+ assert$49(typeof message === "object" && !Array.isArray(message), "Invalid message for", code$2);
3544
3544
  const language = code$2;
3545
3545
  target[language] = target[language] || {};
3546
3546
  for (code$2 in message) {
3547
3547
  const localized = message[code$2];
3548
- if (code$2 === "root" || Template$6.isTemplate(localized)) {
3548
+ if (code$2 === "root" || Template$7.isTemplate(localized)) {
3549
3549
  target[language][code$2] = localized;
3550
3550
  continue;
3551
3551
  }
3552
- assert$48(typeof localized === "string", "Invalid message for", code$2, "in", language);
3553
- target[language][code$2] = new Template$6(localized);
3552
+ assert$49(typeof localized === "string", "Invalid message for", code$2, "in", language);
3553
+ target[language][code$2] = new Template$7(localized);
3554
3554
  }
3555
3555
  }
3556
3556
  return target;
@@ -3563,7 +3563,7 @@ var require_messages = __commonJSMin((exports) => {
3563
3563
  target.root = message;
3564
3564
  continue;
3565
3565
  }
3566
- if (Template$6.isTemplate(message)) {
3566
+ if (Template$7.isTemplate(message)) {
3567
3567
  target[code$2] = message.describe({ compact: true });
3568
3568
  continue;
3569
3569
  }
@@ -3583,62 +3583,62 @@ var require_messages = __commonJSMin((exports) => {
3583
3583
  exports.merge = function(base$3, extended) {
3584
3584
  if (!base$3) return exports.compile(extended);
3585
3585
  if (!extended) return base$3;
3586
- if (typeof extended === "string") return new Template$6(extended);
3587
- if (Template$6.isTemplate(extended)) return extended;
3588
- const target = clone$16(base$3);
3586
+ if (typeof extended === "string") return new Template$7(extended);
3587
+ if (Template$7.isTemplate(extended)) return extended;
3588
+ const target = clone$17(base$3);
3589
3589
  for (let code$2 in extended) {
3590
3590
  const message = extended[code$2];
3591
- if (code$2 === "root" || Template$6.isTemplate(message)) {
3591
+ if (code$2 === "root" || Template$7.isTemplate(message)) {
3592
3592
  target[code$2] = message;
3593
3593
  continue;
3594
3594
  }
3595
3595
  if (typeof message === "string") {
3596
- target[code$2] = new Template$6(message);
3596
+ target[code$2] = new Template$7(message);
3597
3597
  continue;
3598
3598
  }
3599
- assert$48(typeof message === "object" && !Array.isArray(message), "Invalid message for", code$2);
3599
+ assert$49(typeof message === "object" && !Array.isArray(message), "Invalid message for", code$2);
3600
3600
  const language = code$2;
3601
3601
  target[language] = target[language] || {};
3602
3602
  for (code$2 in message) {
3603
3603
  const localized = message[code$2];
3604
- if (code$2 === "root" || Template$6.isTemplate(localized)) {
3604
+ if (code$2 === "root" || Template$7.isTemplate(localized)) {
3605
3605
  target[language][code$2] = localized;
3606
3606
  continue;
3607
3607
  }
3608
- assert$48(typeof localized === "string", "Invalid message for", code$2, "in", language);
3609
- target[language][code$2] = new Template$6(localized);
3608
+ assert$49(typeof localized === "string", "Invalid message for", code$2, "in", language);
3609
+ target[language][code$2] = new Template$7(localized);
3610
3610
  }
3611
3611
  }
3612
3612
  return target;
3613
3613
  };
3614
3614
  });
3615
3615
  var require_extend$1 = __commonJSMin((exports) => {
3616
- const { assert: assert$47, clone: clone$15 } = require_lib$4();
3617
- const Common$20 = require_common$3();
3618
- const Messages$6 = require_messages();
3619
- const internals$21 = {};
3616
+ const { assert: assert$48, clone: clone$16 } = require_lib$4();
3617
+ const Common$21 = require_common$3();
3618
+ const Messages$7 = require_messages();
3619
+ const internals$22 = {};
3620
3620
  exports.type = function(from$2, options) {
3621
3621
  const base$3 = Object.getPrototypeOf(from$2);
3622
- const prototype = clone$15(base$3);
3622
+ const prototype = clone$16(base$3);
3623
3623
  const schema$2 = from$2._assign(Object.create(prototype));
3624
3624
  const def = Object.assign({}, options);
3625
3625
  delete def.base;
3626
3626
  prototype._definition = def;
3627
3627
  const parent = base$3._definition || {};
3628
- def.messages = Messages$6.merge(parent.messages, def.messages);
3628
+ def.messages = Messages$7.merge(parent.messages, def.messages);
3629
3629
  def.properties = Object.assign({}, parent.properties, def.properties);
3630
3630
  schema$2.type = def.type;
3631
3631
  def.flags = Object.assign({}, parent.flags, def.flags);
3632
3632
  const terms = Object.assign({}, parent.terms);
3633
3633
  if (def.terms) for (const name$2 in def.terms) {
3634
3634
  const term = def.terms[name$2];
3635
- assert$47(schema$2.$_terms[name$2] === void 0, "Invalid term override for", def.type, name$2);
3635
+ assert$48(schema$2.$_terms[name$2] === void 0, "Invalid term override for", def.type, name$2);
3636
3636
  schema$2.$_terms[name$2] = term.init;
3637
3637
  terms[name$2] = term;
3638
3638
  }
3639
3639
  def.terms = terms;
3640
3640
  if (!def.args) def.args = parent.args;
3641
- def.prepare = internals$21.prepare(def.prepare, parent.prepare);
3641
+ def.prepare = internals$22.prepare(def.prepare, parent.prepare);
3642
3642
  if (def.coerce) {
3643
3643
  if (typeof def.coerce === "function") def.coerce = { method: def.coerce };
3644
3644
  if (def.coerce.from && !Array.isArray(def.coerce.from)) def.coerce = {
@@ -3646,21 +3646,21 @@ var require_extend$1 = __commonJSMin((exports) => {
3646
3646
  from: [].concat(def.coerce.from)
3647
3647
  };
3648
3648
  }
3649
- def.coerce = internals$21.coerce(def.coerce, parent.coerce);
3650
- def.validate = internals$21.validate(def.validate, parent.validate);
3649
+ def.coerce = internals$22.coerce(def.coerce, parent.coerce);
3650
+ def.validate = internals$22.validate(def.validate, parent.validate);
3651
3651
  const rules = Object.assign({}, parent.rules);
3652
3652
  if (def.rules) for (const name$2 in def.rules) {
3653
3653
  const rule = def.rules[name$2];
3654
- assert$47(typeof rule === "object", "Invalid rule definition for", def.type, name$2);
3654
+ assert$48(typeof rule === "object", "Invalid rule definition for", def.type, name$2);
3655
3655
  let method$1 = rule.method;
3656
3656
  if (method$1 === void 0) method$1 = function() {
3657
3657
  return this.$_addRule(name$2);
3658
3658
  };
3659
3659
  if (method$1) {
3660
- assert$47(!prototype[name$2], "Rule conflict in", def.type, name$2);
3660
+ assert$48(!prototype[name$2], "Rule conflict in", def.type, name$2);
3661
3661
  prototype[name$2] = method$1;
3662
3662
  }
3663
- assert$47(!rules[name$2], "Rule conflict in", def.type, name$2);
3663
+ assert$48(!rules[name$2], "Rule conflict in", def.type, name$2);
3664
3664
  rules[name$2] = rule;
3665
3665
  if (rule.alias) {
3666
3666
  const aliases$1 = [].concat(rule.alias);
@@ -3670,8 +3670,8 @@ var require_extend$1 = __commonJSMin((exports) => {
3670
3670
  rule.argsByName = new Map();
3671
3671
  rule.args = rule.args.map((arg) => {
3672
3672
  if (typeof arg === "string") arg = { name: arg };
3673
- assert$47(!rule.argsByName.has(arg.name), "Duplicated argument name", arg.name);
3674
- if (Common$20.isSchema(arg.assert)) arg.assert = arg.assert.strict().label(arg.name);
3673
+ assert$48(!rule.argsByName.has(arg.name), "Duplicated argument name", arg.name);
3674
+ if (Common$21.isSchema(arg.assert)) arg.assert = arg.assert.strict().label(arg.name);
3675
3675
  rule.argsByName.set(arg.name, arg);
3676
3676
  return arg;
3677
3677
  });
@@ -3680,9 +3680,9 @@ var require_extend$1 = __commonJSMin((exports) => {
3680
3680
  def.rules = rules;
3681
3681
  const modifiers$1 = Object.assign({}, parent.modifiers);
3682
3682
  if (def.modifiers) for (const name$2 in def.modifiers) {
3683
- assert$47(!prototype[name$2], "Rule conflict in", def.type, name$2);
3683
+ assert$48(!prototype[name$2], "Rule conflict in", def.type, name$2);
3684
3684
  const modifier = def.modifiers[name$2];
3685
- assert$47(typeof modifier === "function", "Invalid modifier definition for", def.type, name$2);
3685
+ assert$48(typeof modifier === "function", "Invalid modifier definition for", def.type, name$2);
3686
3686
  const method$1 = function(arg) {
3687
3687
  return this.rule({ [name$2]: arg });
3688
3688
  };
@@ -3694,26 +3694,26 @@ var require_extend$1 = __commonJSMin((exports) => {
3694
3694
  prototype._super = base$3;
3695
3695
  schema$2.$_super = {};
3696
3696
  for (const override in def.overrides) {
3697
- assert$47(base$3[override], "Cannot override missing", override);
3698
- def.overrides[override][Common$20.symbols.parent] = base$3[override];
3697
+ assert$48(base$3[override], "Cannot override missing", override);
3698
+ def.overrides[override][Common$21.symbols.parent] = base$3[override];
3699
3699
  schema$2.$_super[override] = base$3[override].bind(schema$2);
3700
3700
  }
3701
3701
  Object.assign(prototype, def.overrides);
3702
3702
  }
3703
3703
  def.cast = Object.assign({}, parent.cast, def.cast);
3704
3704
  const manifest = Object.assign({}, parent.manifest, def.manifest);
3705
- manifest.build = internals$21.build(def.manifest && def.manifest.build, parent.manifest && parent.manifest.build);
3705
+ manifest.build = internals$22.build(def.manifest && def.manifest.build, parent.manifest && parent.manifest.build);
3706
3706
  def.manifest = manifest;
3707
- def.rebuild = internals$21.rebuild(def.rebuild, parent.rebuild);
3707
+ def.rebuild = internals$22.rebuild(def.rebuild, parent.rebuild);
3708
3708
  return schema$2;
3709
3709
  };
3710
- internals$21.build = function(child, parent) {
3710
+ internals$22.build = function(child, parent) {
3711
3711
  if (!child || !parent) return child || parent;
3712
3712
  return function(obj, desc$1) {
3713
3713
  return parent(child(obj, desc$1), desc$1);
3714
3714
  };
3715
3715
  };
3716
- internals$21.coerce = function(child, parent) {
3716
+ internals$22.coerce = function(child, parent) {
3717
3717
  if (!child || !parent) return child || parent;
3718
3718
  return {
3719
3719
  from: child.from && parent.from ? [...new Set([...child.from, ...parent.from])] : null,
@@ -3734,7 +3734,7 @@ var require_extend$1 = __commonJSMin((exports) => {
3734
3734
  }
3735
3735
  };
3736
3736
  };
3737
- internals$21.prepare = function(child, parent) {
3737
+ internals$22.prepare = function(child, parent) {
3738
3738
  if (!child || !parent) return child || parent;
3739
3739
  return function(value, helpers$8) {
3740
3740
  const prepared = child(value, helpers$8);
@@ -3745,14 +3745,14 @@ var require_extend$1 = __commonJSMin((exports) => {
3745
3745
  return parent(value, helpers$8) || prepared;
3746
3746
  };
3747
3747
  };
3748
- internals$21.rebuild = function(child, parent) {
3748
+ internals$22.rebuild = function(child, parent) {
3749
3749
  if (!child || !parent) return child || parent;
3750
3750
  return function(schema$2) {
3751
3751
  parent(schema$2);
3752
3752
  child(schema$2);
3753
3753
  };
3754
3754
  };
3755
- internals$21.validate = function(child, parent) {
3755
+ internals$22.validate = function(child, parent) {
3756
3756
  if (!child || !parent) return child || parent;
3757
3757
  return function(value, helpers$8) {
3758
3758
  const result = parent(value, helpers$8);
@@ -3764,13 +3764,268 @@ var require_extend$1 = __commonJSMin((exports) => {
3764
3764
  };
3765
3765
  };
3766
3766
  });
3767
+ var require_manifest$1 = __commonJSMin((exports) => {
3768
+ var import_manifest$2 = __toESM(require_manifest$1());
3769
+ var import_manifest$3 = __toESM(require_manifest$1());
3770
+ var import_manifest$4 = __toESM(require_manifest$1());
3771
+ var import_manifest$5 = __toESM(require_manifest$1());
3772
+ var import_manifest$6 = __toESM(require_manifest$1());
3773
+ var import_manifest$7 = __toESM(require_manifest$1());
3774
+ var import_manifest$8 = __toESM(require_manifest$1());
3775
+ const { assert: assert$47, clone: clone$15 } = import_manifest$8.default;
3776
+ const Common$20 = import_manifest$7.default;
3777
+ const Messages$6 = import_manifest$6.default;
3778
+ const Ref$10 = import_manifest$5.default;
3779
+ const Template$6 = import_manifest$4.default;
3780
+ const ManifestDescriptionCache = new WeakMap();
3781
+ var ManifestItemCacheClass = class {
3782
+ #items = new WeakMap();
3783
+ get(item, options = {}) {
3784
+ const cached = this.#items.get(item);
3785
+ if (cached) return cached.get(options);
3786
+ }
3787
+ set(item, options = {}, value) {
3788
+ if (!this.#items.has(item)) this.#items.set(item, new WeakMap());
3789
+ this.#items.get(item).set(options, value);
3790
+ }
3791
+ setAndReturn(item, options = {}, value) {
3792
+ this.set(item, options, value);
3793
+ return value;
3794
+ }
3795
+ };
3796
+ const ManifestItemCache = new ManifestItemCacheClass();
3797
+ let Schemas$4;
3798
+ const internals$21 = {};
3799
+ exports.describe = function(schema$2) {
3800
+ const cached = ManifestDescriptionCache.get(schema$2);
3801
+ if (cached) return cached;
3802
+ const def = schema$2._definition;
3803
+ const desc$1 = {
3804
+ type: schema$2.type,
3805
+ flags: {},
3806
+ rules: []
3807
+ };
3808
+ for (const flag in schema$2._flags) if (flag[0] !== "_") desc$1.flags[flag] = internals$21.describe(schema$2._flags[flag]);
3809
+ if (!Object.keys(desc$1.flags).length) delete desc$1.flags;
3810
+ if (schema$2._preferences) {
3811
+ desc$1.preferences = clone$15(schema$2._preferences, { shallow: ["messages"] });
3812
+ delete desc$1.preferences[Common$20.symbols.prefs];
3813
+ if (desc$1.preferences.messages) desc$1.preferences.messages = Messages$6.decompile(desc$1.preferences.messages);
3814
+ }
3815
+ if (schema$2._valids) desc$1.allow = schema$2._valids.describe();
3816
+ if (schema$2._invalids) desc$1.invalid = schema$2._invalids.describe();
3817
+ for (const rule of schema$2._rules) {
3818
+ const ruleDef = def.rules[rule.name];
3819
+ if (ruleDef.manifest === false) continue;
3820
+ const item = { name: rule.name };
3821
+ for (const custom$1 in def.modifiers) if (rule[custom$1] !== void 0) item[custom$1] = internals$21.describe(rule[custom$1]);
3822
+ if (rule.args) {
3823
+ item.args = {};
3824
+ for (const key in rule.args) {
3825
+ const arg = rule.args[key];
3826
+ if (key === "options" && !Object.keys(arg).length) continue;
3827
+ item.args[key] = internals$21.describe(arg, { assign: key });
3828
+ }
3829
+ if (!Object.keys(item.args).length) delete item.args;
3830
+ }
3831
+ desc$1.rules.push(item);
3832
+ }
3833
+ if (!desc$1.rules.length) delete desc$1.rules;
3834
+ for (const term in schema$2.$_terms) {
3835
+ if (term[0] === "_") continue;
3836
+ assert$47(!desc$1[term], "Cannot describe schema due to internal name conflict with", term);
3837
+ const items = schema$2.$_terms[term];
3838
+ if (!items) continue;
3839
+ if (items instanceof Map) {
3840
+ if (items.size) desc$1[term] = [...items.entries()];
3841
+ continue;
3842
+ }
3843
+ if (Common$20.isValues(items)) {
3844
+ desc$1[term] = items.describe();
3845
+ continue;
3846
+ }
3847
+ assert$47(def.terms[term], "Term", term, "missing configuration");
3848
+ const manifest = def.terms[term].manifest;
3849
+ const mapped = typeof manifest === "object";
3850
+ if (!items.length && !mapped) continue;
3851
+ const normalized = [];
3852
+ for (const item of items) normalized.push(internals$21.describe(item));
3853
+ if (mapped) {
3854
+ const { from: from$2, to } = manifest.mapped;
3855
+ desc$1[term] = {};
3856
+ for (const item of normalized) desc$1[term][item[to]] = item[from$2];
3857
+ continue;
3858
+ }
3859
+ if (manifest === "single") {
3860
+ assert$47(normalized.length === 1, "Term", term, "contains more than one item");
3861
+ desc$1[term] = normalized[0];
3862
+ continue;
3863
+ }
3864
+ desc$1[term] = normalized;
3865
+ }
3866
+ internals$21.validate(schema$2.$_root, desc$1);
3867
+ ManifestDescriptionCache.set(schema$2, desc$1);
3868
+ return desc$1;
3869
+ };
3870
+ internals$21.describe = function(item, options = {}) {
3871
+ const cached = ManifestItemCache.get(item, options);
3872
+ if (cached) return cached;
3873
+ if (Array.isArray(item)) return ManifestItemCache.setAndReturn(item, options, item.map(internals$21.describe));
3874
+ if (item === Common$20.symbols.deepDefault) return ManifestItemCache.setAndReturn(item, options, { special: "deep" });
3875
+ if (typeof item !== "object" || item === null) return ManifestItemCache.setAndReturn(item, options, item);
3876
+ if (options.assign === "options") return ManifestItemCache.setAndReturn(item, options, clone$15(item));
3877
+ if (import_manifest$2.default && import_manifest$2.default.isBuffer(item)) return ManifestItemCache.setAndReturn(item, options, { buffer: item.toString("binary") });
3878
+ if (item instanceof Date) return ManifestItemCache.setAndReturn(item, options, item.toISOString());
3879
+ if (item instanceof Error) return ManifestItemCache.setAndReturn(item, options, item);
3880
+ if (item instanceof RegExp) {
3881
+ if (options.assign === "regex") return ManifestItemCache.setAndReturn(item, options, item.toString());
3882
+ return ManifestItemCache.setAndReturn(item, options, { regex: item.toString() });
3883
+ }
3884
+ if (item[Common$20.symbols.literal]) return ManifestItemCache.setAndReturn(item, options, { function: item.literal });
3885
+ if (typeof item.describe === "function") {
3886
+ if (options.assign === "ref") return ManifestItemCache.setAndReturn(item, options, item.describe().ref);
3887
+ return ManifestItemCache.setAndReturn(item, options, item.describe());
3888
+ }
3889
+ const normalized = {};
3890
+ for (const key in item) {
3891
+ const value = item[key];
3892
+ if (value === void 0) continue;
3893
+ normalized[key] = internals$21.describe(value, { assign: key });
3894
+ }
3895
+ return ManifestItemCache.setAndReturn(item, options, normalized);
3896
+ };
3897
+ exports.build = function(joi, desc$1) {
3898
+ const builder = new internals$21.Builder(joi);
3899
+ return builder.parse(desc$1);
3900
+ };
3901
+ internals$21.Builder = class {
3902
+ constructor(joi) {
3903
+ this.joi = joi;
3904
+ }
3905
+ parse(desc$1) {
3906
+ internals$21.validate(this.joi, desc$1);
3907
+ let schema$2 = this.joi[desc$1.type]()._bare();
3908
+ const def = schema$2._definition;
3909
+ if (desc$1.flags) for (const flag in desc$1.flags) {
3910
+ const setter = def.flags[flag] && def.flags[flag].setter || flag;
3911
+ assert$47(typeof schema$2[setter] === "function", "Invalid flag", flag, "for type", desc$1.type);
3912
+ schema$2 = schema$2[setter](this.build(desc$1.flags[flag]));
3913
+ }
3914
+ if (desc$1.preferences) schema$2 = schema$2.preferences(this.build(desc$1.preferences));
3915
+ if (desc$1.allow) schema$2 = schema$2.allow(...this.build(desc$1.allow));
3916
+ if (desc$1.invalid) schema$2 = schema$2.invalid(...this.build(desc$1.invalid));
3917
+ if (desc$1.rules) for (const rule of desc$1.rules) {
3918
+ assert$47(typeof schema$2[rule.name] === "function", "Invalid rule", rule.name, "for type", desc$1.type);
3919
+ const args$1 = [];
3920
+ if (rule.args) {
3921
+ const built = {};
3922
+ for (const key in rule.args) built[key] = this.build(rule.args[key], { assign: key });
3923
+ const keys$10 = Object.keys(built);
3924
+ const definition = def.rules[rule.name].args;
3925
+ if (definition) {
3926
+ assert$47(keys$10.length <= definition.length, "Invalid number of arguments for", desc$1.type, rule.name, "(expected up to", definition.length, ", found", keys$10.length, ")");
3927
+ for (const { name: name$2 } of definition) args$1.push(built[name$2]);
3928
+ } else {
3929
+ assert$47(keys$10.length === 1, "Invalid number of arguments for", desc$1.type, rule.name, "(expected up to 1, found", keys$10.length, ")");
3930
+ args$1.push(built[keys$10[0]]);
3931
+ }
3932
+ }
3933
+ schema$2 = schema$2[rule.name](...args$1);
3934
+ const options = {};
3935
+ for (const custom$1 in def.modifiers) if (rule[custom$1] !== void 0) options[custom$1] = this.build(rule[custom$1]);
3936
+ if (Object.keys(options).length) schema$2 = schema$2.rule(options);
3937
+ }
3938
+ const terms = {};
3939
+ for (const key in desc$1) {
3940
+ if ([
3941
+ "allow",
3942
+ "flags",
3943
+ "invalid",
3944
+ "whens",
3945
+ "preferences",
3946
+ "rules",
3947
+ "type"
3948
+ ].includes(key)) continue;
3949
+ assert$47(def.terms[key], "Term", key, "missing configuration");
3950
+ const manifest = def.terms[key].manifest;
3951
+ if (manifest === "schema") {
3952
+ terms[key] = desc$1[key].map((item) => this.parse(item));
3953
+ continue;
3954
+ }
3955
+ if (manifest === "values") {
3956
+ terms[key] = desc$1[key].map((item) => this.build(item));
3957
+ continue;
3958
+ }
3959
+ if (manifest === "single") {
3960
+ terms[key] = this.build(desc$1[key]);
3961
+ continue;
3962
+ }
3963
+ if (typeof manifest === "object") {
3964
+ terms[key] = {};
3965
+ for (const name$2 in desc$1[key]) {
3966
+ const value = desc$1[key][name$2];
3967
+ terms[key][name$2] = this.parse(value);
3968
+ }
3969
+ continue;
3970
+ }
3971
+ terms[key] = this.build(desc$1[key]);
3972
+ }
3973
+ if (desc$1.whens) terms.whens = desc$1.whens.map((when) => this.build(when));
3974
+ schema$2 = def.manifest.build(schema$2, terms);
3975
+ schema$2.$_temp.ruleset = false;
3976
+ return schema$2;
3977
+ }
3978
+ build(desc$1, options = {}) {
3979
+ if (desc$1 === null) return null;
3980
+ if (Array.isArray(desc$1)) return desc$1.map((item) => this.build(item));
3981
+ if (desc$1 instanceof Error) return desc$1;
3982
+ if (options.assign === "options") return clone$15(desc$1);
3983
+ if (options.assign === "regex") return internals$21.regex(desc$1);
3984
+ if (options.assign === "ref") return Ref$10.build(desc$1);
3985
+ if (typeof desc$1 !== "object") return desc$1;
3986
+ if (Object.keys(desc$1).length === 1) {
3987
+ if (desc$1.buffer) {
3988
+ assert$47(import_manifest$2.default, "Buffers are not supported");
3989
+ return import_manifest$2.default && import_manifest$2.default.from(desc$1.buffer, "binary");
3990
+ }
3991
+ if (desc$1.function) return {
3992
+ [Common$20.symbols.literal]: true,
3993
+ literal: desc$1.function
3994
+ };
3995
+ if (desc$1.override) return Common$20.symbols.override;
3996
+ if (desc$1.ref) return Ref$10.build(desc$1.ref);
3997
+ if (desc$1.regex) return internals$21.regex(desc$1.regex);
3998
+ if (desc$1.special) {
3999
+ assert$47(["deep"].includes(desc$1.special), "Unknown special value", desc$1.special);
4000
+ return Common$20.symbols.deepDefault;
4001
+ }
4002
+ if (desc$1.value) return clone$15(desc$1.value);
4003
+ }
4004
+ if (desc$1.type) return this.parse(desc$1);
4005
+ if (desc$1.template) return Template$6.build(desc$1);
4006
+ const normalized = {};
4007
+ for (const key in desc$1) normalized[key] = this.build(desc$1[key], { assign: key });
4008
+ return normalized;
4009
+ }
4010
+ };
4011
+ internals$21.regex = function(string) {
4012
+ const end = string.lastIndexOf("/");
4013
+ const exp = string.slice(1, end);
4014
+ const flags = string.slice(end + 1);
4015
+ return new RegExp(exp, flags);
4016
+ };
4017
+ internals$21.validate = function(joi, desc$1) {
4018
+ Schemas$4 = Schemas$4 || import_manifest$3.default;
4019
+ joi.assert(desc$1, Schemas$4.description);
4020
+ };
4021
+ });
3767
4022
  var require_manifest = __commonJSMin((exports) => {
3768
- init_dist$1();
3769
- const { assert: assert$46, clone: clone$14 } = require_lib$4();
3770
- const Common$19 = require_common$3();
3771
- const Messages$5 = require_messages();
3772
- const Ref$9 = require_ref$2();
3773
- const Template$5 = require_template();
4023
+ var import_manifest$1 = __toESM(require_manifest$1());
4024
+ const { assert: assert$46, clone: clone$14 } = require_manifest$1();
4025
+ const Common$19 = require_manifest$1();
4026
+ const Messages$5 = require_manifest$1();
4027
+ const Ref$9 = require_manifest$1();
4028
+ const Template$5 = require_manifest$1();
3774
4029
  let Schemas$3;
3775
4030
  const internals$20 = {};
3776
4031
  exports.describe = function(schema$2) {
@@ -3846,7 +4101,7 @@ var require_manifest = __commonJSMin((exports) => {
3846
4101
  if (item === Common$19.symbols.deepDefault) return { special: "deep" };
3847
4102
  if (typeof item !== "object" || item === null) return item;
3848
4103
  if (options.assign === "options") return clone$14(item);
3849
- if (Buffer$1 && Buffer$1.isBuffer(item)) return { buffer: item.toString("binary") };
4104
+ if (import_manifest$1.default && import_manifest$1.default.isBuffer(item)) return { buffer: item.toString("binary") };
3850
4105
  if (item instanceof Date) return item.toISOString();
3851
4106
  if (item instanceof Error) return item;
3852
4107
  if (item instanceof RegExp) {
@@ -3957,8 +4212,8 @@ var require_manifest = __commonJSMin((exports) => {
3957
4212
  if (typeof desc$1 !== "object") return desc$1;
3958
4213
  if (Object.keys(desc$1).length === 1) {
3959
4214
  if (desc$1.buffer) {
3960
- assert$46(Buffer$1, "Buffers are not supported");
3961
- return Buffer$1 && Buffer$1.from(desc$1.buffer, "binary");
4215
+ assert$46(import_manifest$1.default, "Buffers are not supported");
4216
+ return import_manifest$1.default && import_manifest$1.default.from(desc$1.buffer, "binary");
3962
4217
  }
3963
4218
  if (desc$1.function) return {
3964
4219
  [Common$19.symbols.literal]: true,
@@ -3987,7 +4242,7 @@ var require_manifest = __commonJSMin((exports) => {
3987
4242
  return new RegExp(exp, flags);
3988
4243
  };
3989
4244
  internals$20.validate = function(joi, desc$1) {
3990
- Schemas$3 = Schemas$3 || require_schemas();
4245
+ Schemas$3 = Schemas$3 || require_manifest$1();
3991
4246
  joi.assert(desc$1, Schemas$3.description);
3992
4247
  };
3993
4248
  });
@@ -4243,11 +4498,11 @@ var require_modify = __commonJSMin((exports) => {
4243
4498
  this._schemaChain = false;
4244
4499
  }
4245
4500
  clone() {
4246
- const clone$20 = new internals$18.Ids();
4247
- clone$20._byId = new Map(this._byId);
4248
- clone$20._byKey = new Map(this._byKey);
4249
- clone$20._schemaChain = this._schemaChain;
4250
- return clone$20;
4501
+ const clone$21 = new internals$18.Ids();
4502
+ clone$21._byId = new Map(this._byId);
4503
+ clone$21._byKey = new Map(this._byKey);
4504
+ clone$21._schemaChain = this._schemaChain;
4505
+ return clone$21;
4251
4506
  }
4252
4507
  concat(source) {
4253
4508
  if (source._schemaChain) this._schemaChain = true;
@@ -4363,11 +4618,11 @@ var require_modify = __commonJSMin((exports) => {
4363
4618
  }, options);
4364
4619
  if (result !== void 0) {
4365
4620
  obj = obj || schema$2.clone();
4366
- const clone$20 = Object.assign({}, rule);
4367
- clone$20.args = result;
4368
- obj._rules[i$4] = clone$20;
4621
+ const clone$21 = Object.assign({}, rule);
4622
+ clone$21.args = result;
4623
+ obj._rules[i$4] = clone$21;
4369
4624
  const existingUnique = obj._singleRules.get(rule.name);
4370
- if (existingUnique === rule) obj._singleRules.set(rule.name, clone$20);
4625
+ if (existingUnique === rule) obj._singleRules.set(rule.name, clone$21);
4371
4626
  }
4372
4627
  }
4373
4628
  for (const name$2 in schema$2.$_terms) {
@@ -4386,17 +4641,17 @@ var require_modify = __commonJSMin((exports) => {
4386
4641
  internals$18.scan = function(item, source, options, _path, _key) {
4387
4642
  const path = _path || [];
4388
4643
  if (item === null || typeof item !== "object") return;
4389
- let clone$20;
4644
+ let clone$21;
4390
4645
  if (Array.isArray(item)) {
4391
4646
  for (let i$4 = 0; i$4 < item.length; ++i$4) {
4392
4647
  const key = source.source === "terms" && source.name === "keys" && item[i$4].key;
4393
4648
  const result = internals$18.scan(item[i$4], source, options, [i$4, ...path], key);
4394
4649
  if (result !== void 0) {
4395
- clone$20 = clone$20 || item.slice();
4396
- clone$20[i$4] = result;
4650
+ clone$21 = clone$21 || item.slice();
4651
+ clone$21[i$4] = result;
4397
4652
  }
4398
4653
  }
4399
- return clone$20;
4654
+ return clone$21;
4400
4655
  }
4401
4656
  if (options.schema !== false && Common$18.isSchema(item) || options.ref !== false && Ref$8.isRef(item)) {
4402
4657
  const result = options.each(item, {
@@ -4411,11 +4666,11 @@ var require_modify = __commonJSMin((exports) => {
4411
4666
  if (key[0] === "_") continue;
4412
4667
  const result = internals$18.scan(item[key], source, options, [key, ...path], _key);
4413
4668
  if (result !== void 0) {
4414
- clone$20 = clone$20 || Object.assign({}, item);
4415
- clone$20[key] = result;
4669
+ clone$21 = clone$21 || Object.assign({}, item);
4670
+ clone$21[key] = result;
4416
4671
  }
4417
4672
  }
4418
- return clone$20;
4673
+ return clone$21;
4419
4674
  };
4420
4675
  });
4421
4676
  var require_state$1 = __commonJSMin((exports, module) => {
@@ -7336,24 +7591,24 @@ var require_keys$1 = __commonJSMin((exports, module) => {
7336
7591
  internals$8.clone = function(value, prefs) {
7337
7592
  if (typeof value === "object") {
7338
7593
  if (prefs.nonEnumerables) return Clone(value, { shallow: true });
7339
- const clone$21 = Object.create(Object.getPrototypeOf(value));
7340
- Object.assign(clone$21, value);
7341
- return clone$21;
7594
+ const clone$22 = Object.create(Object.getPrototypeOf(value));
7595
+ Object.assign(clone$22, value);
7596
+ return clone$22;
7342
7597
  }
7343
- const clone$20 = function(...args$1) {
7598
+ const clone$21 = function(...args$1) {
7344
7599
  return value.apply(this, args$1);
7345
7600
  };
7346
- clone$20.prototype = Clone(value.prototype);
7347
- Object.defineProperty(clone$20, "name", {
7601
+ clone$21.prototype = Clone(value.prototype);
7602
+ Object.defineProperty(clone$21, "name", {
7348
7603
  value: value.name,
7349
7604
  writable: false
7350
7605
  });
7351
- Object.defineProperty(clone$20, "length", {
7606
+ Object.defineProperty(clone$21, "length", {
7352
7607
  value: value.length,
7353
7608
  writable: false
7354
7609
  });
7355
- Object.assign(clone$20, value);
7356
- return clone$20;
7610
+ Object.assign(clone$21, value);
7611
+ return clone$21;
7357
7612
  };
7358
7613
  internals$8.dependency = function(schema$2, rel, key, peers, options) {
7359
7614
  assert$35(key === null || typeof key === "string", rel, "key must be a strings");
@@ -13444,12 +13699,12 @@ var require_common$3 = __commonJSMin((exports) => {
13444
13699
  throw err$1;
13445
13700
  }
13446
13701
  };
13447
- exports.validateArg = function(value, label, { assert: assert$54, message }) {
13448
- if (exports.isSchema(assert$54)) {
13449
- const result = assert$54.validate(value);
13702
+ exports.validateArg = function(value, label, { assert: assert$55, message }) {
13703
+ if (exports.isSchema(assert$55)) {
13704
+ const result = assert$55.validate(value);
13450
13705
  if (!result.error) return;
13451
13706
  return result.error.message;
13452
- } else if (!assert$54(value)) return label ? `${label} ${message}` : message;
13707
+ } else if (!assert$55(value)) return label ? `${label} ${message}` : message;
13453
13708
  };
13454
13709
  exports.verifyFlat = function(args$1, method$1) {
13455
13710
  for (const arg of args$1) Assert(!Array.isArray(arg), "Method no longer accepts array arguments:", method$1);
@@ -13703,20 +13958,6 @@ Object.defineProperty(import_errors$1.default, "template", { value: function(val
13703
13958
  if (!messages$3[code$2]) return messages$3["*"];
13704
13959
  return messages$3[code$2];
13705
13960
  } });
13706
- var import_manifest$1 = __toESM(require_manifest());
13707
- const ManifestDescriptionCache = new WeakMap();
13708
- const originalDescribe = import_manifest$1.default.describe;
13709
- Object.defineProperty(import_manifest$1.default, "describe", {
13710
- value: function(schema$2) {
13711
- const cached = ManifestDescriptionCache.get(schema$2);
13712
- if (cached) return cached;
13713
- const result = originalDescribe.call(this, schema$2);
13714
- ManifestDescriptionCache.set(schema$2, result);
13715
- return result;
13716
- },
13717
- writable: true,
13718
- configurable: true
13719
- });
13720
13961
  const json = (root$11) => {
13721
13962
  return root$11;
13722
13963
  };
@@ -32766,7 +33007,7 @@ var init_package = __esmMin(() => {
32766
33007
  var require_bn$1 = __commonJSMin((exports, module) => {
32767
33008
  (function(module$1, exports$1) {
32768
33009
  "use strict";
32769
- function assert$54(val, msg) {
33010
+ function assert$55(val, msg) {
32770
33011
  if (!val) throw new Error(msg || "Assertion failed");
32771
33012
  }
32772
33013
  function inherits$14(ctor, superCtor) {
@@ -32794,10 +33035,10 @@ var require_bn$1 = __commonJSMin((exports, module) => {
32794
33035
  else exports$1.BN = BN$14;
32795
33036
  BN$14.BN = BN$14;
32796
33037
  BN$14.wordSize = 26;
32797
- var Buffer$27;
33038
+ var Buffer$29;
32798
33039
  try {
32799
- if (typeof window !== "undefined" && typeof window.Buffer !== "undefined") Buffer$27 = window.Buffer;
32800
- else Buffer$27 = (init_dist$1(), __toCommonJS(dist_exports)).Buffer;
33040
+ if (typeof window !== "undefined" && typeof window.Buffer !== "undefined") Buffer$29 = window.Buffer;
33041
+ else Buffer$29 = (init_dist$1(), __toCommonJS(dist_exports)).Buffer;
32801
33042
  } catch (e$2) {}
32802
33043
  BN$14.isBN = function isBN(num) {
32803
33044
  if (num instanceof BN$14) return true;
@@ -32815,7 +33056,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
32815
33056
  if (typeof number === "number") return this._initNumber(number, base$3, endian);
32816
33057
  if (typeof number === "object") return this._initArray(number, base$3, endian);
32817
33058
  if (base$3 === "hex") base$3 = 16;
32818
- assert$54(base$3 === (base$3 | 0) && base$3 >= 2 && base$3 <= 36);
33059
+ assert$55(base$3 === (base$3 | 0) && base$3 >= 2 && base$3 <= 36);
32819
33060
  number = number.toString().replace(/\s+/g, "");
32820
33061
  var start = 0;
32821
33062
  if (number[0] === "-") {
@@ -32840,7 +33081,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
32840
33081
  this.words = [number & 67108863, number / 67108864 & 67108863];
32841
33082
  this.length = 2;
32842
33083
  } else {
32843
- assert$54(number < 9007199254740992);
33084
+ assert$55(number < 9007199254740992);
32844
33085
  this.words = [
32845
33086
  number & 67108863,
32846
33087
  number / 67108864 & 67108863,
@@ -32852,7 +33093,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
32852
33093
  this._initArray(this.toArray(), base$3, endian);
32853
33094
  };
32854
33095
  BN$14.prototype._initArray = function _initArray(number, base$3, endian) {
32855
- assert$54(typeof number.length === "number");
33096
+ assert$55(typeof number.length === "number");
32856
33097
  if (number.length <= 0) {
32857
33098
  this.words = [0];
32858
33099
  this.length = 1;
@@ -32971,7 +33212,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
32971
33212
  dest.negative = this.negative;
32972
33213
  dest.red = this.red;
32973
33214
  };
32974
- BN$14.prototype.clone = function clone$20() {
33215
+ BN$14.prototype.clone = function clone$21() {
32975
33216
  var r$2 = new BN$14(null);
32976
33217
  this.copy(r$2);
32977
33218
  return r$2;
@@ -33139,21 +33380,21 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33139
33380
  if (this.negative !== 0) out = "-" + out;
33140
33381
  return out;
33141
33382
  }
33142
- assert$54(false, "Base should be between 2 and 36");
33383
+ assert$55(false, "Base should be between 2 and 36");
33143
33384
  };
33144
33385
  BN$14.prototype.toNumber = function toNumber$8() {
33145
33386
  var ret = this.words[0];
33146
33387
  if (this.length === 2) ret += this.words[1] * 67108864;
33147
33388
  else if (this.length === 3 && this.words[2] === 1) ret += 4503599627370496 + this.words[1] * 67108864;
33148
- else if (this.length > 2) assert$54(false, "Number can only safely store up to 53 bits");
33389
+ else if (this.length > 2) assert$55(false, "Number can only safely store up to 53 bits");
33149
33390
  return this.negative !== 0 ? -ret : ret;
33150
33391
  };
33151
33392
  BN$14.prototype.toJSON = function toJSON() {
33152
33393
  return this.toString(16);
33153
33394
  };
33154
33395
  BN$14.prototype.toBuffer = function toBuffer$5(endian, length) {
33155
- assert$54(typeof Buffer$27 !== "undefined");
33156
- return this.toArrayLike(Buffer$27, endian, length);
33396
+ assert$55(typeof Buffer$29 !== "undefined");
33397
+ return this.toArrayLike(Buffer$29, endian, length);
33157
33398
  };
33158
33399
  BN$14.prototype.toArray = function toArray$8(endian, length) {
33159
33400
  return this.toArrayLike(Array, endian, length);
@@ -33161,8 +33402,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33161
33402
  BN$14.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {
33162
33403
  var byteLength$2 = this.byteLength();
33163
33404
  var reqLength = length || Math.max(1, byteLength$2);
33164
- assert$54(byteLength$2 <= reqLength, "byte array longer than desired length");
33165
- assert$54(reqLength > 0, "Requested array length <= 0");
33405
+ assert$55(byteLength$2 <= reqLength, "byte array longer than desired length");
33406
+ assert$55(reqLength > 0, "Requested array length <= 0");
33166
33407
  this.strip();
33167
33408
  var littleEndian = endian === "le";
33168
33409
  var res = new ArrayType(reqLength);
@@ -33283,7 +33524,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33283
33524
  return this.strip();
33284
33525
  };
33285
33526
  BN$14.prototype.ior = function ior(num) {
33286
- assert$54((this.negative | num.negative) === 0);
33527
+ assert$55((this.negative | num.negative) === 0);
33287
33528
  return this.iuor(num);
33288
33529
  };
33289
33530
  BN$14.prototype.or = function or(num) {
@@ -33303,7 +33544,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33303
33544
  return this.strip();
33304
33545
  };
33305
33546
  BN$14.prototype.iand = function iand(num) {
33306
- assert$54((this.negative | num.negative) === 0);
33547
+ assert$55((this.negative | num.negative) === 0);
33307
33548
  return this.iuand(num);
33308
33549
  };
33309
33550
  BN$14.prototype.and = function and(num) {
@@ -33330,7 +33571,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33330
33571
  return this.strip();
33331
33572
  };
33332
33573
  BN$14.prototype.ixor = function ixor(num) {
33333
- assert$54((this.negative | num.negative) === 0);
33574
+ assert$55((this.negative | num.negative) === 0);
33334
33575
  return this.iuxor(num);
33335
33576
  };
33336
33577
  BN$14.prototype.xor = function xor$2(num) {
@@ -33342,7 +33583,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33342
33583
  return num.clone().iuxor(this);
33343
33584
  };
33344
33585
  BN$14.prototype.inotn = function inotn(width) {
33345
- assert$54(typeof width === "number" && width >= 0);
33586
+ assert$55(typeof width === "number" && width >= 0);
33346
33587
  var bytesNeeded = Math.ceil(width / 26) | 0;
33347
33588
  var bitsLeft = width % 26;
33348
33589
  this._expand(bytesNeeded);
@@ -33355,7 +33596,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33355
33596
  return this.clone().inotn(width);
33356
33597
  };
33357
33598
  BN$14.prototype.setn = function setn(bit, val) {
33358
- assert$54(typeof bit === "number" && bit >= 0);
33599
+ assert$55(typeof bit === "number" && bit >= 0);
33359
33600
  var off = bit / 26 | 0;
33360
33601
  var wbit = bit % 26;
33361
33602
  this._expand(off + 1);
@@ -34184,8 +34425,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34184
34425
  carry = carry >>> 13;
34185
34426
  }
34186
34427
  for (i$4 = 2 * len$2; i$4 < N; ++i$4) rws[i$4] = 0;
34187
- assert$54(carry === 0);
34188
- assert$54((carry & -8192) === 0);
34428
+ assert$55(carry === 0);
34429
+ assert$55((carry & -8192) === 0);
34189
34430
  };
34190
34431
  FFTM.prototype.stub = function stub(N) {
34191
34432
  var ph = new Array(N);
@@ -34235,8 +34476,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34235
34476
  return this.clone().mulTo(num, this);
34236
34477
  };
34237
34478
  BN$14.prototype.imuln = function imuln(num) {
34238
- assert$54(typeof num === "number");
34239
- assert$54(num < 67108864);
34479
+ assert$55(typeof num === "number");
34480
+ assert$55(num < 67108864);
34240
34481
  var carry = 0;
34241
34482
  for (var i$4 = 0; i$4 < this.length; i$4++) {
34242
34483
  var w$1 = (this.words[i$4] | 0) * num;
@@ -34274,7 +34515,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34274
34515
  return res;
34275
34516
  };
34276
34517
  BN$14.prototype.iushln = function iushln(bits$1) {
34277
- assert$54(typeof bits$1 === "number" && bits$1 >= 0);
34518
+ assert$55(typeof bits$1 === "number" && bits$1 >= 0);
34278
34519
  var r$2 = bits$1 % 26;
34279
34520
  var s$6 = (bits$1 - r$2) / 26;
34280
34521
  var carryMask = 67108863 >>> 26 - r$2 << 26 - r$2;
@@ -34300,11 +34541,11 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34300
34541
  return this.strip();
34301
34542
  };
34302
34543
  BN$14.prototype.ishln = function ishln(bits$1) {
34303
- assert$54(this.negative === 0);
34544
+ assert$55(this.negative === 0);
34304
34545
  return this.iushln(bits$1);
34305
34546
  };
34306
34547
  BN$14.prototype.iushrn = function iushrn(bits$1, hint, extended) {
34307
- assert$54(typeof bits$1 === "number" && bits$1 >= 0);
34548
+ assert$55(typeof bits$1 === "number" && bits$1 >= 0);
34308
34549
  var h$1;
34309
34550
  if (hint) h$1 = (hint - hint % 26) / 26;
34310
34551
  else h$1 = 0;
@@ -34339,7 +34580,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34339
34580
  return this.strip();
34340
34581
  };
34341
34582
  BN$14.prototype.ishrn = function ishrn(bits$1, hint, extended) {
34342
- assert$54(this.negative === 0);
34583
+ assert$55(this.negative === 0);
34343
34584
  return this.iushrn(bits$1, hint, extended);
34344
34585
  };
34345
34586
  BN$14.prototype.shln = function shln(bits$1) {
@@ -34355,7 +34596,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34355
34596
  return this.clone().iushrn(bits$1);
34356
34597
  };
34357
34598
  BN$14.prototype.testn = function testn(bit) {
34358
- assert$54(typeof bit === "number" && bit >= 0);
34599
+ assert$55(typeof bit === "number" && bit >= 0);
34359
34600
  var r$2 = bit % 26;
34360
34601
  var s$6 = (bit - r$2) / 26;
34361
34602
  var q = 1 << r$2;
@@ -34364,10 +34605,10 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34364
34605
  return !!(w$1 & q);
34365
34606
  };
34366
34607
  BN$14.prototype.imaskn = function imaskn(bits$1) {
34367
- assert$54(typeof bits$1 === "number" && bits$1 >= 0);
34608
+ assert$55(typeof bits$1 === "number" && bits$1 >= 0);
34368
34609
  var r$2 = bits$1 % 26;
34369
34610
  var s$6 = (bits$1 - r$2) / 26;
34370
- assert$54(this.negative === 0, "imaskn works only with positive numbers");
34611
+ assert$55(this.negative === 0, "imaskn works only with positive numbers");
34371
34612
  if (this.length <= s$6) return this;
34372
34613
  if (r$2 !== 0) s$6++;
34373
34614
  this.length = Math.min(s$6, this.length);
@@ -34381,8 +34622,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34381
34622
  return this.clone().imaskn(bits$1);
34382
34623
  };
34383
34624
  BN$14.prototype.iaddn = function iaddn(num) {
34384
- assert$54(typeof num === "number");
34385
- assert$54(num < 67108864);
34625
+ assert$55(typeof num === "number");
34626
+ assert$55(num < 67108864);
34386
34627
  if (num < 0) return this.isubn(-num);
34387
34628
  if (this.negative !== 0) {
34388
34629
  if (this.length === 1 && (this.words[0] | 0) < num) {
@@ -34408,8 +34649,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34408
34649
  return this;
34409
34650
  };
34410
34651
  BN$14.prototype.isubn = function isubn(num) {
34411
- assert$54(typeof num === "number");
34412
- assert$54(num < 67108864);
34652
+ assert$55(typeof num === "number");
34653
+ assert$55(num < 67108864);
34413
34654
  if (num < 0) return this.iaddn(-num);
34414
34655
  if (this.negative !== 0) {
34415
34656
  this.negative = 0;
@@ -34459,7 +34700,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34459
34700
  this.words[i$4 + shift] = w$1 & 67108863;
34460
34701
  }
34461
34702
  if (carry === 0) return this.strip();
34462
- assert$54(carry === -1);
34703
+ assert$55(carry === -1);
34463
34704
  carry = 0;
34464
34705
  for (i$4 = 0; i$4 < this.length; i$4++) {
34465
34706
  w$1 = -(this.words[i$4] | 0) + carry;
@@ -34515,7 +34756,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34515
34756
  };
34516
34757
  };
34517
34758
  BN$14.prototype.divmod = function divmod(num, mode, positive) {
34518
- assert$54(!num.isZero());
34759
+ assert$55(!num.isZero());
34519
34760
  if (this.isZero()) return {
34520
34761
  div: new BN$14(0),
34521
34762
  mod: new BN$14(0)
@@ -34592,14 +34833,14 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34592
34833
  return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
34593
34834
  };
34594
34835
  BN$14.prototype.modn = function modn(num) {
34595
- assert$54(num <= 67108863);
34836
+ assert$55(num <= 67108863);
34596
34837
  var p$1 = (1 << 26) % num;
34597
34838
  var acc = 0;
34598
34839
  for (var i$4 = this.length - 1; i$4 >= 0; i$4--) acc = (p$1 * acc + (this.words[i$4] | 0)) % num;
34599
34840
  return acc;
34600
34841
  };
34601
34842
  BN$14.prototype.idivn = function idivn(num) {
34602
- assert$54(num <= 67108863);
34843
+ assert$55(num <= 67108863);
34603
34844
  var carry = 0;
34604
34845
  for (var i$4 = this.length - 1; i$4 >= 0; i$4--) {
34605
34846
  var w$1 = (this.words[i$4] | 0) + carry * 67108864;
@@ -34612,8 +34853,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34612
34853
  return this.clone().idivn(num);
34613
34854
  };
34614
34855
  BN$14.prototype.egcd = function egcd(p$1) {
34615
- assert$54(p$1.negative === 0);
34616
- assert$54(!p$1.isZero());
34856
+ assert$55(p$1.negative === 0);
34857
+ assert$55(!p$1.isZero());
34617
34858
  var x$1 = this;
34618
34859
  var y$1 = p$1.clone();
34619
34860
  if (x$1.negative !== 0) x$1 = x$1.umod(p$1);
@@ -34672,8 +34913,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34672
34913
  };
34673
34914
  };
34674
34915
  BN$14.prototype._invmp = function _invmp(p$1) {
34675
- assert$54(p$1.negative === 0);
34676
- assert$54(!p$1.isZero());
34916
+ assert$55(p$1.negative === 0);
34917
+ assert$55(!p$1.isZero());
34677
34918
  var a$2 = this;
34678
34919
  var b = p$1.clone();
34679
34920
  if (a$2.negative !== 0) a$2 = a$2.umod(p$1);
@@ -34749,7 +34990,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34749
34990
  return this.words[0] & num;
34750
34991
  };
34751
34992
  BN$14.prototype.bincn = function bincn(bit) {
34752
- assert$54(typeof bit === "number");
34993
+ assert$55(typeof bit === "number");
34753
34994
  var r$2 = bit % 26;
34754
34995
  var s$6 = (bit - r$2) / 26;
34755
34996
  var q = 1 << r$2;
@@ -34784,7 +35025,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34784
35025
  if (this.length > 1) res = 1;
34785
35026
  else {
34786
35027
  if (negative) num = -num;
34787
- assert$54(num <= 67108863, "Number is too big");
35028
+ assert$55(num <= 67108863, "Number is too big");
34788
35029
  var w$1 = this.words[0] | 0;
34789
35030
  res = w$1 === num ? 0 : w$1 < num ? -1 : 1;
34790
35031
  }
@@ -34846,12 +35087,12 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34846
35087
  return new Red(num);
34847
35088
  };
34848
35089
  BN$14.prototype.toRed = function toRed(ctx) {
34849
- assert$54(!this.red, "Already a number in reduction context");
34850
- assert$54(this.negative === 0, "red works only with positives");
35090
+ assert$55(!this.red, "Already a number in reduction context");
35091
+ assert$55(this.negative === 0, "red works only with positives");
34851
35092
  return ctx.convertTo(this)._forceRed(ctx);
34852
35093
  };
34853
35094
  BN$14.prototype.fromRed = function fromRed() {
34854
- assert$54(this.red, "fromRed works only with numbers in reduction context");
35095
+ assert$55(this.red, "fromRed works only with numbers in reduction context");
34855
35096
  return this.red.convertFrom(this);
34856
35097
  };
34857
35098
  BN$14.prototype._forceRed = function _forceRed(ctx) {
@@ -34859,66 +35100,66 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34859
35100
  return this;
34860
35101
  };
34861
35102
  BN$14.prototype.forceRed = function forceRed(ctx) {
34862
- assert$54(!this.red, "Already a number in reduction context");
35103
+ assert$55(!this.red, "Already a number in reduction context");
34863
35104
  return this._forceRed(ctx);
34864
35105
  };
34865
35106
  BN$14.prototype.redAdd = function redAdd(num) {
34866
- assert$54(this.red, "redAdd works only with red numbers");
35107
+ assert$55(this.red, "redAdd works only with red numbers");
34867
35108
  return this.red.add(this, num);
34868
35109
  };
34869
35110
  BN$14.prototype.redIAdd = function redIAdd(num) {
34870
- assert$54(this.red, "redIAdd works only with red numbers");
35111
+ assert$55(this.red, "redIAdd works only with red numbers");
34871
35112
  return this.red.iadd(this, num);
34872
35113
  };
34873
35114
  BN$14.prototype.redSub = function redSub(num) {
34874
- assert$54(this.red, "redSub works only with red numbers");
35115
+ assert$55(this.red, "redSub works only with red numbers");
34875
35116
  return this.red.sub(this, num);
34876
35117
  };
34877
35118
  BN$14.prototype.redISub = function redISub(num) {
34878
- assert$54(this.red, "redISub works only with red numbers");
35119
+ assert$55(this.red, "redISub works only with red numbers");
34879
35120
  return this.red.isub(this, num);
34880
35121
  };
34881
35122
  BN$14.prototype.redShl = function redShl(num) {
34882
- assert$54(this.red, "redShl works only with red numbers");
35123
+ assert$55(this.red, "redShl works only with red numbers");
34883
35124
  return this.red.shl(this, num);
34884
35125
  };
34885
35126
  BN$14.prototype.redMul = function redMul(num) {
34886
- assert$54(this.red, "redMul works only with red numbers");
35127
+ assert$55(this.red, "redMul works only with red numbers");
34887
35128
  this.red._verify2(this, num);
34888
35129
  return this.red.mul(this, num);
34889
35130
  };
34890
35131
  BN$14.prototype.redIMul = function redIMul(num) {
34891
- assert$54(this.red, "redMul works only with red numbers");
35132
+ assert$55(this.red, "redMul works only with red numbers");
34892
35133
  this.red._verify2(this, num);
34893
35134
  return this.red.imul(this, num);
34894
35135
  };
34895
35136
  BN$14.prototype.redSqr = function redSqr() {
34896
- assert$54(this.red, "redSqr works only with red numbers");
35137
+ assert$55(this.red, "redSqr works only with red numbers");
34897
35138
  this.red._verify1(this);
34898
35139
  return this.red.sqr(this);
34899
35140
  };
34900
35141
  BN$14.prototype.redISqr = function redISqr() {
34901
- assert$54(this.red, "redISqr works only with red numbers");
35142
+ assert$55(this.red, "redISqr works only with red numbers");
34902
35143
  this.red._verify1(this);
34903
35144
  return this.red.isqr(this);
34904
35145
  };
34905
35146
  BN$14.prototype.redSqrt = function redSqrt() {
34906
- assert$54(this.red, "redSqrt works only with red numbers");
35147
+ assert$55(this.red, "redSqrt works only with red numbers");
34907
35148
  this.red._verify1(this);
34908
35149
  return this.red.sqrt(this);
34909
35150
  };
34910
35151
  BN$14.prototype.redInvm = function redInvm() {
34911
- assert$54(this.red, "redInvm works only with red numbers");
35152
+ assert$55(this.red, "redInvm works only with red numbers");
34912
35153
  this.red._verify1(this);
34913
35154
  return this.red.invm(this);
34914
35155
  };
34915
35156
  BN$14.prototype.redNeg = function redNeg() {
34916
- assert$54(this.red, "redNeg works only with red numbers");
35157
+ assert$55(this.red, "redNeg works only with red numbers");
34917
35158
  this.red._verify1(this);
34918
35159
  return this.red.neg(this);
34919
35160
  };
34920
35161
  BN$14.prototype.redPow = function redPow(num) {
34921
- assert$54(this.red && !num.red, "redPow(normalNum)");
35162
+ assert$55(this.red && !num.red, "redPow(normalNum)");
34922
35163
  this.red._verify1(this);
34923
35164
  return this.red.pow(this, num);
34924
35165
  };
@@ -35048,18 +35289,18 @@ var require_bn$1 = __commonJSMin((exports, module) => {
35048
35289
  this.m = prime.p;
35049
35290
  this.prime = prime;
35050
35291
  } else {
35051
- assert$54(m$3.gtn(1), "modulus must be greater than 1");
35292
+ assert$55(m$3.gtn(1), "modulus must be greater than 1");
35052
35293
  this.m = m$3;
35053
35294
  this.prime = null;
35054
35295
  }
35055
35296
  }
35056
35297
  Red.prototype._verify1 = function _verify1(a$2) {
35057
- assert$54(a$2.negative === 0, "red works only with positives");
35058
- assert$54(a$2.red, "red works only with red numbers");
35298
+ assert$55(a$2.negative === 0, "red works only with positives");
35299
+ assert$55(a$2.red, "red works only with red numbers");
35059
35300
  };
35060
35301
  Red.prototype._verify2 = function _verify2(a$2, b) {
35061
- assert$54((a$2.negative | b.negative) === 0, "red works only with positives");
35062
- assert$54(a$2.red && a$2.red === b.red, "red works only with red numbers");
35302
+ assert$55((a$2.negative | b.negative) === 0, "red works only with positives");
35303
+ assert$55(a$2.red && a$2.red === b.red, "red works only with red numbers");
35063
35304
  };
35064
35305
  Red.prototype.imod = function imod(a$2) {
35065
35306
  if (this.prime) return this.prime.ireduce(a$2)._forceRed(this);
@@ -35114,7 +35355,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
35114
35355
  Red.prototype.sqrt = function sqrt(a$2) {
35115
35356
  if (a$2.isZero()) return a$2.clone();
35116
35357
  var mod3 = this.m.andln(3);
35117
- assert$54(mod3 % 2 === 1);
35358
+ assert$55(mod3 % 2 === 1);
35118
35359
  if (mod3 === 3) {
35119
35360
  var pow$1 = this.m.add(new BN$14(1)).iushrn(2);
35120
35361
  return this.pow(a$2, pow$1);
@@ -35125,7 +35366,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
35125
35366
  s$6++;
35126
35367
  q.iushrn(1);
35127
35368
  }
35128
- assert$54(!q.isZero());
35369
+ assert$55(!q.isZero());
35129
35370
  var one = new BN$14(1).toRed(this);
35130
35371
  var nOne = one.redNeg();
35131
35372
  var lpow = this.m.subn(1).iushrn(1);
@@ -35139,7 +35380,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
35139
35380
  while (t$7.cmp(one) !== 0) {
35140
35381
  var tmp = t$7;
35141
35382
  for (var i$4 = 0; tmp.cmp(one) !== 0; i$4++) tmp = tmp.redSqr();
35142
- assert$54(i$4 < m$3);
35383
+ assert$55(i$4 < m$3);
35143
35384
  var b = this.pow(c$1, new BN$14(1).iushln(m$3 - i$4 - 1));
35144
35385
  r$2 = r$2.redMul(b);
35145
35386
  c$1 = b.redSqr();
@@ -39536,7 +39777,7 @@ var require_node = __commonJSMin((exports, module) => {
39536
39777
  "implicit",
39537
39778
  "contains"
39538
39779
  ];
39539
- Node.prototype.clone = function clone$20() {
39780
+ Node.prototype.clone = function clone$21() {
39540
39781
  var state = this._baseState;
39541
39782
  var cstate = {};
39542
39783
  stateProps.forEach(function(prop) {
@@ -39550,9 +39791,9 @@ var require_node = __commonJSMin((exports, module) => {
39550
39791
  var state = this._baseState;
39551
39792
  methods.forEach(function(method$1) {
39552
39793
  this[method$1] = function _wrappedMethod() {
39553
- var clone$20 = new this.constructor(this);
39554
- state.children.push(clone$20);
39555
- return clone$20[method$1].apply(clone$20, arguments);
39794
+ var clone$21 = new this.constructor(this);
39795
+ state.children.push(clone$21);
39796
+ return clone$21[method$1].apply(clone$21, arguments);
39556
39797
  };
39557
39798
  }, this);
39558
39799
  };
@@ -40906,7 +41147,7 @@ var require_withPublic = __commonJSMin((exports, module) => {
40906
41147
  var require_bn = __commonJSMin((exports, module) => {
40907
41148
  (function(module$1, exports$1) {
40908
41149
  "use strict";
40909
- function assert$54(val, msg) {
41150
+ function assert$55(val, msg) {
40910
41151
  if (!val) throw new Error(msg || "Assertion failed");
40911
41152
  }
40912
41153
  function inherits$14(ctor, superCtor) {
@@ -40934,10 +41175,10 @@ var require_bn = __commonJSMin((exports, module) => {
40934
41175
  else exports$1.BN = BN$14;
40935
41176
  BN$14.BN = BN$14;
40936
41177
  BN$14.wordSize = 26;
40937
- var Buffer$27;
41178
+ var Buffer$29;
40938
41179
  try {
40939
- if (typeof window !== "undefined" && typeof window.Buffer !== "undefined") Buffer$27 = window.Buffer;
40940
- else Buffer$27 = (init_dist$1(), __toCommonJS(dist_exports)).Buffer;
41180
+ if (typeof window !== "undefined" && typeof window.Buffer !== "undefined") Buffer$29 = window.Buffer;
41181
+ else Buffer$29 = (init_dist$1(), __toCommonJS(dist_exports)).Buffer;
40941
41182
  } catch (e$2) {}
40942
41183
  BN$14.isBN = function isBN(num) {
40943
41184
  if (num instanceof BN$14) return true;
@@ -40955,7 +41196,7 @@ var require_bn = __commonJSMin((exports, module) => {
40955
41196
  if (typeof number === "number") return this._initNumber(number, base$3, endian);
40956
41197
  if (typeof number === "object") return this._initArray(number, base$3, endian);
40957
41198
  if (base$3 === "hex") base$3 = 16;
40958
- assert$54(base$3 === (base$3 | 0) && base$3 >= 2 && base$3 <= 36);
41199
+ assert$55(base$3 === (base$3 | 0) && base$3 >= 2 && base$3 <= 36);
40959
41200
  number = number.toString().replace(/\s+/g, "");
40960
41201
  var start = 0;
40961
41202
  if (number[0] === "-") {
@@ -40980,7 +41221,7 @@ var require_bn = __commonJSMin((exports, module) => {
40980
41221
  this.words = [number & 67108863, number / 67108864 & 67108863];
40981
41222
  this.length = 2;
40982
41223
  } else {
40983
- assert$54(number < 9007199254740992);
41224
+ assert$55(number < 9007199254740992);
40984
41225
  this.words = [
40985
41226
  number & 67108863,
40986
41227
  number / 67108864 & 67108863,
@@ -40992,7 +41233,7 @@ var require_bn = __commonJSMin((exports, module) => {
40992
41233
  this._initArray(this.toArray(), base$3, endian);
40993
41234
  };
40994
41235
  BN$14.prototype._initArray = function _initArray(number, base$3, endian) {
40995
- assert$54(typeof number.length === "number");
41236
+ assert$55(typeof number.length === "number");
40996
41237
  if (number.length <= 0) {
40997
41238
  this.words = [0];
40998
41239
  this.length = 1;
@@ -41030,7 +41271,7 @@ var require_bn = __commonJSMin((exports, module) => {
41030
41271
  if (c$1 >= 48 && c$1 <= 57) return c$1 - 48;
41031
41272
  else if (c$1 >= 65 && c$1 <= 70) return c$1 - 55;
41032
41273
  else if (c$1 >= 97 && c$1 <= 102) return c$1 - 87;
41033
- else assert$54(false, "Invalid character in " + string);
41274
+ else assert$55(false, "Invalid character in " + string);
41034
41275
  }
41035
41276
  function parseHexByte(string, lowerBound, index$2) {
41036
41277
  var r$2 = parseHex4Bits(string, index$2);
@@ -41077,7 +41318,7 @@ var require_bn = __commonJSMin((exports, module) => {
41077
41318
  if (c$1 >= 49) b = c$1 - 49 + 10;
41078
41319
  else if (c$1 >= 17) b = c$1 - 17 + 10;
41079
41320
  else b = c$1;
41080
- assert$54(c$1 >= 0 && b < mul, "Invalid character");
41321
+ assert$55(c$1 >= 0 && b < mul, "Invalid character");
41081
41322
  r$2 += b;
41082
41323
  }
41083
41324
  return r$2;
@@ -41124,7 +41365,7 @@ var require_bn = __commonJSMin((exports, module) => {
41124
41365
  BN$14.prototype._move = function _move(dest) {
41125
41366
  move(dest, this);
41126
41367
  };
41127
- BN$14.prototype.clone = function clone$20() {
41368
+ BN$14.prototype.clone = function clone$21() {
41128
41369
  var r$2 = new BN$14(null);
41129
41370
  this.copy(r$2);
41130
41371
  return r$2;
@@ -41298,20 +41539,20 @@ var require_bn = __commonJSMin((exports, module) => {
41298
41539
  if (this.negative !== 0) out = "-" + out;
41299
41540
  return out;
41300
41541
  }
41301
- assert$54(false, "Base should be between 2 and 36");
41542
+ assert$55(false, "Base should be between 2 and 36");
41302
41543
  };
41303
41544
  BN$14.prototype.toNumber = function toNumber$8() {
41304
41545
  var ret = this.words[0];
41305
41546
  if (this.length === 2) ret += this.words[1] * 67108864;
41306
41547
  else if (this.length === 3 && this.words[2] === 1) ret += 4503599627370496 + this.words[1] * 67108864;
41307
- else if (this.length > 2) assert$54(false, "Number can only safely store up to 53 bits");
41548
+ else if (this.length > 2) assert$55(false, "Number can only safely store up to 53 bits");
41308
41549
  return this.negative !== 0 ? -ret : ret;
41309
41550
  };
41310
41551
  BN$14.prototype.toJSON = function toJSON() {
41311
41552
  return this.toString(16, 2);
41312
41553
  };
41313
- if (Buffer$27) BN$14.prototype.toBuffer = function toBuffer$5(endian, length) {
41314
- return this.toArrayLike(Buffer$27, endian, length);
41554
+ if (Buffer$29) BN$14.prototype.toBuffer = function toBuffer$5(endian, length) {
41555
+ return this.toArrayLike(Buffer$29, endian, length);
41315
41556
  };
41316
41557
  BN$14.prototype.toArray = function toArray$8(endian, length) {
41317
41558
  return this.toArrayLike(Array, endian, length);
@@ -41324,8 +41565,8 @@ var require_bn = __commonJSMin((exports, module) => {
41324
41565
  this._strip();
41325
41566
  var byteLength$2 = this.byteLength();
41326
41567
  var reqLength = length || Math.max(1, byteLength$2);
41327
- assert$54(byteLength$2 <= reqLength, "byte array longer than desired length");
41328
- assert$54(reqLength > 0, "Requested array length <= 0");
41568
+ assert$55(byteLength$2 <= reqLength, "byte array longer than desired length");
41569
+ assert$55(reqLength > 0, "Requested array length <= 0");
41329
41570
  var res = allocate(ArrayType, reqLength);
41330
41571
  var postfix = endian === "le" ? "LE" : "BE";
41331
41572
  this["_toArrayLike" + postfix](res, byteLength$2);
@@ -41473,7 +41714,7 @@ var require_bn = __commonJSMin((exports, module) => {
41473
41714
  return this._strip();
41474
41715
  };
41475
41716
  BN$14.prototype.ior = function ior(num) {
41476
- assert$54((this.negative | num.negative) === 0);
41717
+ assert$55((this.negative | num.negative) === 0);
41477
41718
  return this.iuor(num);
41478
41719
  };
41479
41720
  BN$14.prototype.or = function or(num) {
@@ -41493,7 +41734,7 @@ var require_bn = __commonJSMin((exports, module) => {
41493
41734
  return this._strip();
41494
41735
  };
41495
41736
  BN$14.prototype.iand = function iand(num) {
41496
- assert$54((this.negative | num.negative) === 0);
41737
+ assert$55((this.negative | num.negative) === 0);
41497
41738
  return this.iuand(num);
41498
41739
  };
41499
41740
  BN$14.prototype.and = function and(num) {
@@ -41520,7 +41761,7 @@ var require_bn = __commonJSMin((exports, module) => {
41520
41761
  return this._strip();
41521
41762
  };
41522
41763
  BN$14.prototype.ixor = function ixor(num) {
41523
- assert$54((this.negative | num.negative) === 0);
41764
+ assert$55((this.negative | num.negative) === 0);
41524
41765
  return this.iuxor(num);
41525
41766
  };
41526
41767
  BN$14.prototype.xor = function xor$2(num) {
@@ -41532,7 +41773,7 @@ var require_bn = __commonJSMin((exports, module) => {
41532
41773
  return num.clone().iuxor(this);
41533
41774
  };
41534
41775
  BN$14.prototype.inotn = function inotn(width) {
41535
- assert$54(typeof width === "number" && width >= 0);
41776
+ assert$55(typeof width === "number" && width >= 0);
41536
41777
  var bytesNeeded = Math.ceil(width / 26) | 0;
41537
41778
  var bitsLeft = width % 26;
41538
41779
  this._expand(bytesNeeded);
@@ -41545,7 +41786,7 @@ var require_bn = __commonJSMin((exports, module) => {
41545
41786
  return this.clone().inotn(width);
41546
41787
  };
41547
41788
  BN$14.prototype.setn = function setn(bit, val) {
41548
- assert$54(typeof bit === "number" && bit >= 0);
41789
+ assert$55(typeof bit === "number" && bit >= 0);
41549
41790
  var off = bit / 26 | 0;
41550
41791
  var wbit = bit % 26;
41551
41792
  this._expand(off + 1);
@@ -42373,8 +42614,8 @@ var require_bn = __commonJSMin((exports, module) => {
42373
42614
  carry = carry >>> 13;
42374
42615
  }
42375
42616
  for (i$4 = 2 * len$2; i$4 < N; ++i$4) rws[i$4] = 0;
42376
- assert$54(carry === 0);
42377
- assert$54((carry & -8192) === 0);
42617
+ assert$55(carry === 0);
42618
+ assert$55((carry & -8192) === 0);
42378
42619
  };
42379
42620
  FFTM.prototype.stub = function stub(N) {
42380
42621
  var ph = new Array(N);
@@ -42426,8 +42667,8 @@ var require_bn = __commonJSMin((exports, module) => {
42426
42667
  BN$14.prototype.imuln = function imuln(num) {
42427
42668
  var isNegNum = num < 0;
42428
42669
  if (isNegNum) num = -num;
42429
- assert$54(typeof num === "number");
42430
- assert$54(num < 67108864);
42670
+ assert$55(typeof num === "number");
42671
+ assert$55(num < 67108864);
42431
42672
  var carry = 0;
42432
42673
  for (var i$4 = 0; i$4 < this.length; i$4++) {
42433
42674
  var w$1 = (this.words[i$4] | 0) * num;
@@ -42465,7 +42706,7 @@ var require_bn = __commonJSMin((exports, module) => {
42465
42706
  return res;
42466
42707
  };
42467
42708
  BN$14.prototype.iushln = function iushln(bits$1) {
42468
- assert$54(typeof bits$1 === "number" && bits$1 >= 0);
42709
+ assert$55(typeof bits$1 === "number" && bits$1 >= 0);
42469
42710
  var r$2 = bits$1 % 26;
42470
42711
  var s$6 = (bits$1 - r$2) / 26;
42471
42712
  var carryMask = 67108863 >>> 26 - r$2 << 26 - r$2;
@@ -42491,11 +42732,11 @@ var require_bn = __commonJSMin((exports, module) => {
42491
42732
  return this._strip();
42492
42733
  };
42493
42734
  BN$14.prototype.ishln = function ishln(bits$1) {
42494
- assert$54(this.negative === 0);
42735
+ assert$55(this.negative === 0);
42495
42736
  return this.iushln(bits$1);
42496
42737
  };
42497
42738
  BN$14.prototype.iushrn = function iushrn(bits$1, hint, extended) {
42498
- assert$54(typeof bits$1 === "number" && bits$1 >= 0);
42739
+ assert$55(typeof bits$1 === "number" && bits$1 >= 0);
42499
42740
  var h$1;
42500
42741
  if (hint) h$1 = (hint - hint % 26) / 26;
42501
42742
  else h$1 = 0;
@@ -42530,7 +42771,7 @@ var require_bn = __commonJSMin((exports, module) => {
42530
42771
  return this._strip();
42531
42772
  };
42532
42773
  BN$14.prototype.ishrn = function ishrn(bits$1, hint, extended) {
42533
- assert$54(this.negative === 0);
42774
+ assert$55(this.negative === 0);
42534
42775
  return this.iushrn(bits$1, hint, extended);
42535
42776
  };
42536
42777
  BN$14.prototype.shln = function shln(bits$1) {
@@ -42546,7 +42787,7 @@ var require_bn = __commonJSMin((exports, module) => {
42546
42787
  return this.clone().iushrn(bits$1);
42547
42788
  };
42548
42789
  BN$14.prototype.testn = function testn(bit) {
42549
- assert$54(typeof bit === "number" && bit >= 0);
42790
+ assert$55(typeof bit === "number" && bit >= 0);
42550
42791
  var r$2 = bit % 26;
42551
42792
  var s$6 = (bit - r$2) / 26;
42552
42793
  var q = 1 << r$2;
@@ -42555,10 +42796,10 @@ var require_bn = __commonJSMin((exports, module) => {
42555
42796
  return !!(w$1 & q);
42556
42797
  };
42557
42798
  BN$14.prototype.imaskn = function imaskn(bits$1) {
42558
- assert$54(typeof bits$1 === "number" && bits$1 >= 0);
42799
+ assert$55(typeof bits$1 === "number" && bits$1 >= 0);
42559
42800
  var r$2 = bits$1 % 26;
42560
42801
  var s$6 = (bits$1 - r$2) / 26;
42561
- assert$54(this.negative === 0, "imaskn works only with positive numbers");
42802
+ assert$55(this.negative === 0, "imaskn works only with positive numbers");
42562
42803
  if (this.length <= s$6) return this;
42563
42804
  if (r$2 !== 0) s$6++;
42564
42805
  this.length = Math.min(s$6, this.length);
@@ -42572,8 +42813,8 @@ var require_bn = __commonJSMin((exports, module) => {
42572
42813
  return this.clone().imaskn(bits$1);
42573
42814
  };
42574
42815
  BN$14.prototype.iaddn = function iaddn(num) {
42575
- assert$54(typeof num === "number");
42576
- assert$54(num < 67108864);
42816
+ assert$55(typeof num === "number");
42817
+ assert$55(num < 67108864);
42577
42818
  if (num < 0) return this.isubn(-num);
42578
42819
  if (this.negative !== 0) {
42579
42820
  if (this.length === 1 && (this.words[0] | 0) <= num) {
@@ -42599,8 +42840,8 @@ var require_bn = __commonJSMin((exports, module) => {
42599
42840
  return this;
42600
42841
  };
42601
42842
  BN$14.prototype.isubn = function isubn(num) {
42602
- assert$54(typeof num === "number");
42603
- assert$54(num < 67108864);
42843
+ assert$55(typeof num === "number");
42844
+ assert$55(num < 67108864);
42604
42845
  if (num < 0) return this.iaddn(-num);
42605
42846
  if (this.negative !== 0) {
42606
42847
  this.negative = 0;
@@ -42650,7 +42891,7 @@ var require_bn = __commonJSMin((exports, module) => {
42650
42891
  this.words[i$4 + shift] = w$1 & 67108863;
42651
42892
  }
42652
42893
  if (carry === 0) return this._strip();
42653
- assert$54(carry === -1);
42894
+ assert$55(carry === -1);
42654
42895
  carry = 0;
42655
42896
  for (i$4 = 0; i$4 < this.length; i$4++) {
42656
42897
  w$1 = -(this.words[i$4] | 0) + carry;
@@ -42706,7 +42947,7 @@ var require_bn = __commonJSMin((exports, module) => {
42706
42947
  };
42707
42948
  };
42708
42949
  BN$14.prototype.divmod = function divmod(num, mode, positive) {
42709
- assert$54(!num.isZero());
42950
+ assert$55(!num.isZero());
42710
42951
  if (this.isZero()) return {
42711
42952
  div: new BN$14(0),
42712
42953
  mod: new BN$14(0)
@@ -42785,7 +43026,7 @@ var require_bn = __commonJSMin((exports, module) => {
42785
43026
  BN$14.prototype.modrn = function modrn(num) {
42786
43027
  var isNegNum = num < 0;
42787
43028
  if (isNegNum) num = -num;
42788
- assert$54(num <= 67108863);
43029
+ assert$55(num <= 67108863);
42789
43030
  var p$1 = (1 << 26) % num;
42790
43031
  var acc = 0;
42791
43032
  for (var i$4 = this.length - 1; i$4 >= 0; i$4--) acc = (p$1 * acc + (this.words[i$4] | 0)) % num;
@@ -42797,7 +43038,7 @@ var require_bn = __commonJSMin((exports, module) => {
42797
43038
  BN$14.prototype.idivn = function idivn(num) {
42798
43039
  var isNegNum = num < 0;
42799
43040
  if (isNegNum) num = -num;
42800
- assert$54(num <= 67108863);
43041
+ assert$55(num <= 67108863);
42801
43042
  var carry = 0;
42802
43043
  for (var i$4 = this.length - 1; i$4 >= 0; i$4--) {
42803
43044
  var w$1 = (this.words[i$4] | 0) + carry * 67108864;
@@ -42811,8 +43052,8 @@ var require_bn = __commonJSMin((exports, module) => {
42811
43052
  return this.clone().idivn(num);
42812
43053
  };
42813
43054
  BN$14.prototype.egcd = function egcd(p$1) {
42814
- assert$54(p$1.negative === 0);
42815
- assert$54(!p$1.isZero());
43055
+ assert$55(p$1.negative === 0);
43056
+ assert$55(!p$1.isZero());
42816
43057
  var x$1 = this;
42817
43058
  var y$1 = p$1.clone();
42818
43059
  if (x$1.negative !== 0) x$1 = x$1.umod(p$1);
@@ -42871,8 +43112,8 @@ var require_bn = __commonJSMin((exports, module) => {
42871
43112
  };
42872
43113
  };
42873
43114
  BN$14.prototype._invmp = function _invmp(p$1) {
42874
- assert$54(p$1.negative === 0);
42875
- assert$54(!p$1.isZero());
43115
+ assert$55(p$1.negative === 0);
43116
+ assert$55(!p$1.isZero());
42876
43117
  var a$2 = this;
42877
43118
  var b = p$1.clone();
42878
43119
  if (a$2.negative !== 0) a$2 = a$2.umod(p$1);
@@ -42948,7 +43189,7 @@ var require_bn = __commonJSMin((exports, module) => {
42948
43189
  return this.words[0] & num;
42949
43190
  };
42950
43191
  BN$14.prototype.bincn = function bincn(bit) {
42951
- assert$54(typeof bit === "number");
43192
+ assert$55(typeof bit === "number");
42952
43193
  var r$2 = bit % 26;
42953
43194
  var s$6 = (bit - r$2) / 26;
42954
43195
  var q = 1 << r$2;
@@ -42983,7 +43224,7 @@ var require_bn = __commonJSMin((exports, module) => {
42983
43224
  if (this.length > 1) res = 1;
42984
43225
  else {
42985
43226
  if (negative) num = -num;
42986
- assert$54(num <= 67108863, "Number is too big");
43227
+ assert$55(num <= 67108863, "Number is too big");
42987
43228
  var w$1 = this.words[0] | 0;
42988
43229
  res = w$1 === num ? 0 : w$1 < num ? -1 : 1;
42989
43230
  }
@@ -43045,12 +43286,12 @@ var require_bn = __commonJSMin((exports, module) => {
43045
43286
  return new Red(num);
43046
43287
  };
43047
43288
  BN$14.prototype.toRed = function toRed(ctx) {
43048
- assert$54(!this.red, "Already a number in reduction context");
43049
- assert$54(this.negative === 0, "red works only with positives");
43289
+ assert$55(!this.red, "Already a number in reduction context");
43290
+ assert$55(this.negative === 0, "red works only with positives");
43050
43291
  return ctx.convertTo(this)._forceRed(ctx);
43051
43292
  };
43052
43293
  BN$14.prototype.fromRed = function fromRed() {
43053
- assert$54(this.red, "fromRed works only with numbers in reduction context");
43294
+ assert$55(this.red, "fromRed works only with numbers in reduction context");
43054
43295
  return this.red.convertFrom(this);
43055
43296
  };
43056
43297
  BN$14.prototype._forceRed = function _forceRed(ctx) {
@@ -43058,66 +43299,66 @@ var require_bn = __commonJSMin((exports, module) => {
43058
43299
  return this;
43059
43300
  };
43060
43301
  BN$14.prototype.forceRed = function forceRed(ctx) {
43061
- assert$54(!this.red, "Already a number in reduction context");
43302
+ assert$55(!this.red, "Already a number in reduction context");
43062
43303
  return this._forceRed(ctx);
43063
43304
  };
43064
43305
  BN$14.prototype.redAdd = function redAdd(num) {
43065
- assert$54(this.red, "redAdd works only with red numbers");
43306
+ assert$55(this.red, "redAdd works only with red numbers");
43066
43307
  return this.red.add(this, num);
43067
43308
  };
43068
43309
  BN$14.prototype.redIAdd = function redIAdd(num) {
43069
- assert$54(this.red, "redIAdd works only with red numbers");
43310
+ assert$55(this.red, "redIAdd works only with red numbers");
43070
43311
  return this.red.iadd(this, num);
43071
43312
  };
43072
43313
  BN$14.prototype.redSub = function redSub(num) {
43073
- assert$54(this.red, "redSub works only with red numbers");
43314
+ assert$55(this.red, "redSub works only with red numbers");
43074
43315
  return this.red.sub(this, num);
43075
43316
  };
43076
43317
  BN$14.prototype.redISub = function redISub(num) {
43077
- assert$54(this.red, "redISub works only with red numbers");
43318
+ assert$55(this.red, "redISub works only with red numbers");
43078
43319
  return this.red.isub(this, num);
43079
43320
  };
43080
43321
  BN$14.prototype.redShl = function redShl(num) {
43081
- assert$54(this.red, "redShl works only with red numbers");
43322
+ assert$55(this.red, "redShl works only with red numbers");
43082
43323
  return this.red.shl(this, num);
43083
43324
  };
43084
43325
  BN$14.prototype.redMul = function redMul(num) {
43085
- assert$54(this.red, "redMul works only with red numbers");
43326
+ assert$55(this.red, "redMul works only with red numbers");
43086
43327
  this.red._verify2(this, num);
43087
43328
  return this.red.mul(this, num);
43088
43329
  };
43089
43330
  BN$14.prototype.redIMul = function redIMul(num) {
43090
- assert$54(this.red, "redMul works only with red numbers");
43331
+ assert$55(this.red, "redMul works only with red numbers");
43091
43332
  this.red._verify2(this, num);
43092
43333
  return this.red.imul(this, num);
43093
43334
  };
43094
43335
  BN$14.prototype.redSqr = function redSqr() {
43095
- assert$54(this.red, "redSqr works only with red numbers");
43336
+ assert$55(this.red, "redSqr works only with red numbers");
43096
43337
  this.red._verify1(this);
43097
43338
  return this.red.sqr(this);
43098
43339
  };
43099
43340
  BN$14.prototype.redISqr = function redISqr() {
43100
- assert$54(this.red, "redISqr works only with red numbers");
43341
+ assert$55(this.red, "redISqr works only with red numbers");
43101
43342
  this.red._verify1(this);
43102
43343
  return this.red.isqr(this);
43103
43344
  };
43104
43345
  BN$14.prototype.redSqrt = function redSqrt() {
43105
- assert$54(this.red, "redSqrt works only with red numbers");
43346
+ assert$55(this.red, "redSqrt works only with red numbers");
43106
43347
  this.red._verify1(this);
43107
43348
  return this.red.sqrt(this);
43108
43349
  };
43109
43350
  BN$14.prototype.redInvm = function redInvm() {
43110
- assert$54(this.red, "redInvm works only with red numbers");
43351
+ assert$55(this.red, "redInvm works only with red numbers");
43111
43352
  this.red._verify1(this);
43112
43353
  return this.red.invm(this);
43113
43354
  };
43114
43355
  BN$14.prototype.redNeg = function redNeg() {
43115
- assert$54(this.red, "redNeg works only with red numbers");
43356
+ assert$55(this.red, "redNeg works only with red numbers");
43116
43357
  this.red._verify1(this);
43117
43358
  return this.red.neg(this);
43118
43359
  };
43119
43360
  BN$14.prototype.redPow = function redPow(num) {
43120
- assert$54(this.red && !num.red, "redPow(normalNum)");
43361
+ assert$55(this.red && !num.red, "redPow(normalNum)");
43121
43362
  this.red._verify1(this);
43122
43363
  return this.red.pow(this, num);
43123
43364
  };
@@ -43247,18 +43488,18 @@ var require_bn = __commonJSMin((exports, module) => {
43247
43488
  this.m = prime.p;
43248
43489
  this.prime = prime;
43249
43490
  } else {
43250
- assert$54(m$3.gtn(1), "modulus must be greater than 1");
43491
+ assert$55(m$3.gtn(1), "modulus must be greater than 1");
43251
43492
  this.m = m$3;
43252
43493
  this.prime = null;
43253
43494
  }
43254
43495
  }
43255
43496
  Red.prototype._verify1 = function _verify1(a$2) {
43256
- assert$54(a$2.negative === 0, "red works only with positives");
43257
- assert$54(a$2.red, "red works only with red numbers");
43497
+ assert$55(a$2.negative === 0, "red works only with positives");
43498
+ assert$55(a$2.red, "red works only with red numbers");
43258
43499
  };
43259
43500
  Red.prototype._verify2 = function _verify2(a$2, b) {
43260
- assert$54((a$2.negative | b.negative) === 0, "red works only with positives");
43261
- assert$54(a$2.red && a$2.red === b.red, "red works only with red numbers");
43501
+ assert$55((a$2.negative | b.negative) === 0, "red works only with positives");
43502
+ assert$55(a$2.red && a$2.red === b.red, "red works only with red numbers");
43262
43503
  };
43263
43504
  Red.prototype.imod = function imod(a$2) {
43264
43505
  if (this.prime) return this.prime.ireduce(a$2)._forceRed(this);
@@ -43314,7 +43555,7 @@ var require_bn = __commonJSMin((exports, module) => {
43314
43555
  Red.prototype.sqrt = function sqrt(a$2) {
43315
43556
  if (a$2.isZero()) return a$2.clone();
43316
43557
  var mod3 = this.m.andln(3);
43317
- assert$54(mod3 % 2 === 1);
43558
+ assert$55(mod3 % 2 === 1);
43318
43559
  if (mod3 === 3) {
43319
43560
  var pow$1 = this.m.add(new BN$14(1)).iushrn(2);
43320
43561
  return this.pow(a$2, pow$1);
@@ -43325,7 +43566,7 @@ var require_bn = __commonJSMin((exports, module) => {
43325
43566
  s$6++;
43326
43567
  q.iushrn(1);
43327
43568
  }
43328
- assert$54(!q.isZero());
43569
+ assert$55(!q.isZero());
43329
43570
  var one = new BN$14(1).toRed(this);
43330
43571
  var nOne = one.redNeg();
43331
43572
  var lpow = this.m.subn(1).iushrn(1);
@@ -43339,7 +43580,7 @@ var require_bn = __commonJSMin((exports, module) => {
43339
43580
  while (t$7.cmp(one) !== 0) {
43340
43581
  var tmp = t$7;
43341
43582
  for (var i$4 = 0; tmp.cmp(one) !== 0; i$4++) tmp = tmp.redSqr();
43342
- assert$54(i$4 < m$3);
43583
+ assert$55(i$4 < m$3);
43343
43584
  var b = this.pow(c$1, new BN$14(1).iushln(m$3 - i$4 - 1));
43344
43585
  r$2 = r$2.redMul(b);
43345
43586
  c$1 = b.redSqr();
@@ -45702,11 +45943,11 @@ var RootFactory = class RootFactory {
45702
45943
  static generate(root$11, schema$2, args$1) {
45703
45944
  (0, import_assert.default)(root$11, "Must be invoked on a Joi instance.");
45704
45945
  const cloned = schema$2.clone();
45705
- const originalDescribe$1 = cloned.describe.bind(cloned);
45946
+ const originalDescribe = cloned.describe.bind(cloned);
45706
45947
  cloned.describe = function() {
45707
45948
  const cached = RootFactory.$_cachedDescriptions.get(this);
45708
45949
  if (cached) return cached;
45709
- const result = originalDescribe$1();
45950
+ const result = originalDescribe();
45710
45951
  RootFactory.$_cachedDescriptions.set(this, result);
45711
45952
  return result;
45712
45953
  };
@@ -143176,7 +143417,7 @@ const encode = (schema$2, options = {}) => {
143176
143417
  });
143177
143418
  }
143178
143419
  const json$1 = JSON.stringify({
143179
- version: "0.1.0-master-cb87a6f9",
143420
+ version: "0.1.0-master-952eca46",
143180
143421
  schema: description$2
143181
143422
  }, (key, value) => {
143182
143423
  if (typeof value === "bigint") return value.toString();
@@ -143224,9 +143465,9 @@ const decode = (base64, options = {}) => {
143224
143465
  });
143225
143466
  if (!isPlainObject(description$2) || !("version" in description$2) || !("schema" in description$2) || typeof description$2.version !== "string" || !isPlainObject(description$2.schema)) throw new TypeError("Not a valid encoded schema");
143226
143467
  const { version: schemaVersion, schema: schema$2 } = description$2;
143227
- if (import_semver.valid("0.1.0-master-cb87a6f9")) {
143468
+ if (import_semver.valid("0.1.0-master-952eca46")) {
143228
143469
  if (!import_semver.valid(import_semver.coerce(schemaVersion))) throw new TypeError(`Invalid schema version: ${schemaVersion}`);
143229
- if (import_semver.gt(import_semver.coerce(schemaVersion), "0.1.0-master-cb87a6f9")) throw new TypeError(`Schema version ${schemaVersion} is not compatible with current version 0.1.0-master-cb87a6f9`);
143470
+ if (import_semver.gt(import_semver.coerce(schemaVersion), "0.1.0-master-952eca46")) throw new TypeError(`Schema version ${schemaVersion} is not compatible with current version 0.1.0-master-952eca46`);
143230
143471
  }
143231
143472
  return validator.build(schema$2);
143232
143473
  };
@@ -144680,7 +144921,7 @@ init_esm();
144680
144921
  var import_lib = __toESM(require_lib$3());
144681
144922
  var import_lib$1 = __toESM(require_lib$2());
144682
144923
  var import_lib$2 = __toESM(require_lib());
144683
- const version = "0.1.0-master-cb87a6f9";
144924
+ const version = "0.1.0-master-952eca46";
144684
144925
  Object.defineProperty(exports, "ValidationError", {
144685
144926
  enumerable: true,
144686
144927
  get: function() {