@superbright/indexeddb-orm 1.0.43 → 1.0.45
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/api/response-schemas.generated.cjs +2 -0
- package/dist/api/response-schemas.generated.cjs.map +1 -0
- package/dist/api/response-schemas.generated.d.ts +4511 -0
- package/dist/api/response-schemas.generated.mjs +270 -0
- package/dist/api/response-schemas.generated.mjs.map +1 -0
- package/dist/api/schemas.generated.cjs +2 -0
- package/dist/api/schemas.generated.cjs.map +1 -0
- package/dist/api/schemas.generated.d.ts +1818 -0
- package/dist/api/schemas.generated.mjs +287 -0
- package/dist/api/schemas.generated.mjs.map +1 -0
- package/dist/features/analytics/analytics.cjs +1 -1
- package/dist/features/analytics/analytics.cjs.map +1 -1
- package/dist/features/analytics/analytics.d.ts +119 -54
- package/dist/features/analytics/analytics.mjs +186 -174
- package/dist/features/analytics/analytics.mjs.map +1 -1
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.cjs +1 -1
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.cjs.map +1 -1
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.mjs +104 -103
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.mjs.map +1 -1
- package/dist/response-schemas.cjs +2 -0
- package/dist/response-schemas.cjs.map +1 -0
- package/dist/response-schemas.d.ts +1 -0
- package/dist/response-schemas.mjs +36 -0
- package/dist/response-schemas.mjs.map +1 -0
- package/dist/schemas.cjs +2 -0
- package/dist/schemas.cjs.map +1 -0
- package/dist/schemas.d.ts +1 -0
- package/dist/schemas.mjs +37 -0
- package/dist/schemas.mjs.map +1 -0
- package/dist/types/api.generated.d.ts +8705 -0
- package/dist/types/types.generated.d.ts +8576 -0
- package/package.json +24 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ZodIssueCode as c, ZodError as $ } from "./ZodError.mjs";
|
|
2
2
|
import { errorUtil as o } from "./helpers/errorUtil.mjs";
|
|
3
|
-
import { addIssueToContext as u, INVALID as p, ParseStatus as k, OK as w, isAsync as U, isValid as I, DIRTY as M, isAborted as
|
|
3
|
+
import { addIssueToContext as u, INVALID as p, ParseStatus as k, OK as w, isAsync as U, isValid as I, DIRTY as M, isAborted as ne, isDirty as ie } from "./helpers/parseUtil.mjs";
|
|
4
4
|
import { util as v, ZodParsedType as h, getParsedType as Z } from "./helpers/util.mjs";
|
|
5
5
|
class C {
|
|
6
6
|
constructor(e, t, s, r) {
|
|
@@ -10,7 +10,7 @@ class C {
|
|
|
10
10
|
return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const de = (n, e) => {
|
|
14
14
|
if (I(e))
|
|
15
15
|
return { success: !0, data: e.value };
|
|
16
16
|
if (!n.common.issues.length)
|
|
@@ -36,7 +36,7 @@ function _(n) {
|
|
|
36
36
|
return d.code === "invalid_enum_value" ? { message: l ?? i.defaultError } : typeof i.data > "u" ? { message: l ?? s ?? i.defaultError } : d.code !== "invalid_type" ? { message: i.defaultError } : { message: l ?? t ?? i.defaultError };
|
|
37
37
|
}, description: r };
|
|
38
38
|
}
|
|
39
|
-
class
|
|
39
|
+
class y {
|
|
40
40
|
get description() {
|
|
41
41
|
return this._def.description;
|
|
42
42
|
}
|
|
@@ -95,7 +95,7 @@ class g {
|
|
|
95
95
|
data: e,
|
|
96
96
|
parsedType: Z(e)
|
|
97
97
|
}, r = this._parseSync({ data: e, path: s.path, parent: s });
|
|
98
|
-
return
|
|
98
|
+
return de(s, r);
|
|
99
99
|
}
|
|
100
100
|
"~validate"(e) {
|
|
101
101
|
var s, r;
|
|
@@ -149,7 +149,7 @@ class g {
|
|
|
149
149
|
data: e,
|
|
150
150
|
parsedType: Z(e)
|
|
151
151
|
}, r = this._parse({ data: e, path: s.path, parent: s }), a = await (U(r) ? r : Promise.resolve(r));
|
|
152
|
-
return
|
|
152
|
+
return de(s, a);
|
|
153
153
|
}
|
|
154
154
|
refine(e, t) {
|
|
155
155
|
const s = (r) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(r) : t;
|
|
@@ -212,7 +212,7 @@ class g {
|
|
|
212
212
|
}
|
|
213
213
|
default(e) {
|
|
214
214
|
const t = typeof e == "function" ? e : () => e;
|
|
215
|
-
return new
|
|
215
|
+
return new te({
|
|
216
216
|
..._(this._def),
|
|
217
217
|
innerType: this,
|
|
218
218
|
defaultValue: t,
|
|
@@ -228,7 +228,7 @@ class g {
|
|
|
228
228
|
}
|
|
229
229
|
catch(e) {
|
|
230
230
|
const t = typeof e == "function" ? e : () => e;
|
|
231
|
-
return new
|
|
231
|
+
return new se({
|
|
232
232
|
..._(this._def),
|
|
233
233
|
innerType: this,
|
|
234
234
|
catchValue: t,
|
|
@@ -243,10 +243,10 @@ class g {
|
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
245
|
pipe(e) {
|
|
246
|
-
return
|
|
246
|
+
return ae.create(this, e);
|
|
247
247
|
}
|
|
248
248
|
readonly() {
|
|
249
|
-
return
|
|
249
|
+
return re.create(this);
|
|
250
250
|
}
|
|
251
251
|
isOptional() {
|
|
252
252
|
return this.safeParse(void 0).success;
|
|
@@ -255,7 +255,7 @@ class g {
|
|
|
255
255
|
return this.safeParse(null).success;
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
const
|
|
258
|
+
const ge = /^c[^\s-]{8,}$/i, ve = /^[0-9a-z]+$/, xe = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ke = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, we = /^[a-z0-9_-]{21}$/i, be = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-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([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, me = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Ie = new RegExp(`^${me}$`);
|
|
261
261
|
function pe(n) {
|
|
@@ -291,7 +291,7 @@ function ze(n, e) {
|
|
|
291
291
|
function Pe(n, e) {
|
|
292
292
|
return !!((e === "v4" || !e) && Se.test(n) || (e === "v6" || !e) && Re.test(n));
|
|
293
293
|
}
|
|
294
|
-
class b extends
|
|
294
|
+
class b extends y {
|
|
295
295
|
_parse(e) {
|
|
296
296
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== h.string) {
|
|
297
297
|
const a = this._getOrReturnCtx(e);
|
|
@@ -364,7 +364,7 @@ class b extends g {
|
|
|
364
364
|
message: a.message
|
|
365
365
|
}), s.dirty());
|
|
366
366
|
else if (a.kind === "cuid")
|
|
367
|
-
|
|
367
|
+
ge.test(e.data) || (r = this._getOrReturnCtx(e, r), u(r, {
|
|
368
368
|
validation: "cuid",
|
|
369
369
|
code: c.invalid_string,
|
|
370
370
|
message: a.message
|
|
@@ -678,7 +678,7 @@ function Me(n, e) {
|
|
|
678
678
|
const t = (n.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, r = t > s ? t : s, a = Number.parseInt(n.toFixed(r).replace(".", "")), d = Number.parseInt(e.toFixed(r).replace(".", ""));
|
|
679
679
|
return a % d / 10 ** r;
|
|
680
680
|
}
|
|
681
|
-
class O extends
|
|
681
|
+
class O extends y {
|
|
682
682
|
constructor() {
|
|
683
683
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
684
684
|
}
|
|
@@ -850,7 +850,7 @@ O.create = (n) => new O({
|
|
|
850
850
|
coerce: (n == null ? void 0 : n.coerce) || !1,
|
|
851
851
|
..._(n)
|
|
852
852
|
});
|
|
853
|
-
class R extends
|
|
853
|
+
class R extends y {
|
|
854
854
|
constructor() {
|
|
855
855
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
856
856
|
}
|
|
@@ -983,7 +983,7 @@ R.create = (n) => new R({
|
|
|
983
983
|
coerce: (n == null ? void 0 : n.coerce) ?? !1,
|
|
984
984
|
..._(n)
|
|
985
985
|
});
|
|
986
|
-
class B extends
|
|
986
|
+
class B extends y {
|
|
987
987
|
_parse(e) {
|
|
988
988
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== h.boolean) {
|
|
989
989
|
const s = this._getOrReturnCtx(e);
|
|
@@ -1001,7 +1001,7 @@ B.create = (n) => new B({
|
|
|
1001
1001
|
coerce: (n == null ? void 0 : n.coerce) || !1,
|
|
1002
1002
|
..._(n)
|
|
1003
1003
|
});
|
|
1004
|
-
class E extends
|
|
1004
|
+
class E extends y {
|
|
1005
1005
|
_parse(e) {
|
|
1006
1006
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== h.date) {
|
|
1007
1007
|
const a = this._getOrReturnCtx(e);
|
|
@@ -1079,7 +1079,7 @@ E.create = (n) => new E({
|
|
|
1079
1079
|
typeName: f.ZodDate,
|
|
1080
1080
|
..._(n)
|
|
1081
1081
|
});
|
|
1082
|
-
class
|
|
1082
|
+
class ce extends y {
|
|
1083
1083
|
_parse(e) {
|
|
1084
1084
|
if (this._getType(e) !== h.symbol) {
|
|
1085
1085
|
const s = this._getOrReturnCtx(e);
|
|
@@ -1092,11 +1092,11 @@ class de extends g {
|
|
|
1092
1092
|
return w(e.data);
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
1095
|
-
|
|
1095
|
+
ce.create = (n) => new ce({
|
|
1096
1096
|
typeName: f.ZodSymbol,
|
|
1097
1097
|
..._(n)
|
|
1098
1098
|
});
|
|
1099
|
-
class
|
|
1099
|
+
class ue extends y {
|
|
1100
1100
|
_parse(e) {
|
|
1101
1101
|
if (this._getType(e) !== h.undefined) {
|
|
1102
1102
|
const s = this._getOrReturnCtx(e);
|
|
@@ -1109,11 +1109,11 @@ class ce extends g {
|
|
|
1109
1109
|
return w(e.data);
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
|
-
|
|
1112
|
+
ue.create = (n) => new ue({
|
|
1113
1113
|
typeName: f.ZodUndefined,
|
|
1114
1114
|
..._(n)
|
|
1115
1115
|
});
|
|
1116
|
-
class H extends
|
|
1116
|
+
class H extends y {
|
|
1117
1117
|
_parse(e) {
|
|
1118
1118
|
if (this._getType(e) !== h.null) {
|
|
1119
1119
|
const s = this._getOrReturnCtx(e);
|
|
@@ -1130,7 +1130,7 @@ H.create = (n) => new H({
|
|
|
1130
1130
|
typeName: f.ZodNull,
|
|
1131
1131
|
..._(n)
|
|
1132
1132
|
});
|
|
1133
|
-
class G extends
|
|
1133
|
+
class G extends y {
|
|
1134
1134
|
constructor() {
|
|
1135
1135
|
super(...arguments), this._any = !0;
|
|
1136
1136
|
}
|
|
@@ -1142,7 +1142,7 @@ G.create = (n) => new G({
|
|
|
1142
1142
|
typeName: f.ZodAny,
|
|
1143
1143
|
..._(n)
|
|
1144
1144
|
});
|
|
1145
|
-
class Q extends
|
|
1145
|
+
class Q extends y {
|
|
1146
1146
|
constructor() {
|
|
1147
1147
|
super(...arguments), this._unknown = !0;
|
|
1148
1148
|
}
|
|
@@ -1154,7 +1154,7 @@ Q.create = (n) => new Q({
|
|
|
1154
1154
|
typeName: f.ZodUnknown,
|
|
1155
1155
|
..._(n)
|
|
1156
1156
|
});
|
|
1157
|
-
class S extends
|
|
1157
|
+
class S extends y {
|
|
1158
1158
|
_parse(e) {
|
|
1159
1159
|
const t = this._getOrReturnCtx(e);
|
|
1160
1160
|
return u(t, {
|
|
@@ -1168,7 +1168,7 @@ S.create = (n) => new S({
|
|
|
1168
1168
|
typeName: f.ZodNever,
|
|
1169
1169
|
..._(n)
|
|
1170
1170
|
});
|
|
1171
|
-
class
|
|
1171
|
+
class oe extends y {
|
|
1172
1172
|
_parse(e) {
|
|
1173
1173
|
if (this._getType(e) !== h.undefined) {
|
|
1174
1174
|
const s = this._getOrReturnCtx(e);
|
|
@@ -1181,11 +1181,11 @@ class ue extends g {
|
|
|
1181
1181
|
return w(e.data);
|
|
1182
1182
|
}
|
|
1183
1183
|
}
|
|
1184
|
-
|
|
1184
|
+
oe.create = (n) => new oe({
|
|
1185
1185
|
typeName: f.ZodVoid,
|
|
1186
1186
|
..._(n)
|
|
1187
1187
|
});
|
|
1188
|
-
class T extends
|
|
1188
|
+
class T extends y {
|
|
1189
1189
|
_parse(e) {
|
|
1190
1190
|
const { ctx: t, status: s } = this._processInputParams(e), r = this._def;
|
|
1191
1191
|
if (t.parsedType !== h.array)
|
|
@@ -1274,7 +1274,7 @@ function j(n) {
|
|
|
1274
1274
|
type: j(n.element)
|
|
1275
1275
|
}) : n instanceof A ? A.create(j(n.unwrap())) : n instanceof z ? z.create(j(n.unwrap())) : n instanceof N ? N.create(n.items.map((e) => j(e))) : n;
|
|
1276
1276
|
}
|
|
1277
|
-
class x extends
|
|
1277
|
+
class x extends y {
|
|
1278
1278
|
constructor() {
|
|
1279
1279
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
1280
1280
|
}
|
|
@@ -1299,20 +1299,20 @@ class x extends g {
|
|
|
1299
1299
|
d.includes(m) || i.push(m);
|
|
1300
1300
|
const l = [];
|
|
1301
1301
|
for (const m of d) {
|
|
1302
|
-
const
|
|
1302
|
+
const g = a[m], P = r.data[m];
|
|
1303
1303
|
l.push({
|
|
1304
1304
|
key: { status: "valid", value: m },
|
|
1305
|
-
value:
|
|
1305
|
+
value: g._parse(new C(r, P, r.path, m)),
|
|
1306
1306
|
alwaysSet: m in r.data
|
|
1307
1307
|
});
|
|
1308
1308
|
}
|
|
1309
1309
|
if (this._def.catchall instanceof S) {
|
|
1310
1310
|
const m = this._def.unknownKeys;
|
|
1311
1311
|
if (m === "passthrough")
|
|
1312
|
-
for (const
|
|
1312
|
+
for (const g of i)
|
|
1313
1313
|
l.push({
|
|
1314
|
-
key: { status: "valid", value:
|
|
1315
|
-
value: { status: "valid", value: r.data[
|
|
1314
|
+
key: { status: "valid", value: g },
|
|
1315
|
+
value: { status: "valid", value: r.data[g] }
|
|
1316
1316
|
});
|
|
1317
1317
|
else if (m === "strict")
|
|
1318
1318
|
i.length > 0 && (u(r, {
|
|
@@ -1322,26 +1322,26 @@ class x extends g {
|
|
|
1322
1322
|
else if (m !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
1323
1323
|
} else {
|
|
1324
1324
|
const m = this._def.catchall;
|
|
1325
|
-
for (const
|
|
1326
|
-
const P = r.data[
|
|
1325
|
+
for (const g of i) {
|
|
1326
|
+
const P = r.data[g];
|
|
1327
1327
|
l.push({
|
|
1328
|
-
key: { status: "valid", value:
|
|
1328
|
+
key: { status: "valid", value: g },
|
|
1329
1329
|
value: m._parse(
|
|
1330
|
-
new C(r, P, r.path,
|
|
1330
|
+
new C(r, P, r.path, g)
|
|
1331
1331
|
//, ctx.child(key), value, getParsedType(value)
|
|
1332
1332
|
),
|
|
1333
|
-
alwaysSet:
|
|
1333
|
+
alwaysSet: g in r.data
|
|
1334
1334
|
});
|
|
1335
1335
|
}
|
|
1336
1336
|
}
|
|
1337
1337
|
return r.common.async ? Promise.resolve().then(async () => {
|
|
1338
1338
|
const m = [];
|
|
1339
|
-
for (const
|
|
1340
|
-
const P = await
|
|
1339
|
+
for (const g of l) {
|
|
1340
|
+
const P = await g.key, ye = await g.value;
|
|
1341
1341
|
m.push({
|
|
1342
1342
|
key: P,
|
|
1343
|
-
value:
|
|
1344
|
-
alwaysSet:
|
|
1343
|
+
value: ye,
|
|
1344
|
+
alwaysSet: g.alwaysSet
|
|
1345
1345
|
});
|
|
1346
1346
|
}
|
|
1347
1347
|
return m;
|
|
@@ -1562,7 +1562,7 @@ x.lazycreate = (n, e) => new x({
|
|
|
1562
1562
|
typeName: f.ZodObject,
|
|
1563
1563
|
..._(e)
|
|
1564
1564
|
});
|
|
1565
|
-
class F extends
|
|
1565
|
+
class F extends y {
|
|
1566
1566
|
_parse(e) {
|
|
1567
1567
|
const { ctx: t } = this._processInputParams(e), s = this._def.options;
|
|
1568
1568
|
function r(a) {
|
|
@@ -1608,14 +1608,14 @@ class F extends g {
|
|
|
1608
1608
|
issues: []
|
|
1609
1609
|
},
|
|
1610
1610
|
parent: null
|
|
1611
|
-
},
|
|
1611
|
+
}, g = l._parseSync({
|
|
1612
1612
|
data: t.data,
|
|
1613
1613
|
path: t.path,
|
|
1614
1614
|
parent: m
|
|
1615
1615
|
});
|
|
1616
|
-
if (
|
|
1617
|
-
return
|
|
1618
|
-
|
|
1616
|
+
if (g.status === "valid")
|
|
1617
|
+
return g;
|
|
1618
|
+
g.status === "dirty" && !a && (a = { result: g, ctx: m }), m.common.issues.length && d.push(m.common.issues);
|
|
1619
1619
|
}
|
|
1620
1620
|
if (a)
|
|
1621
1621
|
return t.common.issues.push(...a.ctx.common.issues), a.result;
|
|
@@ -1661,13 +1661,13 @@ function X(n, e) {
|
|
|
1661
1661
|
return { valid: !0, data: r };
|
|
1662
1662
|
} else return t === h.date && s === h.date && +n == +e ? { valid: !0, data: n } : { valid: !1 };
|
|
1663
1663
|
}
|
|
1664
|
-
class W extends
|
|
1664
|
+
class W extends y {
|
|
1665
1665
|
_parse(e) {
|
|
1666
1666
|
const { status: t, ctx: s } = this._processInputParams(e), r = (a, d) => {
|
|
1667
|
-
if (
|
|
1667
|
+
if (ne(a) || ne(d))
|
|
1668
1668
|
return p;
|
|
1669
1669
|
const i = X(a.value, d.value);
|
|
1670
|
-
return i.valid ? ((
|
|
1670
|
+
return i.valid ? ((ie(a) || ie(d)) && t.dirty(), { status: t.value, value: i.data }) : (u(s, {
|
|
1671
1671
|
code: c.invalid_intersection_types
|
|
1672
1672
|
}), p);
|
|
1673
1673
|
};
|
|
@@ -1699,7 +1699,7 @@ W.create = (n, e, t) => new W({
|
|
|
1699
1699
|
typeName: f.ZodIntersection,
|
|
1700
1700
|
..._(t)
|
|
1701
1701
|
});
|
|
1702
|
-
class N extends
|
|
1702
|
+
class N extends y {
|
|
1703
1703
|
_parse(e) {
|
|
1704
1704
|
const { status: t, ctx: s } = this._processInputParams(e);
|
|
1705
1705
|
if (s.parsedType !== h.array)
|
|
@@ -1749,7 +1749,7 @@ N.create = (n, e) => {
|
|
|
1749
1749
|
..._(e)
|
|
1750
1750
|
});
|
|
1751
1751
|
};
|
|
1752
|
-
class J extends
|
|
1752
|
+
class J extends y {
|
|
1753
1753
|
get keySchema() {
|
|
1754
1754
|
return this._def.keyType;
|
|
1755
1755
|
}
|
|
@@ -1777,7 +1777,7 @@ class J extends g {
|
|
|
1777
1777
|
return this._def.valueType;
|
|
1778
1778
|
}
|
|
1779
1779
|
static create(e, t, s) {
|
|
1780
|
-
return t instanceof
|
|
1780
|
+
return t instanceof y ? new J({
|
|
1781
1781
|
keyType: e,
|
|
1782
1782
|
valueType: t,
|
|
1783
1783
|
typeName: f.ZodRecord,
|
|
@@ -1790,7 +1790,7 @@ class J extends g {
|
|
|
1790
1790
|
});
|
|
1791
1791
|
}
|
|
1792
1792
|
}
|
|
1793
|
-
class
|
|
1793
|
+
class le extends y {
|
|
1794
1794
|
get keySchema() {
|
|
1795
1795
|
return this._def.keyType;
|
|
1796
1796
|
}
|
|
@@ -1813,32 +1813,32 @@ class oe extends g {
|
|
|
1813
1813
|
const i = /* @__PURE__ */ new Map();
|
|
1814
1814
|
return Promise.resolve().then(async () => {
|
|
1815
1815
|
for (const l of d) {
|
|
1816
|
-
const m = await l.key,
|
|
1817
|
-
if (m.status === "aborted" ||
|
|
1816
|
+
const m = await l.key, g = await l.value;
|
|
1817
|
+
if (m.status === "aborted" || g.status === "aborted")
|
|
1818
1818
|
return p;
|
|
1819
|
-
(m.status === "dirty" ||
|
|
1819
|
+
(m.status === "dirty" || g.status === "dirty") && t.dirty(), i.set(m.value, g.value);
|
|
1820
1820
|
}
|
|
1821
1821
|
return { status: t.value, value: i };
|
|
1822
1822
|
});
|
|
1823
1823
|
} else {
|
|
1824
1824
|
const i = /* @__PURE__ */ new Map();
|
|
1825
1825
|
for (const l of d) {
|
|
1826
|
-
const m = l.key,
|
|
1827
|
-
if (m.status === "aborted" ||
|
|
1826
|
+
const m = l.key, g = l.value;
|
|
1827
|
+
if (m.status === "aborted" || g.status === "aborted")
|
|
1828
1828
|
return p;
|
|
1829
|
-
(m.status === "dirty" ||
|
|
1829
|
+
(m.status === "dirty" || g.status === "dirty") && t.dirty(), i.set(m.value, g.value);
|
|
1830
1830
|
}
|
|
1831
1831
|
return { status: t.value, value: i };
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
1834
|
}
|
|
1835
|
-
|
|
1835
|
+
le.create = (n, e, t) => new le({
|
|
1836
1836
|
valueType: e,
|
|
1837
1837
|
keyType: n,
|
|
1838
1838
|
typeName: f.ZodMap,
|
|
1839
1839
|
..._(t)
|
|
1840
1840
|
});
|
|
1841
|
-
class D extends
|
|
1841
|
+
class D extends y {
|
|
1842
1842
|
_parse(e) {
|
|
1843
1843
|
const { status: t, ctx: s } = this._processInputParams(e);
|
|
1844
1844
|
if (s.parsedType !== h.set)
|
|
@@ -1866,10 +1866,10 @@ class D extends g {
|
|
|
1866
1866
|
const a = this._def.valueType;
|
|
1867
1867
|
function d(l) {
|
|
1868
1868
|
const m = /* @__PURE__ */ new Set();
|
|
1869
|
-
for (const
|
|
1870
|
-
if (
|
|
1869
|
+
for (const g of l) {
|
|
1870
|
+
if (g.status === "aborted")
|
|
1871
1871
|
return p;
|
|
1872
|
-
|
|
1872
|
+
g.status === "dirty" && t.dirty(), m.add(g.value);
|
|
1873
1873
|
}
|
|
1874
1874
|
return { status: t.value, value: m };
|
|
1875
1875
|
}
|
|
@@ -1902,7 +1902,7 @@ D.create = (n, e) => new D({
|
|
|
1902
1902
|
typeName: f.ZodSet,
|
|
1903
1903
|
..._(e)
|
|
1904
1904
|
});
|
|
1905
|
-
class
|
|
1905
|
+
class K extends y {
|
|
1906
1906
|
get schema() {
|
|
1907
1907
|
return this._def.getter();
|
|
1908
1908
|
}
|
|
@@ -1911,12 +1911,12 @@ class le extends g {
|
|
|
1911
1911
|
return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
|
|
1912
1912
|
}
|
|
1913
1913
|
}
|
|
1914
|
-
|
|
1914
|
+
K.create = (n, e) => new K({
|
|
1915
1915
|
getter: n,
|
|
1916
1916
|
typeName: f.ZodLazy,
|
|
1917
1917
|
..._(e)
|
|
1918
1918
|
});
|
|
1919
|
-
class he extends
|
|
1919
|
+
class he extends y {
|
|
1920
1920
|
_parse(e) {
|
|
1921
1921
|
if (e.data !== this._def.value) {
|
|
1922
1922
|
const t = this._getOrReturnCtx(e);
|
|
@@ -1944,7 +1944,7 @@ function _e(n, e) {
|
|
|
1944
1944
|
..._(e)
|
|
1945
1945
|
});
|
|
1946
1946
|
}
|
|
1947
|
-
class L extends
|
|
1947
|
+
class L extends y {
|
|
1948
1948
|
_parse(e) {
|
|
1949
1949
|
if (typeof e.data != "string") {
|
|
1950
1950
|
const t = this._getOrReturnCtx(e), s = this._def.values;
|
|
@@ -1999,7 +1999,7 @@ class L extends g {
|
|
|
1999
1999
|
}
|
|
2000
2000
|
}
|
|
2001
2001
|
L.create = _e;
|
|
2002
|
-
class
|
|
2002
|
+
class ee extends y {
|
|
2003
2003
|
_parse(e) {
|
|
2004
2004
|
const t = v.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
|
|
2005
2005
|
if (s.parsedType !== h.string && s.parsedType !== h.number) {
|
|
@@ -2024,12 +2024,12 @@ class K extends g {
|
|
|
2024
2024
|
return this._def.values;
|
|
2025
2025
|
}
|
|
2026
2026
|
}
|
|
2027
|
-
|
|
2027
|
+
ee.create = (n, e) => new ee({
|
|
2028
2028
|
values: n,
|
|
2029
2029
|
typeName: f.ZodNativeEnum,
|
|
2030
2030
|
..._(e)
|
|
2031
2031
|
});
|
|
2032
|
-
class Y extends
|
|
2032
|
+
class Y extends y {
|
|
2033
2033
|
unwrap() {
|
|
2034
2034
|
return this._def.type;
|
|
2035
2035
|
}
|
|
@@ -2053,7 +2053,7 @@ Y.create = (n, e) => new Y({
|
|
|
2053
2053
|
typeName: f.ZodPromise,
|
|
2054
2054
|
..._(e)
|
|
2055
2055
|
});
|
|
2056
|
-
class V extends
|
|
2056
|
+
class V extends y {
|
|
2057
2057
|
innerType() {
|
|
2058
2058
|
return this._def.schema;
|
|
2059
2059
|
}
|
|
@@ -2145,7 +2145,7 @@ V.createWithPreprocess = (n, e, t) => new V({
|
|
|
2145
2145
|
typeName: f.ZodEffects,
|
|
2146
2146
|
..._(t)
|
|
2147
2147
|
});
|
|
2148
|
-
class A extends
|
|
2148
|
+
class A extends y {
|
|
2149
2149
|
_parse(e) {
|
|
2150
2150
|
return this._getType(e) === h.undefined ? w(void 0) : this._def.innerType._parse(e);
|
|
2151
2151
|
}
|
|
@@ -2158,7 +2158,7 @@ A.create = (n, e) => new A({
|
|
|
2158
2158
|
typeName: f.ZodOptional,
|
|
2159
2159
|
..._(e)
|
|
2160
2160
|
});
|
|
2161
|
-
class z extends
|
|
2161
|
+
class z extends y {
|
|
2162
2162
|
_parse(e) {
|
|
2163
2163
|
return this._getType(e) === h.null ? w(null) : this._def.innerType._parse(e);
|
|
2164
2164
|
}
|
|
@@ -2171,7 +2171,7 @@ z.create = (n, e) => new z({
|
|
|
2171
2171
|
typeName: f.ZodNullable,
|
|
2172
2172
|
..._(e)
|
|
2173
2173
|
});
|
|
2174
|
-
class
|
|
2174
|
+
class te extends y {
|
|
2175
2175
|
_parse(e) {
|
|
2176
2176
|
const { ctx: t } = this._processInputParams(e);
|
|
2177
2177
|
let s = t.data;
|
|
@@ -2185,13 +2185,13 @@ class ee extends g {
|
|
|
2185
2185
|
return this._def.innerType;
|
|
2186
2186
|
}
|
|
2187
2187
|
}
|
|
2188
|
-
|
|
2188
|
+
te.create = (n, e) => new te({
|
|
2189
2189
|
innerType: n,
|
|
2190
2190
|
typeName: f.ZodDefault,
|
|
2191
2191
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
2192
2192
|
..._(e)
|
|
2193
2193
|
});
|
|
2194
|
-
class
|
|
2194
|
+
class se extends y {
|
|
2195
2195
|
_parse(e) {
|
|
2196
2196
|
const { ctx: t } = this._processInputParams(e), s = {
|
|
2197
2197
|
...t,
|
|
@@ -2228,13 +2228,13 @@ class te extends g {
|
|
|
2228
2228
|
return this._def.innerType;
|
|
2229
2229
|
}
|
|
2230
2230
|
}
|
|
2231
|
-
|
|
2231
|
+
se.create = (n, e) => new se({
|
|
2232
2232
|
innerType: n,
|
|
2233
2233
|
typeName: f.ZodCatch,
|
|
2234
2234
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2235
2235
|
..._(e)
|
|
2236
2236
|
});
|
|
2237
|
-
class fe extends
|
|
2237
|
+
class fe extends y {
|
|
2238
2238
|
_parse(e) {
|
|
2239
2239
|
if (this._getType(e) !== h.nan) {
|
|
2240
2240
|
const s = this._getOrReturnCtx(e);
|
|
@@ -2251,7 +2251,7 @@ fe.create = (n) => new fe({
|
|
|
2251
2251
|
typeName: f.ZodNaN,
|
|
2252
2252
|
..._(n)
|
|
2253
2253
|
});
|
|
2254
|
-
class $e extends
|
|
2254
|
+
class $e extends y {
|
|
2255
2255
|
_parse(e) {
|
|
2256
2256
|
const { ctx: t } = this._processInputParams(e), s = t.data;
|
|
2257
2257
|
return this._def.type._parse({
|
|
@@ -2264,7 +2264,7 @@ class $e extends g {
|
|
|
2264
2264
|
return this._def.type;
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
|
-
class
|
|
2267
|
+
class ae extends y {
|
|
2268
2268
|
_parse(e) {
|
|
2269
2269
|
const { status: t, ctx: s } = this._processInputParams(e);
|
|
2270
2270
|
if (s.common.async)
|
|
@@ -2297,14 +2297,14 @@ class re extends g {
|
|
|
2297
2297
|
}
|
|
2298
2298
|
}
|
|
2299
2299
|
static create(e, t) {
|
|
2300
|
-
return new
|
|
2300
|
+
return new ae({
|
|
2301
2301
|
in: e,
|
|
2302
2302
|
out: t,
|
|
2303
2303
|
typeName: f.ZodPipeline
|
|
2304
2304
|
});
|
|
2305
2305
|
}
|
|
2306
2306
|
}
|
|
2307
|
-
class
|
|
2307
|
+
class re extends y {
|
|
2308
2308
|
_parse(e) {
|
|
2309
2309
|
const t = this._def.innerType._parse(e), s = (r) => (I(r) && (r.value = Object.freeze(r.value)), r);
|
|
2310
2310
|
return U(t) ? t.then((r) => s(r)) : s(t);
|
|
@@ -2313,7 +2313,7 @@ class se extends g {
|
|
|
2313
2313
|
return this._def.innerType;
|
|
2314
2314
|
}
|
|
2315
2315
|
}
|
|
2316
|
-
|
|
2316
|
+
re.create = (n, e) => new re({
|
|
2317
2317
|
innerType: n,
|
|
2318
2318
|
typeName: f.ZodReadonly,
|
|
2319
2319
|
..._(e)
|
|
@@ -2329,11 +2329,11 @@ S.create;
|
|
|
2329
2329
|
const Xe = T.create, Ke = x.create, et = F.create;
|
|
2330
2330
|
W.create;
|
|
2331
2331
|
N.create;
|
|
2332
|
-
const tt = J.create, st =
|
|
2332
|
+
const tt = J.create, st = K.create, rt = L.create, at = ee.create;
|
|
2333
2333
|
Y.create;
|
|
2334
2334
|
A.create;
|
|
2335
2335
|
z.create;
|
|
2336
|
-
const
|
|
2336
|
+
const nt = {
|
|
2337
2337
|
string: (n) => b.create({ ...n, coerce: !0 }),
|
|
2338
2338
|
number: (n) => O.create({ ...n, coerce: !0 }),
|
|
2339
2339
|
boolean: (n) => B.create({
|
|
@@ -2344,53 +2344,54 @@ const at = {
|
|
|
2344
2344
|
date: (n) => E.create({ ...n, coerce: !0 })
|
|
2345
2345
|
};
|
|
2346
2346
|
export {
|
|
2347
|
-
|
|
2347
|
+
y as Schema,
|
|
2348
2348
|
G as ZodAny,
|
|
2349
2349
|
T as ZodArray,
|
|
2350
2350
|
R as ZodBigInt,
|
|
2351
2351
|
B as ZodBoolean,
|
|
2352
2352
|
$e as ZodBranded,
|
|
2353
|
-
|
|
2353
|
+
se as ZodCatch,
|
|
2354
2354
|
E as ZodDate,
|
|
2355
|
-
|
|
2355
|
+
te as ZodDefault,
|
|
2356
2356
|
V as ZodEffects,
|
|
2357
2357
|
L as ZodEnum,
|
|
2358
2358
|
f as ZodFirstPartyTypeKind,
|
|
2359
2359
|
W as ZodIntersection,
|
|
2360
|
-
|
|
2360
|
+
K as ZodLazy,
|
|
2361
2361
|
he as ZodLiteral,
|
|
2362
|
-
|
|
2362
|
+
le as ZodMap,
|
|
2363
2363
|
fe as ZodNaN,
|
|
2364
|
-
|
|
2364
|
+
ee as ZodNativeEnum,
|
|
2365
2365
|
S as ZodNever,
|
|
2366
2366
|
H as ZodNull,
|
|
2367
2367
|
z as ZodNullable,
|
|
2368
2368
|
O as ZodNumber,
|
|
2369
2369
|
x as ZodObject,
|
|
2370
2370
|
A as ZodOptional,
|
|
2371
|
-
|
|
2371
|
+
ae as ZodPipeline,
|
|
2372
2372
|
Y as ZodPromise,
|
|
2373
|
-
|
|
2373
|
+
re as ZodReadonly,
|
|
2374
2374
|
J as ZodRecord,
|
|
2375
|
-
|
|
2375
|
+
y as ZodSchema,
|
|
2376
2376
|
D as ZodSet,
|
|
2377
2377
|
b as ZodString,
|
|
2378
|
-
|
|
2378
|
+
ce as ZodSymbol,
|
|
2379
2379
|
V as ZodTransformer,
|
|
2380
2380
|
N as ZodTuple,
|
|
2381
|
-
|
|
2382
|
-
|
|
2381
|
+
y as ZodType,
|
|
2382
|
+
ue as ZodUndefined,
|
|
2383
2383
|
F as ZodUnion,
|
|
2384
2384
|
Q as ZodUnknown,
|
|
2385
|
-
|
|
2385
|
+
oe as ZodVoid,
|
|
2386
2386
|
Ge as any,
|
|
2387
2387
|
Xe as array,
|
|
2388
2388
|
Ye as boolean,
|
|
2389
|
-
|
|
2389
|
+
nt as coerce,
|
|
2390
2390
|
qe as date,
|
|
2391
2391
|
Le as datetimeRegex,
|
|
2392
|
-
|
|
2393
|
-
|
|
2392
|
+
rt as enum,
|
|
2393
|
+
st as lazy,
|
|
2394
|
+
at as nativeEnum,
|
|
2394
2395
|
He as null,
|
|
2395
2396
|
Je as number,
|
|
2396
2397
|
Ke as object,
|