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