@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.mjs CHANGED
@@ -52,13 +52,13 @@ var require_stringify = __commonJSMin((exports, module) => {
52
52
  var require_assert$1 = __commonJSMin((exports, module) => {
53
53
  const AssertError$2 = require_assertError();
54
54
  const Stringify = require_stringify();
55
- const assert$53 = module.exports = function(condition, ...args$1) {
55
+ const assert$54 = module.exports = function(condition, ...args$1) {
56
56
  if (condition) return;
57
57
  if (args$1.length === 1 && args$1[0] instanceof Error) throw args$1[0];
58
58
  const msgs = args$1.filter((arg) => arg !== "").map((arg) => {
59
59
  return typeof arg === "string" ? arg : arg instanceof Error ? arg.message : Stringify(arg);
60
60
  });
61
- throw new AssertError$2(msgs.join(" "), assert$53);
61
+ throw new AssertError$2(msgs.join(" "), assert$54);
62
62
  };
63
63
  });
64
64
  var dist_exports = {};
@@ -250,14 +250,14 @@ var init_dist$1 = __esmMin(() => {
250
250
  const base64 = base64Js$1;
251
251
  const ieee754$1$1 = ieee754$1;
252
252
  const customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
253
- exports$1.Buffer = Buffer$27;
253
+ exports$1.Buffer = Buffer$29;
254
254
  exports$1.SlowBuffer = SlowBuffer$1;
255
255
  exports$1.INSPECT_MAX_BYTES = 50;
256
256
  const K_MAX_LENGTH = 2147483647;
257
257
  exports$1.kMaxLength = K_MAX_LENGTH;
258
258
  const { Uint8Array: GlobalUint8Array, ArrayBuffer: GlobalArrayBuffer, SharedArrayBuffer: GlobalSharedArrayBuffer } = globalThis;
259
- Buffer$27.TYPED_ARRAY_SUPPORT = typedArraySupport();
260
- 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.");
259
+ Buffer$29.TYPED_ARRAY_SUPPORT = typedArraySupport();
260
+ 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.");
261
261
  function typedArraySupport() {
262
262
  try {
263
263
  const arr = new GlobalUint8Array(1);
@@ -271,34 +271,34 @@ var init_dist$1 = __esmMin(() => {
271
271
  return false;
272
272
  }
273
273
  }
274
- Object.defineProperty(Buffer$27.prototype, "parent", {
274
+ Object.defineProperty(Buffer$29.prototype, "parent", {
275
275
  enumerable: true,
276
276
  get: function() {
277
- if (!Buffer$27.isBuffer(this)) return void 0;
277
+ if (!Buffer$29.isBuffer(this)) return void 0;
278
278
  return this.buffer;
279
279
  }
280
280
  });
281
- Object.defineProperty(Buffer$27.prototype, "offset", {
281
+ Object.defineProperty(Buffer$29.prototype, "offset", {
282
282
  enumerable: true,
283
283
  get: function() {
284
- if (!Buffer$27.isBuffer(this)) return void 0;
284
+ if (!Buffer$29.isBuffer(this)) return void 0;
285
285
  return this.byteOffset;
286
286
  }
287
287
  });
288
288
  function createBuffer(length) {
289
289
  if (length > K_MAX_LENGTH) throw new RangeError("The value \"" + length + "\" is invalid for option \"size\"");
290
290
  const buf = new GlobalUint8Array(length);
291
- Object.setPrototypeOf(buf, Buffer$27.prototype);
291
+ Object.setPrototypeOf(buf, Buffer$29.prototype);
292
292
  return buf;
293
293
  }
294
- function Buffer$27(arg, encodingOrOffset, length) {
294
+ function Buffer$29(arg, encodingOrOffset, length) {
295
295
  if (typeof arg === "number") {
296
296
  if (typeof encodingOrOffset === "string") throw new TypeError("The \"string\" argument must be of type string. Received type number");
297
297
  return allocUnsafe$1(arg);
298
298
  }
299
299
  return from$2(arg, encodingOrOffset, length);
300
300
  }
301
- Buffer$27.poolSize = 8192;
301
+ Buffer$29.poolSize = 8192;
302
302
  function from$2(value, encodingOrOffset, length) {
303
303
  if (typeof value === "string") return fromString(value, encodingOrOffset);
304
304
  if (GlobalArrayBuffer.isView(value)) return fromArrayView(value);
@@ -307,17 +307,17 @@ var init_dist$1 = __esmMin(() => {
307
307
  if (typeof GlobalSharedArrayBuffer !== "undefined" && (isInstance(value, GlobalSharedArrayBuffer) || value && isInstance(value.buffer, GlobalSharedArrayBuffer))) return fromArrayBuffer(value, encodingOrOffset, length);
308
308
  if (typeof value === "number") throw new TypeError("The \"value\" argument must not be of type number. Received type number");
309
309
  const valueOf = value.valueOf && value.valueOf();
310
- if (valueOf != null && valueOf !== value) return Buffer$27.from(valueOf, encodingOrOffset, length);
310
+ if (valueOf != null && valueOf !== value) return Buffer$29.from(valueOf, encodingOrOffset, length);
311
311
  const b = fromObject(value);
312
312
  if (b) return b;
313
- if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") return Buffer$27.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
313
+ if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") return Buffer$29.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
314
314
  throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
315
315
  }
316
- Buffer$27.from = function(value, encodingOrOffset, length) {
316
+ Buffer$29.from = function(value, encodingOrOffset, length) {
317
317
  return from$2(value, encodingOrOffset, length);
318
318
  };
319
- Object.setPrototypeOf(Buffer$27.prototype, GlobalUint8Array.prototype);
320
- Object.setPrototypeOf(Buffer$27, GlobalUint8Array);
319
+ Object.setPrototypeOf(Buffer$29.prototype, GlobalUint8Array.prototype);
320
+ Object.setPrototypeOf(Buffer$29, GlobalUint8Array);
321
321
  function assertSize$1(size) {
322
322
  if (typeof size !== "number") throw new TypeError("\"size\" argument must be of type number");
323
323
  else if (size < 0) throw new RangeError("The value \"" + size + "\" is invalid for option \"size\"");
@@ -328,22 +328,22 @@ var init_dist$1 = __esmMin(() => {
328
328
  if (fill !== void 0) return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
329
329
  return createBuffer(size);
330
330
  }
331
- Buffer$27.alloc = function(size, fill, encoding) {
331
+ Buffer$29.alloc = function(size, fill, encoding) {
332
332
  return alloc(size, fill, encoding);
333
333
  };
334
334
  function allocUnsafe$1(size) {
335
335
  assertSize$1(size);
336
336
  return createBuffer(size < 0 ? 0 : checked(size) | 0);
337
337
  }
338
- Buffer$27.allocUnsafe = function(size) {
338
+ Buffer$29.allocUnsafe = function(size) {
339
339
  return allocUnsafe$1(size);
340
340
  };
341
- Buffer$27.allocUnsafeSlow = function(size) {
341
+ Buffer$29.allocUnsafeSlow = function(size) {
342
342
  return allocUnsafe$1(size);
343
343
  };
344
344
  function fromString(string, encoding) {
345
345
  if (typeof encoding !== "string" || encoding === "") encoding = "utf8";
346
- if (!Buffer$27.isEncoding(encoding)) throw new TypeError("Unknown encoding: " + encoding);
346
+ if (!Buffer$29.isEncoding(encoding)) throw new TypeError("Unknown encoding: " + encoding);
347
347
  const length = byteLength$2(string, encoding) | 0;
348
348
  let buf = createBuffer(length);
349
349
  const actual = buf.write(string, encoding);
@@ -370,11 +370,11 @@ var init_dist$1 = __esmMin(() => {
370
370
  if (byteOffset === void 0 && length === void 0) buf = new GlobalUint8Array(array);
371
371
  else if (length === void 0) buf = new GlobalUint8Array(array, byteOffset);
372
372
  else buf = new GlobalUint8Array(array, byteOffset, length);
373
- Object.setPrototypeOf(buf, Buffer$27.prototype);
373
+ Object.setPrototypeOf(buf, Buffer$29.prototype);
374
374
  return buf;
375
375
  }
376
376
  function fromObject(obj) {
377
- if (Buffer$27.isBuffer(obj)) {
377
+ if (Buffer$29.isBuffer(obj)) {
378
378
  const len$2 = checked(obj.length) | 0;
379
379
  const buf = createBuffer(len$2);
380
380
  if (buf.length === 0) return buf;
@@ -393,15 +393,15 @@ var init_dist$1 = __esmMin(() => {
393
393
  }
394
394
  function SlowBuffer$1(length) {
395
395
  if (+length != length) length = 0;
396
- return Buffer$27.alloc(+length);
396
+ return Buffer$29.alloc(+length);
397
397
  }
398
- Buffer$27.isBuffer = function isBuffer$6(b) {
399
- return b != null && b._isBuffer === true && b !== Buffer$27.prototype;
398
+ Buffer$29.isBuffer = function isBuffer$6(b) {
399
+ return b != null && b._isBuffer === true && b !== Buffer$29.prototype;
400
400
  };
401
- Buffer$27.compare = function compare$16(a$2, b) {
402
- if (isInstance(a$2, GlobalUint8Array)) a$2 = Buffer$27.from(a$2, a$2.offset, a$2.byteLength);
403
- if (isInstance(b, GlobalUint8Array)) b = Buffer$27.from(b, b.offset, b.byteLength);
404
- 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");
401
+ Buffer$29.compare = function compare$16(a$2, b) {
402
+ if (isInstance(a$2, GlobalUint8Array)) a$2 = Buffer$29.from(a$2, a$2.offset, a$2.byteLength);
403
+ if (isInstance(b, GlobalUint8Array)) b = Buffer$29.from(b, b.offset, b.byteLength);
404
+ 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");
405
405
  if (a$2 === b) return 0;
406
406
  let x$1 = a$2.length;
407
407
  let y$1 = b.length;
@@ -414,7 +414,7 @@ var init_dist$1 = __esmMin(() => {
414
414
  if (y$1 < x$1) return 1;
415
415
  return 0;
416
416
  };
417
- Buffer$27.isEncoding = function isEncoding$1(encoding) {
417
+ Buffer$29.isEncoding = function isEncoding$1(encoding) {
418
418
  switch (String(encoding).toLowerCase()) {
419
419
  case "hex":
420
420
  case "utf8":
@@ -430,30 +430,30 @@ var init_dist$1 = __esmMin(() => {
430
430
  default: return false;
431
431
  }
432
432
  };
433
- Buffer$27.concat = function concat$1(list, length) {
433
+ Buffer$29.concat = function concat$1(list, length) {
434
434
  if (!Array.isArray(list)) throw new TypeError("\"list\" argument must be an Array of Buffers");
435
- if (list.length === 0) return Buffer$27.alloc(0);
435
+ if (list.length === 0) return Buffer$29.alloc(0);
436
436
  let i$4;
437
437
  if (length === void 0) {
438
438
  length = 0;
439
439
  for (i$4 = 0; i$4 < list.length; ++i$4) length += list[i$4].length;
440
440
  }
441
- const buffer$3 = Buffer$27.allocUnsafe(length);
441
+ const buffer$3 = Buffer$29.allocUnsafe(length);
442
442
  let pos = 0;
443
443
  for (i$4 = 0; i$4 < list.length; ++i$4) {
444
444
  let buf = list[i$4];
445
445
  if (isInstance(buf, GlobalUint8Array)) if (pos + buf.length > buffer$3.length) {
446
- if (!Buffer$27.isBuffer(buf)) buf = Buffer$27.from(buf);
446
+ if (!Buffer$29.isBuffer(buf)) buf = Buffer$29.from(buf);
447
447
  buf.copy(buffer$3, pos);
448
448
  } else GlobalUint8Array.prototype.set.call(buffer$3, buf, pos);
449
- else if (!Buffer$27.isBuffer(buf)) throw new TypeError("\"list\" argument must be an Array of Buffers");
449
+ else if (!Buffer$29.isBuffer(buf)) throw new TypeError("\"list\" argument must be an Array of Buffers");
450
450
  else buf.copy(buffer$3, pos);
451
451
  pos += buf.length;
452
452
  }
453
453
  return buffer$3;
454
454
  };
455
455
  function byteLength$2(string, encoding) {
456
- if (Buffer$27.isBuffer(string)) return string.length;
456
+ if (Buffer$29.isBuffer(string)) return string.length;
457
457
  if (GlobalArrayBuffer.isView(string) || isInstance(string, GlobalArrayBuffer)) return string.byteLength;
458
458
  if (typeof string !== "string") throw new TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type " + typeof string);
459
459
  const len$2 = string.length;
@@ -478,7 +478,7 @@ var init_dist$1 = __esmMin(() => {
478
478
  loweredCase = true;
479
479
  }
480
480
  }
481
- Buffer$27.byteLength = byteLength$2;
481
+ Buffer$29.byteLength = byteLength$2;
482
482
  function slowToString(encoding, start, end) {
483
483
  let loweredCase = false;
484
484
  if (start === void 0 || start < 0) start = 0;
@@ -507,19 +507,19 @@ var init_dist$1 = __esmMin(() => {
507
507
  loweredCase = true;
508
508
  }
509
509
  }
510
- Buffer$27.prototype._isBuffer = true;
510
+ Buffer$29.prototype._isBuffer = true;
511
511
  function swap(b, n$4, m$3) {
512
512
  const i$4 = b[n$4];
513
513
  b[n$4] = b[m$3];
514
514
  b[m$3] = i$4;
515
515
  }
516
- Buffer$27.prototype.swap16 = function swap16() {
516
+ Buffer$29.prototype.swap16 = function swap16() {
517
517
  const len$2 = this.length;
518
518
  if (len$2 % 2 !== 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
519
519
  for (let i$4 = 0; i$4 < len$2; i$4 += 2) swap(this, i$4, i$4 + 1);
520
520
  return this;
521
521
  };
522
- Buffer$27.prototype.swap32 = function swap32() {
522
+ Buffer$29.prototype.swap32 = function swap32() {
523
523
  const len$2 = this.length;
524
524
  if (len$2 % 4 !== 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
525
525
  for (let i$4 = 0; i$4 < len$2; i$4 += 4) {
@@ -528,7 +528,7 @@ var init_dist$1 = __esmMin(() => {
528
528
  }
529
529
  return this;
530
530
  };
531
- Buffer$27.prototype.swap64 = function swap64() {
531
+ Buffer$29.prototype.swap64 = function swap64() {
532
532
  const len$2 = this.length;
533
533
  if (len$2 % 8 !== 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
534
534
  for (let i$4 = 0; i$4 < len$2; i$4 += 8) {
@@ -539,29 +539,29 @@ var init_dist$1 = __esmMin(() => {
539
539
  }
540
540
  return this;
541
541
  };
542
- Buffer$27.prototype.toString = function toString$4() {
542
+ Buffer$29.prototype.toString = function toString$4() {
543
543
  const length = this.length;
544
544
  if (length === 0) return "";
545
545
  if (arguments.length === 0) return utf8Slice(this, 0, length);
546
546
  return slowToString.apply(this, arguments);
547
547
  };
548
- Buffer$27.prototype.toLocaleString = Buffer$27.prototype.toString;
549
- Buffer$27.prototype.equals = function equals(b) {
550
- if (!Buffer$27.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
548
+ Buffer$29.prototype.toLocaleString = Buffer$29.prototype.toString;
549
+ Buffer$29.prototype.equals = function equals(b) {
550
+ if (!Buffer$29.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
551
551
  if (this === b) return true;
552
- return Buffer$27.compare(this, b) === 0;
552
+ return Buffer$29.compare(this, b) === 0;
553
553
  };
554
- Buffer$27.prototype.inspect = function inspect$4() {
554
+ Buffer$29.prototype.inspect = function inspect$4() {
555
555
  let str = "";
556
556
  const max$3 = exports$1.INSPECT_MAX_BYTES;
557
557
  str = this.toString("hex", 0, max$3).replace(/(.{2})/g, "$1 ").trim();
558
558
  if (this.length > max$3) str += " ... ";
559
559
  return "<Buffer " + str + ">";
560
560
  };
561
- if (customInspectSymbol) Buffer$27.prototype[customInspectSymbol] = Buffer$27.prototype.inspect;
562
- Buffer$27.prototype.compare = function compare$16(target, start, end, thisStart, thisEnd) {
563
- if (isInstance(target, GlobalUint8Array)) target = Buffer$27.from(target, target.offset, target.byteLength);
564
- if (!Buffer$27.isBuffer(target)) throw new TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof target);
561
+ if (customInspectSymbol) Buffer$29.prototype[customInspectSymbol] = Buffer$29.prototype.inspect;
562
+ Buffer$29.prototype.compare = function compare$16(target, start, end, thisStart, thisEnd) {
563
+ if (isInstance(target, GlobalUint8Array)) target = Buffer$29.from(target, target.offset, target.byteLength);
564
+ if (!Buffer$29.isBuffer(target)) throw new TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof target);
565
565
  if (start === void 0) start = 0;
566
566
  if (end === void 0) end = target ? target.length : 0;
567
567
  if (thisStart === void 0) thisStart = 0;
@@ -603,8 +603,8 @@ var init_dist$1 = __esmMin(() => {
603
603
  else byteOffset = buffer$3.length - 1;
604
604
  else if (byteOffset < 0) if (dir) byteOffset = 0;
605
605
  else return -1;
606
- if (typeof val === "string") val = Buffer$27.from(val, encoding);
607
- if (Buffer$27.isBuffer(val)) {
606
+ if (typeof val === "string") val = Buffer$29.from(val, encoding);
607
+ if (Buffer$29.isBuffer(val)) {
608
608
  if (val.length === 0) return -1;
609
609
  return arrayIndexOf(buffer$3, val, byteOffset, encoding, dir);
610
610
  } else if (typeof val === "number") {
@@ -656,13 +656,13 @@ var init_dist$1 = __esmMin(() => {
656
656
  }
657
657
  return -1;
658
658
  }
659
- Buffer$27.prototype.includes = function includes$2(val, byteOffset, encoding) {
659
+ Buffer$29.prototype.includes = function includes$2(val, byteOffset, encoding) {
660
660
  return this.indexOf(val, byteOffset, encoding) !== -1;
661
661
  };
662
- Buffer$27.prototype.indexOf = function indexOf$3(val, byteOffset, encoding) {
662
+ Buffer$29.prototype.indexOf = function indexOf$3(val, byteOffset, encoding) {
663
663
  return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
664
664
  };
665
- Buffer$27.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
665
+ Buffer$29.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
666
666
  return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
667
667
  };
668
668
  function hexWrite(buf, string, offset$2, length) {
@@ -695,7 +695,7 @@ var init_dist$1 = __esmMin(() => {
695
695
  function ucs2Write(buf, string, offset$2, length) {
696
696
  return blitBuffer(utf16leToBytes(string, buf.length - offset$2), buf, offset$2, length);
697
697
  }
698
- Buffer$27.prototype.write = function write(string, offset$2, length, encoding) {
698
+ Buffer$29.prototype.write = function write(string, offset$2, length, encoding) {
699
699
  if (offset$2 === void 0) {
700
700
  encoding = "utf8";
701
701
  length = this.length;
@@ -737,7 +737,7 @@ var init_dist$1 = __esmMin(() => {
737
737
  loweredCase = true;
738
738
  }
739
739
  };
740
- Buffer$27.prototype.toJSON = function toJSON() {
740
+ Buffer$29.prototype.toJSON = function toJSON() {
741
741
  return {
742
742
  type: "Buffer",
743
743
  data: Array.prototype.slice.call(this._arr || this, 0)
@@ -834,7 +834,7 @@ var init_dist$1 = __esmMin(() => {
834
834
  for (let i$4 = 0; i$4 < bytes.length - 1; i$4 += 2) res += String.fromCharCode(bytes[i$4] + bytes[i$4 + 1] * 256);
835
835
  return res;
836
836
  }
837
- Buffer$27.prototype.slice = function slice$1(start, end) {
837
+ Buffer$29.prototype.slice = function slice$1(start, end) {
838
838
  const len$2 = this.length;
839
839
  start = ~~start;
840
840
  end = end === void 0 ? len$2 : ~~end;
@@ -848,14 +848,14 @@ var init_dist$1 = __esmMin(() => {
848
848
  } else if (end > len$2) end = len$2;
849
849
  if (end < start) end = start;
850
850
  const newBuf = this.subarray(start, end);
851
- Object.setPrototypeOf(newBuf, Buffer$27.prototype);
851
+ Object.setPrototypeOf(newBuf, Buffer$29.prototype);
852
852
  return newBuf;
853
853
  };
854
854
  function checkOffset(offset$2, ext, length) {
855
855
  if (offset$2 % 1 !== 0 || offset$2 < 0) throw new RangeError("offset is not uint");
856
856
  if (offset$2 + ext > length) throw new RangeError("Trying to access beyond buffer length");
857
857
  }
858
- Buffer$27.prototype.readUintLE = Buffer$27.prototype.readUIntLE = function readUIntLE(offset$2, byteLength$3, noAssert) {
858
+ Buffer$29.prototype.readUintLE = Buffer$29.prototype.readUIntLE = function readUIntLE(offset$2, byteLength$3, noAssert) {
859
859
  offset$2 = offset$2 >>> 0;
860
860
  byteLength$3 = byteLength$3 >>> 0;
861
861
  if (!noAssert) checkOffset(offset$2, byteLength$3, this.length);
@@ -865,7 +865,7 @@ var init_dist$1 = __esmMin(() => {
865
865
  while (++i$4 < byteLength$3 && (mul *= 256)) val += this[offset$2 + i$4] * mul;
866
866
  return val;
867
867
  };
868
- Buffer$27.prototype.readUintBE = Buffer$27.prototype.readUIntBE = function readUIntBE(offset$2, byteLength$3, noAssert) {
868
+ Buffer$29.prototype.readUintBE = Buffer$29.prototype.readUIntBE = function readUIntBE(offset$2, byteLength$3, noAssert) {
869
869
  offset$2 = offset$2 >>> 0;
870
870
  byteLength$3 = byteLength$3 >>> 0;
871
871
  if (!noAssert) checkOffset(offset$2, byteLength$3, this.length);
@@ -874,32 +874,32 @@ var init_dist$1 = __esmMin(() => {
874
874
  while (byteLength$3 > 0 && (mul *= 256)) val += this[offset$2 + --byteLength$3] * mul;
875
875
  return val;
876
876
  };
877
- Buffer$27.prototype.readUint8 = Buffer$27.prototype.readUInt8 = function readUInt8(offset$2, noAssert) {
877
+ Buffer$29.prototype.readUint8 = Buffer$29.prototype.readUInt8 = function readUInt8(offset$2, noAssert) {
878
878
  offset$2 = offset$2 >>> 0;
879
879
  if (!noAssert) checkOffset(offset$2, 1, this.length);
880
880
  return this[offset$2];
881
881
  };
882
- Buffer$27.prototype.readUint16LE = Buffer$27.prototype.readUInt16LE = function readUInt16LE(offset$2, noAssert) {
882
+ Buffer$29.prototype.readUint16LE = Buffer$29.prototype.readUInt16LE = function readUInt16LE(offset$2, noAssert) {
883
883
  offset$2 = offset$2 >>> 0;
884
884
  if (!noAssert) checkOffset(offset$2, 2, this.length);
885
885
  return this[offset$2] | this[offset$2 + 1] << 8;
886
886
  };
887
- Buffer$27.prototype.readUint16BE = Buffer$27.prototype.readUInt16BE = function readUInt16BE(offset$2, noAssert) {
887
+ Buffer$29.prototype.readUint16BE = Buffer$29.prototype.readUInt16BE = function readUInt16BE(offset$2, noAssert) {
888
888
  offset$2 = offset$2 >>> 0;
889
889
  if (!noAssert) checkOffset(offset$2, 2, this.length);
890
890
  return this[offset$2] << 8 | this[offset$2 + 1];
891
891
  };
892
- Buffer$27.prototype.readUint32LE = Buffer$27.prototype.readUInt32LE = function readUInt32LE(offset$2, noAssert) {
892
+ Buffer$29.prototype.readUint32LE = Buffer$29.prototype.readUInt32LE = function readUInt32LE(offset$2, noAssert) {
893
893
  offset$2 = offset$2 >>> 0;
894
894
  if (!noAssert) checkOffset(offset$2, 4, this.length);
895
895
  return (this[offset$2] | this[offset$2 + 1] << 8 | this[offset$2 + 2] << 16) + this[offset$2 + 3] * 16777216;
896
896
  };
897
- Buffer$27.prototype.readUint32BE = Buffer$27.prototype.readUInt32BE = function readUInt32BE(offset$2, noAssert) {
897
+ Buffer$29.prototype.readUint32BE = Buffer$29.prototype.readUInt32BE = function readUInt32BE(offset$2, noAssert) {
898
898
  offset$2 = offset$2 >>> 0;
899
899
  if (!noAssert) checkOffset(offset$2, 4, this.length);
900
900
  return this[offset$2] * 16777216 + (this[offset$2 + 1] << 16 | this[offset$2 + 2] << 8 | this[offset$2 + 3]);
901
901
  };
902
- Buffer$27.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset$2) {
902
+ Buffer$29.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset$2) {
903
903
  offset$2 = offset$2 >>> 0;
904
904
  validateNumber(offset$2, "offset");
905
905
  const first$1 = this[offset$2];
@@ -909,7 +909,7 @@ var init_dist$1 = __esmMin(() => {
909
909
  const hi = this[++offset$2] + this[++offset$2] * 2 ** 8 + this[++offset$2] * 2 ** 16 + last$2 * 2 ** 24;
910
910
  return BigInt(lo) + (BigInt(hi) << BigInt(32));
911
911
  });
912
- Buffer$27.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset$2) {
912
+ Buffer$29.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset$2) {
913
913
  offset$2 = offset$2 >>> 0;
914
914
  validateNumber(offset$2, "offset");
915
915
  const first$1 = this[offset$2];
@@ -919,7 +919,7 @@ var init_dist$1 = __esmMin(() => {
919
919
  const lo = this[++offset$2] * 2 ** 24 + this[++offset$2] * 2 ** 16 + this[++offset$2] * 2 ** 8 + last$2;
920
920
  return (BigInt(hi) << BigInt(32)) + BigInt(lo);
921
921
  });
922
- Buffer$27.prototype.readIntLE = function readIntLE(offset$2, byteLength$3, noAssert) {
922
+ Buffer$29.prototype.readIntLE = function readIntLE(offset$2, byteLength$3, noAssert) {
923
923
  offset$2 = offset$2 >>> 0;
924
924
  byteLength$3 = byteLength$3 >>> 0;
925
925
  if (!noAssert) checkOffset(offset$2, byteLength$3, this.length);
@@ -931,7 +931,7 @@ var init_dist$1 = __esmMin(() => {
931
931
  if (val >= mul) val -= Math.pow(2, 8 * byteLength$3);
932
932
  return val;
933
933
  };
934
- Buffer$27.prototype.readIntBE = function readIntBE(offset$2, byteLength$3, noAssert) {
934
+ Buffer$29.prototype.readIntBE = function readIntBE(offset$2, byteLength$3, noAssert) {
935
935
  offset$2 = offset$2 >>> 0;
936
936
  byteLength$3 = byteLength$3 >>> 0;
937
937
  if (!noAssert) checkOffset(offset$2, byteLength$3, this.length);
@@ -943,35 +943,35 @@ var init_dist$1 = __esmMin(() => {
943
943
  if (val >= mul) val -= Math.pow(2, 8 * byteLength$3);
944
944
  return val;
945
945
  };
946
- Buffer$27.prototype.readInt8 = function readInt8(offset$2, noAssert) {
946
+ Buffer$29.prototype.readInt8 = function readInt8(offset$2, noAssert) {
947
947
  offset$2 = offset$2 >>> 0;
948
948
  if (!noAssert) checkOffset(offset$2, 1, this.length);
949
949
  if (!(this[offset$2] & 128)) return this[offset$2];
950
950
  return (255 - this[offset$2] + 1) * -1;
951
951
  };
952
- Buffer$27.prototype.readInt16LE = function readInt16LE(offset$2, noAssert) {
952
+ Buffer$29.prototype.readInt16LE = function readInt16LE(offset$2, noAssert) {
953
953
  offset$2 = offset$2 >>> 0;
954
954
  if (!noAssert) checkOffset(offset$2, 2, this.length);
955
955
  const val = this[offset$2] | this[offset$2 + 1] << 8;
956
956
  return val & 32768 ? val | 4294901760 : val;
957
957
  };
958
- Buffer$27.prototype.readInt16BE = function readInt16BE(offset$2, noAssert) {
958
+ Buffer$29.prototype.readInt16BE = function readInt16BE(offset$2, noAssert) {
959
959
  offset$2 = offset$2 >>> 0;
960
960
  if (!noAssert) checkOffset(offset$2, 2, this.length);
961
961
  const val = this[offset$2 + 1] | this[offset$2] << 8;
962
962
  return val & 32768 ? val | 4294901760 : val;
963
963
  };
964
- Buffer$27.prototype.readInt32LE = function readInt32LE(offset$2, noAssert) {
964
+ Buffer$29.prototype.readInt32LE = function readInt32LE(offset$2, noAssert) {
965
965
  offset$2 = offset$2 >>> 0;
966
966
  if (!noAssert) checkOffset(offset$2, 4, this.length);
967
967
  return this[offset$2] | this[offset$2 + 1] << 8 | this[offset$2 + 2] << 16 | this[offset$2 + 3] << 24;
968
968
  };
969
- Buffer$27.prototype.readInt32BE = function readInt32BE(offset$2, noAssert) {
969
+ Buffer$29.prototype.readInt32BE = function readInt32BE(offset$2, noAssert) {
970
970
  offset$2 = offset$2 >>> 0;
971
971
  if (!noAssert) checkOffset(offset$2, 4, this.length);
972
972
  return this[offset$2] << 24 | this[offset$2 + 1] << 16 | this[offset$2 + 2] << 8 | this[offset$2 + 3];
973
973
  };
974
- Buffer$27.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset$2) {
974
+ Buffer$29.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset$2) {
975
975
  offset$2 = offset$2 >>> 0;
976
976
  validateNumber(offset$2, "offset");
977
977
  const first$1 = this[offset$2];
@@ -980,7 +980,7 @@ var init_dist$1 = __esmMin(() => {
980
980
  const val = this[offset$2 + 4] + this[offset$2 + 5] * 2 ** 8 + this[offset$2 + 6] * 2 ** 16 + (last$2 << 24);
981
981
  return (BigInt(val) << BigInt(32)) + BigInt(first$1 + this[++offset$2] * 2 ** 8 + this[++offset$2] * 2 ** 16 + this[++offset$2] * 2 ** 24);
982
982
  });
983
- Buffer$27.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset$2) {
983
+ Buffer$29.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset$2) {
984
984
  offset$2 = offset$2 >>> 0;
985
985
  validateNumber(offset$2, "offset");
986
986
  const first$1 = this[offset$2];
@@ -989,32 +989,32 @@ var init_dist$1 = __esmMin(() => {
989
989
  const val = (first$1 << 24) + this[++offset$2] * 2 ** 16 + this[++offset$2] * 2 ** 8 + this[++offset$2];
990
990
  return (BigInt(val) << BigInt(32)) + BigInt(this[++offset$2] * 2 ** 24 + this[++offset$2] * 2 ** 16 + this[++offset$2] * 2 ** 8 + last$2);
991
991
  });
992
- Buffer$27.prototype.readFloatLE = function readFloatLE(offset$2, noAssert) {
992
+ Buffer$29.prototype.readFloatLE = function readFloatLE(offset$2, noAssert) {
993
993
  offset$2 = offset$2 >>> 0;
994
994
  if (!noAssert) checkOffset(offset$2, 4, this.length);
995
995
  return ieee754$1$1.read(this, offset$2, true, 23, 4);
996
996
  };
997
- Buffer$27.prototype.readFloatBE = function readFloatBE(offset$2, noAssert) {
997
+ Buffer$29.prototype.readFloatBE = function readFloatBE(offset$2, noAssert) {
998
998
  offset$2 = offset$2 >>> 0;
999
999
  if (!noAssert) checkOffset(offset$2, 4, this.length);
1000
1000
  return ieee754$1$1.read(this, offset$2, false, 23, 4);
1001
1001
  };
1002
- Buffer$27.prototype.readDoubleLE = function readDoubleLE(offset$2, noAssert) {
1002
+ Buffer$29.prototype.readDoubleLE = function readDoubleLE(offset$2, noAssert) {
1003
1003
  offset$2 = offset$2 >>> 0;
1004
1004
  if (!noAssert) checkOffset(offset$2, 8, this.length);
1005
1005
  return ieee754$1$1.read(this, offset$2, true, 52, 8);
1006
1006
  };
1007
- Buffer$27.prototype.readDoubleBE = function readDoubleBE(offset$2, noAssert) {
1007
+ Buffer$29.prototype.readDoubleBE = function readDoubleBE(offset$2, noAssert) {
1008
1008
  offset$2 = offset$2 >>> 0;
1009
1009
  if (!noAssert) checkOffset(offset$2, 8, this.length);
1010
1010
  return ieee754$1$1.read(this, offset$2, false, 52, 8);
1011
1011
  };
1012
1012
  function checkInt(buf, value, offset$2, ext, max$3, min$1) {
1013
- if (!Buffer$27.isBuffer(buf)) throw new TypeError("\"buffer\" argument must be a Buffer instance");
1013
+ if (!Buffer$29.isBuffer(buf)) throw new TypeError("\"buffer\" argument must be a Buffer instance");
1014
1014
  if (value > max$3 || value < min$1) throw new RangeError("\"value\" argument is out of bounds");
1015
1015
  if (offset$2 + ext > buf.length) throw new RangeError("Index out of range");
1016
1016
  }
1017
- Buffer$27.prototype.writeUintLE = Buffer$27.prototype.writeUIntLE = function writeUIntLE(value, offset$2, byteLength$3, noAssert) {
1017
+ Buffer$29.prototype.writeUintLE = Buffer$29.prototype.writeUIntLE = function writeUIntLE(value, offset$2, byteLength$3, noAssert) {
1018
1018
  value = +value;
1019
1019
  offset$2 = offset$2 >>> 0;
1020
1020
  byteLength$3 = byteLength$3 >>> 0;
@@ -1028,7 +1028,7 @@ var init_dist$1 = __esmMin(() => {
1028
1028
  while (++i$4 < byteLength$3 && (mul *= 256)) this[offset$2 + i$4] = value / mul & 255;
1029
1029
  return offset$2 + byteLength$3;
1030
1030
  };
1031
- Buffer$27.prototype.writeUintBE = Buffer$27.prototype.writeUIntBE = function writeUIntBE(value, offset$2, byteLength$3, noAssert) {
1031
+ Buffer$29.prototype.writeUintBE = Buffer$29.prototype.writeUIntBE = function writeUIntBE(value, offset$2, byteLength$3, noAssert) {
1032
1032
  value = +value;
1033
1033
  offset$2 = offset$2 >>> 0;
1034
1034
  byteLength$3 = byteLength$3 >>> 0;
@@ -1042,14 +1042,14 @@ var init_dist$1 = __esmMin(() => {
1042
1042
  while (--i$4 >= 0 && (mul *= 256)) this[offset$2 + i$4] = value / mul & 255;
1043
1043
  return offset$2 + byteLength$3;
1044
1044
  };
1045
- Buffer$27.prototype.writeUint8 = Buffer$27.prototype.writeUInt8 = function writeUInt8(value, offset$2, noAssert) {
1045
+ Buffer$29.prototype.writeUint8 = Buffer$29.prototype.writeUInt8 = function writeUInt8(value, offset$2, noAssert) {
1046
1046
  value = +value;
1047
1047
  offset$2 = offset$2 >>> 0;
1048
1048
  if (!noAssert) checkInt(this, value, offset$2, 1, 255, 0);
1049
1049
  this[offset$2] = value & 255;
1050
1050
  return offset$2 + 1;
1051
1051
  };
1052
- Buffer$27.prototype.writeUint16LE = Buffer$27.prototype.writeUInt16LE = function writeUInt16LE(value, offset$2, noAssert) {
1052
+ Buffer$29.prototype.writeUint16LE = Buffer$29.prototype.writeUInt16LE = function writeUInt16LE(value, offset$2, noAssert) {
1053
1053
  value = +value;
1054
1054
  offset$2 = offset$2 >>> 0;
1055
1055
  if (!noAssert) checkInt(this, value, offset$2, 2, 65535, 0);
@@ -1057,7 +1057,7 @@ var init_dist$1 = __esmMin(() => {
1057
1057
  this[offset$2 + 1] = value >>> 8;
1058
1058
  return offset$2 + 2;
1059
1059
  };
1060
- Buffer$27.prototype.writeUint16BE = Buffer$27.prototype.writeUInt16BE = function writeUInt16BE(value, offset$2, noAssert) {
1060
+ Buffer$29.prototype.writeUint16BE = Buffer$29.prototype.writeUInt16BE = function writeUInt16BE(value, offset$2, noAssert) {
1061
1061
  value = +value;
1062
1062
  offset$2 = offset$2 >>> 0;
1063
1063
  if (!noAssert) checkInt(this, value, offset$2, 2, 65535, 0);
@@ -1065,7 +1065,7 @@ var init_dist$1 = __esmMin(() => {
1065
1065
  this[offset$2 + 1] = value & 255;
1066
1066
  return offset$2 + 2;
1067
1067
  };
1068
- Buffer$27.prototype.writeUint32LE = Buffer$27.prototype.writeUInt32LE = function writeUInt32LE(value, offset$2, noAssert) {
1068
+ Buffer$29.prototype.writeUint32LE = Buffer$29.prototype.writeUInt32LE = function writeUInt32LE(value, offset$2, noAssert) {
1069
1069
  value = +value;
1070
1070
  offset$2 = offset$2 >>> 0;
1071
1071
  if (!noAssert) checkInt(this, value, offset$2, 4, 4294967295, 0);
@@ -1075,7 +1075,7 @@ var init_dist$1 = __esmMin(() => {
1075
1075
  this[offset$2] = value & 255;
1076
1076
  return offset$2 + 4;
1077
1077
  };
1078
- Buffer$27.prototype.writeUint32BE = Buffer$27.prototype.writeUInt32BE = function writeUInt32BE(value, offset$2, noAssert) {
1078
+ Buffer$29.prototype.writeUint32BE = Buffer$29.prototype.writeUInt32BE = function writeUInt32BE(value, offset$2, noAssert) {
1079
1079
  value = +value;
1080
1080
  offset$2 = offset$2 >>> 0;
1081
1081
  if (!noAssert) checkInt(this, value, offset$2, 4, 4294967295, 0);
@@ -1125,13 +1125,13 @@ var init_dist$1 = __esmMin(() => {
1125
1125
  buf[offset$2] = hi;
1126
1126
  return offset$2 + 8;
1127
1127
  }
1128
- Buffer$27.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset$2 = 0) {
1128
+ Buffer$29.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset$2 = 0) {
1129
1129
  return wrtBigUInt64LE(this, value, offset$2, BigInt(0), BigInt("0xffffffffffffffff"));
1130
1130
  });
1131
- Buffer$27.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset$2 = 0) {
1131
+ Buffer$29.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset$2 = 0) {
1132
1132
  return wrtBigUInt64BE(this, value, offset$2, BigInt(0), BigInt("0xffffffffffffffff"));
1133
1133
  });
1134
- Buffer$27.prototype.writeIntLE = function writeIntLE(value, offset$2, byteLength$3, noAssert) {
1134
+ Buffer$29.prototype.writeIntLE = function writeIntLE(value, offset$2, byteLength$3, noAssert) {
1135
1135
  value = +value;
1136
1136
  offset$2 = offset$2 >>> 0;
1137
1137
  if (!noAssert) {
@@ -1148,7 +1148,7 @@ var init_dist$1 = __esmMin(() => {
1148
1148
  }
1149
1149
  return offset$2 + byteLength$3;
1150
1150
  };
1151
- Buffer$27.prototype.writeIntBE = function writeIntBE(value, offset$2, byteLength$3, noAssert) {
1151
+ Buffer$29.prototype.writeIntBE = function writeIntBE(value, offset$2, byteLength$3, noAssert) {
1152
1152
  value = +value;
1153
1153
  offset$2 = offset$2 >>> 0;
1154
1154
  if (!noAssert) {
@@ -1165,7 +1165,7 @@ var init_dist$1 = __esmMin(() => {
1165
1165
  }
1166
1166
  return offset$2 + byteLength$3;
1167
1167
  };
1168
- Buffer$27.prototype.writeInt8 = function writeInt8(value, offset$2, noAssert) {
1168
+ Buffer$29.prototype.writeInt8 = function writeInt8(value, offset$2, noAssert) {
1169
1169
  value = +value;
1170
1170
  offset$2 = offset$2 >>> 0;
1171
1171
  if (!noAssert) checkInt(this, value, offset$2, 1, 127, -128);
@@ -1173,7 +1173,7 @@ var init_dist$1 = __esmMin(() => {
1173
1173
  this[offset$2] = value & 255;
1174
1174
  return offset$2 + 1;
1175
1175
  };
1176
- Buffer$27.prototype.writeInt16LE = function writeInt16LE(value, offset$2, noAssert) {
1176
+ Buffer$29.prototype.writeInt16LE = function writeInt16LE(value, offset$2, noAssert) {
1177
1177
  value = +value;
1178
1178
  offset$2 = offset$2 >>> 0;
1179
1179
  if (!noAssert) checkInt(this, value, offset$2, 2, 32767, -32768);
@@ -1181,7 +1181,7 @@ var init_dist$1 = __esmMin(() => {
1181
1181
  this[offset$2 + 1] = value >>> 8;
1182
1182
  return offset$2 + 2;
1183
1183
  };
1184
- Buffer$27.prototype.writeInt16BE = function writeInt16BE(value, offset$2, noAssert) {
1184
+ Buffer$29.prototype.writeInt16BE = function writeInt16BE(value, offset$2, noAssert) {
1185
1185
  value = +value;
1186
1186
  offset$2 = offset$2 >>> 0;
1187
1187
  if (!noAssert) checkInt(this, value, offset$2, 2, 32767, -32768);
@@ -1189,7 +1189,7 @@ var init_dist$1 = __esmMin(() => {
1189
1189
  this[offset$2 + 1] = value & 255;
1190
1190
  return offset$2 + 2;
1191
1191
  };
1192
- Buffer$27.prototype.writeInt32LE = function writeInt32LE(value, offset$2, noAssert) {
1192
+ Buffer$29.prototype.writeInt32LE = function writeInt32LE(value, offset$2, noAssert) {
1193
1193
  value = +value;
1194
1194
  offset$2 = offset$2 >>> 0;
1195
1195
  if (!noAssert) checkInt(this, value, offset$2, 4, 2147483647, -2147483648);
@@ -1199,7 +1199,7 @@ var init_dist$1 = __esmMin(() => {
1199
1199
  this[offset$2 + 3] = value >>> 24;
1200
1200
  return offset$2 + 4;
1201
1201
  };
1202
- Buffer$27.prototype.writeInt32BE = function writeInt32BE(value, offset$2, noAssert) {
1202
+ Buffer$29.prototype.writeInt32BE = function writeInt32BE(value, offset$2, noAssert) {
1203
1203
  value = +value;
1204
1204
  offset$2 = offset$2 >>> 0;
1205
1205
  if (!noAssert) checkInt(this, value, offset$2, 4, 2147483647, -2147483648);
@@ -1210,10 +1210,10 @@ var init_dist$1 = __esmMin(() => {
1210
1210
  this[offset$2 + 3] = value & 255;
1211
1211
  return offset$2 + 4;
1212
1212
  };
1213
- Buffer$27.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset$2 = 0) {
1213
+ Buffer$29.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset$2 = 0) {
1214
1214
  return wrtBigUInt64LE(this, value, offset$2, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1215
1215
  });
1216
- Buffer$27.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset$2 = 0) {
1216
+ Buffer$29.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset$2 = 0) {
1217
1217
  return wrtBigUInt64BE(this, value, offset$2, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1218
1218
  });
1219
1219
  function checkIEEE754(buf, value, offset$2, ext, max$3, min$1) {
@@ -1227,10 +1227,10 @@ var init_dist$1 = __esmMin(() => {
1227
1227
  ieee754$1$1.write(buf, value, offset$2, littleEndian, 23, 4);
1228
1228
  return offset$2 + 4;
1229
1229
  }
1230
- Buffer$27.prototype.writeFloatLE = function writeFloatLE(value, offset$2, noAssert) {
1230
+ Buffer$29.prototype.writeFloatLE = function writeFloatLE(value, offset$2, noAssert) {
1231
1231
  return writeFloat(this, value, offset$2, true, noAssert);
1232
1232
  };
1233
- Buffer$27.prototype.writeFloatBE = function writeFloatBE(value, offset$2, noAssert) {
1233
+ Buffer$29.prototype.writeFloatBE = function writeFloatBE(value, offset$2, noAssert) {
1234
1234
  return writeFloat(this, value, offset$2, false, noAssert);
1235
1235
  };
1236
1236
  function writeDouble(buf, value, offset$2, littleEndian, noAssert) {
@@ -1240,14 +1240,14 @@ var init_dist$1 = __esmMin(() => {
1240
1240
  ieee754$1$1.write(buf, value, offset$2, littleEndian, 52, 8);
1241
1241
  return offset$2 + 8;
1242
1242
  }
1243
- Buffer$27.prototype.writeDoubleLE = function writeDoubleLE(value, offset$2, noAssert) {
1243
+ Buffer$29.prototype.writeDoubleLE = function writeDoubleLE(value, offset$2, noAssert) {
1244
1244
  return writeDouble(this, value, offset$2, true, noAssert);
1245
1245
  };
1246
- Buffer$27.prototype.writeDoubleBE = function writeDoubleBE(value, offset$2, noAssert) {
1246
+ Buffer$29.prototype.writeDoubleBE = function writeDoubleBE(value, offset$2, noAssert) {
1247
1247
  return writeDouble(this, value, offset$2, false, noAssert);
1248
1248
  };
1249
- Buffer$27.prototype.copy = function copy(target, targetStart, start, end) {
1250
- if (!Buffer$27.isBuffer(target)) throw new TypeError("argument should be a Buffer");
1249
+ Buffer$29.prototype.copy = function copy(target, targetStart, start, end) {
1250
+ if (!Buffer$29.isBuffer(target)) throw new TypeError("argument should be a Buffer");
1251
1251
  if (!start) start = 0;
1252
1252
  if (!end && end !== 0) end = this.length;
1253
1253
  if (targetStart >= target.length) targetStart = target.length;
@@ -1265,7 +1265,7 @@ var init_dist$1 = __esmMin(() => {
1265
1265
  else GlobalUint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
1266
1266
  return len$2;
1267
1267
  };
1268
- Buffer$27.prototype.fill = function fill(val, start, end, encoding) {
1268
+ Buffer$29.prototype.fill = function fill(val, start, end, encoding) {
1269
1269
  if (typeof val === "string") {
1270
1270
  if (typeof start === "string") {
1271
1271
  encoding = start;
@@ -1276,7 +1276,7 @@ var init_dist$1 = __esmMin(() => {
1276
1276
  end = this.length;
1277
1277
  }
1278
1278
  if (encoding !== void 0 && typeof encoding !== "string") throw new TypeError("encoding must be a string");
1279
- if (typeof encoding === "string" && !Buffer$27.isEncoding(encoding)) throw new TypeError("Unknown encoding: " + encoding);
1279
+ if (typeof encoding === "string" && !Buffer$29.isEncoding(encoding)) throw new TypeError("Unknown encoding: " + encoding);
1280
1280
  if (val.length === 1) {
1281
1281
  const code$2 = val.charCodeAt(0);
1282
1282
  if (encoding === "utf8" && code$2 < 128 || encoding === "latin1") val = code$2;
@@ -1291,7 +1291,7 @@ var init_dist$1 = __esmMin(() => {
1291
1291
  let i$4;
1292
1292
  if (typeof val === "number") for (i$4 = start; i$4 < end; ++i$4) this[i$4] = val;
1293
1293
  else {
1294
- const bytes = Buffer$27.isBuffer(val) ? val : Buffer$27.from(val, encoding);
1294
+ const bytes = Buffer$29.isBuffer(val) ? val : Buffer$29.from(val, encoding);
1295
1295
  const len$2 = bytes.length;
1296
1296
  if (len$2 === 0) throw new TypeError("The value \"" + val + "\" is invalid for argument \"value\"");
1297
1297
  for (i$4 = 0; i$4 < end - start; ++i$4) this[i$4 + start] = bytes[i$4 % len$2];
@@ -1506,7 +1506,7 @@ var init_dist$1 = __esmMin(() => {
1506
1506
  });
1507
1507
  var require_reach = __commonJSMin((exports, module) => {
1508
1508
  const Assert$5 = require_assert$1();
1509
- const internals$40 = {};
1509
+ const internals$41 = {};
1510
1510
  module.exports = function(obj, chain, options) {
1511
1511
  if (chain === false || chain === null || chain === void 0) return obj;
1512
1512
  options = options || {};
@@ -1517,7 +1517,7 @@ var require_reach = __commonJSMin((exports, module) => {
1517
1517
  let ref = obj;
1518
1518
  for (let i$4 = 0; i$4 < path.length; ++i$4) {
1519
1519
  let key = path[i$4];
1520
- const type = options.iterables && internals$40.iterables(ref);
1520
+ const type = options.iterables && internals$41.iterables(ref);
1521
1521
  if (Array.isArray(ref) || type === "set") {
1522
1522
  const number = Number(key);
1523
1523
  if (Number.isInteger(number)) key = number < 0 ? ref.length + number : number;
@@ -1534,14 +1534,14 @@ var require_reach = __commonJSMin((exports, module) => {
1534
1534
  }
1535
1535
  return ref;
1536
1536
  };
1537
- internals$40.iterables = function(ref) {
1537
+ internals$41.iterables = function(ref) {
1538
1538
  if (ref instanceof Set) return "set";
1539
1539
  if (ref instanceof Map) return "map";
1540
1540
  };
1541
1541
  });
1542
1542
  var require_types$1 = __commonJSMin((exports, module) => {
1543
1543
  init_dist$1();
1544
- const internals$39 = {};
1544
+ const internals$40 = {};
1545
1545
  exports = module.exports = {
1546
1546
  array: Array.prototype,
1547
1547
  buffer: Buffer$1 && Buffer$1.prototype,
@@ -1556,7 +1556,7 @@ var require_types$1 = __commonJSMin((exports, module) => {
1556
1556
  weakMap: WeakMap.prototype,
1557
1557
  weakSet: WeakSet.prototype
1558
1558
  };
1559
- internals$39.typeMap = new Map([
1559
+ internals$40.typeMap = new Map([
1560
1560
  ["[object Error]", exports.error],
1561
1561
  ["[object Map]", exports.map],
1562
1562
  ["[object Promise]", exports.promise],
@@ -1572,7 +1572,7 @@ var require_types$1 = __commonJSMin((exports, module) => {
1572
1572
  if (obj instanceof RegExp) return exports.regex;
1573
1573
  if (obj instanceof Error) return exports.error;
1574
1574
  const objName = Object.prototype.toString.call(obj);
1575
- return internals$39.typeMap.get(objName) || exports.generic;
1575
+ return internals$40.typeMap.get(objName) || exports.generic;
1576
1576
  };
1577
1577
  });
1578
1578
  var require_utils$7 = __commonJSMin((exports) => {
@@ -1585,7 +1585,7 @@ var require_clone$1 = __commonJSMin((exports, module) => {
1585
1585
  const Reach$2 = require_reach();
1586
1586
  const Types$1 = require_types$1();
1587
1587
  const Utils$3 = require_utils$7();
1588
- const internals$38 = {
1588
+ const internals$39 = {
1589
1589
  needsProtoHack: new Set([
1590
1590
  Types$1.set,
1591
1591
  Types$1.map,
@@ -1594,13 +1594,13 @@ var require_clone$1 = __commonJSMin((exports, module) => {
1594
1594
  ]),
1595
1595
  structuredCloneExists: typeof structuredClone === "function"
1596
1596
  };
1597
- module.exports = internals$38.clone = function(obj, options = {}, _seen = null) {
1597
+ module.exports = internals$39.clone = function(obj, options = {}, _seen = null) {
1598
1598
  if (typeof obj !== "object" || obj === null) return obj;
1599
- let clone$20 = internals$38.clone;
1599
+ let clone$21 = internals$39.clone;
1600
1600
  let seen = _seen;
1601
1601
  if (options.shallow) {
1602
- if (options.shallow !== true) return internals$38.cloneWithShallow(obj, options);
1603
- clone$20 = (value) => value;
1602
+ if (options.shallow !== true) return internals$39.cloneWithShallow(obj, options);
1603
+ clone$21 = (value) => value;
1604
1604
  } else if (seen) {
1605
1605
  const lookup$2 = seen.get(obj);
1606
1606
  if (lookup$2) return lookup$2;
@@ -1612,11 +1612,11 @@ var require_clone$1 = __commonJSMin((exports, module) => {
1612
1612
  case Types$1.regex:
1613
1613
  case Types$1.url: return new baseProto.constructor(obj);
1614
1614
  }
1615
- const newObj = internals$38.base(obj, baseProto, options);
1615
+ const newObj = internals$39.base(obj, baseProto, options);
1616
1616
  if (newObj === obj) return obj;
1617
1617
  if (seen) seen.set(obj, newObj);
1618
- if (baseProto === Types$1.set) for (const value of obj) newObj.add(clone$20(value, options, seen));
1619
- else if (baseProto === Types$1.map) for (const [key, value] of obj) newObj.set(key, clone$20(value, options, seen));
1618
+ if (baseProto === Types$1.set) for (const value of obj) newObj.add(clone$21(value, options, seen));
1619
+ else if (baseProto === Types$1.map) for (const [key, value] of obj) newObj.set(key, clone$21(value, options, seen));
1620
1620
  const keys$10 = Utils$3.keys(obj, options);
1621
1621
  for (const key of keys$10) {
1622
1622
  if (key === "__proto__") continue;
@@ -1624,26 +1624,26 @@ var require_clone$1 = __commonJSMin((exports, module) => {
1624
1624
  newObj.length = obj.length;
1625
1625
  continue;
1626
1626
  }
1627
- if (internals$38.structuredCloneExists && baseProto === Types$1.error && key === "stack") continue;
1627
+ if (internals$39.structuredCloneExists && baseProto === Types$1.error && key === "stack") continue;
1628
1628
  const descriptor = Object.getOwnPropertyDescriptor(obj, key);
1629
1629
  if (descriptor) if (descriptor.get || descriptor.set) Object.defineProperty(newObj, key, descriptor);
1630
- else if (descriptor.enumerable) newObj[key] = clone$20(obj[key], options, seen);
1630
+ else if (descriptor.enumerable) newObj[key] = clone$21(obj[key], options, seen);
1631
1631
  else Object.defineProperty(newObj, key, {
1632
1632
  enumerable: false,
1633
1633
  writable: true,
1634
1634
  configurable: true,
1635
- value: clone$20(obj[key], options, seen)
1635
+ value: clone$21(obj[key], options, seen)
1636
1636
  });
1637
1637
  else Object.defineProperty(newObj, key, {
1638
1638
  enumerable: true,
1639
1639
  writable: true,
1640
1640
  configurable: true,
1641
- value: clone$20(obj[key], options, seen)
1641
+ value: clone$21(obj[key], options, seen)
1642
1642
  });
1643
1643
  }
1644
1644
  return newObj;
1645
1645
  };
1646
- internals$38.cloneWithShallow = function(source, options) {
1646
+ internals$39.cloneWithShallow = function(source, options) {
1647
1647
  const keys$10 = options.shallow;
1648
1648
  options = Object.assign({}, options);
1649
1649
  options.shallow = false;
@@ -1652,11 +1652,11 @@ var require_clone$1 = __commonJSMin((exports, module) => {
1652
1652
  const ref = Reach$2(source, key);
1653
1653
  if (typeof ref === "object" || typeof ref === "function") seen.set(ref, ref);
1654
1654
  }
1655
- return internals$38.clone(source, options, seen);
1655
+ return internals$39.clone(source, options, seen);
1656
1656
  };
1657
- internals$38.base = function(obj, baseProto, options) {
1657
+ internals$39.base = function(obj, baseProto, options) {
1658
1658
  if (options.prototype === false) {
1659
- if (internals$38.needsProtoHack.has(baseProto)) return new baseProto.constructor();
1659
+ if (internals$39.needsProtoHack.has(baseProto)) return new baseProto.constructor();
1660
1660
  return baseProto === Types$1.array ? [] : {};
1661
1661
  }
1662
1662
  const proto = Object.getPrototypeOf(obj);
@@ -1665,12 +1665,12 @@ var require_clone$1 = __commonJSMin((exports, module) => {
1665
1665
  const newObj = [];
1666
1666
  if (proto !== baseProto) Object.setPrototypeOf(newObj, proto);
1667
1667
  return newObj;
1668
- } else if (baseProto === Types$1.error && internals$38.structuredCloneExists && (proto === baseProto || Error.isPrototypeOf(proto.constructor))) {
1668
+ } else if (baseProto === Types$1.error && internals$39.structuredCloneExists && (proto === baseProto || Error.isPrototypeOf(proto.constructor))) {
1669
1669
  const err$1 = structuredClone(obj);
1670
1670
  if (Object.getPrototypeOf(err$1) !== proto) Object.setPrototypeOf(err$1, proto);
1671
1671
  return err$1;
1672
1672
  }
1673
- if (internals$38.needsProtoHack.has(baseProto)) {
1673
+ if (internals$39.needsProtoHack.has(baseProto)) {
1674
1674
  const newObj = new proto.constructor();
1675
1675
  if (proto !== baseProto) Object.setPrototypeOf(newObj, proto);
1676
1676
  return newObj;
@@ -1683,8 +1683,8 @@ var require_merge = __commonJSMin((exports, module) => {
1683
1683
  const Assert$4 = require_assert$1();
1684
1684
  const Clone$2 = require_clone$1();
1685
1685
  const Utils$2 = require_utils$7();
1686
- const internals$37 = {};
1687
- module.exports = internals$37.merge = function(target, source, options) {
1686
+ const internals$38 = {};
1687
+ module.exports = internals$38.merge = function(target, source, options) {
1688
1688
  Assert$4(target && typeof target === "object", "Invalid target value: must be an object");
1689
1689
  Assert$4(source === null || source === void 0 || typeof source === "object", "Invalid source value: must be null, undefined, or an object");
1690
1690
  if (!source) return target;
@@ -1706,7 +1706,7 @@ var require_merge = __commonJSMin((exports, module) => {
1706
1706
  if (value && typeof value === "object") {
1707
1707
  if (target[key] === value) continue;
1708
1708
  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 });
1709
- else internals$37.merge(target[key], value, options);
1709
+ else internals$38.merge(target[key], value, options);
1710
1710
  } else if (value !== null && value !== void 0) target[key] = value;
1711
1711
  else if (options.nullOverride) target[key] = value;
1712
1712
  }
@@ -1718,13 +1718,13 @@ var require_applyToDefaults = __commonJSMin((exports, module) => {
1718
1718
  const Clone$1 = require_clone$1();
1719
1719
  const Merge = require_merge();
1720
1720
  const Reach$1 = require_reach();
1721
- const internals$36 = {};
1721
+ const internals$37 = {};
1722
1722
  module.exports = function(defaults$3, source, options = {}) {
1723
1723
  Assert$3(defaults$3 && typeof defaults$3 === "object", "Invalid defaults value: must be an object");
1724
1724
  Assert$3(!source || source === true || typeof source === "object", "Invalid source value: must be true, falsy or an object");
1725
1725
  Assert$3(typeof options === "object", "Invalid options: must be an object");
1726
1726
  if (!source) return null;
1727
- if (options.shallow) return internals$36.applyToDefaultsWithShallow(defaults$3, source, options);
1727
+ if (options.shallow) return internals$37.applyToDefaultsWithShallow(defaults$3, source, options);
1728
1728
  const copy = Clone$1(defaults$3);
1729
1729
  if (source === true) return copy;
1730
1730
  const nullOverride = options.nullOverride !== void 0 ? options.nullOverride : false;
@@ -1733,7 +1733,7 @@ var require_applyToDefaults = __commonJSMin((exports, module) => {
1733
1733
  mergeArrays: false
1734
1734
  });
1735
1735
  };
1736
- internals$36.applyToDefaultsWithShallow = function(defaults$3, source, options) {
1736
+ internals$37.applyToDefaultsWithShallow = function(defaults$3, source, options) {
1737
1737
  const keys$10 = options.shallow;
1738
1738
  Assert$3(Array.isArray(keys$10), "Invalid keys");
1739
1739
  const seen = new Map();
@@ -1746,14 +1746,14 @@ var require_applyToDefaults = __commonJSMin((exports, module) => {
1746
1746
  }
1747
1747
  const copy = Clone$1(defaults$3, {}, seen);
1748
1748
  if (!merge$4) return copy;
1749
- for (const key of merge$4) internals$36.reachCopy(copy, source, key);
1749
+ for (const key of merge$4) internals$37.reachCopy(copy, source, key);
1750
1750
  const nullOverride = options.nullOverride !== void 0 ? options.nullOverride : false;
1751
1751
  return Merge(copy, source, {
1752
1752
  nullOverride,
1753
1753
  mergeArrays: false
1754
1754
  });
1755
1755
  };
1756
- internals$36.reachCopy = function(dst, src$1, path) {
1756
+ internals$37.reachCopy = function(dst, src$1, path) {
1757
1757
  for (const segment of path) {
1758
1758
  if (!(segment in src$1)) return;
1759
1759
  const val = src$1[segment];
@@ -1904,17 +1904,17 @@ var init_dist = __esmMin(() => {
1904
1904
  });
1905
1905
  var require_bench = __commonJSMin((exports, module) => {
1906
1906
  init_dist();
1907
- const internals$35 = {};
1908
- module.exports = internals$35.Bench = class {
1907
+ const internals$36 = {};
1908
+ module.exports = internals$36.Bench = class {
1909
1909
  constructor() {
1910
1910
  this.ts = 0;
1911
1911
  this.reset();
1912
1912
  }
1913
1913
  reset() {
1914
- this.ts = internals$35.Bench.now();
1914
+ this.ts = internals$36.Bench.now();
1915
1915
  }
1916
1916
  elapsed() {
1917
- return internals$35.Bench.now() - this.ts;
1917
+ return internals$36.Bench.now() - this.ts;
1918
1918
  }
1919
1919
  static now() {
1920
1920
  const ts = process$1.hrtime();
@@ -1934,12 +1934,12 @@ var require_block = __commonJSMin((exports, module) => {
1934
1934
  var require_deepEqual = __commonJSMin((exports, module) => {
1935
1935
  init_dist$1();
1936
1936
  const Types = require_types$1();
1937
- const internals$34 = { mismatched: null };
1937
+ const internals$35 = { mismatched: null };
1938
1938
  module.exports = function(obj, ref, options) {
1939
1939
  options = Object.assign({ prototype: true }, options);
1940
- return !!internals$34.isDeepEqual(obj, ref, options, []);
1940
+ return !!internals$35.isDeepEqual(obj, ref, options, []);
1941
1941
  };
1942
- internals$34.isDeepEqual = function(obj, ref, options, seen) {
1942
+ internals$35.isDeepEqual = function(obj, ref, options, seen) {
1943
1943
  if (obj === ref) return obj !== 0 || 1 / obj === 1 / ref;
1944
1944
  const type = typeof obj;
1945
1945
  if (type !== typeof ref) return false;
@@ -1947,32 +1947,32 @@ var require_deepEqual = __commonJSMin((exports, module) => {
1947
1947
  if (type === "function") {
1948
1948
  if (!options.deepFunction || obj.toString() !== ref.toString()) return false;
1949
1949
  } else if (type !== "object") return obj !== obj && ref !== ref;
1950
- const instanceType = internals$34.getSharedType(obj, ref, !!options.prototype);
1950
+ const instanceType = internals$35.getSharedType(obj, ref, !!options.prototype);
1951
1951
  switch (instanceType) {
1952
1952
  case Types.buffer: return Buffer$1 && Buffer$1.prototype.equals.call(obj, ref);
1953
1953
  case Types.promise: return obj === ref;
1954
1954
  case Types.regex:
1955
1955
  case Types.url: return obj.toString() === ref.toString();
1956
- case internals$34.mismatched: return false;
1956
+ case internals$35.mismatched: return false;
1957
1957
  }
1958
1958
  for (let i$4 = seen.length - 1; i$4 >= 0; --i$4) if (seen[i$4].isSame(obj, ref)) return true;
1959
- seen.push(new internals$34.SeenEntry(obj, ref));
1959
+ seen.push(new internals$35.SeenEntry(obj, ref));
1960
1960
  try {
1961
- return !!internals$34.isDeepEqualObj(instanceType, obj, ref, options, seen);
1961
+ return !!internals$35.isDeepEqualObj(instanceType, obj, ref, options, seen);
1962
1962
  } finally {
1963
1963
  seen.pop();
1964
1964
  }
1965
1965
  };
1966
- internals$34.getSharedType = function(obj, ref, checkPrototype) {
1966
+ internals$35.getSharedType = function(obj, ref, checkPrototype) {
1967
1967
  if (checkPrototype) {
1968
- if (Object.getPrototypeOf(obj) !== Object.getPrototypeOf(ref)) return internals$34.mismatched;
1968
+ if (Object.getPrototypeOf(obj) !== Object.getPrototypeOf(ref)) return internals$35.mismatched;
1969
1969
  return Types.getInternalProto(obj);
1970
1970
  }
1971
1971
  const type = Types.getInternalProto(obj);
1972
- if (type !== Types.getInternalProto(ref)) return internals$34.mismatched;
1972
+ if (type !== Types.getInternalProto(ref)) return internals$35.mismatched;
1973
1973
  return type;
1974
1974
  };
1975
- internals$34.valueOf = function(obj) {
1975
+ internals$35.valueOf = function(obj) {
1976
1976
  const objValueOf = obj.valueOf;
1977
1977
  if (objValueOf === void 0) return obj;
1978
1978
  try {
@@ -1981,15 +1981,15 @@ var require_deepEqual = __commonJSMin((exports, module) => {
1981
1981
  return err$1;
1982
1982
  }
1983
1983
  };
1984
- internals$34.hasOwnEnumerableProperty = function(obj, key) {
1984
+ internals$35.hasOwnEnumerableProperty = function(obj, key) {
1985
1985
  return Object.prototype.propertyIsEnumerable.call(obj, key);
1986
1986
  };
1987
- internals$34.isSetSimpleEqual = function(obj, ref) {
1987
+ internals$35.isSetSimpleEqual = function(obj, ref) {
1988
1988
  for (const entry of Set.prototype.values.call(obj)) if (!Set.prototype.has.call(ref, entry)) return false;
1989
1989
  return true;
1990
1990
  };
1991
- internals$34.isDeepEqualObj = function(instanceType, obj, ref, options, seen) {
1992
- const { isDeepEqual: isDeepEqual$2, valueOf, hasOwnEnumerableProperty } = internals$34;
1991
+ internals$35.isDeepEqualObj = function(instanceType, obj, ref, options, seen) {
1992
+ const { isDeepEqual: isDeepEqual$2, valueOf, hasOwnEnumerableProperty } = internals$35;
1993
1993
  const { keys: keys$10, getOwnPropertySymbols } = Object;
1994
1994
  if (instanceType === Types.array) if (options.part) {
1995
1995
  for (const objValue of obj) for (const refValue of ref) if (isDeepEqual$2(objValue, refValue, options, seen)) return true;
@@ -2000,7 +2000,7 @@ var require_deepEqual = __commonJSMin((exports, module) => {
2000
2000
  }
2001
2001
  else if (instanceType === Types.set) {
2002
2002
  if (obj.size !== ref.size) return false;
2003
- if (!internals$34.isSetSimpleEqual(obj, ref)) {
2003
+ if (!internals$35.isSetSimpleEqual(obj, ref)) {
2004
2004
  const ref2 = new Set(Set.prototype.values.call(ref));
2005
2005
  for (const objEntry of Set.prototype.values.call(obj)) {
2006
2006
  if (ref2.delete(objEntry)) continue;
@@ -2053,7 +2053,7 @@ var require_deepEqual = __commonJSMin((exports, module) => {
2053
2053
  }
2054
2054
  return true;
2055
2055
  };
2056
- internals$34.SeenEntry = class {
2056
+ internals$35.SeenEntry = class {
2057
2057
  constructor(obj, ref) {
2058
2058
  this.obj = obj;
2059
2059
  this.ref = ref;
@@ -2073,16 +2073,16 @@ var require_contain = __commonJSMin((exports, module) => {
2073
2073
  const DeepEqual = require_deepEqual();
2074
2074
  const EscapeRegex = require_escapeRegex();
2075
2075
  const Utils$1 = require_utils$7();
2076
- const internals$33 = {};
2076
+ const internals$34 = {};
2077
2077
  module.exports = function(ref, values$3, options = {}) {
2078
2078
  if (typeof values$3 !== "object") values$3 = [values$3];
2079
2079
  Assert$2(!Array.isArray(values$3) || values$3.length, "Values array cannot be empty");
2080
- if (typeof ref === "string") return internals$33.string(ref, values$3, options);
2081
- if (Array.isArray(ref)) return internals$33.array(ref, values$3, options);
2080
+ if (typeof ref === "string") return internals$34.string(ref, values$3, options);
2081
+ if (Array.isArray(ref)) return internals$34.array(ref, values$3, options);
2082
2082
  Assert$2(typeof ref === "object", "Reference must be string or an object");
2083
- return internals$33.object(ref, values$3, options);
2083
+ return internals$34.object(ref, values$3, options);
2084
2084
  };
2085
- internals$33.array = function(ref, values$3, options) {
2085
+ internals$34.array = function(ref, values$3, options) {
2086
2086
  if (!Array.isArray(values$3)) values$3 = [values$3];
2087
2087
  if (!ref.length) return false;
2088
2088
  if (options.only && options.once && ref.length !== values$3.length) return false;
@@ -2096,7 +2096,7 @@ var require_contain = __commonJSMin((exports, module) => {
2096
2096
  hits: 0
2097
2097
  });
2098
2098
  } else {
2099
- compare$16 = compare$16 ?? internals$33.compare(options);
2099
+ compare$16 = compare$16 ?? internals$34.compare(options);
2100
2100
  let found = false;
2101
2101
  for (const [key, existing] of map$8.entries()) if (compare$16(key, value)) {
2102
2102
  ++existing.allowed;
@@ -2113,7 +2113,7 @@ var require_contain = __commonJSMin((exports, module) => {
2113
2113
  let match$2;
2114
2114
  if (!options.deep || !item || typeof item !== "object") match$2 = map$8.get(item);
2115
2115
  else {
2116
- compare$16 = compare$16 ?? internals$33.compare(options);
2116
+ compare$16 = compare$16 ?? internals$34.compare(options);
2117
2117
  for (const [key, existing] of map$8.entries()) if (compare$16(key, item)) {
2118
2118
  match$2 = existing;
2119
2119
  break;
@@ -2132,14 +2132,14 @@ var require_contain = __commonJSMin((exports, module) => {
2132
2132
  }
2133
2133
  return !!hits;
2134
2134
  };
2135
- internals$33.object = function(ref, values$3, options) {
2135
+ internals$34.object = function(ref, values$3, options) {
2136
2136
  Assert$2(options.once === void 0, "Cannot use option once with object");
2137
2137
  const keys$10 = Utils$1.keys(ref, options);
2138
2138
  if (!keys$10.length) return false;
2139
- if (Array.isArray(values$3)) return internals$33.array(keys$10, values$3, options);
2139
+ if (Array.isArray(values$3)) return internals$34.array(keys$10, values$3, options);
2140
2140
  const symbols = Object.getOwnPropertySymbols(values$3).filter((sym) => values$3.propertyIsEnumerable(sym));
2141
2141
  const targets = [...Object.keys(values$3), ...symbols];
2142
- const compare$16 = internals$33.compare(options);
2142
+ const compare$16 = internals$34.compare(options);
2143
2143
  const set = new Set(targets);
2144
2144
  for (const key of keys$10) {
2145
2145
  if (!set.has(key)) {
@@ -2152,7 +2152,7 @@ var require_contain = __commonJSMin((exports, module) => {
2152
2152
  if (set.size) return options.part ? set.size < targets.length : false;
2153
2153
  return true;
2154
2154
  };
2155
- internals$33.string = function(ref, values$3, options) {
2155
+ internals$34.string = function(ref, values$3, options) {
2156
2156
  if (ref === "") return values$3.length === 1 && values$3[0] === "" || !options.once && !values$3.some((v$1) => v$1 !== "");
2157
2157
  const map$8 = new Map();
2158
2158
  const patterns = [];
@@ -2186,8 +2186,8 @@ var require_contain = __commonJSMin((exports, module) => {
2186
2186
  }
2187
2187
  return !!any;
2188
2188
  };
2189
- internals$33.compare = function(options) {
2190
- if (!options.deep) return internals$33.shallow;
2189
+ internals$34.compare = function(options) {
2190
+ if (!options.deep) return internals$34.shallow;
2191
2191
  const hasOnly = options.only !== void 0;
2192
2192
  const hasPart = options.part !== void 0;
2193
2193
  const flags = {
@@ -2196,7 +2196,7 @@ var require_contain = __commonJSMin((exports, module) => {
2196
2196
  };
2197
2197
  return (a$2, b) => DeepEqual(a$2, b, flags);
2198
2198
  };
2199
- internals$33.shallow = function(a$2, b) {
2199
+ internals$34.shallow = function(a$2, b) {
2200
2200
  return a$2 === b;
2201
2201
  };
2202
2202
  });
@@ -2208,28 +2208,28 @@ var require_escapeHeaderAttribute = __commonJSMin((exports, module) => {
2208
2208
  };
2209
2209
  });
2210
2210
  var require_escapeHtml = __commonJSMin((exports, module) => {
2211
- const internals$32 = {};
2211
+ const internals$33 = {};
2212
2212
  module.exports = function(input) {
2213
2213
  if (!input) return "";
2214
2214
  let escaped = "";
2215
2215
  for (let i$4 = 0; i$4 < input.length; ++i$4) {
2216
2216
  const charCode = input.charCodeAt(i$4);
2217
- if (internals$32.isSafe(charCode)) escaped += input[i$4];
2218
- else escaped += internals$32.escapeHtmlChar(charCode);
2217
+ if (internals$33.isSafe(charCode)) escaped += input[i$4];
2218
+ else escaped += internals$33.escapeHtmlChar(charCode);
2219
2219
  }
2220
2220
  return escaped;
2221
2221
  };
2222
- internals$32.escapeHtmlChar = function(charCode) {
2223
- const namedEscape = internals$32.namedHtml.get(charCode);
2222
+ internals$33.escapeHtmlChar = function(charCode) {
2223
+ const namedEscape = internals$33.namedHtml.get(charCode);
2224
2224
  if (namedEscape) return namedEscape;
2225
2225
  if (charCode >= 256) return "&#" + charCode + ";";
2226
2226
  const hexValue = charCode.toString(16).padStart(2, "0");
2227
2227
  return `&#x${hexValue};`;
2228
2228
  };
2229
- internals$32.isSafe = function(charCode) {
2230
- return internals$32.safeCharCodes.has(charCode);
2229
+ internals$33.isSafe = function(charCode) {
2230
+ return internals$33.safeCharCodes.has(charCode);
2231
2231
  };
2232
- internals$32.namedHtml = new Map([
2232
+ internals$33.namedHtml = new Map([
2233
2233
  [38, "&amp;"],
2234
2234
  [60, "&lt;"],
2235
2235
  [62, "&gt;"],
@@ -2241,22 +2241,22 @@ var require_escapeHtml = __commonJSMin((exports, module) => {
2241
2241
  [169, "&copy;"],
2242
2242
  [174, "&reg;"]
2243
2243
  ]);
2244
- internals$32.safeCharCodes = function() {
2244
+ internals$33.safeCharCodes = function() {
2245
2245
  const safe = new Set();
2246
2246
  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);
2247
2247
  return safe;
2248
2248
  }();
2249
2249
  });
2250
2250
  var require_escapeJson = __commonJSMin((exports, module) => {
2251
- const internals$31 = {};
2251
+ const internals$32 = {};
2252
2252
  module.exports = function(input) {
2253
2253
  if (!input) return "";
2254
- return input.replace(/[<>&\u2028\u2029]/g, internals$31.escape);
2254
+ return input.replace(/[<>&\u2028\u2029]/g, internals$32.escape);
2255
2255
  };
2256
- internals$31.escape = function(char) {
2257
- return internals$31.replacements.get(char);
2256
+ internals$32.escape = function(char) {
2257
+ return internals$32.replacements.get(char);
2258
2258
  };
2259
- internals$31.replacements = new Map([
2259
+ internals$32.replacements = new Map([
2260
2260
  ["<", "\\u003c"],
2261
2261
  [">", "\\u003e"],
2262
2262
  ["&", "\\u0026"],
@@ -2265,29 +2265,29 @@ var require_escapeJson = __commonJSMin((exports, module) => {
2265
2265
  ]);
2266
2266
  });
2267
2267
  var require_flatten$1 = __commonJSMin((exports, module) => {
2268
- const internals$30 = {};
2269
- module.exports = internals$30.flatten = function(array, target) {
2268
+ const internals$31 = {};
2269
+ module.exports = internals$31.flatten = function(array, target) {
2270
2270
  const result = target || [];
2271
- for (const entry of array) if (Array.isArray(entry)) internals$30.flatten(entry, result);
2271
+ for (const entry of array) if (Array.isArray(entry)) internals$31.flatten(entry, result);
2272
2272
  else result.push(entry);
2273
2273
  return result;
2274
2274
  };
2275
2275
  });
2276
2276
  var require_intersect = __commonJSMin((exports, module) => {
2277
- const internals$29 = {};
2277
+ const internals$30 = {};
2278
2278
  module.exports = function(array1, array2, options = {}) {
2279
2279
  if (!array1 || !array2) return options.first ? null : [];
2280
2280
  const common$4 = [];
2281
2281
  const hash$4 = Array.isArray(array1) ? new Set(array1) : array1;
2282
2282
  const found = new Set();
2283
- for (const value of array2) if (internals$29.has(hash$4, value) && !found.has(value)) {
2283
+ for (const value of array2) if (internals$30.has(hash$4, value) && !found.has(value)) {
2284
2284
  if (options.first) return value;
2285
2285
  common$4.push(value);
2286
2286
  found.add(value);
2287
2287
  }
2288
2288
  return options.first ? null : common$4;
2289
2289
  };
2290
- internals$29.has = function(ref, key) {
2290
+ internals$30.has = function(ref, key) {
2291
2291
  if (typeof ref.has === "function") return ref.has(key);
2292
2292
  return ref[key] !== void 0;
2293
2293
  };
@@ -2298,9 +2298,9 @@ var require_isPromise = __commonJSMin((exports, module) => {
2298
2298
  };
2299
2299
  });
2300
2300
  var require_once = __commonJSMin((exports, module) => {
2301
- const internals$28 = { wrapped: Symbol("wrapped") };
2301
+ const internals$29 = { wrapped: Symbol("wrapped") };
2302
2302
  module.exports = function(method$1) {
2303
- if (method$1[internals$28.wrapped]) return method$1;
2303
+ if (method$1[internals$29.wrapped]) return method$1;
2304
2304
  let once$4 = false;
2305
2305
  const wrappedFn = function(...args$1) {
2306
2306
  if (!once$4) {
@@ -2308,7 +2308,7 @@ var require_once = __commonJSMin((exports, module) => {
2308
2308
  method$1(...args$1);
2309
2309
  }
2310
2310
  };
2311
- wrappedFn[internals$28.wrapped] = true;
2311
+ wrappedFn[internals$29.wrapped] = true;
2312
2312
  return wrappedFn;
2313
2313
  };
2314
2314
  });
@@ -2322,7 +2322,7 @@ var require_reachTemplate = __commonJSMin((exports, module) => {
2322
2322
  };
2323
2323
  });
2324
2324
  var require_wait = __commonJSMin((exports, module) => {
2325
- const internals$27 = { maxTimer: 2 ** 31 - 1 };
2325
+ const internals$28 = { maxTimer: 2 ** 31 - 1 };
2326
2326
  module.exports = function(timeout$5, returnValue, options) {
2327
2327
  if (typeof timeout$5 === "bigint") timeout$5 = Number(timeout$5);
2328
2328
  if (timeout$5 >= Number.MAX_SAFE_INTEGER) timeout$5 = Infinity;
@@ -2330,7 +2330,7 @@ var require_wait = __commonJSMin((exports, module) => {
2330
2330
  return new Promise((resolve) => {
2331
2331
  const _setTimeout = options ? options.setTimeout : setTimeout;
2332
2332
  const activate = () => {
2333
- const time = Math.min(timeout$5, internals$27.maxTimer);
2333
+ const time = Math.min(timeout$5, internals$28.maxTimer);
2334
2334
  timeout$5 -= time;
2335
2335
  _setTimeout(() => timeout$5 > 0 ? activate() : resolve(returnValue), time);
2336
2336
  };
@@ -2437,9 +2437,9 @@ var init_package$1 = __esmMin(() => {
2437
2437
  };
2438
2438
  });
2439
2439
  var require_cache = __commonJSMin((exports) => {
2440
- const { assert: assert$52, clone: clone$19 } = require_lib$4();
2441
- const Common$24 = require_common$3();
2442
- const internals$26 = {
2440
+ const { assert: assert$53, clone: clone$20 } = require_lib$4();
2441
+ const Common$25 = require_common$3();
2442
+ const internals$27 = {
2443
2443
  max: 1e3,
2444
2444
  supported: new Set([
2445
2445
  "undefined",
@@ -2449,21 +2449,21 @@ var require_cache = __commonJSMin((exports) => {
2449
2449
  ])
2450
2450
  };
2451
2451
  exports.provider = { provision(options) {
2452
- return new internals$26.Cache(options);
2452
+ return new internals$27.Cache(options);
2453
2453
  } };
2454
- internals$26.Cache = class {
2454
+ internals$27.Cache = class {
2455
2455
  constructor(options = {}) {
2456
- Common$24.assertOptions(options, ["max"]);
2457
- assert$52(options.max === void 0 || options.max && options.max > 0 && isFinite(options.max), "Invalid max cache size");
2458
- this._max = options.max || internals$26.max;
2456
+ Common$25.assertOptions(options, ["max"]);
2457
+ assert$53(options.max === void 0 || options.max && options.max > 0 && isFinite(options.max), "Invalid max cache size");
2458
+ this._max = options.max || internals$27.max;
2459
2459
  this._map = new Map();
2460
- this._list = new internals$26.List();
2460
+ this._list = new internals$27.List();
2461
2461
  }
2462
2462
  get length() {
2463
2463
  return this._map.size;
2464
2464
  }
2465
2465
  set(key, value) {
2466
- if (key !== null && !internals$26.supported.has(typeof key)) return;
2466
+ if (key !== null && !internals$27.supported.has(typeof key)) return;
2467
2467
  let node = this._map.get(key);
2468
2468
  if (node) {
2469
2469
  node.value = value;
@@ -2481,7 +2481,7 @@ var require_cache = __commonJSMin((exports) => {
2481
2481
  const node = this._map.get(key);
2482
2482
  if (node) {
2483
2483
  this._list.first(node);
2484
- return clone$19(node.value);
2484
+ return clone$20(node.value);
2485
2485
  }
2486
2486
  }
2487
2487
  _compact() {
@@ -2491,7 +2491,7 @@ var require_cache = __commonJSMin((exports) => {
2491
2491
  }
2492
2492
  }
2493
2493
  };
2494
- internals$26.List = class {
2494
+ internals$27.List = class {
2495
2495
  constructor() {
2496
2496
  this.tail = null;
2497
2497
  this.head = null;
@@ -2524,7 +2524,7 @@ var require_cache = __commonJSMin((exports) => {
2524
2524
  };
2525
2525
  });
2526
2526
  var require_lib$3 = __commonJSMin((exports) => {
2527
- const internals$25 = {
2527
+ const internals$26 = {
2528
2528
  operators: [
2529
2529
  "!",
2530
2530
  "^",
@@ -2590,7 +2590,7 @@ var require_lib$3 = __commonJSMin((exports) => {
2590
2590
  };
2591
2591
  exports.Parser = class {
2592
2592
  constructor(string, options = {}) {
2593
- if (!options[internals$25.settings] && options.constants) for (const constant$3 in options.constants) {
2593
+ if (!options[internals$26.settings] && options.constants) for (const constant$3 in options.constants) {
2594
2594
  const value = options.constants[constant$3];
2595
2595
  if (value !== null && ![
2596
2596
  "boolean",
@@ -2598,8 +2598,8 @@ var require_lib$3 = __commonJSMin((exports) => {
2598
2598
  "string"
2599
2599
  ].includes(typeof value)) throw new Error(`Formula constant ${constant$3} contains invalid ${typeof value} value type`);
2600
2600
  }
2601
- this.settings = options[internals$25.settings] ? options : Object.assign({
2602
- [internals$25.settings]: true,
2601
+ this.settings = options[internals$26.settings] ? options : Object.assign({
2602
+ [internals$26.settings]: true,
2603
2603
  constants: {},
2604
2604
  functions: {}
2605
2605
  }, options);
@@ -2641,12 +2641,12 @@ var require_lib$3 = __commonJSMin((exports) => {
2641
2641
  type: "literal",
2642
2642
  value: current
2643
2643
  });
2644
- } 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;
2644
+ } 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;
2645
2645
  else parts.push({
2646
2646
  type: "operator",
2647
2647
  value: current
2648
2648
  });
2649
- else if (current.match(internals$25.numberRx)) parts.push({
2649
+ else if (current.match(internals$26.numberRx)) parts.push({
2650
2650
  type: "constant",
2651
2651
  value: parseFloat(current)
2652
2652
  });
@@ -2655,7 +2655,7 @@ var require_lib$3 = __commonJSMin((exports) => {
2655
2655
  value: this.settings.constants[current]
2656
2656
  });
2657
2657
  else {
2658
- if (!current.match(internals$25.tokenRx)) throw new Error(`Formula contains invalid token: ${current}`);
2658
+ if (!current.match(internals$26.tokenRx)) throw new Error(`Formula contains invalid token: ${current}`);
2659
2659
  parts.push({
2660
2660
  type: "reference",
2661
2661
  value: current
@@ -2675,11 +2675,11 @@ var require_lib$3 = __commonJSMin((exports) => {
2675
2675
  if (!parenthesis) flush(c$1);
2676
2676
  else current += c$1;
2677
2677
  } else current += c$1;
2678
- else if (c$1 in internals$25.literals) literal = internals$25.literals[c$1];
2678
+ else if (c$1 in internals$26.literals) literal = internals$26.literals[c$1];
2679
2679
  else if (c$1 === "(") {
2680
2680
  flush();
2681
2681
  ++parenthesis;
2682
- } else if (internals$25.operatorCharacters.includes(c$1)) {
2682
+ } else if (internals$26.operatorCharacters.includes(c$1)) {
2683
2683
  flush();
2684
2684
  current = c$1;
2685
2685
  flush();
@@ -2696,9 +2696,9 @@ var require_lib$3 = __commonJSMin((exports) => {
2696
2696
  let operator$1 = false;
2697
2697
  for (const part of parts) {
2698
2698
  if (part.type === "operator") {
2699
- if (internals$25.operatorsPrefix.includes(part.value)) continue;
2699
+ if (internals$26.operatorsPrefix.includes(part.value)) continue;
2700
2700
  if (!operator$1) throw new Error("Formula contains an operator in invalid position");
2701
- if (!internals$25.operators.includes(part.value)) throw new Error(`Formula contains an unknown operator ${part.value}`);
2701
+ if (!internals$26.operators.includes(part.value)) throw new Error(`Formula contains an unknown operator ${part.value}`);
2702
2702
  } else if (operator$1) throw new Error("Formula missing expected operator");
2703
2703
  operator$1 = !operator$1;
2704
2704
  }
@@ -2712,11 +2712,11 @@ var require_lib$3 = __commonJSMin((exports) => {
2712
2712
  value: parts[0].value
2713
2713
  };
2714
2714
  this._parts = parts.map((part) => {
2715
- if (part.type === "operator") return internals$25.operatorsPrefix.includes(part.value) ? part : part.value;
2715
+ if (part.type === "operator") return internals$26.operatorsPrefix.includes(part.value) ? part : part.value;
2716
2716
  if (part.type !== "reference") return part.value;
2717
2717
  if (this.settings.tokenRx && !this.settings.tokenRx.test(part.value)) throw new Error(`Formula contains invalid reference ${part.value}`);
2718
2718
  if (this.settings.reference) return this.settings.reference(part.value);
2719
- return internals$25.reference(part.value);
2719
+ return internals$26.reference(part.value);
2720
2720
  });
2721
2721
  }
2722
2722
  _subFormula(string, name$2) {
@@ -2737,9 +2737,9 @@ var require_lib$3 = __commonJSMin((exports) => {
2737
2737
  if (literal) {
2738
2738
  current += c$1;
2739
2739
  if (c$1 === literal) literal = false;
2740
- } else if (c$1 in internals$25.literals && !parenthesis) {
2740
+ } else if (c$1 in internals$26.literals && !parenthesis) {
2741
2741
  current += c$1;
2742
- literal = internals$25.literals[c$1];
2742
+ literal = internals$26.literals[c$1];
2743
2743
  } else if (c$1 === "," && !parenthesis) flush();
2744
2744
  else {
2745
2745
  current += c$1;
@@ -2763,47 +2763,47 @@ var require_lib$3 = __commonJSMin((exports) => {
2763
2763
  if (part && part.type === "operator") {
2764
2764
  const current = parts[i$4 + 1];
2765
2765
  parts.splice(i$4 + 1, 1);
2766
- const value = internals$25.evaluate(current, context);
2767
- parts[i$4] = internals$25.single(part.value, value);
2766
+ const value = internals$26.evaluate(current, context);
2767
+ parts[i$4] = internals$26.single(part.value, value);
2768
2768
  }
2769
2769
  }
2770
- internals$25.operatorsOrder.forEach((set) => {
2770
+ internals$26.operatorsOrder.forEach((set) => {
2771
2771
  for (let i$4 = 1; i$4 < parts.length - 1;) if (set.includes(parts[i$4])) {
2772
2772
  const operator$1 = parts[i$4];
2773
- const left = internals$25.evaluate(parts[i$4 - 1], context);
2774
- const right = internals$25.evaluate(parts[i$4 + 1], context);
2773
+ const left = internals$26.evaluate(parts[i$4 - 1], context);
2774
+ const right = internals$26.evaluate(parts[i$4 + 1], context);
2775
2775
  parts.splice(i$4, 2);
2776
- const result = internals$25.calculate(operator$1, left, right);
2776
+ const result = internals$26.calculate(operator$1, left, right);
2777
2777
  parts[i$4 - 1] = result === 0 ? 0 : result;
2778
2778
  } else i$4 += 2;
2779
2779
  });
2780
- return internals$25.evaluate(parts[0], context);
2780
+ return internals$26.evaluate(parts[0], context);
2781
2781
  }
2782
2782
  };
2783
- exports.Parser.prototype[internals$25.symbol] = true;
2784
- internals$25.reference = function(name$2) {
2783
+ exports.Parser.prototype[internals$26.symbol] = true;
2784
+ internals$26.reference = function(name$2) {
2785
2785
  return function(context) {
2786
2786
  return context && context[name$2] !== void 0 ? context[name$2] : null;
2787
2787
  };
2788
2788
  };
2789
- internals$25.evaluate = function(part, context) {
2789
+ internals$26.evaluate = function(part, context) {
2790
2790
  if (part === null) return null;
2791
2791
  if (typeof part === "function") return part(context);
2792
- if (part[internals$25.symbol]) return part.evaluate(context);
2792
+ if (part[internals$26.symbol]) return part.evaluate(context);
2793
2793
  return part;
2794
2794
  };
2795
- internals$25.single = function(operator$1, value) {
2795
+ internals$26.single = function(operator$1, value) {
2796
2796
  if (operator$1 === "!") return value ? false : true;
2797
2797
  const negative = -value;
2798
2798
  if (negative === 0) return 0;
2799
2799
  return negative;
2800
2800
  };
2801
- internals$25.calculate = function(operator$1, left, right) {
2802
- if (operator$1 === "??") return internals$25.exists(left) ? left : right;
2801
+ internals$26.calculate = function(operator$1, left, right) {
2802
+ if (operator$1 === "??") return internals$26.exists(left) ? left : right;
2803
2803
  if (typeof left === "string" || typeof right === "string") {
2804
2804
  if (operator$1 === "+") {
2805
- left = internals$25.exists(left) ? left : "";
2806
- right = internals$25.exists(right) ? right : "";
2805
+ left = internals$26.exists(left) ? left : "";
2806
+ right = internals$26.exists(right) ? right : "";
2807
2807
  return left + right;
2808
2808
  }
2809
2809
  } else switch (operator$1) {
@@ -2826,17 +2826,17 @@ var require_lib$3 = __commonJSMin((exports) => {
2826
2826
  }
2827
2827
  return null;
2828
2828
  };
2829
- internals$25.exists = function(value) {
2829
+ internals$26.exists = function(value) {
2830
2830
  return value !== null && value !== void 0;
2831
2831
  };
2832
2832
  });
2833
2833
  var require_template = __commonJSMin((exports, module) => {
2834
- const { assert: assert$51, clone: clone$18, escapeHtml: escapeHtml$1 } = require_lib$4();
2834
+ const { assert: assert$52, clone: clone$19, escapeHtml: escapeHtml$1 } = require_lib$4();
2835
2835
  const Formula = require_lib$3();
2836
- const Common$23 = require_common$3();
2836
+ const Common$24 = require_common$3();
2837
2837
  const Errors$8 = require_errors$2();
2838
- const Ref$11 = require_ref$2();
2839
- const internals$24 = {
2838
+ const Ref$12 = require_ref$2();
2839
+ const internals$25 = {
2840
2840
  symbol: Symbol("template"),
2841
2841
  opens: new Array(1e3).join("\0"),
2842
2842
  closes: new Array(1e3).join(""),
@@ -2848,20 +2848,20 @@ var require_template = __commonJSMin((exports, module) => {
2848
2848
  utc: Date.prototype.toUTCString
2849
2849
  }
2850
2850
  };
2851
- module.exports = exports = internals$24.Template = class {
2851
+ module.exports = exports = internals$25.Template = class {
2852
2852
  constructor(source, options) {
2853
- assert$51(typeof source === "string", "Template source must be a string");
2854
- assert$51(!source.includes("\0") && !source.includes(""), "Template source cannot contain reserved control characters");
2853
+ assert$52(typeof source === "string", "Template source must be a string");
2854
+ assert$52(!source.includes("\0") && !source.includes(""), "Template source cannot contain reserved control characters");
2855
2855
  this.source = source;
2856
2856
  this.rendered = source;
2857
2857
  this._template = null;
2858
2858
  if (options) {
2859
2859
  const { functions,...opts } = options;
2860
- this._settings = Object.keys(opts).length ? clone$18(opts) : void 0;
2860
+ this._settings = Object.keys(opts).length ? clone$19(opts) : void 0;
2861
2861
  this._functions = functions;
2862
2862
  if (this._functions) {
2863
- assert$51(Object.keys(this._functions).every((key) => typeof key === "string"), "Functions keys must be strings");
2864
- assert$51(Object.values(this._functions).every((key) => typeof key === "function"), "Functions values must be functions");
2863
+ assert$52(Object.keys(this._functions).every((key) => typeof key === "string"), "Functions keys must be strings");
2864
+ assert$52(Object.values(this._functions).every((key) => typeof key === "function"), "Functions values must be functions");
2865
2865
  }
2866
2866
  } else {
2867
2867
  this._settings = void 0;
@@ -2871,8 +2871,8 @@ var require_template = __commonJSMin((exports, module) => {
2871
2871
  }
2872
2872
  _parse() {
2873
2873
  if (!this.source.includes("{")) return;
2874
- const encoded = internals$24.encode(this.source);
2875
- const parts = internals$24.split(encoded);
2874
+ const encoded = internals$25.encode(this.source);
2875
+ const parts = internals$25.split(encoded);
2876
2876
  let refs = false;
2877
2877
  const processed = [];
2878
2878
  const head$1 = parts.shift();
@@ -2882,20 +2882,20 @@ var require_template = __commonJSMin((exports, module) => {
2882
2882
  const ender = raw ? "}" : "}}";
2883
2883
  const end = part.indexOf(ender);
2884
2884
  if (end === -1 || part[1] === "{") {
2885
- processed.push(`{${internals$24.decode(part)}`);
2885
+ processed.push(`{${internals$25.decode(part)}`);
2886
2886
  continue;
2887
2887
  }
2888
2888
  let variable = part.slice(raw ? 0 : 1, end);
2889
2889
  const wrapped = variable[0] === ":";
2890
2890
  if (wrapped) variable = variable.slice(1);
2891
- const dynamic = this._ref(internals$24.decode(variable), {
2891
+ const dynamic = this._ref(internals$25.decode(variable), {
2892
2892
  raw,
2893
2893
  wrapped
2894
2894
  });
2895
2895
  processed.push(dynamic);
2896
2896
  if (typeof dynamic !== "string") refs = true;
2897
2897
  const rest = part.slice(end + ender.length);
2898
- if (rest) processed.push(internals$24.decode(rest));
2898
+ if (rest) processed.push(internals$25.decode(rest));
2899
2899
  }
2900
2900
  if (!refs) {
2901
2901
  this.rendered = processed.join("");
@@ -2904,7 +2904,7 @@ var require_template = __commonJSMin((exports, module) => {
2904
2904
  this._template = processed;
2905
2905
  }
2906
2906
  static date(date, prefs) {
2907
- return internals$24.dateFormat[prefs.dateFormat].call(date);
2907
+ return internals$25.dateFormat[prefs.dateFormat].call(date);
2908
2908
  }
2909
2909
  describe(options = {}) {
2910
2910
  if (!this._settings && options.compact) return this.source;
@@ -2914,7 +2914,7 @@ var require_template = __commonJSMin((exports, module) => {
2914
2914
  return desc$1;
2915
2915
  }
2916
2916
  static build(desc$1) {
2917
- return new internals$24.Template(desc$1.template, desc$1.options || desc$1.functions ? {
2917
+ return new internals$25.Template(desc$1.template, desc$1.options || desc$1.functions ? {
2918
2918
  ...desc$1.options,
2919
2919
  functions: desc$1.functions
2920
2920
  } : void 0);
@@ -2923,7 +2923,7 @@ var require_template = __commonJSMin((exports, module) => {
2923
2923
  return !!this._template;
2924
2924
  }
2925
2925
  static isTemplate(template) {
2926
- return template ? !!template[Common$23.symbols.template] : false;
2926
+ return template ? !!template[Common$24.symbols.template] : false;
2927
2927
  }
2928
2928
  refs() {
2929
2929
  if (!this._template) return;
@@ -2945,10 +2945,10 @@ var require_template = __commonJSMin((exports, module) => {
2945
2945
  for (const part of this._template) if (typeof part === "string") parts.push(part);
2946
2946
  else {
2947
2947
  const rendered = this._part(part, value, state, prefs, local, options);
2948
- const string = internals$24.stringify(rendered, value, state, prefs, local, options);
2948
+ const string = internals$25.stringify(rendered, value, state, prefs, local, options);
2949
2949
  if (string !== void 0) {
2950
2950
  const result = part.raw || (options.errors && options.errors.escapeHtml) === false ? string : escapeHtml$1(string);
2951
- parts.push(internals$24.wrap(result, part.wrapped && prefs.errors.wrap.label));
2951
+ parts.push(internals$25.wrap(result, part.wrapped && prefs.errors.wrap.label));
2952
2952
  }
2953
2953
  }
2954
2954
  return parts.join("");
@@ -2956,7 +2956,7 @@ var require_template = __commonJSMin((exports, module) => {
2956
2956
  _ref(content, { raw, wrapped }) {
2957
2957
  const refs = [];
2958
2958
  const reference = (variable) => {
2959
- const ref = Ref$11.create(variable, this._settings);
2959
+ const ref = Ref$12.create(variable, this._settings);
2960
2960
  refs.push(ref);
2961
2961
  return (context) => {
2962
2962
  const resolved = ref.resolve(...context);
@@ -2965,13 +2965,13 @@ var require_template = __commonJSMin((exports, module) => {
2965
2965
  };
2966
2966
  try {
2967
2967
  const functions = this._functions ? {
2968
- ...internals$24.functions,
2968
+ ...internals$25.functions,
2969
2969
  ...this._functions
2970
- } : internals$24.functions;
2970
+ } : internals$25.functions;
2971
2971
  var formula = new Formula.Parser(content, {
2972
2972
  reference,
2973
2973
  functions,
2974
- constants: internals$24.constants
2974
+ constants: internals$25.constants
2975
2975
  });
2976
2976
  } catch (err$1) {
2977
2977
  err$1.message = `Invalid template variable "${content}" fails due to: ${err$1.message}`;
@@ -2987,7 +2987,7 @@ var require_template = __commonJSMin((exports, module) => {
2987
2987
  wrapped: wrapped || ref.type === "local" && ref.key === "label"
2988
2988
  };
2989
2989
  }
2990
- return internals$24.stringify(formula.single.value);
2990
+ return internals$25.stringify(formula.single.value);
2991
2991
  }
2992
2992
  return {
2993
2993
  formula,
@@ -2999,19 +2999,19 @@ var require_template = __commonJSMin((exports, module) => {
2999
2999
  return this.source;
3000
3000
  }
3001
3001
  };
3002
- internals$24.Template.prototype[Common$23.symbols.template] = true;
3003
- internals$24.Template.prototype.isImmutable = true;
3004
- internals$24.encode = function(string) {
3002
+ internals$25.Template.prototype[Common$24.symbols.template] = true;
3003
+ internals$25.Template.prototype.isImmutable = true;
3004
+ internals$25.encode = function(string) {
3005
3005
  return string.replace(/\\(\{+)/g, ($0, $1) => {
3006
- return internals$24.opens.slice(0, $1.length);
3006
+ return internals$25.opens.slice(0, $1.length);
3007
3007
  }).replace(/\\(\}+)/g, ($0, $1) => {
3008
- return internals$24.closes.slice(0, $1.length);
3008
+ return internals$25.closes.slice(0, $1.length);
3009
3009
  });
3010
3010
  };
3011
- internals$24.decode = function(string) {
3011
+ internals$25.decode = function(string) {
3012
3012
  return string.replace(/\u0000/g, "{").replace(/\u0001/g, "}");
3013
3013
  };
3014
- internals$24.split = function(string) {
3014
+ internals$25.split = function(string) {
3015
3015
  const parts = [];
3016
3016
  let current = "";
3017
3017
  for (let i$4 = 0; i$4 < string.length; ++i$4) {
@@ -3029,16 +3029,16 @@ var require_template = __commonJSMin((exports, module) => {
3029
3029
  parts.push(current);
3030
3030
  return parts;
3031
3031
  };
3032
- internals$24.wrap = function(value, ends) {
3032
+ internals$25.wrap = function(value, ends) {
3033
3033
  if (!ends) return value;
3034
3034
  if (ends.length === 1) return `${ends}${value}${ends}`;
3035
3035
  return `${ends[0]}${value}${ends[1]}`;
3036
3036
  };
3037
- internals$24.stringify = function(value, original, state, prefs, local, options = {}) {
3037
+ internals$25.stringify = function(value, original, state, prefs, local, options = {}) {
3038
3038
  const type = typeof value;
3039
3039
  const wrap$2 = prefs && prefs.errors && prefs.errors.wrap || {};
3040
3040
  let skipWrap = false;
3041
- if (Ref$11.isRef(value) && value.render) {
3041
+ if (Ref$12.isRef(value) && value.render) {
3042
3042
  skipWrap = value.in;
3043
3043
  value = value.resolve(original, state, prefs, local, {
3044
3044
  in: value.in,
@@ -3046,10 +3046,10 @@ var require_template = __commonJSMin((exports, module) => {
3046
3046
  });
3047
3047
  }
3048
3048
  if (value === null) return "null";
3049
- if (type === "string") return internals$24.wrap(value, options.arrayItems && wrap$2.string);
3049
+ if (type === "string") return internals$25.wrap(value, options.arrayItems && wrap$2.string);
3050
3050
  if (type === "number" || type === "function" || type === "symbol") return value.toString();
3051
3051
  if (type !== "object") return JSON.stringify(value);
3052
- if (value instanceof Date) return internals$24.Template.date(value, prefs);
3052
+ if (value instanceof Date) return internals$25.Template.date(value, prefs);
3053
3053
  if (value instanceof Map) {
3054
3054
  const pairs = [];
3055
3055
  for (const [key, sym] of value.entries()) pairs.push(`${key.toString()} -> ${sym.toString()}`);
@@ -3057,13 +3057,13 @@ var require_template = __commonJSMin((exports, module) => {
3057
3057
  }
3058
3058
  if (!Array.isArray(value)) return value.toString();
3059
3059
  const values$3 = [];
3060
- for (const item of value) values$3.push(internals$24.stringify(item, original, state, prefs, local, {
3060
+ for (const item of value) values$3.push(internals$25.stringify(item, original, state, prefs, local, {
3061
3061
  arrayItems: true,
3062
3062
  ...options
3063
3063
  }));
3064
- return internals$24.wrap(values$3.join(", "), !skipWrap && wrap$2.array);
3064
+ return internals$25.wrap(values$3.join(", "), !skipWrap && wrap$2.array);
3065
3065
  };
3066
- internals$24.constants = {
3066
+ internals$25.constants = {
3067
3067
  true: true,
3068
3068
  false: false,
3069
3069
  null: null,
@@ -3072,7 +3072,7 @@ var require_template = __commonJSMin((exports, module) => {
3072
3072
  hour: 60 * 60 * 1e3,
3073
3073
  day: 24 * 60 * 60 * 1e3
3074
3074
  };
3075
- internals$24.functions = {
3075
+ internals$25.functions = {
3076
3076
  if(condition, then, otherwise) {
3077
3077
  return condition ? then : otherwise;
3078
3078
  },
@@ -3100,10 +3100,10 @@ var require_template = __commonJSMin((exports, module) => {
3100
3100
  };
3101
3101
  });
3102
3102
  var require_ref$2 = __commonJSMin((exports) => {
3103
- const { assert: assert$50, clone: clone$17, reach: reach$4 } = require_lib$4();
3104
- const Common$22 = require_common$3();
3105
- let Template$7;
3106
- const internals$23 = {
3103
+ const { assert: assert$51, clone: clone$18, reach: reach$4 } = require_lib$4();
3104
+ const Common$23 = require_common$3();
3105
+ let Template$8;
3106
+ const internals$24 = {
3107
3107
  symbol: Symbol("ref"),
3108
3108
  defaults: {
3109
3109
  adjust: null,
@@ -3115,8 +3115,8 @@ var require_ref$2 = __commonJSMin((exports) => {
3115
3115
  }
3116
3116
  };
3117
3117
  exports.create = function(key, options = {}) {
3118
- assert$50(typeof key === "string", "Invalid reference key:", key);
3119
- Common$22.assertOptions(options, [
3118
+ assert$51(typeof key === "string", "Invalid reference key:", key);
3119
+ Common$23.assertOptions(options, [
3120
3120
  "adjust",
3121
3121
  "ancestor",
3122
3122
  "in",
@@ -3126,25 +3126,25 @@ var require_ref$2 = __commonJSMin((exports) => {
3126
3126
  "render",
3127
3127
  "separator"
3128
3128
  ]);
3129
- assert$50(!options.prefix || typeof options.prefix === "object", "options.prefix must be of type object");
3130
- const ref = Object.assign({}, internals$23.defaults, options);
3129
+ assert$51(!options.prefix || typeof options.prefix === "object", "options.prefix must be of type object");
3130
+ const ref = Object.assign({}, internals$24.defaults, options);
3131
3131
  delete ref.prefix;
3132
3132
  const separator = ref.separator;
3133
- const context = internals$23.context(key, separator, options.prefix);
3133
+ const context = internals$24.context(key, separator, options.prefix);
3134
3134
  ref.type = context.type;
3135
3135
  key = context.key;
3136
3136
  if (ref.type === "value") {
3137
3137
  if (context.root) {
3138
- assert$50(!separator || key[0] !== separator, "Cannot specify relative path with root prefix");
3138
+ assert$51(!separator || key[0] !== separator, "Cannot specify relative path with root prefix");
3139
3139
  ref.ancestor = "root";
3140
3140
  if (!key) key = null;
3141
3141
  }
3142
3142
  if (separator && separator === key) {
3143
3143
  key = null;
3144
3144
  ref.ancestor = 0;
3145
- } else if (ref.ancestor !== void 0) assert$50(!separator || !key || key[0] !== separator, "Cannot combine prefix with ancestor option");
3145
+ } else if (ref.ancestor !== void 0) assert$51(!separator || !key || key[0] !== separator, "Cannot combine prefix with ancestor option");
3146
3146
  else {
3147
- const [ancestor, slice$1] = internals$23.ancestor(key, separator);
3147
+ const [ancestor, slice$1] = internals$24.ancestor(key, separator);
3148
3148
  if (slice$1) {
3149
3149
  key = key.slice(slice$1);
3150
3150
  if (key === "") key = null;
@@ -3153,7 +3153,7 @@ var require_ref$2 = __commonJSMin((exports) => {
3153
3153
  }
3154
3154
  }
3155
3155
  ref.path = separator ? key === null ? [] : key.split(separator) : [key];
3156
- return new internals$23.Ref(ref);
3156
+ return new internals$24.Ref(ref);
3157
3157
  };
3158
3158
  exports.in = function(key, options = {}) {
3159
3159
  return exports.create(key, {
@@ -3162,12 +3162,12 @@ var require_ref$2 = __commonJSMin((exports) => {
3162
3162
  });
3163
3163
  };
3164
3164
  exports.isRef = function(ref) {
3165
- return ref ? !!ref[Common$22.symbols.ref] : false;
3165
+ return ref ? !!ref[Common$23.symbols.ref] : false;
3166
3166
  };
3167
- internals$23.Ref = class {
3167
+ internals$24.Ref = class {
3168
3168
  constructor(options) {
3169
- assert$50(typeof options === "object", "Invalid reference construction");
3170
- Common$22.assertOptions(options, [
3169
+ assert$51(typeof options === "object", "Invalid reference construction");
3170
+ Common$23.assertOptions(options, [
3171
3171
  "adjust",
3172
3172
  "ancestor",
3173
3173
  "in",
@@ -3182,12 +3182,12 @@ var require_ref$2 = __commonJSMin((exports) => {
3182
3182
  "root",
3183
3183
  "display"
3184
3184
  ]);
3185
- assert$50([false, void 0].includes(options.separator) || typeof options.separator === "string" && options.separator.length === 1, "Invalid separator");
3186
- assert$50(!options.adjust || typeof options.adjust === "function", "options.adjust must be a function");
3187
- assert$50(!options.map || Array.isArray(options.map), "options.map must be an array");
3188
- assert$50(!options.map || !options.adjust, "Cannot set both map and adjust options");
3189
- Object.assign(this, internals$23.defaults, options);
3190
- assert$50(this.type === "value" || this.ancestor === void 0, "Non-value references cannot reference ancestors");
3185
+ assert$51([false, void 0].includes(options.separator) || typeof options.separator === "string" && options.separator.length === 1, "Invalid separator");
3186
+ assert$51(!options.adjust || typeof options.adjust === "function", "options.adjust must be a function");
3187
+ assert$51(!options.map || Array.isArray(options.map), "options.map must be an array");
3188
+ assert$51(!options.map || !options.adjust, "Cannot set both map and adjust options");
3189
+ Object.assign(this, internals$24.defaults, options);
3190
+ assert$51(this.type === "value" || this.ancestor === void 0, "Non-value references cannot reference ancestors");
3191
3191
  if (Array.isArray(this.map)) this.map = new Map(this.map);
3192
3192
  this.depth = this.path.length;
3193
3193
  this.key = this.path.length ? this.path.join(this.separator) : null;
@@ -3195,12 +3195,12 @@ var require_ref$2 = __commonJSMin((exports) => {
3195
3195
  this.updateDisplay();
3196
3196
  }
3197
3197
  resolve(value, state, prefs, local, options = {}) {
3198
- assert$50(!this.in || options.in, "Invalid in() reference usage");
3198
+ assert$51(!this.in || options.in, "Invalid in() reference usage");
3199
3199
  if (this.type === "global") return this._resolve(prefs.context, state, options);
3200
3200
  if (this.type === "local") return this._resolve(local, state, options);
3201
3201
  if (!this.ancestor) return this._resolve(value, state, options);
3202
3202
  if (this.ancestor === "root") return this._resolve(state.ancestors[state.ancestors.length - 1], state, options);
3203
- assert$50(this.ancestor <= state.ancestors.length, "Invalid reference exceeds the schema root:", this.display);
3203
+ assert$51(this.ancestor <= state.ancestors.length, "Invalid reference exceeds the schema root:", this.display);
3204
3204
  return this._resolve(state.ancestors[this.ancestor - 1], state, options);
3205
3205
  }
3206
3206
  _resolve(target, state, options) {
@@ -3225,7 +3225,7 @@ var require_ref$2 = __commonJSMin((exports) => {
3225
3225
  return [...state.path.slice(0, -this.ancestor), ...this.path];
3226
3226
  }
3227
3227
  clone() {
3228
- return new internals$23.Ref(this);
3228
+ return new internals$24.Ref(this);
3229
3229
  }
3230
3230
  describe() {
3231
3231
  const ref = { path: this.path };
@@ -3267,13 +3267,13 @@ var require_ref$2 = __commonJSMin((exports) => {
3267
3267
  this.display = `ref:${lead}${key || ""}`;
3268
3268
  }
3269
3269
  };
3270
- internals$23.Ref.prototype[Common$22.symbols.ref] = true;
3270
+ internals$24.Ref.prototype[Common$23.symbols.ref] = true;
3271
3271
  exports.build = function(desc$1) {
3272
- desc$1 = Object.assign({}, internals$23.defaults, desc$1);
3272
+ desc$1 = Object.assign({}, internals$24.defaults, desc$1);
3273
3273
  if (desc$1.type === "value" && desc$1.ancestor === void 0) desc$1.ancestor = 1;
3274
- return new internals$23.Ref(desc$1);
3274
+ return new internals$24.Ref(desc$1);
3275
3275
  };
3276
- internals$23.context = function(key, separator, prefix = {}) {
3276
+ internals$24.context = function(key, separator, prefix = {}) {
3277
3277
  key = key.trim();
3278
3278
  if (prefix) {
3279
3279
  const globalp = prefix.global === void 0 ? "$" : prefix.global;
@@ -3298,7 +3298,7 @@ var require_ref$2 = __commonJSMin((exports) => {
3298
3298
  type: "value"
3299
3299
  };
3300
3300
  };
3301
- internals$23.ancestor = function(key, separator) {
3301
+ internals$24.ancestor = function(key, separator) {
3302
3302
  if (!separator) return [1, 0];
3303
3303
  if (key[0] !== separator) return [1, 0];
3304
3304
  if (key[1] !== separator) return [0, 1];
@@ -3319,7 +3319,7 @@ var require_ref$2 = __commonJSMin((exports) => {
3319
3319
  for (const ref of source) this.register(ref, target);
3320
3320
  return;
3321
3321
  }
3322
- if (Common$22.isSchema(source)) {
3322
+ if (Common$23.isSchema(source)) {
3323
3323
  for (const item of source._refs.refs) if (item.ancestor - target >= 0) this.refs.push({
3324
3324
  ancestor: item.ancestor - target,
3325
3325
  root: item.root
@@ -3330,15 +3330,15 @@ var require_ref$2 = __commonJSMin((exports) => {
3330
3330
  ancestor: source.ancestor - target,
3331
3331
  root: source.root
3332
3332
  });
3333
- Template$7 = Template$7 || require_template();
3334
- if (Template$7.isTemplate(source)) this.register(source.refs(), target);
3333
+ Template$8 = Template$8 || require_template();
3334
+ if (Template$8.isTemplate(source)) this.register(source.refs(), target);
3335
3335
  }
3336
3336
  get length() {
3337
3337
  return this.refs.length;
3338
3338
  }
3339
3339
  clone() {
3340
3340
  const copy = new exports.Manager();
3341
- copy.refs = clone$17(this.refs);
3341
+ copy.refs = clone$18(this.refs);
3342
3342
  return copy;
3343
3343
  }
3344
3344
  reset() {
@@ -3350,80 +3350,80 @@ var require_ref$2 = __commonJSMin((exports) => {
3350
3350
  };
3351
3351
  });
3352
3352
  var require_compile = __commonJSMin((exports) => {
3353
- const { assert: assert$49 } = require_lib$4();
3354
- const Common$21 = require_common$3();
3355
- const Ref$10 = require_ref$2();
3356
- const internals$22 = {};
3353
+ const { assert: assert$50 } = require_lib$4();
3354
+ const Common$22 = require_common$3();
3355
+ const Ref$11 = require_ref$2();
3356
+ const internals$23 = {};
3357
3357
  exports.schema = function(Joi$2, config, options = {}) {
3358
- Common$21.assertOptions(options, ["appendPath", "override"]);
3358
+ Common$22.assertOptions(options, ["appendPath", "override"]);
3359
3359
  try {
3360
- return internals$22.schema(Joi$2, config, options);
3360
+ return internals$23.schema(Joi$2, config, options);
3361
3361
  } catch (err$1) {
3362
3362
  if (options.appendPath && err$1.path !== void 0) err$1.message = `${err$1.message} (${err$1.path})`;
3363
3363
  throw err$1;
3364
3364
  }
3365
3365
  };
3366
- internals$22.schema = function(Joi$2, config, options) {
3367
- assert$49(config !== void 0, "Invalid undefined schema");
3366
+ internals$23.schema = function(Joi$2, config, options) {
3367
+ assert$50(config !== void 0, "Invalid undefined schema");
3368
3368
  if (Array.isArray(config)) {
3369
- assert$49(config.length, "Invalid empty array schema");
3369
+ assert$50(config.length, "Invalid empty array schema");
3370
3370
  if (config.length === 1) config = config[0];
3371
3371
  }
3372
3372
  const valid$2 = (base$3, ...values$3) => {
3373
3373
  if (options.override !== false) return base$3.valid(Joi$2.override, ...values$3);
3374
3374
  return base$3.valid(...values$3);
3375
3375
  };
3376
- if (internals$22.simple(config)) return valid$2(Joi$2, config);
3376
+ if (internals$23.simple(config)) return valid$2(Joi$2, config);
3377
3377
  if (typeof config === "function") return Joi$2.custom(config);
3378
- assert$49(typeof config === "object", "Invalid schema content:", typeof config);
3379
- if (Common$21.isResolvable(config)) return valid$2(Joi$2, config);
3380
- if (Common$21.isSchema(config)) return config;
3378
+ assert$50(typeof config === "object", "Invalid schema content:", typeof config);
3379
+ if (Common$22.isResolvable(config)) return valid$2(Joi$2, config);
3380
+ if (Common$22.isSchema(config)) return config;
3381
3381
  if (Array.isArray(config)) {
3382
- for (const item of config) if (!internals$22.simple(item)) return Joi$2.alternatives().try(...config);
3382
+ for (const item of config) if (!internals$23.simple(item)) return Joi$2.alternatives().try(...config);
3383
3383
  return valid$2(Joi$2, ...config);
3384
3384
  }
3385
3385
  if (config instanceof RegExp) return Joi$2.string().regex(config);
3386
3386
  if (config instanceof Date) return valid$2(Joi$2.date(), config);
3387
- assert$49(Object.getPrototypeOf(config) === Object.getPrototypeOf({}), "Schema can only contain plain objects");
3387
+ assert$50(Object.getPrototypeOf(config) === Object.getPrototypeOf({}), "Schema can only contain plain objects");
3388
3388
  return Joi$2.object().keys(config);
3389
3389
  };
3390
3390
  exports.ref = function(id, options) {
3391
- return Ref$10.isRef(id) ? id : Ref$10.create(id, options);
3391
+ return Ref$11.isRef(id) ? id : Ref$11.create(id, options);
3392
3392
  };
3393
3393
  exports.compile = function(root$11, schema$2, options = {}) {
3394
- Common$21.assertOptions(options, ["legacy"]);
3395
- const any = schema$2 && schema$2[Common$21.symbols.any];
3394
+ Common$22.assertOptions(options, ["legacy"]);
3395
+ const any = schema$2 && schema$2[Common$22.symbols.any];
3396
3396
  if (any) {
3397
- assert$49(options.legacy || any.version === Common$21.version, "Cannot mix different versions of joi schemas:", any.version, Common$21.version);
3397
+ assert$50(options.legacy || any.version === Common$22.version, "Cannot mix different versions of joi schemas:", any.version, Common$22.version);
3398
3398
  return schema$2;
3399
3399
  }
3400
3400
  if (typeof schema$2 !== "object" || !options.legacy) return exports.schema(root$11, schema$2, { appendPath: true });
3401
- const compiler = internals$22.walk(schema$2);
3401
+ const compiler = internals$23.walk(schema$2);
3402
3402
  if (!compiler) return exports.schema(root$11, schema$2, { appendPath: true });
3403
3403
  return compiler.compile(compiler.root, schema$2);
3404
3404
  };
3405
- internals$22.walk = function(schema$2) {
3405
+ internals$23.walk = function(schema$2) {
3406
3406
  if (typeof schema$2 !== "object") return null;
3407
3407
  if (Array.isArray(schema$2)) {
3408
3408
  for (const item of schema$2) {
3409
- const compiler = internals$22.walk(item);
3409
+ const compiler = internals$23.walk(item);
3410
3410
  if (compiler) return compiler;
3411
3411
  }
3412
3412
  return null;
3413
3413
  }
3414
- const any = schema$2[Common$21.symbols.any];
3414
+ const any = schema$2[Common$22.symbols.any];
3415
3415
  if (any) return {
3416
3416
  root: schema$2[any.root],
3417
3417
  compile: any.compile
3418
3418
  };
3419
- assert$49(Object.getPrototypeOf(schema$2) === Object.getPrototypeOf({}), "Schema can only contain plain objects");
3419
+ assert$50(Object.getPrototypeOf(schema$2) === Object.getPrototypeOf({}), "Schema can only contain plain objects");
3420
3420
  for (const key in schema$2) {
3421
- const compiler = internals$22.walk(schema$2[key]);
3421
+ const compiler = internals$23.walk(schema$2[key]);
3422
3422
  if (compiler) return compiler;
3423
3423
  }
3424
3424
  return null;
3425
3425
  };
3426
- internals$22.simple = function(value) {
3426
+ internals$23.simple = function(value) {
3427
3427
  return value === null || [
3428
3428
  "boolean",
3429
3429
  "string",
@@ -3432,12 +3432,12 @@ var require_compile = __commonJSMin((exports) => {
3432
3432
  };
3433
3433
  exports.when = function(schema$2, condition, options) {
3434
3434
  if (options === void 0) {
3435
- assert$49(condition && typeof condition === "object", "Missing options");
3435
+ assert$50(condition && typeof condition === "object", "Missing options");
3436
3436
  options = condition;
3437
- condition = Ref$10.create(".");
3437
+ condition = Ref$11.create(".");
3438
3438
  }
3439
3439
  if (Array.isArray(options)) options = { switch: options };
3440
- Common$21.assertOptions(options, [
3440
+ Common$22.assertOptions(options, [
3441
3441
  "is",
3442
3442
  "not",
3443
3443
  "then",
@@ -3445,19 +3445,19 @@ var require_compile = __commonJSMin((exports) => {
3445
3445
  "switch",
3446
3446
  "break"
3447
3447
  ]);
3448
- if (Common$21.isSchema(condition)) {
3449
- assert$49(options.is === void 0, "\"is\" can not be used with a schema condition");
3450
- assert$49(options.not === void 0, "\"not\" can not be used with a schema condition");
3451
- assert$49(options.switch === void 0, "\"switch\" can not be used with a schema condition");
3452
- return internals$22.condition(schema$2, {
3448
+ if (Common$22.isSchema(condition)) {
3449
+ assert$50(options.is === void 0, "\"is\" can not be used with a schema condition");
3450
+ assert$50(options.not === void 0, "\"not\" can not be used with a schema condition");
3451
+ assert$50(options.switch === void 0, "\"switch\" can not be used with a schema condition");
3452
+ return internals$23.condition(schema$2, {
3453
3453
  is: condition,
3454
3454
  then: options.then,
3455
3455
  otherwise: options.otherwise,
3456
3456
  break: options.break
3457
3457
  });
3458
3458
  }
3459
- assert$49(Ref$10.isRef(condition) || typeof condition === "string", "Invalid condition:", condition);
3460
- assert$49(options.not === void 0 || options.is === void 0, "Cannot combine \"is\" with \"not\"");
3459
+ assert$50(Ref$11.isRef(condition) || typeof condition === "string", "Invalid condition:", condition);
3460
+ assert$50(options.not === void 0 || options.is === void 0, "Cannot combine \"is\" with \"not\"");
3461
3461
  if (options.switch === void 0) {
3462
3462
  let rule$1 = options;
3463
3463
  if (options.not !== void 0) rule$1 = {
@@ -3467,10 +3467,10 @@ var require_compile = __commonJSMin((exports) => {
3467
3467
  break: options.break
3468
3468
  };
3469
3469
  let is = rule$1.is !== void 0 ? schema$2.$_compile(rule$1.is) : schema$2.$_root.invalid(null, false, 0, "").required();
3470
- assert$49(rule$1.then !== void 0 || rule$1.otherwise !== void 0, "options must have at least one of \"then\", \"otherwise\", or \"switch\"");
3471
- 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");
3472
- if (options.is !== void 0 && !Ref$10.isRef(options.is) && !Common$21.isSchema(options.is)) is = is.required();
3473
- return internals$22.condition(schema$2, {
3470
+ assert$50(rule$1.then !== void 0 || rule$1.otherwise !== void 0, "options must have at least one of \"then\", \"otherwise\", or \"switch\"");
3471
+ 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");
3472
+ if (options.is !== void 0 && !Ref$11.isRef(options.is) && !Common$22.isSchema(options.is)) is = is.required();
3473
+ return internals$23.condition(schema$2, {
3474
3474
  ref: exports.ref(condition),
3475
3475
  is,
3476
3476
  then: rule$1.then,
@@ -3478,10 +3478,10 @@ var require_compile = __commonJSMin((exports) => {
3478
3478
  break: rule$1.break
3479
3479
  });
3480
3480
  }
3481
- assert$49(Array.isArray(options.switch), "\"switch\" must be an array");
3482
- assert$49(options.is === void 0, "Cannot combine \"switch\" with \"is\"");
3483
- assert$49(options.not === void 0, "Cannot combine \"switch\" with \"not\"");
3484
- assert$49(options.then === void 0, "Cannot combine \"switch\" with \"then\"");
3481
+ assert$50(Array.isArray(options.switch), "\"switch\" must be an array");
3482
+ assert$50(options.is === void 0, "Cannot combine \"switch\" with \"is\"");
3483
+ assert$50(options.not === void 0, "Cannot combine \"switch\" with \"not\"");
3484
+ assert$50(options.then === void 0, "Cannot combine \"switch\" with \"then\"");
3485
3485
  const rule = {
3486
3486
  ref: exports.ref(condition),
3487
3487
  switch: [],
@@ -3490,23 +3490,23 @@ var require_compile = __commonJSMin((exports) => {
3490
3490
  for (let i$4 = 0; i$4 < options.switch.length; ++i$4) {
3491
3491
  const test = options.switch[i$4];
3492
3492
  const last$2 = i$4 === options.switch.length - 1;
3493
- Common$21.assertOptions(test, last$2 ? [
3493
+ Common$22.assertOptions(test, last$2 ? [
3494
3494
  "is",
3495
3495
  "then",
3496
3496
  "otherwise"
3497
3497
  ] : ["is", "then"]);
3498
- assert$49(test.is !== void 0, "Switch statement missing \"is\"");
3499
- assert$49(test.then !== void 0, "Switch statement missing \"then\"");
3498
+ assert$50(test.is !== void 0, "Switch statement missing \"is\"");
3499
+ assert$50(test.then !== void 0, "Switch statement missing \"then\"");
3500
3500
  const item = {
3501
3501
  is: schema$2.$_compile(test.is),
3502
3502
  then: schema$2.$_compile(test.then)
3503
3503
  };
3504
- if (!Ref$10.isRef(test.is) && !Common$21.isSchema(test.is)) item.is = item.is.required();
3504
+ if (!Ref$11.isRef(test.is) && !Common$22.isSchema(test.is)) item.is = item.is.required();
3505
3505
  if (last$2) {
3506
- assert$49(options.otherwise === void 0 || test.otherwise === void 0, "Cannot specify \"otherwise\" inside and outside a \"switch\"");
3506
+ assert$50(options.otherwise === void 0 || test.otherwise === void 0, "Cannot specify \"otherwise\" inside and outside a \"switch\"");
3507
3507
  const otherwise = options.otherwise !== void 0 ? options.otherwise : test.otherwise;
3508
3508
  if (otherwise !== void 0) {
3509
- assert$49(rule.break === void 0, "Cannot specify both otherwise and break");
3509
+ assert$50(rule.break === void 0, "Cannot specify both otherwise and break");
3510
3510
  item.otherwise = schema$2.$_compile(otherwise);
3511
3511
  }
3512
3512
  }
@@ -3514,47 +3514,47 @@ var require_compile = __commonJSMin((exports) => {
3514
3514
  }
3515
3515
  return rule;
3516
3516
  };
3517
- internals$22.condition = function(schema$2, condition) {
3517
+ internals$23.condition = function(schema$2, condition) {
3518
3518
  for (const key of ["then", "otherwise"]) if (condition[key] === void 0) delete condition[key];
3519
3519
  else condition[key] = schema$2.$_compile(condition[key]);
3520
3520
  return condition;
3521
3521
  };
3522
3522
  });
3523
3523
  var require_messages = __commonJSMin((exports) => {
3524
- const { assert: assert$48, clone: clone$16 } = require_lib$4();
3525
- const Template$6 = require_template();
3524
+ const { assert: assert$49, clone: clone$17 } = require_lib$4();
3525
+ const Template$7 = require_template();
3526
3526
  exports.compile = function(messages$3, target) {
3527
3527
  if (typeof messages$3 === "string") {
3528
- assert$48(!target, "Cannot set single message string");
3529
- return new Template$6(messages$3);
3528
+ assert$49(!target, "Cannot set single message string");
3529
+ return new Template$7(messages$3);
3530
3530
  }
3531
- if (Template$6.isTemplate(messages$3)) {
3532
- assert$48(!target, "Cannot set single message template");
3531
+ if (Template$7.isTemplate(messages$3)) {
3532
+ assert$49(!target, "Cannot set single message template");
3533
3533
  return messages$3;
3534
3534
  }
3535
- assert$48(typeof messages$3 === "object" && !Array.isArray(messages$3), "Invalid message options");
3536
- target = target ? clone$16(target) : {};
3535
+ assert$49(typeof messages$3 === "object" && !Array.isArray(messages$3), "Invalid message options");
3536
+ target = target ? clone$17(target) : {};
3537
3537
  for (let code$2 in messages$3) {
3538
3538
  const message = messages$3[code$2];
3539
- if (code$2 === "root" || Template$6.isTemplate(message)) {
3539
+ if (code$2 === "root" || Template$7.isTemplate(message)) {
3540
3540
  target[code$2] = message;
3541
3541
  continue;
3542
3542
  }
3543
3543
  if (typeof message === "string") {
3544
- target[code$2] = new Template$6(message);
3544
+ target[code$2] = new Template$7(message);
3545
3545
  continue;
3546
3546
  }
3547
- assert$48(typeof message === "object" && !Array.isArray(message), "Invalid message for", code$2);
3547
+ assert$49(typeof message === "object" && !Array.isArray(message), "Invalid message for", code$2);
3548
3548
  const language = code$2;
3549
3549
  target[language] = target[language] || {};
3550
3550
  for (code$2 in message) {
3551
3551
  const localized = message[code$2];
3552
- if (code$2 === "root" || Template$6.isTemplate(localized)) {
3552
+ if (code$2 === "root" || Template$7.isTemplate(localized)) {
3553
3553
  target[language][code$2] = localized;
3554
3554
  continue;
3555
3555
  }
3556
- assert$48(typeof localized === "string", "Invalid message for", code$2, "in", language);
3557
- target[language][code$2] = new Template$6(localized);
3556
+ assert$49(typeof localized === "string", "Invalid message for", code$2, "in", language);
3557
+ target[language][code$2] = new Template$7(localized);
3558
3558
  }
3559
3559
  }
3560
3560
  return target;
@@ -3567,7 +3567,7 @@ var require_messages = __commonJSMin((exports) => {
3567
3567
  target.root = message;
3568
3568
  continue;
3569
3569
  }
3570
- if (Template$6.isTemplate(message)) {
3570
+ if (Template$7.isTemplate(message)) {
3571
3571
  target[code$2] = message.describe({ compact: true });
3572
3572
  continue;
3573
3573
  }
@@ -3587,62 +3587,62 @@ var require_messages = __commonJSMin((exports) => {
3587
3587
  exports.merge = function(base$3, extended) {
3588
3588
  if (!base$3) return exports.compile(extended);
3589
3589
  if (!extended) return base$3;
3590
- if (typeof extended === "string") return new Template$6(extended);
3591
- if (Template$6.isTemplate(extended)) return extended;
3592
- const target = clone$16(base$3);
3590
+ if (typeof extended === "string") return new Template$7(extended);
3591
+ if (Template$7.isTemplate(extended)) return extended;
3592
+ const target = clone$17(base$3);
3593
3593
  for (let code$2 in extended) {
3594
3594
  const message = extended[code$2];
3595
- if (code$2 === "root" || Template$6.isTemplate(message)) {
3595
+ if (code$2 === "root" || Template$7.isTemplate(message)) {
3596
3596
  target[code$2] = message;
3597
3597
  continue;
3598
3598
  }
3599
3599
  if (typeof message === "string") {
3600
- target[code$2] = new Template$6(message);
3600
+ target[code$2] = new Template$7(message);
3601
3601
  continue;
3602
3602
  }
3603
- assert$48(typeof message === "object" && !Array.isArray(message), "Invalid message for", code$2);
3603
+ assert$49(typeof message === "object" && !Array.isArray(message), "Invalid message for", code$2);
3604
3604
  const language = code$2;
3605
3605
  target[language] = target[language] || {};
3606
3606
  for (code$2 in message) {
3607
3607
  const localized = message[code$2];
3608
- if (code$2 === "root" || Template$6.isTemplate(localized)) {
3608
+ if (code$2 === "root" || Template$7.isTemplate(localized)) {
3609
3609
  target[language][code$2] = localized;
3610
3610
  continue;
3611
3611
  }
3612
- assert$48(typeof localized === "string", "Invalid message for", code$2, "in", language);
3613
- target[language][code$2] = new Template$6(localized);
3612
+ assert$49(typeof localized === "string", "Invalid message for", code$2, "in", language);
3613
+ target[language][code$2] = new Template$7(localized);
3614
3614
  }
3615
3615
  }
3616
3616
  return target;
3617
3617
  };
3618
3618
  });
3619
3619
  var require_extend$1 = __commonJSMin((exports) => {
3620
- const { assert: assert$47, clone: clone$15 } = require_lib$4();
3621
- const Common$20 = require_common$3();
3622
- const Messages$6 = require_messages();
3623
- const internals$21 = {};
3620
+ const { assert: assert$48, clone: clone$16 } = require_lib$4();
3621
+ const Common$21 = require_common$3();
3622
+ const Messages$7 = require_messages();
3623
+ const internals$22 = {};
3624
3624
  exports.type = function(from$2, options) {
3625
3625
  const base$3 = Object.getPrototypeOf(from$2);
3626
- const prototype = clone$15(base$3);
3626
+ const prototype = clone$16(base$3);
3627
3627
  const schema$2 = from$2._assign(Object.create(prototype));
3628
3628
  const def = Object.assign({}, options);
3629
3629
  delete def.base;
3630
3630
  prototype._definition = def;
3631
3631
  const parent = base$3._definition || {};
3632
- def.messages = Messages$6.merge(parent.messages, def.messages);
3632
+ def.messages = Messages$7.merge(parent.messages, def.messages);
3633
3633
  def.properties = Object.assign({}, parent.properties, def.properties);
3634
3634
  schema$2.type = def.type;
3635
3635
  def.flags = Object.assign({}, parent.flags, def.flags);
3636
3636
  const terms = Object.assign({}, parent.terms);
3637
3637
  if (def.terms) for (const name$2 in def.terms) {
3638
3638
  const term = def.terms[name$2];
3639
- assert$47(schema$2.$_terms[name$2] === void 0, "Invalid term override for", def.type, name$2);
3639
+ assert$48(schema$2.$_terms[name$2] === void 0, "Invalid term override for", def.type, name$2);
3640
3640
  schema$2.$_terms[name$2] = term.init;
3641
3641
  terms[name$2] = term;
3642
3642
  }
3643
3643
  def.terms = terms;
3644
3644
  if (!def.args) def.args = parent.args;
3645
- def.prepare = internals$21.prepare(def.prepare, parent.prepare);
3645
+ def.prepare = internals$22.prepare(def.prepare, parent.prepare);
3646
3646
  if (def.coerce) {
3647
3647
  if (typeof def.coerce === "function") def.coerce = { method: def.coerce };
3648
3648
  if (def.coerce.from && !Array.isArray(def.coerce.from)) def.coerce = {
@@ -3650,21 +3650,21 @@ var require_extend$1 = __commonJSMin((exports) => {
3650
3650
  from: [].concat(def.coerce.from)
3651
3651
  };
3652
3652
  }
3653
- def.coerce = internals$21.coerce(def.coerce, parent.coerce);
3654
- def.validate = internals$21.validate(def.validate, parent.validate);
3653
+ def.coerce = internals$22.coerce(def.coerce, parent.coerce);
3654
+ def.validate = internals$22.validate(def.validate, parent.validate);
3655
3655
  const rules = Object.assign({}, parent.rules);
3656
3656
  if (def.rules) for (const name$2 in def.rules) {
3657
3657
  const rule = def.rules[name$2];
3658
- assert$47(typeof rule === "object", "Invalid rule definition for", def.type, name$2);
3658
+ assert$48(typeof rule === "object", "Invalid rule definition for", def.type, name$2);
3659
3659
  let method$1 = rule.method;
3660
3660
  if (method$1 === void 0) method$1 = function() {
3661
3661
  return this.$_addRule(name$2);
3662
3662
  };
3663
3663
  if (method$1) {
3664
- assert$47(!prototype[name$2], "Rule conflict in", def.type, name$2);
3664
+ assert$48(!prototype[name$2], "Rule conflict in", def.type, name$2);
3665
3665
  prototype[name$2] = method$1;
3666
3666
  }
3667
- assert$47(!rules[name$2], "Rule conflict in", def.type, name$2);
3667
+ assert$48(!rules[name$2], "Rule conflict in", def.type, name$2);
3668
3668
  rules[name$2] = rule;
3669
3669
  if (rule.alias) {
3670
3670
  const aliases$1 = [].concat(rule.alias);
@@ -3674,8 +3674,8 @@ var require_extend$1 = __commonJSMin((exports) => {
3674
3674
  rule.argsByName = new Map();
3675
3675
  rule.args = rule.args.map((arg) => {
3676
3676
  if (typeof arg === "string") arg = { name: arg };
3677
- assert$47(!rule.argsByName.has(arg.name), "Duplicated argument name", arg.name);
3678
- if (Common$20.isSchema(arg.assert)) arg.assert = arg.assert.strict().label(arg.name);
3677
+ assert$48(!rule.argsByName.has(arg.name), "Duplicated argument name", arg.name);
3678
+ if (Common$21.isSchema(arg.assert)) arg.assert = arg.assert.strict().label(arg.name);
3679
3679
  rule.argsByName.set(arg.name, arg);
3680
3680
  return arg;
3681
3681
  });
@@ -3684,9 +3684,9 @@ var require_extend$1 = __commonJSMin((exports) => {
3684
3684
  def.rules = rules;
3685
3685
  const modifiers$1 = Object.assign({}, parent.modifiers);
3686
3686
  if (def.modifiers) for (const name$2 in def.modifiers) {
3687
- assert$47(!prototype[name$2], "Rule conflict in", def.type, name$2);
3687
+ assert$48(!prototype[name$2], "Rule conflict in", def.type, name$2);
3688
3688
  const modifier = def.modifiers[name$2];
3689
- assert$47(typeof modifier === "function", "Invalid modifier definition for", def.type, name$2);
3689
+ assert$48(typeof modifier === "function", "Invalid modifier definition for", def.type, name$2);
3690
3690
  const method$1 = function(arg) {
3691
3691
  return this.rule({ [name$2]: arg });
3692
3692
  };
@@ -3698,26 +3698,26 @@ var require_extend$1 = __commonJSMin((exports) => {
3698
3698
  prototype._super = base$3;
3699
3699
  schema$2.$_super = {};
3700
3700
  for (const override in def.overrides) {
3701
- assert$47(base$3[override], "Cannot override missing", override);
3702
- def.overrides[override][Common$20.symbols.parent] = base$3[override];
3701
+ assert$48(base$3[override], "Cannot override missing", override);
3702
+ def.overrides[override][Common$21.symbols.parent] = base$3[override];
3703
3703
  schema$2.$_super[override] = base$3[override].bind(schema$2);
3704
3704
  }
3705
3705
  Object.assign(prototype, def.overrides);
3706
3706
  }
3707
3707
  def.cast = Object.assign({}, parent.cast, def.cast);
3708
3708
  const manifest = Object.assign({}, parent.manifest, def.manifest);
3709
- manifest.build = internals$21.build(def.manifest && def.manifest.build, parent.manifest && parent.manifest.build);
3709
+ manifest.build = internals$22.build(def.manifest && def.manifest.build, parent.manifest && parent.manifest.build);
3710
3710
  def.manifest = manifest;
3711
- def.rebuild = internals$21.rebuild(def.rebuild, parent.rebuild);
3711
+ def.rebuild = internals$22.rebuild(def.rebuild, parent.rebuild);
3712
3712
  return schema$2;
3713
3713
  };
3714
- internals$21.build = function(child, parent) {
3714
+ internals$22.build = function(child, parent) {
3715
3715
  if (!child || !parent) return child || parent;
3716
3716
  return function(obj, desc$1) {
3717
3717
  return parent(child(obj, desc$1), desc$1);
3718
3718
  };
3719
3719
  };
3720
- internals$21.coerce = function(child, parent) {
3720
+ internals$22.coerce = function(child, parent) {
3721
3721
  if (!child || !parent) return child || parent;
3722
3722
  return {
3723
3723
  from: child.from && parent.from ? [...new Set([...child.from, ...parent.from])] : null,
@@ -3738,7 +3738,7 @@ var require_extend$1 = __commonJSMin((exports) => {
3738
3738
  }
3739
3739
  };
3740
3740
  };
3741
- internals$21.prepare = function(child, parent) {
3741
+ internals$22.prepare = function(child, parent) {
3742
3742
  if (!child || !parent) return child || parent;
3743
3743
  return function(value, helpers$8) {
3744
3744
  const prepared = child(value, helpers$8);
@@ -3749,14 +3749,14 @@ var require_extend$1 = __commonJSMin((exports) => {
3749
3749
  return parent(value, helpers$8) || prepared;
3750
3750
  };
3751
3751
  };
3752
- internals$21.rebuild = function(child, parent) {
3752
+ internals$22.rebuild = function(child, parent) {
3753
3753
  if (!child || !parent) return child || parent;
3754
3754
  return function(schema$2) {
3755
3755
  parent(schema$2);
3756
3756
  child(schema$2);
3757
3757
  };
3758
3758
  };
3759
- internals$21.validate = function(child, parent) {
3759
+ internals$22.validate = function(child, parent) {
3760
3760
  if (!child || !parent) return child || parent;
3761
3761
  return function(value, helpers$8) {
3762
3762
  const result = parent(value, helpers$8);
@@ -3768,13 +3768,268 @@ var require_extend$1 = __commonJSMin((exports) => {
3768
3768
  };
3769
3769
  };
3770
3770
  });
3771
+ var require_manifest$1 = __commonJSMin((exports) => {
3772
+ var import_manifest$2 = __toESM(require_manifest$1());
3773
+ var import_manifest$3 = __toESM(require_manifest$1());
3774
+ var import_manifest$4 = __toESM(require_manifest$1());
3775
+ var import_manifest$5 = __toESM(require_manifest$1());
3776
+ var import_manifest$6 = __toESM(require_manifest$1());
3777
+ var import_manifest$7 = __toESM(require_manifest$1());
3778
+ var import_manifest$8 = __toESM(require_manifest$1());
3779
+ const { assert: assert$47, clone: clone$15 } = import_manifest$8.default;
3780
+ const Common$20 = import_manifest$7.default;
3781
+ const Messages$6 = import_manifest$6.default;
3782
+ const Ref$10 = import_manifest$5.default;
3783
+ const Template$6 = import_manifest$4.default;
3784
+ const ManifestDescriptionCache = new WeakMap();
3785
+ var ManifestItemCacheClass = class {
3786
+ #items = new WeakMap();
3787
+ get(item, options = {}) {
3788
+ const cached = this.#items.get(item);
3789
+ if (cached) return cached.get(options);
3790
+ }
3791
+ set(item, options = {}, value) {
3792
+ if (!this.#items.has(item)) this.#items.set(item, new WeakMap());
3793
+ this.#items.get(item).set(options, value);
3794
+ }
3795
+ setAndReturn(item, options = {}, value) {
3796
+ this.set(item, options, value);
3797
+ return value;
3798
+ }
3799
+ };
3800
+ const ManifestItemCache = new ManifestItemCacheClass();
3801
+ let Schemas$4;
3802
+ const internals$21 = {};
3803
+ exports.describe = function(schema$2) {
3804
+ const cached = ManifestDescriptionCache.get(schema$2);
3805
+ if (cached) return cached;
3806
+ const def = schema$2._definition;
3807
+ const desc$1 = {
3808
+ type: schema$2.type,
3809
+ flags: {},
3810
+ rules: []
3811
+ };
3812
+ for (const flag in schema$2._flags) if (flag[0] !== "_") desc$1.flags[flag] = internals$21.describe(schema$2._flags[flag]);
3813
+ if (!Object.keys(desc$1.flags).length) delete desc$1.flags;
3814
+ if (schema$2._preferences) {
3815
+ desc$1.preferences = clone$15(schema$2._preferences, { shallow: ["messages"] });
3816
+ delete desc$1.preferences[Common$20.symbols.prefs];
3817
+ if (desc$1.preferences.messages) desc$1.preferences.messages = Messages$6.decompile(desc$1.preferences.messages);
3818
+ }
3819
+ if (schema$2._valids) desc$1.allow = schema$2._valids.describe();
3820
+ if (schema$2._invalids) desc$1.invalid = schema$2._invalids.describe();
3821
+ for (const rule of schema$2._rules) {
3822
+ const ruleDef = def.rules[rule.name];
3823
+ if (ruleDef.manifest === false) continue;
3824
+ const item = { name: rule.name };
3825
+ for (const custom$1 in def.modifiers) if (rule[custom$1] !== void 0) item[custom$1] = internals$21.describe(rule[custom$1]);
3826
+ if (rule.args) {
3827
+ item.args = {};
3828
+ for (const key in rule.args) {
3829
+ const arg = rule.args[key];
3830
+ if (key === "options" && !Object.keys(arg).length) continue;
3831
+ item.args[key] = internals$21.describe(arg, { assign: key });
3832
+ }
3833
+ if (!Object.keys(item.args).length) delete item.args;
3834
+ }
3835
+ desc$1.rules.push(item);
3836
+ }
3837
+ if (!desc$1.rules.length) delete desc$1.rules;
3838
+ for (const term in schema$2.$_terms) {
3839
+ if (term[0] === "_") continue;
3840
+ assert$47(!desc$1[term], "Cannot describe schema due to internal name conflict with", term);
3841
+ const items = schema$2.$_terms[term];
3842
+ if (!items) continue;
3843
+ if (items instanceof Map) {
3844
+ if (items.size) desc$1[term] = [...items.entries()];
3845
+ continue;
3846
+ }
3847
+ if (Common$20.isValues(items)) {
3848
+ desc$1[term] = items.describe();
3849
+ continue;
3850
+ }
3851
+ assert$47(def.terms[term], "Term", term, "missing configuration");
3852
+ const manifest = def.terms[term].manifest;
3853
+ const mapped = typeof manifest === "object";
3854
+ if (!items.length && !mapped) continue;
3855
+ const normalized = [];
3856
+ for (const item of items) normalized.push(internals$21.describe(item));
3857
+ if (mapped) {
3858
+ const { from: from$2, to } = manifest.mapped;
3859
+ desc$1[term] = {};
3860
+ for (const item of normalized) desc$1[term][item[to]] = item[from$2];
3861
+ continue;
3862
+ }
3863
+ if (manifest === "single") {
3864
+ assert$47(normalized.length === 1, "Term", term, "contains more than one item");
3865
+ desc$1[term] = normalized[0];
3866
+ continue;
3867
+ }
3868
+ desc$1[term] = normalized;
3869
+ }
3870
+ internals$21.validate(schema$2.$_root, desc$1);
3871
+ ManifestDescriptionCache.set(schema$2, desc$1);
3872
+ return desc$1;
3873
+ };
3874
+ internals$21.describe = function(item, options = {}) {
3875
+ const cached = ManifestItemCache.get(item, options);
3876
+ if (cached) return cached;
3877
+ if (Array.isArray(item)) return ManifestItemCache.setAndReturn(item, options, item.map(internals$21.describe));
3878
+ if (item === Common$20.symbols.deepDefault) return ManifestItemCache.setAndReturn(item, options, { special: "deep" });
3879
+ if (typeof item !== "object" || item === null) return ManifestItemCache.setAndReturn(item, options, item);
3880
+ if (options.assign === "options") return ManifestItemCache.setAndReturn(item, options, clone$15(item));
3881
+ if (import_manifest$2.default && import_manifest$2.default.isBuffer(item)) return ManifestItemCache.setAndReturn(item, options, { buffer: item.toString("binary") });
3882
+ if (item instanceof Date) return ManifestItemCache.setAndReturn(item, options, item.toISOString());
3883
+ if (item instanceof Error) return ManifestItemCache.setAndReturn(item, options, item);
3884
+ if (item instanceof RegExp) {
3885
+ if (options.assign === "regex") return ManifestItemCache.setAndReturn(item, options, item.toString());
3886
+ return ManifestItemCache.setAndReturn(item, options, { regex: item.toString() });
3887
+ }
3888
+ if (item[Common$20.symbols.literal]) return ManifestItemCache.setAndReturn(item, options, { function: item.literal });
3889
+ if (typeof item.describe === "function") {
3890
+ if (options.assign === "ref") return ManifestItemCache.setAndReturn(item, options, item.describe().ref);
3891
+ return ManifestItemCache.setAndReturn(item, options, item.describe());
3892
+ }
3893
+ const normalized = {};
3894
+ for (const key in item) {
3895
+ const value = item[key];
3896
+ if (value === void 0) continue;
3897
+ normalized[key] = internals$21.describe(value, { assign: key });
3898
+ }
3899
+ return ManifestItemCache.setAndReturn(item, options, normalized);
3900
+ };
3901
+ exports.build = function(joi, desc$1) {
3902
+ const builder = new internals$21.Builder(joi);
3903
+ return builder.parse(desc$1);
3904
+ };
3905
+ internals$21.Builder = class {
3906
+ constructor(joi) {
3907
+ this.joi = joi;
3908
+ }
3909
+ parse(desc$1) {
3910
+ internals$21.validate(this.joi, desc$1);
3911
+ let schema$2 = this.joi[desc$1.type]()._bare();
3912
+ const def = schema$2._definition;
3913
+ if (desc$1.flags) for (const flag in desc$1.flags) {
3914
+ const setter = def.flags[flag] && def.flags[flag].setter || flag;
3915
+ assert$47(typeof schema$2[setter] === "function", "Invalid flag", flag, "for type", desc$1.type);
3916
+ schema$2 = schema$2[setter](this.build(desc$1.flags[flag]));
3917
+ }
3918
+ if (desc$1.preferences) schema$2 = schema$2.preferences(this.build(desc$1.preferences));
3919
+ if (desc$1.allow) schema$2 = schema$2.allow(...this.build(desc$1.allow));
3920
+ if (desc$1.invalid) schema$2 = schema$2.invalid(...this.build(desc$1.invalid));
3921
+ if (desc$1.rules) for (const rule of desc$1.rules) {
3922
+ assert$47(typeof schema$2[rule.name] === "function", "Invalid rule", rule.name, "for type", desc$1.type);
3923
+ const args$1 = [];
3924
+ if (rule.args) {
3925
+ const built = {};
3926
+ for (const key in rule.args) built[key] = this.build(rule.args[key], { assign: key });
3927
+ const keys$10 = Object.keys(built);
3928
+ const definition = def.rules[rule.name].args;
3929
+ if (definition) {
3930
+ 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, ")");
3931
+ for (const { name: name$2 } of definition) args$1.push(built[name$2]);
3932
+ } else {
3933
+ assert$47(keys$10.length === 1, "Invalid number of arguments for", desc$1.type, rule.name, "(expected up to 1, found", keys$10.length, ")");
3934
+ args$1.push(built[keys$10[0]]);
3935
+ }
3936
+ }
3937
+ schema$2 = schema$2[rule.name](...args$1);
3938
+ const options = {};
3939
+ for (const custom$1 in def.modifiers) if (rule[custom$1] !== void 0) options[custom$1] = this.build(rule[custom$1]);
3940
+ if (Object.keys(options).length) schema$2 = schema$2.rule(options);
3941
+ }
3942
+ const terms = {};
3943
+ for (const key in desc$1) {
3944
+ if ([
3945
+ "allow",
3946
+ "flags",
3947
+ "invalid",
3948
+ "whens",
3949
+ "preferences",
3950
+ "rules",
3951
+ "type"
3952
+ ].includes(key)) continue;
3953
+ assert$47(def.terms[key], "Term", key, "missing configuration");
3954
+ const manifest = def.terms[key].manifest;
3955
+ if (manifest === "schema") {
3956
+ terms[key] = desc$1[key].map((item) => this.parse(item));
3957
+ continue;
3958
+ }
3959
+ if (manifest === "values") {
3960
+ terms[key] = desc$1[key].map((item) => this.build(item));
3961
+ continue;
3962
+ }
3963
+ if (manifest === "single") {
3964
+ terms[key] = this.build(desc$1[key]);
3965
+ continue;
3966
+ }
3967
+ if (typeof manifest === "object") {
3968
+ terms[key] = {};
3969
+ for (const name$2 in desc$1[key]) {
3970
+ const value = desc$1[key][name$2];
3971
+ terms[key][name$2] = this.parse(value);
3972
+ }
3973
+ continue;
3974
+ }
3975
+ terms[key] = this.build(desc$1[key]);
3976
+ }
3977
+ if (desc$1.whens) terms.whens = desc$1.whens.map((when) => this.build(when));
3978
+ schema$2 = def.manifest.build(schema$2, terms);
3979
+ schema$2.$_temp.ruleset = false;
3980
+ return schema$2;
3981
+ }
3982
+ build(desc$1, options = {}) {
3983
+ if (desc$1 === null) return null;
3984
+ if (Array.isArray(desc$1)) return desc$1.map((item) => this.build(item));
3985
+ if (desc$1 instanceof Error) return desc$1;
3986
+ if (options.assign === "options") return clone$15(desc$1);
3987
+ if (options.assign === "regex") return internals$21.regex(desc$1);
3988
+ if (options.assign === "ref") return Ref$10.build(desc$1);
3989
+ if (typeof desc$1 !== "object") return desc$1;
3990
+ if (Object.keys(desc$1).length === 1) {
3991
+ if (desc$1.buffer) {
3992
+ assert$47(import_manifest$2.default, "Buffers are not supported");
3993
+ return import_manifest$2.default && import_manifest$2.default.from(desc$1.buffer, "binary");
3994
+ }
3995
+ if (desc$1.function) return {
3996
+ [Common$20.symbols.literal]: true,
3997
+ literal: desc$1.function
3998
+ };
3999
+ if (desc$1.override) return Common$20.symbols.override;
4000
+ if (desc$1.ref) return Ref$10.build(desc$1.ref);
4001
+ if (desc$1.regex) return internals$21.regex(desc$1.regex);
4002
+ if (desc$1.special) {
4003
+ assert$47(["deep"].includes(desc$1.special), "Unknown special value", desc$1.special);
4004
+ return Common$20.symbols.deepDefault;
4005
+ }
4006
+ if (desc$1.value) return clone$15(desc$1.value);
4007
+ }
4008
+ if (desc$1.type) return this.parse(desc$1);
4009
+ if (desc$1.template) return Template$6.build(desc$1);
4010
+ const normalized = {};
4011
+ for (const key in desc$1) normalized[key] = this.build(desc$1[key], { assign: key });
4012
+ return normalized;
4013
+ }
4014
+ };
4015
+ internals$21.regex = function(string) {
4016
+ const end = string.lastIndexOf("/");
4017
+ const exp = string.slice(1, end);
4018
+ const flags = string.slice(end + 1);
4019
+ return new RegExp(exp, flags);
4020
+ };
4021
+ internals$21.validate = function(joi, desc$1) {
4022
+ Schemas$4 = Schemas$4 || import_manifest$3.default;
4023
+ joi.assert(desc$1, Schemas$4.description);
4024
+ };
4025
+ });
3771
4026
  var require_manifest = __commonJSMin((exports) => {
3772
- init_dist$1();
3773
- const { assert: assert$46, clone: clone$14 } = require_lib$4();
3774
- const Common$19 = require_common$3();
3775
- const Messages$5 = require_messages();
3776
- const Ref$9 = require_ref$2();
3777
- const Template$5 = require_template();
4027
+ var import_manifest$1 = __toESM(require_manifest$1());
4028
+ const { assert: assert$46, clone: clone$14 } = require_manifest$1();
4029
+ const Common$19 = require_manifest$1();
4030
+ const Messages$5 = require_manifest$1();
4031
+ const Ref$9 = require_manifest$1();
4032
+ const Template$5 = require_manifest$1();
3778
4033
  let Schemas$3;
3779
4034
  const internals$20 = {};
3780
4035
  exports.describe = function(schema$2) {
@@ -3850,7 +4105,7 @@ var require_manifest = __commonJSMin((exports) => {
3850
4105
  if (item === Common$19.symbols.deepDefault) return { special: "deep" };
3851
4106
  if (typeof item !== "object" || item === null) return item;
3852
4107
  if (options.assign === "options") return clone$14(item);
3853
- if (Buffer$1 && Buffer$1.isBuffer(item)) return { buffer: item.toString("binary") };
4108
+ if (import_manifest$1.default && import_manifest$1.default.isBuffer(item)) return { buffer: item.toString("binary") };
3854
4109
  if (item instanceof Date) return item.toISOString();
3855
4110
  if (item instanceof Error) return item;
3856
4111
  if (item instanceof RegExp) {
@@ -3961,8 +4216,8 @@ var require_manifest = __commonJSMin((exports) => {
3961
4216
  if (typeof desc$1 !== "object") return desc$1;
3962
4217
  if (Object.keys(desc$1).length === 1) {
3963
4218
  if (desc$1.buffer) {
3964
- assert$46(Buffer$1, "Buffers are not supported");
3965
- return Buffer$1 && Buffer$1.from(desc$1.buffer, "binary");
4219
+ assert$46(import_manifest$1.default, "Buffers are not supported");
4220
+ return import_manifest$1.default && import_manifest$1.default.from(desc$1.buffer, "binary");
3966
4221
  }
3967
4222
  if (desc$1.function) return {
3968
4223
  [Common$19.symbols.literal]: true,
@@ -3991,7 +4246,7 @@ var require_manifest = __commonJSMin((exports) => {
3991
4246
  return new RegExp(exp, flags);
3992
4247
  };
3993
4248
  internals$20.validate = function(joi, desc$1) {
3994
- Schemas$3 = Schemas$3 || require_schemas();
4249
+ Schemas$3 = Schemas$3 || require_manifest$1();
3995
4250
  joi.assert(desc$1, Schemas$3.description);
3996
4251
  };
3997
4252
  });
@@ -4247,11 +4502,11 @@ var require_modify = __commonJSMin((exports) => {
4247
4502
  this._schemaChain = false;
4248
4503
  }
4249
4504
  clone() {
4250
- const clone$20 = new internals$18.Ids();
4251
- clone$20._byId = new Map(this._byId);
4252
- clone$20._byKey = new Map(this._byKey);
4253
- clone$20._schemaChain = this._schemaChain;
4254
- return clone$20;
4505
+ const clone$21 = new internals$18.Ids();
4506
+ clone$21._byId = new Map(this._byId);
4507
+ clone$21._byKey = new Map(this._byKey);
4508
+ clone$21._schemaChain = this._schemaChain;
4509
+ return clone$21;
4255
4510
  }
4256
4511
  concat(source) {
4257
4512
  if (source._schemaChain) this._schemaChain = true;
@@ -4367,11 +4622,11 @@ var require_modify = __commonJSMin((exports) => {
4367
4622
  }, options);
4368
4623
  if (result !== void 0) {
4369
4624
  obj = obj || schema$2.clone();
4370
- const clone$20 = Object.assign({}, rule);
4371
- clone$20.args = result;
4372
- obj._rules[i$4] = clone$20;
4625
+ const clone$21 = Object.assign({}, rule);
4626
+ clone$21.args = result;
4627
+ obj._rules[i$4] = clone$21;
4373
4628
  const existingUnique = obj._singleRules.get(rule.name);
4374
- if (existingUnique === rule) obj._singleRules.set(rule.name, clone$20);
4629
+ if (existingUnique === rule) obj._singleRules.set(rule.name, clone$21);
4375
4630
  }
4376
4631
  }
4377
4632
  for (const name$2 in schema$2.$_terms) {
@@ -4390,17 +4645,17 @@ var require_modify = __commonJSMin((exports) => {
4390
4645
  internals$18.scan = function(item, source, options, _path, _key) {
4391
4646
  const path = _path || [];
4392
4647
  if (item === null || typeof item !== "object") return;
4393
- let clone$20;
4648
+ let clone$21;
4394
4649
  if (Array.isArray(item)) {
4395
4650
  for (let i$4 = 0; i$4 < item.length; ++i$4) {
4396
4651
  const key = source.source === "terms" && source.name === "keys" && item[i$4].key;
4397
4652
  const result = internals$18.scan(item[i$4], source, options, [i$4, ...path], key);
4398
4653
  if (result !== void 0) {
4399
- clone$20 = clone$20 || item.slice();
4400
- clone$20[i$4] = result;
4654
+ clone$21 = clone$21 || item.slice();
4655
+ clone$21[i$4] = result;
4401
4656
  }
4402
4657
  }
4403
- return clone$20;
4658
+ return clone$21;
4404
4659
  }
4405
4660
  if (options.schema !== false && Common$18.isSchema(item) || options.ref !== false && Ref$8.isRef(item)) {
4406
4661
  const result = options.each(item, {
@@ -4415,11 +4670,11 @@ var require_modify = __commonJSMin((exports) => {
4415
4670
  if (key[0] === "_") continue;
4416
4671
  const result = internals$18.scan(item[key], source, options, [key, ...path], _key);
4417
4672
  if (result !== void 0) {
4418
- clone$20 = clone$20 || Object.assign({}, item);
4419
- clone$20[key] = result;
4673
+ clone$21 = clone$21 || Object.assign({}, item);
4674
+ clone$21[key] = result;
4420
4675
  }
4421
4676
  }
4422
- return clone$20;
4677
+ return clone$21;
4423
4678
  };
4424
4679
  });
4425
4680
  var require_state$1 = __commonJSMin((exports, module) => {
@@ -7340,24 +7595,24 @@ var require_keys$1 = __commonJSMin((exports, module) => {
7340
7595
  internals$8.clone = function(value, prefs) {
7341
7596
  if (typeof value === "object") {
7342
7597
  if (prefs.nonEnumerables) return Clone(value, { shallow: true });
7343
- const clone$21 = Object.create(Object.getPrototypeOf(value));
7344
- Object.assign(clone$21, value);
7345
- return clone$21;
7598
+ const clone$22 = Object.create(Object.getPrototypeOf(value));
7599
+ Object.assign(clone$22, value);
7600
+ return clone$22;
7346
7601
  }
7347
- const clone$20 = function(...args$1) {
7602
+ const clone$21 = function(...args$1) {
7348
7603
  return value.apply(this, args$1);
7349
7604
  };
7350
- clone$20.prototype = Clone(value.prototype);
7351
- Object.defineProperty(clone$20, "name", {
7605
+ clone$21.prototype = Clone(value.prototype);
7606
+ Object.defineProperty(clone$21, "name", {
7352
7607
  value: value.name,
7353
7608
  writable: false
7354
7609
  });
7355
- Object.defineProperty(clone$20, "length", {
7610
+ Object.defineProperty(clone$21, "length", {
7356
7611
  value: value.length,
7357
7612
  writable: false
7358
7613
  });
7359
- Object.assign(clone$20, value);
7360
- return clone$20;
7614
+ Object.assign(clone$21, value);
7615
+ return clone$21;
7361
7616
  };
7362
7617
  internals$8.dependency = function(schema$2, rel, key, peers, options) {
7363
7618
  assert$35(key === null || typeof key === "string", rel, "key must be a strings");
@@ -13448,12 +13703,12 @@ var require_common$3 = __commonJSMin((exports) => {
13448
13703
  throw err$1;
13449
13704
  }
13450
13705
  };
13451
- exports.validateArg = function(value, label, { assert: assert$54, message }) {
13452
- if (exports.isSchema(assert$54)) {
13453
- const result = assert$54.validate(value);
13706
+ exports.validateArg = function(value, label, { assert: assert$55, message }) {
13707
+ if (exports.isSchema(assert$55)) {
13708
+ const result = assert$55.validate(value);
13454
13709
  if (!result.error) return;
13455
13710
  return result.error.message;
13456
- } else if (!assert$54(value)) return label ? `${label} ${message}` : message;
13711
+ } else if (!assert$55(value)) return label ? `${label} ${message}` : message;
13457
13712
  };
13458
13713
  exports.verifyFlat = function(args$1, method$1) {
13459
13714
  for (const arg of args$1) Assert(!Array.isArray(arg), "Method no longer accepts array arguments:", method$1);
@@ -13707,20 +13962,6 @@ Object.defineProperty(import_errors$1.default, "template", { value: function(val
13707
13962
  if (!messages$3[code$2]) return messages$3["*"];
13708
13963
  return messages$3[code$2];
13709
13964
  } });
13710
- var import_manifest$1 = __toESM(require_manifest());
13711
- const ManifestDescriptionCache = new WeakMap();
13712
- const originalDescribe = import_manifest$1.default.describe;
13713
- Object.defineProperty(import_manifest$1.default, "describe", {
13714
- value: function(schema$2) {
13715
- const cached = ManifestDescriptionCache.get(schema$2);
13716
- if (cached) return cached;
13717
- const result = originalDescribe.call(this, schema$2);
13718
- ManifestDescriptionCache.set(schema$2, result);
13719
- return result;
13720
- },
13721
- writable: true,
13722
- configurable: true
13723
- });
13724
13965
  const json = (root$11) => {
13725
13966
  return root$11;
13726
13967
  };
@@ -32770,7 +33011,7 @@ var init_package = __esmMin(() => {
32770
33011
  var require_bn$1 = __commonJSMin((exports, module) => {
32771
33012
  (function(module$1, exports$1) {
32772
33013
  "use strict";
32773
- function assert$54(val, msg) {
33014
+ function assert$55(val, msg) {
32774
33015
  if (!val) throw new Error(msg || "Assertion failed");
32775
33016
  }
32776
33017
  function inherits$14(ctor, superCtor) {
@@ -32798,10 +33039,10 @@ var require_bn$1 = __commonJSMin((exports, module) => {
32798
33039
  else exports$1.BN = BN$14;
32799
33040
  BN$14.BN = BN$14;
32800
33041
  BN$14.wordSize = 26;
32801
- var Buffer$27;
33042
+ var Buffer$29;
32802
33043
  try {
32803
- if (typeof window !== "undefined" && typeof window.Buffer !== "undefined") Buffer$27 = window.Buffer;
32804
- else Buffer$27 = (init_dist$1(), __toCommonJS(dist_exports)).Buffer;
33044
+ if (typeof window !== "undefined" && typeof window.Buffer !== "undefined") Buffer$29 = window.Buffer;
33045
+ else Buffer$29 = (init_dist$1(), __toCommonJS(dist_exports)).Buffer;
32805
33046
  } catch (e$2) {}
32806
33047
  BN$14.isBN = function isBN(num) {
32807
33048
  if (num instanceof BN$14) return true;
@@ -32819,7 +33060,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
32819
33060
  if (typeof number === "number") return this._initNumber(number, base$3, endian);
32820
33061
  if (typeof number === "object") return this._initArray(number, base$3, endian);
32821
33062
  if (base$3 === "hex") base$3 = 16;
32822
- assert$54(base$3 === (base$3 | 0) && base$3 >= 2 && base$3 <= 36);
33063
+ assert$55(base$3 === (base$3 | 0) && base$3 >= 2 && base$3 <= 36);
32823
33064
  number = number.toString().replace(/\s+/g, "");
32824
33065
  var start = 0;
32825
33066
  if (number[0] === "-") {
@@ -32844,7 +33085,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
32844
33085
  this.words = [number & 67108863, number / 67108864 & 67108863];
32845
33086
  this.length = 2;
32846
33087
  } else {
32847
- assert$54(number < 9007199254740992);
33088
+ assert$55(number < 9007199254740992);
32848
33089
  this.words = [
32849
33090
  number & 67108863,
32850
33091
  number / 67108864 & 67108863,
@@ -32856,7 +33097,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
32856
33097
  this._initArray(this.toArray(), base$3, endian);
32857
33098
  };
32858
33099
  BN$14.prototype._initArray = function _initArray(number, base$3, endian) {
32859
- assert$54(typeof number.length === "number");
33100
+ assert$55(typeof number.length === "number");
32860
33101
  if (number.length <= 0) {
32861
33102
  this.words = [0];
32862
33103
  this.length = 1;
@@ -32975,7 +33216,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
32975
33216
  dest.negative = this.negative;
32976
33217
  dest.red = this.red;
32977
33218
  };
32978
- BN$14.prototype.clone = function clone$20() {
33219
+ BN$14.prototype.clone = function clone$21() {
32979
33220
  var r$2 = new BN$14(null);
32980
33221
  this.copy(r$2);
32981
33222
  return r$2;
@@ -33143,21 +33384,21 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33143
33384
  if (this.negative !== 0) out = "-" + out;
33144
33385
  return out;
33145
33386
  }
33146
- assert$54(false, "Base should be between 2 and 36");
33387
+ assert$55(false, "Base should be between 2 and 36");
33147
33388
  };
33148
33389
  BN$14.prototype.toNumber = function toNumber$8() {
33149
33390
  var ret = this.words[0];
33150
33391
  if (this.length === 2) ret += this.words[1] * 67108864;
33151
33392
  else if (this.length === 3 && this.words[2] === 1) ret += 4503599627370496 + this.words[1] * 67108864;
33152
- else if (this.length > 2) assert$54(false, "Number can only safely store up to 53 bits");
33393
+ else if (this.length > 2) assert$55(false, "Number can only safely store up to 53 bits");
33153
33394
  return this.negative !== 0 ? -ret : ret;
33154
33395
  };
33155
33396
  BN$14.prototype.toJSON = function toJSON() {
33156
33397
  return this.toString(16);
33157
33398
  };
33158
33399
  BN$14.prototype.toBuffer = function toBuffer$5(endian, length) {
33159
- assert$54(typeof Buffer$27 !== "undefined");
33160
- return this.toArrayLike(Buffer$27, endian, length);
33400
+ assert$55(typeof Buffer$29 !== "undefined");
33401
+ return this.toArrayLike(Buffer$29, endian, length);
33161
33402
  };
33162
33403
  BN$14.prototype.toArray = function toArray$8(endian, length) {
33163
33404
  return this.toArrayLike(Array, endian, length);
@@ -33165,8 +33406,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33165
33406
  BN$14.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {
33166
33407
  var byteLength$2 = this.byteLength();
33167
33408
  var reqLength = length || Math.max(1, byteLength$2);
33168
- assert$54(byteLength$2 <= reqLength, "byte array longer than desired length");
33169
- assert$54(reqLength > 0, "Requested array length <= 0");
33409
+ assert$55(byteLength$2 <= reqLength, "byte array longer than desired length");
33410
+ assert$55(reqLength > 0, "Requested array length <= 0");
33170
33411
  this.strip();
33171
33412
  var littleEndian = endian === "le";
33172
33413
  var res = new ArrayType(reqLength);
@@ -33287,7 +33528,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33287
33528
  return this.strip();
33288
33529
  };
33289
33530
  BN$14.prototype.ior = function ior(num) {
33290
- assert$54((this.negative | num.negative) === 0);
33531
+ assert$55((this.negative | num.negative) === 0);
33291
33532
  return this.iuor(num);
33292
33533
  };
33293
33534
  BN$14.prototype.or = function or(num) {
@@ -33307,7 +33548,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33307
33548
  return this.strip();
33308
33549
  };
33309
33550
  BN$14.prototype.iand = function iand(num) {
33310
- assert$54((this.negative | num.negative) === 0);
33551
+ assert$55((this.negative | num.negative) === 0);
33311
33552
  return this.iuand(num);
33312
33553
  };
33313
33554
  BN$14.prototype.and = function and(num) {
@@ -33334,7 +33575,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33334
33575
  return this.strip();
33335
33576
  };
33336
33577
  BN$14.prototype.ixor = function ixor(num) {
33337
- assert$54((this.negative | num.negative) === 0);
33578
+ assert$55((this.negative | num.negative) === 0);
33338
33579
  return this.iuxor(num);
33339
33580
  };
33340
33581
  BN$14.prototype.xor = function xor$2(num) {
@@ -33346,7 +33587,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33346
33587
  return num.clone().iuxor(this);
33347
33588
  };
33348
33589
  BN$14.prototype.inotn = function inotn(width) {
33349
- assert$54(typeof width === "number" && width >= 0);
33590
+ assert$55(typeof width === "number" && width >= 0);
33350
33591
  var bytesNeeded = Math.ceil(width / 26) | 0;
33351
33592
  var bitsLeft = width % 26;
33352
33593
  this._expand(bytesNeeded);
@@ -33359,7 +33600,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
33359
33600
  return this.clone().inotn(width);
33360
33601
  };
33361
33602
  BN$14.prototype.setn = function setn(bit, val) {
33362
- assert$54(typeof bit === "number" && bit >= 0);
33603
+ assert$55(typeof bit === "number" && bit >= 0);
33363
33604
  var off = bit / 26 | 0;
33364
33605
  var wbit = bit % 26;
33365
33606
  this._expand(off + 1);
@@ -34188,8 +34429,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34188
34429
  carry = carry >>> 13;
34189
34430
  }
34190
34431
  for (i$4 = 2 * len$2; i$4 < N; ++i$4) rws[i$4] = 0;
34191
- assert$54(carry === 0);
34192
- assert$54((carry & -8192) === 0);
34432
+ assert$55(carry === 0);
34433
+ assert$55((carry & -8192) === 0);
34193
34434
  };
34194
34435
  FFTM.prototype.stub = function stub(N) {
34195
34436
  var ph = new Array(N);
@@ -34239,8 +34480,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34239
34480
  return this.clone().mulTo(num, this);
34240
34481
  };
34241
34482
  BN$14.prototype.imuln = function imuln(num) {
34242
- assert$54(typeof num === "number");
34243
- assert$54(num < 67108864);
34483
+ assert$55(typeof num === "number");
34484
+ assert$55(num < 67108864);
34244
34485
  var carry = 0;
34245
34486
  for (var i$4 = 0; i$4 < this.length; i$4++) {
34246
34487
  var w$1 = (this.words[i$4] | 0) * num;
@@ -34278,7 +34519,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34278
34519
  return res;
34279
34520
  };
34280
34521
  BN$14.prototype.iushln = function iushln(bits$1) {
34281
- assert$54(typeof bits$1 === "number" && bits$1 >= 0);
34522
+ assert$55(typeof bits$1 === "number" && bits$1 >= 0);
34282
34523
  var r$2 = bits$1 % 26;
34283
34524
  var s$6 = (bits$1 - r$2) / 26;
34284
34525
  var carryMask = 67108863 >>> 26 - r$2 << 26 - r$2;
@@ -34304,11 +34545,11 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34304
34545
  return this.strip();
34305
34546
  };
34306
34547
  BN$14.prototype.ishln = function ishln(bits$1) {
34307
- assert$54(this.negative === 0);
34548
+ assert$55(this.negative === 0);
34308
34549
  return this.iushln(bits$1);
34309
34550
  };
34310
34551
  BN$14.prototype.iushrn = function iushrn(bits$1, hint, extended) {
34311
- assert$54(typeof bits$1 === "number" && bits$1 >= 0);
34552
+ assert$55(typeof bits$1 === "number" && bits$1 >= 0);
34312
34553
  var h$1;
34313
34554
  if (hint) h$1 = (hint - hint % 26) / 26;
34314
34555
  else h$1 = 0;
@@ -34343,7 +34584,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34343
34584
  return this.strip();
34344
34585
  };
34345
34586
  BN$14.prototype.ishrn = function ishrn(bits$1, hint, extended) {
34346
- assert$54(this.negative === 0);
34587
+ assert$55(this.negative === 0);
34347
34588
  return this.iushrn(bits$1, hint, extended);
34348
34589
  };
34349
34590
  BN$14.prototype.shln = function shln(bits$1) {
@@ -34359,7 +34600,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34359
34600
  return this.clone().iushrn(bits$1);
34360
34601
  };
34361
34602
  BN$14.prototype.testn = function testn(bit) {
34362
- assert$54(typeof bit === "number" && bit >= 0);
34603
+ assert$55(typeof bit === "number" && bit >= 0);
34363
34604
  var r$2 = bit % 26;
34364
34605
  var s$6 = (bit - r$2) / 26;
34365
34606
  var q = 1 << r$2;
@@ -34368,10 +34609,10 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34368
34609
  return !!(w$1 & q);
34369
34610
  };
34370
34611
  BN$14.prototype.imaskn = function imaskn(bits$1) {
34371
- assert$54(typeof bits$1 === "number" && bits$1 >= 0);
34612
+ assert$55(typeof bits$1 === "number" && bits$1 >= 0);
34372
34613
  var r$2 = bits$1 % 26;
34373
34614
  var s$6 = (bits$1 - r$2) / 26;
34374
- assert$54(this.negative === 0, "imaskn works only with positive numbers");
34615
+ assert$55(this.negative === 0, "imaskn works only with positive numbers");
34375
34616
  if (this.length <= s$6) return this;
34376
34617
  if (r$2 !== 0) s$6++;
34377
34618
  this.length = Math.min(s$6, this.length);
@@ -34385,8 +34626,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34385
34626
  return this.clone().imaskn(bits$1);
34386
34627
  };
34387
34628
  BN$14.prototype.iaddn = function iaddn(num) {
34388
- assert$54(typeof num === "number");
34389
- assert$54(num < 67108864);
34629
+ assert$55(typeof num === "number");
34630
+ assert$55(num < 67108864);
34390
34631
  if (num < 0) return this.isubn(-num);
34391
34632
  if (this.negative !== 0) {
34392
34633
  if (this.length === 1 && (this.words[0] | 0) < num) {
@@ -34412,8 +34653,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34412
34653
  return this;
34413
34654
  };
34414
34655
  BN$14.prototype.isubn = function isubn(num) {
34415
- assert$54(typeof num === "number");
34416
- assert$54(num < 67108864);
34656
+ assert$55(typeof num === "number");
34657
+ assert$55(num < 67108864);
34417
34658
  if (num < 0) return this.iaddn(-num);
34418
34659
  if (this.negative !== 0) {
34419
34660
  this.negative = 0;
@@ -34463,7 +34704,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34463
34704
  this.words[i$4 + shift] = w$1 & 67108863;
34464
34705
  }
34465
34706
  if (carry === 0) return this.strip();
34466
- assert$54(carry === -1);
34707
+ assert$55(carry === -1);
34467
34708
  carry = 0;
34468
34709
  for (i$4 = 0; i$4 < this.length; i$4++) {
34469
34710
  w$1 = -(this.words[i$4] | 0) + carry;
@@ -34519,7 +34760,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34519
34760
  };
34520
34761
  };
34521
34762
  BN$14.prototype.divmod = function divmod(num, mode, positive) {
34522
- assert$54(!num.isZero());
34763
+ assert$55(!num.isZero());
34523
34764
  if (this.isZero()) return {
34524
34765
  div: new BN$14(0),
34525
34766
  mod: new BN$14(0)
@@ -34596,14 +34837,14 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34596
34837
  return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
34597
34838
  };
34598
34839
  BN$14.prototype.modn = function modn(num) {
34599
- assert$54(num <= 67108863);
34840
+ assert$55(num <= 67108863);
34600
34841
  var p$1 = (1 << 26) % num;
34601
34842
  var acc = 0;
34602
34843
  for (var i$4 = this.length - 1; i$4 >= 0; i$4--) acc = (p$1 * acc + (this.words[i$4] | 0)) % num;
34603
34844
  return acc;
34604
34845
  };
34605
34846
  BN$14.prototype.idivn = function idivn(num) {
34606
- assert$54(num <= 67108863);
34847
+ assert$55(num <= 67108863);
34607
34848
  var carry = 0;
34608
34849
  for (var i$4 = this.length - 1; i$4 >= 0; i$4--) {
34609
34850
  var w$1 = (this.words[i$4] | 0) + carry * 67108864;
@@ -34616,8 +34857,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34616
34857
  return this.clone().idivn(num);
34617
34858
  };
34618
34859
  BN$14.prototype.egcd = function egcd(p$1) {
34619
- assert$54(p$1.negative === 0);
34620
- assert$54(!p$1.isZero());
34860
+ assert$55(p$1.negative === 0);
34861
+ assert$55(!p$1.isZero());
34621
34862
  var x$1 = this;
34622
34863
  var y$1 = p$1.clone();
34623
34864
  if (x$1.negative !== 0) x$1 = x$1.umod(p$1);
@@ -34676,8 +34917,8 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34676
34917
  };
34677
34918
  };
34678
34919
  BN$14.prototype._invmp = function _invmp(p$1) {
34679
- assert$54(p$1.negative === 0);
34680
- assert$54(!p$1.isZero());
34920
+ assert$55(p$1.negative === 0);
34921
+ assert$55(!p$1.isZero());
34681
34922
  var a$2 = this;
34682
34923
  var b = p$1.clone();
34683
34924
  if (a$2.negative !== 0) a$2 = a$2.umod(p$1);
@@ -34753,7 +34994,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34753
34994
  return this.words[0] & num;
34754
34995
  };
34755
34996
  BN$14.prototype.bincn = function bincn(bit) {
34756
- assert$54(typeof bit === "number");
34997
+ assert$55(typeof bit === "number");
34757
34998
  var r$2 = bit % 26;
34758
34999
  var s$6 = (bit - r$2) / 26;
34759
35000
  var q = 1 << r$2;
@@ -34788,7 +35029,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34788
35029
  if (this.length > 1) res = 1;
34789
35030
  else {
34790
35031
  if (negative) num = -num;
34791
- assert$54(num <= 67108863, "Number is too big");
35032
+ assert$55(num <= 67108863, "Number is too big");
34792
35033
  var w$1 = this.words[0] | 0;
34793
35034
  res = w$1 === num ? 0 : w$1 < num ? -1 : 1;
34794
35035
  }
@@ -34850,12 +35091,12 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34850
35091
  return new Red(num);
34851
35092
  };
34852
35093
  BN$14.prototype.toRed = function toRed(ctx) {
34853
- assert$54(!this.red, "Already a number in reduction context");
34854
- assert$54(this.negative === 0, "red works only with positives");
35094
+ assert$55(!this.red, "Already a number in reduction context");
35095
+ assert$55(this.negative === 0, "red works only with positives");
34855
35096
  return ctx.convertTo(this)._forceRed(ctx);
34856
35097
  };
34857
35098
  BN$14.prototype.fromRed = function fromRed() {
34858
- assert$54(this.red, "fromRed works only with numbers in reduction context");
35099
+ assert$55(this.red, "fromRed works only with numbers in reduction context");
34859
35100
  return this.red.convertFrom(this);
34860
35101
  };
34861
35102
  BN$14.prototype._forceRed = function _forceRed(ctx) {
@@ -34863,66 +35104,66 @@ var require_bn$1 = __commonJSMin((exports, module) => {
34863
35104
  return this;
34864
35105
  };
34865
35106
  BN$14.prototype.forceRed = function forceRed(ctx) {
34866
- assert$54(!this.red, "Already a number in reduction context");
35107
+ assert$55(!this.red, "Already a number in reduction context");
34867
35108
  return this._forceRed(ctx);
34868
35109
  };
34869
35110
  BN$14.prototype.redAdd = function redAdd(num) {
34870
- assert$54(this.red, "redAdd works only with red numbers");
35111
+ assert$55(this.red, "redAdd works only with red numbers");
34871
35112
  return this.red.add(this, num);
34872
35113
  };
34873
35114
  BN$14.prototype.redIAdd = function redIAdd(num) {
34874
- assert$54(this.red, "redIAdd works only with red numbers");
35115
+ assert$55(this.red, "redIAdd works only with red numbers");
34875
35116
  return this.red.iadd(this, num);
34876
35117
  };
34877
35118
  BN$14.prototype.redSub = function redSub(num) {
34878
- assert$54(this.red, "redSub works only with red numbers");
35119
+ assert$55(this.red, "redSub works only with red numbers");
34879
35120
  return this.red.sub(this, num);
34880
35121
  };
34881
35122
  BN$14.prototype.redISub = function redISub(num) {
34882
- assert$54(this.red, "redISub works only with red numbers");
35123
+ assert$55(this.red, "redISub works only with red numbers");
34883
35124
  return this.red.isub(this, num);
34884
35125
  };
34885
35126
  BN$14.prototype.redShl = function redShl(num) {
34886
- assert$54(this.red, "redShl works only with red numbers");
35127
+ assert$55(this.red, "redShl works only with red numbers");
34887
35128
  return this.red.shl(this, num);
34888
35129
  };
34889
35130
  BN$14.prototype.redMul = function redMul(num) {
34890
- assert$54(this.red, "redMul works only with red numbers");
35131
+ assert$55(this.red, "redMul works only with red numbers");
34891
35132
  this.red._verify2(this, num);
34892
35133
  return this.red.mul(this, num);
34893
35134
  };
34894
35135
  BN$14.prototype.redIMul = function redIMul(num) {
34895
- assert$54(this.red, "redMul works only with red numbers");
35136
+ assert$55(this.red, "redMul works only with red numbers");
34896
35137
  this.red._verify2(this, num);
34897
35138
  return this.red.imul(this, num);
34898
35139
  };
34899
35140
  BN$14.prototype.redSqr = function redSqr() {
34900
- assert$54(this.red, "redSqr works only with red numbers");
35141
+ assert$55(this.red, "redSqr works only with red numbers");
34901
35142
  this.red._verify1(this);
34902
35143
  return this.red.sqr(this);
34903
35144
  };
34904
35145
  BN$14.prototype.redISqr = function redISqr() {
34905
- assert$54(this.red, "redISqr works only with red numbers");
35146
+ assert$55(this.red, "redISqr works only with red numbers");
34906
35147
  this.red._verify1(this);
34907
35148
  return this.red.isqr(this);
34908
35149
  };
34909
35150
  BN$14.prototype.redSqrt = function redSqrt() {
34910
- assert$54(this.red, "redSqrt works only with red numbers");
35151
+ assert$55(this.red, "redSqrt works only with red numbers");
34911
35152
  this.red._verify1(this);
34912
35153
  return this.red.sqrt(this);
34913
35154
  };
34914
35155
  BN$14.prototype.redInvm = function redInvm() {
34915
- assert$54(this.red, "redInvm works only with red numbers");
35156
+ assert$55(this.red, "redInvm works only with red numbers");
34916
35157
  this.red._verify1(this);
34917
35158
  return this.red.invm(this);
34918
35159
  };
34919
35160
  BN$14.prototype.redNeg = function redNeg() {
34920
- assert$54(this.red, "redNeg works only with red numbers");
35161
+ assert$55(this.red, "redNeg works only with red numbers");
34921
35162
  this.red._verify1(this);
34922
35163
  return this.red.neg(this);
34923
35164
  };
34924
35165
  BN$14.prototype.redPow = function redPow(num) {
34925
- assert$54(this.red && !num.red, "redPow(normalNum)");
35166
+ assert$55(this.red && !num.red, "redPow(normalNum)");
34926
35167
  this.red._verify1(this);
34927
35168
  return this.red.pow(this, num);
34928
35169
  };
@@ -35052,18 +35293,18 @@ var require_bn$1 = __commonJSMin((exports, module) => {
35052
35293
  this.m = prime.p;
35053
35294
  this.prime = prime;
35054
35295
  } else {
35055
- assert$54(m$3.gtn(1), "modulus must be greater than 1");
35296
+ assert$55(m$3.gtn(1), "modulus must be greater than 1");
35056
35297
  this.m = m$3;
35057
35298
  this.prime = null;
35058
35299
  }
35059
35300
  }
35060
35301
  Red.prototype._verify1 = function _verify1(a$2) {
35061
- assert$54(a$2.negative === 0, "red works only with positives");
35062
- assert$54(a$2.red, "red works only with red numbers");
35302
+ assert$55(a$2.negative === 0, "red works only with positives");
35303
+ assert$55(a$2.red, "red works only with red numbers");
35063
35304
  };
35064
35305
  Red.prototype._verify2 = function _verify2(a$2, b) {
35065
- assert$54((a$2.negative | b.negative) === 0, "red works only with positives");
35066
- assert$54(a$2.red && a$2.red === b.red, "red works only with red numbers");
35306
+ assert$55((a$2.negative | b.negative) === 0, "red works only with positives");
35307
+ assert$55(a$2.red && a$2.red === b.red, "red works only with red numbers");
35067
35308
  };
35068
35309
  Red.prototype.imod = function imod(a$2) {
35069
35310
  if (this.prime) return this.prime.ireduce(a$2)._forceRed(this);
@@ -35118,7 +35359,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
35118
35359
  Red.prototype.sqrt = function sqrt(a$2) {
35119
35360
  if (a$2.isZero()) return a$2.clone();
35120
35361
  var mod3 = this.m.andln(3);
35121
- assert$54(mod3 % 2 === 1);
35362
+ assert$55(mod3 % 2 === 1);
35122
35363
  if (mod3 === 3) {
35123
35364
  var pow$1 = this.m.add(new BN$14(1)).iushrn(2);
35124
35365
  return this.pow(a$2, pow$1);
@@ -35129,7 +35370,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
35129
35370
  s$6++;
35130
35371
  q.iushrn(1);
35131
35372
  }
35132
- assert$54(!q.isZero());
35373
+ assert$55(!q.isZero());
35133
35374
  var one = new BN$14(1).toRed(this);
35134
35375
  var nOne = one.redNeg();
35135
35376
  var lpow = this.m.subn(1).iushrn(1);
@@ -35143,7 +35384,7 @@ var require_bn$1 = __commonJSMin((exports, module) => {
35143
35384
  while (t$7.cmp(one) !== 0) {
35144
35385
  var tmp = t$7;
35145
35386
  for (var i$4 = 0; tmp.cmp(one) !== 0; i$4++) tmp = tmp.redSqr();
35146
- assert$54(i$4 < m$3);
35387
+ assert$55(i$4 < m$3);
35147
35388
  var b = this.pow(c$1, new BN$14(1).iushln(m$3 - i$4 - 1));
35148
35389
  r$2 = r$2.redMul(b);
35149
35390
  c$1 = b.redSqr();
@@ -39540,7 +39781,7 @@ var require_node = __commonJSMin((exports, module) => {
39540
39781
  "implicit",
39541
39782
  "contains"
39542
39783
  ];
39543
- Node.prototype.clone = function clone$20() {
39784
+ Node.prototype.clone = function clone$21() {
39544
39785
  var state = this._baseState;
39545
39786
  var cstate = {};
39546
39787
  stateProps.forEach(function(prop) {
@@ -39554,9 +39795,9 @@ var require_node = __commonJSMin((exports, module) => {
39554
39795
  var state = this._baseState;
39555
39796
  methods.forEach(function(method$1) {
39556
39797
  this[method$1] = function _wrappedMethod() {
39557
- var clone$20 = new this.constructor(this);
39558
- state.children.push(clone$20);
39559
- return clone$20[method$1].apply(clone$20, arguments);
39798
+ var clone$21 = new this.constructor(this);
39799
+ state.children.push(clone$21);
39800
+ return clone$21[method$1].apply(clone$21, arguments);
39560
39801
  };
39561
39802
  }, this);
39562
39803
  };
@@ -40910,7 +41151,7 @@ var require_withPublic = __commonJSMin((exports, module) => {
40910
41151
  var require_bn = __commonJSMin((exports, module) => {
40911
41152
  (function(module$1, exports$1) {
40912
41153
  "use strict";
40913
- function assert$54(val, msg) {
41154
+ function assert$55(val, msg) {
40914
41155
  if (!val) throw new Error(msg || "Assertion failed");
40915
41156
  }
40916
41157
  function inherits$14(ctor, superCtor) {
@@ -40938,10 +41179,10 @@ var require_bn = __commonJSMin((exports, module) => {
40938
41179
  else exports$1.BN = BN$14;
40939
41180
  BN$14.BN = BN$14;
40940
41181
  BN$14.wordSize = 26;
40941
- var Buffer$27;
41182
+ var Buffer$29;
40942
41183
  try {
40943
- if (typeof window !== "undefined" && typeof window.Buffer !== "undefined") Buffer$27 = window.Buffer;
40944
- else Buffer$27 = (init_dist$1(), __toCommonJS(dist_exports)).Buffer;
41184
+ if (typeof window !== "undefined" && typeof window.Buffer !== "undefined") Buffer$29 = window.Buffer;
41185
+ else Buffer$29 = (init_dist$1(), __toCommonJS(dist_exports)).Buffer;
40945
41186
  } catch (e$2) {}
40946
41187
  BN$14.isBN = function isBN(num) {
40947
41188
  if (num instanceof BN$14) return true;
@@ -40959,7 +41200,7 @@ var require_bn = __commonJSMin((exports, module) => {
40959
41200
  if (typeof number === "number") return this._initNumber(number, base$3, endian);
40960
41201
  if (typeof number === "object") return this._initArray(number, base$3, endian);
40961
41202
  if (base$3 === "hex") base$3 = 16;
40962
- assert$54(base$3 === (base$3 | 0) && base$3 >= 2 && base$3 <= 36);
41203
+ assert$55(base$3 === (base$3 | 0) && base$3 >= 2 && base$3 <= 36);
40963
41204
  number = number.toString().replace(/\s+/g, "");
40964
41205
  var start = 0;
40965
41206
  if (number[0] === "-") {
@@ -40984,7 +41225,7 @@ var require_bn = __commonJSMin((exports, module) => {
40984
41225
  this.words = [number & 67108863, number / 67108864 & 67108863];
40985
41226
  this.length = 2;
40986
41227
  } else {
40987
- assert$54(number < 9007199254740992);
41228
+ assert$55(number < 9007199254740992);
40988
41229
  this.words = [
40989
41230
  number & 67108863,
40990
41231
  number / 67108864 & 67108863,
@@ -40996,7 +41237,7 @@ var require_bn = __commonJSMin((exports, module) => {
40996
41237
  this._initArray(this.toArray(), base$3, endian);
40997
41238
  };
40998
41239
  BN$14.prototype._initArray = function _initArray(number, base$3, endian) {
40999
- assert$54(typeof number.length === "number");
41240
+ assert$55(typeof number.length === "number");
41000
41241
  if (number.length <= 0) {
41001
41242
  this.words = [0];
41002
41243
  this.length = 1;
@@ -41034,7 +41275,7 @@ var require_bn = __commonJSMin((exports, module) => {
41034
41275
  if (c$1 >= 48 && c$1 <= 57) return c$1 - 48;
41035
41276
  else if (c$1 >= 65 && c$1 <= 70) return c$1 - 55;
41036
41277
  else if (c$1 >= 97 && c$1 <= 102) return c$1 - 87;
41037
- else assert$54(false, "Invalid character in " + string);
41278
+ else assert$55(false, "Invalid character in " + string);
41038
41279
  }
41039
41280
  function parseHexByte(string, lowerBound, index$2) {
41040
41281
  var r$2 = parseHex4Bits(string, index$2);
@@ -41081,7 +41322,7 @@ var require_bn = __commonJSMin((exports, module) => {
41081
41322
  if (c$1 >= 49) b = c$1 - 49 + 10;
41082
41323
  else if (c$1 >= 17) b = c$1 - 17 + 10;
41083
41324
  else b = c$1;
41084
- assert$54(c$1 >= 0 && b < mul, "Invalid character");
41325
+ assert$55(c$1 >= 0 && b < mul, "Invalid character");
41085
41326
  r$2 += b;
41086
41327
  }
41087
41328
  return r$2;
@@ -41128,7 +41369,7 @@ var require_bn = __commonJSMin((exports, module) => {
41128
41369
  BN$14.prototype._move = function _move(dest) {
41129
41370
  move(dest, this);
41130
41371
  };
41131
- BN$14.prototype.clone = function clone$20() {
41372
+ BN$14.prototype.clone = function clone$21() {
41132
41373
  var r$2 = new BN$14(null);
41133
41374
  this.copy(r$2);
41134
41375
  return r$2;
@@ -41302,20 +41543,20 @@ var require_bn = __commonJSMin((exports, module) => {
41302
41543
  if (this.negative !== 0) out = "-" + out;
41303
41544
  return out;
41304
41545
  }
41305
- assert$54(false, "Base should be between 2 and 36");
41546
+ assert$55(false, "Base should be between 2 and 36");
41306
41547
  };
41307
41548
  BN$14.prototype.toNumber = function toNumber$8() {
41308
41549
  var ret = this.words[0];
41309
41550
  if (this.length === 2) ret += this.words[1] * 67108864;
41310
41551
  else if (this.length === 3 && this.words[2] === 1) ret += 4503599627370496 + this.words[1] * 67108864;
41311
- else if (this.length > 2) assert$54(false, "Number can only safely store up to 53 bits");
41552
+ else if (this.length > 2) assert$55(false, "Number can only safely store up to 53 bits");
41312
41553
  return this.negative !== 0 ? -ret : ret;
41313
41554
  };
41314
41555
  BN$14.prototype.toJSON = function toJSON() {
41315
41556
  return this.toString(16, 2);
41316
41557
  };
41317
- if (Buffer$27) BN$14.prototype.toBuffer = function toBuffer$5(endian, length) {
41318
- return this.toArrayLike(Buffer$27, endian, length);
41558
+ if (Buffer$29) BN$14.prototype.toBuffer = function toBuffer$5(endian, length) {
41559
+ return this.toArrayLike(Buffer$29, endian, length);
41319
41560
  };
41320
41561
  BN$14.prototype.toArray = function toArray$8(endian, length) {
41321
41562
  return this.toArrayLike(Array, endian, length);
@@ -41328,8 +41569,8 @@ var require_bn = __commonJSMin((exports, module) => {
41328
41569
  this._strip();
41329
41570
  var byteLength$2 = this.byteLength();
41330
41571
  var reqLength = length || Math.max(1, byteLength$2);
41331
- assert$54(byteLength$2 <= reqLength, "byte array longer than desired length");
41332
- assert$54(reqLength > 0, "Requested array length <= 0");
41572
+ assert$55(byteLength$2 <= reqLength, "byte array longer than desired length");
41573
+ assert$55(reqLength > 0, "Requested array length <= 0");
41333
41574
  var res = allocate(ArrayType, reqLength);
41334
41575
  var postfix = endian === "le" ? "LE" : "BE";
41335
41576
  this["_toArrayLike" + postfix](res, byteLength$2);
@@ -41477,7 +41718,7 @@ var require_bn = __commonJSMin((exports, module) => {
41477
41718
  return this._strip();
41478
41719
  };
41479
41720
  BN$14.prototype.ior = function ior(num) {
41480
- assert$54((this.negative | num.negative) === 0);
41721
+ assert$55((this.negative | num.negative) === 0);
41481
41722
  return this.iuor(num);
41482
41723
  };
41483
41724
  BN$14.prototype.or = function or(num) {
@@ -41497,7 +41738,7 @@ var require_bn = __commonJSMin((exports, module) => {
41497
41738
  return this._strip();
41498
41739
  };
41499
41740
  BN$14.prototype.iand = function iand(num) {
41500
- assert$54((this.negative | num.negative) === 0);
41741
+ assert$55((this.negative | num.negative) === 0);
41501
41742
  return this.iuand(num);
41502
41743
  };
41503
41744
  BN$14.prototype.and = function and(num) {
@@ -41524,7 +41765,7 @@ var require_bn = __commonJSMin((exports, module) => {
41524
41765
  return this._strip();
41525
41766
  };
41526
41767
  BN$14.prototype.ixor = function ixor(num) {
41527
- assert$54((this.negative | num.negative) === 0);
41768
+ assert$55((this.negative | num.negative) === 0);
41528
41769
  return this.iuxor(num);
41529
41770
  };
41530
41771
  BN$14.prototype.xor = function xor$2(num) {
@@ -41536,7 +41777,7 @@ var require_bn = __commonJSMin((exports, module) => {
41536
41777
  return num.clone().iuxor(this);
41537
41778
  };
41538
41779
  BN$14.prototype.inotn = function inotn(width) {
41539
- assert$54(typeof width === "number" && width >= 0);
41780
+ assert$55(typeof width === "number" && width >= 0);
41540
41781
  var bytesNeeded = Math.ceil(width / 26) | 0;
41541
41782
  var bitsLeft = width % 26;
41542
41783
  this._expand(bytesNeeded);
@@ -41549,7 +41790,7 @@ var require_bn = __commonJSMin((exports, module) => {
41549
41790
  return this.clone().inotn(width);
41550
41791
  };
41551
41792
  BN$14.prototype.setn = function setn(bit, val) {
41552
- assert$54(typeof bit === "number" && bit >= 0);
41793
+ assert$55(typeof bit === "number" && bit >= 0);
41553
41794
  var off = bit / 26 | 0;
41554
41795
  var wbit = bit % 26;
41555
41796
  this._expand(off + 1);
@@ -42377,8 +42618,8 @@ var require_bn = __commonJSMin((exports, module) => {
42377
42618
  carry = carry >>> 13;
42378
42619
  }
42379
42620
  for (i$4 = 2 * len$2; i$4 < N; ++i$4) rws[i$4] = 0;
42380
- assert$54(carry === 0);
42381
- assert$54((carry & -8192) === 0);
42621
+ assert$55(carry === 0);
42622
+ assert$55((carry & -8192) === 0);
42382
42623
  };
42383
42624
  FFTM.prototype.stub = function stub(N) {
42384
42625
  var ph = new Array(N);
@@ -42430,8 +42671,8 @@ var require_bn = __commonJSMin((exports, module) => {
42430
42671
  BN$14.prototype.imuln = function imuln(num) {
42431
42672
  var isNegNum = num < 0;
42432
42673
  if (isNegNum) num = -num;
42433
- assert$54(typeof num === "number");
42434
- assert$54(num < 67108864);
42674
+ assert$55(typeof num === "number");
42675
+ assert$55(num < 67108864);
42435
42676
  var carry = 0;
42436
42677
  for (var i$4 = 0; i$4 < this.length; i$4++) {
42437
42678
  var w$1 = (this.words[i$4] | 0) * num;
@@ -42469,7 +42710,7 @@ var require_bn = __commonJSMin((exports, module) => {
42469
42710
  return res;
42470
42711
  };
42471
42712
  BN$14.prototype.iushln = function iushln(bits$1) {
42472
- assert$54(typeof bits$1 === "number" && bits$1 >= 0);
42713
+ assert$55(typeof bits$1 === "number" && bits$1 >= 0);
42473
42714
  var r$2 = bits$1 % 26;
42474
42715
  var s$6 = (bits$1 - r$2) / 26;
42475
42716
  var carryMask = 67108863 >>> 26 - r$2 << 26 - r$2;
@@ -42495,11 +42736,11 @@ var require_bn = __commonJSMin((exports, module) => {
42495
42736
  return this._strip();
42496
42737
  };
42497
42738
  BN$14.prototype.ishln = function ishln(bits$1) {
42498
- assert$54(this.negative === 0);
42739
+ assert$55(this.negative === 0);
42499
42740
  return this.iushln(bits$1);
42500
42741
  };
42501
42742
  BN$14.prototype.iushrn = function iushrn(bits$1, hint, extended) {
42502
- assert$54(typeof bits$1 === "number" && bits$1 >= 0);
42743
+ assert$55(typeof bits$1 === "number" && bits$1 >= 0);
42503
42744
  var h$1;
42504
42745
  if (hint) h$1 = (hint - hint % 26) / 26;
42505
42746
  else h$1 = 0;
@@ -42534,7 +42775,7 @@ var require_bn = __commonJSMin((exports, module) => {
42534
42775
  return this._strip();
42535
42776
  };
42536
42777
  BN$14.prototype.ishrn = function ishrn(bits$1, hint, extended) {
42537
- assert$54(this.negative === 0);
42778
+ assert$55(this.negative === 0);
42538
42779
  return this.iushrn(bits$1, hint, extended);
42539
42780
  };
42540
42781
  BN$14.prototype.shln = function shln(bits$1) {
@@ -42550,7 +42791,7 @@ var require_bn = __commonJSMin((exports, module) => {
42550
42791
  return this.clone().iushrn(bits$1);
42551
42792
  };
42552
42793
  BN$14.prototype.testn = function testn(bit) {
42553
- assert$54(typeof bit === "number" && bit >= 0);
42794
+ assert$55(typeof bit === "number" && bit >= 0);
42554
42795
  var r$2 = bit % 26;
42555
42796
  var s$6 = (bit - r$2) / 26;
42556
42797
  var q = 1 << r$2;
@@ -42559,10 +42800,10 @@ var require_bn = __commonJSMin((exports, module) => {
42559
42800
  return !!(w$1 & q);
42560
42801
  };
42561
42802
  BN$14.prototype.imaskn = function imaskn(bits$1) {
42562
- assert$54(typeof bits$1 === "number" && bits$1 >= 0);
42803
+ assert$55(typeof bits$1 === "number" && bits$1 >= 0);
42563
42804
  var r$2 = bits$1 % 26;
42564
42805
  var s$6 = (bits$1 - r$2) / 26;
42565
- assert$54(this.negative === 0, "imaskn works only with positive numbers");
42806
+ assert$55(this.negative === 0, "imaskn works only with positive numbers");
42566
42807
  if (this.length <= s$6) return this;
42567
42808
  if (r$2 !== 0) s$6++;
42568
42809
  this.length = Math.min(s$6, this.length);
@@ -42576,8 +42817,8 @@ var require_bn = __commonJSMin((exports, module) => {
42576
42817
  return this.clone().imaskn(bits$1);
42577
42818
  };
42578
42819
  BN$14.prototype.iaddn = function iaddn(num) {
42579
- assert$54(typeof num === "number");
42580
- assert$54(num < 67108864);
42820
+ assert$55(typeof num === "number");
42821
+ assert$55(num < 67108864);
42581
42822
  if (num < 0) return this.isubn(-num);
42582
42823
  if (this.negative !== 0) {
42583
42824
  if (this.length === 1 && (this.words[0] | 0) <= num) {
@@ -42603,8 +42844,8 @@ var require_bn = __commonJSMin((exports, module) => {
42603
42844
  return this;
42604
42845
  };
42605
42846
  BN$14.prototype.isubn = function isubn(num) {
42606
- assert$54(typeof num === "number");
42607
- assert$54(num < 67108864);
42847
+ assert$55(typeof num === "number");
42848
+ assert$55(num < 67108864);
42608
42849
  if (num < 0) return this.iaddn(-num);
42609
42850
  if (this.negative !== 0) {
42610
42851
  this.negative = 0;
@@ -42654,7 +42895,7 @@ var require_bn = __commonJSMin((exports, module) => {
42654
42895
  this.words[i$4 + shift] = w$1 & 67108863;
42655
42896
  }
42656
42897
  if (carry === 0) return this._strip();
42657
- assert$54(carry === -1);
42898
+ assert$55(carry === -1);
42658
42899
  carry = 0;
42659
42900
  for (i$4 = 0; i$4 < this.length; i$4++) {
42660
42901
  w$1 = -(this.words[i$4] | 0) + carry;
@@ -42710,7 +42951,7 @@ var require_bn = __commonJSMin((exports, module) => {
42710
42951
  };
42711
42952
  };
42712
42953
  BN$14.prototype.divmod = function divmod(num, mode, positive) {
42713
- assert$54(!num.isZero());
42954
+ assert$55(!num.isZero());
42714
42955
  if (this.isZero()) return {
42715
42956
  div: new BN$14(0),
42716
42957
  mod: new BN$14(0)
@@ -42789,7 +43030,7 @@ var require_bn = __commonJSMin((exports, module) => {
42789
43030
  BN$14.prototype.modrn = function modrn(num) {
42790
43031
  var isNegNum = num < 0;
42791
43032
  if (isNegNum) num = -num;
42792
- assert$54(num <= 67108863);
43033
+ assert$55(num <= 67108863);
42793
43034
  var p$1 = (1 << 26) % num;
42794
43035
  var acc = 0;
42795
43036
  for (var i$4 = this.length - 1; i$4 >= 0; i$4--) acc = (p$1 * acc + (this.words[i$4] | 0)) % num;
@@ -42801,7 +43042,7 @@ var require_bn = __commonJSMin((exports, module) => {
42801
43042
  BN$14.prototype.idivn = function idivn(num) {
42802
43043
  var isNegNum = num < 0;
42803
43044
  if (isNegNum) num = -num;
42804
- assert$54(num <= 67108863);
43045
+ assert$55(num <= 67108863);
42805
43046
  var carry = 0;
42806
43047
  for (var i$4 = this.length - 1; i$4 >= 0; i$4--) {
42807
43048
  var w$1 = (this.words[i$4] | 0) + carry * 67108864;
@@ -42815,8 +43056,8 @@ var require_bn = __commonJSMin((exports, module) => {
42815
43056
  return this.clone().idivn(num);
42816
43057
  };
42817
43058
  BN$14.prototype.egcd = function egcd(p$1) {
42818
- assert$54(p$1.negative === 0);
42819
- assert$54(!p$1.isZero());
43059
+ assert$55(p$1.negative === 0);
43060
+ assert$55(!p$1.isZero());
42820
43061
  var x$1 = this;
42821
43062
  var y$1 = p$1.clone();
42822
43063
  if (x$1.negative !== 0) x$1 = x$1.umod(p$1);
@@ -42875,8 +43116,8 @@ var require_bn = __commonJSMin((exports, module) => {
42875
43116
  };
42876
43117
  };
42877
43118
  BN$14.prototype._invmp = function _invmp(p$1) {
42878
- assert$54(p$1.negative === 0);
42879
- assert$54(!p$1.isZero());
43119
+ assert$55(p$1.negative === 0);
43120
+ assert$55(!p$1.isZero());
42880
43121
  var a$2 = this;
42881
43122
  var b = p$1.clone();
42882
43123
  if (a$2.negative !== 0) a$2 = a$2.umod(p$1);
@@ -42952,7 +43193,7 @@ var require_bn = __commonJSMin((exports, module) => {
42952
43193
  return this.words[0] & num;
42953
43194
  };
42954
43195
  BN$14.prototype.bincn = function bincn(bit) {
42955
- assert$54(typeof bit === "number");
43196
+ assert$55(typeof bit === "number");
42956
43197
  var r$2 = bit % 26;
42957
43198
  var s$6 = (bit - r$2) / 26;
42958
43199
  var q = 1 << r$2;
@@ -42987,7 +43228,7 @@ var require_bn = __commonJSMin((exports, module) => {
42987
43228
  if (this.length > 1) res = 1;
42988
43229
  else {
42989
43230
  if (negative) num = -num;
42990
- assert$54(num <= 67108863, "Number is too big");
43231
+ assert$55(num <= 67108863, "Number is too big");
42991
43232
  var w$1 = this.words[0] | 0;
42992
43233
  res = w$1 === num ? 0 : w$1 < num ? -1 : 1;
42993
43234
  }
@@ -43049,12 +43290,12 @@ var require_bn = __commonJSMin((exports, module) => {
43049
43290
  return new Red(num);
43050
43291
  };
43051
43292
  BN$14.prototype.toRed = function toRed(ctx) {
43052
- assert$54(!this.red, "Already a number in reduction context");
43053
- assert$54(this.negative === 0, "red works only with positives");
43293
+ assert$55(!this.red, "Already a number in reduction context");
43294
+ assert$55(this.negative === 0, "red works only with positives");
43054
43295
  return ctx.convertTo(this)._forceRed(ctx);
43055
43296
  };
43056
43297
  BN$14.prototype.fromRed = function fromRed() {
43057
- assert$54(this.red, "fromRed works only with numbers in reduction context");
43298
+ assert$55(this.red, "fromRed works only with numbers in reduction context");
43058
43299
  return this.red.convertFrom(this);
43059
43300
  };
43060
43301
  BN$14.prototype._forceRed = function _forceRed(ctx) {
@@ -43062,66 +43303,66 @@ var require_bn = __commonJSMin((exports, module) => {
43062
43303
  return this;
43063
43304
  };
43064
43305
  BN$14.prototype.forceRed = function forceRed(ctx) {
43065
- assert$54(!this.red, "Already a number in reduction context");
43306
+ assert$55(!this.red, "Already a number in reduction context");
43066
43307
  return this._forceRed(ctx);
43067
43308
  };
43068
43309
  BN$14.prototype.redAdd = function redAdd(num) {
43069
- assert$54(this.red, "redAdd works only with red numbers");
43310
+ assert$55(this.red, "redAdd works only with red numbers");
43070
43311
  return this.red.add(this, num);
43071
43312
  };
43072
43313
  BN$14.prototype.redIAdd = function redIAdd(num) {
43073
- assert$54(this.red, "redIAdd works only with red numbers");
43314
+ assert$55(this.red, "redIAdd works only with red numbers");
43074
43315
  return this.red.iadd(this, num);
43075
43316
  };
43076
43317
  BN$14.prototype.redSub = function redSub(num) {
43077
- assert$54(this.red, "redSub works only with red numbers");
43318
+ assert$55(this.red, "redSub works only with red numbers");
43078
43319
  return this.red.sub(this, num);
43079
43320
  };
43080
43321
  BN$14.prototype.redISub = function redISub(num) {
43081
- assert$54(this.red, "redISub works only with red numbers");
43322
+ assert$55(this.red, "redISub works only with red numbers");
43082
43323
  return this.red.isub(this, num);
43083
43324
  };
43084
43325
  BN$14.prototype.redShl = function redShl(num) {
43085
- assert$54(this.red, "redShl works only with red numbers");
43326
+ assert$55(this.red, "redShl works only with red numbers");
43086
43327
  return this.red.shl(this, num);
43087
43328
  };
43088
43329
  BN$14.prototype.redMul = function redMul(num) {
43089
- assert$54(this.red, "redMul works only with red numbers");
43330
+ assert$55(this.red, "redMul works only with red numbers");
43090
43331
  this.red._verify2(this, num);
43091
43332
  return this.red.mul(this, num);
43092
43333
  };
43093
43334
  BN$14.prototype.redIMul = function redIMul(num) {
43094
- assert$54(this.red, "redMul works only with red numbers");
43335
+ assert$55(this.red, "redMul works only with red numbers");
43095
43336
  this.red._verify2(this, num);
43096
43337
  return this.red.imul(this, num);
43097
43338
  };
43098
43339
  BN$14.prototype.redSqr = function redSqr() {
43099
- assert$54(this.red, "redSqr works only with red numbers");
43340
+ assert$55(this.red, "redSqr works only with red numbers");
43100
43341
  this.red._verify1(this);
43101
43342
  return this.red.sqr(this);
43102
43343
  };
43103
43344
  BN$14.prototype.redISqr = function redISqr() {
43104
- assert$54(this.red, "redISqr works only with red numbers");
43345
+ assert$55(this.red, "redISqr works only with red numbers");
43105
43346
  this.red._verify1(this);
43106
43347
  return this.red.isqr(this);
43107
43348
  };
43108
43349
  BN$14.prototype.redSqrt = function redSqrt() {
43109
- assert$54(this.red, "redSqrt works only with red numbers");
43350
+ assert$55(this.red, "redSqrt works only with red numbers");
43110
43351
  this.red._verify1(this);
43111
43352
  return this.red.sqrt(this);
43112
43353
  };
43113
43354
  BN$14.prototype.redInvm = function redInvm() {
43114
- assert$54(this.red, "redInvm works only with red numbers");
43355
+ assert$55(this.red, "redInvm works only with red numbers");
43115
43356
  this.red._verify1(this);
43116
43357
  return this.red.invm(this);
43117
43358
  };
43118
43359
  BN$14.prototype.redNeg = function redNeg() {
43119
- assert$54(this.red, "redNeg works only with red numbers");
43360
+ assert$55(this.red, "redNeg works only with red numbers");
43120
43361
  this.red._verify1(this);
43121
43362
  return this.red.neg(this);
43122
43363
  };
43123
43364
  BN$14.prototype.redPow = function redPow(num) {
43124
- assert$54(this.red && !num.red, "redPow(normalNum)");
43365
+ assert$55(this.red && !num.red, "redPow(normalNum)");
43125
43366
  this.red._verify1(this);
43126
43367
  return this.red.pow(this, num);
43127
43368
  };
@@ -43251,18 +43492,18 @@ var require_bn = __commonJSMin((exports, module) => {
43251
43492
  this.m = prime.p;
43252
43493
  this.prime = prime;
43253
43494
  } else {
43254
- assert$54(m$3.gtn(1), "modulus must be greater than 1");
43495
+ assert$55(m$3.gtn(1), "modulus must be greater than 1");
43255
43496
  this.m = m$3;
43256
43497
  this.prime = null;
43257
43498
  }
43258
43499
  }
43259
43500
  Red.prototype._verify1 = function _verify1(a$2) {
43260
- assert$54(a$2.negative === 0, "red works only with positives");
43261
- assert$54(a$2.red, "red works only with red numbers");
43501
+ assert$55(a$2.negative === 0, "red works only with positives");
43502
+ assert$55(a$2.red, "red works only with red numbers");
43262
43503
  };
43263
43504
  Red.prototype._verify2 = function _verify2(a$2, b) {
43264
- assert$54((a$2.negative | b.negative) === 0, "red works only with positives");
43265
- assert$54(a$2.red && a$2.red === b.red, "red works only with red numbers");
43505
+ assert$55((a$2.negative | b.negative) === 0, "red works only with positives");
43506
+ assert$55(a$2.red && a$2.red === b.red, "red works only with red numbers");
43266
43507
  };
43267
43508
  Red.prototype.imod = function imod(a$2) {
43268
43509
  if (this.prime) return this.prime.ireduce(a$2)._forceRed(this);
@@ -43318,7 +43559,7 @@ var require_bn = __commonJSMin((exports, module) => {
43318
43559
  Red.prototype.sqrt = function sqrt(a$2) {
43319
43560
  if (a$2.isZero()) return a$2.clone();
43320
43561
  var mod3 = this.m.andln(3);
43321
- assert$54(mod3 % 2 === 1);
43562
+ assert$55(mod3 % 2 === 1);
43322
43563
  if (mod3 === 3) {
43323
43564
  var pow$1 = this.m.add(new BN$14(1)).iushrn(2);
43324
43565
  return this.pow(a$2, pow$1);
@@ -43329,7 +43570,7 @@ var require_bn = __commonJSMin((exports, module) => {
43329
43570
  s$6++;
43330
43571
  q.iushrn(1);
43331
43572
  }
43332
- assert$54(!q.isZero());
43573
+ assert$55(!q.isZero());
43333
43574
  var one = new BN$14(1).toRed(this);
43334
43575
  var nOne = one.redNeg();
43335
43576
  var lpow = this.m.subn(1).iushrn(1);
@@ -43343,7 +43584,7 @@ var require_bn = __commonJSMin((exports, module) => {
43343
43584
  while (t$7.cmp(one) !== 0) {
43344
43585
  var tmp = t$7;
43345
43586
  for (var i$4 = 0; tmp.cmp(one) !== 0; i$4++) tmp = tmp.redSqr();
43346
- assert$54(i$4 < m$3);
43587
+ assert$55(i$4 < m$3);
43347
43588
  var b = this.pow(c$1, new BN$14(1).iushln(m$3 - i$4 - 1));
43348
43589
  r$2 = r$2.redMul(b);
43349
43590
  c$1 = b.redSqr();
@@ -45706,11 +45947,11 @@ var RootFactory = class RootFactory {
45706
45947
  static generate(root$11, schema$2, args$1) {
45707
45948
  (0, import_assert.default)(root$11, "Must be invoked on a Joi instance.");
45708
45949
  const cloned = schema$2.clone();
45709
- const originalDescribe$1 = cloned.describe.bind(cloned);
45950
+ const originalDescribe = cloned.describe.bind(cloned);
45710
45951
  cloned.describe = function() {
45711
45952
  const cached = RootFactory.$_cachedDescriptions.get(this);
45712
45953
  if (cached) return cached;
45713
- const result = originalDescribe$1();
45954
+ const result = originalDescribe();
45714
45955
  RootFactory.$_cachedDescriptions.set(this, result);
45715
45956
  return result;
45716
45957
  };
@@ -143180,7 +143421,7 @@ const encode = (schema$2, options = {}) => {
143180
143421
  });
143181
143422
  }
143182
143423
  const json$1 = JSON.stringify({
143183
- version: "0.1.0-master-cb87a6f9",
143424
+ version: "0.1.0-master-952eca46",
143184
143425
  schema: description$2
143185
143426
  }, (key, value) => {
143186
143427
  if (typeof value === "bigint") return value.toString();
@@ -143228,9 +143469,9 @@ const decode = (base64, options = {}) => {
143228
143469
  });
143229
143470
  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");
143230
143471
  const { version: schemaVersion, schema: schema$2 } = description$2;
143231
- if (import_semver.valid("0.1.0-master-cb87a6f9")) {
143472
+ if (import_semver.valid("0.1.0-master-952eca46")) {
143232
143473
  if (!import_semver.valid(import_semver.coerce(schemaVersion))) throw new TypeError(`Invalid schema version: ${schemaVersion}`);
143233
- 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`);
143474
+ 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`);
143234
143475
  }
143235
143476
  return validator.build(schema$2);
143236
143477
  };
@@ -144684,7 +144925,7 @@ init_esm();
144684
144925
  var import_lib = __toESM(require_lib$3());
144685
144926
  var import_lib$1 = __toESM(require_lib$2());
144686
144927
  var import_lib$2 = __toESM(require_lib());
144687
- const version = "0.1.0-master-cb87a6f9";
144928
+ const version = "0.1.0-master-952eca46";
144688
144929
  var ValidationError = import_lib$2.ValidationError;
144689
144930
  var location = import_lib$1.location;
144690
144931
  export { ValidationError, esm_exports as address, decode, encode, import_lib as formula, location, tlds, validator, version };