@moq/publish 0.2.1 → 0.2.2
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/audio/encoder.d.ts +2 -2
- package/audio/encoder.d.ts.map +1 -1
- package/element.js +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +17 -13
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/{screen-BORpmf_D.js → screen-CB3eVjAV.js} +281 -281
- package/{screen-BORpmf_D.js.map → screen-CB3eVjAV.js.map} +1 -1
- package/video/encoder.d.ts.map +1 -1
|
@@ -15,8 +15,8 @@ function d(e, n, t) {
|
|
|
15
15
|
a._zod.traits.add(e), n(a, c);
|
|
16
16
|
const u = o.prototype, l = Object.keys(u);
|
|
17
17
|
for (let h = 0; h < l.length; h++) {
|
|
18
|
-
const
|
|
19
|
-
|
|
18
|
+
const p = l[h];
|
|
19
|
+
p in a || (a[p] = u[p].bind(a));
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
const s = t?.Parent ?? Object;
|
|
@@ -84,7 +84,7 @@ function nt(e, n) {
|
|
|
84
84
|
return o % a / 10 ** i;
|
|
85
85
|
}
|
|
86
86
|
const De = /* @__PURE__ */ Symbol("evaluating");
|
|
87
|
-
function
|
|
87
|
+
function g(e, n, t) {
|
|
88
88
|
let r;
|
|
89
89
|
Object.defineProperty(e, n, {
|
|
90
90
|
get() {
|
|
@@ -157,7 +157,7 @@ function j(e, n, t) {
|
|
|
157
157
|
const r = new e._zod.constr(n ?? e._zod.def);
|
|
158
158
|
return (!n || t?.parent) && (r._zod.parent = e), r;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function m(e) {
|
|
161
161
|
const n = e;
|
|
162
162
|
if (!n)
|
|
163
163
|
return {};
|
|
@@ -755,7 +755,7 @@ const dr = {
|
|
|
755
755
|
major: 4,
|
|
756
756
|
minor: 3,
|
|
757
757
|
patch: 6
|
|
758
|
-
},
|
|
758
|
+
}, y = /* @__PURE__ */ d("$ZodType", (e, n) => {
|
|
759
759
|
var t;
|
|
760
760
|
e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = dr;
|
|
761
761
|
const r = [...e._zod.def.checks ?? []];
|
|
@@ -776,17 +776,17 @@ const dr = {
|
|
|
776
776
|
continue;
|
|
777
777
|
} else if (u)
|
|
778
778
|
continue;
|
|
779
|
-
const
|
|
780
|
-
if (
|
|
779
|
+
const p = o.issues.length, w = h._zod.check(o);
|
|
780
|
+
if (w instanceof Promise && c?.async === !1)
|
|
781
781
|
throw new X();
|
|
782
|
-
if (l ||
|
|
782
|
+
if (l || w instanceof Promise)
|
|
783
783
|
l = (l ?? Promise.resolve()).then(async () => {
|
|
784
|
-
await
|
|
784
|
+
await w, o.issues.length !== p && (u || (u = W(o, p)));
|
|
785
785
|
});
|
|
786
786
|
else {
|
|
787
|
-
if (o.issues.length ===
|
|
787
|
+
if (o.issues.length === p)
|
|
788
788
|
continue;
|
|
789
|
-
u || (u = W(o,
|
|
789
|
+
u || (u = W(o, p));
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
792
|
return l ? l.then(() => o) : o;
|
|
@@ -817,7 +817,7 @@ const dr = {
|
|
|
817
817
|
return s(c, r, a);
|
|
818
818
|
};
|
|
819
819
|
}
|
|
820
|
-
|
|
820
|
+
g(e, "~standard", () => ({
|
|
821
821
|
validate: (s) => {
|
|
822
822
|
try {
|
|
823
823
|
const i = wt(e, s);
|
|
@@ -830,7 +830,7 @@ const dr = {
|
|
|
830
830
|
version: 1
|
|
831
831
|
}));
|
|
832
832
|
}), $e = /* @__PURE__ */ d("$ZodString", (e, n) => {
|
|
833
|
-
|
|
833
|
+
y.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Gt(e._zod.bag), e._zod.parse = (t, r) => {
|
|
834
834
|
if (n.coerce)
|
|
835
835
|
try {
|
|
836
836
|
t.value = String(t.value);
|
|
@@ -843,10 +843,10 @@ const dr = {
|
|
|
843
843
|
inst: e
|
|
844
844
|
}), t;
|
|
845
845
|
};
|
|
846
|
-
}),
|
|
846
|
+
}), b = /* @__PURE__ */ d("$ZodStringFormat", (e, n) => {
|
|
847
847
|
ge.init(e, n), $e.init(e, n);
|
|
848
848
|
}), lr = /* @__PURE__ */ d("$ZodGUID", (e, n) => {
|
|
849
|
-
n.pattern ?? (n.pattern = $t),
|
|
849
|
+
n.pattern ?? (n.pattern = $t), b.init(e, n);
|
|
850
850
|
}), hr = /* @__PURE__ */ d("$ZodUUID", (e, n) => {
|
|
851
851
|
if (n.version) {
|
|
852
852
|
const r = {
|
|
@@ -864,11 +864,11 @@ const dr = {
|
|
|
864
864
|
n.pattern ?? (n.pattern = Me(r));
|
|
865
865
|
} else
|
|
866
866
|
n.pattern ?? (n.pattern = Me());
|
|
867
|
-
|
|
867
|
+
b.init(e, n);
|
|
868
868
|
}), fr = /* @__PURE__ */ d("$ZodEmail", (e, n) => {
|
|
869
|
-
n.pattern ?? (n.pattern = Ct),
|
|
869
|
+
n.pattern ?? (n.pattern = Ct), b.init(e, n);
|
|
870
870
|
}), pr = /* @__PURE__ */ d("$ZodURL", (e, n) => {
|
|
871
|
-
|
|
871
|
+
b.init(e, n), e._zod.check = (t) => {
|
|
872
872
|
try {
|
|
873
873
|
const r = t.value.trim(), s = new URL(r);
|
|
874
874
|
n.hostname && (n.hostname.lastIndex = 0, n.hostname.test(s.hostname) || t.issues.push({
|
|
@@ -900,31 +900,31 @@ const dr = {
|
|
|
900
900
|
}
|
|
901
901
|
};
|
|
902
902
|
}), mr = /* @__PURE__ */ d("$ZodEmoji", (e, n) => {
|
|
903
|
-
n.pattern ?? (n.pattern = Dt()),
|
|
903
|
+
n.pattern ?? (n.pattern = Dt()), b.init(e, n);
|
|
904
904
|
}), wr = /* @__PURE__ */ d("$ZodNanoID", (e, n) => {
|
|
905
|
-
n.pattern ?? (n.pattern = Tt),
|
|
905
|
+
n.pattern ?? (n.pattern = Tt), b.init(e, n);
|
|
906
906
|
}), vr = /* @__PURE__ */ d("$ZodCUID", (e, n) => {
|
|
907
|
-
n.pattern ?? (n.pattern = zt),
|
|
907
|
+
n.pattern ?? (n.pattern = zt), b.init(e, n);
|
|
908
908
|
}), gr = /* @__PURE__ */ d("$ZodCUID2", (e, n) => {
|
|
909
|
-
n.pattern ?? (n.pattern = Pt),
|
|
909
|
+
n.pattern ?? (n.pattern = Pt), b.init(e, n);
|
|
910
910
|
}), br = /* @__PURE__ */ d("$ZodULID", (e, n) => {
|
|
911
|
-
n.pattern ?? (n.pattern = Ot),
|
|
911
|
+
n.pattern ?? (n.pattern = Ot), b.init(e, n);
|
|
912
912
|
}), _r = /* @__PURE__ */ d("$ZodXID", (e, n) => {
|
|
913
|
-
n.pattern ?? (n.pattern = Rt),
|
|
913
|
+
n.pattern ?? (n.pattern = Rt), b.init(e, n);
|
|
914
914
|
}), yr = /* @__PURE__ */ d("$ZodKSUID", (e, n) => {
|
|
915
|
-
n.pattern ?? (n.pattern = At),
|
|
915
|
+
n.pattern ?? (n.pattern = At), b.init(e, n);
|
|
916
916
|
}), kr = /* @__PURE__ */ d("$ZodISODateTime", (e, n) => {
|
|
917
|
-
n.pattern ?? (n.pattern = Bt(n)),
|
|
917
|
+
n.pattern ?? (n.pattern = Bt(n)), b.init(e, n);
|
|
918
918
|
}), Ir = /* @__PURE__ */ d("$ZodISODate", (e, n) => {
|
|
919
|
-
n.pattern ?? (n.pattern = Vt),
|
|
919
|
+
n.pattern ?? (n.pattern = Vt), b.init(e, n);
|
|
920
920
|
}), Sr = /* @__PURE__ */ d("$ZodISOTime", (e, n) => {
|
|
921
|
-
n.pattern ?? (n.pattern = Lt(n)),
|
|
921
|
+
n.pattern ?? (n.pattern = Lt(n)), b.init(e, n);
|
|
922
922
|
}), Er = /* @__PURE__ */ d("$ZodISODuration", (e, n) => {
|
|
923
|
-
n.pattern ?? (n.pattern = Nt),
|
|
923
|
+
n.pattern ?? (n.pattern = Nt), b.init(e, n);
|
|
924
924
|
}), zr = /* @__PURE__ */ d("$ZodIPv4", (e, n) => {
|
|
925
|
-
n.pattern ?? (n.pattern = qt),
|
|
925
|
+
n.pattern ?? (n.pattern = qt), b.init(e, n), e._zod.bag.format = "ipv4";
|
|
926
926
|
}), Pr = /* @__PURE__ */ d("$ZodIPv6", (e, n) => {
|
|
927
|
-
n.pattern ?? (n.pattern = Mt),
|
|
927
|
+
n.pattern ?? (n.pattern = Mt), b.init(e, n), e._zod.bag.format = "ipv6", e._zod.check = (t) => {
|
|
928
928
|
try {
|
|
929
929
|
new URL(`http://[${t.value}]`);
|
|
930
930
|
} catch {
|
|
@@ -938,9 +938,9 @@ const dr = {
|
|
|
938
938
|
}
|
|
939
939
|
};
|
|
940
940
|
}), Or = /* @__PURE__ */ d("$ZodCIDRv4", (e, n) => {
|
|
941
|
-
n.pattern ?? (n.pattern = Ut),
|
|
941
|
+
n.pattern ?? (n.pattern = Ut), b.init(e, n);
|
|
942
942
|
}), Rr = /* @__PURE__ */ d("$ZodCIDRv6", (e, n) => {
|
|
943
|
-
n.pattern ?? (n.pattern = xt),
|
|
943
|
+
n.pattern ?? (n.pattern = xt), b.init(e, n), e._zod.check = (t) => {
|
|
944
944
|
const r = t.value.split("/");
|
|
945
945
|
try {
|
|
946
946
|
if (r.length !== 2)
|
|
@@ -977,7 +977,7 @@ function Pn(e) {
|
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
979
|
const Ar = /* @__PURE__ */ d("$ZodBase64", (e, n) => {
|
|
980
|
-
n.pattern ?? (n.pattern = Ft),
|
|
980
|
+
n.pattern ?? (n.pattern = Ft), b.init(e, n), e._zod.bag.contentEncoding = "base64", e._zod.check = (t) => {
|
|
981
981
|
Pn(t.value) || t.issues.push({
|
|
982
982
|
code: "invalid_format",
|
|
983
983
|
format: "base64",
|
|
@@ -994,7 +994,7 @@ function Tr(e) {
|
|
|
994
994
|
return Pn(t);
|
|
995
995
|
}
|
|
996
996
|
const Nr = /* @__PURE__ */ d("$ZodBase64URL", (e, n) => {
|
|
997
|
-
n.pattern ?? (n.pattern = _n),
|
|
997
|
+
n.pattern ?? (n.pattern = _n), b.init(e, n), e._zod.bag.contentEncoding = "base64url", e._zod.check = (t) => {
|
|
998
998
|
Tr(t.value) || t.issues.push({
|
|
999
999
|
code: "invalid_format",
|
|
1000
1000
|
format: "base64url",
|
|
@@ -1004,7 +1004,7 @@ const Nr = /* @__PURE__ */ d("$ZodBase64URL", (e, n) => {
|
|
|
1004
1004
|
});
|
|
1005
1005
|
};
|
|
1006
1006
|
}), $r = /* @__PURE__ */ d("$ZodE164", (e, n) => {
|
|
1007
|
-
n.pattern ?? (n.pattern = jt),
|
|
1007
|
+
n.pattern ?? (n.pattern = jt), b.init(e, n);
|
|
1008
1008
|
});
|
|
1009
1009
|
function Cr(e, n = null) {
|
|
1010
1010
|
try {
|
|
@@ -1021,7 +1021,7 @@ function Cr(e, n = null) {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
1023
|
const Zr = /* @__PURE__ */ d("$ZodJWT", (e, n) => {
|
|
1024
|
-
|
|
1024
|
+
b.init(e, n), e._zod.check = (t) => {
|
|
1025
1025
|
Cr(t.value, n.alg) || t.issues.push({
|
|
1026
1026
|
code: "invalid_format",
|
|
1027
1027
|
format: "jwt",
|
|
@@ -1031,7 +1031,7 @@ const Zr = /* @__PURE__ */ d("$ZodJWT", (e, n) => {
|
|
|
1031
1031
|
});
|
|
1032
1032
|
};
|
|
1033
1033
|
}), On = /* @__PURE__ */ d("$ZodNumber", (e, n) => {
|
|
1034
|
-
|
|
1034
|
+
y.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? In, e._zod.parse = (t, r) => {
|
|
1035
1035
|
if (n.coerce)
|
|
1036
1036
|
try {
|
|
1037
1037
|
t.value = Number(t.value);
|
|
@@ -1052,7 +1052,7 @@ const Zr = /* @__PURE__ */ d("$ZodJWT", (e, n) => {
|
|
|
1052
1052
|
}), Dr = /* @__PURE__ */ d("$ZodNumberFormat", (e, n) => {
|
|
1053
1053
|
Yt.init(e, n), On.init(e, n);
|
|
1054
1054
|
}), qr = /* @__PURE__ */ d("$ZodBoolean", (e, n) => {
|
|
1055
|
-
|
|
1055
|
+
y.init(e, n), e._zod.pattern = Wt, e._zod.parse = (t, r) => {
|
|
1056
1056
|
if (n.coerce)
|
|
1057
1057
|
try {
|
|
1058
1058
|
t.value = !!t.value;
|
|
@@ -1067,9 +1067,9 @@ const Zr = /* @__PURE__ */ d("$ZodJWT", (e, n) => {
|
|
|
1067
1067
|
}), t;
|
|
1068
1068
|
};
|
|
1069
1069
|
}), Mr = /* @__PURE__ */ d("$ZodUnknown", (e, n) => {
|
|
1070
|
-
|
|
1070
|
+
y.init(e, n), e._zod.parse = (t) => t;
|
|
1071
1071
|
}), Ur = /* @__PURE__ */ d("$ZodNever", (e, n) => {
|
|
1072
|
-
|
|
1072
|
+
y.init(e, n), e._zod.parse = (t, r) => (t.issues.push({
|
|
1073
1073
|
expected: "never",
|
|
1074
1074
|
code: "invalid_type",
|
|
1075
1075
|
input: t.value,
|
|
@@ -1080,7 +1080,7 @@ function Ue(e, n, t) {
|
|
|
1080
1080
|
e.issues.length && n.issues.push(...K(t, e.issues)), n.value[t] = e.value;
|
|
1081
1081
|
}
|
|
1082
1082
|
const xr = /* @__PURE__ */ d("$ZodArray", (e, n) => {
|
|
1083
|
-
|
|
1083
|
+
y.init(e, n), e._zod.parse = (t, r) => {
|
|
1084
1084
|
const s = t.value;
|
|
1085
1085
|
if (!Array.isArray(s))
|
|
1086
1086
|
return t.issues.push({
|
|
@@ -1132,8 +1132,8 @@ function An(e, n, t, r, s, i) {
|
|
|
1132
1132
|
o.push(h);
|
|
1133
1133
|
continue;
|
|
1134
1134
|
}
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1135
|
+
const p = c.run({ value: n[h], issues: [] }, r);
|
|
1136
|
+
p instanceof Promise ? e.push(p.then((w) => le(w, t, h, n, l))) : le(p, t, h, n, l);
|
|
1137
1137
|
}
|
|
1138
1138
|
return o.length && t.issues.push({
|
|
1139
1139
|
code: "unrecognized_keys",
|
|
@@ -1143,7 +1143,7 @@ function An(e, n, t, r, s, i) {
|
|
|
1143
1143
|
}), e.length ? Promise.all(e).then(() => t) : t;
|
|
1144
1144
|
}
|
|
1145
1145
|
const Fr = /* @__PURE__ */ d("$ZodObject", (e, n) => {
|
|
1146
|
-
if (
|
|
1146
|
+
if (y.init(e, n), !Object.getOwnPropertyDescriptor(n, "shape")?.get) {
|
|
1147
1147
|
const a = n.shape;
|
|
1148
1148
|
Object.defineProperty(n, "shape", {
|
|
1149
1149
|
get: () => {
|
|
@@ -1155,7 +1155,7 @@ const Fr = /* @__PURE__ */ d("$ZodObject", (e, n) => {
|
|
|
1155
1155
|
});
|
|
1156
1156
|
}
|
|
1157
1157
|
const r = me(() => Rn(n));
|
|
1158
|
-
|
|
1158
|
+
g(e._zod, "propValues", () => {
|
|
1159
1159
|
const a = n.shape, c = {};
|
|
1160
1160
|
for (const u in a) {
|
|
1161
1161
|
const l = a[u]._zod;
|
|
@@ -1181,79 +1181,79 @@ const Fr = /* @__PURE__ */ d("$ZodObject", (e, n) => {
|
|
|
1181
1181
|
}), a;
|
|
1182
1182
|
a.value = {};
|
|
1183
1183
|
const l = [], h = o.shape;
|
|
1184
|
-
for (const
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1184
|
+
for (const p of o.keys) {
|
|
1185
|
+
const w = h[p], E = w._zod.optout === "optional", v = w._zod.run({ value: u[p], issues: [] }, c);
|
|
1186
|
+
v instanceof Promise ? l.push(v.then(($) => le($, a, p, u, E))) : le(v, a, p, u, E);
|
|
1187
1187
|
}
|
|
1188
1188
|
return i ? An(l, u, a, c, r.value, e) : l.length ? Promise.all(l).then(() => a) : a;
|
|
1189
1189
|
};
|
|
1190
1190
|
}), jr = /* @__PURE__ */ d("$ZodObjectJIT", (e, n) => {
|
|
1191
1191
|
Fr.init(e, n);
|
|
1192
|
-
const t = e._zod.parse, r = me(() => Rn(n)), s = (
|
|
1193
|
-
const
|
|
1194
|
-
const A = qe(
|
|
1192
|
+
const t = e._zod.parse, r = me(() => Rn(n)), s = (p) => {
|
|
1193
|
+
const w = new ur(["shape", "payload", "ctx"]), E = r.value, v = (Z) => {
|
|
1194
|
+
const A = qe(Z);
|
|
1195
1195
|
return `shape[${A}]._zod.run({ value: input[${A}], issues: [] }, ctx)`;
|
|
1196
1196
|
};
|
|
1197
|
-
|
|
1198
|
-
const
|
|
1197
|
+
w.write("const input = payload.value;");
|
|
1198
|
+
const $ = /* @__PURE__ */ Object.create(null);
|
|
1199
1199
|
let Yn = 0;
|
|
1200
|
-
for (const
|
|
1201
|
-
Z
|
|
1202
|
-
|
|
1203
|
-
for (const
|
|
1204
|
-
const A = Z
|
|
1205
|
-
|
|
1200
|
+
for (const Z of E.keys)
|
|
1201
|
+
$[Z] = `key_${Yn++}`;
|
|
1202
|
+
w.write("const newResult = {};");
|
|
1203
|
+
for (const Z of E.keys) {
|
|
1204
|
+
const A = $[Z], C = qe(Z), et = p[Z]?._zod?.optout === "optional";
|
|
1205
|
+
w.write(`const ${A} = ${v(Z)};`), et ? w.write(`
|
|
1206
1206
|
if (${A}.issues.length) {
|
|
1207
|
-
if (${
|
|
1207
|
+
if (${C} in input) {
|
|
1208
1208
|
payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
|
|
1209
1209
|
...iss,
|
|
1210
|
-
path: iss.path ? [${
|
|
1210
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
1211
1211
|
})));
|
|
1212
1212
|
}
|
|
1213
1213
|
}
|
|
1214
1214
|
|
|
1215
1215
|
if (${A}.value === undefined) {
|
|
1216
|
-
if (${
|
|
1217
|
-
newResult[${
|
|
1216
|
+
if (${C} in input) {
|
|
1217
|
+
newResult[${C}] = undefined;
|
|
1218
1218
|
}
|
|
1219
1219
|
} else {
|
|
1220
|
-
newResult[${
|
|
1220
|
+
newResult[${C}] = ${A}.value;
|
|
1221
1221
|
}
|
|
1222
1222
|
|
|
1223
|
-
`) :
|
|
1223
|
+
`) : w.write(`
|
|
1224
1224
|
if (${A}.issues.length) {
|
|
1225
1225
|
payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
|
|
1226
1226
|
...iss,
|
|
1227
|
-
path: iss.path ? [${
|
|
1227
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
1228
1228
|
})));
|
|
1229
1229
|
}
|
|
1230
1230
|
|
|
1231
1231
|
if (${A}.value === undefined) {
|
|
1232
|
-
if (${
|
|
1233
|
-
newResult[${
|
|
1232
|
+
if (${C} in input) {
|
|
1233
|
+
newResult[${C}] = undefined;
|
|
1234
1234
|
}
|
|
1235
1235
|
} else {
|
|
1236
|
-
newResult[${
|
|
1236
|
+
newResult[${C}] = ${A}.value;
|
|
1237
1237
|
}
|
|
1238
1238
|
|
|
1239
1239
|
`);
|
|
1240
1240
|
}
|
|
1241
|
-
|
|
1242
|
-
const Qn =
|
|
1243
|
-
return (
|
|
1241
|
+
w.write("payload.value = newResult;"), w.write("return payload;");
|
|
1242
|
+
const Qn = w.compile();
|
|
1243
|
+
return (Z, A) => Qn(p, Z, A);
|
|
1244
1244
|
};
|
|
1245
1245
|
let i;
|
|
1246
1246
|
const o = ne, a = !fn.jitless, u = a && rt.value, l = n.catchall;
|
|
1247
1247
|
let h;
|
|
1248
|
-
e._zod.parse = (
|
|
1248
|
+
e._zod.parse = (p, w) => {
|
|
1249
1249
|
h ?? (h = r.value);
|
|
1250
|
-
const E =
|
|
1251
|
-
return o(E) ? a && u &&
|
|
1250
|
+
const E = p.value;
|
|
1251
|
+
return o(E) ? a && u && w?.async === !1 && w.jitless !== !0 ? (i || (i = s(n.shape)), p = i(p, w), l ? An([], E, p, w, h, e) : p) : t(p, w) : (p.issues.push({
|
|
1252
1252
|
expected: "object",
|
|
1253
1253
|
code: "invalid_type",
|
|
1254
1254
|
input: E,
|
|
1255
1255
|
inst: e
|
|
1256
|
-
}),
|
|
1256
|
+
}), p);
|
|
1257
1257
|
};
|
|
1258
1258
|
});
|
|
1259
1259
|
function xe(e, n, t, r) {
|
|
@@ -1269,10 +1269,10 @@ function xe(e, n, t, r) {
|
|
|
1269
1269
|
}), n);
|
|
1270
1270
|
}
|
|
1271
1271
|
const Tn = /* @__PURE__ */ d("$ZodUnion", (e, n) => {
|
|
1272
|
-
|
|
1272
|
+
y.init(e, n), g(e._zod, "optin", () => n.options.some((s) => s._zod.optin === "optional") ? "optional" : void 0), g(e._zod, "optout", () => n.options.some((s) => s._zod.optout === "optional") ? "optional" : void 0), g(e._zod, "values", () => {
|
|
1273
1273
|
if (n.options.every((s) => s._zod.values))
|
|
1274
1274
|
return new Set(n.options.flatMap((s) => Array.from(s._zod.values)));
|
|
1275
|
-
}),
|
|
1275
|
+
}), g(e._zod, "pattern", () => {
|
|
1276
1276
|
if (n.options.every((s) => s._zod.pattern)) {
|
|
1277
1277
|
const s = n.options.map((i) => i._zod.pattern);
|
|
1278
1278
|
return new RegExp(`^(${s.map((i) => Re(i.source)).join("|")})$`);
|
|
@@ -1302,7 +1302,7 @@ const Tn = /* @__PURE__ */ d("$ZodUnion", (e, n) => {
|
|
|
1302
1302
|
}), Vr = /* @__PURE__ */ d("$ZodDiscriminatedUnion", (e, n) => {
|
|
1303
1303
|
n.inclusive = !1, Tn.init(e, n);
|
|
1304
1304
|
const t = e._zod.parse;
|
|
1305
|
-
|
|
1305
|
+
g(e._zod, "propValues", () => {
|
|
1306
1306
|
const s = {};
|
|
1307
1307
|
for (const i of n.options) {
|
|
1308
1308
|
const o = i._zod.propValues;
|
|
@@ -1351,7 +1351,7 @@ const Tn = /* @__PURE__ */ d("$ZodUnion", (e, n) => {
|
|
|
1351
1351
|
}), s);
|
|
1352
1352
|
};
|
|
1353
1353
|
}), Lr = /* @__PURE__ */ d("$ZodIntersection", (e, n) => {
|
|
1354
|
-
|
|
1354
|
+
y.init(e, n), e._zod.parse = (t, r) => {
|
|
1355
1355
|
const s = t.value, i = n.left._zod.run({ value: s, issues: [] }, r), o = n.right._zod.run({ value: s, issues: [] }, r);
|
|
1356
1356
|
return i instanceof Promise || o instanceof Promise ? Promise.all([i, o]).then(([c, u]) => Fe(t, c, u)) : Fe(t, i, o);
|
|
1357
1357
|
};
|
|
@@ -1416,7 +1416,7 @@ function Fe(e, n, t) {
|
|
|
1416
1416
|
return e.value = o.data, e;
|
|
1417
1417
|
}
|
|
1418
1418
|
const Br = /* @__PURE__ */ d("$ZodRecord", (e, n) => {
|
|
1419
|
-
|
|
1419
|
+
y.init(e, n), e._zod.parse = (t, r) => {
|
|
1420
1420
|
const s = t.value;
|
|
1421
1421
|
if (!H(s))
|
|
1422
1422
|
return t.issues.push({
|
|
@@ -1480,7 +1480,7 @@ const Br = /* @__PURE__ */ d("$ZodRecord", (e, n) => {
|
|
|
1480
1480
|
return i.length ? Promise.all(i).then(() => t) : t;
|
|
1481
1481
|
};
|
|
1482
1482
|
}), Gr = /* @__PURE__ */ d("$ZodEnum", (e, n) => {
|
|
1483
|
-
|
|
1483
|
+
y.init(e, n);
|
|
1484
1484
|
const t = pn(n.entries), r = new Set(t);
|
|
1485
1485
|
e._zod.values = r, e._zod.pattern = new RegExp(`^(${t.filter((s) => st.has(typeof s)).map((s) => typeof s == "string" ? Y(s) : s.toString()).join("|")})$`), e._zod.parse = (s, i) => {
|
|
1486
1486
|
const o = s.value;
|
|
@@ -1492,7 +1492,7 @@ const Br = /* @__PURE__ */ d("$ZodRecord", (e, n) => {
|
|
|
1492
1492
|
}), s;
|
|
1493
1493
|
};
|
|
1494
1494
|
}), Jr = /* @__PURE__ */ d("$ZodLiteral", (e, n) => {
|
|
1495
|
-
if (
|
|
1495
|
+
if (y.init(e, n), n.values.length === 0)
|
|
1496
1496
|
throw new Error("Cannot create literal schema with no valid values");
|
|
1497
1497
|
const t = new Set(n.values);
|
|
1498
1498
|
e._zod.values = t, e._zod.pattern = new RegExp(`^(${n.values.map((r) => typeof r == "string" ? Y(r) : r ? Y(r.toString()) : String(r)).join("|")})$`), e._zod.parse = (r, s) => {
|
|
@@ -1505,7 +1505,7 @@ const Br = /* @__PURE__ */ d("$ZodRecord", (e, n) => {
|
|
|
1505
1505
|
}), r;
|
|
1506
1506
|
};
|
|
1507
1507
|
}), Wr = /* @__PURE__ */ d("$ZodTransform", (e, n) => {
|
|
1508
|
-
|
|
1508
|
+
y.init(e, n), e._zod.parse = (t, r) => {
|
|
1509
1509
|
if (r.direction === "backward")
|
|
1510
1510
|
throw new hn(e.constructor.name);
|
|
1511
1511
|
const s = n.transform(t.value, t);
|
|
@@ -1520,7 +1520,7 @@ function je(e, n) {
|
|
|
1520
1520
|
return e.issues.length && n === void 0 ? { issues: [], value: void 0 } : e;
|
|
1521
1521
|
}
|
|
1522
1522
|
const Nn = /* @__PURE__ */ d("$ZodOptional", (e, n) => {
|
|
1523
|
-
|
|
1523
|
+
y.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", g(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), g(e._zod, "pattern", () => {
|
|
1524
1524
|
const t = n.innerType._zod.pattern;
|
|
1525
1525
|
return t ? new RegExp(`^(${Re(t.source)})?$`) : void 0;
|
|
1526
1526
|
}), e._zod.parse = (t, r) => {
|
|
@@ -1531,14 +1531,14 @@ const Nn = /* @__PURE__ */ d("$ZodOptional", (e, n) => {
|
|
|
1531
1531
|
return t.value === void 0 ? t : n.innerType._zod.run(t, r);
|
|
1532
1532
|
};
|
|
1533
1533
|
}), Kr = /* @__PURE__ */ d("$ZodExactOptional", (e, n) => {
|
|
1534
|
-
Nn.init(e, n),
|
|
1534
|
+
Nn.init(e, n), g(e._zod, "values", () => n.innerType._zod.values), g(e._zod, "pattern", () => n.innerType._zod.pattern), e._zod.parse = (t, r) => n.innerType._zod.run(t, r);
|
|
1535
1535
|
}), Xr = /* @__PURE__ */ d("$ZodNullable", (e, n) => {
|
|
1536
|
-
|
|
1536
|
+
y.init(e, n), g(e._zod, "optin", () => n.innerType._zod.optin), g(e._zod, "optout", () => n.innerType._zod.optout), g(e._zod, "pattern", () => {
|
|
1537
1537
|
const t = n.innerType._zod.pattern;
|
|
1538
1538
|
return t ? new RegExp(`^(${Re(t.source)}|null)$`) : void 0;
|
|
1539
|
-
}),
|
|
1539
|
+
}), g(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, null]) : void 0), e._zod.parse = (t, r) => t.value === null ? t : n.innerType._zod.run(t, r);
|
|
1540
1540
|
}), Hr = /* @__PURE__ */ d("$ZodDefault", (e, n) => {
|
|
1541
|
-
|
|
1541
|
+
y.init(e, n), e._zod.optin = "optional", g(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
|
|
1542
1542
|
if (r.direction === "backward")
|
|
1543
1543
|
return n.innerType._zod.run(t, r);
|
|
1544
1544
|
if (t.value === void 0)
|
|
@@ -1551,9 +1551,9 @@ function Ve(e, n) {
|
|
|
1551
1551
|
return e.value === void 0 && (e.value = n.defaultValue), e;
|
|
1552
1552
|
}
|
|
1553
1553
|
const Yr = /* @__PURE__ */ d("$ZodPrefault", (e, n) => {
|
|
1554
|
-
|
|
1554
|
+
y.init(e, n), e._zod.optin = "optional", g(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => (r.direction === "backward" || t.value === void 0 && (t.value = n.defaultValue), n.innerType._zod.run(t, r));
|
|
1555
1555
|
}), Qr = /* @__PURE__ */ d("$ZodNonOptional", (e, n) => {
|
|
1556
|
-
|
|
1556
|
+
y.init(e, n), g(e._zod, "values", () => {
|
|
1557
1557
|
const t = n.innerType._zod.values;
|
|
1558
1558
|
return t ? new Set([...t].filter((r) => r !== void 0)) : void 0;
|
|
1559
1559
|
}), e._zod.parse = (t, r) => {
|
|
@@ -1570,7 +1570,7 @@ function Le(e, n) {
|
|
|
1570
1570
|
}), e;
|
|
1571
1571
|
}
|
|
1572
1572
|
const es = /* @__PURE__ */ d("$ZodCatch", (e, n) => {
|
|
1573
|
-
|
|
1573
|
+
y.init(e, n), g(e._zod, "optin", () => n.innerType._zod.optin), g(e._zod, "optout", () => n.innerType._zod.optout), g(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
|
|
1574
1574
|
if (r.direction === "backward")
|
|
1575
1575
|
return n.innerType._zod.run(t, r);
|
|
1576
1576
|
const s = n.innerType._zod.run(t, r);
|
|
@@ -1589,7 +1589,7 @@ const es = /* @__PURE__ */ d("$ZodCatch", (e, n) => {
|
|
|
1589
1589
|
}), t.issues = []), t);
|
|
1590
1590
|
};
|
|
1591
1591
|
}), ns = /* @__PURE__ */ d("$ZodPipe", (e, n) => {
|
|
1592
|
-
|
|
1592
|
+
y.init(e, n), g(e._zod, "values", () => n.in._zod.values), g(e._zod, "optin", () => n.in._zod.optin), g(e._zod, "optout", () => n.out._zod.optout), g(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, r) => {
|
|
1593
1593
|
if (r.direction === "backward") {
|
|
1594
1594
|
const i = n.out._zod.run(t, r);
|
|
1595
1595
|
return i instanceof Promise ? i.then((o) => ue(o, n.in, r)) : ue(i, n.in, r);
|
|
@@ -1602,7 +1602,7 @@ function ue(e, n, t) {
|
|
|
1602
1602
|
return e.issues.length ? (e.aborted = !0, e) : n._zod.run({ value: e.value, issues: e.issues }, t);
|
|
1603
1603
|
}
|
|
1604
1604
|
const ts = /* @__PURE__ */ d("$ZodReadonly", (e, n) => {
|
|
1605
|
-
|
|
1605
|
+
y.init(e, n), g(e._zod, "propValues", () => n.innerType._zod.propValues), g(e._zod, "values", () => n.innerType._zod.values), g(e._zod, "optin", () => n.innerType?._zod?.optin), g(e._zod, "optout", () => n.innerType?._zod?.optout), e._zod.parse = (t, r) => {
|
|
1606
1606
|
if (r.direction === "backward")
|
|
1607
1607
|
return n.innerType._zod.run(t, r);
|
|
1608
1608
|
const s = n.innerType._zod.run(t, r);
|
|
@@ -1613,7 +1613,7 @@ function Be(e) {
|
|
|
1613
1613
|
return e.value = Object.freeze(e.value), e;
|
|
1614
1614
|
}
|
|
1615
1615
|
const rs = /* @__PURE__ */ d("$ZodCustom", (e, n) => {
|
|
1616
|
-
T.init(e, n),
|
|
1616
|
+
T.init(e, n), y.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => {
|
|
1617
1617
|
const r = t.value, s = n.fn(r);
|
|
1618
1618
|
if (s instanceof Promise)
|
|
1619
1619
|
return s.then((i) => Ge(i, t, r, e));
|
|
@@ -1674,7 +1674,7 @@ const ee = globalThis.__zod_globalRegistry;
|
|
|
1674
1674
|
function is(e, n) {
|
|
1675
1675
|
return new e({
|
|
1676
1676
|
type: "string",
|
|
1677
|
-
...
|
|
1677
|
+
...m(n)
|
|
1678
1678
|
});
|
|
1679
1679
|
}
|
|
1680
1680
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1684,7 +1684,7 @@ function as(e, n) {
|
|
|
1684
1684
|
format: "email",
|
|
1685
1685
|
check: "string_format",
|
|
1686
1686
|
abort: !1,
|
|
1687
|
-
...
|
|
1687
|
+
...m(n)
|
|
1688
1688
|
});
|
|
1689
1689
|
}
|
|
1690
1690
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1694,7 +1694,7 @@ function We(e, n) {
|
|
|
1694
1694
|
format: "guid",
|
|
1695
1695
|
check: "string_format",
|
|
1696
1696
|
abort: !1,
|
|
1697
|
-
...
|
|
1697
|
+
...m(n)
|
|
1698
1698
|
});
|
|
1699
1699
|
}
|
|
1700
1700
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1704,7 +1704,7 @@ function cs(e, n) {
|
|
|
1704
1704
|
format: "uuid",
|
|
1705
1705
|
check: "string_format",
|
|
1706
1706
|
abort: !1,
|
|
1707
|
-
...
|
|
1707
|
+
...m(n)
|
|
1708
1708
|
});
|
|
1709
1709
|
}
|
|
1710
1710
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1715,7 +1715,7 @@ function us(e, n) {
|
|
|
1715
1715
|
check: "string_format",
|
|
1716
1716
|
abort: !1,
|
|
1717
1717
|
version: "v4",
|
|
1718
|
-
...
|
|
1718
|
+
...m(n)
|
|
1719
1719
|
});
|
|
1720
1720
|
}
|
|
1721
1721
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1726,7 +1726,7 @@ function ds(e, n) {
|
|
|
1726
1726
|
check: "string_format",
|
|
1727
1727
|
abort: !1,
|
|
1728
1728
|
version: "v6",
|
|
1729
|
-
...
|
|
1729
|
+
...m(n)
|
|
1730
1730
|
});
|
|
1731
1731
|
}
|
|
1732
1732
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1737,7 +1737,7 @@ function ls(e, n) {
|
|
|
1737
1737
|
check: "string_format",
|
|
1738
1738
|
abort: !1,
|
|
1739
1739
|
version: "v7",
|
|
1740
|
-
...
|
|
1740
|
+
...m(n)
|
|
1741
1741
|
});
|
|
1742
1742
|
}
|
|
1743
1743
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1747,7 +1747,7 @@ function hs(e, n) {
|
|
|
1747
1747
|
format: "url",
|
|
1748
1748
|
check: "string_format",
|
|
1749
1749
|
abort: !1,
|
|
1750
|
-
...
|
|
1750
|
+
...m(n)
|
|
1751
1751
|
});
|
|
1752
1752
|
}
|
|
1753
1753
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1757,7 +1757,7 @@ function fs(e, n) {
|
|
|
1757
1757
|
format: "emoji",
|
|
1758
1758
|
check: "string_format",
|
|
1759
1759
|
abort: !1,
|
|
1760
|
-
...
|
|
1760
|
+
...m(n)
|
|
1761
1761
|
});
|
|
1762
1762
|
}
|
|
1763
1763
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1767,7 +1767,7 @@ function ps(e, n) {
|
|
|
1767
1767
|
format: "nanoid",
|
|
1768
1768
|
check: "string_format",
|
|
1769
1769
|
abort: !1,
|
|
1770
|
-
...
|
|
1770
|
+
...m(n)
|
|
1771
1771
|
});
|
|
1772
1772
|
}
|
|
1773
1773
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1777,7 +1777,7 @@ function ms(e, n) {
|
|
|
1777
1777
|
format: "cuid",
|
|
1778
1778
|
check: "string_format",
|
|
1779
1779
|
abort: !1,
|
|
1780
|
-
...
|
|
1780
|
+
...m(n)
|
|
1781
1781
|
});
|
|
1782
1782
|
}
|
|
1783
1783
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1787,7 +1787,7 @@ function ws(e, n) {
|
|
|
1787
1787
|
format: "cuid2",
|
|
1788
1788
|
check: "string_format",
|
|
1789
1789
|
abort: !1,
|
|
1790
|
-
...
|
|
1790
|
+
...m(n)
|
|
1791
1791
|
});
|
|
1792
1792
|
}
|
|
1793
1793
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1797,7 +1797,7 @@ function vs(e, n) {
|
|
|
1797
1797
|
format: "ulid",
|
|
1798
1798
|
check: "string_format",
|
|
1799
1799
|
abort: !1,
|
|
1800
|
-
...
|
|
1800
|
+
...m(n)
|
|
1801
1801
|
});
|
|
1802
1802
|
}
|
|
1803
1803
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1807,7 +1807,7 @@ function gs(e, n) {
|
|
|
1807
1807
|
format: "xid",
|
|
1808
1808
|
check: "string_format",
|
|
1809
1809
|
abort: !1,
|
|
1810
|
-
...
|
|
1810
|
+
...m(n)
|
|
1811
1811
|
});
|
|
1812
1812
|
}
|
|
1813
1813
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1817,7 +1817,7 @@ function bs(e, n) {
|
|
|
1817
1817
|
format: "ksuid",
|
|
1818
1818
|
check: "string_format",
|
|
1819
1819
|
abort: !1,
|
|
1820
|
-
...
|
|
1820
|
+
...m(n)
|
|
1821
1821
|
});
|
|
1822
1822
|
}
|
|
1823
1823
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1827,7 +1827,7 @@ function _s(e, n) {
|
|
|
1827
1827
|
format: "ipv4",
|
|
1828
1828
|
check: "string_format",
|
|
1829
1829
|
abort: !1,
|
|
1830
|
-
...
|
|
1830
|
+
...m(n)
|
|
1831
1831
|
});
|
|
1832
1832
|
}
|
|
1833
1833
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1837,7 +1837,7 @@ function ys(e, n) {
|
|
|
1837
1837
|
format: "ipv6",
|
|
1838
1838
|
check: "string_format",
|
|
1839
1839
|
abort: !1,
|
|
1840
|
-
...
|
|
1840
|
+
...m(n)
|
|
1841
1841
|
});
|
|
1842
1842
|
}
|
|
1843
1843
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1847,7 +1847,7 @@ function ks(e, n) {
|
|
|
1847
1847
|
format: "cidrv4",
|
|
1848
1848
|
check: "string_format",
|
|
1849
1849
|
abort: !1,
|
|
1850
|
-
...
|
|
1850
|
+
...m(n)
|
|
1851
1851
|
});
|
|
1852
1852
|
}
|
|
1853
1853
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1857,7 +1857,7 @@ function Is(e, n) {
|
|
|
1857
1857
|
format: "cidrv6",
|
|
1858
1858
|
check: "string_format",
|
|
1859
1859
|
abort: !1,
|
|
1860
|
-
...
|
|
1860
|
+
...m(n)
|
|
1861
1861
|
});
|
|
1862
1862
|
}
|
|
1863
1863
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1867,7 +1867,7 @@ function Ss(e, n) {
|
|
|
1867
1867
|
format: "base64",
|
|
1868
1868
|
check: "string_format",
|
|
1869
1869
|
abort: !1,
|
|
1870
|
-
...
|
|
1870
|
+
...m(n)
|
|
1871
1871
|
});
|
|
1872
1872
|
}
|
|
1873
1873
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1877,7 +1877,7 @@ function Es(e, n) {
|
|
|
1877
1877
|
format: "base64url",
|
|
1878
1878
|
check: "string_format",
|
|
1879
1879
|
abort: !1,
|
|
1880
|
-
...
|
|
1880
|
+
...m(n)
|
|
1881
1881
|
});
|
|
1882
1882
|
}
|
|
1883
1883
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1887,7 +1887,7 @@ function zs(e, n) {
|
|
|
1887
1887
|
format: "e164",
|
|
1888
1888
|
check: "string_format",
|
|
1889
1889
|
abort: !1,
|
|
1890
|
-
...
|
|
1890
|
+
...m(n)
|
|
1891
1891
|
});
|
|
1892
1892
|
}
|
|
1893
1893
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1897,7 +1897,7 @@ function Ps(e, n) {
|
|
|
1897
1897
|
format: "jwt",
|
|
1898
1898
|
check: "string_format",
|
|
1899
1899
|
abort: !1,
|
|
1900
|
-
...
|
|
1900
|
+
...m(n)
|
|
1901
1901
|
});
|
|
1902
1902
|
}
|
|
1903
1903
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1909,7 +1909,7 @@ function Os(e, n) {
|
|
|
1909
1909
|
offset: !1,
|
|
1910
1910
|
local: !1,
|
|
1911
1911
|
precision: null,
|
|
1912
|
-
...
|
|
1912
|
+
...m(n)
|
|
1913
1913
|
});
|
|
1914
1914
|
}
|
|
1915
1915
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1918,7 +1918,7 @@ function Rs(e, n) {
|
|
|
1918
1918
|
type: "string",
|
|
1919
1919
|
format: "date",
|
|
1920
1920
|
check: "string_format",
|
|
1921
|
-
...
|
|
1921
|
+
...m(n)
|
|
1922
1922
|
});
|
|
1923
1923
|
}
|
|
1924
1924
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1928,7 +1928,7 @@ function As(e, n) {
|
|
|
1928
1928
|
format: "time",
|
|
1929
1929
|
check: "string_format",
|
|
1930
1930
|
precision: null,
|
|
1931
|
-
...
|
|
1931
|
+
...m(n)
|
|
1932
1932
|
});
|
|
1933
1933
|
}
|
|
1934
1934
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1937,7 +1937,7 @@ function Ts(e, n) {
|
|
|
1937
1937
|
type: "string",
|
|
1938
1938
|
format: "duration",
|
|
1939
1939
|
check: "string_format",
|
|
1940
|
-
...
|
|
1940
|
+
...m(n)
|
|
1941
1941
|
});
|
|
1942
1942
|
}
|
|
1943
1943
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1945,7 +1945,7 @@ function Ns(e, n) {
|
|
|
1945
1945
|
return new e({
|
|
1946
1946
|
type: "number",
|
|
1947
1947
|
checks: [],
|
|
1948
|
-
...
|
|
1948
|
+
...m(n)
|
|
1949
1949
|
});
|
|
1950
1950
|
}
|
|
1951
1951
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1955,14 +1955,14 @@ function $s(e, n) {
|
|
|
1955
1955
|
check: "number_format",
|
|
1956
1956
|
abort: !1,
|
|
1957
1957
|
format: "safeint",
|
|
1958
|
-
...
|
|
1958
|
+
...m(n)
|
|
1959
1959
|
});
|
|
1960
1960
|
}
|
|
1961
1961
|
// @__NO_SIDE_EFFECTS__
|
|
1962
1962
|
function Cs(e, n) {
|
|
1963
1963
|
return new e({
|
|
1964
1964
|
type: "boolean",
|
|
1965
|
-
...
|
|
1965
|
+
...m(n)
|
|
1966
1966
|
});
|
|
1967
1967
|
}
|
|
1968
1968
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1975,14 +1975,14 @@ function Zs(e) {
|
|
|
1975
1975
|
function Ds(e, n) {
|
|
1976
1976
|
return new e({
|
|
1977
1977
|
type: "never",
|
|
1978
|
-
...
|
|
1978
|
+
...m(n)
|
|
1979
1979
|
});
|
|
1980
1980
|
}
|
|
1981
1981
|
// @__NO_SIDE_EFFECTS__
|
|
1982
1982
|
function Ke(e, n) {
|
|
1983
1983
|
return new En({
|
|
1984
1984
|
check: "less_than",
|
|
1985
|
-
...
|
|
1985
|
+
...m(n),
|
|
1986
1986
|
value: e,
|
|
1987
1987
|
inclusive: !1
|
|
1988
1988
|
});
|
|
@@ -1991,7 +1991,7 @@ function Ke(e, n) {
|
|
|
1991
1991
|
function _e(e, n) {
|
|
1992
1992
|
return new En({
|
|
1993
1993
|
check: "less_than",
|
|
1994
|
-
...
|
|
1994
|
+
...m(n),
|
|
1995
1995
|
value: e,
|
|
1996
1996
|
inclusive: !0
|
|
1997
1997
|
});
|
|
@@ -2000,7 +2000,7 @@ function _e(e, n) {
|
|
|
2000
2000
|
function Xe(e, n) {
|
|
2001
2001
|
return new zn({
|
|
2002
2002
|
check: "greater_than",
|
|
2003
|
-
...
|
|
2003
|
+
...m(n),
|
|
2004
2004
|
value: e,
|
|
2005
2005
|
inclusive: !1
|
|
2006
2006
|
});
|
|
@@ -2009,7 +2009,7 @@ function Xe(e, n) {
|
|
|
2009
2009
|
function ye(e, n) {
|
|
2010
2010
|
return new zn({
|
|
2011
2011
|
check: "greater_than",
|
|
2012
|
-
...
|
|
2012
|
+
...m(n),
|
|
2013
2013
|
value: e,
|
|
2014
2014
|
inclusive: !0
|
|
2015
2015
|
});
|
|
@@ -2018,7 +2018,7 @@ function ye(e, n) {
|
|
|
2018
2018
|
function He(e, n) {
|
|
2019
2019
|
return new Ht({
|
|
2020
2020
|
check: "multiple_of",
|
|
2021
|
-
...
|
|
2021
|
+
...m(n),
|
|
2022
2022
|
value: e
|
|
2023
2023
|
});
|
|
2024
2024
|
}
|
|
@@ -2026,7 +2026,7 @@ function He(e, n) {
|
|
|
2026
2026
|
function $n(e, n) {
|
|
2027
2027
|
return new Qt({
|
|
2028
2028
|
check: "max_length",
|
|
2029
|
-
...
|
|
2029
|
+
...m(n),
|
|
2030
2030
|
maximum: e
|
|
2031
2031
|
});
|
|
2032
2032
|
}
|
|
@@ -2034,7 +2034,7 @@ function $n(e, n) {
|
|
|
2034
2034
|
function he(e, n) {
|
|
2035
2035
|
return new er({
|
|
2036
2036
|
check: "min_length",
|
|
2037
|
-
...
|
|
2037
|
+
...m(n),
|
|
2038
2038
|
minimum: e
|
|
2039
2039
|
});
|
|
2040
2040
|
}
|
|
@@ -2042,7 +2042,7 @@ function he(e, n) {
|
|
|
2042
2042
|
function Cn(e, n) {
|
|
2043
2043
|
return new nr({
|
|
2044
2044
|
check: "length_equals",
|
|
2045
|
-
...
|
|
2045
|
+
...m(n),
|
|
2046
2046
|
length: e
|
|
2047
2047
|
});
|
|
2048
2048
|
}
|
|
@@ -2051,7 +2051,7 @@ function qs(e, n) {
|
|
|
2051
2051
|
return new tr({
|
|
2052
2052
|
check: "string_format",
|
|
2053
2053
|
format: "regex",
|
|
2054
|
-
...
|
|
2054
|
+
...m(n),
|
|
2055
2055
|
pattern: e
|
|
2056
2056
|
});
|
|
2057
2057
|
}
|
|
@@ -2060,7 +2060,7 @@ function Ms(e) {
|
|
|
2060
2060
|
return new rr({
|
|
2061
2061
|
check: "string_format",
|
|
2062
2062
|
format: "lowercase",
|
|
2063
|
-
...
|
|
2063
|
+
...m(e)
|
|
2064
2064
|
});
|
|
2065
2065
|
}
|
|
2066
2066
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2068,7 +2068,7 @@ function Us(e) {
|
|
|
2068
2068
|
return new sr({
|
|
2069
2069
|
check: "string_format",
|
|
2070
2070
|
format: "uppercase",
|
|
2071
|
-
...
|
|
2071
|
+
...m(e)
|
|
2072
2072
|
});
|
|
2073
2073
|
}
|
|
2074
2074
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2076,7 +2076,7 @@ function xs(e, n) {
|
|
|
2076
2076
|
return new or({
|
|
2077
2077
|
check: "string_format",
|
|
2078
2078
|
format: "includes",
|
|
2079
|
-
...
|
|
2079
|
+
...m(n),
|
|
2080
2080
|
includes: e
|
|
2081
2081
|
});
|
|
2082
2082
|
}
|
|
@@ -2085,7 +2085,7 @@ function Fs(e, n) {
|
|
|
2085
2085
|
return new ir({
|
|
2086
2086
|
check: "string_format",
|
|
2087
2087
|
format: "starts_with",
|
|
2088
|
-
...
|
|
2088
|
+
...m(n),
|
|
2089
2089
|
prefix: e
|
|
2090
2090
|
});
|
|
2091
2091
|
}
|
|
@@ -2094,7 +2094,7 @@ function js(e, n) {
|
|
|
2094
2094
|
return new ar({
|
|
2095
2095
|
check: "string_format",
|
|
2096
2096
|
format: "ends_with",
|
|
2097
|
-
...
|
|
2097
|
+
...m(n),
|
|
2098
2098
|
suffix: e
|
|
2099
2099
|
});
|
|
2100
2100
|
}
|
|
@@ -2133,7 +2133,7 @@ function Ws(e, n, t) {
|
|
|
2133
2133
|
// get element() {
|
|
2134
2134
|
// return element;
|
|
2135
2135
|
// },
|
|
2136
|
-
...
|
|
2136
|
+
...m(t)
|
|
2137
2137
|
});
|
|
2138
2138
|
}
|
|
2139
2139
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2142,7 +2142,7 @@ function Ks(e, n, t) {
|
|
|
2142
2142
|
type: "custom",
|
|
2143
2143
|
check: "custom",
|
|
2144
2144
|
fn: n,
|
|
2145
|
-
...
|
|
2145
|
+
...m(t)
|
|
2146
2146
|
});
|
|
2147
2147
|
}
|
|
2148
2148
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2161,7 +2161,7 @@ function Xs(e) {
|
|
|
2161
2161
|
function Hs(e, n) {
|
|
2162
2162
|
const t = new T({
|
|
2163
2163
|
check: "custom",
|
|
2164
|
-
...
|
|
2164
|
+
...m(n)
|
|
2165
2165
|
});
|
|
2166
2166
|
return t._zod.check = e, t;
|
|
2167
2167
|
}
|
|
@@ -2201,10 +2201,10 @@ function z(e, n, t = { path: [], schemaPath: [] }) {
|
|
|
2201
2201
|
if (e._zod.processJSONSchema)
|
|
2202
2202
|
e._zod.processJSONSchema(n, o.schema, l);
|
|
2203
2203
|
else {
|
|
2204
|
-
const
|
|
2205
|
-
if (!
|
|
2204
|
+
const p = o.schema, w = n.processors[s.type];
|
|
2205
|
+
if (!w)
|
|
2206
2206
|
throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);
|
|
2207
|
-
|
|
2207
|
+
w(e, n, p, l);
|
|
2208
2208
|
}
|
|
2209
2209
|
const h = e._zod.parent;
|
|
2210
2210
|
h && (o.ref || (o.ref = h), z(h, n, l), n.seen.get(h).isParent = !0);
|
|
@@ -2229,11 +2229,11 @@ function Dn(e, n) {
|
|
|
2229
2229
|
const s = (o) => {
|
|
2230
2230
|
const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
2231
2231
|
if (e.external) {
|
|
2232
|
-
const h = e.external.registry.get(o[0])?.id,
|
|
2232
|
+
const h = e.external.registry.get(o[0])?.id, p = e.external.uri ?? ((E) => E);
|
|
2233
2233
|
if (h)
|
|
2234
|
-
return { ref:
|
|
2235
|
-
const
|
|
2236
|
-
return o[1].defId =
|
|
2234
|
+
return { ref: p(h) };
|
|
2235
|
+
const w = o[1].defId ?? o[1].schema.id ?? `schema${e.counter++}`;
|
|
2236
|
+
return o[1].defId = w, { defId: w, ref: `${p("__shared")}#/${a}/${w}` };
|
|
2237
2237
|
}
|
|
2238
2238
|
if (o[1] === t)
|
|
2239
2239
|
return { ref: "#" };
|
|
@@ -2295,21 +2295,21 @@ function qn(e, n) {
|
|
|
2295
2295
|
const c = a.def ?? a.schema, u = { ...c }, l = a.ref;
|
|
2296
2296
|
if (a.ref = null, l) {
|
|
2297
2297
|
r(l);
|
|
2298
|
-
const
|
|
2299
|
-
if (
|
|
2300
|
-
for (const
|
|
2301
|
-
|
|
2302
|
-
if (
|
|
2303
|
-
for (const
|
|
2304
|
-
|
|
2298
|
+
const p = e.seen.get(l), w = p.schema;
|
|
2299
|
+
if (w.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(w)) : Object.assign(c, w), Object.assign(c, u), o._zod.parent === l)
|
|
2300
|
+
for (const v in c)
|
|
2301
|
+
v === "$ref" || v === "allOf" || v in u || delete c[v];
|
|
2302
|
+
if (w.$ref && p.def)
|
|
2303
|
+
for (const v in c)
|
|
2304
|
+
v === "$ref" || v === "allOf" || v in p.def && JSON.stringify(c[v]) === JSON.stringify(p.def[v]) && delete c[v];
|
|
2305
2305
|
}
|
|
2306
2306
|
const h = o._zod.parent;
|
|
2307
2307
|
if (h && h !== l) {
|
|
2308
2308
|
r(h);
|
|
2309
|
-
const
|
|
2310
|
-
if (
|
|
2311
|
-
for (const
|
|
2312
|
-
|
|
2309
|
+
const p = e.seen.get(h);
|
|
2310
|
+
if (p?.schema.$ref && (c.$ref = p.schema.$ref, p.def))
|
|
2311
|
+
for (const w in c)
|
|
2312
|
+
w === "$ref" || w === "allOf" || w in p.def && JSON.stringify(c[w]) === JSON.stringify(p.def[w]) && delete c[w];
|
|
2313
2313
|
}
|
|
2314
2314
|
e.override({
|
|
2315
2315
|
zodSchema: o,
|
|
@@ -2561,25 +2561,25 @@ const Ys = (e, n = {}) => (t) => {
|
|
|
2561
2561
|
const i = n.seen.get(e);
|
|
2562
2562
|
i.ref = s.innerType;
|
|
2563
2563
|
}, ko = /* @__PURE__ */ d("ZodISODateTime", (e, n) => {
|
|
2564
|
-
kr.init(e, n),
|
|
2564
|
+
kr.init(e, n), I.init(e, n);
|
|
2565
2565
|
});
|
|
2566
2566
|
function Io(e) {
|
|
2567
2567
|
return /* @__PURE__ */ Os(ko, e);
|
|
2568
2568
|
}
|
|
2569
2569
|
const So = /* @__PURE__ */ d("ZodISODate", (e, n) => {
|
|
2570
|
-
Ir.init(e, n),
|
|
2570
|
+
Ir.init(e, n), I.init(e, n);
|
|
2571
2571
|
});
|
|
2572
2572
|
function Eo(e) {
|
|
2573
2573
|
return /* @__PURE__ */ Rs(So, e);
|
|
2574
2574
|
}
|
|
2575
2575
|
const zo = /* @__PURE__ */ d("ZodISOTime", (e, n) => {
|
|
2576
|
-
Sr.init(e, n),
|
|
2576
|
+
Sr.init(e, n), I.init(e, n);
|
|
2577
2577
|
});
|
|
2578
2578
|
function Po(e) {
|
|
2579
2579
|
return /* @__PURE__ */ As(zo, e);
|
|
2580
2580
|
}
|
|
2581
2581
|
const Oo = /* @__PURE__ */ d("ZodISODuration", (e, n) => {
|
|
2582
|
-
Er.init(e, n),
|
|
2582
|
+
Er.init(e, n), I.init(e, n);
|
|
2583
2583
|
});
|
|
2584
2584
|
function Ro(e) {
|
|
2585
2585
|
return /* @__PURE__ */ Ts(Oo, e);
|
|
@@ -2615,7 +2615,7 @@ const Ao = (e, n) => {
|
|
|
2615
2615
|
});
|
|
2616
2616
|
}, N = d("ZodError", Ao, {
|
|
2617
2617
|
Parent: Error
|
|
2618
|
-
}), To = /* @__PURE__ */ Te(N), No = /* @__PURE__ */ Ne(N), $o = /* @__PURE__ */ we(N), Co = /* @__PURE__ */ ve(N), Zo = /* @__PURE__ */ gt(N), Do = /* @__PURE__ */ bt(N), qo = /* @__PURE__ */ _t(N), Mo = /* @__PURE__ */ yt(N), Uo = /* @__PURE__ */ kt(N), xo = /* @__PURE__ */ It(N), Fo = /* @__PURE__ */ St(N), jo = /* @__PURE__ */ Et(N),
|
|
2618
|
+
}), To = /* @__PURE__ */ Te(N), No = /* @__PURE__ */ Ne(N), $o = /* @__PURE__ */ we(N), Co = /* @__PURE__ */ ve(N), Zo = /* @__PURE__ */ gt(N), Do = /* @__PURE__ */ bt(N), qo = /* @__PURE__ */ _t(N), Mo = /* @__PURE__ */ yt(N), Uo = /* @__PURE__ */ kt(N), xo = /* @__PURE__ */ It(N), Fo = /* @__PURE__ */ St(N), jo = /* @__PURE__ */ Et(N), k = /* @__PURE__ */ d("ZodType", (e, n) => (y.init(e, n), Object.assign(e["~standard"], {
|
|
2619
2619
|
jsonSchema: {
|
|
2620
2620
|
input: fe(e, "input"),
|
|
2621
2621
|
output: fe(e, "output")
|
|
@@ -2641,57 +2641,57 @@ const Ao = (e, n) => {
|
|
|
2641
2641
|
const r = e.clone();
|
|
2642
2642
|
return ee.add(r, t[0]), r;
|
|
2643
2643
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), Un = /* @__PURE__ */ d("_ZodString", (e, n) => {
|
|
2644
|
-
$e.init(e, n),
|
|
2644
|
+
$e.init(e, n), k.init(e, n), e._zod.processJSONSchema = (r, s, i) => eo(e, r, s);
|
|
2645
2645
|
const t = e._zod.bag;
|
|
2646
2646
|
e.format = t.format ?? null, e.minLength = t.minimum ?? null, e.maxLength = t.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ qs(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ xs(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Fs(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ js(...r)), e.min = (...r) => e.check(/* @__PURE__ */ he(...r)), e.max = (...r) => e.check(/* @__PURE__ */ $n(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Cn(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ he(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Ms(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Us(r)), e.trim = () => e.check(/* @__PURE__ */ Ls()), e.normalize = (...r) => e.check(/* @__PURE__ */ Vs(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Bs()), e.toUpperCase = () => e.check(/* @__PURE__ */ Gs()), e.slugify = () => e.check(/* @__PURE__ */ Js());
|
|
2647
2647
|
}), Vo = /* @__PURE__ */ d("ZodString", (e, n) => {
|
|
2648
2648
|
$e.init(e, n), Un.init(e, n), e.email = (t) => e.check(/* @__PURE__ */ as(Lo, t)), e.url = (t) => e.check(/* @__PURE__ */ hs(Bo, t)), e.jwt = (t) => e.check(/* @__PURE__ */ Ps(ii, t)), e.emoji = (t) => e.check(/* @__PURE__ */ fs(Go, t)), e.guid = (t) => e.check(/* @__PURE__ */ We(Ye, t)), e.uuid = (t) => e.check(/* @__PURE__ */ cs(de, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ us(de, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ ds(de, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ ls(de, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ ps(Jo, t)), e.guid = (t) => e.check(/* @__PURE__ */ We(Ye, t)), e.cuid = (t) => e.check(/* @__PURE__ */ ms(Wo, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ ws(Ko, t)), e.ulid = (t) => e.check(/* @__PURE__ */ vs(Xo, t)), e.base64 = (t) => e.check(/* @__PURE__ */ Ss(ri, t)), e.base64url = (t) => e.check(/* @__PURE__ */ Es(si, t)), e.xid = (t) => e.check(/* @__PURE__ */ gs(Ho, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ bs(Yo, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ _s(Qo, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ ys(ei, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ ks(ni, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ Is(ti, t)), e.e164 = (t) => e.check(/* @__PURE__ */ zs(oi, t)), e.datetime = (t) => e.check(Io(t)), e.date = (t) => e.check(Eo(t)), e.time = (t) => e.check(Po(t)), e.duration = (t) => e.check(Ro(t));
|
|
2649
2649
|
});
|
|
2650
|
-
function
|
|
2650
|
+
function _(e) {
|
|
2651
2651
|
return /* @__PURE__ */ is(Vo, e);
|
|
2652
2652
|
}
|
|
2653
|
-
const
|
|
2654
|
-
|
|
2653
|
+
const I = /* @__PURE__ */ d("ZodStringFormat", (e, n) => {
|
|
2654
|
+
b.init(e, n), Un.init(e, n);
|
|
2655
2655
|
}), Lo = /* @__PURE__ */ d("ZodEmail", (e, n) => {
|
|
2656
|
-
fr.init(e, n),
|
|
2656
|
+
fr.init(e, n), I.init(e, n);
|
|
2657
2657
|
}), Ye = /* @__PURE__ */ d("ZodGUID", (e, n) => {
|
|
2658
|
-
lr.init(e, n),
|
|
2658
|
+
lr.init(e, n), I.init(e, n);
|
|
2659
2659
|
}), de = /* @__PURE__ */ d("ZodUUID", (e, n) => {
|
|
2660
|
-
hr.init(e, n),
|
|
2660
|
+
hr.init(e, n), I.init(e, n);
|
|
2661
2661
|
}), Bo = /* @__PURE__ */ d("ZodURL", (e, n) => {
|
|
2662
|
-
pr.init(e, n),
|
|
2662
|
+
pr.init(e, n), I.init(e, n);
|
|
2663
2663
|
}), Go = /* @__PURE__ */ d("ZodEmoji", (e, n) => {
|
|
2664
|
-
mr.init(e, n),
|
|
2664
|
+
mr.init(e, n), I.init(e, n);
|
|
2665
2665
|
}), Jo = /* @__PURE__ */ d("ZodNanoID", (e, n) => {
|
|
2666
|
-
wr.init(e, n),
|
|
2666
|
+
wr.init(e, n), I.init(e, n);
|
|
2667
2667
|
}), Wo = /* @__PURE__ */ d("ZodCUID", (e, n) => {
|
|
2668
|
-
vr.init(e, n),
|
|
2668
|
+
vr.init(e, n), I.init(e, n);
|
|
2669
2669
|
}), Ko = /* @__PURE__ */ d("ZodCUID2", (e, n) => {
|
|
2670
|
-
gr.init(e, n),
|
|
2670
|
+
gr.init(e, n), I.init(e, n);
|
|
2671
2671
|
}), Xo = /* @__PURE__ */ d("ZodULID", (e, n) => {
|
|
2672
|
-
br.init(e, n),
|
|
2672
|
+
br.init(e, n), I.init(e, n);
|
|
2673
2673
|
}), Ho = /* @__PURE__ */ d("ZodXID", (e, n) => {
|
|
2674
|
-
_r.init(e, n),
|
|
2674
|
+
_r.init(e, n), I.init(e, n);
|
|
2675
2675
|
}), Yo = /* @__PURE__ */ d("ZodKSUID", (e, n) => {
|
|
2676
|
-
yr.init(e, n),
|
|
2676
|
+
yr.init(e, n), I.init(e, n);
|
|
2677
2677
|
}), Qo = /* @__PURE__ */ d("ZodIPv4", (e, n) => {
|
|
2678
|
-
zr.init(e, n),
|
|
2678
|
+
zr.init(e, n), I.init(e, n);
|
|
2679
2679
|
}), ei = /* @__PURE__ */ d("ZodIPv6", (e, n) => {
|
|
2680
|
-
Pr.init(e, n),
|
|
2680
|
+
Pr.init(e, n), I.init(e, n);
|
|
2681
2681
|
}), ni = /* @__PURE__ */ d("ZodCIDRv4", (e, n) => {
|
|
2682
|
-
Or.init(e, n),
|
|
2682
|
+
Or.init(e, n), I.init(e, n);
|
|
2683
2683
|
}), ti = /* @__PURE__ */ d("ZodCIDRv6", (e, n) => {
|
|
2684
|
-
Rr.init(e, n),
|
|
2684
|
+
Rr.init(e, n), I.init(e, n);
|
|
2685
2685
|
}), ri = /* @__PURE__ */ d("ZodBase64", (e, n) => {
|
|
2686
|
-
Ar.init(e, n),
|
|
2686
|
+
Ar.init(e, n), I.init(e, n);
|
|
2687
2687
|
}), si = /* @__PURE__ */ d("ZodBase64URL", (e, n) => {
|
|
2688
|
-
Nr.init(e, n),
|
|
2688
|
+
Nr.init(e, n), I.init(e, n);
|
|
2689
2689
|
}), oi = /* @__PURE__ */ d("ZodE164", (e, n) => {
|
|
2690
|
-
$r.init(e, n),
|
|
2690
|
+
$r.init(e, n), I.init(e, n);
|
|
2691
2691
|
}), ii = /* @__PURE__ */ d("ZodJWT", (e, n) => {
|
|
2692
|
-
Zr.init(e, n),
|
|
2692
|
+
Zr.init(e, n), I.init(e, n);
|
|
2693
2693
|
}), xn = /* @__PURE__ */ d("ZodNumber", (e, n) => {
|
|
2694
|
-
On.init(e, n),
|
|
2694
|
+
On.init(e, n), k.init(e, n), e._zod.processJSONSchema = (r, s, i) => no(e, r, s), e.gt = (r, s) => e.check(/* @__PURE__ */ Xe(r, s)), e.gte = (r, s) => e.check(/* @__PURE__ */ ye(r, s)), e.min = (r, s) => e.check(/* @__PURE__ */ ye(r, s)), e.lt = (r, s) => e.check(/* @__PURE__ */ Ke(r, s)), e.lte = (r, s) => e.check(/* @__PURE__ */ _e(r, s)), e.max = (r, s) => e.check(/* @__PURE__ */ _e(r, s)), e.int = (r) => e.check(Qe(r)), e.safe = (r) => e.check(Qe(r)), e.positive = (r) => e.check(/* @__PURE__ */ Xe(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ ye(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ Ke(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ _e(0, r)), e.multipleOf = (r, s) => e.check(/* @__PURE__ */ He(r, s)), e.step = (r, s) => e.check(/* @__PURE__ */ He(r, s)), e.finite = () => e;
|
|
2695
2695
|
const t = e._zod.bag;
|
|
2696
2696
|
e.minValue = Math.max(t.minimum ?? Number.NEGATIVE_INFINITY, t.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(t.maximum ?? Number.POSITIVE_INFINITY, t.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (t.format ?? "").includes("int") || Number.isSafeInteger(t.multipleOf ?? 0.5), e.isFinite = !0, e.format = t.format ?? null;
|
|
2697
2697
|
});
|
|
@@ -2705,48 +2705,48 @@ function Qe(e) {
|
|
|
2705
2705
|
return /* @__PURE__ */ $s(ai, e);
|
|
2706
2706
|
}
|
|
2707
2707
|
const ci = /* @__PURE__ */ d("ZodBoolean", (e, n) => {
|
|
2708
|
-
qr.init(e, n),
|
|
2708
|
+
qr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => to(e, t, r);
|
|
2709
2709
|
});
|
|
2710
2710
|
function V(e) {
|
|
2711
2711
|
return /* @__PURE__ */ Cs(ci, e);
|
|
2712
2712
|
}
|
|
2713
2713
|
const ui = /* @__PURE__ */ d("ZodUnknown", (e, n) => {
|
|
2714
|
-
Mr.init(e, n),
|
|
2714
|
+
Mr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => so();
|
|
2715
2715
|
});
|
|
2716
2716
|
function en() {
|
|
2717
2717
|
return /* @__PURE__ */ Zs(ui);
|
|
2718
2718
|
}
|
|
2719
2719
|
const di = /* @__PURE__ */ d("ZodNever", (e, n) => {
|
|
2720
|
-
Ur.init(e, n),
|
|
2720
|
+
Ur.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => ro(e, t, r);
|
|
2721
2721
|
});
|
|
2722
2722
|
function li(e) {
|
|
2723
2723
|
return /* @__PURE__ */ Ds(di, e);
|
|
2724
2724
|
}
|
|
2725
2725
|
const hi = /* @__PURE__ */ d("ZodArray", (e, n) => {
|
|
2726
|
-
xr.init(e, n),
|
|
2726
|
+
xr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => uo(e, t, r, s), e.element = n.element, e.min = (t, r) => e.check(/* @__PURE__ */ he(t, r)), e.nonempty = (t) => e.check(/* @__PURE__ */ he(1, t)), e.max = (t, r) => e.check(/* @__PURE__ */ $n(t, r)), e.length = (t, r) => e.check(/* @__PURE__ */ Cn(t, r)), e.unwrap = () => e.element;
|
|
2727
2727
|
});
|
|
2728
2728
|
function q(e, n) {
|
|
2729
2729
|
return /* @__PURE__ */ Ws(hi, e, n);
|
|
2730
2730
|
}
|
|
2731
2731
|
const fi = /* @__PURE__ */ d("ZodObject", (e, n) => {
|
|
2732
|
-
jr.init(e, n),
|
|
2732
|
+
jr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => lo(e, t, r, s), g(e, "shape", () => n.shape), e.keyof = () => _i(Object.keys(e._zod.def.shape)), e.catchall = (t) => e.clone({ ...e._zod.def, catchall: t }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: en() }), e.loose = () => e.clone({ ...e._zod.def, catchall: en() }), e.strict = () => e.clone({ ...e._zod.def, catchall: li() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (t) => ut(e, t), e.safeExtend = (t) => dt(e, t), e.merge = (t) => lt(e, t), e.pick = (t) => at(e, t), e.omit = (t) => ct(e, t), e.partial = (...t) => ht(jn, e, t[0]), e.required = (...t) => ft(Vn, e, t[0]);
|
|
2733
2733
|
});
|
|
2734
2734
|
function S(e, n) {
|
|
2735
2735
|
const t = {
|
|
2736
2736
|
type: "object",
|
|
2737
2737
|
shape: e ?? {},
|
|
2738
|
-
...
|
|
2738
|
+
...m(n)
|
|
2739
2739
|
};
|
|
2740
2740
|
return new fi(t);
|
|
2741
2741
|
}
|
|
2742
2742
|
const Fn = /* @__PURE__ */ d("ZodUnion", (e, n) => {
|
|
2743
|
-
Tn.init(e, n),
|
|
2743
|
+
Tn.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => ho(e, t, r, s), e.options = n.options;
|
|
2744
2744
|
});
|
|
2745
2745
|
function pi(e, n) {
|
|
2746
2746
|
return new Fn({
|
|
2747
2747
|
type: "union",
|
|
2748
2748
|
options: e,
|
|
2749
|
-
...
|
|
2749
|
+
...m(n)
|
|
2750
2750
|
});
|
|
2751
2751
|
}
|
|
2752
2752
|
const mi = /* @__PURE__ */ d("ZodDiscriminatedUnion", (e, n) => {
|
|
@@ -2757,11 +2757,11 @@ function wi(e, n, t) {
|
|
|
2757
2757
|
type: "union",
|
|
2758
2758
|
options: n,
|
|
2759
2759
|
discriminator: e,
|
|
2760
|
-
...
|
|
2760
|
+
...m(t)
|
|
2761
2761
|
});
|
|
2762
2762
|
}
|
|
2763
2763
|
const vi = /* @__PURE__ */ d("ZodIntersection", (e, n) => {
|
|
2764
|
-
Lr.init(e, n),
|
|
2764
|
+
Lr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => fo(e, t, r, s);
|
|
2765
2765
|
});
|
|
2766
2766
|
function gi(e, n) {
|
|
2767
2767
|
return new vi({
|
|
@@ -2771,18 +2771,18 @@ function gi(e, n) {
|
|
|
2771
2771
|
});
|
|
2772
2772
|
}
|
|
2773
2773
|
const bi = /* @__PURE__ */ d("ZodRecord", (e, n) => {
|
|
2774
|
-
Br.init(e, n),
|
|
2774
|
+
Br.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => po(e, t, r, s), e.keyType = n.keyType, e.valueType = n.valueType;
|
|
2775
2775
|
});
|
|
2776
2776
|
function Ce(e, n, t) {
|
|
2777
2777
|
return new bi({
|
|
2778
2778
|
type: "record",
|
|
2779
2779
|
keyType: e,
|
|
2780
2780
|
valueType: n,
|
|
2781
|
-
...
|
|
2781
|
+
...m(t)
|
|
2782
2782
|
});
|
|
2783
2783
|
}
|
|
2784
2784
|
const ze = /* @__PURE__ */ d("ZodEnum", (e, n) => {
|
|
2785
|
-
Gr.init(e, n),
|
|
2785
|
+
Gr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (r, s, i) => oo(e, r, s), e.enum = n.entries, e.options = Object.values(n.entries);
|
|
2786
2786
|
const t = new Set(Object.keys(n.entries));
|
|
2787
2787
|
e.extract = (r, s) => {
|
|
2788
2788
|
const i = {};
|
|
@@ -2794,7 +2794,7 @@ const ze = /* @__PURE__ */ d("ZodEnum", (e, n) => {
|
|
|
2794
2794
|
return new ze({
|
|
2795
2795
|
...n,
|
|
2796
2796
|
checks: [],
|
|
2797
|
-
...
|
|
2797
|
+
...m(s),
|
|
2798
2798
|
entries: i
|
|
2799
2799
|
});
|
|
2800
2800
|
}, e.exclude = (r, s) => {
|
|
@@ -2807,7 +2807,7 @@ const ze = /* @__PURE__ */ d("ZodEnum", (e, n) => {
|
|
|
2807
2807
|
return new ze({
|
|
2808
2808
|
...n,
|
|
2809
2809
|
checks: [],
|
|
2810
|
-
...
|
|
2810
|
+
...m(s),
|
|
2811
2811
|
entries: i
|
|
2812
2812
|
});
|
|
2813
2813
|
};
|
|
@@ -2817,11 +2817,11 @@ function _i(e, n) {
|
|
|
2817
2817
|
return new ze({
|
|
2818
2818
|
type: "enum",
|
|
2819
2819
|
entries: t,
|
|
2820
|
-
...
|
|
2820
|
+
...m(n)
|
|
2821
2821
|
});
|
|
2822
2822
|
}
|
|
2823
2823
|
const yi = /* @__PURE__ */ d("ZodLiteral", (e, n) => {
|
|
2824
|
-
Jr.init(e, n),
|
|
2824
|
+
Jr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => io(e, t, r), e.values = new Set(n.values), Object.defineProperty(e, "value", {
|
|
2825
2825
|
get() {
|
|
2826
2826
|
if (n.values.length > 1)
|
|
2827
2827
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -2833,11 +2833,11 @@ function nn(e, n) {
|
|
|
2833
2833
|
return new yi({
|
|
2834
2834
|
type: "literal",
|
|
2835
2835
|
values: Array.isArray(e) ? e : [e],
|
|
2836
|
-
...
|
|
2836
|
+
...m(n)
|
|
2837
2837
|
});
|
|
2838
2838
|
}
|
|
2839
2839
|
const ki = /* @__PURE__ */ d("ZodTransform", (e, n) => {
|
|
2840
|
-
Wr.init(e, n),
|
|
2840
|
+
Wr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => co(e, t), e._zod.parse = (t, r) => {
|
|
2841
2841
|
if (r.direction === "backward")
|
|
2842
2842
|
throw new hn(e.constructor.name);
|
|
2843
2843
|
t.addIssue = (i) => {
|
|
@@ -2859,7 +2859,7 @@ function Ii(e) {
|
|
|
2859
2859
|
});
|
|
2860
2860
|
}
|
|
2861
2861
|
const jn = /* @__PURE__ */ d("ZodOptional", (e, n) => {
|
|
2862
|
-
Nn.init(e, n),
|
|
2862
|
+
Nn.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => Mn(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
|
|
2863
2863
|
});
|
|
2864
2864
|
function tn(e) {
|
|
2865
2865
|
return new jn({
|
|
@@ -2868,7 +2868,7 @@ function tn(e) {
|
|
|
2868
2868
|
});
|
|
2869
2869
|
}
|
|
2870
2870
|
const Si = /* @__PURE__ */ d("ZodExactOptional", (e, n) => {
|
|
2871
|
-
Kr.init(e, n),
|
|
2871
|
+
Kr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => Mn(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
|
|
2872
2872
|
});
|
|
2873
2873
|
function Ei(e) {
|
|
2874
2874
|
return new Si({
|
|
@@ -2877,7 +2877,7 @@ function Ei(e) {
|
|
|
2877
2877
|
});
|
|
2878
2878
|
}
|
|
2879
2879
|
const zi = /* @__PURE__ */ d("ZodNullable", (e, n) => {
|
|
2880
|
-
Xr.init(e, n),
|
|
2880
|
+
Xr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => mo(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
|
|
2881
2881
|
});
|
|
2882
2882
|
function rn(e) {
|
|
2883
2883
|
return new zi({
|
|
@@ -2886,7 +2886,7 @@ function rn(e) {
|
|
|
2886
2886
|
});
|
|
2887
2887
|
}
|
|
2888
2888
|
const Pi = /* @__PURE__ */ d("ZodDefault", (e, n) => {
|
|
2889
|
-
Hr.init(e, n),
|
|
2889
|
+
Hr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => vo(e, t, r, s), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
2890
2890
|
});
|
|
2891
2891
|
function Oi(e, n) {
|
|
2892
2892
|
return new Pi({
|
|
@@ -2898,7 +2898,7 @@ function Oi(e, n) {
|
|
|
2898
2898
|
});
|
|
2899
2899
|
}
|
|
2900
2900
|
const Ri = /* @__PURE__ */ d("ZodPrefault", (e, n) => {
|
|
2901
|
-
Yr.init(e, n),
|
|
2901
|
+
Yr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => go(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
|
|
2902
2902
|
});
|
|
2903
2903
|
function Ai(e, n) {
|
|
2904
2904
|
return new Ri({
|
|
@@ -2910,17 +2910,17 @@ function Ai(e, n) {
|
|
|
2910
2910
|
});
|
|
2911
2911
|
}
|
|
2912
2912
|
const Vn = /* @__PURE__ */ d("ZodNonOptional", (e, n) => {
|
|
2913
|
-
Qr.init(e, n),
|
|
2913
|
+
Qr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => wo(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
|
|
2914
2914
|
});
|
|
2915
2915
|
function Ti(e, n) {
|
|
2916
2916
|
return new Vn({
|
|
2917
2917
|
type: "nonoptional",
|
|
2918
2918
|
innerType: e,
|
|
2919
|
-
...
|
|
2919
|
+
...m(n)
|
|
2920
2920
|
});
|
|
2921
2921
|
}
|
|
2922
2922
|
const Ni = /* @__PURE__ */ d("ZodCatch", (e, n) => {
|
|
2923
|
-
es.init(e, n),
|
|
2923
|
+
es.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => bo(e, t, r, s), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
2924
2924
|
});
|
|
2925
2925
|
function $i(e, n) {
|
|
2926
2926
|
return new Ni({
|
|
@@ -2930,7 +2930,7 @@ function $i(e, n) {
|
|
|
2930
2930
|
});
|
|
2931
2931
|
}
|
|
2932
2932
|
const Ci = /* @__PURE__ */ d("ZodPipe", (e, n) => {
|
|
2933
|
-
ns.init(e, n),
|
|
2933
|
+
ns.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => _o(e, t, r, s), e.in = n.in, e.out = n.out;
|
|
2934
2934
|
});
|
|
2935
2935
|
function sn(e, n) {
|
|
2936
2936
|
return new Ci({
|
|
@@ -2941,7 +2941,7 @@ function sn(e, n) {
|
|
|
2941
2941
|
});
|
|
2942
2942
|
}
|
|
2943
2943
|
const Zi = /* @__PURE__ */ d("ZodReadonly", (e, n) => {
|
|
2944
|
-
ts.init(e, n),
|
|
2944
|
+
ts.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => yo(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
|
|
2945
2945
|
});
|
|
2946
2946
|
function Di(e) {
|
|
2947
2947
|
return new Zi({
|
|
@@ -2950,7 +2950,7 @@ function Di(e) {
|
|
|
2950
2950
|
});
|
|
2951
2951
|
}
|
|
2952
2952
|
const qi = /* @__PURE__ */ d("ZodCustom", (e, n) => {
|
|
2953
|
-
rs.init(e, n),
|
|
2953
|
+
rs.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => ao(e, t);
|
|
2954
2954
|
});
|
|
2955
2955
|
function Mi(e, n = {}) {
|
|
2956
2956
|
return /* @__PURE__ */ Ks(qi, e, n);
|
|
@@ -2975,16 +2975,16 @@ const Ln = wi("kind", [
|
|
|
2975
2975
|
trackId: R
|
|
2976
2976
|
})
|
|
2977
2977
|
]).default({ kind: "legacy" }), xi = S({
|
|
2978
|
-
name:
|
|
2978
|
+
name: _()
|
|
2979
2979
|
}), on = S({
|
|
2980
2980
|
// See: https://w3c.github.io/webcodecs/codec_registry.html
|
|
2981
|
-
codec:
|
|
2981
|
+
codec: _(),
|
|
2982
2982
|
// The container format, used to decode the timestamp and more.
|
|
2983
2983
|
container: Ln,
|
|
2984
2984
|
// The description is used for some codecs.
|
|
2985
2985
|
// If provided, we can initialize the decoder based on the catalog alone.
|
|
2986
2986
|
// Otherwise, the initialization information is in-band.
|
|
2987
|
-
description:
|
|
2987
|
+
description: _().optional(),
|
|
2988
2988
|
// hex encoded TODO use base64
|
|
2989
2989
|
// The sample rate of the audio in Hz
|
|
2990
2990
|
sampleRate: R,
|
|
@@ -3003,7 +3003,7 @@ const Ln = wi("kind", [
|
|
|
3003
3003
|
}), Fi = S({
|
|
3004
3004
|
// A map of track name to rendition configuration.
|
|
3005
3005
|
// This is not an array so it will work with JSON Merge Patch.
|
|
3006
|
-
renditions: Ce(
|
|
3006
|
+
renditions: Ce(_(), on)
|
|
3007
3007
|
}).or(
|
|
3008
3008
|
// Backwards compatibility: transform old {track, config} format to new object format
|
|
3009
3009
|
S({
|
|
@@ -3013,18 +3013,18 @@ const Ln = wi("kind", [
|
|
|
3013
3013
|
renditions: { [e.track.name]: e.config }
|
|
3014
3014
|
}))
|
|
3015
3015
|
), ji = S({
|
|
3016
|
-
hardware: q(
|
|
3017
|
-
software: q(
|
|
3018
|
-
unsupported: q(
|
|
3016
|
+
hardware: q(_()).optional(),
|
|
3017
|
+
software: q(_()).optional(),
|
|
3018
|
+
unsupported: q(_()).optional()
|
|
3019
3019
|
}), Vi = S({
|
|
3020
|
-
hardware: q(
|
|
3021
|
-
software: q(
|
|
3022
|
-
unsupported: q(
|
|
3020
|
+
hardware: q(_()).optional(),
|
|
3021
|
+
software: q(_()).optional(),
|
|
3022
|
+
unsupported: q(_()).optional()
|
|
3023
3023
|
}), Li = S({
|
|
3024
3024
|
video: ji.optional(),
|
|
3025
3025
|
audio: Vi.optional()
|
|
3026
3026
|
}), re = S({
|
|
3027
|
-
name:
|
|
3027
|
+
name: _()
|
|
3028
3028
|
}), Bi = S({
|
|
3029
3029
|
message: re.optional(),
|
|
3030
3030
|
typing: re.optional()
|
|
@@ -3051,15 +3051,15 @@ const Ln = wi("kind", [
|
|
|
3051
3051
|
track: re.optional(),
|
|
3052
3052
|
// If set, then this broadcaster allows other peers to request position updates via this handle.
|
|
3053
3053
|
// We will have to discover and subscribe to their position updates.
|
|
3054
|
-
handle:
|
|
3054
|
+
handle: _().optional(),
|
|
3055
3055
|
// If provided, this broadcaster is signaling the location of other peers.
|
|
3056
3056
|
// The payload is a JSON blob keyed by handle for each peer.
|
|
3057
3057
|
peers: re.optional()
|
|
3058
|
-
}), Ji = Ce(
|
|
3058
|
+
}), Ji = Ce(_(), Ze);
|
|
3059
3059
|
S({
|
|
3060
|
-
name:
|
|
3060
|
+
name: _().optional(),
|
|
3061
3061
|
// name
|
|
3062
|
-
avatar:
|
|
3062
|
+
avatar: _().optional(),
|
|
3063
3063
|
// avatar
|
|
3064
3064
|
audio: V().optional(),
|
|
3065
3065
|
// audio enabled
|
|
@@ -3080,22 +3080,22 @@ const J = {
|
|
|
3080
3080
|
location: 20,
|
|
3081
3081
|
preview: 10
|
|
3082
3082
|
}, Wi = S({
|
|
3083
|
-
id:
|
|
3084
|
-
name:
|
|
3085
|
-
avatar:
|
|
3083
|
+
id: _().optional(),
|
|
3084
|
+
name: _().optional(),
|
|
3085
|
+
avatar: _().optional(),
|
|
3086
3086
|
// TODO allow using a track instead of a URL?
|
|
3087
|
-
color:
|
|
3087
|
+
color: _().optional()
|
|
3088
3088
|
}), Ki = S({
|
|
3089
|
-
name:
|
|
3089
|
+
name: _()
|
|
3090
3090
|
}), an = S({
|
|
3091
3091
|
// See: https://w3c.github.io/webcodecs/codec_registry.html
|
|
3092
|
-
codec:
|
|
3092
|
+
codec: _(),
|
|
3093
3093
|
// The container format, used to decode the timestamp and more.
|
|
3094
3094
|
container: Ln,
|
|
3095
3095
|
// The description is used for some codecs.
|
|
3096
3096
|
// If provided, we can initialize the decoder based on the catalog alone.
|
|
3097
3097
|
// Otherwise, the initialization information is (repeated) before each key-frame.
|
|
3098
|
-
description:
|
|
3098
|
+
description: _().optional(),
|
|
3099
3099
|
// hex encoded TODO use base64
|
|
3100
3100
|
// The width and height of the video in pixels.
|
|
3101
3101
|
// NOTE: formats that don't use a description can adjust these values in-band.
|
|
@@ -3126,7 +3126,7 @@ const J = {
|
|
|
3126
3126
|
}), Xi = S({
|
|
3127
3127
|
// A map of track name to rendition configuration.
|
|
3128
3128
|
// This is not an array in order for it to work with JSON Merge Patch.
|
|
3129
|
-
renditions: Ce(
|
|
3129
|
+
renditions: Ce(_(), an),
|
|
3130
3130
|
// Render the video at this size in pixels.
|
|
3131
3131
|
// This is separate from the display aspect ratio because it does not require reinitialization.
|
|
3132
3132
|
display: S({
|
|
@@ -5643,7 +5643,7 @@ let dn = class Bn {
|
|
|
5643
5643
|
enabled;
|
|
5644
5644
|
muted;
|
|
5645
5645
|
volume;
|
|
5646
|
-
|
|
5646
|
+
groupDuration;
|
|
5647
5647
|
source;
|
|
5648
5648
|
#e = new f(void 0);
|
|
5649
5649
|
catalog = this.#e;
|
|
@@ -5655,7 +5655,7 @@ let dn = class Bn {
|
|
|
5655
5655
|
active = new f(!1);
|
|
5656
5656
|
#s = new P();
|
|
5657
5657
|
constructor(n) {
|
|
5658
|
-
this.source = f.from(n?.source), this.enabled = f.from(n?.enabled ?? !1), this.muted = f.from(n?.muted ?? !1), this.volume = f.from(n?.volume ?? 1), this.
|
|
5658
|
+
this.source = f.from(n?.source), this.enabled = f.from(n?.enabled ?? !1), this.muted = f.from(n?.muted ?? !1), this.volume = f.from(n?.volume ?? 1), this.groupDuration = n?.groupDuration ?? 100, this.#s.run(this.#o.bind(this)), this.#s.run(this.#i.bind(this)), this.#s.run(this.#a.bind(this)), this.#s.run(this.#c.bind(this));
|
|
5659
5659
|
}
|
|
5660
5660
|
#o(n) {
|
|
5661
5661
|
const t = n.getAll([this.enabled, this.source]);
|
|
@@ -5716,23 +5716,23 @@ let dn = class Bn {
|
|
|
5716
5716
|
if (l.type !== "key")
|
|
5717
5717
|
throw new Error("only key frames are supported");
|
|
5718
5718
|
let h = !1;
|
|
5719
|
-
(!c || c + L.Micro.fromMilli(this.
|
|
5719
|
+
(!c || c + L.Micro.fromMilli(this.groupDuration) <= l.timestamp) && (c = l.timestamp, h = !0), a.encode(l, l.timestamp, h);
|
|
5720
5720
|
},
|
|
5721
5721
|
error: (l) => {
|
|
5722
5722
|
console.error("encoder error", l), a.close(l), i.port.onmessage = null;
|
|
5723
5723
|
}
|
|
5724
5724
|
});
|
|
5725
5725
|
t.cleanup(() => u.close()), console.debug("encoding audio", o), u.configure(o), i.port.onmessage = ({ data: l }) => {
|
|
5726
|
-
const h = l.channels.slice(0, i.channelCount),
|
|
5727
|
-
h.reduce((
|
|
5726
|
+
const h = l.channels.slice(0, i.channelCount), p = h.reduce((v, $) => v + $.length, 0), w = new Float32Array(p);
|
|
5727
|
+
h.reduce((v, $) => (w.set($, v), v + $.length), 0);
|
|
5728
5728
|
const E = new AudioData({
|
|
5729
5729
|
format: "f32-planar",
|
|
5730
5730
|
sampleRate: i.context.sampleRate,
|
|
5731
5731
|
numberOfFrames: h[0].length,
|
|
5732
5732
|
numberOfChannels: h.length,
|
|
5733
5733
|
timestamp: l.timestamp,
|
|
5734
|
-
data:
|
|
5735
|
-
transfer: [
|
|
5734
|
+
data: w,
|
|
5735
|
+
transfer: [w.buffer]
|
|
5736
5736
|
});
|
|
5737
5737
|
u.encode(E), E.close();
|
|
5738
5738
|
}, t.cleanup(() => {
|
|
@@ -6012,34 +6012,34 @@ class Pe {
|
|
|
6012
6012
|
n.spawn(async () => {
|
|
6013
6013
|
const h = await this.#a(n);
|
|
6014
6014
|
if (!h) return;
|
|
6015
|
-
const w = 30 + (a - 30) / 2;
|
|
6016
|
-
let
|
|
6017
|
-
if (
|
|
6018
|
-
|
|
6019
|
-
else if (
|
|
6020
|
-
|
|
6021
|
-
else if (
|
|
6022
|
-
|
|
6023
|
-
else if (
|
|
6024
|
-
|
|
6025
|
-
else if (
|
|
6026
|
-
|
|
6015
|
+
const { codec: p, hardwareAcceleration: w } = h, E = 30 + (a - 30) / 2;
|
|
6016
|
+
let v = Math.round(u * l * E);
|
|
6017
|
+
if (p.startsWith("avc1"))
|
|
6018
|
+
v *= 1;
|
|
6019
|
+
else if (p.startsWith("hev1"))
|
|
6020
|
+
v *= 0.7;
|
|
6021
|
+
else if (p.startsWith("vp09"))
|
|
6022
|
+
v *= 0.8;
|
|
6023
|
+
else if (p.startsWith("av01"))
|
|
6024
|
+
v *= 0.6;
|
|
6025
|
+
else if (p === "vp8")
|
|
6026
|
+
v *= 1.1;
|
|
6027
6027
|
else
|
|
6028
|
-
throw new Error(`unknown codec: ${
|
|
6029
|
-
|
|
6030
|
-
const
|
|
6031
|
-
codec:
|
|
6028
|
+
throw new Error(`unknown codec: ${p}`);
|
|
6029
|
+
v = Math.round(Math.min(v, c.maxBitrate || v));
|
|
6030
|
+
const $ = {
|
|
6031
|
+
codec: p,
|
|
6032
6032
|
width: i.width,
|
|
6033
6033
|
height: i.height,
|
|
6034
6034
|
framerate: a,
|
|
6035
|
-
bitrate:
|
|
6036
|
-
avc:
|
|
6035
|
+
bitrate: v,
|
|
6036
|
+
avc: p.startsWith("avc1") ? { format: "annexb" } : void 0,
|
|
6037
6037
|
// @ts-expect-error Typescript needs to be updated.
|
|
6038
|
-
hevc:
|
|
6038
|
+
hevc: p.startsWith("hev1") ? { format: "annexb" } : void 0,
|
|
6039
6039
|
latencyMode: "realtime",
|
|
6040
|
-
hardwareAcceleration:
|
|
6040
|
+
hardwareAcceleration: w
|
|
6041
6041
|
};
|
|
6042
|
-
n.set(this.#r,
|
|
6042
|
+
n.set(this.#r, $);
|
|
6043
6043
|
});
|
|
6044
6044
|
}
|
|
6045
6045
|
#i(n) {
|
|
@@ -6106,31 +6106,31 @@ class Pe {
|
|
|
6106
6106
|
if (!Hi)
|
|
6107
6107
|
for (const a of i) {
|
|
6108
6108
|
if (!a.startsWith(r)) continue;
|
|
6109
|
-
const c = {
|
|
6109
|
+
const c = "prefer-hardware", u = {
|
|
6110
6110
|
codec: a,
|
|
6111
6111
|
width: s.width,
|
|
6112
6112
|
height: s.height,
|
|
6113
6113
|
latencyMode: "realtime",
|
|
6114
|
-
hardwareAcceleration:
|
|
6114
|
+
hardwareAcceleration: c,
|
|
6115
6115
|
avc: a.startsWith("avc1") ? { format: "annexb" } : void 0,
|
|
6116
6116
|
// @ts-expect-error Typescript needs to be updated.
|
|
6117
6117
|
hevc: a.startsWith("hev1") ? { format: "annexb" } : void 0
|
|
6118
|
-
}, { supported:
|
|
6119
|
-
if (
|
|
6118
|
+
}, { supported: l } = await VideoEncoder.isConfigSupported(u);
|
|
6119
|
+
if (l) return { codec: a, hardwareAcceleration: c };
|
|
6120
6120
|
}
|
|
6121
6121
|
for (const a of o) {
|
|
6122
6122
|
if (!a.startsWith(r)) continue;
|
|
6123
|
-
const c = {
|
|
6123
|
+
const c = "prefer-software", u = {
|
|
6124
6124
|
codec: a,
|
|
6125
6125
|
width: s.width,
|
|
6126
6126
|
height: s.height,
|
|
6127
6127
|
latencyMode: "realtime",
|
|
6128
|
-
hardwareAcceleration:
|
|
6128
|
+
hardwareAcceleration: c,
|
|
6129
6129
|
avc: a.startsWith("avc1") ? { format: "annexb" } : void 0,
|
|
6130
6130
|
// @ts-expect-error Typescript needs to be updated.
|
|
6131
6131
|
hevc: a.startsWith("hev1") ? { format: "annexb" } : void 0
|
|
6132
|
-
}, { supported:
|
|
6133
|
-
if (
|
|
6132
|
+
}, { supported: l } = await VideoEncoder.isConfigSupported(u);
|
|
6133
|
+
if (l) return { codec: a, hardwareAcceleration: c };
|
|
6134
6134
|
}
|
|
6135
6135
|
throw new Error("no supported codec");
|
|
6136
6136
|
}
|
|
@@ -6575,4 +6575,4 @@ export {
|
|
|
6575
6575
|
aa as i,
|
|
6576
6576
|
da as u
|
|
6577
6577
|
};
|
|
6578
|
-
//# sourceMappingURL=screen-
|
|
6578
|
+
//# sourceMappingURL=screen-CB3eVjAV.js.map
|