@stryke/prisma-trpc-generator 0.11.12 → 0.12.1

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/dist/generator.js CHANGED
@@ -35,9 +35,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
35
35
  mod
36
36
  ));
37
37
 
38
- // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_59b77ee1c3f80f02138262a51f241204/node_modules/tsup/assets/esm_shims.js
38
+ // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@24.0.1__@swc+core@1.11.9_@swc+he_7b8a61ecf73b9cb272fb34724baab5c1/node_modules/tsup/assets/esm_shims.js
39
39
  var init_esm_shims = __esm({
40
- "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_59b77ee1c3f80f02138262a51f241204/node_modules/tsup/assets/esm_shims.js"() {
40
+ "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@24.0.1__@swc+core@1.11.9_@swc+he_7b8a61ecf73b9cb272fb34724baab5c1/node_modules/tsup/assets/esm_shims.js"() {
41
41
  "use strict";
42
42
  }
43
43
  });
@@ -673,1794 +673,81 @@ var require_pluralize = __commonJS({
673
673
  }
674
674
  });
675
675
 
676
- // ../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
677
- var require_base64_js = __commonJS({
678
- "../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js"(exports) {
679
- "use strict";
680
- init_esm_shims();
681
- exports.byteLength = byteLength;
682
- exports.toByteArray = toByteArray;
683
- exports.fromByteArray = fromByteArray;
684
- var lookup = [];
685
- var revLookup = [];
686
- var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
687
- var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
688
- for (i = 0, len = code.length; i < len; ++i) {
689
- lookup[i] = code[i];
690
- revLookup[code.charCodeAt(i)] = i;
691
- }
692
- var i;
693
- var len;
694
- revLookup["-".charCodeAt(0)] = 62;
695
- revLookup["_".charCodeAt(0)] = 63;
696
- function getLens(b64) {
697
- var len2 = b64.length;
698
- if (len2 % 4 > 0) {
699
- throw new Error("Invalid string. Length must be a multiple of 4");
700
- }
701
- var validLen = b64.indexOf("=");
702
- if (validLen === -1) validLen = len2;
703
- var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
704
- return [
705
- validLen,
706
- placeHoldersLen
707
- ];
708
- }
709
- __name(getLens, "getLens");
710
- function byteLength(b64) {
711
- var lens = getLens(b64);
712
- var validLen = lens[0];
713
- var placeHoldersLen = lens[1];
714
- return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
715
- }
716
- __name(byteLength, "byteLength");
717
- function _byteLength(b64, validLen, placeHoldersLen) {
718
- return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
719
- }
720
- __name(_byteLength, "_byteLength");
721
- function toByteArray(b64) {
722
- var tmp;
723
- var lens = getLens(b64);
724
- var validLen = lens[0];
725
- var placeHoldersLen = lens[1];
726
- var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
727
- var curByte = 0;
728
- var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
729
- var i2;
730
- for (i2 = 0; i2 < len2; i2 += 4) {
731
- tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];
732
- arr[curByte++] = tmp >> 16 & 255;
733
- arr[curByte++] = tmp >> 8 & 255;
734
- arr[curByte++] = tmp & 255;
735
- }
736
- if (placeHoldersLen === 2) {
737
- tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;
738
- arr[curByte++] = tmp & 255;
739
- }
740
- if (placeHoldersLen === 1) {
741
- tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;
742
- arr[curByte++] = tmp >> 8 & 255;
743
- arr[curByte++] = tmp & 255;
744
- }
745
- return arr;
746
- }
747
- __name(toByteArray, "toByteArray");
748
- function tripletToBase64(num) {
749
- return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
750
- }
751
- __name(tripletToBase64, "tripletToBase64");
752
- function encodeChunk(uint8, start, end) {
753
- var tmp;
754
- var output = [];
755
- for (var i2 = start; i2 < end; i2 += 3) {
756
- tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);
757
- output.push(tripletToBase64(tmp));
758
- }
759
- return output.join("");
760
- }
761
- __name(encodeChunk, "encodeChunk");
762
- function fromByteArray(uint8) {
763
- var tmp;
764
- var len2 = uint8.length;
765
- var extraBytes = len2 % 3;
766
- var parts = [];
767
- var maxChunkLength = 16383;
768
- for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {
769
- parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength));
770
- }
771
- if (extraBytes === 1) {
772
- tmp = uint8[len2 - 1];
773
- parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "==");
774
- } else if (extraBytes === 2) {
775
- tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
776
- parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "=");
777
- }
778
- return parts.join("");
779
- }
780
- __name(fromByteArray, "fromByteArray");
676
+ // ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
677
+ function isPlainObject(value) {
678
+ if (value === null || typeof value !== "object") {
679
+ return false;
781
680
  }
782
- });
783
-
784
- // ../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
785
- var require_ieee754 = __commonJS({
786
- "../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js"(exports) {
787
- "use strict";
788
- init_esm_shims();
789
- exports.read = function(buffer, offset, isLE, mLen, nBytes) {
790
- var e, m;
791
- var eLen = nBytes * 8 - mLen - 1;
792
- var eMax = (1 << eLen) - 1;
793
- var eBias = eMax >> 1;
794
- var nBits = -7;
795
- var i = isLE ? nBytes - 1 : 0;
796
- var d = isLE ? -1 : 1;
797
- var s = buffer[offset + i];
798
- i += d;
799
- e = s & (1 << -nBits) - 1;
800
- s >>= -nBits;
801
- nBits += eLen;
802
- for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {
803
- }
804
- m = e & (1 << -nBits) - 1;
805
- e >>= -nBits;
806
- nBits += mLen;
807
- for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {
808
- }
809
- if (e === 0) {
810
- e = 1 - eBias;
811
- } else if (e === eMax) {
812
- return m ? NaN : (s ? -1 : 1) * Infinity;
813
- } else {
814
- m = m + Math.pow(2, mLen);
815
- e = e - eBias;
816
- }
817
- return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
818
- };
819
- exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
820
- var e, m, c;
821
- var eLen = nBytes * 8 - mLen - 1;
822
- var eMax = (1 << eLen) - 1;
823
- var eBias = eMax >> 1;
824
- var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
825
- var i = isLE ? 0 : nBytes - 1;
826
- var d = isLE ? 1 : -1;
827
- var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
828
- value = Math.abs(value);
829
- if (isNaN(value) || value === Infinity) {
830
- m = isNaN(value) ? 1 : 0;
831
- e = eMax;
832
- } else {
833
- e = Math.floor(Math.log(value) / Math.LN2);
834
- if (value * (c = Math.pow(2, -e)) < 1) {
835
- e--;
836
- c *= 2;
837
- }
838
- if (e + eBias >= 1) {
839
- value += rt / c;
840
- } else {
841
- value += rt * Math.pow(2, 1 - eBias);
842
- }
843
- if (value * c >= 2) {
844
- e++;
845
- c /= 2;
846
- }
847
- if (e + eBias >= eMax) {
848
- m = 0;
849
- e = eMax;
850
- } else if (e + eBias >= 1) {
851
- m = (value * c - 1) * Math.pow(2, mLen);
852
- e = e + eBias;
853
- } else {
854
- m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
855
- e = 0;
856
- }
857
- }
858
- for (; mLen >= 8; buffer[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) {
859
- }
860
- e = e << mLen | m;
861
- eLen += mLen;
862
- for (; eLen > 0; buffer[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
863
- }
864
- buffer[offset + i - d] |= s * 128;
865
- };
681
+ const prototype = Object.getPrototypeOf(value);
682
+ if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
683
+ return false;
866
684
  }
867
- });
868
-
869
- // ../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
870
- var require_buffer = __commonJS({
871
- "../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js"(exports) {
872
- "use strict";
873
- init_esm_shims();
874
- var base64 = require_base64_js();
875
- var ieee754 = require_ieee754();
876
- var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
877
- exports.Buffer = Buffer3;
878
- exports.SlowBuffer = SlowBuffer;
879
- exports.INSPECT_MAX_BYTES = 50;
880
- var K_MAX_LENGTH = 2147483647;
881
- exports.kMaxLength = K_MAX_LENGTH;
882
- Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport();
883
- if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
884
- 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.");
885
- }
886
- function typedArraySupport() {
887
- try {
888
- const arr = new Uint8Array(1);
889
- const proto = {
890
- foo: /* @__PURE__ */ __name(function() {
891
- return 42;
892
- }, "foo")
893
- };
894
- Object.setPrototypeOf(proto, Uint8Array.prototype);
895
- Object.setPrototypeOf(arr, proto);
896
- return arr.foo() === 42;
897
- } catch (e) {
898
- return false;
899
- }
900
- }
901
- __name(typedArraySupport, "typedArraySupport");
902
- Object.defineProperty(Buffer3.prototype, "parent", {
903
- enumerable: true,
904
- get: /* @__PURE__ */ __name(function() {
905
- if (!Buffer3.isBuffer(this)) return void 0;
906
- return this.buffer;
907
- }, "get")
908
- });
909
- Object.defineProperty(Buffer3.prototype, "offset", {
910
- enumerable: true,
911
- get: /* @__PURE__ */ __name(function() {
912
- if (!Buffer3.isBuffer(this)) return void 0;
913
- return this.byteOffset;
914
- }, "get")
915
- });
916
- function createBuffer(length) {
917
- if (length > K_MAX_LENGTH) {
918
- throw new RangeError('The value "' + length + '" is invalid for option "size"');
919
- }
920
- const buf = new Uint8Array(length);
921
- Object.setPrototypeOf(buf, Buffer3.prototype);
922
- return buf;
923
- }
924
- __name(createBuffer, "createBuffer");
925
- function Buffer3(arg, encodingOrOffset, length) {
926
- if (typeof arg === "number") {
927
- if (typeof encodingOrOffset === "string") {
928
- throw new TypeError('The "string" argument must be of type string. Received type number');
929
- }
930
- return allocUnsafe(arg);
931
- }
932
- return from(arg, encodingOrOffset, length);
933
- }
934
- __name(Buffer3, "Buffer");
935
- Buffer3.poolSize = 8192;
936
- function from(value, encodingOrOffset, length) {
937
- if (typeof value === "string") {
938
- return fromString(value, encodingOrOffset);
939
- }
940
- if (ArrayBuffer.isView(value)) {
941
- return fromArrayView(value);
942
- }
943
- if (value == null) {
944
- throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
945
- }
946
- if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
947
- return fromArrayBuffer(value, encodingOrOffset, length);
948
- }
949
- if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
950
- return fromArrayBuffer(value, encodingOrOffset, length);
951
- }
952
- if (typeof value === "number") {
953
- throw new TypeError('The "value" argument must not be of type number. Received type number');
954
- }
955
- const valueOf = value.valueOf && value.valueOf();
956
- if (valueOf != null && valueOf !== value) {
957
- return Buffer3.from(valueOf, encodingOrOffset, length);
958
- }
959
- const b = fromObject(value);
960
- if (b) return b;
961
- if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
962
- return Buffer3.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
963
- }
964
- throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
965
- }
966
- __name(from, "from");
967
- Buffer3.from = function(value, encodingOrOffset, length) {
968
- return from(value, encodingOrOffset, length);
969
- };
970
- Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);
971
- Object.setPrototypeOf(Buffer3, Uint8Array);
972
- function assertSize(size) {
973
- if (typeof size !== "number") {
974
- throw new TypeError('"size" argument must be of type number');
975
- } else if (size < 0) {
976
- throw new RangeError('The value "' + size + '" is invalid for option "size"');
977
- }
978
- }
979
- __name(assertSize, "assertSize");
980
- function alloc(size, fill, encoding) {
981
- assertSize(size);
982
- if (size <= 0) {
983
- return createBuffer(size);
984
- }
985
- if (fill !== void 0) {
986
- return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
987
- }
988
- return createBuffer(size);
989
- }
990
- __name(alloc, "alloc");
991
- Buffer3.alloc = function(size, fill, encoding) {
992
- return alloc(size, fill, encoding);
993
- };
994
- function allocUnsafe(size) {
995
- assertSize(size);
996
- return createBuffer(size < 0 ? 0 : checked(size) | 0);
685
+ if (Symbol.iterator in value) {
686
+ return false;
687
+ }
688
+ if (Symbol.toStringTag in value) {
689
+ return Object.prototype.toString.call(value) === "[object Module]";
690
+ }
691
+ return true;
692
+ }
693
+ function _defu(baseObject, defaults, namespace = ".", merger) {
694
+ if (!isPlainObject(defaults)) {
695
+ return _defu(baseObject, {}, namespace, merger);
696
+ }
697
+ const object = Object.assign({}, defaults);
698
+ for (const key in baseObject) {
699
+ if (key === "__proto__" || key === "constructor") {
700
+ continue;
997
701
  }
998
- __name(allocUnsafe, "allocUnsafe");
999
- Buffer3.allocUnsafe = function(size) {
1000
- return allocUnsafe(size);
1001
- };
1002
- Buffer3.allocUnsafeSlow = function(size) {
1003
- return allocUnsafe(size);
1004
- };
1005
- function fromString(string, encoding) {
1006
- if (typeof encoding !== "string" || encoding === "") {
1007
- encoding = "utf8";
1008
- }
1009
- if (!Buffer3.isEncoding(encoding)) {
1010
- throw new TypeError("Unknown encoding: " + encoding);
1011
- }
1012
- const length = byteLength(string, encoding) | 0;
1013
- let buf = createBuffer(length);
1014
- const actual = buf.write(string, encoding);
1015
- if (actual !== length) {
1016
- buf = buf.slice(0, actual);
1017
- }
1018
- return buf;
1019
- }
1020
- __name(fromString, "fromString");
1021
- function fromArrayLike(array) {
1022
- const length = array.length < 0 ? 0 : checked(array.length) | 0;
1023
- const buf = createBuffer(length);
1024
- for (let i = 0; i < length; i += 1) {
1025
- buf[i] = array[i] & 255;
1026
- }
1027
- return buf;
1028
- }
1029
- __name(fromArrayLike, "fromArrayLike");
1030
- function fromArrayView(arrayView) {
1031
- if (isInstance(arrayView, Uint8Array)) {
1032
- const copy2 = new Uint8Array(arrayView);
1033
- return fromArrayBuffer(copy2.buffer, copy2.byteOffset, copy2.byteLength);
1034
- }
1035
- return fromArrayLike(arrayView);
1036
- }
1037
- __name(fromArrayView, "fromArrayView");
1038
- function fromArrayBuffer(array, byteOffset, length) {
1039
- if (byteOffset < 0 || array.byteLength < byteOffset) {
1040
- throw new RangeError('"offset" is outside of buffer bounds');
1041
- }
1042
- if (array.byteLength < byteOffset + (length || 0)) {
1043
- throw new RangeError('"length" is outside of buffer bounds');
1044
- }
1045
- let buf;
1046
- if (byteOffset === void 0 && length === void 0) {
1047
- buf = new Uint8Array(array);
1048
- } else if (length === void 0) {
1049
- buf = new Uint8Array(array, byteOffset);
1050
- } else {
1051
- buf = new Uint8Array(array, byteOffset, length);
1052
- }
1053
- Object.setPrototypeOf(buf, Buffer3.prototype);
1054
- return buf;
1055
- }
1056
- __name(fromArrayBuffer, "fromArrayBuffer");
1057
- function fromObject(obj) {
1058
- if (Buffer3.isBuffer(obj)) {
1059
- const len = checked(obj.length) | 0;
1060
- const buf = createBuffer(len);
1061
- if (buf.length === 0) {
1062
- return buf;
1063
- }
1064
- obj.copy(buf, 0, 0, len);
1065
- return buf;
1066
- }
1067
- if (obj.length !== void 0) {
1068
- if (typeof obj.length !== "number" || numberIsNaN(obj.length)) {
1069
- return createBuffer(0);
1070
- }
1071
- return fromArrayLike(obj);
1072
- }
1073
- if (obj.type === "Buffer" && Array.isArray(obj.data)) {
1074
- return fromArrayLike(obj.data);
1075
- }
1076
- }
1077
- __name(fromObject, "fromObject");
1078
- function checked(length) {
1079
- if (length >= K_MAX_LENGTH) {
1080
- throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes");
1081
- }
1082
- return length | 0;
1083
- }
1084
- __name(checked, "checked");
1085
- function SlowBuffer(length) {
1086
- if (+length != length) {
1087
- length = 0;
1088
- }
1089
- return Buffer3.alloc(+length);
1090
- }
1091
- __name(SlowBuffer, "SlowBuffer");
1092
- Buffer3.isBuffer = /* @__PURE__ */ __name(function isBuffer(b) {
1093
- return b != null && b._isBuffer === true && b !== Buffer3.prototype;
1094
- }, "isBuffer");
1095
- Buffer3.compare = /* @__PURE__ */ __name(function compare(a, b) {
1096
- if (isInstance(a, Uint8Array)) a = Buffer3.from(a, a.offset, a.byteLength);
1097
- if (isInstance(b, Uint8Array)) b = Buffer3.from(b, b.offset, b.byteLength);
1098
- if (!Buffer3.isBuffer(a) || !Buffer3.isBuffer(b)) {
1099
- throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
1100
- }
1101
- if (a === b) return 0;
1102
- let x = a.length;
1103
- let y = b.length;
1104
- for (let i = 0, len = Math.min(x, y); i < len; ++i) {
1105
- if (a[i] !== b[i]) {
1106
- x = a[i];
1107
- y = b[i];
1108
- break;
1109
- }
1110
- }
1111
- if (x < y) return -1;
1112
- if (y < x) return 1;
1113
- return 0;
1114
- }, "compare");
1115
- Buffer3.isEncoding = /* @__PURE__ */ __name(function isEncoding(encoding) {
1116
- switch (String(encoding).toLowerCase()) {
1117
- case "hex":
1118
- case "utf8":
1119
- case "utf-8":
1120
- case "ascii":
1121
- case "latin1":
1122
- case "binary":
1123
- case "base64":
1124
- case "ucs2":
1125
- case "ucs-2":
1126
- case "utf16le":
1127
- case "utf-16le":
1128
- return true;
1129
- default:
1130
- return false;
1131
- }
1132
- }, "isEncoding");
1133
- Buffer3.concat = /* @__PURE__ */ __name(function concat(list, length) {
1134
- if (!Array.isArray(list)) {
1135
- throw new TypeError('"list" argument must be an Array of Buffers');
1136
- }
1137
- if (list.length === 0) {
1138
- return Buffer3.alloc(0);
1139
- }
1140
- let i;
1141
- if (length === void 0) {
1142
- length = 0;
1143
- for (i = 0; i < list.length; ++i) {
1144
- length += list[i].length;
1145
- }
1146
- }
1147
- const buffer = Buffer3.allocUnsafe(length);
1148
- let pos = 0;
1149
- for (i = 0; i < list.length; ++i) {
1150
- let buf = list[i];
1151
- if (isInstance(buf, Uint8Array)) {
1152
- if (pos + buf.length > buffer.length) {
1153
- if (!Buffer3.isBuffer(buf)) buf = Buffer3.from(buf);
1154
- buf.copy(buffer, pos);
1155
- } else {
1156
- Uint8Array.prototype.set.call(buffer, buf, pos);
1157
- }
1158
- } else if (!Buffer3.isBuffer(buf)) {
1159
- throw new TypeError('"list" argument must be an Array of Buffers');
1160
- } else {
1161
- buf.copy(buffer, pos);
1162
- }
1163
- pos += buf.length;
1164
- }
1165
- return buffer;
1166
- }, "concat");
1167
- function byteLength(string, encoding) {
1168
- if (Buffer3.isBuffer(string)) {
1169
- return string.length;
1170
- }
1171
- if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
1172
- return string.byteLength;
1173
- }
1174
- if (typeof string !== "string") {
1175
- throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);
1176
- }
1177
- const len = string.length;
1178
- const mustMatch = arguments.length > 2 && arguments[2] === true;
1179
- if (!mustMatch && len === 0) return 0;
1180
- let loweredCase = false;
1181
- for (; ; ) {
1182
- switch (encoding) {
1183
- case "ascii":
1184
- case "latin1":
1185
- case "binary":
1186
- return len;
1187
- case "utf8":
1188
- case "utf-8":
1189
- return utf8ToBytes(string).length;
1190
- case "ucs2":
1191
- case "ucs-2":
1192
- case "utf16le":
1193
- case "utf-16le":
1194
- return len * 2;
1195
- case "hex":
1196
- return len >>> 1;
1197
- case "base64":
1198
- return base64ToBytes(string).length;
1199
- default:
1200
- if (loweredCase) {
1201
- return mustMatch ? -1 : utf8ToBytes(string).length;
1202
- }
1203
- encoding = ("" + encoding).toLowerCase();
1204
- loweredCase = true;
1205
- }
1206
- }
702
+ const value = baseObject[key];
703
+ if (value === null || value === void 0) {
704
+ continue;
1207
705
  }
1208
- __name(byteLength, "byteLength");
1209
- Buffer3.byteLength = byteLength;
1210
- function slowToString(encoding, start, end) {
1211
- let loweredCase = false;
1212
- if (start === void 0 || start < 0) {
1213
- start = 0;
1214
- }
1215
- if (start > this.length) {
1216
- return "";
1217
- }
1218
- if (end === void 0 || end > this.length) {
1219
- end = this.length;
1220
- }
1221
- if (end <= 0) {
1222
- return "";
1223
- }
1224
- end >>>= 0;
1225
- start >>>= 0;
1226
- if (end <= start) {
1227
- return "";
1228
- }
1229
- if (!encoding) encoding = "utf8";
1230
- while (true) {
1231
- switch (encoding) {
1232
- case "hex":
1233
- return hexSlice(this, start, end);
1234
- case "utf8":
1235
- case "utf-8":
1236
- return utf8Slice(this, start, end);
1237
- case "ascii":
1238
- return asciiSlice(this, start, end);
1239
- case "latin1":
1240
- case "binary":
1241
- return latin1Slice(this, start, end);
1242
- case "base64":
1243
- return base64Slice(this, start, end);
1244
- case "ucs2":
1245
- case "ucs-2":
1246
- case "utf16le":
1247
- case "utf-16le":
1248
- return utf16leSlice(this, start, end);
1249
- default:
1250
- if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
1251
- encoding = (encoding + "").toLowerCase();
1252
- loweredCase = true;
1253
- }
1254
- }
706
+ if (merger && merger(object, key, value, namespace)) {
707
+ continue;
1255
708
  }
1256
- __name(slowToString, "slowToString");
1257
- Buffer3.prototype._isBuffer = true;
1258
- function swap(b, n, m) {
1259
- const i = b[n];
1260
- b[n] = b[m];
1261
- b[m] = i;
1262
- }
1263
- __name(swap, "swap");
1264
- Buffer3.prototype.swap16 = /* @__PURE__ */ __name(function swap16() {
1265
- const len = this.length;
1266
- if (len % 2 !== 0) {
1267
- throw new RangeError("Buffer size must be a multiple of 16-bits");
1268
- }
1269
- for (let i = 0; i < len; i += 2) {
1270
- swap(this, i, i + 1);
1271
- }
1272
- return this;
1273
- }, "swap16");
1274
- Buffer3.prototype.swap32 = /* @__PURE__ */ __name(function swap32() {
1275
- const len = this.length;
1276
- if (len % 4 !== 0) {
1277
- throw new RangeError("Buffer size must be a multiple of 32-bits");
1278
- }
1279
- for (let i = 0; i < len; i += 4) {
1280
- swap(this, i, i + 3);
1281
- swap(this, i + 1, i + 2);
1282
- }
1283
- return this;
1284
- }, "swap32");
1285
- Buffer3.prototype.swap64 = /* @__PURE__ */ __name(function swap64() {
1286
- const len = this.length;
1287
- if (len % 8 !== 0) {
1288
- throw new RangeError("Buffer size must be a multiple of 64-bits");
1289
- }
1290
- for (let i = 0; i < len; i += 8) {
1291
- swap(this, i, i + 7);
1292
- swap(this, i + 1, i + 6);
1293
- swap(this, i + 2, i + 5);
1294
- swap(this, i + 3, i + 4);
1295
- }
1296
- return this;
1297
- }, "swap64");
1298
- Buffer3.prototype.toString = /* @__PURE__ */ __name(function toString() {
1299
- const length = this.length;
1300
- if (length === 0) return "";
1301
- if (arguments.length === 0) return utf8Slice(this, 0, length);
1302
- return slowToString.apply(this, arguments);
1303
- }, "toString");
1304
- Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;
1305
- Buffer3.prototype.equals = /* @__PURE__ */ __name(function equals(b) {
1306
- if (!Buffer3.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
1307
- if (this === b) return true;
1308
- return Buffer3.compare(this, b) === 0;
1309
- }, "equals");
1310
- Buffer3.prototype.inspect = /* @__PURE__ */ __name(function inspect() {
1311
- let str = "";
1312
- const max = exports.INSPECT_MAX_BYTES;
1313
- str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
1314
- if (this.length > max) str += " ... ";
1315
- return "<Buffer " + str + ">";
1316
- }, "inspect");
1317
- if (customInspectSymbol) {
1318
- Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;
1319
- }
1320
- Buffer3.prototype.compare = /* @__PURE__ */ __name(function compare(target, start, end, thisStart, thisEnd) {
1321
- if (isInstance(target, Uint8Array)) {
1322
- target = Buffer3.from(target, target.offset, target.byteLength);
1323
- }
1324
- if (!Buffer3.isBuffer(target)) {
1325
- throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);
1326
- }
1327
- if (start === void 0) {
1328
- start = 0;
1329
- }
1330
- if (end === void 0) {
1331
- end = target ? target.length : 0;
1332
- }
1333
- if (thisStart === void 0) {
1334
- thisStart = 0;
1335
- }
1336
- if (thisEnd === void 0) {
1337
- thisEnd = this.length;
1338
- }
1339
- if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
1340
- throw new RangeError("out of range index");
1341
- }
1342
- if (thisStart >= thisEnd && start >= end) {
1343
- return 0;
1344
- }
1345
- if (thisStart >= thisEnd) {
1346
- return -1;
1347
- }
1348
- if (start >= end) {
1349
- return 1;
1350
- }
1351
- start >>>= 0;
1352
- end >>>= 0;
1353
- thisStart >>>= 0;
1354
- thisEnd >>>= 0;
1355
- if (this === target) return 0;
1356
- let x = thisEnd - thisStart;
1357
- let y = end - start;
1358
- const len = Math.min(x, y);
1359
- const thisCopy = this.slice(thisStart, thisEnd);
1360
- const targetCopy = target.slice(start, end);
1361
- for (let i = 0; i < len; ++i) {
1362
- if (thisCopy[i] !== targetCopy[i]) {
1363
- x = thisCopy[i];
1364
- y = targetCopy[i];
1365
- break;
1366
- }
1367
- }
1368
- if (x < y) return -1;
1369
- if (y < x) return 1;
1370
- return 0;
1371
- }, "compare");
1372
- function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
1373
- if (buffer.length === 0) return -1;
1374
- if (typeof byteOffset === "string") {
1375
- encoding = byteOffset;
1376
- byteOffset = 0;
1377
- } else if (byteOffset > 2147483647) {
1378
- byteOffset = 2147483647;
1379
- } else if (byteOffset < -2147483648) {
1380
- byteOffset = -2147483648;
1381
- }
1382
- byteOffset = +byteOffset;
1383
- if (numberIsNaN(byteOffset)) {
1384
- byteOffset = dir ? 0 : buffer.length - 1;
1385
- }
1386
- if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
1387
- if (byteOffset >= buffer.length) {
1388
- if (dir) return -1;
1389
- else byteOffset = buffer.length - 1;
1390
- } else if (byteOffset < 0) {
1391
- if (dir) byteOffset = 0;
1392
- else return -1;
1393
- }
1394
- if (typeof val === "string") {
1395
- val = Buffer3.from(val, encoding);
1396
- }
1397
- if (Buffer3.isBuffer(val)) {
1398
- if (val.length === 0) {
1399
- return -1;
1400
- }
1401
- return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
1402
- } else if (typeof val === "number") {
1403
- val = val & 255;
1404
- if (typeof Uint8Array.prototype.indexOf === "function") {
1405
- if (dir) {
1406
- return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
1407
- } else {
1408
- return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
1409
- }
1410
- }
1411
- return arrayIndexOf(buffer, [
1412
- val
1413
- ], byteOffset, encoding, dir);
1414
- }
1415
- throw new TypeError("val must be string, number or Buffer");
1416
- }
1417
- __name(bidirectionalIndexOf, "bidirectionalIndexOf");
1418
- function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
1419
- let indexSize = 1;
1420
- let arrLength = arr.length;
1421
- let valLength = val.length;
1422
- if (encoding !== void 0) {
1423
- encoding = String(encoding).toLowerCase();
1424
- if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") {
1425
- if (arr.length < 2 || val.length < 2) {
1426
- return -1;
1427
- }
1428
- indexSize = 2;
1429
- arrLength /= 2;
1430
- valLength /= 2;
1431
- byteOffset /= 2;
1432
- }
1433
- }
1434
- function read(buf, i2) {
1435
- if (indexSize === 1) {
1436
- return buf[i2];
1437
- } else {
1438
- return buf.readUInt16BE(i2 * indexSize);
1439
- }
1440
- }
1441
- __name(read, "read");
1442
- let i;
1443
- if (dir) {
1444
- let foundIndex = -1;
1445
- for (i = byteOffset; i < arrLength; i++) {
1446
- if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
1447
- if (foundIndex === -1) foundIndex = i;
1448
- if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
1449
- } else {
1450
- if (foundIndex !== -1) i -= i - foundIndex;
1451
- foundIndex = -1;
1452
- }
1453
- }
1454
- } else {
1455
- if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
1456
- for (i = byteOffset; i >= 0; i--) {
1457
- let found = true;
1458
- for (let j = 0; j < valLength; j++) {
1459
- if (read(arr, i + j) !== read(val, j)) {
1460
- found = false;
1461
- break;
1462
- }
1463
- }
1464
- if (found) return i;
1465
- }
1466
- }
1467
- return -1;
1468
- }
1469
- __name(arrayIndexOf, "arrayIndexOf");
1470
- Buffer3.prototype.includes = /* @__PURE__ */ __name(function includes2(val, byteOffset, encoding) {
1471
- return this.indexOf(val, byteOffset, encoding) !== -1;
1472
- }, "includes");
1473
- Buffer3.prototype.indexOf = /* @__PURE__ */ __name(function indexOf(val, byteOffset, encoding) {
1474
- return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
1475
- }, "indexOf");
1476
- Buffer3.prototype.lastIndexOf = /* @__PURE__ */ __name(function lastIndexOf(val, byteOffset, encoding) {
1477
- return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
1478
- }, "lastIndexOf");
1479
- function hexWrite(buf, string, offset, length) {
1480
- offset = Number(offset) || 0;
1481
- const remaining = buf.length - offset;
1482
- if (!length) {
1483
- length = remaining;
1484
- } else {
1485
- length = Number(length);
1486
- if (length > remaining) {
1487
- length = remaining;
1488
- }
1489
- }
1490
- const strLen = string.length;
1491
- if (length > strLen / 2) {
1492
- length = strLen / 2;
1493
- }
1494
- let i;
1495
- for (i = 0; i < length; ++i) {
1496
- const parsed = parseInt(string.substr(i * 2, 2), 16);
1497
- if (numberIsNaN(parsed)) return i;
1498
- buf[offset + i] = parsed;
1499
- }
1500
- return i;
1501
- }
1502
- __name(hexWrite, "hexWrite");
1503
- function utf8Write(buf, string, offset, length) {
1504
- return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
1505
- }
1506
- __name(utf8Write, "utf8Write");
1507
- function asciiWrite(buf, string, offset, length) {
1508
- return blitBuffer(asciiToBytes(string), buf, offset, length);
1509
- }
1510
- __name(asciiWrite, "asciiWrite");
1511
- function base64Write(buf, string, offset, length) {
1512
- return blitBuffer(base64ToBytes(string), buf, offset, length);
1513
- }
1514
- __name(base64Write, "base64Write");
1515
- function ucs2Write(buf, string, offset, length) {
1516
- return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
1517
- }
1518
- __name(ucs2Write, "ucs2Write");
1519
- Buffer3.prototype.write = /* @__PURE__ */ __name(function write(string, offset, length, encoding) {
1520
- if (offset === void 0) {
1521
- encoding = "utf8";
1522
- length = this.length;
1523
- offset = 0;
1524
- } else if (length === void 0 && typeof offset === "string") {
1525
- encoding = offset;
1526
- length = this.length;
1527
- offset = 0;
1528
- } else if (isFinite(offset)) {
1529
- offset = offset >>> 0;
1530
- if (isFinite(length)) {
1531
- length = length >>> 0;
1532
- if (encoding === void 0) encoding = "utf8";
1533
- } else {
1534
- encoding = length;
1535
- length = void 0;
1536
- }
1537
- } else {
1538
- throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
1539
- }
1540
- const remaining = this.length - offset;
1541
- if (length === void 0 || length > remaining) length = remaining;
1542
- if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
1543
- throw new RangeError("Attempt to write outside buffer bounds");
1544
- }
1545
- if (!encoding) encoding = "utf8";
1546
- let loweredCase = false;
1547
- for (; ; ) {
1548
- switch (encoding) {
1549
- case "hex":
1550
- return hexWrite(this, string, offset, length);
1551
- case "utf8":
1552
- case "utf-8":
1553
- return utf8Write(this, string, offset, length);
1554
- case "ascii":
1555
- case "latin1":
1556
- case "binary":
1557
- return asciiWrite(this, string, offset, length);
1558
- case "base64":
1559
- return base64Write(this, string, offset, length);
1560
- case "ucs2":
1561
- case "ucs-2":
1562
- case "utf16le":
1563
- case "utf-16le":
1564
- return ucs2Write(this, string, offset, length);
1565
- default:
1566
- if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
1567
- encoding = ("" + encoding).toLowerCase();
1568
- loweredCase = true;
1569
- }
1570
- }
1571
- }, "write");
1572
- Buffer3.prototype.toJSON = /* @__PURE__ */ __name(function toJSON() {
1573
- return {
1574
- type: "Buffer",
1575
- data: Array.prototype.slice.call(this._arr || this, 0)
1576
- };
1577
- }, "toJSON");
1578
- function base64Slice(buf, start, end) {
1579
- if (start === 0 && end === buf.length) {
1580
- return base64.fromByteArray(buf);
1581
- } else {
1582
- return base64.fromByteArray(buf.slice(start, end));
1583
- }
1584
- }
1585
- __name(base64Slice, "base64Slice");
1586
- function utf8Slice(buf, start, end) {
1587
- end = Math.min(buf.length, end);
1588
- const res = [];
1589
- let i = start;
1590
- while (i < end) {
1591
- const firstByte = buf[i];
1592
- let codePoint = null;
1593
- let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
1594
- if (i + bytesPerSequence <= end) {
1595
- let secondByte, thirdByte, fourthByte, tempCodePoint;
1596
- switch (bytesPerSequence) {
1597
- case 1:
1598
- if (firstByte < 128) {
1599
- codePoint = firstByte;
1600
- }
1601
- break;
1602
- case 2:
1603
- secondByte = buf[i + 1];
1604
- if ((secondByte & 192) === 128) {
1605
- tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
1606
- if (tempCodePoint > 127) {
1607
- codePoint = tempCodePoint;
1608
- }
1609
- }
1610
- break;
1611
- case 3:
1612
- secondByte = buf[i + 1];
1613
- thirdByte = buf[i + 2];
1614
- if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
1615
- tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
1616
- if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
1617
- codePoint = tempCodePoint;
1618
- }
1619
- }
1620
- break;
1621
- case 4:
1622
- secondByte = buf[i + 1];
1623
- thirdByte = buf[i + 2];
1624
- fourthByte = buf[i + 3];
1625
- if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
1626
- tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
1627
- if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
1628
- codePoint = tempCodePoint;
1629
- }
1630
- }
1631
- }
1632
- }
1633
- if (codePoint === null) {
1634
- codePoint = 65533;
1635
- bytesPerSequence = 1;
1636
- } else if (codePoint > 65535) {
1637
- codePoint -= 65536;
1638
- res.push(codePoint >>> 10 & 1023 | 55296);
1639
- codePoint = 56320 | codePoint & 1023;
1640
- }
1641
- res.push(codePoint);
1642
- i += bytesPerSequence;
1643
- }
1644
- return decodeCodePointsArray(res);
1645
- }
1646
- __name(utf8Slice, "utf8Slice");
1647
- var MAX_ARGUMENTS_LENGTH = 4096;
1648
- function decodeCodePointsArray(codePoints) {
1649
- const len = codePoints.length;
1650
- if (len <= MAX_ARGUMENTS_LENGTH) {
1651
- return String.fromCharCode.apply(String, codePoints);
1652
- }
1653
- let res = "";
1654
- let i = 0;
1655
- while (i < len) {
1656
- res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
1657
- }
1658
- return res;
1659
- }
1660
- __name(decodeCodePointsArray, "decodeCodePointsArray");
1661
- function asciiSlice(buf, start, end) {
1662
- let ret = "";
1663
- end = Math.min(buf.length, end);
1664
- for (let i = start; i < end; ++i) {
1665
- ret += String.fromCharCode(buf[i] & 127);
1666
- }
1667
- return ret;
1668
- }
1669
- __name(asciiSlice, "asciiSlice");
1670
- function latin1Slice(buf, start, end) {
1671
- let ret = "";
1672
- end = Math.min(buf.length, end);
1673
- for (let i = start; i < end; ++i) {
1674
- ret += String.fromCharCode(buf[i]);
1675
- }
1676
- return ret;
1677
- }
1678
- __name(latin1Slice, "latin1Slice");
1679
- function hexSlice(buf, start, end) {
1680
- const len = buf.length;
1681
- if (!start || start < 0) start = 0;
1682
- if (!end || end < 0 || end > len) end = len;
1683
- let out = "";
1684
- for (let i = start; i < end; ++i) {
1685
- out += hexSliceLookupTable[buf[i]];
1686
- }
1687
- return out;
1688
- }
1689
- __name(hexSlice, "hexSlice");
1690
- function utf16leSlice(buf, start, end) {
1691
- const bytes = buf.slice(start, end);
1692
- let res = "";
1693
- for (let i = 0; i < bytes.length - 1; i += 2) {
1694
- res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
1695
- }
1696
- return res;
1697
- }
1698
- __name(utf16leSlice, "utf16leSlice");
1699
- Buffer3.prototype.slice = /* @__PURE__ */ __name(function slice(start, end) {
1700
- const len = this.length;
1701
- start = ~~start;
1702
- end = end === void 0 ? len : ~~end;
1703
- if (start < 0) {
1704
- start += len;
1705
- if (start < 0) start = 0;
1706
- } else if (start > len) {
1707
- start = len;
1708
- }
1709
- if (end < 0) {
1710
- end += len;
1711
- if (end < 0) end = 0;
1712
- } else if (end > len) {
1713
- end = len;
1714
- }
1715
- if (end < start) end = start;
1716
- const newBuf = this.subarray(start, end);
1717
- Object.setPrototypeOf(newBuf, Buffer3.prototype);
1718
- return newBuf;
1719
- }, "slice");
1720
- function checkOffset(offset, ext, length) {
1721
- if (offset % 1 !== 0 || offset < 0) throw new RangeError("offset is not uint");
1722
- if (offset + ext > length) throw new RangeError("Trying to access beyond buffer length");
1723
- }
1724
- __name(checkOffset, "checkOffset");
1725
- Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = /* @__PURE__ */ __name(function readUIntLE(offset, byteLength2, noAssert) {
1726
- offset = offset >>> 0;
1727
- byteLength2 = byteLength2 >>> 0;
1728
- if (!noAssert) checkOffset(offset, byteLength2, this.length);
1729
- let val = this[offset];
1730
- let mul = 1;
1731
- let i = 0;
1732
- while (++i < byteLength2 && (mul *= 256)) {
1733
- val += this[offset + i] * mul;
1734
- }
1735
- return val;
1736
- }, "readUIntLE");
1737
- Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = /* @__PURE__ */ __name(function readUIntBE(offset, byteLength2, noAssert) {
1738
- offset = offset >>> 0;
1739
- byteLength2 = byteLength2 >>> 0;
1740
- if (!noAssert) {
1741
- checkOffset(offset, byteLength2, this.length);
1742
- }
1743
- let val = this[offset + --byteLength2];
1744
- let mul = 1;
1745
- while (byteLength2 > 0 && (mul *= 256)) {
1746
- val += this[offset + --byteLength2] * mul;
1747
- }
1748
- return val;
1749
- }, "readUIntBE");
1750
- Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = /* @__PURE__ */ __name(function readUInt8(offset, noAssert) {
1751
- offset = offset >>> 0;
1752
- if (!noAssert) checkOffset(offset, 1, this.length);
1753
- return this[offset];
1754
- }, "readUInt8");
1755
- Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = /* @__PURE__ */ __name(function readUInt16LE(offset, noAssert) {
1756
- offset = offset >>> 0;
1757
- if (!noAssert) checkOffset(offset, 2, this.length);
1758
- return this[offset] | this[offset + 1] << 8;
1759
- }, "readUInt16LE");
1760
- Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = /* @__PURE__ */ __name(function readUInt16BE(offset, noAssert) {
1761
- offset = offset >>> 0;
1762
- if (!noAssert) checkOffset(offset, 2, this.length);
1763
- return this[offset] << 8 | this[offset + 1];
1764
- }, "readUInt16BE");
1765
- Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = /* @__PURE__ */ __name(function readUInt32LE(offset, noAssert) {
1766
- offset = offset >>> 0;
1767
- if (!noAssert) checkOffset(offset, 4, this.length);
1768
- return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
1769
- }, "readUInt32LE");
1770
- Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = /* @__PURE__ */ __name(function readUInt32BE(offset, noAssert) {
1771
- offset = offset >>> 0;
1772
- if (!noAssert) checkOffset(offset, 4, this.length);
1773
- return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
1774
- }, "readUInt32BE");
1775
- Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(/* @__PURE__ */ __name(function readBigUInt64LE(offset) {
1776
- offset = offset >>> 0;
1777
- validateNumber(offset, "offset");
1778
- const first = this[offset];
1779
- const last = this[offset + 7];
1780
- if (first === void 0 || last === void 0) {
1781
- boundsError(offset, this.length - 8);
1782
- }
1783
- const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;
1784
- const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;
1785
- return BigInt(lo) + (BigInt(hi) << BigInt(32));
1786
- }, "readBigUInt64LE"));
1787
- Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(/* @__PURE__ */ __name(function readBigUInt64BE(offset) {
1788
- offset = offset >>> 0;
1789
- validateNumber(offset, "offset");
1790
- const first = this[offset];
1791
- const last = this[offset + 7];
1792
- if (first === void 0 || last === void 0) {
1793
- boundsError(offset, this.length - 8);
1794
- }
1795
- const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
1796
- const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
1797
- return (BigInt(hi) << BigInt(32)) + BigInt(lo);
1798
- }, "readBigUInt64BE"));
1799
- Buffer3.prototype.readIntLE = /* @__PURE__ */ __name(function readIntLE(offset, byteLength2, noAssert) {
1800
- offset = offset >>> 0;
1801
- byteLength2 = byteLength2 >>> 0;
1802
- if (!noAssert) checkOffset(offset, byteLength2, this.length);
1803
- let val = this[offset];
1804
- let mul = 1;
1805
- let i = 0;
1806
- while (++i < byteLength2 && (mul *= 256)) {
1807
- val += this[offset + i] * mul;
1808
- }
1809
- mul *= 128;
1810
- if (val >= mul) val -= Math.pow(2, 8 * byteLength2);
1811
- return val;
1812
- }, "readIntLE");
1813
- Buffer3.prototype.readIntBE = /* @__PURE__ */ __name(function readIntBE(offset, byteLength2, noAssert) {
1814
- offset = offset >>> 0;
1815
- byteLength2 = byteLength2 >>> 0;
1816
- if (!noAssert) checkOffset(offset, byteLength2, this.length);
1817
- let i = byteLength2;
1818
- let mul = 1;
1819
- let val = this[offset + --i];
1820
- while (i > 0 && (mul *= 256)) {
1821
- val += this[offset + --i] * mul;
1822
- }
1823
- mul *= 128;
1824
- if (val >= mul) val -= Math.pow(2, 8 * byteLength2);
1825
- return val;
1826
- }, "readIntBE");
1827
- Buffer3.prototype.readInt8 = /* @__PURE__ */ __name(function readInt8(offset, noAssert) {
1828
- offset = offset >>> 0;
1829
- if (!noAssert) checkOffset(offset, 1, this.length);
1830
- if (!(this[offset] & 128)) return this[offset];
1831
- return (255 - this[offset] + 1) * -1;
1832
- }, "readInt8");
1833
- Buffer3.prototype.readInt16LE = /* @__PURE__ */ __name(function readInt16LE(offset, noAssert) {
1834
- offset = offset >>> 0;
1835
- if (!noAssert) checkOffset(offset, 2, this.length);
1836
- const val = this[offset] | this[offset + 1] << 8;
1837
- return val & 32768 ? val | 4294901760 : val;
1838
- }, "readInt16LE");
1839
- Buffer3.prototype.readInt16BE = /* @__PURE__ */ __name(function readInt16BE(offset, noAssert) {
1840
- offset = offset >>> 0;
1841
- if (!noAssert) checkOffset(offset, 2, this.length);
1842
- const val = this[offset + 1] | this[offset] << 8;
1843
- return val & 32768 ? val | 4294901760 : val;
1844
- }, "readInt16BE");
1845
- Buffer3.prototype.readInt32LE = /* @__PURE__ */ __name(function readInt32LE(offset, noAssert) {
1846
- offset = offset >>> 0;
1847
- if (!noAssert) checkOffset(offset, 4, this.length);
1848
- return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
1849
- }, "readInt32LE");
1850
- Buffer3.prototype.readInt32BE = /* @__PURE__ */ __name(function readInt32BE(offset, noAssert) {
1851
- offset = offset >>> 0;
1852
- if (!noAssert) checkOffset(offset, 4, this.length);
1853
- return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
1854
- }, "readInt32BE");
1855
- Buffer3.prototype.readBigInt64LE = defineBigIntMethod(/* @__PURE__ */ __name(function readBigInt64LE(offset) {
1856
- offset = offset >>> 0;
1857
- validateNumber(offset, "offset");
1858
- const first = this[offset];
1859
- const last = this[offset + 7];
1860
- if (first === void 0 || last === void 0) {
1861
- boundsError(offset, this.length - 8);
1862
- }
1863
- const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);
1864
- return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);
1865
- }, "readBigInt64LE"));
1866
- Buffer3.prototype.readBigInt64BE = defineBigIntMethod(/* @__PURE__ */ __name(function readBigInt64BE(offset) {
1867
- offset = offset >>> 0;
1868
- validateNumber(offset, "offset");
1869
- const first = this[offset];
1870
- const last = this[offset + 7];
1871
- if (first === void 0 || last === void 0) {
1872
- boundsError(offset, this.length - 8);
1873
- }
1874
- const val = (first << 24) + // Overflow
1875
- this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
1876
- return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);
1877
- }, "readBigInt64BE"));
1878
- Buffer3.prototype.readFloatLE = /* @__PURE__ */ __name(function readFloatLE(offset, noAssert) {
1879
- offset = offset >>> 0;
1880
- if (!noAssert) checkOffset(offset, 4, this.length);
1881
- return ieee754.read(this, offset, true, 23, 4);
1882
- }, "readFloatLE");
1883
- Buffer3.prototype.readFloatBE = /* @__PURE__ */ __name(function readFloatBE(offset, noAssert) {
1884
- offset = offset >>> 0;
1885
- if (!noAssert) checkOffset(offset, 4, this.length);
1886
- return ieee754.read(this, offset, false, 23, 4);
1887
- }, "readFloatBE");
1888
- Buffer3.prototype.readDoubleLE = /* @__PURE__ */ __name(function readDoubleLE(offset, noAssert) {
1889
- offset = offset >>> 0;
1890
- if (!noAssert) checkOffset(offset, 8, this.length);
1891
- return ieee754.read(this, offset, true, 52, 8);
1892
- }, "readDoubleLE");
1893
- Buffer3.prototype.readDoubleBE = /* @__PURE__ */ __name(function readDoubleBE(offset, noAssert) {
1894
- offset = offset >>> 0;
1895
- if (!noAssert) checkOffset(offset, 8, this.length);
1896
- return ieee754.read(this, offset, false, 52, 8);
1897
- }, "readDoubleBE");
1898
- function checkInt(buf, value, offset, ext, max, min) {
1899
- if (!Buffer3.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
1900
- if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
1901
- if (offset + ext > buf.length) throw new RangeError("Index out of range");
1902
- }
1903
- __name(checkInt, "checkInt");
1904
- Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = /* @__PURE__ */ __name(function writeUIntLE(value, offset, byteLength2, noAssert) {
1905
- value = +value;
1906
- offset = offset >>> 0;
1907
- byteLength2 = byteLength2 >>> 0;
1908
- if (!noAssert) {
1909
- const maxBytes = Math.pow(2, 8 * byteLength2) - 1;
1910
- checkInt(this, value, offset, byteLength2, maxBytes, 0);
1911
- }
1912
- let mul = 1;
1913
- let i = 0;
1914
- this[offset] = value & 255;
1915
- while (++i < byteLength2 && (mul *= 256)) {
1916
- this[offset + i] = value / mul & 255;
1917
- }
1918
- return offset + byteLength2;
1919
- }, "writeUIntLE");
1920
- Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = /* @__PURE__ */ __name(function writeUIntBE(value, offset, byteLength2, noAssert) {
1921
- value = +value;
1922
- offset = offset >>> 0;
1923
- byteLength2 = byteLength2 >>> 0;
1924
- if (!noAssert) {
1925
- const maxBytes = Math.pow(2, 8 * byteLength2) - 1;
1926
- checkInt(this, value, offset, byteLength2, maxBytes, 0);
1927
- }
1928
- let i = byteLength2 - 1;
1929
- let mul = 1;
1930
- this[offset + i] = value & 255;
1931
- while (--i >= 0 && (mul *= 256)) {
1932
- this[offset + i] = value / mul & 255;
1933
- }
1934
- return offset + byteLength2;
1935
- }, "writeUIntBE");
1936
- Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = /* @__PURE__ */ __name(function writeUInt8(value, offset, noAssert) {
1937
- value = +value;
1938
- offset = offset >>> 0;
1939
- if (!noAssert) checkInt(this, value, offset, 1, 255, 0);
1940
- this[offset] = value & 255;
1941
- return offset + 1;
1942
- }, "writeUInt8");
1943
- Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = /* @__PURE__ */ __name(function writeUInt16LE(value, offset, noAssert) {
1944
- value = +value;
1945
- offset = offset >>> 0;
1946
- if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
1947
- this[offset] = value & 255;
1948
- this[offset + 1] = value >>> 8;
1949
- return offset + 2;
1950
- }, "writeUInt16LE");
1951
- Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = /* @__PURE__ */ __name(function writeUInt16BE(value, offset, noAssert) {
1952
- value = +value;
1953
- offset = offset >>> 0;
1954
- if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
1955
- this[offset] = value >>> 8;
1956
- this[offset + 1] = value & 255;
1957
- return offset + 2;
1958
- }, "writeUInt16BE");
1959
- Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = /* @__PURE__ */ __name(function writeUInt32LE(value, offset, noAssert) {
1960
- value = +value;
1961
- offset = offset >>> 0;
1962
- if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
1963
- this[offset + 3] = value >>> 24;
1964
- this[offset + 2] = value >>> 16;
1965
- this[offset + 1] = value >>> 8;
1966
- this[offset] = value & 255;
1967
- return offset + 4;
1968
- }, "writeUInt32LE");
1969
- Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = /* @__PURE__ */ __name(function writeUInt32BE(value, offset, noAssert) {
1970
- value = +value;
1971
- offset = offset >>> 0;
1972
- if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
1973
- this[offset] = value >>> 24;
1974
- this[offset + 1] = value >>> 16;
1975
- this[offset + 2] = value >>> 8;
1976
- this[offset + 3] = value & 255;
1977
- return offset + 4;
1978
- }, "writeUInt32BE");
1979
- function wrtBigUInt64LE(buf, value, offset, min, max) {
1980
- checkIntBI(value, min, max, buf, offset, 7);
1981
- let lo = Number(value & BigInt(4294967295));
1982
- buf[offset++] = lo;
1983
- lo = lo >> 8;
1984
- buf[offset++] = lo;
1985
- lo = lo >> 8;
1986
- buf[offset++] = lo;
1987
- lo = lo >> 8;
1988
- buf[offset++] = lo;
1989
- let hi = Number(value >> BigInt(32) & BigInt(4294967295));
1990
- buf[offset++] = hi;
1991
- hi = hi >> 8;
1992
- buf[offset++] = hi;
1993
- hi = hi >> 8;
1994
- buf[offset++] = hi;
1995
- hi = hi >> 8;
1996
- buf[offset++] = hi;
1997
- return offset;
1998
- }
1999
- __name(wrtBigUInt64LE, "wrtBigUInt64LE");
2000
- function wrtBigUInt64BE(buf, value, offset, min, max) {
2001
- checkIntBI(value, min, max, buf, offset, 7);
2002
- let lo = Number(value & BigInt(4294967295));
2003
- buf[offset + 7] = lo;
2004
- lo = lo >> 8;
2005
- buf[offset + 6] = lo;
2006
- lo = lo >> 8;
2007
- buf[offset + 5] = lo;
2008
- lo = lo >> 8;
2009
- buf[offset + 4] = lo;
2010
- let hi = Number(value >> BigInt(32) & BigInt(4294967295));
2011
- buf[offset + 3] = hi;
2012
- hi = hi >> 8;
2013
- buf[offset + 2] = hi;
2014
- hi = hi >> 8;
2015
- buf[offset + 1] = hi;
2016
- hi = hi >> 8;
2017
- buf[offset] = hi;
2018
- return offset + 8;
2019
- }
2020
- __name(wrtBigUInt64BE, "wrtBigUInt64BE");
2021
- Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(/* @__PURE__ */ __name(function writeBigUInt64LE(value, offset = 0) {
2022
- return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
2023
- }, "writeBigUInt64LE"));
2024
- Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(/* @__PURE__ */ __name(function writeBigUInt64BE(value, offset = 0) {
2025
- return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
2026
- }, "writeBigUInt64BE"));
2027
- Buffer3.prototype.writeIntLE = /* @__PURE__ */ __name(function writeIntLE(value, offset, byteLength2, noAssert) {
2028
- value = +value;
2029
- offset = offset >>> 0;
2030
- if (!noAssert) {
2031
- const limit = Math.pow(2, 8 * byteLength2 - 1);
2032
- checkInt(this, value, offset, byteLength2, limit - 1, -limit);
2033
- }
2034
- let i = 0;
2035
- let mul = 1;
2036
- let sub = 0;
2037
- this[offset] = value & 255;
2038
- while (++i < byteLength2 && (mul *= 256)) {
2039
- if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
2040
- sub = 1;
2041
- }
2042
- this[offset + i] = (value / mul >> 0) - sub & 255;
2043
- }
2044
- return offset + byteLength2;
2045
- }, "writeIntLE");
2046
- Buffer3.prototype.writeIntBE = /* @__PURE__ */ __name(function writeIntBE(value, offset, byteLength2, noAssert) {
2047
- value = +value;
2048
- offset = offset >>> 0;
2049
- if (!noAssert) {
2050
- const limit = Math.pow(2, 8 * byteLength2 - 1);
2051
- checkInt(this, value, offset, byteLength2, limit - 1, -limit);
2052
- }
2053
- let i = byteLength2 - 1;
2054
- let mul = 1;
2055
- let sub = 0;
2056
- this[offset + i] = value & 255;
2057
- while (--i >= 0 && (mul *= 256)) {
2058
- if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
2059
- sub = 1;
2060
- }
2061
- this[offset + i] = (value / mul >> 0) - sub & 255;
2062
- }
2063
- return offset + byteLength2;
2064
- }, "writeIntBE");
2065
- Buffer3.prototype.writeInt8 = /* @__PURE__ */ __name(function writeInt8(value, offset, noAssert) {
2066
- value = +value;
2067
- offset = offset >>> 0;
2068
- if (!noAssert) checkInt(this, value, offset, 1, 127, -128);
2069
- if (value < 0) value = 255 + value + 1;
2070
- this[offset] = value & 255;
2071
- return offset + 1;
2072
- }, "writeInt8");
2073
- Buffer3.prototype.writeInt16LE = /* @__PURE__ */ __name(function writeInt16LE(value, offset, noAssert) {
2074
- value = +value;
2075
- offset = offset >>> 0;
2076
- if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
2077
- this[offset] = value & 255;
2078
- this[offset + 1] = value >>> 8;
2079
- return offset + 2;
2080
- }, "writeInt16LE");
2081
- Buffer3.prototype.writeInt16BE = /* @__PURE__ */ __name(function writeInt16BE(value, offset, noAssert) {
2082
- value = +value;
2083
- offset = offset >>> 0;
2084
- if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
2085
- this[offset] = value >>> 8;
2086
- this[offset + 1] = value & 255;
2087
- return offset + 2;
2088
- }, "writeInt16BE");
2089
- Buffer3.prototype.writeInt32LE = /* @__PURE__ */ __name(function writeInt32LE(value, offset, noAssert) {
2090
- value = +value;
2091
- offset = offset >>> 0;
2092
- if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
2093
- this[offset] = value & 255;
2094
- this[offset + 1] = value >>> 8;
2095
- this[offset + 2] = value >>> 16;
2096
- this[offset + 3] = value >>> 24;
2097
- return offset + 4;
2098
- }, "writeInt32LE");
2099
- Buffer3.prototype.writeInt32BE = /* @__PURE__ */ __name(function writeInt32BE(value, offset, noAssert) {
2100
- value = +value;
2101
- offset = offset >>> 0;
2102
- if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
2103
- if (value < 0) value = 4294967295 + value + 1;
2104
- this[offset] = value >>> 24;
2105
- this[offset + 1] = value >>> 16;
2106
- this[offset + 2] = value >>> 8;
2107
- this[offset + 3] = value & 255;
2108
- return offset + 4;
2109
- }, "writeInt32BE");
2110
- Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(/* @__PURE__ */ __name(function writeBigInt64LE(value, offset = 0) {
2111
- return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
2112
- }, "writeBigInt64LE"));
2113
- Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(/* @__PURE__ */ __name(function writeBigInt64BE(value, offset = 0) {
2114
- return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
2115
- }, "writeBigInt64BE"));
2116
- function checkIEEE754(buf, value, offset, ext, max, min) {
2117
- if (offset + ext > buf.length) throw new RangeError("Index out of range");
2118
- if (offset < 0) throw new RangeError("Index out of range");
2119
- }
2120
- __name(checkIEEE754, "checkIEEE754");
2121
- function writeFloat(buf, value, offset, littleEndian, noAssert) {
2122
- value = +value;
2123
- offset = offset >>> 0;
2124
- if (!noAssert) {
2125
- checkIEEE754(buf, value, offset, 4, 34028234663852886e22, -34028234663852886e22);
2126
- }
2127
- ieee754.write(buf, value, offset, littleEndian, 23, 4);
2128
- return offset + 4;
2129
- }
2130
- __name(writeFloat, "writeFloat");
2131
- Buffer3.prototype.writeFloatLE = /* @__PURE__ */ __name(function writeFloatLE(value, offset, noAssert) {
2132
- return writeFloat(this, value, offset, true, noAssert);
2133
- }, "writeFloatLE");
2134
- Buffer3.prototype.writeFloatBE = /* @__PURE__ */ __name(function writeFloatBE(value, offset, noAssert) {
2135
- return writeFloat(this, value, offset, false, noAssert);
2136
- }, "writeFloatBE");
2137
- function writeDouble(buf, value, offset, littleEndian, noAssert) {
2138
- value = +value;
2139
- offset = offset >>> 0;
2140
- if (!noAssert) {
2141
- checkIEEE754(buf, value, offset, 8, 17976931348623157e292, -17976931348623157e292);
2142
- }
2143
- ieee754.write(buf, value, offset, littleEndian, 52, 8);
2144
- return offset + 8;
2145
- }
2146
- __name(writeDouble, "writeDouble");
2147
- Buffer3.prototype.writeDoubleLE = /* @__PURE__ */ __name(function writeDoubleLE(value, offset, noAssert) {
2148
- return writeDouble(this, value, offset, true, noAssert);
2149
- }, "writeDoubleLE");
2150
- Buffer3.prototype.writeDoubleBE = /* @__PURE__ */ __name(function writeDoubleBE(value, offset, noAssert) {
2151
- return writeDouble(this, value, offset, false, noAssert);
2152
- }, "writeDoubleBE");
2153
- Buffer3.prototype.copy = /* @__PURE__ */ __name(function copy2(target, targetStart, start, end) {
2154
- if (!Buffer3.isBuffer(target)) throw new TypeError("argument should be a Buffer");
2155
- if (!start) start = 0;
2156
- if (!end && end !== 0) end = this.length;
2157
- if (targetStart >= target.length) targetStart = target.length;
2158
- if (!targetStart) targetStart = 0;
2159
- if (end > 0 && end < start) end = start;
2160
- if (end === start) return 0;
2161
- if (target.length === 0 || this.length === 0) return 0;
2162
- if (targetStart < 0) {
2163
- throw new RangeError("targetStart out of bounds");
2164
- }
2165
- if (start < 0 || start >= this.length) throw new RangeError("Index out of range");
2166
- if (end < 0) throw new RangeError("sourceEnd out of bounds");
2167
- if (end > this.length) end = this.length;
2168
- if (target.length - targetStart < end - start) {
2169
- end = target.length - targetStart + start;
2170
- }
2171
- const len = end - start;
2172
- if (this === target && typeof Uint8Array.prototype.copyWithin === "function") {
2173
- this.copyWithin(targetStart, start, end);
2174
- } else {
2175
- Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
2176
- }
2177
- return len;
2178
- }, "copy");
2179
- Buffer3.prototype.fill = /* @__PURE__ */ __name(function fill(val, start, end, encoding) {
2180
- if (typeof val === "string") {
2181
- if (typeof start === "string") {
2182
- encoding = start;
2183
- start = 0;
2184
- end = this.length;
2185
- } else if (typeof end === "string") {
2186
- encoding = end;
2187
- end = this.length;
2188
- }
2189
- if (encoding !== void 0 && typeof encoding !== "string") {
2190
- throw new TypeError("encoding must be a string");
2191
- }
2192
- if (typeof encoding === "string" && !Buffer3.isEncoding(encoding)) {
2193
- throw new TypeError("Unknown encoding: " + encoding);
2194
- }
2195
- if (val.length === 1) {
2196
- const code = val.charCodeAt(0);
2197
- if (encoding === "utf8" && code < 128 || encoding === "latin1") {
2198
- val = code;
2199
- }
2200
- }
2201
- } else if (typeof val === "number") {
2202
- val = val & 255;
2203
- } else if (typeof val === "boolean") {
2204
- val = Number(val);
2205
- }
2206
- if (start < 0 || this.length < start || this.length < end) {
2207
- throw new RangeError("Out of range index");
2208
- }
2209
- if (end <= start) {
2210
- return this;
2211
- }
2212
- start = start >>> 0;
2213
- end = end === void 0 ? this.length : end >>> 0;
2214
- if (!val) val = 0;
2215
- let i;
2216
- if (typeof val === "number") {
2217
- for (i = start; i < end; ++i) {
2218
- this[i] = val;
2219
- }
2220
- } else {
2221
- const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);
2222
- const len = bytes.length;
2223
- if (len === 0) {
2224
- throw new TypeError('The value "' + val + '" is invalid for argument "value"');
2225
- }
2226
- for (i = 0; i < end - start; ++i) {
2227
- this[i + start] = bytes[i % len];
2228
- }
2229
- }
2230
- return this;
2231
- }, "fill");
2232
- var errors = {};
2233
- function E(sym, getMessage, Base) {
2234
- errors[sym] = class NodeError extends Base {
2235
- static {
2236
- __name(this, "NodeError");
2237
- }
2238
- constructor() {
2239
- super();
2240
- Object.defineProperty(this, "message", {
2241
- value: getMessage.apply(this, arguments),
2242
- writable: true,
2243
- configurable: true
2244
- });
2245
- this.name = `${this.name} [${sym}]`;
2246
- this.stack;
2247
- delete this.name;
2248
- }
2249
- get code() {
2250
- return sym;
2251
- }
2252
- set code(value) {
2253
- Object.defineProperty(this, "code", {
2254
- configurable: true,
2255
- enumerable: true,
2256
- value,
2257
- writable: true
2258
- });
2259
- }
2260
- toString() {
2261
- return `${this.name} [${sym}]: ${this.message}`;
2262
- }
2263
- };
709
+ if (Array.isArray(value) && Array.isArray(object[key])) {
710
+ object[key] = [...value, ...object[key]];
711
+ } else if (isPlainObject(value) && isPlainObject(object[key])) {
712
+ object[key] = _defu(
713
+ value,
714
+ object[key],
715
+ (namespace ? `${namespace}.` : "") + key.toString(),
716
+ merger
717
+ );
718
+ } else {
719
+ object[key] = value;
2264
720
  }
2265
- __name(E, "E");
2266
- E("ERR_BUFFER_OUT_OF_BOUNDS", function(name) {
2267
- if (name) {
2268
- return `${name} is outside of buffer bounds`;
2269
- }
2270
- return "Attempt to access memory outside buffer bounds";
2271
- }, RangeError);
2272
- E("ERR_INVALID_ARG_TYPE", function(name, actual) {
2273
- return `The "${name}" argument must be of type number. Received type ${typeof actual}`;
2274
- }, TypeError);
2275
- E("ERR_OUT_OF_RANGE", function(str, range, input) {
2276
- let msg = `The value of "${str}" is out of range.`;
2277
- let received = input;
2278
- if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
2279
- received = addNumericalSeparator(String(input));
2280
- } else if (typeof input === "bigint") {
2281
- received = String(input);
2282
- if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
2283
- received = addNumericalSeparator(received);
2284
- }
2285
- received += "n";
2286
- }
2287
- msg += ` It must be ${range}. Received ${received}`;
2288
- return msg;
2289
- }, RangeError);
2290
- function addNumericalSeparator(val) {
2291
- let res = "";
2292
- let i = val.length;
2293
- const start = val[0] === "-" ? 1 : 0;
2294
- for (; i >= start + 4; i -= 3) {
2295
- res = `_${val.slice(i - 3, i)}${res}`;
2296
- }
2297
- return `${val.slice(0, i)}${res}`;
2298
- }
2299
- __name(addNumericalSeparator, "addNumericalSeparator");
2300
- function checkBounds(buf, offset, byteLength2) {
2301
- validateNumber(offset, "offset");
2302
- if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) {
2303
- boundsError(offset, buf.length - (byteLength2 + 1));
2304
- }
2305
- }
2306
- __name(checkBounds, "checkBounds");
2307
- function checkIntBI(value, min, max, buf, offset, byteLength2) {
2308
- if (value > max || value < min) {
2309
- const n = typeof min === "bigint" ? "n" : "";
2310
- let range;
2311
- if (byteLength2 > 3) {
2312
- if (min === 0 || min === BigInt(0)) {
2313
- range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}`;
2314
- } else {
2315
- range = `>= -(2${n} ** ${(byteLength2 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n}`;
2316
- }
2317
- } else {
2318
- range = `>= ${min}${n} and <= ${max}${n}`;
2319
- }
2320
- throw new errors.ERR_OUT_OF_RANGE("value", range, value);
2321
- }
2322
- checkBounds(buf, offset, byteLength2);
2323
- }
2324
- __name(checkIntBI, "checkIntBI");
2325
- function validateNumber(value, name) {
2326
- if (typeof value !== "number") {
2327
- throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value);
2328
- }
2329
- }
2330
- __name(validateNumber, "validateNumber");
2331
- function boundsError(value, length, type) {
2332
- if (Math.floor(value) !== value) {
2333
- validateNumber(value, type);
2334
- throw new errors.ERR_OUT_OF_RANGE(type || "offset", "an integer", value);
2335
- }
2336
- if (length < 0) {
2337
- throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
2338
- }
2339
- throw new errors.ERR_OUT_OF_RANGE(type || "offset", `>= ${type ? 1 : 0} and <= ${length}`, value);
2340
- }
2341
- __name(boundsError, "boundsError");
2342
- var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
2343
- function base64clean(str) {
2344
- str = str.split("=")[0];
2345
- str = str.trim().replace(INVALID_BASE64_RE, "");
2346
- if (str.length < 2) return "";
2347
- while (str.length % 4 !== 0) {
2348
- str = str + "=";
2349
- }
2350
- return str;
2351
- }
2352
- __name(base64clean, "base64clean");
2353
- function utf8ToBytes(string, units) {
2354
- units = units || Infinity;
2355
- let codePoint;
2356
- const length = string.length;
2357
- let leadSurrogate = null;
2358
- const bytes = [];
2359
- for (let i = 0; i < length; ++i) {
2360
- codePoint = string.charCodeAt(i);
2361
- if (codePoint > 55295 && codePoint < 57344) {
2362
- if (!leadSurrogate) {
2363
- if (codePoint > 56319) {
2364
- if ((units -= 3) > -1) bytes.push(239, 191, 189);
2365
- continue;
2366
- } else if (i + 1 === length) {
2367
- if ((units -= 3) > -1) bytes.push(239, 191, 189);
2368
- continue;
2369
- }
2370
- leadSurrogate = codePoint;
2371
- continue;
2372
- }
2373
- if (codePoint < 56320) {
2374
- if ((units -= 3) > -1) bytes.push(239, 191, 189);
2375
- leadSurrogate = codePoint;
2376
- continue;
2377
- }
2378
- codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
2379
- } else if (leadSurrogate) {
2380
- if ((units -= 3) > -1) bytes.push(239, 191, 189);
2381
- }
2382
- leadSurrogate = null;
2383
- if (codePoint < 128) {
2384
- if ((units -= 1) < 0) break;
2385
- bytes.push(codePoint);
2386
- } else if (codePoint < 2048) {
2387
- if ((units -= 2) < 0) break;
2388
- bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);
2389
- } else if (codePoint < 65536) {
2390
- if ((units -= 3) < 0) break;
2391
- bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
2392
- } else if (codePoint < 1114112) {
2393
- if ((units -= 4) < 0) break;
2394
- bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
2395
- } else {
2396
- throw new Error("Invalid code point");
2397
- }
721
+ }
722
+ return object;
723
+ }
724
+ function createDefu(merger) {
725
+ return (...arguments_) => (
726
+ // eslint-disable-next-line unicorn/no-array-reduce
727
+ arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
728
+ );
729
+ }
730
+ var defu, defuFn, defuArrayFn;
731
+ var init_defu = __esm({
732
+ "../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs"() {
733
+ "use strict";
734
+ init_esm_shims();
735
+ __name(isPlainObject, "isPlainObject");
736
+ __name(_defu, "_defu");
737
+ __name(createDefu, "createDefu");
738
+ defu = createDefu();
739
+ defuFn = createDefu((object, key, currentValue) => {
740
+ if (object[key] !== void 0 && typeof currentValue === "function") {
741
+ object[key] = currentValue(object[key]);
742
+ return true;
2398
743
  }
2399
- return bytes;
2400
- }
2401
- __name(utf8ToBytes, "utf8ToBytes");
2402
- function asciiToBytes(str) {
2403
- const byteArray = [];
2404
- for (let i = 0; i < str.length; ++i) {
2405
- byteArray.push(str.charCodeAt(i) & 255);
2406
- }
2407
- return byteArray;
2408
- }
2409
- __name(asciiToBytes, "asciiToBytes");
2410
- function utf16leToBytes(str, units) {
2411
- let c, hi, lo;
2412
- const byteArray = [];
2413
- for (let i = 0; i < str.length; ++i) {
2414
- if ((units -= 2) < 0) break;
2415
- c = str.charCodeAt(i);
2416
- hi = c >> 8;
2417
- lo = c % 256;
2418
- byteArray.push(lo);
2419
- byteArray.push(hi);
2420
- }
2421
- return byteArray;
2422
- }
2423
- __name(utf16leToBytes, "utf16leToBytes");
2424
- function base64ToBytes(str) {
2425
- return base64.toByteArray(base64clean(str));
2426
- }
2427
- __name(base64ToBytes, "base64ToBytes");
2428
- function blitBuffer(src, dst, offset, length) {
2429
- let i;
2430
- for (i = 0; i < length; ++i) {
2431
- if (i + offset >= dst.length || i >= src.length) break;
2432
- dst[i + offset] = src[i];
2433
- }
2434
- return i;
2435
- }
2436
- __name(blitBuffer, "blitBuffer");
2437
- function isInstance(obj, type) {
2438
- return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
2439
- }
2440
- __name(isInstance, "isInstance");
2441
- function numberIsNaN(obj) {
2442
- return obj !== obj;
2443
- }
2444
- __name(numberIsNaN, "numberIsNaN");
2445
- var hexSliceLookupTable = function() {
2446
- const alphabet = "0123456789abcdef";
2447
- const table = new Array(256);
2448
- for (let i = 0; i < 16; ++i) {
2449
- const i16 = i * 16;
2450
- for (let j = 0; j < 16; ++j) {
2451
- table[i16 + j] = alphabet[i] + alphabet[j];
2452
- }
744
+ });
745
+ defuArrayFn = createDefu((object, key, currentValue) => {
746
+ if (Array.isArray(object[key]) && typeof currentValue === "function") {
747
+ object[key] = currentValue(object[key]);
748
+ return true;
2453
749
  }
2454
- return table;
2455
- }();
2456
- function defineBigIntMethod(fn) {
2457
- return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
2458
- }
2459
- __name(defineBigIntMethod, "defineBigIntMethod");
2460
- function BufferBigIntNotDefined() {
2461
- throw new Error("BigInt not supported");
2462
- }
2463
- __name(BufferBigIntNotDefined, "BufferBigIntNotDefined");
750
+ });
2464
751
  }
2465
752
  });
2466
753
 
@@ -2685,13 +972,13 @@ var util;
2685
972
  });
2686
973
  };
2687
974
  util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
2688
- const keys = [];
975
+ const keys2 = [];
2689
976
  for (const key in object) {
2690
977
  if (Object.prototype.hasOwnProperty.call(object, key)) {
2691
- keys.push(key);
978
+ keys2.push(key);
2692
979
  }
2693
980
  }
2694
- return keys;
981
+ return keys2;
2695
982
  };
2696
983
  util2.find = (arr, checker) => {
2697
984
  for (const item of arr) {
@@ -3083,9 +1370,9 @@ var ParseStatus = class _ParseStatus {
3083
1370
  }
3084
1371
  return { status: status.value, value: arrayValue };
3085
1372
  }
3086
- static async mergeObjectAsync(status, pairs) {
1373
+ static async mergeObjectAsync(status, pairs2) {
3087
1374
  const syncPairs = [];
3088
- for (const pair of pairs) {
1375
+ for (const pair of pairs2) {
3089
1376
  const key = await pair.key;
3090
1377
  const value = await pair.value;
3091
1378
  syncPairs.push({
@@ -3095,9 +1382,9 @@ var ParseStatus = class _ParseStatus {
3095
1382
  }
3096
1383
  return _ParseStatus.mergeObjectSync(status, syncPairs);
3097
1384
  }
3098
- static mergeObjectSync(status, pairs) {
1385
+ static mergeObjectSync(status, pairs2) {
3099
1386
  const finalObject = {};
3100
- for (const pair of pairs) {
1387
+ for (const pair of pairs2) {
3101
1388
  const { key, value } = pair;
3102
1389
  if (key.status === "aborted")
3103
1390
  return INVALID;
@@ -4985,8 +3272,8 @@ var ZodObject = class _ZodObject extends ZodType {
4985
3272
  if (this._cached !== null)
4986
3273
  return this._cached;
4987
3274
  const shape = this._def.shape();
4988
- const keys = util.objectKeys(shape);
4989
- return this._cached = { shape, keys };
3275
+ const keys2 = util.objectKeys(shape);
3276
+ return this._cached = { shape, keys: keys2 };
4990
3277
  }
4991
3278
  _parse(input) {
4992
3279
  const parsedType = this._getType(input);
@@ -5009,11 +3296,11 @@ var ZodObject = class _ZodObject extends ZodType {
5009
3296
  }
5010
3297
  }
5011
3298
  }
5012
- const pairs = [];
3299
+ const pairs2 = [];
5013
3300
  for (const key of shapeKeys) {
5014
3301
  const keyValidator = shape[key];
5015
3302
  const value = ctx.data[key];
5016
- pairs.push({
3303
+ pairs2.push({
5017
3304
  key: { status: "valid", value: key },
5018
3305
  value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
5019
3306
  alwaysSet: key in ctx.data
@@ -5023,7 +3310,7 @@ var ZodObject = class _ZodObject extends ZodType {
5023
3310
  const unknownKeys = this._def.unknownKeys;
5024
3311
  if (unknownKeys === "passthrough") {
5025
3312
  for (const key of extraKeys) {
5026
- pairs.push({
3313
+ pairs2.push({
5027
3314
  key: { status: "valid", value: key },
5028
3315
  value: { status: "valid", value: ctx.data[key] }
5029
3316
  });
@@ -5044,7 +3331,7 @@ var ZodObject = class _ZodObject extends ZodType {
5044
3331
  const catchall = this._def.catchall;
5045
3332
  for (const key of extraKeys) {
5046
3333
  const value = ctx.data[key];
5047
- pairs.push({
3334
+ pairs2.push({
5048
3335
  key: { status: "valid", value: key },
5049
3336
  value: catchall._parse(
5050
3337
  new ParseInputLazyPath(ctx, value, ctx.path, key)
@@ -5057,7 +3344,7 @@ var ZodObject = class _ZodObject extends ZodType {
5057
3344
  if (ctx.common.async) {
5058
3345
  return Promise.resolve().then(async () => {
5059
3346
  const syncPairs = [];
5060
- for (const pair of pairs) {
3347
+ for (const pair of pairs2) {
5061
3348
  const key = await pair.key;
5062
3349
  const value = await pair.value;
5063
3350
  syncPairs.push({
@@ -5071,7 +3358,7 @@ var ZodObject = class _ZodObject extends ZodType {
5071
3358
  return ParseStatus.mergeObjectSync(status, syncPairs);
5072
3359
  });
5073
3360
  } else {
5074
- return ParseStatus.mergeObjectSync(status, pairs);
3361
+ return ParseStatus.mergeObjectSync(status, pairs2);
5075
3362
  }
5076
3363
  }
5077
3364
  get shape() {
@@ -5702,20 +3989,20 @@ var ZodRecord = class _ZodRecord extends ZodType {
5702
3989
  });
5703
3990
  return INVALID;
5704
3991
  }
5705
- const pairs = [];
3992
+ const pairs2 = [];
5706
3993
  const keyType = this._def.keyType;
5707
3994
  const valueType = this._def.valueType;
5708
3995
  for (const key in ctx.data) {
5709
- pairs.push({
3996
+ pairs2.push({
5710
3997
  key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
5711
3998
  value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
5712
3999
  alwaysSet: key in ctx.data
5713
4000
  });
5714
4001
  }
5715
4002
  if (ctx.common.async) {
5716
- return ParseStatus.mergeObjectAsync(status, pairs);
4003
+ return ParseStatus.mergeObjectAsync(status, pairs2);
5717
4004
  } else {
5718
- return ParseStatus.mergeObjectSync(status, pairs);
4005
+ return ParseStatus.mergeObjectSync(status, pairs2);
5719
4006
  }
5720
4007
  }
5721
4008
  get element() {
@@ -5760,7 +4047,7 @@ var ZodMap = class extends ZodType {
5760
4047
  }
5761
4048
  const keyType = this._def.keyType;
5762
4049
  const valueType = this._def.valueType;
5763
- const pairs = [...ctx.data.entries()].map(([key, value], index) => {
4050
+ const pairs2 = [...ctx.data.entries()].map(([key, value], index) => {
5764
4051
  return {
5765
4052
  key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])),
5766
4053
  value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"]))
@@ -5769,7 +4056,7 @@ var ZodMap = class extends ZodType {
5769
4056
  if (ctx.common.async) {
5770
4057
  const finalMap = /* @__PURE__ */ new Map();
5771
4058
  return Promise.resolve().then(async () => {
5772
- for (const pair of pairs) {
4059
+ for (const pair of pairs2) {
5773
4060
  const key = await pair.key;
5774
4061
  const value = await pair.value;
5775
4062
  if (key.status === "aborted" || value.status === "aborted") {
@@ -5784,7 +4071,7 @@ var ZodMap = class extends ZodType {
5784
4071
  });
5785
4072
  } else {
5786
4073
  const finalMap = /* @__PURE__ */ new Map();
5787
- for (const pair of pairs) {
4074
+ for (const pair of pairs2) {
5788
4075
  const key = pair.key;
5789
4076
  const value = pair.value;
5790
4077
  if (key.status === "aborted" || value.status === "aborted") {
@@ -6596,13 +4883,13 @@ var ZodReadonly = class extends ZodType {
6596
4883
  }
6597
4884
  _parse(input) {
6598
4885
  const result = this._def.innerType._parse(input);
6599
- const freeze = /* @__PURE__ */ __name((data) => {
4886
+ const freeze2 = /* @__PURE__ */ __name((data) => {
6600
4887
  if (isValid(data)) {
6601
4888
  data.value = Object.freeze(data.value);
6602
4889
  }
6603
4890
  return data;
6604
4891
  }, "freeze");
6605
- return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
4892
+ return isAsync(result) ? result.then((data) => freeze2(data)) : freeze2(result);
6606
4893
  }
6607
4894
  unwrap() {
6608
4895
  return this._def.innerType;
@@ -6935,8 +5222,11 @@ var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/
6935
5222
 
6936
5223
  // ../path/src/slash.ts
6937
5224
  init_esm_shims();
6938
- function slash(str) {
6939
- return str.replace(/\\/g, "/");
5225
+ function slash(path6) {
5226
+ if (path6.startsWith("\\\\?\\")) {
5227
+ return path6;
5228
+ }
5229
+ return path6.replace(/\\/g, "/");
6940
5230
  }
6941
5231
  __name(slash, "slash");
6942
5232
 
@@ -7061,10 +5351,35 @@ __name(normalizeString2, "normalizeString");
7061
5351
  // ../path/src/get-workspace-root.ts
7062
5352
  init_esm_shims();
7063
5353
 
7064
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/index.js
5354
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.2/node_modules/@storm-software/config-tools/dist/index.js
5355
+ init_esm_shims();
5356
+
5357
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.2/node_modules/@storm-software/config-tools/dist/chunk-PTHGOJU6.js
5358
+ init_esm_shims();
5359
+
5360
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.2/node_modules/@storm-software/config-tools/dist/chunk-6JBGUE4A.js
7065
5361
  init_esm_shims();
5362
+ import { existsSync as existsSync2 } from "node:fs";
5363
+ import { join } from "node:path";
5364
+ var MAX_PATH_SEARCH_DEPTH = 30;
5365
+ var depth = 0;
5366
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
5367
+ const _startPath = startPath ?? process.cwd();
5368
+ if (endDirectoryNames.some((endDirName) => existsSync2(join(_startPath, endDirName)))) {
5369
+ return _startPath;
5370
+ }
5371
+ if (endFileNames.some((endFileName) => existsSync2(join(_startPath, endFileName)))) {
5372
+ return _startPath;
5373
+ }
5374
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
5375
+ const parent = join(_startPath, "..");
5376
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
5377
+ }
5378
+ return void 0;
5379
+ }
5380
+ __name(findFolderUp, "findFolderUp");
7066
5381
 
7067
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
5382
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.2/node_modules/@storm-software/config-tools/dist/chunk-7IMLZPZF.js
7068
5383
  init_esm_shims();
7069
5384
  var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
7070
5385
  function normalizeWindowsPath3(input = "") {
@@ -7090,167 +5405,1554 @@ var correctPaths2 = /* @__PURE__ */ __name(function(path6) {
7090
5405
  if (isPathAbsolute) {
7091
5406
  return "/";
7092
5407
  }
7093
- return trailingSeparator ? "./" : ".";
7094
- }
7095
- if (trailingSeparator) {
7096
- path6 += "/";
7097
- }
7098
- if (_DRIVE_LETTER_RE2.test(path6)) {
7099
- path6 += "/";
5408
+ return trailingSeparator ? "./" : ".";
5409
+ }
5410
+ if (trailingSeparator) {
5411
+ path6 += "/";
5412
+ }
5413
+ if (_DRIVE_LETTER_RE2.test(path6)) {
5414
+ path6 += "/";
5415
+ }
5416
+ if (isUNCPath) {
5417
+ if (!isPathAbsolute) {
5418
+ return `//./${path6}`;
5419
+ }
5420
+ return `//${path6}`;
5421
+ }
5422
+ return isPathAbsolute && !isAbsolute2(path6) ? `/${path6}` : path6;
5423
+ }, "correctPaths");
5424
+ function normalizeString3(path6, allowAboveRoot) {
5425
+ let res = "";
5426
+ let lastSegmentLength = 0;
5427
+ let lastSlash = -1;
5428
+ let dots = 0;
5429
+ let char = null;
5430
+ for (let index = 0; index <= path6.length; ++index) {
5431
+ if (index < path6.length) {
5432
+ char = path6[index];
5433
+ } else if (char === "/") {
5434
+ break;
5435
+ } else {
5436
+ char = "/";
5437
+ }
5438
+ if (char === "/") {
5439
+ if (lastSlash === index - 1 || dots === 1) {
5440
+ } else if (dots === 2) {
5441
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
5442
+ if (res.length > 2) {
5443
+ const lastSlashIndex = res.lastIndexOf("/");
5444
+ if (lastSlashIndex === -1) {
5445
+ res = "";
5446
+ lastSegmentLength = 0;
5447
+ } else {
5448
+ res = res.slice(0, lastSlashIndex);
5449
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
5450
+ }
5451
+ lastSlash = index;
5452
+ dots = 0;
5453
+ continue;
5454
+ } else if (res.length > 0) {
5455
+ res = "";
5456
+ lastSegmentLength = 0;
5457
+ lastSlash = index;
5458
+ dots = 0;
5459
+ continue;
5460
+ }
5461
+ }
5462
+ if (allowAboveRoot) {
5463
+ res += res.length > 0 ? "/.." : "..";
5464
+ lastSegmentLength = 2;
5465
+ }
5466
+ } else {
5467
+ if (res.length > 0) {
5468
+ res += `/${path6.slice(lastSlash + 1, index)}`;
5469
+ } else {
5470
+ res = path6.slice(lastSlash + 1, index);
5471
+ }
5472
+ lastSegmentLength = index - lastSlash - 1;
5473
+ }
5474
+ lastSlash = index;
5475
+ dots = 0;
5476
+ } else if (char === "." && dots !== -1) {
5477
+ ++dots;
5478
+ } else {
5479
+ dots = -1;
5480
+ }
5481
+ }
5482
+ return res;
5483
+ }
5484
+ __name(normalizeString3, "normalizeString");
5485
+ var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
5486
+ return _IS_ABSOLUTE_RE2.test(p);
5487
+ }, "isAbsolute");
5488
+
5489
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.2/node_modules/@storm-software/config-tools/dist/chunk-PTHGOJU6.js
5490
+ var rootFiles = [
5491
+ "storm-workspace.json",
5492
+ "storm-workspace.json",
5493
+ "storm-workspace.yaml",
5494
+ "storm-workspace.yml",
5495
+ "storm-workspace.js",
5496
+ "storm-workspace.ts",
5497
+ ".storm-workspace.json",
5498
+ ".storm-workspace.yaml",
5499
+ ".storm-workspace.yml",
5500
+ ".storm-workspace.js",
5501
+ ".storm-workspace.ts",
5502
+ "lerna.json",
5503
+ "nx.json",
5504
+ "turbo.json",
5505
+ "npm-workspace.json",
5506
+ "yarn-workspace.json",
5507
+ "pnpm-workspace.json",
5508
+ "npm-workspace.yaml",
5509
+ "yarn-workspace.yaml",
5510
+ "pnpm-workspace.yaml",
5511
+ "npm-workspace.yml",
5512
+ "yarn-workspace.yml",
5513
+ "pnpm-workspace.yml",
5514
+ "npm-lock.json",
5515
+ "yarn-lock.json",
5516
+ "pnpm-lock.json",
5517
+ "npm-lock.yaml",
5518
+ "yarn-lock.yaml",
5519
+ "pnpm-lock.yaml",
5520
+ "npm-lock.yml",
5521
+ "yarn-lock.yml",
5522
+ "pnpm-lock.yml",
5523
+ "bun.lockb"
5524
+ ];
5525
+ var rootDirectories = [
5526
+ ".storm-workspace",
5527
+ ".nx",
5528
+ ".github",
5529
+ ".vscode",
5530
+ ".verdaccio"
5531
+ ];
5532
+ function findWorkspaceRootSafe(pathInsideMonorepo) {
5533
+ if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
5534
+ return correctPaths2(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
5535
+ }
5536
+ return correctPaths2(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
5537
+ }
5538
+ __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
5539
+
5540
+ // ../../node_modules/.pnpm/@ltd+j-toml@1.38.0/node_modules/@ltd/j-toml/index.mjs
5541
+ init_esm_shims();
5542
+ var SyntaxError$1 = SyntaxError;
5543
+ var RangeError$1 = RangeError;
5544
+ var TypeError$1 = TypeError;
5545
+ var Error$1 = { if: Error }.if;
5546
+ var undefined$1 = void 0;
5547
+ var BigInt$1 = typeof BigInt === "undefined" ? undefined$1 : BigInt;
5548
+ var RegExp$1 = RegExp;
5549
+ var WeakMap$1 = WeakMap;
5550
+ var get = WeakMap.prototype.get;
5551
+ var set = WeakMap.prototype.set;
5552
+ var create$1 = Object.create;
5553
+ var isSafeInteger = Number.isSafeInteger;
5554
+ var getOwnPropertyNames = Object.getOwnPropertyNames;
5555
+ var freeze = Object.freeze;
5556
+ var isPrototypeOf = Object.prototype.isPrototypeOf;
5557
+ var NULL = (
5558
+ /* j-globals: null.prototype (internal) */
5559
+ Object.seal ? /* @__PURE__ */ Object.preventExtensions(/* @__PURE__ */ Object.create(null)) : null
5560
+ );
5561
+ var bind = Function.prototype.bind;
5562
+ var test = RegExp.prototype.test;
5563
+ var exec = RegExp.prototype.exec;
5564
+ var apply$1 = Reflect.apply;
5565
+ var Proxy$1 = Proxy;
5566
+ var assign$1 = Object.assign;
5567
+ var Object$1 = Object;
5568
+ var floor = Math.floor;
5569
+ var isArray$1 = Array.isArray;
5570
+ var Infinity2 = 1 / 0;
5571
+ var fromCharCode = String.fromCharCode;
5572
+ var Array$1 = Array;
5573
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
5574
+ var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
5575
+ var apply = Function.prototype.apply;
5576
+ var isEnum = /* @__PURE__ */ propertyIsEnumerable.call.bind(propertyIsEnumerable);
5577
+ var hasOwn = (
5578
+ /* j-globals: Object.hasOwn (polyfill) */
5579
+ Object$1.hasOwn || /* @__PURE__ */ function() {
5580
+ return hasOwnProperty.bind ? hasOwnProperty.call.bind(hasOwnProperty) : /* @__PURE__ */ __name(function hasOwn2(object, key) {
5581
+ return hasOwnProperty.call(object, key);
5582
+ }, "hasOwn");
5583
+ }()
5584
+ );
5585
+ var create = Object$1.create;
5586
+ function Descriptor(source) {
5587
+ var target = create(NULL);
5588
+ if (hasOwn(source, "value")) {
5589
+ target.value = source.value;
5590
+ }
5591
+ if (hasOwn(source, "writable")) {
5592
+ target.writable = source.writable;
5593
+ }
5594
+ if (hasOwn(source, "get")) {
5595
+ target.get = source.get;
5596
+ }
5597
+ if (hasOwn(source, "set")) {
5598
+ target.set = source.set;
5599
+ }
5600
+ if (hasOwn(source, "enumerable")) {
5601
+ target.enumerable = source.enumerable;
5602
+ }
5603
+ if (hasOwn(source, "configurable")) {
5604
+ target.configurable = source.configurable;
5605
+ }
5606
+ return target;
5607
+ }
5608
+ __name(Descriptor, "Descriptor");
5609
+ var Test = bind ? /* @__PURE__ */ bind.bind(test) : function(re) {
5610
+ return function(string) {
5611
+ return test.call(re, string);
5612
+ };
5613
+ };
5614
+ var Exec = bind ? /* @__PURE__ */ bind.bind(exec) : function(re) {
5615
+ return function(string) {
5616
+ return exec.call(re, string);
5617
+ };
5618
+ };
5619
+ function __PURE__(re) {
5620
+ var test2 = re.test = Test(re);
5621
+ var exec2 = re.exec = Exec(re);
5622
+ var source = test2.source = exec2.source = re.source;
5623
+ test2.unicode = exec2.unicode = re.unicode;
5624
+ test2.ignoreCase = exec2.ignoreCase = re.ignoreCase;
5625
+ test2.multiline = exec2.multiline = source.indexOf("^") < 0 && source.indexOf("$") < 0 ? null : re.multiline;
5626
+ test2.dotAll = exec2.dotAll = source.indexOf(".") < 0 ? null : re.dotAll;
5627
+ return re;
5628
+ }
5629
+ __name(__PURE__, "__PURE__");
5630
+ function theRegExp(re) {
5631
+ return /* @__PURE__ */ __PURE__(re);
5632
+ }
5633
+ __name(theRegExp, "theRegExp");
5634
+ var NT = /[\n\t]+/g;
5635
+ var ESCAPE = /\\./g;
5636
+ function graveAccentReplacer($$) {
5637
+ return $$ === "\\`" ? "`" : $$;
5638
+ }
5639
+ __name(graveAccentReplacer, "graveAccentReplacer");
5640
+ var includes = "".includes ? function(that, searchString) {
5641
+ return that.includes(searchString);
5642
+ } : function(that, searchString) {
5643
+ return that.indexOf(searchString) > -1;
5644
+ };
5645
+ function RE(template) {
5646
+ var U = this.U;
5647
+ var I = this.I;
5648
+ var M = this.M;
5649
+ var S = this.S;
5650
+ var raw = template.raw;
5651
+ var source = raw[0].replace(NT, "");
5652
+ var index = 1;
5653
+ var length = arguments.length;
5654
+ while (index !== length) {
5655
+ var value = arguments[index];
5656
+ if (typeof value === "string") {
5657
+ source += value;
5658
+ } else {
5659
+ var value_source = value.source;
5660
+ if (typeof value_source !== "string") {
5661
+ throw TypeError$1("source");
5662
+ }
5663
+ if (value.unicode === U) {
5664
+ throw SyntaxError$1("unicode");
5665
+ }
5666
+ if (value.ignoreCase === I) {
5667
+ throw SyntaxError$1("ignoreCase");
5668
+ }
5669
+ if (value.multiline === M && (includes(value_source, "^") || includes(value_source, "$"))) {
5670
+ throw SyntaxError$1("multiline");
5671
+ }
5672
+ if (value.dotAll === S && includes(value_source, ".")) {
5673
+ throw SyntaxError$1("dotAll");
5674
+ }
5675
+ source += value_source;
5676
+ }
5677
+ source += raw[index++].replace(NT, "");
5678
+ }
5679
+ var re = RegExp$1(U ? source = source.replace(ESCAPE, graveAccentReplacer) : source, this.flags);
5680
+ var test2 = re.test = Test(re);
5681
+ var exec2 = re.exec = Exec(re);
5682
+ test2.source = exec2.source = source;
5683
+ test2.unicode = exec2.unicode = !U;
5684
+ test2.ignoreCase = exec2.ignoreCase = !I;
5685
+ test2.multiline = exec2.multiline = includes(source, "^") || includes(source, "$") ? !M : null;
5686
+ test2.dotAll = exec2.dotAll = includes(source, ".") ? !S : null;
5687
+ return re;
5688
+ }
5689
+ __name(RE, "RE");
5690
+ var RE_bind = bind && /* @__PURE__ */ bind.bind(RE);
5691
+ function Context(flags) {
5692
+ return {
5693
+ U: !includes(flags, "u"),
5694
+ I: !includes(flags, "i"),
5695
+ M: !includes(flags, "m"),
5696
+ S: !includes(flags, "s"),
5697
+ flags
5698
+ };
5699
+ }
5700
+ __name(Context, "Context");
5701
+ var CONTEXT = /* @__PURE__ */ Context("");
5702
+ var newRegExp = Proxy$1 ? /* @__PURE__ */ new Proxy$1(RE, {
5703
+ apply: /* @__PURE__ */ __name(function(RE2, thisArg, args) {
5704
+ return apply$1(RE2, CONTEXT, args);
5705
+ }, "apply"),
5706
+ get: /* @__PURE__ */ __name(function(RE2, flags) {
5707
+ return RE_bind(Context(flags));
5708
+ }, "get"),
5709
+ defineProperty: /* @__PURE__ */ __name(function() {
5710
+ return false;
5711
+ }, "defineProperty"),
5712
+ preventExtensions: /* @__PURE__ */ __name(function() {
5713
+ return false;
5714
+ }, "preventExtensions")
5715
+ }) : /* @__PURE__ */ function() {
5716
+ RE.apply = RE.apply;
5717
+ var newRegExp2 = /* @__PURE__ */ __name(function() {
5718
+ return RE.apply(CONTEXT, arguments);
5719
+ }, "newRegExp");
5720
+ var d2 = 1;
5721
+ var g = d2 * 2;
5722
+ var i = g * 2;
5723
+ var m = i * 2;
5724
+ var s = i * 2;
5725
+ var u = s * 2;
5726
+ var y = u * 2;
5727
+ var flags = y * 2 - 1;
5728
+ while (flags--) {
5729
+ (function(context) {
5730
+ newRegExp2[context.flags] = function() {
5731
+ return RE.apply(context, arguments);
5732
+ };
5733
+ })(Context(
5734
+ (flags & d2 ? "" : "d") + (flags & g ? "" : "g") + (flags & i ? "" : "i") + (flags & m ? "" : "m") + (flags & s ? "" : "s") + (flags & u ? "" : "u") + (flags & y ? "" : "y")
5735
+ ));
5736
+ }
5737
+ return freeze ? freeze(newRegExp2) : newRegExp2;
5738
+ }();
5739
+ var clearRegExp = "$_" in RegExp$1 ? /* @__PURE__ */ function() {
5740
+ var REGEXP = /^/;
5741
+ REGEXP.test = REGEXP.test;
5742
+ return /* @__PURE__ */ __name(function clearRegExp3(value) {
5743
+ REGEXP.test("");
5744
+ return value;
5745
+ }, "clearRegExp");
5746
+ }() : /* @__PURE__ */ __name(function clearRegExp2(value) {
5747
+ return value;
5748
+ }, "clearRegExp");
5749
+ var NEED_TO_ESCAPE_IN_REGEXP = /^[$()*+\-.?[\\\]^{|]/;
5750
+ var SURROGATE_PAIR = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/;
5751
+ var GROUP = /* @__PURE__ */ create$1(NULL);
5752
+ function groupify(branches, uFlag, noEscape) {
5753
+ var group = create$1(NULL);
5754
+ var appendBranch = uFlag ? appendPointBranch : appendCodeBranch;
5755
+ for (var length = branches.length, index = 0; index < length; ++index) {
5756
+ appendBranch(group, branches[index]);
5757
+ }
5758
+ return sourcify(group, !noEscape);
5759
+ }
5760
+ __name(groupify, "groupify");
5761
+ function appendPointBranch(group, branch) {
5762
+ if (branch) {
5763
+ var character = SURROGATE_PAIR.test(branch) ? branch.slice(0, 2) : branch.charAt(0);
5764
+ appendPointBranch(group[character] || (group[character] = create$1(NULL)), branch.slice(character.length));
5765
+ } else {
5766
+ group[""] = GROUP;
5767
+ }
5768
+ }
5769
+ __name(appendPointBranch, "appendPointBranch");
5770
+ function appendCodeBranch(group, branch) {
5771
+ if (branch) {
5772
+ var character = branch.charAt(0);
5773
+ appendCodeBranch(group[character] || (group[character] = create$1(NULL)), branch.slice(1));
5774
+ } else {
5775
+ group[""] = GROUP;
5776
+ }
5777
+ }
5778
+ __name(appendCodeBranch, "appendCodeBranch");
5779
+ function sourcify(group, needEscape) {
5780
+ var branches = [];
5781
+ var singleCharactersBranch = [];
5782
+ var noEmptyBranch = true;
5783
+ for (var character in group) {
5784
+ if (character) {
5785
+ var sub_branches = sourcify(group[character], needEscape);
5786
+ if (needEscape && NEED_TO_ESCAPE_IN_REGEXP.test(character)) {
5787
+ character = "\\" + character;
5788
+ }
5789
+ sub_branches ? branches.push(character + sub_branches) : singleCharactersBranch.push(character);
5790
+ } else {
5791
+ noEmptyBranch = false;
5792
+ }
5793
+ }
5794
+ singleCharactersBranch.length && branches.unshift(singleCharactersBranch.length === 1 ? singleCharactersBranch[0] : "[" + singleCharactersBranch.join("") + "]");
5795
+ return branches.length === 0 ? "" : (branches.length === 1 && (singleCharactersBranch.length || noEmptyBranch) ? branches[0] : "(?:" + branches.join("|") + ")") + (noEmptyBranch ? "" : "?");
5796
+ }
5797
+ __name(sourcify, "sourcify");
5798
+ var WeakSet$1 = WeakSet;
5799
+ var has = WeakSet.prototype.has;
5800
+ var add = WeakSet.prototype.add;
5801
+ var del = WeakSet.prototype["delete"];
5802
+ var keys = Object.keys;
5803
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
5804
+ var Null$1 = (
5805
+ /* j-globals: null (internal) */
5806
+ /* @__PURE__ */ function() {
5807
+ var assign = Object.assign || /* @__PURE__ */ __name(function assign2(target, source) {
5808
+ var keys$1, index, key;
5809
+ for (keys$1 = keys(source), index = 0; index < keys$1.length; ++index) {
5810
+ key = keys$1[index];
5811
+ target[key] = source[key];
5812
+ }
5813
+ if (getOwnPropertySymbols) {
5814
+ for (keys$1 = getOwnPropertySymbols(source), index = 0; index < keys$1.length; ++index) {
5815
+ key = keys$1[index];
5816
+ if (isEnum(source, key)) {
5817
+ target[key] = source[key];
5818
+ }
5819
+ }
5820
+ }
5821
+ return target;
5822
+ }, "assign");
5823
+ function Nullify(constructor) {
5824
+ delete constructor.prototype.constructor;
5825
+ freeze(constructor.prototype);
5826
+ return constructor;
5827
+ }
5828
+ __name(Nullify, "Nullify");
5829
+ function Null(origin) {
5830
+ return origin === undefined$1 ? this : typeof origin === "function" ? /* @__PURE__ */ Nullify(origin) : /* @__PURE__ */ assign(/* @__PURE__ */ create(NULL), origin);
5831
+ }
5832
+ __name(Null, "Null");
5833
+ delete Null.name;
5834
+ Null.prototype = null;
5835
+ freeze(Null);
5836
+ return Null;
5837
+ }()
5838
+ );
5839
+ var is = Object.is;
5840
+ var Object_defineProperties = Object.defineProperties;
5841
+ var fromEntries = Object.fromEntries;
5842
+ var Reflect_construct = Reflect.construct;
5843
+ var Reflect_defineProperty = Reflect.defineProperty;
5844
+ var Reflect_deleteProperty = Reflect.deleteProperty;
5845
+ var ownKeys = Reflect.ownKeys;
5846
+ var Keeper = /* @__PURE__ */ __name(() => [], "Keeper");
5847
+ var newWeakMap = /* @__PURE__ */ __name(() => {
5848
+ const weakMap = new WeakMap$1();
5849
+ weakMap.has = weakMap.has;
5850
+ weakMap.get = weakMap.get;
5851
+ weakMap.set = weakMap.set;
5852
+ return weakMap;
5853
+ }, "newWeakMap");
5854
+ var target2keeper = /* @__PURE__ */ newWeakMap();
5855
+ var proxy2target = /* @__PURE__ */ newWeakMap();
5856
+ var target2proxy = /* @__PURE__ */ newWeakMap();
5857
+ var handlers = /* @__PURE__ */ assign$1(create$1(NULL), {
5858
+ defineProperty: /* @__PURE__ */ __name((target, key, descriptor) => {
5859
+ if (hasOwn(target, key)) {
5860
+ return Reflect_defineProperty(target, key, assign$1(create$1(NULL), descriptor));
5861
+ }
5862
+ if (Reflect_defineProperty(target, key, assign$1(create$1(NULL), descriptor))) {
5863
+ const keeper = target2keeper.get(target);
5864
+ keeper[keeper.length] = key;
5865
+ return true;
5866
+ }
5867
+ return false;
5868
+ }, "defineProperty"),
5869
+ deleteProperty: /* @__PURE__ */ __name((target, key) => {
5870
+ if (Reflect_deleteProperty(target, key)) {
5871
+ const keeper = target2keeper.get(target);
5872
+ const index = keeper.indexOf(key);
5873
+ index < 0 || --keeper.copyWithin(index, index + 1).length;
5874
+ return true;
5875
+ }
5876
+ return false;
5877
+ }, "deleteProperty"),
5878
+ ownKeys: /* @__PURE__ */ __name((target) => target2keeper.get(target), "ownKeys"),
5879
+ construct: /* @__PURE__ */ __name((target, args, newTarget) => orderify(Reflect_construct(target, args, newTarget)), "construct"),
5880
+ apply: /* @__PURE__ */ __name((target, thisArg, args) => orderify(apply$1(target, thisArg, args)), "apply")
5881
+ });
5882
+ var newProxy = /* @__PURE__ */ __name((target, keeper) => {
5883
+ target2keeper.set(target, keeper);
5884
+ const proxy = new Proxy$1(target, handlers);
5885
+ proxy2target.set(proxy, target);
5886
+ return proxy;
5887
+ }, "newProxy");
5888
+ var orderify = /* @__PURE__ */ __name((object) => {
5889
+ if (proxy2target.has(object)) {
5890
+ return object;
5891
+ }
5892
+ let proxy = target2proxy.get(object);
5893
+ if (proxy) {
5894
+ return proxy;
5895
+ }
5896
+ proxy = newProxy(object, assign$1(Keeper(), ownKeys(object)));
5897
+ target2proxy.set(object, proxy);
5898
+ return proxy;
5899
+ }, "orderify");
5900
+ var map_has = WeakMap.prototype.has;
5901
+ var map_del = WeakMap.prototype["delete"];
5902
+ var INLINES = new WeakMap$1();
5903
+ var SECTIONS = new WeakSet$1();
5904
+ var ofInline = /* @__PURE__ */ get.bind(INLINES);
5905
+ var isSection = /* @__PURE__ */ has.bind(SECTIONS);
5906
+ var tables = new WeakSet$1();
5907
+ var implicitTables = new WeakSet$1();
5908
+ var pairs = new WeakSet$1();
5909
+ var NONE = [];
5910
+ var sourcePath = "";
5911
+ var sourceLines = NONE;
5912
+ var lineIndex = -1;
5913
+ var throws = /* @__PURE__ */ __name((error) => {
5914
+ throw error;
5915
+ }, "throws");
5916
+ var where = /* @__PURE__ */ __name((pre, rowIndex = lineIndex, columnNumber = 0) => sourceLines === NONE ? "" : sourcePath ? `
5917
+ at (${sourcePath}:${rowIndex + 1}:${columnNumber})` : `${pre}line ${rowIndex + 1}: ${sourceLines[rowIndex]}`, "where");
5918
+ var Whitespace = /[ \t]/;
5919
+ var { exec: VALUE_REST_exec } = /* @__PURE__ */ newRegExp.s`
5920
+ ^
5921
+ (
5922
+ (?:\d\d\d\d-\d\d-\d\d \d)?
5923
+ [\w\-+.:]+
5924
+ )
5925
+ ${Whitespace}*
5926
+ (.*)
5927
+ $`.valueOf();
5928
+ var { exec: LITERAL_STRING_exec } = /* @__PURE__ */ newRegExp.s`
5929
+ ^
5930
+ '([^']*)'
5931
+ ${Whitespace}*
5932
+ (.*)`.valueOf();
5933
+ var { exec: MULTI_LINE_LITERAL_STRING_0_1_2 } = /* @__PURE__ */ newRegExp.s`
5934
+ ^
5935
+ (.*?)
5936
+ '''('{0,2})
5937
+ ${Whitespace}*
5938
+ (.*)`.valueOf();
5939
+ var { exec: MULTI_LINE_LITERAL_STRING_0 } = /* @__PURE__ */ newRegExp.s`
5940
+ ^
5941
+ (.*?)
5942
+ '''()
5943
+ ${Whitespace}*
5944
+ (.*)`.valueOf();
5945
+ var Tag = /[^\x00-\x1F"#'()<>[\\\]`{}\x7F]+/;
5946
+ var { exec: KEY_VALUE_PAIR_exec } = /* @__PURE__ */ newRegExp.s`
5947
+ ^
5948
+ ${Whitespace}*
5949
+ =
5950
+ ${Whitespace}*
5951
+ (?:
5952
+ <(${Tag})>
5953
+ ${Whitespace}*
5954
+ )?
5955
+ (.*)
5956
+ $`.valueOf();
5957
+ var { exec: _VALUE_PAIR_exec } = /* @__PURE__ */ newRegExp.s`
5958
+ ^
5959
+ <(${Tag})>
5960
+ ${Whitespace}*
5961
+ (.*)
5962
+ $`.valueOf();
5963
+ var { exec: TAG_REST_exec } = /* @__PURE__ */ newRegExp.s`
5964
+ ^
5965
+ <(${Tag})>
5966
+ ${Whitespace}*
5967
+ (.*)
5968
+ $`.valueOf();
5969
+ var MULTI_LINE_BASIC_STRING = theRegExp(/[^\\"]+|\\.?|"(?!"")"?/sy);
5970
+ var BASIC_STRING_TAB______ = theRegExp(/[^\\"\x00-\x08\x0B-\x1F\x7F]+|\\(?:[btnfr"\\]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);
5971
+ var BASIC_STRING__________ = theRegExp(/[^\\"\x00-\x08\x0B-\x1F\x7F]+|\\(?:[btnfr"\\]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);
5972
+ var BASIC_STRING_DEL______ = theRegExp(/[^\\"\x00-\x08\x0B-\x1F]+|\\(?:[btnfr"\\]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);
5973
+ var BASIC_STRING_DEL_SLASH = theRegExp(/[^\\"\x00-\x08\x0B-\x1F]+|\\(?:[btnfr"\\/]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);
5974
+ var { test: IS_DOT_KEY } = theRegExp(/^[ \t]*\./);
5975
+ var { exec: BARE_KEY_STRICT } = theRegExp(/^[\w-]+/);
5976
+ var { exec: BARE_KEY_FREE } = theRegExp(/^[^ \t#=[\]'".]+(?:[ \t]+[^ \t#=[\]'".]+)*/);
5977
+ var { exec: LITERAL_KEY____ } = theRegExp(/^'[^'\x00-\x08\x0B-\x1F\x7F]*'/);
5978
+ var { exec: LITERAL_KEY_DEL } = theRegExp(/^'[^'\x00-\x08\x0B-\x1F]*'/);
5979
+ var { test: CONTROL_CHARACTER_EXCLUDE_TAB____ } = theRegExp(/[\x00-\x08\x0B-\x1F\x7F]/);
5980
+ var { test: CONTROL_CHARACTER_EXCLUDE_TAB_DEL } = theRegExp(/[\x00-\x08\x0B-\x1F]/);
5981
+ var NUM = /* @__PURE__ */ newRegExp`
5982
+ (?:
5983
+ 0
5984
+ (?:
5985
+ b[01][_01]*
5986
+ |
5987
+ o[0-7][_0-7]*
5988
+ |
5989
+ x[\dA-Fa-f][_\dA-Fa-f]*
5990
+ |
5991
+ (?:\.\d[_\d]*)?(?:[Ee]-?\d[_\d]*)?
5992
+ )
5993
+ |
5994
+ [1-9][_\d]*
5995
+ (?:\.\d[_\d]*)?(?:[Ee]-?\d[_\d]*)?
5996
+ |
5997
+ inf
5998
+ |
5999
+ nan
6000
+ )
6001
+ `.valueOf();
6002
+ var { test: IS_AMAZING } = /* @__PURE__ */ newRegExp`
6003
+ ^(?:
6004
+ -?${NUM}
6005
+ (?:-${NUM})*
6006
+ |
6007
+ true
6008
+ |
6009
+ false
6010
+ )$
6011
+ `.valueOf();
6012
+ var { test: BAD_DXOB } = /* @__PURE__ */ newRegExp`_(?![\dA-Fa-f])`.valueOf();
6013
+ var isAmazing = /* @__PURE__ */ __name((keys2) => IS_AMAZING(keys2) && !BAD_DXOB(keys2), "isAmazing");
6014
+ var Keys = class KeysRegExp extends RegExp$1 {
6015
+ static {
6016
+ __name(this, "KeysRegExp");
6017
+ }
6018
+ constructor(keys2) {
6019
+ super(`^${groupify(keys2)}$`);
6020
+ let maxLength = -1;
6021
+ for (let index = keys2.length; index; ) {
6022
+ const { length } = keys2[--index];
6023
+ if (length > maxLength) {
6024
+ maxLength = length;
6025
+ }
6026
+ }
6027
+ this.lastIndex = maxLength + 1;
6028
+ return this;
6029
+ }
6030
+ test(key) {
6031
+ return key.length < this.lastIndex && super.test(key);
6032
+ }
6033
+ };
6034
+ var isKeys = /* @__PURE__ */ isPrototypeOf.bind(/* @__PURE__ */ freeze(Keys.prototype));
6035
+ var zeroDatetime;
6036
+ var arrayTypes = new WeakMap$1();
6037
+ var arrayTypes_get = /* @__PURE__ */ get.bind(arrayTypes);
6038
+ var arrayTypes_set = /* @__PURE__ */ set.bind(arrayTypes);
6039
+ var As = /* @__PURE__ */ __name(() => {
6040
+ const as = /* @__PURE__ */ __name((array) => {
6041
+ const got = arrayTypes_get(array);
6042
+ got ? got === as || throws(TypeError$1(`Types in Array must be same` + where(". Check "))) : arrayTypes_set(array, as);
6043
+ return array;
6044
+ }, "as");
6045
+ return as;
6046
+ }, "As");
6047
+ var AS_TYPED = {
6048
+ asNulls: As(),
6049
+ asStrings: As(),
6050
+ asTables: As(),
6051
+ asArrays: As(),
6052
+ asBooleans: As(),
6053
+ asFloats: As(),
6054
+ asIntegers: As(),
6055
+ asOffsetDateTimes: As(),
6056
+ asLocalDateTimes: As(),
6057
+ asLocalDates: As(),
6058
+ asLocalTimes: As()
6059
+ };
6060
+ var isView = ArrayBuffer.isView;
6061
+ var TextDecoder$1 = TextDecoder;
6062
+ var Symbol$1 = Symbol;
6063
+ var previous = Symbol$1("previous");
6064
+ var _literal = Symbol$1("_literal");
6065
+ var arrays = new WeakSet$1();
6066
+ var staticalArrays = new WeakSet$1();
6067
+ var NativeDate = Date;
6068
+ var parse$2 = Date.parse;
6069
+ var preventExtensions = Object.preventExtensions;
6070
+ var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
6071
+ var defineProperties = (
6072
+ /* j-globals: null.defineProperties (internal) */
6073
+ /* @__PURE__ */ __name(function defineProperties2(object, descriptorMap) {
6074
+ var created = create$1(NULL);
6075
+ var names = keys(descriptorMap);
6076
+ for (var length = names.length, index = 0; index < length; ++index) {
6077
+ var name = names[index];
6078
+ created[name] = Descriptor(descriptorMap[name]);
6079
+ }
6080
+ if (getOwnPropertySymbols) {
6081
+ var symbols = getOwnPropertySymbols(descriptorMap);
6082
+ for (length = symbols.length, index = 0; index < length; ++index) {
6083
+ var symbol = symbols[index];
6084
+ if (isEnum(descriptorMap, symbol)) {
6085
+ created[symbol] = Descriptor(descriptorMap[symbol]);
6086
+ }
6087
+ }
6088
+ }
6089
+ return Object_defineProperties(object, created);
6090
+ }, "defineProperties")
6091
+ );
6092
+ var fpc = /* @__PURE__ */ __name((c) => {
6093
+ freeze(freeze(c).prototype);
6094
+ return c;
6095
+ }, "fpc");
6096
+ var _29_ = /(?:0[1-9]|1\d|2\d)/;
6097
+ var _30_ = /(?:0[1-9]|[12]\d|30)/;
6098
+ var _31_ = /(?:0[1-9]|[12]\d|3[01])/;
6099
+ var _23_ = /(?:[01]\d|2[0-3])/;
6100
+ var _59_ = /[0-5]\d/;
6101
+ var YMD = /* @__PURE__ */ newRegExp`
6102
+ \d\d\d\d-
6103
+ (?:
6104
+ 0
6105
+ (?:
6106
+ [13578]-${_31_}
6107
+ |
6108
+ [469]-${_30_}
6109
+ |
6110
+ 2-${_29_}
6111
+ )
6112
+ |
6113
+ 1
6114
+ (?:
6115
+ [02]-${_31_}
6116
+ |
6117
+ 1-${_30_}
6118
+ )
6119
+ )
6120
+ `.valueOf();
6121
+ var HMS = /* @__PURE__ */ newRegExp`
6122
+ ${_23_}:${_59_}:${_59_}
6123
+ `.valueOf();
6124
+ var OFFSET$ = /(?:[Zz]|[+-]\d\d:\d\d)$/;
6125
+ var { exec: Z_exec } = theRegExp(/(([+-])\d\d):(\d\d)$/);
6126
+ var { exec: OFFSET_DATETIME_exec } = /* @__PURE__ */ newRegExp`
6127
+ ^
6128
+ ${YMD}
6129
+ [Tt ]
6130
+ ${HMS}
6131
+ (?:\.\d{1,3}(\d*?)0*)?
6132
+ (?:[Zz]|[+-]${_23_}:${_59_})
6133
+ $`.valueOf();
6134
+ var { exec: OFFSET_DATETIME_ZERO_exec } = /* @__PURE__ */ newRegExp`
6135
+ ^
6136
+ ${YMD}
6137
+ [Tt ]
6138
+ ${HMS}
6139
+ ()
6140
+ [Zz]
6141
+ $`.valueOf();
6142
+ var { test: IS_LOCAL_DATETIME } = /* @__PURE__ */ newRegExp`
6143
+ ^
6144
+ ${YMD}
6145
+ [Tt ]
6146
+ ${HMS}
6147
+ (?:\.\d+)?
6148
+ $`.valueOf();
6149
+ var { test: IS_LOCAL_DATE } = /* @__PURE__ */ newRegExp`
6150
+ ^
6151
+ ${YMD}
6152
+ $`.valueOf();
6153
+ var { test: IS_LOCAL_TIME } = /* @__PURE__ */ newRegExp`
6154
+ ^
6155
+ ${HMS}
6156
+ (?:\.\d+)?
6157
+ $`.valueOf();
6158
+ var T = /[ t]/;
6159
+ var DELIMITER_DOT = /[-T:.]/g;
6160
+ var DOT_ZERO = /\.?0+$/;
6161
+ var ZERO = /\.(\d*?)0+$/;
6162
+ var zeroReplacer = /* @__PURE__ */ __name((match, p1) => p1, "zeroReplacer");
6163
+ var Datetime = /* @__PURE__ */ (() => {
6164
+ const Datetime2 = /* @__PURE__ */ __name(function() {
6165
+ return this;
6166
+ }, "Datetime");
6167
+ const descriptors = Null$1(null);
6168
+ {
6169
+ const descriptor = Null$1(null);
6170
+ for (const key of ownKeys(NativeDate.prototype)) {
6171
+ key === "constructor" || key === "toJSON" || (descriptors[key] = descriptor);
6172
+ }
6173
+ }
6174
+ Datetime2.prototype = preventExtensions(create$1(NativeDate.prototype, descriptors));
6175
+ return freeze(Datetime2);
6176
+ })();
6177
+ var Value = /* @__PURE__ */ __name((ISOString) => ISOString.replace(ZERO, zeroReplacer).replace(DELIMITER_DOT, ""), "Value");
6178
+ var d = /./gs;
6179
+ var d2u = /* @__PURE__ */ __name((d2) => "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009"[d2], "d2u");
6180
+ var ValueOFFSET = /* @__PURE__ */ __name((time, more) => time < 0 ? ("" + (time + 6216730554e4)).replace(d, d2u).padStart(14, "\u2000") + more.replace(d, d2u) + time : more ? (time + ".").padStart(16, "0") + more : ("" + time).padStart(15, "0"), "ValueOFFSET");
6181
+ var validateLeap = /* @__PURE__ */ __name((literal) => {
6182
+ if (literal.startsWith("02-29", 5)) {
6183
+ const year = +literal.slice(0, 4);
6184
+ return year & 3 ? false : year % 100 ? true : year % 400 ? false : year % 3200 ? true : false;
6185
+ }
6186
+ return true;
6187
+ }, "validateLeap");
6188
+ var { test: VALIDATE_LEAP } = /* @__PURE__ */ newRegExp.s`^.....(?:06.30|12.31).23:59:59`.valueOf();
6189
+ var DATE$1 = /* @__PURE__ */ defineProperties(new NativeDate(0), /* @__PURE__ */ getOwnPropertyDescriptors(NativeDate.prototype));
6190
+ var OffsetDateTime_ISOString = Symbol$1("OffsetDateTime_ISOString");
6191
+ var OffsetDateTime_value = Symbol$1("OffsetDateTime_value");
6192
+ var OffsetDateTime_use = /* @__PURE__ */ __name((that, $ = 0) => {
6193
+ DATE$1.setTime(+that[OffsetDateTime_value] + $);
6194
+ return DATE$1;
6195
+ }, "OffsetDateTime_use");
6196
+ var OffsetDateTime = /* @__PURE__ */ fpc(class OffsetDateTime2 extends Datetime {
6197
+ static {
6198
+ __name(this, "OffsetDateTime");
6199
+ }
6200
+ [OffsetDateTime_ISOString];
6201
+ [OffsetDateTime_value];
6202
+ get [Symbol$1.toStringTag]() {
6203
+ return "OffsetDateTime";
6204
+ }
6205
+ valueOf() {
6206
+ return this[OffsetDateTime_value];
6207
+ }
6208
+ toISOString() {
6209
+ return this[OffsetDateTime_ISOString];
6210
+ }
6211
+ constructor(literal) {
6212
+ validateLeap(literal) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(" at ")));
6213
+ const with60 = literal.startsWith("60", 17);
6214
+ let without60 = with60 ? literal.slice(0, 17) + "59" + literal.slice(19) : literal;
6215
+ const { 1: more = "" } = (zeroDatetime ? OFFSET_DATETIME_ZERO_exec(without60) : OFFSET_DATETIME_exec(without60)) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(" at ")));
6216
+ const time = parse$2(without60 = without60.replace(T, "T").replace("z", "Z"));
6217
+ if (with60) {
6218
+ DATE$1.setTime(time);
6219
+ VALIDATE_LEAP(DATE$1.toISOString()) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(" at ")));
6220
+ }
6221
+ super();
6222
+ this[OffsetDateTime_ISOString] = without60;
6223
+ this[OffsetDateTime_value] = ValueOFFSET(time, more);
6224
+ return this;
6225
+ }
6226
+ getUTCFullYear() {
6227
+ return OffsetDateTime_use(this).getUTCFullYear();
6228
+ }
6229
+ ///get year () :FullYear { return OffsetDateTime_get(this, 0, 4); }
6230
+ ///set year (value :FullYear) { OffsetDateTime_set(this, 0, 4, value, true); }
6231
+ getUTCMonth() {
6232
+ return OffsetDateTime_use(this).getUTCMonth();
6233
+ }
6234
+ ///get month () { return OffsetDateTime_get(this, 5, 7); }
6235
+ ///set month (value) { OffsetDateTime_set(this, 5, 7, value, true); }
6236
+ getUTCDate() {
6237
+ return OffsetDateTime_use(this).getUTCDate();
6238
+ }
6239
+ ///get day () :Date { return OffsetDateTime_get(this, 8, 10); }
6240
+ ///set day (value :Date) { OffsetDateTime_set(this, 8, 10, value, true); }
6241
+ getUTCHours() {
6242
+ return OffsetDateTime_use(this).getUTCHours();
6243
+ }
6244
+ ///get hour () :Hours { return OffsetDateTime_get(this, 11, 13); }
6245
+ ///set hour (value :Hours) { OffsetDateTime_set(this, 11, 13, value, true); }
6246
+ getUTCMinutes() {
6247
+ return OffsetDateTime_use(this).getUTCMinutes();
6248
+ }
6249
+ ///get minute () :Minutes { return OffsetDateTime_get(this, 14, 16); }
6250
+ ///set minute (value :Minutes) { OffsetDateTime_set(this, 14, 16, value, true); }
6251
+ getUTCSeconds() {
6252
+ return OffsetDateTime_use(this).getUTCSeconds();
6253
+ }
6254
+ ///get second () :Seconds { return OffsetDateTime_get(this, 17, 19); }
6255
+ ///set second (value :Seconds) { OffsetDateTime_set(this, 17, 19, value, true); }
6256
+ getUTCMilliseconds() {
6257
+ return OffsetDateTime_use(this).getUTCMilliseconds();
6258
+ }
6259
+ ///
6260
+ ///get millisecond () :Milliseconds { return this[OffsetDateTime_value]%1000; }///
6261
+ /*set millisecond (value :Milliseconds) {
6262
+ this[OffsetDateTime_ISOString] = this[OffsetDateTime_ISOString].slice(0, 19) + ( value ? ( '.' + ( '' + value ).padStart(3, '0') ).replace(DOT_ZERO, '') : '' ) + this[OffsetDateTime_ISOString].slice(this[OffsetDateTime_ISOString].search(OFFSET$));
6263
+ OffsetDateTime_set(this, 0, 0, 0, false);
6264
+ }*/
6265
+ //
6266
+ ///get microsecond () :Milliseconds
6267
+ ///set microsecond (value :Milliseconds)
6268
+ ///get nanosecond () :Milliseconds
6269
+ ///set nanosecond (value :Milliseconds)
6270
+ getUTCDay() {
6271
+ return OffsetDateTime_use(this).getUTCDay();
6272
+ }
6273
+ ///get dayOfWeek () { return OffsetDateTime_use(this, this.getTimezoneOffset()*60000).getUTCDay() || 7; }
6274
+ getTimezoneOffset() {
6275
+ const z2 = Z_exec(this[OffsetDateTime_ISOString]);
6276
+ return z2 ? +z2[1] * 60 + +(z2[2] + z2[3]) : 0;
6277
+ }
6278
+ ///get offset () { return this[OffsetDateTime_ISOString].endsWith('Z') ? 'Z' : this[OffsetDateTime_ISOString].slice(-6); }
6279
+ /*set offset (value) {
6280
+ this[OffsetDateTime_ISOString] = this[OffsetDateTime_ISOString].slice(0, this[OffsetDateTime_ISOString].endsWith('Z') ? -1 : -6) + value;
6281
+ OffsetDateTime_set(this, 0, 0, 0, true);
6282
+ }*/
6283
+ //
6284
+ getTime() {
6285
+ return floor(+this[OffsetDateTime_value]);
6286
+ }
6287
+ ///
6288
+ /*setTime (this :OffsetDateTime, value :Time) :void {
6289
+ value = DATE.setTime(value);
6290
+ const z = Z_exec(this[OffsetDateTime_ISOString]);
6291
+ DATE.setTime(value + ( z ? +z[1]*60 + +( z[2] + z[3] ) : 0 )*60000);
6292
+ this[OffsetDateTime_ISOString] = z ? DATE.toISOString().slice(0, -1) + z[0] : DATE.toISOString();
6293
+ this[OffsetDateTime_value] = ValueOFFSET(value, '');
6294
+ ///return value;
6295
+ }*/
6296
+ });
6297
+ var LocalDateTime_ISOString = Symbol$1("LocalDateTime_ISOString");
6298
+ var LocalDateTime_value = Symbol$1("LocalDateTime_value");
6299
+ var LocalDateTime_get = /* @__PURE__ */ __name((that, start, end) => +that[LocalDateTime_ISOString].slice(start, end), "LocalDateTime_get");
6300
+ var LocalDateTime_set = /* @__PURE__ */ __name((that, start, end, value) => {
6301
+ const string = "" + value;
6302
+ const size = end - start;
6303
+ if (string.length > size) {
6304
+ throw RangeError$1();
6305
+ }
6306
+ that[LocalDateTime_value] = Value(
6307
+ that[LocalDateTime_ISOString] = that[LocalDateTime_ISOString].slice(0, start) + string.padStart(size, "0") + that[LocalDateTime_ISOString].slice(end)
6308
+ );
6309
+ }, "LocalDateTime_set");
6310
+ var LocalDateTime = /* @__PURE__ */ fpc(class LocalDateTime2 extends Datetime {
6311
+ static {
6312
+ __name(this, "LocalDateTime");
6313
+ }
6314
+ [LocalDateTime_ISOString];
6315
+ [LocalDateTime_value];
6316
+ get [Symbol$1.toStringTag]() {
6317
+ return "LocalDateTime";
6318
+ }
6319
+ valueOf() {
6320
+ return this[LocalDateTime_value];
6321
+ }
6322
+ toISOString() {
6323
+ return this[LocalDateTime_ISOString];
6324
+ }
6325
+ constructor(literal) {
6326
+ IS_LOCAL_DATETIME(literal) && validateLeap(literal) || throws(SyntaxError$1(`Invalid Local Date-Time ${literal}` + where(" at ")));
6327
+ super();
6328
+ this[LocalDateTime_value] = Value(
6329
+ this[LocalDateTime_ISOString] = literal.replace(T, "T")
6330
+ );
6331
+ return this;
6332
+ }
6333
+ getFullYear() {
6334
+ return LocalDateTime_get(this, 0, 4);
6335
+ }
6336
+ setFullYear(value) {
6337
+ LocalDateTime_set(this, 0, 4, value);
6338
+ }
6339
+ getMonth() {
6340
+ return LocalDateTime_get(this, 5, 7) - 1;
6341
+ }
6342
+ setMonth(value) {
6343
+ LocalDateTime_set(this, 5, 7, value + 1);
6344
+ }
6345
+ getDate() {
6346
+ return LocalDateTime_get(this, 8, 10);
6347
+ }
6348
+ setDate(value) {
6349
+ LocalDateTime_set(this, 8, 10, value);
6350
+ }
6351
+ getHours() {
6352
+ return LocalDateTime_get(this, 11, 13);
6353
+ }
6354
+ setHours(value) {
6355
+ LocalDateTime_set(this, 11, 13, value);
6356
+ }
6357
+ getMinutes() {
6358
+ return LocalDateTime_get(this, 14, 16);
6359
+ }
6360
+ setMinutes(value) {
6361
+ LocalDateTime_set(this, 14, 16, value);
6362
+ }
6363
+ getSeconds() {
6364
+ return LocalDateTime_get(this, 17, 19);
6365
+ }
6366
+ setSeconds(value) {
6367
+ LocalDateTime_set(this, 17, 19, value);
6368
+ }
6369
+ getMilliseconds() {
6370
+ return +this[LocalDateTime_value].slice(14, 17).padEnd(3, "0");
6371
+ }
6372
+ ///
6373
+ setMilliseconds(value) {
6374
+ this[LocalDateTime_value] = Value(
6375
+ this[LocalDateTime_ISOString] = this[LocalDateTime_ISOString].slice(0, 19) + (value ? ("." + ("" + value).padStart(3, "0")).replace(DOT_ZERO, "") : "")
6376
+ );
6377
+ }
6378
+ });
6379
+ var LocalDate_ISOString = Symbol$1("LocalDate_ISOString");
6380
+ var LocalDate_value = Symbol$1("LocalDate_value");
6381
+ var LocalDate_get = /* @__PURE__ */ __name((that, start, end) => +that[LocalDate_ISOString].slice(start, end), "LocalDate_get");
6382
+ var LocalDate_set = /* @__PURE__ */ __name((that, start, end, value) => {
6383
+ const string = "" + value;
6384
+ const size = end - start;
6385
+ if (string.length > size) {
6386
+ throw RangeError$1();
6387
+ }
6388
+ that[LocalDate_value] = Value(
6389
+ that[LocalDate_ISOString] = that[LocalDate_ISOString].slice(0, start) + string.padStart(size, "0") + that[LocalDate_ISOString].slice(end)
6390
+ );
6391
+ }, "LocalDate_set");
6392
+ var LocalDate = /* @__PURE__ */ fpc(class LocalDate2 extends Datetime {
6393
+ static {
6394
+ __name(this, "LocalDate");
6395
+ }
6396
+ [LocalDate_ISOString];
6397
+ [LocalDate_value];
6398
+ get [Symbol$1.toStringTag]() {
6399
+ return "LocalDate";
6400
+ }
6401
+ valueOf() {
6402
+ return this[LocalDate_value];
6403
+ }
6404
+ toISOString() {
6405
+ return this[LocalDate_ISOString];
6406
+ }
6407
+ constructor(literal) {
6408
+ IS_LOCAL_DATE(literal) && validateLeap(literal) || throws(SyntaxError$1(`Invalid Local Date ${literal}` + where(" at ")));
6409
+ super();
6410
+ this[LocalDate_value] = Value(
6411
+ this[LocalDate_ISOString] = literal
6412
+ );
6413
+ return this;
6414
+ }
6415
+ getFullYear() {
6416
+ return LocalDate_get(this, 0, 4);
6417
+ }
6418
+ setFullYear(value) {
6419
+ LocalDate_set(this, 0, 4, value);
6420
+ }
6421
+ getMonth() {
6422
+ return LocalDate_get(this, 5, 7) - 1;
6423
+ }
6424
+ setMonth(value) {
6425
+ LocalDate_set(this, 5, 7, value + 1);
6426
+ }
6427
+ getDate() {
6428
+ return LocalDate_get(this, 8, 10);
6429
+ }
6430
+ setDate(value) {
6431
+ LocalDate_set(this, 8, 10, value);
6432
+ }
6433
+ });
6434
+ var LocalTime_ISOString = Symbol$1("LocalTime_ISOString");
6435
+ var LocalTime_value = Symbol$1("LocalTime_value");
6436
+ var LocalTime_get = /* @__PURE__ */ __name((that, start, end) => +that[LocalTime_ISOString].slice(start, end), "LocalTime_get");
6437
+ var LocalTime_set = /* @__PURE__ */ __name((that, start, end, value) => {
6438
+ const string = "" + value;
6439
+ const size = end - start;
6440
+ if (string.length > size) {
6441
+ throw RangeError$1();
6442
+ }
6443
+ that[LocalTime_value] = Value(
6444
+ that[LocalTime_ISOString] = that[LocalTime_ISOString].slice(0, start) + string.padStart(2, "0") + that[LocalTime_ISOString].slice(end)
6445
+ );
6446
+ }, "LocalTime_set");
6447
+ var LocalTime = /* @__PURE__ */ fpc(class LocalTime2 extends Datetime {
6448
+ static {
6449
+ __name(this, "LocalTime");
6450
+ }
6451
+ [LocalTime_ISOString];
6452
+ [LocalTime_value];
6453
+ get [Symbol$1.toStringTag]() {
6454
+ return "LocalTime";
6455
+ }
6456
+ valueOf() {
6457
+ return this[LocalTime_value];
6458
+ }
6459
+ toISOString() {
6460
+ return this[LocalTime_ISOString];
6461
+ }
6462
+ constructor(literal) {
6463
+ IS_LOCAL_TIME(literal) || throws(SyntaxError$1(`Invalid Local Time ${literal}` + where(" at ")));
6464
+ super();
6465
+ this[LocalTime_value] = Value(
6466
+ this[LocalTime_ISOString] = literal
6467
+ );
6468
+ return this;
6469
+ }
6470
+ getHours() {
6471
+ return LocalTime_get(this, 0, 2);
6472
+ }
6473
+ setHours(value) {
6474
+ LocalTime_set(this, 0, 2, value);
6475
+ }
6476
+ getMinutes() {
6477
+ return LocalTime_get(this, 3, 5);
6478
+ }
6479
+ setMinutes(value) {
6480
+ LocalTime_set(this, 3, 5, value);
6481
+ }
6482
+ getSeconds() {
6483
+ return LocalTime_get(this, 6, 8);
6484
+ }
6485
+ setSeconds(value) {
6486
+ LocalTime_set(this, 6, 8, value);
6487
+ }
6488
+ getMilliseconds() {
6489
+ return +this[LocalTime_value].slice(6, 9).padEnd(3, "0");
6490
+ }
6491
+ ///
6492
+ setMilliseconds(value) {
6493
+ this[LocalTime_value] = Value(
6494
+ this[LocalTime_ISOString] = this[LocalTime_ISOString].slice(0, 8) + (value ? ("." + ("" + value).padStart(3, "0")).replace(DOT_ZERO, "") : "")
6495
+ );
6496
+ }
6497
+ });
6498
+ var fromCodePoint = String.fromCodePoint;
6499
+ var INTEGER_D = /[-+]?(?:0|[1-9][_\d]*)/;
6500
+ var { test: BAD_D } = /* @__PURE__ */ newRegExp`_(?!\d)`.valueOf();
6501
+ var { test: IS_D_INTEGER } = /* @__PURE__ */ newRegExp`^${INTEGER_D}$`.valueOf();
6502
+ var { test: IS_XOB_INTEGER } = theRegExp(/^0(?:x[\dA-Fa-f][_\dA-Fa-f]*|o[0-7][_0-7]*|b[01][_01]*)$/);
6503
+ var { test: BAD_XOB } = /* @__PURE__ */ newRegExp`_(?![\dA-Fa-f])`.valueOf();
6504
+ var MIN = BigInt$1 && -/* @__PURE__ */ BigInt$1("0x8000000000000000");
6505
+ var NaN$1 = 0 / 0;
6506
+ var _NaN = -NaN$1;
6507
+ var _Infinity$1 = -Infinity2;
6508
+ var { test: IS_FLOAT } = /* @__PURE__ */ newRegExp`
6509
+ ^
6510
+ ${INTEGER_D}
6511
+ (?:
6512
+ \.\d[_\d]*
6513
+ (?:[eE][-+]?\d[_\d]*)?
6514
+ |
6515
+ [eE][-+]?\d[_\d]*
6516
+ )
6517
+ $`.valueOf();
6518
+ var { test: IS_ZERO } = theRegExp(/^[-+]?0(?:\.0+)?(?:[eE][-+]?0+)?$/);
6519
+ var { exec: NORMALIZED } = theRegExp(/^[-0]?(\d*)(?:\.(\d+))?(?:e\+?(-?\d+))?$/);
6520
+ var { exec: ORIGINAL } = theRegExp(/^[-+]?0?(\d*)(?:\.(\d*?)0*)?(?:[eE]\+?(-?\d+))?$/);
6521
+ var KEYS = /* @__PURE__ */ Null$1(null);
6522
+ var commentForThis = Symbol$1("this");
6523
+ var { test: includesNewline } = theRegExp(/\r?\n/g);
6524
+ var getCOMMENT = /* @__PURE__ */ __name((table, keyComment) => {
6525
+ if (keyComment in table) {
6526
+ const comment = table[keyComment];
6527
+ if (typeof comment !== "string") {
6528
+ throw TypeError$1(`the value of comment must be a string, while "${comment === null ? "null" : typeof comment}" type is found`);
6529
+ }
6530
+ if (includesNewline(comment)) {
6531
+ throw SyntaxError$1(`the value of comment must be a string and can not include newline`);
6532
+ }
6533
+ return ` #${comment}`;
6534
+ }
6535
+ return "";
6536
+ }, "getCOMMENT");
6537
+ var getComment = /* @__PURE__ */ __name((table, key) => key in KEYS ? getCOMMENT(table, KEYS[key]) : "", "getComment");
6538
+ var { test: IS_OFFSET$ } = theRegExp(OFFSET$);
6539
+ var { test: IS_EMPTY } = theRegExp(/^\[[\t ]*]/);
6540
+ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
6541
+ var DATE = Date.prototype;
6542
+ var valueOf$2 = String.prototype.valueOf;
6543
+ var isString = (
6544
+ /* j-globals: class.isString (internal) */
6545
+ /* @__PURE__ */ function() {
6546
+ if (apply.bind) {
6547
+ var valueOf_apply = apply.bind(valueOf$2);
6548
+ return /* @__PURE__ */ __name(function isString4(value) {
6549
+ try {
6550
+ valueOf_apply(value);
6551
+ } catch (error) {
6552
+ return false;
6553
+ }
6554
+ return true;
6555
+ }, "isString");
6556
+ }
6557
+ return /* @__PURE__ */ __name(function isString4(value) {
6558
+ try {
6559
+ valueOf$2.apply(value);
6560
+ } catch (error) {
6561
+ return false;
6562
+ }
6563
+ return true;
6564
+ }, "isString");
6565
+ }()
6566
+ );
6567
+ var valueOf$1 = Number.prototype.valueOf;
6568
+ var isNumber = (
6569
+ /* j-globals: class.isNumber (internal) */
6570
+ /* @__PURE__ */ function() {
6571
+ if (apply.bind) {
6572
+ var valueOf_apply = apply.bind(valueOf$1);
6573
+ return /* @__PURE__ */ __name(function isNumber4(value) {
6574
+ try {
6575
+ valueOf_apply(value);
6576
+ } catch (error) {
6577
+ return false;
6578
+ }
6579
+ return true;
6580
+ }, "isNumber");
6581
+ }
6582
+ return /* @__PURE__ */ __name(function isNumber4(value) {
6583
+ try {
6584
+ valueOf$1.apply(value);
6585
+ } catch (error) {
6586
+ return false;
6587
+ }
6588
+ return true;
6589
+ }, "isNumber");
6590
+ }()
6591
+ );
6592
+ var isBigInt = (
6593
+ /* j-globals: class.isBigInt (internal) */
6594
+ /* @__PURE__ */ function() {
6595
+ if (typeof BigInt === "function") {
6596
+ var valueOf_apply = apply.bind(BigInt.prototype.valueOf);
6597
+ return /* @__PURE__ */ __name(function isBigInt2(value) {
6598
+ try {
6599
+ valueOf_apply(value);
6600
+ } catch (error) {
6601
+ return false;
6602
+ }
6603
+ return true;
6604
+ }, "isBigInt");
6605
+ }
6606
+ return /* @__PURE__ */ __name(function isBigInt2() {
6607
+ return false;
6608
+ }, "isBigInt");
6609
+ }()
6610
+ );
6611
+ var valueOf = BigInt.prototype.valueOf;
6612
+ var isBoolean = (
6613
+ /* j-globals: class.isBoolean (internal) */
6614
+ /* @__PURE__ */ function() {
6615
+ if (apply.bind) {
6616
+ var valueOf_apply = apply.bind(valueOf);
6617
+ return /* @__PURE__ */ __name(function isBoolean3(value) {
6618
+ try {
6619
+ valueOf_apply(value);
6620
+ } catch (error) {
6621
+ return false;
6622
+ }
6623
+ return true;
6624
+ }, "isBoolean");
6625
+ }
6626
+ return /* @__PURE__ */ __name(function isBoolean3(value) {
6627
+ try {
6628
+ valueOf.apply(value);
6629
+ } catch (error) {
6630
+ return false;
6631
+ }
6632
+ return true;
6633
+ }, "isBoolean");
6634
+ }()
6635
+ );
6636
+ var ESCAPED = /* @__PURE__ */ Null$1({
6637
+ .../* @__PURE__ */ fromEntries(/* @__PURE__ */ [...Array$1(32)].map((_, charCode) => [fromCharCode(charCode), "\\u" + charCode.toString(16).toUpperCase().padStart(4, "0")])),
6638
+ "\b": "\\b",
6639
+ " ": "\\t",
6640
+ "\n": "\\n",
6641
+ "\f": "\\f",
6642
+ "\r": "\\r",
6643
+ '"': '\\"',
6644
+ '"""': '""\\"',
6645
+ "\\": "\\\\",
6646
+ "\x7F": "\\u007F"
6647
+ });
6648
+ var { test: NEED_BASIC } = theRegExp(/[\x00-\x08\x0A-\x1F'\x7F]/);
6649
+ var BY_ESCAPE = /[^\x00-\x08\x0A-\x1F"\\\x7F]+|./gs;
6650
+ var { test: NEED_ESCAPE } = theRegExp(/^[\x00-\x08\x0A-\x1F"\\\x7F]/);
6651
+ var singlelineString = /* @__PURE__ */ __name((value) => {
6652
+ if (NEED_BASIC(value)) {
6653
+ const parts = value.match(BY_ESCAPE);
6654
+ let index = parts.length;
6655
+ do {
6656
+ if (NEED_ESCAPE(parts[--index])) {
6657
+ parts[index] = ESCAPED[parts[index]];
6658
+ }
6659
+ } while (index);
6660
+ return `"${parts.join("")}"`;
6661
+ }
6662
+ return `'${value}'`;
6663
+ }, "singlelineString");
6664
+ var { test: NEED_MULTILINE_BASIC } = theRegExp(/[\x00-\x08\x0A-\x1F\x7F]|'''/);
6665
+ var { test: multilineNeedBasic } = theRegExp(/[\x00-\x08\x0B-\x1F\x7F]|'''/);
6666
+ var { test: REAL_MULTILINE_ESCAPE } = theRegExp(/[\x00-\x08\x0A-\x1F\\\x7F]|"""/);
6667
+ var { test: NEED_MULTILINE_ESCAPE } = theRegExp(/^(?:[\x00-\x08\x0A-\x1F\\\x7F]|""")/);
6668
+ var Float64Array$1 = Float64Array;
6669
+ var Uint8Array$1 = Uint8Array;
6670
+ var _Infinity = -Infinity2;
6671
+ var { test: INTEGER_LIKE } = theRegExp(/^-?\d+$/);
6672
+ var ensureFloat = /* @__PURE__ */ __name((literal) => INTEGER_LIKE(literal) ? literal + ".0" : literal, "ensureFloat");
6673
+ var float64Array = new Float64Array$1([NaN$1]);
6674
+ var uint8Array = new Uint8Array$1(float64Array.buffer);
6675
+ var NaN_7 = uint8Array[7];
6676
+ var float = NaN_7 === new Uint8Array$1(new Float64Array$1([-NaN$1]).buffer)[7] ? (value) => value ? value === Infinity2 ? "inf" : value === _Infinity ? "-inf" : ensureFloat("" + value) : value === value ? is(value, 0) ? "0.0" : "-0.0" : "nan" : (value) => value ? value === Infinity2 ? "inf" : value === _Infinity ? "-inf" : ensureFloat("" + value) : value === value ? is(value, 0) ? "0.0" : "-0.0" : (float64Array[0] = value, uint8Array[7]) === NaN_7 ? "nan" : "-nan";
6677
+ var isDate = /* @__PURE__ */ isPrototypeOf.bind(DATE);
6678
+ var { test: BARE } = theRegExp(/^[\w-]+$/);
6679
+ var $Key$ = /* @__PURE__ */ __name((key) => BARE(key) ? key : singlelineString(key), "$Key$");
6680
+ var FIRST = /[^.]+/;
6681
+ var literalString = /* @__PURE__ */ __name((value) => `'${value}'`, "literalString");
6682
+ var $Keys = /* @__PURE__ */ __name((keys2) => isAmazing(keys2) ? keys2.replace(FIRST, literalString) : keys2 === "null" ? `'null'` : keys2, "$Keys");
6683
+ var TOMLSection = class extends Array$1 {
6684
+ static {
6685
+ __name(this, "TOMLSection");
7100
6686
  }
7101
- if (isUNCPath) {
7102
- if (!isPathAbsolute) {
7103
- return `//./${path6}`;
6687
+ document;
6688
+ constructor(document) {
6689
+ super();
6690
+ this.document = document;
6691
+ return this;
6692
+ }
6693
+ [Symbol$1.toPrimitive]() {
6694
+ return this.join(this.document.newline);
6695
+ }
6696
+ appendNewline() {
6697
+ this[this.length] = "";
6698
+ }
6699
+ set appendLine(source) {
6700
+ this[this.length] = source;
6701
+ }
6702
+ set appendInline(source) {
6703
+ this[this.length - 1] += source;
6704
+ }
6705
+ set appendInlineIf(source) {
6706
+ source && (this[this.length - 1] += source);
6707
+ }
6708
+ ///
6709
+ *assignBlock(documentKeys_, sectionKeys_, table, tableKeys) {
6710
+ const { document } = this;
6711
+ const { newlineUnderHeader, newlineUnderSectionButPair } = document;
6712
+ const newlineAfterDotted = sectionKeys_ ? document.newlineUnderPairButDotted : false;
6713
+ const newlineAfterPair = sectionKeys_ ? document.newlineUnderDotted : document.newlineUnderPair;
6714
+ for (const tableKey of tableKeys) {
6715
+ const value = table[tableKey];
6716
+ const $key$ = $Key$(tableKey);
6717
+ const documentKeys = documentKeys_ + $key$;
6718
+ if (isArray$1(value)) {
6719
+ const { length } = value;
6720
+ if (length) {
6721
+ let firstItem = value[0];
6722
+ if (isSection(firstItem)) {
6723
+ const tableHeader = `[[${documentKeys}]]`;
6724
+ const documentKeys_2 = documentKeys + ".";
6725
+ let index = 0;
6726
+ let table2 = firstItem;
6727
+ for (; ; ) {
6728
+ const section = document.appendSection();
6729
+ section[0] = tableHeader + getCOMMENT(table2, commentForThis);
6730
+ if (newlineUnderHeader) {
6731
+ section[1] = "";
6732
+ yield section.assignBlock(documentKeys_2, ``, table2, getOwnPropertyNames(table2));
6733
+ newlineUnderSectionButPair && section.length !== 2 && section.appendNewline();
6734
+ } else {
6735
+ yield section.assignBlock(documentKeys_2, ``, table2, getOwnPropertyNames(table2));
6736
+ newlineUnderSectionButPair && section.appendNewline();
6737
+ }
6738
+ if (++index === length) {
6739
+ break;
6740
+ }
6741
+ table2 = value[index];
6742
+ if (!isSection(table2)) {
6743
+ throw TypeError$1(`the first table item marked by Section() means the parent array is an array of tables, which can not include other types or table not marked by Section() any more in the rest items`);
6744
+ }
6745
+ }
6746
+ continue;
6747
+ } else {
6748
+ let index = 1;
6749
+ while (index !== length) {
6750
+ if (isSection(value[index++])) {
6751
+ throw TypeError$1(`if an array is not array of tables, it can not include any table that marked by Section()`);
6752
+ }
6753
+ }
6754
+ }
6755
+ }
6756
+ } else {
6757
+ if (isSection(value)) {
6758
+ const section = document.appendSection();
6759
+ section[0] = `[${documentKeys}]${document.preferCommentForThis ? getCOMMENT(value, commentForThis) || getComment(table, tableKey) : getComment(table, tableKey) || getCOMMENT(value, commentForThis)}`;
6760
+ if (newlineUnderHeader) {
6761
+ section[1] = "";
6762
+ yield section.assignBlock(documentKeys + ".", ``, value, getOwnPropertyNames(value));
6763
+ newlineUnderSectionButPair && section.length !== 2 && section.appendNewline();
6764
+ } else {
6765
+ yield section.assignBlock(documentKeys + ".", ``, value, getOwnPropertyNames(value));
6766
+ newlineUnderSectionButPair && section.appendNewline();
6767
+ }
6768
+ continue;
6769
+ }
6770
+ }
6771
+ const sectionKeys = sectionKeys_ + $key$;
6772
+ this.appendLine = $Keys(sectionKeys) + " = ";
6773
+ const valueKeysIfValueIsDottedTable = this.value("", value, true);
6774
+ if (valueKeysIfValueIsDottedTable) {
6775
+ --this.length;
6776
+ yield this.assignBlock(documentKeys + ".", sectionKeys + ".", value, valueKeysIfValueIsDottedTable);
6777
+ newlineAfterDotted && this.appendNewline();
6778
+ } else {
6779
+ this.appendInlineIf = getComment(table, tableKey);
6780
+ newlineAfterPair && this.appendNewline();
6781
+ }
7104
6782
  }
7105
- return `//${path6}`;
7106
6783
  }
7107
- return isPathAbsolute && !isAbsolute2(path6) ? `/${path6}` : path6;
7108
- }, "correctPaths");
7109
- function normalizeString3(path6, allowAboveRoot) {
7110
- let res = "";
7111
- let lastSegmentLength = 0;
7112
- let lastSlash = -1;
7113
- let dots = 0;
7114
- let char = null;
7115
- for (let index = 0; index <= path6.length; ++index) {
7116
- if (index < path6.length) {
7117
- char = path6[index];
7118
- } else if (char === "/") {
7119
- break;
7120
- } else {
7121
- char = "/";
7122
- }
7123
- if (char === "/") {
7124
- if (lastSlash === index - 1 || dots === 1) {
7125
- } else if (dots === 2) {
7126
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
7127
- if (res.length > 2) {
7128
- const lastSlashIndex = res.lastIndexOf("/");
7129
- if (lastSlashIndex === -1) {
7130
- res = "";
7131
- lastSegmentLength = 0;
6784
+ value(indent, value, returnValueKeysIfValueIsDottedTable) {
6785
+ switch (typeof value) {
6786
+ case "object":
6787
+ if (value === null) {
6788
+ if (this.document.nullDisabled) {
6789
+ throw TypeError$1(`toml can not stringify "null" type value without truthy options.xNull`);
6790
+ }
6791
+ this.appendInline = "null";
6792
+ break;
6793
+ }
6794
+ const inlineMode = ofInline(value);
6795
+ if (isArray$1(value)) {
6796
+ if (inlineMode === undefined$1) {
6797
+ this.staticArray(indent, value);
6798
+ } else {
6799
+ const { $singlelineArray = inlineMode } = this.document;
6800
+ this.singlelineArray(indent, value, $singlelineArray);
6801
+ }
6802
+ break;
6803
+ }
6804
+ if (inlineMode !== undefined$1) {
6805
+ inlineMode || this.document.multilineTableDisabled ? this.inlineTable(indent, value) : this.multilineTable(indent, value, this.document.multilineTableComma);
6806
+ break;
6807
+ }
6808
+ if (isDate(value)) {
6809
+ this.appendInline = value.toISOString().replace("T", this.document.T).replace("Z", this.document.Z);
6810
+ break;
6811
+ }
6812
+ if (_literal in value) {
6813
+ const literal = value[_literal];
6814
+ if (typeof literal === "string") {
6815
+ this.appendInline = literal;
6816
+ } else if (isArray$1(literal)) {
6817
+ const { length } = literal;
6818
+ if (length) {
6819
+ this.appendInline = literal[0];
6820
+ let index = 1;
6821
+ while (index !== length) {
6822
+ this.appendLine = literal[index++];
6823
+ }
7132
6824
  } else {
7133
- res = res.slice(0, lastSlashIndex);
7134
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
6825
+ throw TypeError$1(`literal value is broken`);
7135
6826
  }
7136
- lastSlash = index;
7137
- dots = 0;
7138
- continue;
7139
- } else if (res.length > 0) {
7140
- res = "";
7141
- lastSegmentLength = 0;
7142
- lastSlash = index;
7143
- dots = 0;
7144
- continue;
6827
+ } else {
6828
+ throw TypeError$1(`literal value is broken`);
7145
6829
  }
6830
+ break;
7146
6831
  }
7147
- if (allowAboveRoot) {
7148
- res += res.length > 0 ? "/.." : "..";
7149
- lastSegmentLength = 2;
6832
+ if (isString(value)) {
6833
+ throw TypeError$1(`TOML.stringify refuse to handle [object String]`);
7150
6834
  }
7151
- } else {
7152
- if (res.length > 0) {
7153
- res += `/${path6.slice(lastSlash + 1, index)}`;
6835
+ if (isNumber(value)) {
6836
+ throw TypeError$1(`TOML.stringify refuse to handle [object Number]`);
6837
+ }
6838
+ if (isBigInt(value)) {
6839
+ throw TypeError$1(`TOML.stringify refuse to handle [object BigInt]`);
6840
+ }
6841
+ if (isBoolean(value)) {
6842
+ throw TypeError$1(`TOML.stringify refuse to handle [object Boolean]`);
6843
+ }
6844
+ if (returnValueKeysIfValueIsDottedTable) {
6845
+ const keys2 = getOwnPropertyNames(value);
6846
+ if (keys2.length) {
6847
+ return keys2;
6848
+ }
6849
+ this.appendInline = "{ }";
7154
6850
  } else {
7155
- res = path6.slice(lastSlash + 1, index);
6851
+ this.inlineTable(indent, value);
7156
6852
  }
7157
- lastSegmentLength = index - lastSlash - 1;
6853
+ break;
6854
+ case "bigint":
6855
+ this.appendInline = "" + value;
6856
+ break;
6857
+ case "number":
6858
+ this.appendInline = this.document.asInteger(value) ? is(value, -0) ? "-0" : "" + value : float(value);
6859
+ break;
6860
+ case "string":
6861
+ this.appendInline = singlelineString(value);
6862
+ break;
6863
+ case "boolean":
6864
+ this.appendInline = value ? "true" : "false";
6865
+ break;
6866
+ default:
6867
+ throw TypeError$1(`toml can not stringify "${typeof value}" type value`);
6868
+ }
6869
+ return null;
6870
+ }
6871
+ singlelineArray(indent, staticArray, inlineMode) {
6872
+ const { length } = staticArray;
6873
+ if (length) {
6874
+ this.appendInline = inlineMode & 2 ? "[ " : "[";
6875
+ this.value(indent, staticArray[0], false);
6876
+ let index = 1;
6877
+ while (index !== length) {
6878
+ this.appendInline = ", ";
6879
+ this.value(indent, staticArray[index++], false);
7158
6880
  }
7159
- lastSlash = index;
7160
- dots = 0;
7161
- } else if (char === "." && dots !== -1) {
7162
- ++dots;
6881
+ this.appendInline = inlineMode & 2 ? " ]" : "]";
7163
6882
  } else {
7164
- dots = -1;
6883
+ this.appendInline = inlineMode & 1 ? "[ ]" : "[]";
6884
+ }
6885
+ }
6886
+ staticArray(indent, staticArray) {
6887
+ this.appendInline = "[";
6888
+ const indent_ = indent + this.document.indent;
6889
+ const { length } = staticArray;
6890
+ let index = 0;
6891
+ while (index !== length) {
6892
+ this.appendLine = indent_;
6893
+ this.value(indent_, staticArray[index++], false);
6894
+ this.appendInline = ",";
6895
+ }
6896
+ this.appendLine = indent + "]";
6897
+ }
6898
+ inlineTable(indent, inlineTable) {
6899
+ const keys2 = getOwnPropertyNames(inlineTable);
6900
+ if (keys2.length) {
6901
+ this.appendInline = "{ ";
6902
+ this.assignInline(indent, inlineTable, ``, keys2);
6903
+ this[this.length - 1] = this[this.length - 1].slice(0, -2) + " }";
6904
+ } else {
6905
+ this.appendInline = "{ }";
6906
+ }
6907
+ }
6908
+ multilineTable(indent, inlineTable, comma) {
6909
+ this.appendInline = "{";
6910
+ this.assignMultiline(indent, inlineTable, ``, getOwnPropertyNames(inlineTable), comma);
6911
+ this.appendLine = indent + "}";
6912
+ }
6913
+ assignInline(indent, inlineTable, keys_, keys2) {
6914
+ for (const key of keys2) {
6915
+ const value = inlineTable[key];
6916
+ const keys3 = keys_ + $Key$(key);
6917
+ const before_value = this.appendInline = $Keys(keys3) + " = ";
6918
+ const valueKeysIfValueIsDottedTable = this.value(indent, value, true);
6919
+ if (valueKeysIfValueIsDottedTable) {
6920
+ this[this.length - 1] = this[this.length - 1].slice(0, -before_value.length);
6921
+ this.assignInline(indent, value, keys3 + ".", valueKeysIfValueIsDottedTable);
6922
+ } else {
6923
+ this.appendInline = ", ";
6924
+ }
7165
6925
  }
7166
6926
  }
7167
- return res;
7168
- }
7169
- __name(normalizeString3, "normalizeString");
7170
- var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
7171
- return _IS_ABSOLUTE_RE2.test(p);
7172
- }, "isAbsolute");
7173
-
7174
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
7175
- init_esm_shims();
7176
-
7177
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
7178
- init_esm_shims();
7179
- import { existsSync as existsSync2 } from "node:fs";
7180
- import { join } from "node:path";
7181
- var MAX_PATH_SEARCH_DEPTH = 30;
7182
- var depth = 0;
7183
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
7184
- const _startPath = startPath ?? process.cwd();
7185
- if (endDirectoryNames.some((endDirName) => existsSync2(join(_startPath, endDirName)))) {
7186
- return _startPath;
7187
- }
7188
- if (endFileNames.some((endFileName) => existsSync2(join(_startPath, endFileName)))) {
7189
- return _startPath;
7190
- }
7191
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
7192
- const parent = join(_startPath, "..");
7193
- return findFolderUp(parent, endFileNames, endDirectoryNames);
7194
- }
7195
- return void 0;
7196
- }
7197
- __name(findFolderUp, "findFolderUp");
7198
-
7199
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
7200
- var rootFiles = [
7201
- "storm-workspace.json",
7202
- "storm-workspace.json",
7203
- "storm-workspace.yaml",
7204
- "storm-workspace.yml",
7205
- "storm-workspace.js",
7206
- "storm-workspace.ts",
7207
- ".storm-workspace.json",
7208
- ".storm-workspace.yaml",
7209
- ".storm-workspace.yml",
7210
- ".storm-workspace.js",
7211
- ".storm-workspace.ts",
7212
- "lerna.json",
7213
- "nx.json",
7214
- "turbo.json",
7215
- "npm-workspace.json",
7216
- "yarn-workspace.json",
7217
- "pnpm-workspace.json",
7218
- "npm-workspace.yaml",
7219
- "yarn-workspace.yaml",
7220
- "pnpm-workspace.yaml",
7221
- "npm-workspace.yml",
7222
- "yarn-workspace.yml",
7223
- "pnpm-workspace.yml",
7224
- "npm-lock.json",
7225
- "yarn-lock.json",
7226
- "pnpm-lock.json",
7227
- "npm-lock.yaml",
7228
- "yarn-lock.yaml",
7229
- "pnpm-lock.yaml",
7230
- "npm-lock.yml",
7231
- "yarn-lock.yml",
7232
- "pnpm-lock.yml",
7233
- "bun.lockb"
7234
- ];
7235
- var rootDirectories = [
7236
- ".storm-workspace",
7237
- ".nx",
7238
- ".github",
7239
- ".vscode",
7240
- ".verdaccio"
7241
- ];
7242
- function findWorkspaceRootSafe(pathInsideMonorepo) {
7243
- if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
7244
- return correctPaths2(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
6927
+ assignMultiline(indent, inlineTable, keys_, keys2, comma) {
6928
+ const indent_ = indent + this.document.indent;
6929
+ for (const key of keys2) {
6930
+ const value = inlineTable[key];
6931
+ const keys3 = keys_ + $Key$(key);
6932
+ this.appendLine = indent_ + $Keys(keys3) + " = ";
6933
+ const valueKeysIfValueIsDottedTable = this.value(indent_, value, true);
6934
+ if (valueKeysIfValueIsDottedTable) {
6935
+ --this.length;
6936
+ this.assignMultiline(indent, value, keys3 + ".", valueKeysIfValueIsDottedTable, comma);
6937
+ } else {
6938
+ comma ? this.appendInline = "," + getComment(inlineTable, key) : this.appendInlineIf = getComment(inlineTable, key);
6939
+ }
6940
+ }
7245
6941
  }
7246
- return correctPaths2(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
7247
- }
7248
- __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
6942
+ };
6943
+ var { test: IS_INDENT } = theRegExp(/^[\t ]*$/);
6944
+ var linesFromStringify = new WeakSet$1();
6945
+ var textDecoder = /* @__PURE__ */ new TextDecoder$1("utf-8", Null$1({ fatal: true, ignoreBOM: false }));
6946
+ var { test: includesNonScalar } = theRegExp(/[\uD800-\uDFFF]/u);
7249
6947
 
7250
6948
  // ../path/src/get-parent-path.ts
7251
6949
  init_esm_shims();
7252
- var resolveParentPath = /* @__PURE__ */ __name((path6) => {
7253
- return resolvePaths(path6, "..");
6950
+ var resolveParentPath = /* @__PURE__ */ __name((path6, count = 1) => {
6951
+ let parentPath = path6.replaceAll(/\/+$/g, "");
6952
+ for (let i = 0; i < count; i++) {
6953
+ parentPath = joinPaths(parentPath, "..");
6954
+ }
6955
+ return parentPath;
7254
6956
  }, "resolveParentPath");
7255
6957
  var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
7256
6958
  const ignoreCase = options?.ignoreCase ?? true;
@@ -7337,49 +7039,28 @@ var getWorkspaceRoot = /* @__PURE__ */ __name((dir = process.cwd()) => {
7337
7039
  }, "getWorkspaceRoot");
7338
7040
 
7339
7041
  // ../path/src/file-path-fns.ts
7340
- function findFileName(filePath, { requireExtension, withExtension } = {}) {
7042
+ function findFileName(filePath, options = {}) {
7043
+ const { requireExtension = false, withExtension = true } = options;
7341
7044
  const result = normalizeWindowsPath2(filePath)?.split(filePath?.includes("\\") ? "\\" : "/")?.pop() ?? "";
7342
7045
  if (requireExtension === true && !result.includes(".")) {
7343
7046
  return EMPTY_STRING;
7344
7047
  }
7345
7048
  if (withExtension === false && result.includes(".")) {
7346
- return result.split(".").slice(-1).join(".") || EMPTY_STRING;
7049
+ return result.substring(0, result.lastIndexOf(".")) || EMPTY_STRING;
7347
7050
  }
7348
7051
  return result;
7349
7052
  }
7350
7053
  __name(findFileName, "findFileName");
7351
7054
  function findFilePath(filePath) {
7352
7055
  const normalizedPath = normalizeWindowsPath2(filePath);
7353
- return normalizedPath.replace(findFileName(normalizedPath, {
7056
+ const result = normalizedPath.replace(findFileName(normalizedPath, {
7354
7057
  requireExtension: true
7355
7058
  }), "");
7059
+ return result === "/" ? result : result.replace(/\/$/, "");
7356
7060
  }
7357
7061
  __name(findFilePath, "findFilePath");
7358
- function resolvePath(path6, cwd = getWorkspaceRoot()) {
7359
- const paths = normalizeWindowsPath2(path6).split("/");
7360
- let resolvedPath = "";
7361
- let resolvedAbsolute = false;
7362
- for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
7363
- const path7 = index >= 0 ? paths[index] : cwd;
7364
- if (!path7 || path7.length === 0) {
7365
- continue;
7366
- }
7367
- resolvedPath = joinPaths(path7, resolvedPath);
7368
- resolvedAbsolute = isAbsolutePath(path7);
7369
- }
7370
- resolvedPath = normalizeString2(resolvedPath, !resolvedAbsolute);
7371
- if (resolvedAbsolute && !isAbsolutePath(resolvedPath)) {
7372
- return `/${resolvedPath}`;
7373
- }
7374
- return resolvedPath.length > 0 ? resolvedPath : ".";
7375
- }
7376
- __name(resolvePath, "resolvePath");
7377
- function resolvePaths(...paths) {
7378
- return resolvePath(joinPaths(...paths.map((path6) => normalizeWindowsPath2(path6))));
7379
- }
7380
- __name(resolvePaths, "resolvePaths");
7381
- function relativePath(from, to) {
7382
- return relative(from.replace(/\/$/, ""), to.replace(/\/$/, ""));
7062
+ function relativePath(from, to, withEndSlash = false) {
7063
+ return relative(withEndSlash !== true ? from.replace(/\/$/, "") : from, withEndSlash !== true ? to.replace(/\/$/, "") : to);
7383
7064
  }
7384
7065
  __name(relativePath, "relativePath");
7385
7066
 
@@ -7622,20 +7303,16 @@ function titleCase(input) {
7622
7303
  if (!input) {
7623
7304
  return input;
7624
7305
  }
7625
- return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.find((a) => a.toUpperCase() === s.toUpperCase()) || upperCaseFirst(s.toLowerCase())).join(" ");
7306
+ const formatSegment = /* @__PURE__ */ __name((segment) => segment.toLowerCase().split(/[\s\-_]+/).filter(Boolean).map((word) => {
7307
+ if (ACRONYMS.includes(word.toUpperCase())) {
7308
+ return word.toUpperCase();
7309
+ }
7310
+ return `${upperCaseFirst(word.toLowerCase())}`;
7311
+ }).join(" "), "formatSegment");
7312
+ return input.split(/\s+-\s+/).map((part) => formatSegment(part)).join(" - ");
7626
7313
  }
7627
7314
  __name(titleCase, "titleCase");
7628
7315
 
7629
- // ../type-checks/src/is-string.ts
7630
- init_esm_shims();
7631
- var isString = /* @__PURE__ */ __name((value) => {
7632
- try {
7633
- return typeof value === "string";
7634
- } catch {
7635
- return false;
7636
- }
7637
- }, "isString");
7638
-
7639
7316
  // ../env/src/get-env-paths.ts
7640
7317
  import os from "node:os";
7641
7318
  import path from "node:path";
@@ -7682,7 +7359,7 @@ function getEnvPaths(options = {}) {
7682
7359
  throw new Error("You need to provide an orgId to the `getEnvPaths` function");
7683
7360
  }
7684
7361
  if (options.suffix) {
7685
- orgId += `-${isString(options.suffix) ? options.suffix : "nodejs"}`;
7362
+ orgId += `-${typeof options.suffix === "string" ? options.suffix : "nodejs"}`;
7686
7363
  }
7687
7364
  let result = {};
7688
7365
  if (process.platform === "darwin") {
@@ -8527,7 +8204,7 @@ var getObjectTag = /* @__PURE__ */ __name((value) => {
8527
8204
  var isObjectLike = /* @__PURE__ */ __name((obj) => {
8528
8205
  return typeof obj === "object" && obj !== null;
8529
8206
  }, "isObjectLike");
8530
- var isPlainObject = /* @__PURE__ */ __name((obj) => {
8207
+ var isPlainObject2 = /* @__PURE__ */ __name((obj) => {
8531
8208
  if (!isObjectLike(obj) || getObjectTag(obj) !== "[object Object]") {
8532
8209
  return false;
8533
8210
  }
@@ -8544,22 +8221,29 @@ var isPlainObject = /* @__PURE__ */ __name((obj) => {
8544
8221
  // ../type-checks/src/is-object.ts
8545
8222
  var isObject = /* @__PURE__ */ __name((value) => {
8546
8223
  try {
8547
- return typeof value === "object" || Boolean(value) && value?.constructor === Object || isPlainObject(value);
8224
+ return typeof value === "object" || Boolean(value) && value?.constructor === Object || isPlainObject2(value);
8548
8225
  } catch {
8549
8226
  return false;
8550
8227
  }
8551
8228
  }, "isObject");
8552
8229
 
8553
- // ../json/src/storm-json.ts
8554
- var import_buffer = __toESM(require_buffer(), 1);
8230
+ // ../type-checks/src/is-string.ts
8231
+ init_esm_shims();
8232
+ var isString2 = /* @__PURE__ */ __name((value) => {
8233
+ try {
8234
+ return typeof value === "string";
8235
+ } catch {
8236
+ return false;
8237
+ }
8238
+ }, "isString");
8555
8239
 
8556
- // ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/main.js
8240
+ // ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/main.js
8557
8241
  init_esm_shims();
8558
8242
 
8559
- // ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/format.js
8243
+ // ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/format.js
8560
8244
  init_esm_shims();
8561
8245
 
8562
- // ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js
8246
+ // ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/scanner.js
8563
8247
  init_esm_shims();
8564
8248
  function createScanner(text, ignoreTrivia = false) {
8565
8249
  const len = text.length;
@@ -8992,41 +8676,10 @@ var CharacterCodes;
8992
8676
  CharacterCodes2[CharacterCodes2["tab"] = 9] = "tab";
8993
8677
  })(CharacterCodes || (CharacterCodes = {}));
8994
8678
 
8995
- // ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/string-intern.js
8996
- init_esm_shims();
8997
- var cachedSpaces = new Array(20).fill(0).map((_, index) => {
8998
- return " ".repeat(index);
8999
- });
9000
- var maxCachedValues = 200;
9001
- var cachedBreakLinesWithSpaces = {
9002
- " ": {
9003
- "\n": new Array(maxCachedValues).fill(0).map((_, index) => {
9004
- return "\n" + " ".repeat(index);
9005
- }),
9006
- "\r": new Array(maxCachedValues).fill(0).map((_, index) => {
9007
- return "\r" + " ".repeat(index);
9008
- }),
9009
- "\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
9010
- return "\r\n" + " ".repeat(index);
9011
- })
9012
- },
9013
- " ": {
9014
- "\n": new Array(maxCachedValues).fill(0).map((_, index) => {
9015
- return "\n" + " ".repeat(index);
9016
- }),
9017
- "\r": new Array(maxCachedValues).fill(0).map((_, index) => {
9018
- return "\r" + " ".repeat(index);
9019
- }),
9020
- "\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
9021
- return "\r\n" + " ".repeat(index);
9022
- })
9023
- }
9024
- };
9025
-
9026
- // ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/edit.js
8679
+ // ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/edit.js
9027
8680
  init_esm_shims();
9028
8681
 
9029
- // ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/parser.js
8682
+ // ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/parser.js
9030
8683
  init_esm_shims();
9031
8684
  var ParseOptions;
9032
8685
  (function(ParseOptions2) {
@@ -9086,44 +8739,23 @@ __name(parse, "parse");
9086
8739
  function visit(text, visitor, options = ParseOptions.DEFAULT) {
9087
8740
  const _scanner = createScanner(text, false);
9088
8741
  const _jsonPath = [];
9089
- let suppressedCallbacks = 0;
9090
8742
  function toNoArgVisit(visitFunction) {
9091
- return visitFunction ? () => suppressedCallbacks === 0 && visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true;
8743
+ return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true;
9092
8744
  }
9093
8745
  __name(toNoArgVisit, "toNoArgVisit");
8746
+ function toNoArgVisitWithPath(visitFunction) {
8747
+ return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true;
8748
+ }
8749
+ __name(toNoArgVisitWithPath, "toNoArgVisitWithPath");
9094
8750
  function toOneArgVisit(visitFunction) {
9095
- return visitFunction ? (arg) => suppressedCallbacks === 0 && visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true;
8751
+ return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true;
9096
8752
  }
9097
8753
  __name(toOneArgVisit, "toOneArgVisit");
9098
8754
  function toOneArgVisitWithPath(visitFunction) {
9099
- return visitFunction ? (arg) => suppressedCallbacks === 0 && visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true;
8755
+ return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true;
9100
8756
  }
9101
8757
  __name(toOneArgVisitWithPath, "toOneArgVisitWithPath");
9102
- function toBeginVisit(visitFunction) {
9103
- return visitFunction ? () => {
9104
- if (suppressedCallbacks > 0) {
9105
- suppressedCallbacks++;
9106
- } else {
9107
- let cbReturn = visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice());
9108
- if (cbReturn === false) {
9109
- suppressedCallbacks = 1;
9110
- }
9111
- }
9112
- } : () => true;
9113
- }
9114
- __name(toBeginVisit, "toBeginVisit");
9115
- function toEndVisit(visitFunction) {
9116
- return visitFunction ? () => {
9117
- if (suppressedCallbacks > 0) {
9118
- suppressedCallbacks--;
9119
- }
9120
- if (suppressedCallbacks === 0) {
9121
- visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter());
9122
- }
9123
- } : () => true;
9124
- }
9125
- __name(toEndVisit, "toEndVisit");
9126
- const onObjectBegin = toBeginVisit(visitor.onObjectBegin), onObjectProperty = toOneArgVisitWithPath(visitor.onObjectProperty), onObjectEnd = toEndVisit(visitor.onObjectEnd), onArrayBegin = toBeginVisit(visitor.onArrayBegin), onArrayEnd = toEndVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisitWithPath(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);
8758
+ const onObjectBegin = toNoArgVisitWithPath(visitor.onObjectBegin), onObjectProperty = toOneArgVisitWithPath(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisitWithPath(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisitWithPath(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);
9127
8759
  const disallowComments = options && options.disallowComments;
9128
8760
  const allowTrailingComma = options && options.allowTrailingComma;
9129
8761
  function scanNext() {
@@ -9403,7 +9035,7 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
9403
9035
  }
9404
9036
  __name(visit, "visit");
9405
9037
 
9406
- // ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/main.js
9038
+ // ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/main.js
9407
9039
  var ScanError;
9408
9040
  (function(ScanError2) {
9409
9041
  ScanError2[ScanError2["None"] = 0] = "None";
@@ -9493,6 +9125,9 @@ function printParseErrorCode(code) {
9493
9125
  }
9494
9126
  __name(printParseErrorCode, "printParseErrorCode");
9495
9127
 
9128
+ // ../json/src/storm-json.ts
9129
+ import { Buffer as Buffer2 } from "node:buffer";
9130
+
9496
9131
  // ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/index.js
9497
9132
  init_esm_shims();
9498
9133
 
@@ -9618,10 +9253,10 @@ function forEach(record, run) {
9618
9253
  Object.entries(record).forEach(([key, value]) => run(value, key));
9619
9254
  }
9620
9255
  __name(forEach, "forEach");
9621
- function includes(arr, value) {
9256
+ function includes2(arr, value) {
9622
9257
  return arr.indexOf(value) !== -1;
9623
9258
  }
9624
- __name(includes, "includes");
9259
+ __name(includes2, "includes");
9625
9260
  function findArr(record, predicate) {
9626
9261
  for (let i = 0; i < record.length; i++) {
9627
9262
  const value = record[i];
@@ -9660,25 +9295,25 @@ init_esm_shims();
9660
9295
  var getType = /* @__PURE__ */ __name((payload) => Object.prototype.toString.call(payload).slice(8, -1), "getType");
9661
9296
  var isUndefined = /* @__PURE__ */ __name((payload) => typeof payload === "undefined", "isUndefined");
9662
9297
  var isNull = /* @__PURE__ */ __name((payload) => payload === null, "isNull");
9663
- var isPlainObject2 = /* @__PURE__ */ __name((payload) => {
9298
+ var isPlainObject3 = /* @__PURE__ */ __name((payload) => {
9664
9299
  if (typeof payload !== "object" || payload === null) return false;
9665
9300
  if (payload === Object.prototype) return false;
9666
9301
  if (Object.getPrototypeOf(payload) === null) return true;
9667
9302
  return Object.getPrototypeOf(payload) === Object.prototype;
9668
9303
  }, "isPlainObject");
9669
- var isEmptyObject = /* @__PURE__ */ __name((payload) => isPlainObject2(payload) && Object.keys(payload).length === 0, "isEmptyObject");
9304
+ var isEmptyObject = /* @__PURE__ */ __name((payload) => isPlainObject3(payload) && Object.keys(payload).length === 0, "isEmptyObject");
9670
9305
  var isArray = /* @__PURE__ */ __name((payload) => Array.isArray(payload), "isArray");
9671
- var isString2 = /* @__PURE__ */ __name((payload) => typeof payload === "string", "isString");
9672
- var isNumber = /* @__PURE__ */ __name((payload) => typeof payload === "number" && !isNaN(payload), "isNumber");
9673
- var isBoolean = /* @__PURE__ */ __name((payload) => typeof payload === "boolean", "isBoolean");
9306
+ var isString3 = /* @__PURE__ */ __name((payload) => typeof payload === "string", "isString");
9307
+ var isNumber2 = /* @__PURE__ */ __name((payload) => typeof payload === "number" && !isNaN(payload), "isNumber");
9308
+ var isBoolean2 = /* @__PURE__ */ __name((payload) => typeof payload === "boolean", "isBoolean");
9674
9309
  var isRegExp = /* @__PURE__ */ __name((payload) => payload instanceof RegExp, "isRegExp");
9675
9310
  var isMap = /* @__PURE__ */ __name((payload) => payload instanceof Map, "isMap");
9676
9311
  var isSet = /* @__PURE__ */ __name((payload) => payload instanceof Set, "isSet");
9677
9312
  var isSymbol = /* @__PURE__ */ __name((payload) => getType(payload) === "Symbol", "isSymbol");
9678
- var isDate = /* @__PURE__ */ __name((payload) => payload instanceof Date && !isNaN(payload.valueOf()), "isDate");
9313
+ var isDate2 = /* @__PURE__ */ __name((payload) => payload instanceof Date && !isNaN(payload.valueOf()), "isDate");
9679
9314
  var isError = /* @__PURE__ */ __name((payload) => payload instanceof Error, "isError");
9680
9315
  var isNaNValue = /* @__PURE__ */ __name((payload) => typeof payload === "number" && isNaN(payload), "isNaNValue");
9681
- var isPrimitive = /* @__PURE__ */ __name((payload) => isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString2(payload) || isSymbol(payload), "isPrimitive");
9316
+ var isPrimitive = /* @__PURE__ */ __name((payload) => isBoolean2(payload) || isNull(payload) || isUndefined(payload) || isNumber2(payload) || isString3(payload) || isSymbol(payload), "isPrimitive");
9682
9317
  var isBigint = /* @__PURE__ */ __name((payload) => typeof payload === "bigint", "isBigint");
9683
9318
  var isInfinite = /* @__PURE__ */ __name((payload) => payload === Infinity || payload === -Infinity, "isInfinite");
9684
9319
  var isTypedArray = /* @__PURE__ */ __name((payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView), "isTypedArray");
@@ -9732,7 +9367,7 @@ var simpleRules = [
9732
9367
  console.error("Please add a BigInt polyfill.");
9733
9368
  return v;
9734
9369
  }),
9735
- simpleTransformation(isDate, "Date", (v) => v.toISOString(), (v) => new Date(v)),
9370
+ simpleTransformation(isDate2, "Date", (v) => v.toISOString(), (v) => new Date(v)),
9736
9371
  simpleTransformation(isError, "Error", (v, superJson) => {
9737
9372
  const baseError = {
9738
9373
  name: v.name,
@@ -9943,21 +9578,21 @@ var untransformValue = /* @__PURE__ */ __name((json, type, superJson) => {
9943
9578
  init_esm_shims();
9944
9579
  var getNthKey = /* @__PURE__ */ __name((value, n) => {
9945
9580
  if (n > value.size) throw new Error("index out of bounds");
9946
- const keys = value.keys();
9581
+ const keys2 = value.keys();
9947
9582
  while (n > 0) {
9948
- keys.next();
9583
+ keys2.next();
9949
9584
  n--;
9950
9585
  }
9951
- return keys.next().value;
9586
+ return keys2.next().value;
9952
9587
  }, "getNthKey");
9953
9588
  function validatePath(path6) {
9954
- if (includes(path6, "__proto__")) {
9589
+ if (includes2(path6, "__proto__")) {
9955
9590
  throw new Error("__proto__ is not allowed as a property");
9956
9591
  }
9957
- if (includes(path6, "prototype")) {
9592
+ if (includes2(path6, "prototype")) {
9958
9593
  throw new Error("prototype is not allowed as a property");
9959
9594
  }
9960
- if (includes(path6, "constructor")) {
9595
+ if (includes2(path6, "constructor")) {
9961
9596
  throw new Error("constructor is not allowed as a property");
9962
9597
  }
9963
9598
  }
@@ -9997,7 +9632,7 @@ var setDeep = /* @__PURE__ */ __name((object, path6, mapper) => {
9997
9632
  if (isArray(parent)) {
9998
9633
  const index = +key;
9999
9634
  parent = parent[index];
10000
- } else if (isPlainObject2(parent)) {
9635
+ } else if (isPlainObject3(parent)) {
10001
9636
  parent = parent[key];
10002
9637
  } else if (isSet(parent)) {
10003
9638
  const row = +key;
@@ -10023,7 +9658,7 @@ var setDeep = /* @__PURE__ */ __name((object, path6, mapper) => {
10023
9658
  const lastKey = path6[path6.length - 1];
10024
9659
  if (isArray(parent)) {
10025
9660
  parent[+lastKey] = mapper(parent[+lastKey]);
10026
- } else if (isPlainObject2(parent)) {
9661
+ } else if (isPlainObject3(parent)) {
10027
9662
  parent[lastKey] = mapper(parent[lastKey]);
10028
9663
  }
10029
9664
  if (isSet(parent)) {
@@ -10088,28 +9723,28 @@ function applyValueAnnotations(plain, annotations, superJson) {
10088
9723
  }
10089
9724
  __name(applyValueAnnotations, "applyValueAnnotations");
10090
9725
  function applyReferentialEqualityAnnotations(plain, annotations) {
10091
- function apply(identicalPaths, path6) {
9726
+ function apply2(identicalPaths, path6) {
10092
9727
  const object = getDeep(plain, parsePath(path6));
10093
9728
  identicalPaths.map(parsePath).forEach((identicalObjectPath) => {
10094
9729
  plain = setDeep(plain, identicalObjectPath, () => object);
10095
9730
  });
10096
9731
  }
10097
- __name(apply, "apply");
9732
+ __name(apply2, "apply");
10098
9733
  if (isArray(annotations)) {
10099
9734
  const [root, other] = annotations;
10100
9735
  root.forEach((identicalPath) => {
10101
9736
  plain = setDeep(plain, parsePath(identicalPath), () => plain);
10102
9737
  });
10103
9738
  if (other) {
10104
- forEach(other, apply);
9739
+ forEach(other, apply2);
10105
9740
  }
10106
9741
  } else {
10107
- forEach(annotations, apply);
9742
+ forEach(annotations, apply2);
10108
9743
  }
10109
9744
  return plain;
10110
9745
  }
10111
9746
  __name(applyReferentialEqualityAnnotations, "applyReferentialEqualityAnnotations");
10112
- var isDeep = /* @__PURE__ */ __name((object, superJson) => isPlainObject2(object) || isArray(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson), "isDeep");
9747
+ var isDeep = /* @__PURE__ */ __name((object, superJson) => isPlainObject3(object) || isArray(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson), "isDeep");
10113
9748
  function addIdentity(object, path6, identities) {
10114
9749
  const existingSet = identities.get(object);
10115
9750
  if (existingSet) {
@@ -10180,7 +9815,7 @@ var walker = /* @__PURE__ */ __name((object, identities, superJson, dedupe, path
10180
9815
  }
10181
9816
  return result2;
10182
9817
  }
10183
- if (includes(objectsInThisPath, object)) {
9818
+ if (includes2(objectsInThisPath, object)) {
10184
9819
  return {
10185
9820
  transformedValue: null
10186
9821
  };
@@ -10203,7 +9838,7 @@ var walker = /* @__PURE__ */ __name((object, identities, superJson, dedupe, path
10203
9838
  transformedValue[index] = recursiveResult.transformedValue;
10204
9839
  if (isArray(recursiveResult.annotations)) {
10205
9840
  innerAnnotations[index] = recursiveResult.annotations;
10206
- } else if (isPlainObject2(recursiveResult.annotations)) {
9841
+ } else if (isPlainObject3(recursiveResult.annotations)) {
10207
9842
  forEach(recursiveResult.annotations, (tree, key) => {
10208
9843
  innerAnnotations[escapeKey(index) + "." + key] = tree;
10209
9844
  });
@@ -10240,18 +9875,18 @@ function isArray2(payload) {
10240
9875
  return getType2(payload) === "Array";
10241
9876
  }
10242
9877
  __name(isArray2, "isArray");
10243
- function isPlainObject3(payload) {
9878
+ function isPlainObject4(payload) {
10244
9879
  if (getType2(payload) !== "Object") return false;
10245
9880
  const prototype = Object.getPrototypeOf(payload);
10246
9881
  return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
10247
9882
  }
10248
- __name(isPlainObject3, "isPlainObject");
9883
+ __name(isPlainObject4, "isPlainObject");
10249
9884
  function isNull2(payload) {
10250
9885
  return getType2(payload) === "Null";
10251
9886
  }
10252
9887
  __name(isNull2, "isNull");
10253
- function isOneOf(a, b, c, d, e) {
10254
- return (value) => a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);
9888
+ function isOneOf(a, b, c, d2, e) {
9889
+ return (value) => a(value) || b(value) || !!c && c(value) || !!d2 && d2(value) || !!e && e(value);
10255
9890
  }
10256
9891
  __name(isOneOf, "isOneOf");
10257
9892
  function isUndefined2(payload) {
@@ -10278,7 +9913,7 @@ function copy(target, options = {}) {
10278
9913
  if (isArray2(target)) {
10279
9914
  return target.map((item) => copy(item, options));
10280
9915
  }
10281
- if (!isPlainObject3(target)) {
9916
+ if (!isPlainObject4(target)) {
10282
9917
  return target;
10283
9918
  }
10284
9919
  const props = Object.getOwnPropertyNames(target);
@@ -10387,6 +10022,102 @@ var allowErrorProps = SuperJSON.allowErrorProps;
10387
10022
 
10388
10023
  // ../json/src/utils/parse.ts
10389
10024
  init_esm_shims();
10025
+
10026
+ // ../json/src/utils/strip-comments.ts
10027
+ init_esm_shims();
10028
+ var singleComment = Symbol("singleComment");
10029
+ var multiComment = Symbol("multiComment");
10030
+ function stripWithoutWhitespace() {
10031
+ return "";
10032
+ }
10033
+ __name(stripWithoutWhitespace, "stripWithoutWhitespace");
10034
+ function stripWithWhitespace(value, start, end) {
10035
+ return value.slice(start, end).replace(/\S/g, " ");
10036
+ }
10037
+ __name(stripWithWhitespace, "stripWithWhitespace");
10038
+ function isEscaped(value, quotePosition) {
10039
+ let index = quotePosition - 1;
10040
+ let backslashCount = 0;
10041
+ while (value[index] === "\\") {
10042
+ index -= 1;
10043
+ backslashCount += 1;
10044
+ }
10045
+ return Boolean(backslashCount % 2);
10046
+ }
10047
+ __name(isEscaped, "isEscaped");
10048
+ function stripComments2(value, { whitespace = true, trailingCommas = false } = {}) {
10049
+ if (typeof value !== "string") {
10050
+ throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof value}\``);
10051
+ }
10052
+ const strip = whitespace ? stripWithWhitespace : stripWithoutWhitespace;
10053
+ let isInsideString = false;
10054
+ let isInsideComment = false;
10055
+ let offset = 0;
10056
+ let buffer = "";
10057
+ let result = "";
10058
+ let commaIndex = -1;
10059
+ for (let index = 0; index < value.length; index++) {
10060
+ const currentCharacter = value[index];
10061
+ const nextCharacter = value[index + 1];
10062
+ if (!isInsideComment && currentCharacter === '"') {
10063
+ const escaped = isEscaped(value, index);
10064
+ if (!escaped) {
10065
+ isInsideString = !isInsideString;
10066
+ }
10067
+ }
10068
+ if (isInsideString) {
10069
+ continue;
10070
+ }
10071
+ if (!isInsideComment && currentCharacter + (nextCharacter ?? EMPTY_STRING) === "//") {
10072
+ buffer += value.slice(offset, index);
10073
+ offset = index;
10074
+ isInsideComment = singleComment;
10075
+ index++;
10076
+ } else if (isInsideComment === singleComment && currentCharacter + (nextCharacter ?? EMPTY_STRING) === "\r\n") {
10077
+ index++;
10078
+ isInsideComment = false;
10079
+ buffer += strip(value, offset, index);
10080
+ offset = index;
10081
+ } else if (isInsideComment === singleComment && currentCharacter === "\n") {
10082
+ isInsideComment = false;
10083
+ buffer += strip(value, offset, index);
10084
+ offset = index;
10085
+ } else if (!isInsideComment && currentCharacter + (nextCharacter ?? EMPTY_STRING) === "/*") {
10086
+ buffer += value.slice(offset, index);
10087
+ offset = index;
10088
+ isInsideComment = multiComment;
10089
+ index++;
10090
+ } else if (isInsideComment === multiComment && currentCharacter + (nextCharacter ?? EMPTY_STRING) === "*/") {
10091
+ index++;
10092
+ isInsideComment = false;
10093
+ buffer += strip(value, offset, index + 1);
10094
+ offset = index + 1;
10095
+ } else if (trailingCommas && !isInsideComment) {
10096
+ if (commaIndex !== -1) {
10097
+ if (currentCharacter === "}" || currentCharacter === "]") {
10098
+ buffer += value.slice(offset, index);
10099
+ result += strip(buffer, 0, 1) + buffer.slice(1);
10100
+ buffer = "";
10101
+ offset = index;
10102
+ commaIndex = -1;
10103
+ } else if (currentCharacter !== " " && currentCharacter !== " " && currentCharacter !== "\r" && currentCharacter !== "\n") {
10104
+ buffer += value.slice(offset, index);
10105
+ offset = index;
10106
+ commaIndex = -1;
10107
+ }
10108
+ } else if (currentCharacter === ",") {
10109
+ result += buffer + value.slice(offset, index);
10110
+ buffer = "";
10111
+ offset = index;
10112
+ commaIndex = index;
10113
+ }
10114
+ }
10115
+ }
10116
+ return result + buffer + (isInsideComment ? strip(value.slice(offset)) : value.slice(offset));
10117
+ }
10118
+ __name(stripComments2, "stripComments");
10119
+
10120
+ // ../json/src/utils/parse.ts
10390
10121
  var suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
10391
10122
  var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
10392
10123
  var JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(?:\.\d{1,17})?(?:E[+-]?\d+)?\s*$/i;
@@ -10402,12 +10133,13 @@ function parse4(value, options = {}) {
10402
10133
  if (typeof value !== "string") {
10403
10134
  return value;
10404
10135
  }
10405
- if (value[0] === '"' && value[value.length - 1] === '"' && !value.includes("\\")) {
10406
- return value.slice(1, -1);
10136
+ let stripped = stripComments2(value);
10137
+ if (stripped[0] === '"' && stripped[stripped.length - 1] === '"' && !stripped.includes("\\")) {
10138
+ return stripped.slice(1, -1);
10407
10139
  }
10408
- const _value = value.trim();
10409
- if (_value.length <= 9) {
10410
- switch (_value.toLowerCase()) {
10140
+ stripped = stripped.trim();
10141
+ if (stripped.length <= 9) {
10142
+ switch (stripped.toLowerCase()) {
10411
10143
  case "true": {
10412
10144
  return true;
10413
10145
  }
@@ -10431,20 +10163,20 @@ function parse4(value, options = {}) {
10431
10163
  }
10432
10164
  }
10433
10165
  }
10434
- if (!JsonSigRx.test(value)) {
10166
+ if (!JsonSigRx.test(stripped)) {
10435
10167
  if (options.strict) {
10436
10168
  throw new Error("Invalid JSON");
10437
10169
  }
10438
- return value;
10170
+ return stripped;
10439
10171
  }
10440
10172
  try {
10441
- if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {
10173
+ if (suspectProtoRx.test(stripped) || suspectConstructorRx.test(stripped)) {
10442
10174
  if (options.strict) {
10443
10175
  throw new Error("Possible prototype pollution");
10444
10176
  }
10445
- return JSON.parse(value, jsonParseTransform);
10177
+ return JSON.parse(stripped, jsonParseTransform);
10446
10178
  }
10447
- return JSON.parse(value);
10179
+ return JSON.parse(stripped);
10448
10180
  } catch (error) {
10449
10181
  if (options.strict) {
10450
10182
  throw error;
@@ -10652,7 +10384,7 @@ init_esm_shims();
10652
10384
 
10653
10385
  // ../type-checks/src/is-number.ts
10654
10386
  init_esm_shims();
10655
- var isNumber2 = /* @__PURE__ */ __name((value) => {
10387
+ var isNumber3 = /* @__PURE__ */ __name((value) => {
10656
10388
  try {
10657
10389
  return value instanceof Number || typeof value === "number" || Number(value) === value;
10658
10390
  } catch {
@@ -10702,7 +10434,7 @@ var invalidKeyChars = [
10702
10434
  ">"
10703
10435
  ];
10704
10436
  var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
10705
- const space = isNumber2(spacing) ? " ".repeat(spacing) : spacing;
10437
+ const space = isNumber3(spacing) ? " ".repeat(spacing) : spacing;
10706
10438
  switch (value) {
10707
10439
  case null: {
10708
10440
  return "null";
@@ -10737,8 +10469,8 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
10737
10469
  return JSON.stringify(value);
10738
10470
  }
10739
10471
  case "object": {
10740
- const keys = Object.keys(value).filter((key) => !isUndefined3(value[key]));
10741
- return `{${space}${keys.map((key) => `${invalidKeyChars.some((invalidKeyChar) => key.includes(invalidKeyChar)) ? `"${key}"` : key}: ${space}${stringify2(value[key], space)}`).join(`,${space}`)}${space}}`;
10472
+ const keys2 = Object.keys(value).filter((key) => !isUndefined3(value[key]));
10473
+ return `{${space}${keys2.map((key) => `${invalidKeyChars.some((invalidKeyChar) => key.includes(invalidKeyChar)) ? `"${key}"` : key}: ${space}${stringify2(value[key], space)}`).join(`,${space}`)}${space}}`;
10742
10474
  }
10743
10475
  default:
10744
10476
  return "null";
@@ -10842,7 +10574,7 @@ var StormJSON = class _StormJSON extends SuperJSON {
10842
10574
  */
10843
10575
  static registerClass(classConstructor, options) {
10844
10576
  _StormJSON.instance.registerClass(classConstructor, {
10845
- identifier: isString(options) ? options : options?.identifier || classConstructor.name,
10577
+ identifier: isString2(options) ? options : options?.identifier || classConstructor.name,
10846
10578
  allowProps: options && isObject(options) && options?.allowProps && Array.isArray(options.allowProps) ? options.allowProps : [
10847
10579
  "__typename"
10848
10580
  ]
@@ -10855,12 +10587,13 @@ var StormJSON = class _StormJSON extends SuperJSON {
10855
10587
  }
10856
10588
  };
10857
10589
  StormJSON.instance.registerCustom({
10858
- isApplicable: /* @__PURE__ */ __name((v) => import_buffer.Buffer.isBuffer(v), "isApplicable"),
10590
+ isApplicable: /* @__PURE__ */ __name((v) => Buffer2.isBuffer(v), "isApplicable"),
10859
10591
  serialize: /* @__PURE__ */ __name((v) => v.toString("base64"), "serialize"),
10860
- deserialize: /* @__PURE__ */ __name((v) => import_buffer.Buffer.from(v, "base64"), "deserialize")
10592
+ deserialize: /* @__PURE__ */ __name((v) => Buffer2.from(v, "base64"), "deserialize")
10861
10593
  }, "Bytes");
10862
10594
 
10863
10595
  // ../fs/src/write-file.ts
10596
+ init_defu();
10864
10597
  import { writeFile as writeFileFs } from "node:fs/promises";
10865
10598
  var writeFile = /* @__PURE__ */ __name(async (filePath, content = "", options = {}) => {
10866
10599
  if (!filePath) {
@@ -11117,8 +10850,8 @@ function resolveMongoDbRawOperations(modelOperations) {
11117
10850
  const rawOpsMap = {};
11118
10851
  const rawOpsNames = [
11119
10852
  ...new Set(modelOperations.reduce((result, current) => {
11120
- const keys = Object.keys(current);
11121
- keys?.forEach((key) => {
10853
+ const keys2 = Object.keys(current);
10854
+ keys2?.forEach((key) => {
11122
10855
  if (key.includes("Raw")) {
11123
10856
  result.push(key);
11124
10857
  }
@@ -11264,8 +10997,8 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11264
10997
  } else if (inputType.type === "Bytes") {
11265
10998
  result.push(this.wrapWithZodValidators("z.instanceof(Buffer)", field));
11266
10999
  } else if (!inputType.type.endsWith("FieldRefInput")) {
11267
- const isEnum = inputType.location === "enumTypes";
11268
- if (inputType.namespace === "prisma" || isEnum) {
11000
+ const isEnum2 = inputType.location === "enumTypes";
11001
+ if (inputType.namespace === "prisma" || isEnum2) {
11269
11002
  if (inputType.type !== this.name && typeof inputType.type === "string") {
11270
11003
  this.addSchemaImport(inputType.type);
11271
11004
  }
@@ -11309,12 +11042,12 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11309
11042
  this.schemaImports.add(name);
11310
11043
  }
11311
11044
  generatePrismaStringLine(field, inputType, inputsLength) {
11312
- const isEnum = inputType.location === "enumTypes";
11045
+ const isEnum2 = inputType.location === "enumTypes";
11313
11046
  const inputTypeString = inputType.type;
11314
11047
  const { isModelQueryType, modelName, queryName } = this.checkIsModelQueryType(inputTypeString);
11315
11048
  const objectSchemaLine = isModelQueryType ? this.resolveModelQuerySchemaName(modelName, queryName) : `${inputTypeString}ObjectSchema`;
11316
11049
  const enumSchemaLine = `${inputTypeString}Schema`;
11317
- const schema = inputType.type === this.name ? objectSchemaLine : isEnum ? enumSchemaLine : objectSchemaLine;
11050
+ const schema = inputType.type === this.name ? objectSchemaLine : isEnum2 ? enumSchemaLine : objectSchemaLine;
11318
11051
  const arr = inputType.isList ? ".array()" : "";
11319
11052
  const opt = !field.isRequired ? ".optional()" : "";
11320
11053
  return inputsLength === 1 ? ` ${field.name}: z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}` : `z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}`;
@@ -12292,14 +12025,27 @@ getPrismaGeneratorHelper().then((helpers) => {
12292
12025
  });
12293
12026
  /*! Bundled license information:
12294
12027
 
12295
- ieee754/index.js:
12296
- (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
12028
+ @ltd/j-toml/index.mjs:
12029
+ (*!@preserve@license
12030
+ * 模块名称:j-regexp
12031
+ * 模块功能:可读性更好的正则表达式创建方式。从属于“简计划”。
12032
+      More readable way for creating RegExp. Belong to "Plan J".
12033
+ * 模块版本:8.2.0
12034
+ * 许可条款:LGPL-3.0
12035
+ * 所属作者:龙腾道 <LongTengDao@LongTengDao.com> (www.LongTengDao.com)
12036
+ * 问题反馈:https://GitHub.com/LongTengDao/j-regexp/issues
12037
+ * 项目主页:https://GitHub.com/LongTengDao/j-regexp/
12038
+ *)
12297
12039
 
12298
- buffer/index.js:
12299
- (*!
12300
- * The buffer module from node.js, for the browser.
12301
- *
12302
- * @author Feross Aboukhadijeh <https://feross.org>
12303
- * @license MIT
12040
+ @ltd/j-toml/index.mjs:
12041
+ (*!@preserve@license
12042
+ * 模块名称:j-orderify
12043
+ * 模块功能:返回一个能保证给定对象的属性按此后添加顺序排列的 proxy,即使键名是 symbol,或整数 string。从属于“简计划”。
12044
+      Return a proxy for given object, which can guarantee own keys are in setting order, even if the key name is symbol or int string. Belong to "Plan J".
12045
+ * 模块版本:7.0.1
12046
+ * 许可条款:LGPL-3.0
12047
+ * 所属作者:龙腾道 <LongTengDao@LongTengDao.com> (www.LongTengDao.com)
12048
+ * 问题反馈:https://GitHub.com/LongTengDao/j-orderify/issues
12049
+ * 项目主页:https://GitHub.com/LongTengDao/j-orderify/
12304
12050
  *)
12305
12051
  */