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