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