@dxos/node-std 0.6.10 → 0.6.11-staging.32b42e4

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.
Files changed (48) hide show
  1. package/dist/lib/browser/_/config.mjs +1 -1
  2. package/dist/lib/browser/assert.mjs +44 -80
  3. package/dist/lib/browser/assert.mjs.map +1 -1
  4. package/dist/lib/browser/buffer.mjs +2 -2
  5. package/dist/lib/browser/{chunk-MJPHVYKR.mjs → chunk-3QS3WKRC.mjs} +1 -1
  6. package/dist/lib/browser/{chunk-CMGRJ4FC.mjs → chunk-BBIU6VNW.mjs} +3 -3
  7. package/dist/lib/browser/{chunk-RGVVW7F2.mjs → chunk-EC477KOW.mjs} +19 -31
  8. package/dist/lib/browser/{chunk-RGVVW7F2.mjs.map → chunk-EC477KOW.mjs.map} +1 -1
  9. package/dist/lib/browser/{chunk-HFGMGNFE.mjs → chunk-PY2IJ42L.mjs} +106 -210
  10. package/dist/lib/browser/{chunk-HFGMGNFE.mjs.map → chunk-PY2IJ42L.mjs.map} +1 -1
  11. package/dist/lib/browser/crypto.mjs +1 -1
  12. package/dist/lib/browser/events.mjs +4 -7
  13. package/dist/lib/browser/events.mjs.map +1 -1
  14. package/dist/lib/browser/fs/promises.mjs +1 -1
  15. package/dist/lib/browser/fs.mjs +1 -1
  16. package/dist/lib/browser/globals.mjs +3 -3
  17. package/dist/lib/browser/inject-globals.mjs +2 -2
  18. package/dist/lib/browser/meta.json +1 -1
  19. package/dist/lib/browser/path.mjs +22 -43
  20. package/dist/lib/browser/path.mjs.map +1 -1
  21. package/dist/lib/browser/stream.mjs +1 -1
  22. package/dist/lib/browser/util.mjs +4 -4
  23. package/dist/lib/node/_/config.cjs +1 -1
  24. package/dist/lib/node/assert.cjs +1 -1
  25. package/dist/lib/node/buffer.cjs +3 -3
  26. package/dist/lib/node/{chunk-XUVUYQ27.cjs → chunk-6SZKM6EC.cjs} +5 -6
  27. package/dist/lib/node/chunk-6SZKM6EC.cjs.map +7 -0
  28. package/dist/lib/node/{chunk-LQSBC3HI.cjs → chunk-FCCITQEP.cjs} +125 -229
  29. package/dist/lib/node/{chunk-LQSBC3HI.cjs.map → chunk-FCCITQEP.cjs.map} +2 -2
  30. package/dist/lib/node/{chunk-D73VD6UV.cjs → chunk-NY4EGPUF.cjs} +4 -4
  31. package/dist/lib/node/crypto.cjs +1 -1
  32. package/dist/lib/node/events.cjs +1 -1
  33. package/dist/lib/node/fs/promises.cjs +1 -1
  34. package/dist/lib/node/fs.cjs +1 -1
  35. package/dist/lib/node/globals.cjs +3 -3
  36. package/dist/lib/node/globals.cjs.map +1 -1
  37. package/dist/lib/node/inject-globals.cjs +3 -3
  38. package/dist/lib/node/meta.json +1 -1
  39. package/dist/lib/node/path.cjs +26 -47
  40. package/dist/lib/node/path.cjs.map +2 -2
  41. package/dist/lib/node/stream.cjs +1 -1
  42. package/dist/lib/node/util.cjs +157 -170
  43. package/dist/lib/node/util.cjs.map +2 -2
  44. package/package.json +1 -1
  45. package/dist/lib/node/chunk-XUVUYQ27.cjs.map +0 -7
  46. /package/dist/lib/browser/{chunk-MJPHVYKR.mjs.map → chunk-3QS3WKRC.mjs.map} +0 -0
  47. /package/dist/lib/browser/{chunk-CMGRJ4FC.mjs.map → chunk-BBIU6VNW.mjs.map} +0 -0
  48. /package/dist/lib/node/{chunk-D73VD6UV.cjs.map → chunk-NY4EGPUF.cjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __commonJS
3
- } from "./chunk-MJPHVYKR.mjs";
3
+ } from "./chunk-3QS3WKRC.mjs";
4
4
 
5
5
  // node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
6
6
  var require_base64_js = __commonJS({
@@ -27,8 +27,7 @@ var require_base64_js = __commonJS({
27
27
  throw new Error("Invalid string. Length must be a multiple of 4");
28
28
  }
29
29
  var validLen = b64.indexOf("=");
30
- if (validLen === -1)
31
- validLen = len2;
30
+ if (validLen === -1) validLen = len2;
32
31
  var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
33
32
  return [validLen, placeHoldersLen];
34
33
  }
@@ -221,16 +220,14 @@ var require_buffer = __commonJS({
221
220
  Object.defineProperty(Buffer.prototype, "parent", {
222
221
  enumerable: true,
223
222
  get: function() {
224
- if (!Buffer.isBuffer(this))
225
- return void 0;
223
+ if (!Buffer.isBuffer(this)) return void 0;
226
224
  return this.buffer;
227
225
  }
228
226
  });
229
227
  Object.defineProperty(Buffer.prototype, "offset", {
230
228
  enumerable: true,
231
229
  get: function() {
232
- if (!Buffer.isBuffer(this))
233
- return void 0;
230
+ if (!Buffer.isBuffer(this)) return void 0;
234
231
  return this.byteOffset;
235
232
  }
236
233
  });
@@ -282,8 +279,7 @@ var require_buffer = __commonJS({
282
279
  return Buffer.from(valueOf, encodingOrOffset, length);
283
280
  }
284
281
  const b = fromObject(value);
285
- if (b)
286
- return b;
282
+ if (b) return b;
287
283
  if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
288
284
  return Buffer.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
289
285
  }
@@ -410,17 +406,14 @@ var require_buffer = __commonJS({
410
406
  return b != null && b._isBuffer === true && b !== Buffer.prototype;
411
407
  };
412
408
  Buffer.compare = function compare(a, b) {
413
- if (isInstance(a, Uint8Array))
414
- a = Buffer.from(a, a.offset, a.byteLength);
415
- if (isInstance(b, Uint8Array))
416
- b = Buffer.from(b, b.offset, b.byteLength);
409
+ if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);
410
+ if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);
417
411
  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
418
412
  throw new TypeError(
419
413
  'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
420
414
  );
421
415
  }
422
- if (a === b)
423
- return 0;
416
+ if (a === b) return 0;
424
417
  let x = a.length;
425
418
  let y = b.length;
426
419
  for (let i = 0, len = Math.min(x, y); i < len; ++i) {
@@ -430,10 +423,8 @@ var require_buffer = __commonJS({
430
423
  break;
431
424
  }
432
425
  }
433
- if (x < y)
434
- return -1;
435
- if (y < x)
436
- return 1;
426
+ if (x < y) return -1;
427
+ if (y < x) return 1;
437
428
  return 0;
438
429
  };
439
430
  Buffer.isEncoding = function isEncoding(encoding) {
@@ -474,8 +465,7 @@ var require_buffer = __commonJS({
474
465
  let buf = list[i];
475
466
  if (isInstance(buf, Uint8Array)) {
476
467
  if (pos + buf.length > buffer.length) {
477
- if (!Buffer.isBuffer(buf))
478
- buf = Buffer.from(buf);
468
+ if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);
479
469
  buf.copy(buffer, pos);
480
470
  } else {
481
471
  Uint8Array.prototype.set.call(
@@ -507,8 +497,7 @@ var require_buffer = __commonJS({
507
497
  }
508
498
  const len = string.length;
509
499
  const mustMatch = arguments.length > 2 && arguments[2] === true;
510
- if (!mustMatch && len === 0)
511
- return 0;
500
+ if (!mustMatch && len === 0) return 0;
512
501
  let loweredCase = false;
513
502
  for (; ; ) {
514
503
  switch (encoding) {
@@ -557,8 +546,7 @@ var require_buffer = __commonJS({
557
546
  if (end <= start) {
558
547
  return "";
559
548
  }
560
- if (!encoding)
561
- encoding = "utf8";
549
+ if (!encoding) encoding = "utf8";
562
550
  while (true) {
563
551
  switch (encoding) {
564
552
  case "hex":
@@ -579,8 +567,7 @@ var require_buffer = __commonJS({
579
567
  case "utf-16le":
580
568
  return utf16leSlice(this, start, end);
581
569
  default:
582
- if (loweredCase)
583
- throw new TypeError("Unknown encoding: " + encoding);
570
+ if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
584
571
  encoding = (encoding + "").toLowerCase();
585
572
  loweredCase = true;
586
573
  }
@@ -628,26 +615,21 @@ var require_buffer = __commonJS({
628
615
  };
629
616
  Buffer.prototype.toString = function toString() {
630
617
  const length = this.length;
631
- if (length === 0)
632
- return "";
633
- if (arguments.length === 0)
634
- return utf8Slice(this, 0, length);
618
+ if (length === 0) return "";
619
+ if (arguments.length === 0) return utf8Slice(this, 0, length);
635
620
  return slowToString.apply(this, arguments);
636
621
  };
637
622
  Buffer.prototype.toLocaleString = Buffer.prototype.toString;
638
623
  Buffer.prototype.equals = function equals(b) {
639
- if (!Buffer.isBuffer(b))
640
- throw new TypeError("Argument must be a Buffer");
641
- if (this === b)
642
- return true;
624
+ if (!Buffer.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
625
+ if (this === b) return true;
643
626
  return Buffer.compare(this, b) === 0;
644
627
  };
645
628
  Buffer.prototype.inspect = function inspect() {
646
629
  let str = "";
647
630
  const max = exports.INSPECT_MAX_BYTES;
648
631
  str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
649
- if (this.length > max)
650
- str += " ... ";
632
+ if (this.length > max) str += " ... ";
651
633
  return "<Buffer " + str + ">";
652
634
  };
653
635
  if (customInspectSymbol) {
@@ -690,8 +672,7 @@ var require_buffer = __commonJS({
690
672
  end >>>= 0;
691
673
  thisStart >>>= 0;
692
674
  thisEnd >>>= 0;
693
- if (this === target)
694
- return 0;
675
+ if (this === target) return 0;
695
676
  let x = thisEnd - thisStart;
696
677
  let y = end - start;
697
678
  const len = Math.min(x, y);
@@ -704,15 +685,12 @@ var require_buffer = __commonJS({
704
685
  break;
705
686
  }
706
687
  }
707
- if (x < y)
708
- return -1;
709
- if (y < x)
710
- return 1;
688
+ if (x < y) return -1;
689
+ if (y < x) return 1;
711
690
  return 0;
712
691
  };
713
692
  function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
714
- if (buffer.length === 0)
715
- return -1;
693
+ if (buffer.length === 0) return -1;
716
694
  if (typeof byteOffset === "string") {
717
695
  encoding = byteOffset;
718
696
  byteOffset = 0;
@@ -725,18 +703,13 @@ var require_buffer = __commonJS({
725
703
  if (numberIsNaN(byteOffset)) {
726
704
  byteOffset = dir ? 0 : buffer.length - 1;
727
705
  }
728
- if (byteOffset < 0)
729
- byteOffset = buffer.length + byteOffset;
706
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
730
707
  if (byteOffset >= buffer.length) {
731
- if (dir)
732
- return -1;
733
- else
734
- byteOffset = buffer.length - 1;
708
+ if (dir) return -1;
709
+ else byteOffset = buffer.length - 1;
735
710
  } else if (byteOffset < 0) {
736
- if (dir)
737
- byteOffset = 0;
738
- else
739
- return -1;
711
+ if (dir) byteOffset = 0;
712
+ else return -1;
740
713
  }
741
714
  if (typeof val === "string") {
742
715
  val = Buffer.from(val, encoding);
@@ -787,19 +760,15 @@ var require_buffer = __commonJS({
787
760
  let foundIndex = -1;
788
761
  for (i = byteOffset; i < arrLength; i++) {
789
762
  if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
790
- if (foundIndex === -1)
791
- foundIndex = i;
792
- if (i - foundIndex + 1 === valLength)
793
- return foundIndex * indexSize;
763
+ if (foundIndex === -1) foundIndex = i;
764
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
794
765
  } else {
795
- if (foundIndex !== -1)
796
- i -= i - foundIndex;
766
+ if (foundIndex !== -1) i -= i - foundIndex;
797
767
  foundIndex = -1;
798
768
  }
799
769
  }
800
770
  } else {
801
- if (byteOffset + valLength > arrLength)
802
- byteOffset = arrLength - valLength;
771
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
803
772
  for (i = byteOffset; i >= 0; i--) {
804
773
  let found = true;
805
774
  for (let j = 0; j < valLength; j++) {
@@ -808,8 +777,7 @@ var require_buffer = __commonJS({
808
777
  break;
809
778
  }
810
779
  }
811
- if (found)
812
- return i;
780
+ if (found) return i;
813
781
  }
814
782
  }
815
783
  return -1;
@@ -841,8 +809,7 @@ var require_buffer = __commonJS({
841
809
  let i;
842
810
  for (i = 0; i < length; ++i) {
843
811
  const parsed = parseInt(string.substr(i * 2, 2), 16);
844
- if (numberIsNaN(parsed))
845
- return i;
812
+ if (numberIsNaN(parsed)) return i;
846
813
  buf[offset + i] = parsed;
847
814
  }
848
815
  return i;
@@ -872,8 +839,7 @@ var require_buffer = __commonJS({
872
839
  offset = offset >>> 0;
873
840
  if (isFinite(length)) {
874
841
  length = length >>> 0;
875
- if (encoding === void 0)
876
- encoding = "utf8";
842
+ if (encoding === void 0) encoding = "utf8";
877
843
  } else {
878
844
  encoding = length;
879
845
  length = void 0;
@@ -884,13 +850,11 @@ var require_buffer = __commonJS({
884
850
  );
885
851
  }
886
852
  const remaining = this.length - offset;
887
- if (length === void 0 || length > remaining)
888
- length = remaining;
853
+ if (length === void 0 || length > remaining) length = remaining;
889
854
  if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
890
855
  throw new RangeError("Attempt to write outside buffer bounds");
891
856
  }
892
- if (!encoding)
893
- encoding = "utf8";
857
+ if (!encoding) encoding = "utf8";
894
858
  let loweredCase = false;
895
859
  for (; ; ) {
896
860
  switch (encoding) {
@@ -911,8 +875,7 @@ var require_buffer = __commonJS({
911
875
  case "utf-16le":
912
876
  return ucs2Write(this, string, offset, length);
913
877
  default:
914
- if (loweredCase)
915
- throw new TypeError("Unknown encoding: " + encoding);
878
+ if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
916
879
  encoding = ("" + encoding).toLowerCase();
917
880
  loweredCase = true;
918
881
  }
@@ -1025,10 +988,8 @@ var require_buffer = __commonJS({
1025
988
  }
1026
989
  function hexSlice(buf, start, end) {
1027
990
  const len = buf.length;
1028
- if (!start || start < 0)
1029
- start = 0;
1030
- if (!end || end < 0 || end > len)
1031
- end = len;
991
+ if (!start || start < 0) start = 0;
992
+ if (!end || end < 0 || end > len) end = len;
1032
993
  let out = "";
1033
994
  for (let i = start; i < end; ++i) {
1034
995
  out += hexSliceLookupTable[buf[i]];
@@ -1049,35 +1010,29 @@ var require_buffer = __commonJS({
1049
1010
  end = end === void 0 ? len : ~~end;
1050
1011
  if (start < 0) {
1051
1012
  start += len;
1052
- if (start < 0)
1053
- start = 0;
1013
+ if (start < 0) start = 0;
1054
1014
  } else if (start > len) {
1055
1015
  start = len;
1056
1016
  }
1057
1017
  if (end < 0) {
1058
1018
  end += len;
1059
- if (end < 0)
1060
- end = 0;
1019
+ if (end < 0) end = 0;
1061
1020
  } else if (end > len) {
1062
1021
  end = len;
1063
1022
  }
1064
- if (end < start)
1065
- end = start;
1023
+ if (end < start) end = start;
1066
1024
  const newBuf = this.subarray(start, end);
1067
1025
  Object.setPrototypeOf(newBuf, Buffer.prototype);
1068
1026
  return newBuf;
1069
1027
  };
1070
1028
  function checkOffset(offset, ext, length) {
1071
- if (offset % 1 !== 0 || offset < 0)
1072
- throw new RangeError("offset is not uint");
1073
- if (offset + ext > length)
1074
- throw new RangeError("Trying to access beyond buffer length");
1029
+ if (offset % 1 !== 0 || offset < 0) throw new RangeError("offset is not uint");
1030
+ if (offset + ext > length) throw new RangeError("Trying to access beyond buffer length");
1075
1031
  }
1076
1032
  Buffer.prototype.readUintLE = Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) {
1077
1033
  offset = offset >>> 0;
1078
1034
  byteLength2 = byteLength2 >>> 0;
1079
- if (!noAssert)
1080
- checkOffset(offset, byteLength2, this.length);
1035
+ if (!noAssert) checkOffset(offset, byteLength2, this.length);
1081
1036
  let val = this[offset];
1082
1037
  let mul = 1;
1083
1038
  let i = 0;
@@ -1101,32 +1056,27 @@ var require_buffer = __commonJS({
1101
1056
  };
1102
1057
  Buffer.prototype.readUint8 = Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
1103
1058
  offset = offset >>> 0;
1104
- if (!noAssert)
1105
- checkOffset(offset, 1, this.length);
1059
+ if (!noAssert) checkOffset(offset, 1, this.length);
1106
1060
  return this[offset];
1107
1061
  };
1108
1062
  Buffer.prototype.readUint16LE = Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
1109
1063
  offset = offset >>> 0;
1110
- if (!noAssert)
1111
- checkOffset(offset, 2, this.length);
1064
+ if (!noAssert) checkOffset(offset, 2, this.length);
1112
1065
  return this[offset] | this[offset + 1] << 8;
1113
1066
  };
1114
1067
  Buffer.prototype.readUint16BE = Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
1115
1068
  offset = offset >>> 0;
1116
- if (!noAssert)
1117
- checkOffset(offset, 2, this.length);
1069
+ if (!noAssert) checkOffset(offset, 2, this.length);
1118
1070
  return this[offset] << 8 | this[offset + 1];
1119
1071
  };
1120
1072
  Buffer.prototype.readUint32LE = Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
1121
1073
  offset = offset >>> 0;
1122
- if (!noAssert)
1123
- checkOffset(offset, 4, this.length);
1074
+ if (!noAssert) checkOffset(offset, 4, this.length);
1124
1075
  return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
1125
1076
  };
1126
1077
  Buffer.prototype.readUint32BE = Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
1127
1078
  offset = offset >>> 0;
1128
- if (!noAssert)
1129
- checkOffset(offset, 4, this.length);
1079
+ if (!noAssert) checkOffset(offset, 4, this.length);
1130
1080
  return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
1131
1081
  };
1132
1082
  Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
@@ -1156,8 +1106,7 @@ var require_buffer = __commonJS({
1156
1106
  Buffer.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) {
1157
1107
  offset = offset >>> 0;
1158
1108
  byteLength2 = byteLength2 >>> 0;
1159
- if (!noAssert)
1160
- checkOffset(offset, byteLength2, this.length);
1109
+ if (!noAssert) checkOffset(offset, byteLength2, this.length);
1161
1110
  let val = this[offset];
1162
1111
  let mul = 1;
1163
1112
  let i = 0;
@@ -1165,15 +1114,13 @@ var require_buffer = __commonJS({
1165
1114
  val += this[offset + i] * mul;
1166
1115
  }
1167
1116
  mul *= 128;
1168
- if (val >= mul)
1169
- val -= Math.pow(2, 8 * byteLength2);
1117
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength2);
1170
1118
  return val;
1171
1119
  };
1172
1120
  Buffer.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) {
1173
1121
  offset = offset >>> 0;
1174
1122
  byteLength2 = byteLength2 >>> 0;
1175
- if (!noAssert)
1176
- checkOffset(offset, byteLength2, this.length);
1123
+ if (!noAssert) checkOffset(offset, byteLength2, this.length);
1177
1124
  let i = byteLength2;
1178
1125
  let mul = 1;
1179
1126
  let val = this[offset + --i];
@@ -1181,42 +1128,35 @@ var require_buffer = __commonJS({
1181
1128
  val += this[offset + --i] * mul;
1182
1129
  }
1183
1130
  mul *= 128;
1184
- if (val >= mul)
1185
- val -= Math.pow(2, 8 * byteLength2);
1131
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength2);
1186
1132
  return val;
1187
1133
  };
1188
1134
  Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
1189
1135
  offset = offset >>> 0;
1190
- if (!noAssert)
1191
- checkOffset(offset, 1, this.length);
1192
- if (!(this[offset] & 128))
1193
- return this[offset];
1136
+ if (!noAssert) checkOffset(offset, 1, this.length);
1137
+ if (!(this[offset] & 128)) return this[offset];
1194
1138
  return (255 - this[offset] + 1) * -1;
1195
1139
  };
1196
1140
  Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
1197
1141
  offset = offset >>> 0;
1198
- if (!noAssert)
1199
- checkOffset(offset, 2, this.length);
1142
+ if (!noAssert) checkOffset(offset, 2, this.length);
1200
1143
  const val = this[offset] | this[offset + 1] << 8;
1201
1144
  return val & 32768 ? val | 4294901760 : val;
1202
1145
  };
1203
1146
  Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
1204
1147
  offset = offset >>> 0;
1205
- if (!noAssert)
1206
- checkOffset(offset, 2, this.length);
1148
+ if (!noAssert) checkOffset(offset, 2, this.length);
1207
1149
  const val = this[offset + 1] | this[offset] << 8;
1208
1150
  return val & 32768 ? val | 4294901760 : val;
1209
1151
  };
1210
1152
  Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
1211
1153
  offset = offset >>> 0;
1212
- if (!noAssert)
1213
- checkOffset(offset, 4, this.length);
1154
+ if (!noAssert) checkOffset(offset, 4, this.length);
1214
1155
  return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
1215
1156
  };
1216
1157
  Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
1217
1158
  offset = offset >>> 0;
1218
- if (!noAssert)
1219
- checkOffset(offset, 4, this.length);
1159
+ if (!noAssert) checkOffset(offset, 4, this.length);
1220
1160
  return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
1221
1161
  };
1222
1162
  Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
@@ -1244,35 +1184,28 @@ var require_buffer = __commonJS({
1244
1184
  });
1245
1185
  Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
1246
1186
  offset = offset >>> 0;
1247
- if (!noAssert)
1248
- checkOffset(offset, 4, this.length);
1187
+ if (!noAssert) checkOffset(offset, 4, this.length);
1249
1188
  return ieee754.read(this, offset, true, 23, 4);
1250
1189
  };
1251
1190
  Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
1252
1191
  offset = offset >>> 0;
1253
- if (!noAssert)
1254
- checkOffset(offset, 4, this.length);
1192
+ if (!noAssert) checkOffset(offset, 4, this.length);
1255
1193
  return ieee754.read(this, offset, false, 23, 4);
1256
1194
  };
1257
1195
  Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
1258
1196
  offset = offset >>> 0;
1259
- if (!noAssert)
1260
- checkOffset(offset, 8, this.length);
1197
+ if (!noAssert) checkOffset(offset, 8, this.length);
1261
1198
  return ieee754.read(this, offset, true, 52, 8);
1262
1199
  };
1263
1200
  Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
1264
1201
  offset = offset >>> 0;
1265
- if (!noAssert)
1266
- checkOffset(offset, 8, this.length);
1202
+ if (!noAssert) checkOffset(offset, 8, this.length);
1267
1203
  return ieee754.read(this, offset, false, 52, 8);
1268
1204
  };
1269
1205
  function checkInt(buf, value, offset, ext, max, min) {
1270
- if (!Buffer.isBuffer(buf))
1271
- throw new TypeError('"buffer" argument must be a Buffer instance');
1272
- if (value > max || value < min)
1273
- throw new RangeError('"value" argument is out of bounds');
1274
- if (offset + ext > buf.length)
1275
- throw new RangeError("Index out of range");
1206
+ if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
1207
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
1208
+ if (offset + ext > buf.length) throw new RangeError("Index out of range");
1276
1209
  }
1277
1210
  Buffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) {
1278
1211
  value = +value;
@@ -1309,16 +1242,14 @@ var require_buffer = __commonJS({
1309
1242
  Buffer.prototype.writeUint8 = Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
1310
1243
  value = +value;
1311
1244
  offset = offset >>> 0;
1312
- if (!noAssert)
1313
- checkInt(this, value, offset, 1, 255, 0);
1245
+ if (!noAssert) checkInt(this, value, offset, 1, 255, 0);
1314
1246
  this[offset] = value & 255;
1315
1247
  return offset + 1;
1316
1248
  };
1317
1249
  Buffer.prototype.writeUint16LE = Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
1318
1250
  value = +value;
1319
1251
  offset = offset >>> 0;
1320
- if (!noAssert)
1321
- checkInt(this, value, offset, 2, 65535, 0);
1252
+ if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
1322
1253
  this[offset] = value & 255;
1323
1254
  this[offset + 1] = value >>> 8;
1324
1255
  return offset + 2;
@@ -1326,8 +1257,7 @@ var require_buffer = __commonJS({
1326
1257
  Buffer.prototype.writeUint16BE = Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
1327
1258
  value = +value;
1328
1259
  offset = offset >>> 0;
1329
- if (!noAssert)
1330
- checkInt(this, value, offset, 2, 65535, 0);
1260
+ if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
1331
1261
  this[offset] = value >>> 8;
1332
1262
  this[offset + 1] = value & 255;
1333
1263
  return offset + 2;
@@ -1335,8 +1265,7 @@ var require_buffer = __commonJS({
1335
1265
  Buffer.prototype.writeUint32LE = Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
1336
1266
  value = +value;
1337
1267
  offset = offset >>> 0;
1338
- if (!noAssert)
1339
- checkInt(this, value, offset, 4, 4294967295, 0);
1268
+ if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
1340
1269
  this[offset + 3] = value >>> 24;
1341
1270
  this[offset + 2] = value >>> 16;
1342
1271
  this[offset + 1] = value >>> 8;
@@ -1346,8 +1275,7 @@ var require_buffer = __commonJS({
1346
1275
  Buffer.prototype.writeUint32BE = Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
1347
1276
  value = +value;
1348
1277
  offset = offset >>> 0;
1349
- if (!noAssert)
1350
- checkInt(this, value, offset, 4, 4294967295, 0);
1278
+ if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
1351
1279
  this[offset] = value >>> 24;
1352
1280
  this[offset + 1] = value >>> 16;
1353
1281
  this[offset + 2] = value >>> 8;
@@ -1441,18 +1369,15 @@ var require_buffer = __commonJS({
1441
1369
  Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
1442
1370
  value = +value;
1443
1371
  offset = offset >>> 0;
1444
- if (!noAssert)
1445
- checkInt(this, value, offset, 1, 127, -128);
1446
- if (value < 0)
1447
- value = 255 + value + 1;
1372
+ if (!noAssert) checkInt(this, value, offset, 1, 127, -128);
1373
+ if (value < 0) value = 255 + value + 1;
1448
1374
  this[offset] = value & 255;
1449
1375
  return offset + 1;
1450
1376
  };
1451
1377
  Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
1452
1378
  value = +value;
1453
1379
  offset = offset >>> 0;
1454
- if (!noAssert)
1455
- checkInt(this, value, offset, 2, 32767, -32768);
1380
+ if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
1456
1381
  this[offset] = value & 255;
1457
1382
  this[offset + 1] = value >>> 8;
1458
1383
  return offset + 2;
@@ -1460,8 +1385,7 @@ var require_buffer = __commonJS({
1460
1385
  Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
1461
1386
  value = +value;
1462
1387
  offset = offset >>> 0;
1463
- if (!noAssert)
1464
- checkInt(this, value, offset, 2, 32767, -32768);
1388
+ if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
1465
1389
  this[offset] = value >>> 8;
1466
1390
  this[offset + 1] = value & 255;
1467
1391
  return offset + 2;
@@ -1469,8 +1393,7 @@ var require_buffer = __commonJS({
1469
1393
  Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
1470
1394
  value = +value;
1471
1395
  offset = offset >>> 0;
1472
- if (!noAssert)
1473
- checkInt(this, value, offset, 4, 2147483647, -2147483648);
1396
+ if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
1474
1397
  this[offset] = value & 255;
1475
1398
  this[offset + 1] = value >>> 8;
1476
1399
  this[offset + 2] = value >>> 16;
@@ -1480,10 +1403,8 @@ var require_buffer = __commonJS({
1480
1403
  Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
1481
1404
  value = +value;
1482
1405
  offset = offset >>> 0;
1483
- if (!noAssert)
1484
- checkInt(this, value, offset, 4, 2147483647, -2147483648);
1485
- if (value < 0)
1486
- value = 4294967295 + value + 1;
1406
+ if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
1407
+ if (value < 0) value = 4294967295 + value + 1;
1487
1408
  this[offset] = value >>> 24;
1488
1409
  this[offset + 1] = value >>> 16;
1489
1410
  this[offset + 2] = value >>> 8;
@@ -1497,10 +1418,8 @@ var require_buffer = __commonJS({
1497
1418
  return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1498
1419
  });
1499
1420
  function checkIEEE754(buf, value, offset, ext, max, min) {
1500
- if (offset + ext > buf.length)
1501
- throw new RangeError("Index out of range");
1502
- if (offset < 0)
1503
- throw new RangeError("Index out of range");
1421
+ if (offset + ext > buf.length) throw new RangeError("Index out of range");
1422
+ if (offset < 0) throw new RangeError("Index out of range");
1504
1423
  }
1505
1424
  function writeFloat(buf, value, offset, littleEndian, noAssert) {
1506
1425
  value = +value;
@@ -1533,31 +1452,20 @@ var require_buffer = __commonJS({
1533
1452
  return writeDouble(this, value, offset, false, noAssert);
1534
1453
  };
1535
1454
  Buffer.prototype.copy = function copy(target, targetStart, start, end) {
1536
- if (!Buffer.isBuffer(target))
1537
- throw new TypeError("argument should be a Buffer");
1538
- if (!start)
1539
- start = 0;
1540
- if (!end && end !== 0)
1541
- end = this.length;
1542
- if (targetStart >= target.length)
1543
- targetStart = target.length;
1544
- if (!targetStart)
1545
- targetStart = 0;
1546
- if (end > 0 && end < start)
1547
- end = start;
1548
- if (end === start)
1549
- return 0;
1550
- if (target.length === 0 || this.length === 0)
1551
- return 0;
1455
+ if (!Buffer.isBuffer(target)) throw new TypeError("argument should be a Buffer");
1456
+ if (!start) start = 0;
1457
+ if (!end && end !== 0) end = this.length;
1458
+ if (targetStart >= target.length) targetStart = target.length;
1459
+ if (!targetStart) targetStart = 0;
1460
+ if (end > 0 && end < start) end = start;
1461
+ if (end === start) return 0;
1462
+ if (target.length === 0 || this.length === 0) return 0;
1552
1463
  if (targetStart < 0) {
1553
1464
  throw new RangeError("targetStart out of bounds");
1554
1465
  }
1555
- if (start < 0 || start >= this.length)
1556
- throw new RangeError("Index out of range");
1557
- if (end < 0)
1558
- throw new RangeError("sourceEnd out of bounds");
1559
- if (end > this.length)
1560
- end = this.length;
1466
+ if (start < 0 || start >= this.length) throw new RangeError("Index out of range");
1467
+ if (end < 0) throw new RangeError("sourceEnd out of bounds");
1468
+ if (end > this.length) end = this.length;
1561
1469
  if (target.length - targetStart < end - start) {
1562
1470
  end = target.length - targetStart + start;
1563
1471
  }
@@ -1608,8 +1516,7 @@ var require_buffer = __commonJS({
1608
1516
  }
1609
1517
  start = start >>> 0;
1610
1518
  end = end === void 0 ? this.length : end >>> 0;
1611
- if (!val)
1612
- val = 0;
1519
+ if (!val) val = 0;
1613
1520
  let i;
1614
1521
  if (typeof val === "number") {
1615
1522
  for (i = start; i < end; ++i) {
@@ -1748,8 +1655,7 @@ var require_buffer = __commonJS({
1748
1655
  function base64clean(str) {
1749
1656
  str = str.split("=")[0];
1750
1657
  str = str.trim().replace(INVALID_BASE64_RE, "");
1751
- if (str.length < 2)
1752
- return "";
1658
+ if (str.length < 2) return "";
1753
1659
  while (str.length % 4 !== 0) {
1754
1660
  str = str + "=";
1755
1661
  }
@@ -1766,51 +1672,43 @@ var require_buffer = __commonJS({
1766
1672
  if (codePoint > 55295 && codePoint < 57344) {
1767
1673
  if (!leadSurrogate) {
1768
1674
  if (codePoint > 56319) {
1769
- if ((units -= 3) > -1)
1770
- bytes.push(239, 191, 189);
1675
+ if ((units -= 3) > -1) bytes.push(239, 191, 189);
1771
1676
  continue;
1772
1677
  } else if (i + 1 === length) {
1773
- if ((units -= 3) > -1)
1774
- bytes.push(239, 191, 189);
1678
+ if ((units -= 3) > -1) bytes.push(239, 191, 189);
1775
1679
  continue;
1776
1680
  }
1777
1681
  leadSurrogate = codePoint;
1778
1682
  continue;
1779
1683
  }
1780
1684
  if (codePoint < 56320) {
1781
- if ((units -= 3) > -1)
1782
- bytes.push(239, 191, 189);
1685
+ if ((units -= 3) > -1) bytes.push(239, 191, 189);
1783
1686
  leadSurrogate = codePoint;
1784
1687
  continue;
1785
1688
  }
1786
1689
  codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
1787
1690
  } else if (leadSurrogate) {
1788
- if ((units -= 3) > -1)
1789
- bytes.push(239, 191, 189);
1691
+ if ((units -= 3) > -1) bytes.push(239, 191, 189);
1790
1692
  }
1791
1693
  leadSurrogate = null;
1792
1694
  if (codePoint < 128) {
1793
- if ((units -= 1) < 0)
1794
- break;
1695
+ if ((units -= 1) < 0) break;
1795
1696
  bytes.push(codePoint);
1796
1697
  } else if (codePoint < 2048) {
1797
- if ((units -= 2) < 0)
1798
- break;
1698
+ if ((units -= 2) < 0) break;
1799
1699
  bytes.push(
1800
1700
  codePoint >> 6 | 192,
1801
1701
  codePoint & 63 | 128
1802
1702
  );
1803
1703
  } else if (codePoint < 65536) {
1804
- if ((units -= 3) < 0)
1805
- break;
1704
+ if ((units -= 3) < 0) break;
1806
1705
  bytes.push(
1807
1706
  codePoint >> 12 | 224,
1808
1707
  codePoint >> 6 & 63 | 128,
1809
1708
  codePoint & 63 | 128
1810
1709
  );
1811
1710
  } else if (codePoint < 1114112) {
1812
- if ((units -= 4) < 0)
1813
- break;
1711
+ if ((units -= 4) < 0) break;
1814
1712
  bytes.push(
1815
1713
  codePoint >> 18 | 240,
1816
1714
  codePoint >> 12 & 63 | 128,
@@ -1834,8 +1732,7 @@ var require_buffer = __commonJS({
1834
1732
  let c, hi, lo;
1835
1733
  const byteArray = [];
1836
1734
  for (let i = 0; i < str.length; ++i) {
1837
- if ((units -= 2) < 0)
1838
- break;
1735
+ if ((units -= 2) < 0) break;
1839
1736
  c = str.charCodeAt(i);
1840
1737
  hi = c >> 8;
1841
1738
  lo = c % 256;
@@ -1850,8 +1747,7 @@ var require_buffer = __commonJS({
1850
1747
  function blitBuffer(src, dst, offset, length) {
1851
1748
  let i;
1852
1749
  for (i = 0; i < length; ++i) {
1853
- if (i + offset >= dst.length || i >= src.length)
1854
- break;
1750
+ if (i + offset >= dst.length || i >= src.length) break;
1855
1751
  dst[i + offset] = src[i];
1856
1752
  }
1857
1753
  return i;
@@ -1898,4 +1794,4 @@ buffer/index.js:
1898
1794
  * @license MIT
1899
1795
  *)
1900
1796
  */
1901
- //# sourceMappingURL=chunk-HFGMGNFE.mjs.map
1797
+ //# sourceMappingURL=chunk-PY2IJ42L.mjs.map