@vanillagreen/pi-claude-bridge 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/bundle/index.js +1144 -398
- package/package.json +6 -7
- package/src/convert.ts +1 -1
- package/src/index.ts +3 -3
- package/src/query-state.ts +1 -1
- package/CHANGELOG.md +0 -12
package/bundle/index.js
CHANGED
|
@@ -5,8 +5,8 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/index.ts
|
|
8
|
-
import { calculateCost, getModels } from "@
|
|
9
|
-
import * as piAi from "@
|
|
8
|
+
import { calculateCost, getModels } from "@earendil-works/pi-ai";
|
|
9
|
+
import * as piAi from "@earendil-works/pi-ai";
|
|
10
10
|
|
|
11
11
|
// node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs
|
|
12
12
|
import { execFile as Rc } from "child_process";
|
|
@@ -19812,6 +19812,7 @@ __export(external_exports, {
|
|
|
19812
19812
|
ZodOptional: () => ZodOptional,
|
|
19813
19813
|
ZodPipe: () => ZodPipe,
|
|
19814
19814
|
ZodPrefault: () => ZodPrefault,
|
|
19815
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
19815
19816
|
ZodPromise: () => ZodPromise,
|
|
19816
19817
|
ZodReadonly: () => ZodReadonly,
|
|
19817
19818
|
ZodRealError: () => ZodRealError,
|
|
@@ -19890,6 +19891,7 @@ __export(external_exports, {
|
|
|
19890
19891
|
int32: () => int32,
|
|
19891
19892
|
int64: () => int64,
|
|
19892
19893
|
intersection: () => intersection,
|
|
19894
|
+
invertCodec: () => invertCodec,
|
|
19893
19895
|
ipv4: () => ipv42,
|
|
19894
19896
|
ipv6: () => ipv62,
|
|
19895
19897
|
iso: () => iso_exports,
|
|
@@ -20071,6 +20073,7 @@ __export(core_exports2, {
|
|
|
20071
20073
|
$ZodOptional: () => $ZodOptional,
|
|
20072
20074
|
$ZodPipe: () => $ZodPipe,
|
|
20073
20075
|
$ZodPrefault: () => $ZodPrefault,
|
|
20076
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
20074
20077
|
$ZodPromise: () => $ZodPromise,
|
|
20075
20078
|
$ZodReadonly: () => $ZodReadonly,
|
|
20076
20079
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -20270,7 +20273,8 @@ __export(core_exports2, {
|
|
|
20270
20273
|
});
|
|
20271
20274
|
|
|
20272
20275
|
// node_modules/zod/v4/core/core.js
|
|
20273
|
-
var
|
|
20276
|
+
var _a;
|
|
20277
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
20274
20278
|
status: "aborted"
|
|
20275
20279
|
});
|
|
20276
20280
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -20305,10 +20309,10 @@ function $constructor(name, initializer3, params) {
|
|
|
20305
20309
|
}
|
|
20306
20310
|
Object.defineProperty(Definition, "name", { value: name });
|
|
20307
20311
|
function _(def) {
|
|
20308
|
-
var
|
|
20312
|
+
var _a3;
|
|
20309
20313
|
const inst = params?.Parent ? new Definition() : this;
|
|
20310
20314
|
init(inst, def);
|
|
20311
|
-
(
|
|
20315
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
20312
20316
|
for (const fn of inst._zod.deferred) {
|
|
20313
20317
|
fn();
|
|
20314
20318
|
}
|
|
@@ -20337,7 +20341,8 @@ var $ZodEncodeError = class extends Error {
|
|
|
20337
20341
|
this.name = "ZodEncodeError";
|
|
20338
20342
|
}
|
|
20339
20343
|
};
|
|
20340
|
-
|
|
20344
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
20345
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
20341
20346
|
function config(newConfig) {
|
|
20342
20347
|
if (newConfig)
|
|
20343
20348
|
Object.assign(globalConfig, newConfig);
|
|
@@ -20370,6 +20375,7 @@ __export(util_exports, {
|
|
|
20370
20375
|
defineLazy: () => defineLazy,
|
|
20371
20376
|
esc: () => esc,
|
|
20372
20377
|
escapeRegex: () => escapeRegex,
|
|
20378
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
20373
20379
|
extend: () => extend,
|
|
20374
20380
|
finalizeIssue: () => finalizeIssue,
|
|
20375
20381
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -20458,19 +20464,12 @@ function cleanRegex(source) {
|
|
|
20458
20464
|
return source.slice(start, end);
|
|
20459
20465
|
}
|
|
20460
20466
|
function floatSafeRemainder(val, step) {
|
|
20461
|
-
const
|
|
20462
|
-
const
|
|
20463
|
-
|
|
20464
|
-
if (
|
|
20465
|
-
|
|
20466
|
-
|
|
20467
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
20468
|
-
}
|
|
20469
|
-
}
|
|
20470
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
20471
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
20472
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
20473
|
-
return valInt % stepInt / 10 ** decCount;
|
|
20467
|
+
const ratio = val / step;
|
|
20468
|
+
const roundedRatio = Math.round(ratio);
|
|
20469
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
20470
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
20471
|
+
return 0;
|
|
20472
|
+
return ratio - roundedRatio;
|
|
20474
20473
|
}
|
|
20475
20474
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
20476
20475
|
function defineLazy(object2, key, getter) {
|
|
@@ -20552,7 +20551,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
|
|
|
20552
20551
|
function isObject(data) {
|
|
20553
20552
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
20554
20553
|
}
|
|
20555
|
-
var allowsEval = cached(() => {
|
|
20554
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
20555
|
+
if (globalConfig.jitless) {
|
|
20556
|
+
return false;
|
|
20557
|
+
}
|
|
20556
20558
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
20557
20559
|
return false;
|
|
20558
20560
|
}
|
|
@@ -20585,6 +20587,10 @@ function shallowClone(o2) {
|
|
|
20585
20587
|
return { ...o2 };
|
|
20586
20588
|
if (Array.isArray(o2))
|
|
20587
20589
|
return [...o2];
|
|
20590
|
+
if (o2 instanceof Map)
|
|
20591
|
+
return new Map(o2);
|
|
20592
|
+
if (o2 instanceof Set)
|
|
20593
|
+
return new Set(o2);
|
|
20588
20594
|
return o2;
|
|
20589
20595
|
}
|
|
20590
20596
|
function numKeys(data) {
|
|
@@ -20641,7 +20647,14 @@ var getParsedType = (data) => {
|
|
|
20641
20647
|
}
|
|
20642
20648
|
};
|
|
20643
20649
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
20644
|
-
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
20650
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
20651
|
+
"string",
|
|
20652
|
+
"number",
|
|
20653
|
+
"bigint",
|
|
20654
|
+
"boolean",
|
|
20655
|
+
"symbol",
|
|
20656
|
+
"undefined"
|
|
20657
|
+
]);
|
|
20645
20658
|
function escapeRegex(str) {
|
|
20646
20659
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
20647
20660
|
}
|
|
@@ -20810,6 +20823,9 @@ function safeExtend(schema, shape) {
|
|
|
20810
20823
|
return clone(schema, def);
|
|
20811
20824
|
}
|
|
20812
20825
|
function merge(a6, b7) {
|
|
20826
|
+
if (a6._zod.def.checks?.length) {
|
|
20827
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
20828
|
+
}
|
|
20813
20829
|
const def = mergeDefs(a6._zod.def, {
|
|
20814
20830
|
get shape() {
|
|
20815
20831
|
const _shape = { ...a6._zod.def.shape, ...b7._zod.def.shape };
|
|
@@ -20819,8 +20835,7 @@ function merge(a6, b7) {
|
|
|
20819
20835
|
get catchall() {
|
|
20820
20836
|
return b7._zod.def.catchall;
|
|
20821
20837
|
},
|
|
20822
|
-
checks: []
|
|
20823
|
-
// delete existing checks
|
|
20838
|
+
checks: b7._zod.def.checks ?? []
|
|
20824
20839
|
});
|
|
20825
20840
|
return clone(a6, def);
|
|
20826
20841
|
}
|
|
@@ -20903,10 +20918,20 @@ function aborted(x2, startIndex = 0) {
|
|
|
20903
20918
|
}
|
|
20904
20919
|
return false;
|
|
20905
20920
|
}
|
|
20921
|
+
function explicitlyAborted(x2, startIndex = 0) {
|
|
20922
|
+
if (x2.aborted === true)
|
|
20923
|
+
return true;
|
|
20924
|
+
for (let i2 = startIndex; i2 < x2.issues.length; i2++) {
|
|
20925
|
+
if (x2.issues[i2]?.continue === false) {
|
|
20926
|
+
return true;
|
|
20927
|
+
}
|
|
20928
|
+
}
|
|
20929
|
+
return false;
|
|
20930
|
+
}
|
|
20906
20931
|
function prefixIssues(path, issues) {
|
|
20907
20932
|
return issues.map((iss) => {
|
|
20908
|
-
var
|
|
20909
|
-
(
|
|
20933
|
+
var _a3;
|
|
20934
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
20910
20935
|
iss.path.unshift(path);
|
|
20911
20936
|
return iss;
|
|
20912
20937
|
});
|
|
@@ -20915,17 +20940,14 @@ function unwrapMessage(message) {
|
|
|
20915
20940
|
return typeof message === "string" ? message : message?.message;
|
|
20916
20941
|
}
|
|
20917
20942
|
function finalizeIssue(iss, ctx2, config2) {
|
|
20918
|
-
const
|
|
20919
|
-
|
|
20920
|
-
|
|
20921
|
-
|
|
20922
|
-
|
|
20923
|
-
|
|
20924
|
-
delete full.continue;
|
|
20925
|
-
if (!ctx2?.reportInput) {
|
|
20926
|
-
delete full.input;
|
|
20943
|
+
const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx2?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
|
|
20944
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
20945
|
+
rest.path ?? (rest.path = []);
|
|
20946
|
+
rest.message = message;
|
|
20947
|
+
if (ctx2?.reportInput) {
|
|
20948
|
+
rest.input = _input;
|
|
20927
20949
|
}
|
|
20928
|
-
return
|
|
20950
|
+
return rest;
|
|
20929
20951
|
}
|
|
20930
20952
|
function getSizableOrigin(input) {
|
|
20931
20953
|
if (input instanceof Set)
|
|
@@ -21042,10 +21064,10 @@ var initializer = (inst, def) => {
|
|
|
21042
21064
|
};
|
|
21043
21065
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
21044
21066
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
21045
|
-
function flattenError(
|
|
21067
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
21046
21068
|
const fieldErrors = {};
|
|
21047
21069
|
const formErrors = [];
|
|
21048
|
-
for (const sub of
|
|
21070
|
+
for (const sub of error51.issues) {
|
|
21049
21071
|
if (sub.path.length > 0) {
|
|
21050
21072
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
21051
21073
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -21055,50 +21077,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
|
|
|
21055
21077
|
}
|
|
21056
21078
|
return { formErrors, fieldErrors };
|
|
21057
21079
|
}
|
|
21058
|
-
function formatError(
|
|
21080
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
21059
21081
|
const fieldErrors = { _errors: [] };
|
|
21060
|
-
const processError = (
|
|
21061
|
-
for (const issue2 of
|
|
21082
|
+
const processError = (error52, path = []) => {
|
|
21083
|
+
for (const issue2 of error52.issues) {
|
|
21062
21084
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
21063
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
21085
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
21064
21086
|
} else if (issue2.code === "invalid_key") {
|
|
21065
|
-
processError({ issues: issue2.issues });
|
|
21087
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
21066
21088
|
} else if (issue2.code === "invalid_element") {
|
|
21067
|
-
processError({ issues: issue2.issues });
|
|
21068
|
-
} else if (issue2.path.length === 0) {
|
|
21069
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
21089
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
21070
21090
|
} else {
|
|
21071
|
-
|
|
21072
|
-
|
|
21073
|
-
|
|
21074
|
-
|
|
21075
|
-
|
|
21076
|
-
|
|
21077
|
-
|
|
21078
|
-
|
|
21079
|
-
|
|
21080
|
-
|
|
21091
|
+
const fullpath = [...path, ...issue2.path];
|
|
21092
|
+
if (fullpath.length === 0) {
|
|
21093
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
21094
|
+
} else {
|
|
21095
|
+
let curr = fieldErrors;
|
|
21096
|
+
let i2 = 0;
|
|
21097
|
+
while (i2 < fullpath.length) {
|
|
21098
|
+
const el = fullpath[i2];
|
|
21099
|
+
const terminal = i2 === fullpath.length - 1;
|
|
21100
|
+
if (!terminal) {
|
|
21101
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
21102
|
+
} else {
|
|
21103
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
21104
|
+
curr[el]._errors.push(mapper(issue2));
|
|
21105
|
+
}
|
|
21106
|
+
curr = curr[el];
|
|
21107
|
+
i2++;
|
|
21081
21108
|
}
|
|
21082
|
-
curr = curr[el];
|
|
21083
|
-
i2++;
|
|
21084
21109
|
}
|
|
21085
21110
|
}
|
|
21086
21111
|
}
|
|
21087
21112
|
};
|
|
21088
|
-
processError(
|
|
21113
|
+
processError(error51);
|
|
21089
21114
|
return fieldErrors;
|
|
21090
21115
|
}
|
|
21091
|
-
function treeifyError(
|
|
21116
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
21092
21117
|
const result = { errors: [] };
|
|
21093
|
-
const processError = (
|
|
21094
|
-
var
|
|
21095
|
-
for (const issue2 of
|
|
21118
|
+
const processError = (error52, path = []) => {
|
|
21119
|
+
var _a3, _b;
|
|
21120
|
+
for (const issue2 of error52.issues) {
|
|
21096
21121
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
21097
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
21122
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
21098
21123
|
} else if (issue2.code === "invalid_key") {
|
|
21099
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
21124
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
21100
21125
|
} else if (issue2.code === "invalid_element") {
|
|
21101
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
21126
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
21102
21127
|
} else {
|
|
21103
21128
|
const fullpath = [...path, ...issue2.path];
|
|
21104
21129
|
if (fullpath.length === 0) {
|
|
@@ -21112,7 +21137,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
21112
21137
|
const terminal = i2 === fullpath.length - 1;
|
|
21113
21138
|
if (typeof el === "string") {
|
|
21114
21139
|
curr.properties ?? (curr.properties = {});
|
|
21115
|
-
(
|
|
21140
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
21116
21141
|
curr = curr.properties[el];
|
|
21117
21142
|
} else {
|
|
21118
21143
|
curr.items ?? (curr.items = []);
|
|
@@ -21127,7 +21152,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
21127
21152
|
}
|
|
21128
21153
|
}
|
|
21129
21154
|
};
|
|
21130
|
-
processError(
|
|
21155
|
+
processError(error51);
|
|
21131
21156
|
return result;
|
|
21132
21157
|
}
|
|
21133
21158
|
function toDotPath(_path) {
|
|
@@ -21148,9 +21173,9 @@ function toDotPath(_path) {
|
|
|
21148
21173
|
}
|
|
21149
21174
|
return segs.join("");
|
|
21150
21175
|
}
|
|
21151
|
-
function prettifyError(
|
|
21176
|
+
function prettifyError(error51) {
|
|
21152
21177
|
const lines = [];
|
|
21153
|
-
const issues = [...
|
|
21178
|
+
const issues = [...error51.issues].sort((a6, b7) => (a6.path ?? []).length - (b7.path ?? []).length);
|
|
21154
21179
|
for (const issue2 of issues) {
|
|
21155
21180
|
lines.push(`\u2716 ${issue2.message}`);
|
|
21156
21181
|
if (issue2.path?.length)
|
|
@@ -21161,7 +21186,7 @@ function prettifyError(error48) {
|
|
|
21161
21186
|
|
|
21162
21187
|
// node_modules/zod/v4/core/parse.js
|
|
21163
21188
|
var _parse = (_Err) => (schema, value, _ctx2, _params) => {
|
|
21164
|
-
const ctx2 = _ctx2 ?
|
|
21189
|
+
const ctx2 = _ctx2 ? { ..._ctx2, async: false } : { async: false };
|
|
21165
21190
|
const result = schema._zod.run({ value, issues: [] }, ctx2);
|
|
21166
21191
|
if (result instanceof Promise) {
|
|
21167
21192
|
throw new $ZodAsyncError();
|
|
@@ -21175,7 +21200,7 @@ var _parse = (_Err) => (schema, value, _ctx2, _params) => {
|
|
|
21175
21200
|
};
|
|
21176
21201
|
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
21177
21202
|
var _parseAsync = (_Err) => async (schema, value, _ctx2, params) => {
|
|
21178
|
-
const ctx2 = _ctx2 ?
|
|
21203
|
+
const ctx2 = _ctx2 ? { ..._ctx2, async: true } : { async: true };
|
|
21179
21204
|
let result = schema._zod.run({ value, issues: [] }, ctx2);
|
|
21180
21205
|
if (result instanceof Promise)
|
|
21181
21206
|
result = await result;
|
|
@@ -21200,7 +21225,7 @@ var _safeParse = (_Err) => (schema, value, _ctx2) => {
|
|
|
21200
21225
|
};
|
|
21201
21226
|
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
21202
21227
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx2) => {
|
|
21203
|
-
const ctx2 = _ctx2 ?
|
|
21228
|
+
const ctx2 = _ctx2 ? { ..._ctx2, async: true } : { async: true };
|
|
21204
21229
|
let result = schema._zod.run({ value, issues: [] }, ctx2);
|
|
21205
21230
|
if (result instanceof Promise)
|
|
21206
21231
|
result = await result;
|
|
@@ -21211,7 +21236,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx2) => {
|
|
|
21211
21236
|
};
|
|
21212
21237
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
21213
21238
|
var _encode = (_Err) => (schema, value, _ctx2) => {
|
|
21214
|
-
const ctx2 = _ctx2 ?
|
|
21239
|
+
const ctx2 = _ctx2 ? { ..._ctx2, direction: "backward" } : { direction: "backward" };
|
|
21215
21240
|
return _parse(_Err)(schema, value, ctx2);
|
|
21216
21241
|
};
|
|
21217
21242
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -21220,7 +21245,7 @@ var _decode = (_Err) => (schema, value, _ctx2) => {
|
|
|
21220
21245
|
};
|
|
21221
21246
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
21222
21247
|
var _encodeAsync = (_Err) => async (schema, value, _ctx2) => {
|
|
21223
|
-
const ctx2 = _ctx2 ?
|
|
21248
|
+
const ctx2 = _ctx2 ? { ..._ctx2, direction: "backward" } : { direction: "backward" };
|
|
21224
21249
|
return _parseAsync(_Err)(schema, value, ctx2);
|
|
21225
21250
|
};
|
|
21226
21251
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -21229,7 +21254,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx2) => {
|
|
|
21229
21254
|
};
|
|
21230
21255
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
21231
21256
|
var _safeEncode = (_Err) => (schema, value, _ctx2) => {
|
|
21232
|
-
const ctx2 = _ctx2 ?
|
|
21257
|
+
const ctx2 = _ctx2 ? { ..._ctx2, direction: "backward" } : { direction: "backward" };
|
|
21233
21258
|
return _safeParse(_Err)(schema, value, ctx2);
|
|
21234
21259
|
};
|
|
21235
21260
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -21238,7 +21263,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx2) => {
|
|
|
21238
21263
|
};
|
|
21239
21264
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
21240
21265
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx2) => {
|
|
21241
|
-
const ctx2 = _ctx2 ?
|
|
21266
|
+
const ctx2 = _ctx2 ? { ..._ctx2, direction: "backward" } : { direction: "backward" };
|
|
21242
21267
|
return _safeParseAsync(_Err)(schema, value, ctx2);
|
|
21243
21268
|
};
|
|
21244
21269
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -21271,6 +21296,7 @@ __export(regexes_exports, {
|
|
|
21271
21296
|
hex: () => hex,
|
|
21272
21297
|
hostname: () => hostname,
|
|
21273
21298
|
html5Email: () => html5Email,
|
|
21299
|
+
httpProtocol: () => httpProtocol,
|
|
21274
21300
|
idnEmail: () => idnEmail,
|
|
21275
21301
|
integer: () => integer,
|
|
21276
21302
|
ipv4: () => ipv4,
|
|
@@ -21309,7 +21335,7 @@ __export(regexes_exports, {
|
|
|
21309
21335
|
uuid7: () => uuid7,
|
|
21310
21336
|
xid: () => xid
|
|
21311
21337
|
});
|
|
21312
|
-
var cuid = /^[cC][
|
|
21338
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
21313
21339
|
var cuid2 = /^[0-9a-z]+$/;
|
|
21314
21340
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
21315
21341
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -21348,6 +21374,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
|
|
|
21348
21374
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
21349
21375
|
var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
|
|
21350
21376
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
21377
|
+
var httpProtocol = /^https?$/;
|
|
21351
21378
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
21352
21379
|
var dateSource = `(?:(?:\\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])))`;
|
|
21353
21380
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -21406,10 +21433,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
21406
21433
|
|
|
21407
21434
|
// node_modules/zod/v4/core/checks.js
|
|
21408
21435
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
21409
|
-
var
|
|
21436
|
+
var _a3;
|
|
21410
21437
|
inst._zod ?? (inst._zod = {});
|
|
21411
21438
|
inst._zod.def = def;
|
|
21412
|
-
(
|
|
21439
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
21413
21440
|
});
|
|
21414
21441
|
var numericOriginMap = {
|
|
21415
21442
|
number: "number",
|
|
@@ -21475,8 +21502,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
21475
21502
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
21476
21503
|
$ZodCheck.init(inst, def);
|
|
21477
21504
|
inst._zod.onattach.push((inst2) => {
|
|
21478
|
-
var
|
|
21479
|
-
(
|
|
21505
|
+
var _a3;
|
|
21506
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
21480
21507
|
});
|
|
21481
21508
|
inst._zod.check = (payload) => {
|
|
21482
21509
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -21609,9 +21636,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
21609
21636
|
};
|
|
21610
21637
|
});
|
|
21611
21638
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
21612
|
-
var
|
|
21639
|
+
var _a3;
|
|
21613
21640
|
$ZodCheck.init(inst, def);
|
|
21614
|
-
(
|
|
21641
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
21615
21642
|
const val = payload.value;
|
|
21616
21643
|
return !nullish(val) && val.size !== void 0;
|
|
21617
21644
|
});
|
|
@@ -21637,9 +21664,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
21637
21664
|
};
|
|
21638
21665
|
});
|
|
21639
21666
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
21640
|
-
var
|
|
21667
|
+
var _a3;
|
|
21641
21668
|
$ZodCheck.init(inst, def);
|
|
21642
|
-
(
|
|
21669
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
21643
21670
|
const val = payload.value;
|
|
21644
21671
|
return !nullish(val) && val.size !== void 0;
|
|
21645
21672
|
});
|
|
@@ -21665,9 +21692,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
21665
21692
|
};
|
|
21666
21693
|
});
|
|
21667
21694
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
21668
|
-
var
|
|
21695
|
+
var _a3;
|
|
21669
21696
|
$ZodCheck.init(inst, def);
|
|
21670
|
-
(
|
|
21697
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
21671
21698
|
const val = payload.value;
|
|
21672
21699
|
return !nullish(val) && val.size !== void 0;
|
|
21673
21700
|
});
|
|
@@ -21695,9 +21722,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
21695
21722
|
};
|
|
21696
21723
|
});
|
|
21697
21724
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
21698
|
-
var
|
|
21725
|
+
var _a3;
|
|
21699
21726
|
$ZodCheck.init(inst, def);
|
|
21700
|
-
(
|
|
21727
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
21701
21728
|
const val = payload.value;
|
|
21702
21729
|
return !nullish(val) && val.length !== void 0;
|
|
21703
21730
|
});
|
|
@@ -21724,9 +21751,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
21724
21751
|
};
|
|
21725
21752
|
});
|
|
21726
21753
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
21727
|
-
var
|
|
21754
|
+
var _a3;
|
|
21728
21755
|
$ZodCheck.init(inst, def);
|
|
21729
|
-
(
|
|
21756
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
21730
21757
|
const val = payload.value;
|
|
21731
21758
|
return !nullish(val) && val.length !== void 0;
|
|
21732
21759
|
});
|
|
@@ -21753,9 +21780,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
21753
21780
|
};
|
|
21754
21781
|
});
|
|
21755
21782
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
21756
|
-
var
|
|
21783
|
+
var _a3;
|
|
21757
21784
|
$ZodCheck.init(inst, def);
|
|
21758
|
-
(
|
|
21785
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
21759
21786
|
const val = payload.value;
|
|
21760
21787
|
return !nullish(val) && val.length !== void 0;
|
|
21761
21788
|
});
|
|
@@ -21784,7 +21811,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
21784
21811
|
};
|
|
21785
21812
|
});
|
|
21786
21813
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
21787
|
-
var
|
|
21814
|
+
var _a3, _b;
|
|
21788
21815
|
$ZodCheck.init(inst, def);
|
|
21789
21816
|
inst._zod.onattach.push((inst2) => {
|
|
21790
21817
|
const bag = inst2._zod.bag;
|
|
@@ -21795,7 +21822,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
21795
21822
|
}
|
|
21796
21823
|
});
|
|
21797
21824
|
if (def.pattern)
|
|
21798
|
-
(
|
|
21825
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
21799
21826
|
def.pattern.lastIndex = 0;
|
|
21800
21827
|
if (def.pattern.test(payload.value))
|
|
21801
21828
|
return;
|
|
@@ -21991,13 +22018,13 @@ var Doc = class {
|
|
|
21991
22018
|
// node_modules/zod/v4/core/versions.js
|
|
21992
22019
|
var version = {
|
|
21993
22020
|
major: 4,
|
|
21994
|
-
minor:
|
|
21995
|
-
patch:
|
|
22021
|
+
minor: 4,
|
|
22022
|
+
patch: 3
|
|
21996
22023
|
};
|
|
21997
22024
|
|
|
21998
22025
|
// node_modules/zod/v4/core/schemas.js
|
|
21999
22026
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
22000
|
-
var
|
|
22027
|
+
var _a3;
|
|
22001
22028
|
inst ?? (inst = {});
|
|
22002
22029
|
inst._zod.def = def;
|
|
22003
22030
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -22012,7 +22039,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
22012
22039
|
}
|
|
22013
22040
|
}
|
|
22014
22041
|
if (checks.length === 0) {
|
|
22015
|
-
(
|
|
22042
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
22016
22043
|
inst._zod.deferred?.push(() => {
|
|
22017
22044
|
inst._zod.run = inst._zod.parse;
|
|
22018
22045
|
});
|
|
@@ -22022,6 +22049,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
22022
22049
|
let asyncResult;
|
|
22023
22050
|
for (const ch of checks2) {
|
|
22024
22051
|
if (ch._zod.def.when) {
|
|
22052
|
+
if (explicitlyAborted(payload))
|
|
22053
|
+
continue;
|
|
22025
22054
|
const shouldRun = ch._zod.def.when(payload);
|
|
22026
22055
|
if (!shouldRun)
|
|
22027
22056
|
continue;
|
|
@@ -22162,6 +22191,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
22162
22191
|
inst._zod.check = (payload) => {
|
|
22163
22192
|
try {
|
|
22164
22193
|
const trimmed = payload.value.trim();
|
|
22194
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
22195
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
22196
|
+
payload.issues.push({
|
|
22197
|
+
code: "invalid_format",
|
|
22198
|
+
format: "url",
|
|
22199
|
+
note: "Invalid URL format",
|
|
22200
|
+
input: payload.value,
|
|
22201
|
+
inst,
|
|
22202
|
+
continue: !def.abort
|
|
22203
|
+
});
|
|
22204
|
+
return;
|
|
22205
|
+
}
|
|
22206
|
+
}
|
|
22165
22207
|
const url2 = new URL(trimmed);
|
|
22166
22208
|
if (def.hostname) {
|
|
22167
22209
|
def.hostname.lastIndex = 0;
|
|
@@ -22315,6 +22357,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
22315
22357
|
function isValidBase64(data) {
|
|
22316
22358
|
if (data === "")
|
|
22317
22359
|
return true;
|
|
22360
|
+
if (/\s/.test(data))
|
|
22361
|
+
return false;
|
|
22318
22362
|
if (data.length % 4 !== 0)
|
|
22319
22363
|
return false;
|
|
22320
22364
|
try {
|
|
@@ -22507,8 +22551,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
22507
22551
|
$ZodType.init(inst, def);
|
|
22508
22552
|
inst._zod.pattern = _undefined;
|
|
22509
22553
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
22510
|
-
inst._zod.optin = "optional";
|
|
22511
|
-
inst._zod.optout = "optional";
|
|
22512
22554
|
inst._zod.parse = (payload, _ctx2) => {
|
|
22513
22555
|
const input = payload.value;
|
|
22514
22556
|
if (typeof input === "undefined")
|
|
@@ -22637,15 +22679,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
22637
22679
|
return payload;
|
|
22638
22680
|
};
|
|
22639
22681
|
});
|
|
22640
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
22682
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
22683
|
+
const isPresent = key in input;
|
|
22641
22684
|
if (result.issues.length) {
|
|
22642
|
-
if (isOptionalOut && !
|
|
22685
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
22643
22686
|
return;
|
|
22644
22687
|
}
|
|
22645
22688
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
22646
22689
|
}
|
|
22690
|
+
if (!isPresent && !isOptionalIn) {
|
|
22691
|
+
if (!result.issues.length) {
|
|
22692
|
+
final.issues.push({
|
|
22693
|
+
code: "invalid_type",
|
|
22694
|
+
expected: "nonoptional",
|
|
22695
|
+
input: void 0,
|
|
22696
|
+
path: [key]
|
|
22697
|
+
});
|
|
22698
|
+
}
|
|
22699
|
+
return;
|
|
22700
|
+
}
|
|
22647
22701
|
if (result.value === void 0) {
|
|
22648
|
-
if (
|
|
22702
|
+
if (isPresent) {
|
|
22649
22703
|
final.value[key] = void 0;
|
|
22650
22704
|
}
|
|
22651
22705
|
} else {
|
|
@@ -22673,8 +22727,11 @@ function handleCatchall(proms, input, payload, ctx2, def, inst) {
|
|
|
22673
22727
|
const keySet = def.keySet;
|
|
22674
22728
|
const _catchall = def.catchall._zod;
|
|
22675
22729
|
const t = _catchall.def.type;
|
|
22730
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
22676
22731
|
const isOptionalOut = _catchall.optout === "optional";
|
|
22677
22732
|
for (const key in input) {
|
|
22733
|
+
if (key === "__proto__")
|
|
22734
|
+
continue;
|
|
22678
22735
|
if (keySet.has(key))
|
|
22679
22736
|
continue;
|
|
22680
22737
|
if (t === "never") {
|
|
@@ -22683,9 +22740,9 @@ function handleCatchall(proms, input, payload, ctx2, def, inst) {
|
|
|
22683
22740
|
}
|
|
22684
22741
|
const r6 = _catchall.run({ value: input[key], issues: [] }, ctx2);
|
|
22685
22742
|
if (r6 instanceof Promise) {
|
|
22686
|
-
proms.push(r6.then((r10) => handlePropertyResult(r10, payload, key, input, isOptionalOut)));
|
|
22743
|
+
proms.push(r6.then((r10) => handlePropertyResult(r10, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
22687
22744
|
} else {
|
|
22688
|
-
handlePropertyResult(r6, payload, key, input, isOptionalOut);
|
|
22745
|
+
handlePropertyResult(r6, payload, key, input, isOptionalIn, isOptionalOut);
|
|
22689
22746
|
}
|
|
22690
22747
|
}
|
|
22691
22748
|
if (unrecognized.length) {
|
|
@@ -22751,12 +22808,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
22751
22808
|
const shape = value.shape;
|
|
22752
22809
|
for (const key of value.keys) {
|
|
22753
22810
|
const el = shape[key];
|
|
22811
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
22754
22812
|
const isOptionalOut = el._zod.optout === "optional";
|
|
22755
22813
|
const r6 = el._zod.run({ value: input[key], issues: [] }, ctx2);
|
|
22756
22814
|
if (r6 instanceof Promise) {
|
|
22757
|
-
proms.push(r6.then((r10) => handlePropertyResult(r10, payload, key, input, isOptionalOut)));
|
|
22815
|
+
proms.push(r6.then((r10) => handlePropertyResult(r10, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
22758
22816
|
} else {
|
|
22759
|
-
handlePropertyResult(r6, payload, key, input, isOptionalOut);
|
|
22817
|
+
handlePropertyResult(r6, payload, key, input, isOptionalIn, isOptionalOut);
|
|
22760
22818
|
}
|
|
22761
22819
|
}
|
|
22762
22820
|
if (!catchall) {
|
|
@@ -22787,9 +22845,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
22787
22845
|
const id = ids[key];
|
|
22788
22846
|
const k2 = esc(key);
|
|
22789
22847
|
const schema = shape[key];
|
|
22848
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
22790
22849
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
22791
22850
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
22792
|
-
if (isOptionalOut) {
|
|
22851
|
+
if (isOptionalIn && isOptionalOut) {
|
|
22793
22852
|
doc.write(`
|
|
22794
22853
|
if (${id}.issues.length) {
|
|
22795
22854
|
if (${k2} in input) {
|
|
@@ -22808,6 +22867,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
22808
22867
|
newResult[${k2}] = ${id}.value;
|
|
22809
22868
|
}
|
|
22810
22869
|
|
|
22870
|
+
`);
|
|
22871
|
+
} else if (!isOptionalIn) {
|
|
22872
|
+
doc.write(`
|
|
22873
|
+
const ${id}_present = ${k2} in input;
|
|
22874
|
+
if (${id}.issues.length) {
|
|
22875
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
22876
|
+
...iss,
|
|
22877
|
+
path: iss.path ? [${k2}, ...iss.path] : [${k2}]
|
|
22878
|
+
})));
|
|
22879
|
+
}
|
|
22880
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
22881
|
+
payload.issues.push({
|
|
22882
|
+
code: "invalid_type",
|
|
22883
|
+
expected: "nonoptional",
|
|
22884
|
+
input: undefined,
|
|
22885
|
+
path: [${k2}]
|
|
22886
|
+
});
|
|
22887
|
+
}
|
|
22888
|
+
|
|
22889
|
+
if (${id}_present) {
|
|
22890
|
+
if (${id}.value === undefined) {
|
|
22891
|
+
newResult[${k2}] = undefined;
|
|
22892
|
+
} else {
|
|
22893
|
+
newResult[${k2}] = ${id}.value;
|
|
22894
|
+
}
|
|
22895
|
+
}
|
|
22896
|
+
|
|
22811
22897
|
`);
|
|
22812
22898
|
} else {
|
|
22813
22899
|
doc.write(`
|
|
@@ -22901,10 +22987,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
22901
22987
|
}
|
|
22902
22988
|
return void 0;
|
|
22903
22989
|
});
|
|
22904
|
-
const
|
|
22905
|
-
const first = def.options[0]._zod.run;
|
|
22990
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
22906
22991
|
inst._zod.parse = (payload, ctx2) => {
|
|
22907
|
-
if (
|
|
22992
|
+
if (first) {
|
|
22908
22993
|
return first(payload, ctx2);
|
|
22909
22994
|
}
|
|
22910
22995
|
let async = false;
|
|
@@ -22957,10 +23042,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx2) {
|
|
|
22957
23042
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
22958
23043
|
$ZodUnion.init(inst, def);
|
|
22959
23044
|
def.inclusive = false;
|
|
22960
|
-
const
|
|
22961
|
-
const first = def.options[0]._zod.run;
|
|
23045
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
22962
23046
|
inst._zod.parse = (payload, ctx2) => {
|
|
22963
|
-
if (
|
|
23047
|
+
if (first) {
|
|
22964
23048
|
return first(payload, ctx2);
|
|
22965
23049
|
}
|
|
22966
23050
|
let async = false;
|
|
@@ -23035,7 +23119,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
23035
23119
|
if (opt) {
|
|
23036
23120
|
return opt._zod.run(payload, ctx2);
|
|
23037
23121
|
}
|
|
23038
|
-
if (def.unionFallback) {
|
|
23122
|
+
if (def.unionFallback || ctx2.direction === "backward") {
|
|
23039
23123
|
return _super(payload, ctx2);
|
|
23040
23124
|
}
|
|
23041
23125
|
payload.issues.push({
|
|
@@ -23043,6 +23127,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
23043
23127
|
errors: [],
|
|
23044
23128
|
note: "No matching discriminator",
|
|
23045
23129
|
discriminator: def.discriminator,
|
|
23130
|
+
options: Array.from(disc.value.keys()),
|
|
23046
23131
|
input,
|
|
23047
23132
|
path: [def.discriminator],
|
|
23048
23133
|
inst
|
|
@@ -23164,64 +23249,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
23164
23249
|
}
|
|
23165
23250
|
payload.value = [];
|
|
23166
23251
|
const proms = [];
|
|
23167
|
-
const
|
|
23168
|
-
const
|
|
23252
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
23253
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
23169
23254
|
if (!def.rest) {
|
|
23170
|
-
|
|
23171
|
-
const tooSmall = input.length < optStart - 1;
|
|
23172
|
-
if (tooBig || tooSmall) {
|
|
23255
|
+
if (input.length < optinStart) {
|
|
23173
23256
|
payload.issues.push({
|
|
23174
|
-
|
|
23257
|
+
code: "too_small",
|
|
23258
|
+
minimum: optinStart,
|
|
23259
|
+
inclusive: true,
|
|
23175
23260
|
input,
|
|
23176
23261
|
inst,
|
|
23177
23262
|
origin: "array"
|
|
23178
23263
|
});
|
|
23179
23264
|
return payload;
|
|
23180
23265
|
}
|
|
23181
|
-
|
|
23182
|
-
|
|
23183
|
-
|
|
23184
|
-
|
|
23185
|
-
|
|
23186
|
-
|
|
23187
|
-
|
|
23266
|
+
if (input.length > items.length) {
|
|
23267
|
+
payload.issues.push({
|
|
23268
|
+
code: "too_big",
|
|
23269
|
+
maximum: items.length,
|
|
23270
|
+
inclusive: true,
|
|
23271
|
+
input,
|
|
23272
|
+
inst,
|
|
23273
|
+
origin: "array"
|
|
23274
|
+
});
|
|
23188
23275
|
}
|
|
23189
|
-
|
|
23190
|
-
|
|
23191
|
-
|
|
23192
|
-
}, ctx2);
|
|
23193
|
-
if (
|
|
23194
|
-
proms.push(
|
|
23276
|
+
}
|
|
23277
|
+
const itemResults = new Array(items.length);
|
|
23278
|
+
for (let i2 = 0; i2 < items.length; i2++) {
|
|
23279
|
+
const r6 = items[i2]._zod.run({ value: input[i2], issues: [] }, ctx2);
|
|
23280
|
+
if (r6 instanceof Promise) {
|
|
23281
|
+
proms.push(r6.then((rr) => {
|
|
23282
|
+
itemResults[i2] = rr;
|
|
23283
|
+
}));
|
|
23195
23284
|
} else {
|
|
23196
|
-
|
|
23285
|
+
itemResults[i2] = r6;
|
|
23197
23286
|
}
|
|
23198
23287
|
}
|
|
23199
23288
|
if (def.rest) {
|
|
23289
|
+
let i2 = items.length - 1;
|
|
23200
23290
|
const rest = input.slice(items.length);
|
|
23201
23291
|
for (const el of rest) {
|
|
23202
23292
|
i2++;
|
|
23203
|
-
const result = def.rest._zod.run({
|
|
23204
|
-
value: el,
|
|
23205
|
-
issues: []
|
|
23206
|
-
}, ctx2);
|
|
23293
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx2);
|
|
23207
23294
|
if (result instanceof Promise) {
|
|
23208
|
-
proms.push(result.then((
|
|
23295
|
+
proms.push(result.then((r6) => handleTupleResult(r6, payload, i2)));
|
|
23209
23296
|
} else {
|
|
23210
23297
|
handleTupleResult(result, payload, i2);
|
|
23211
23298
|
}
|
|
23212
23299
|
}
|
|
23213
23300
|
}
|
|
23214
|
-
if (proms.length)
|
|
23215
|
-
return Promise.all(proms).then(() => payload);
|
|
23216
|
-
|
|
23301
|
+
if (proms.length) {
|
|
23302
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
23303
|
+
}
|
|
23304
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
23217
23305
|
};
|
|
23218
23306
|
});
|
|
23307
|
+
function getTupleOptStart(items, key) {
|
|
23308
|
+
for (let i2 = items.length - 1; i2 >= 0; i2--) {
|
|
23309
|
+
if (items[i2]._zod[key] !== "optional")
|
|
23310
|
+
return i2 + 1;
|
|
23311
|
+
}
|
|
23312
|
+
return 0;
|
|
23313
|
+
}
|
|
23219
23314
|
function handleTupleResult(result, final, index) {
|
|
23220
23315
|
if (result.issues.length) {
|
|
23221
23316
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
23222
23317
|
}
|
|
23223
23318
|
final.value[index] = result.value;
|
|
23224
23319
|
}
|
|
23320
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
23321
|
+
for (let i2 = 0; i2 < items.length; i2++) {
|
|
23322
|
+
const r6 = itemResults[i2];
|
|
23323
|
+
const isPresent = i2 < input.length;
|
|
23324
|
+
if (r6.issues.length) {
|
|
23325
|
+
if (!isPresent && i2 >= optoutStart) {
|
|
23326
|
+
final.value.length = i2;
|
|
23327
|
+
break;
|
|
23328
|
+
}
|
|
23329
|
+
final.issues.push(...prefixIssues(i2, r6.issues));
|
|
23330
|
+
}
|
|
23331
|
+
final.value[i2] = r6.value;
|
|
23332
|
+
}
|
|
23333
|
+
for (let i2 = final.value.length - 1; i2 >= input.length; i2--) {
|
|
23334
|
+
if (items[i2]._zod.optout === "optional" && final.value[i2] === void 0) {
|
|
23335
|
+
final.value.length = i2;
|
|
23336
|
+
} else {
|
|
23337
|
+
break;
|
|
23338
|
+
}
|
|
23339
|
+
}
|
|
23340
|
+
return final;
|
|
23341
|
+
}
|
|
23225
23342
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
23226
23343
|
$ZodType.init(inst, def);
|
|
23227
23344
|
inst._zod.parse = (payload, ctx2) => {
|
|
@@ -23243,19 +23360,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
23243
23360
|
for (const key of values) {
|
|
23244
23361
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
23245
23362
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
23363
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx2);
|
|
23364
|
+
if (keyResult instanceof Promise) {
|
|
23365
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
23366
|
+
}
|
|
23367
|
+
if (keyResult.issues.length) {
|
|
23368
|
+
payload.issues.push({
|
|
23369
|
+
code: "invalid_key",
|
|
23370
|
+
origin: "record",
|
|
23371
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx2, config())),
|
|
23372
|
+
input: key,
|
|
23373
|
+
path: [key],
|
|
23374
|
+
inst
|
|
23375
|
+
});
|
|
23376
|
+
continue;
|
|
23377
|
+
}
|
|
23378
|
+
const outKey = keyResult.value;
|
|
23246
23379
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx2);
|
|
23247
23380
|
if (result instanceof Promise) {
|
|
23248
23381
|
proms.push(result.then((result2) => {
|
|
23249
23382
|
if (result2.issues.length) {
|
|
23250
23383
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
23251
23384
|
}
|
|
23252
|
-
payload.value[
|
|
23385
|
+
payload.value[outKey] = result2.value;
|
|
23253
23386
|
}));
|
|
23254
23387
|
} else {
|
|
23255
23388
|
if (result.issues.length) {
|
|
23256
23389
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
23257
23390
|
}
|
|
23258
|
-
payload.value[
|
|
23391
|
+
payload.value[outKey] = result.value;
|
|
23259
23392
|
}
|
|
23260
23393
|
}
|
|
23261
23394
|
}
|
|
@@ -23279,6 +23412,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
23279
23412
|
for (const key of Reflect.ownKeys(input)) {
|
|
23280
23413
|
if (key === "__proto__")
|
|
23281
23414
|
continue;
|
|
23415
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
23416
|
+
continue;
|
|
23282
23417
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx2);
|
|
23283
23418
|
if (keyResult instanceof Promise) {
|
|
23284
23419
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -23483,6 +23618,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
|
23483
23618
|
});
|
|
23484
23619
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
23485
23620
|
$ZodType.init(inst, def);
|
|
23621
|
+
inst._zod.optin = "optional";
|
|
23486
23622
|
inst._zod.parse = (payload, ctx2) => {
|
|
23487
23623
|
if (ctx2.direction === "backward") {
|
|
23488
23624
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -23492,6 +23628,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
23492
23628
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
23493
23629
|
return output.then((output2) => {
|
|
23494
23630
|
payload.value = output2;
|
|
23631
|
+
payload.fallback = true;
|
|
23495
23632
|
return payload;
|
|
23496
23633
|
});
|
|
23497
23634
|
}
|
|
@@ -23499,11 +23636,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
23499
23636
|
throw new $ZodAsyncError();
|
|
23500
23637
|
}
|
|
23501
23638
|
payload.value = _out;
|
|
23639
|
+
payload.fallback = true;
|
|
23502
23640
|
return payload;
|
|
23503
23641
|
};
|
|
23504
23642
|
});
|
|
23505
23643
|
function handleOptionalResult(result, input) {
|
|
23506
|
-
if (result.issues.length
|
|
23644
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
23507
23645
|
return { issues: [], value: void 0 };
|
|
23508
23646
|
}
|
|
23509
23647
|
return result;
|
|
@@ -23521,10 +23659,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
23521
23659
|
});
|
|
23522
23660
|
inst._zod.parse = (payload, ctx2) => {
|
|
23523
23661
|
if (def.innerType._zod.optin === "optional") {
|
|
23662
|
+
const input = payload.value;
|
|
23524
23663
|
const result = def.innerType._zod.run(payload, ctx2);
|
|
23525
23664
|
if (result instanceof Promise)
|
|
23526
|
-
return result.then((r6) => handleOptionalResult(r6,
|
|
23527
|
-
return handleOptionalResult(result,
|
|
23665
|
+
return result.then((r6) => handleOptionalResult(r6, input));
|
|
23666
|
+
return handleOptionalResult(result, input);
|
|
23528
23667
|
}
|
|
23529
23668
|
if (payload.value === void 0) {
|
|
23530
23669
|
return payload;
|
|
@@ -23640,7 +23779,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
23640
23779
|
});
|
|
23641
23780
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
23642
23781
|
$ZodType.init(inst, def);
|
|
23643
|
-
|
|
23782
|
+
inst._zod.optin = "optional";
|
|
23644
23783
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
23645
23784
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
23646
23785
|
inst._zod.parse = (payload, ctx2) => {
|
|
@@ -23660,6 +23799,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
23660
23799
|
input: payload.value
|
|
23661
23800
|
});
|
|
23662
23801
|
payload.issues = [];
|
|
23802
|
+
payload.fallback = true;
|
|
23663
23803
|
}
|
|
23664
23804
|
return payload;
|
|
23665
23805
|
});
|
|
@@ -23674,6 +23814,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
23674
23814
|
input: payload.value
|
|
23675
23815
|
});
|
|
23676
23816
|
payload.issues = [];
|
|
23817
|
+
payload.fallback = true;
|
|
23677
23818
|
}
|
|
23678
23819
|
return payload;
|
|
23679
23820
|
};
|
|
@@ -23719,7 +23860,7 @@ function handlePipeResult(left, next, ctx2) {
|
|
|
23719
23860
|
left.aborted = true;
|
|
23720
23861
|
return left;
|
|
23721
23862
|
}
|
|
23722
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx2);
|
|
23863
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx2);
|
|
23723
23864
|
}
|
|
23724
23865
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
23725
23866
|
$ZodType.init(inst, def);
|
|
@@ -23771,6 +23912,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx2) {
|
|
|
23771
23912
|
}
|
|
23772
23913
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx2);
|
|
23773
23914
|
}
|
|
23915
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
23916
|
+
$ZodPipe.init(inst, def);
|
|
23917
|
+
});
|
|
23774
23918
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
23775
23919
|
$ZodType.init(inst, def);
|
|
23776
23920
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -23922,7 +24066,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
|
23922
24066
|
});
|
|
23923
24067
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
23924
24068
|
$ZodType.init(inst, def);
|
|
23925
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
24069
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
24070
|
+
const d2 = def;
|
|
24071
|
+
if (!d2._cachedInner)
|
|
24072
|
+
d2._cachedInner = def.getter();
|
|
24073
|
+
return d2._cachedInner;
|
|
24074
|
+
});
|
|
23926
24075
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
23927
24076
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
23928
24077
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -23977,6 +24126,7 @@ __export(locales_exports, {
|
|
|
23977
24126
|
cs: () => cs_default,
|
|
23978
24127
|
da: () => da_default,
|
|
23979
24128
|
de: () => de_default,
|
|
24129
|
+
el: () => el_default,
|
|
23980
24130
|
en: () => en_default,
|
|
23981
24131
|
eo: () => eo_default,
|
|
23982
24132
|
es: () => es_default,
|
|
@@ -23985,6 +24135,7 @@ __export(locales_exports, {
|
|
|
23985
24135
|
fr: () => fr_default,
|
|
23986
24136
|
frCA: () => fr_CA_default,
|
|
23987
24137
|
he: () => he_default,
|
|
24138
|
+
hr: () => hr_default,
|
|
23988
24139
|
hu: () => hu_default,
|
|
23989
24140
|
hy: () => hy_default,
|
|
23990
24141
|
id: () => id_default,
|
|
@@ -24004,6 +24155,7 @@ __export(locales_exports, {
|
|
|
24004
24155
|
pl: () => pl_default,
|
|
24005
24156
|
ps: () => ps_default,
|
|
24006
24157
|
pt: () => pt_default,
|
|
24158
|
+
ro: () => ro_default,
|
|
24007
24159
|
ru: () => ru_default,
|
|
24008
24160
|
sl: () => sl_default,
|
|
24009
24161
|
sv: () => sv_default,
|
|
@@ -24957,8 +25109,118 @@ function de_default() {
|
|
|
24957
25109
|
};
|
|
24958
25110
|
}
|
|
24959
25111
|
|
|
24960
|
-
// node_modules/zod/v4/locales/
|
|
25112
|
+
// node_modules/zod/v4/locales/el.js
|
|
24961
25113
|
var error9 = () => {
|
|
25114
|
+
const Sizable = {
|
|
25115
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
25116
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
25117
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
25118
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
25119
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
25120
|
+
};
|
|
25121
|
+
function getSizing(origin) {
|
|
25122
|
+
return Sizable[origin] ?? null;
|
|
25123
|
+
}
|
|
25124
|
+
const FormatDictionary = {
|
|
25125
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
25126
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
25127
|
+
url: "URL",
|
|
25128
|
+
emoji: "emoji",
|
|
25129
|
+
uuid: "UUID",
|
|
25130
|
+
uuidv4: "UUIDv4",
|
|
25131
|
+
uuidv6: "UUIDv6",
|
|
25132
|
+
nanoid: "nanoid",
|
|
25133
|
+
guid: "GUID",
|
|
25134
|
+
cuid: "cuid",
|
|
25135
|
+
cuid2: "cuid2",
|
|
25136
|
+
ulid: "ULID",
|
|
25137
|
+
xid: "XID",
|
|
25138
|
+
ksuid: "KSUID",
|
|
25139
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
25140
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
25141
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
25142
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
25143
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
25144
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
25145
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
25146
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
25147
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
25148
|
+
base64: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",
|
|
25149
|
+
base64url: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",
|
|
25150
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
25151
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
25152
|
+
jwt: "JWT",
|
|
25153
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
25154
|
+
};
|
|
25155
|
+
const TypeDictionary = {
|
|
25156
|
+
nan: "NaN"
|
|
25157
|
+
};
|
|
25158
|
+
return (issue2) => {
|
|
25159
|
+
switch (issue2.code) {
|
|
25160
|
+
case "invalid_type": {
|
|
25161
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
25162
|
+
const receivedType = parsedType(issue2.input);
|
|
25163
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
25164
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
25165
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${issue2.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
|
|
25166
|
+
}
|
|
25167
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
|
|
25168
|
+
}
|
|
25169
|
+
case "invalid_value":
|
|
25170
|
+
if (issue2.values.length === 1)
|
|
25171
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${stringifyPrimitive(issue2.values[0])}`;
|
|
25172
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${joinValues(issue2.values, "|")}`;
|
|
25173
|
+
case "too_big": {
|
|
25174
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
25175
|
+
const sizing = getSizing(issue2.origin);
|
|
25176
|
+
if (sizing)
|
|
25177
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;
|
|
25178
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.maximum.toString()}`;
|
|
25179
|
+
}
|
|
25180
|
+
case "too_small": {
|
|
25181
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
25182
|
+
const sizing = getSizing(issue2.origin);
|
|
25183
|
+
if (sizing) {
|
|
25184
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
25185
|
+
}
|
|
25186
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.minimum.toString()}`;
|
|
25187
|
+
}
|
|
25188
|
+
case "invalid_format": {
|
|
25189
|
+
const _issue = issue2;
|
|
25190
|
+
if (_issue.format === "starts_with") {
|
|
25191
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`;
|
|
25192
|
+
}
|
|
25193
|
+
if (_issue.format === "ends_with")
|
|
25194
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${_issue.suffix}"`;
|
|
25195
|
+
if (_issue.format === "includes")
|
|
25196
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${_issue.includes}"`;
|
|
25197
|
+
if (_issue.format === "regex")
|
|
25198
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${_issue.pattern}`;
|
|
25199
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
25200
|
+
}
|
|
25201
|
+
case "not_multiple_of":
|
|
25202
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${issue2.divisor}`;
|
|
25203
|
+
case "unrecognized_keys":
|
|
25204
|
+
return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${issue2.keys.length > 1 ? "\u03B1" : "\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${issue2.keys.length > 1 ? "\u03B9\u03AC" : "\u03AF"}: ${joinValues(issue2.keys, ", ")}`;
|
|
25205
|
+
case "invalid_key":
|
|
25206
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
25207
|
+
case "invalid_union":
|
|
25208
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
25209
|
+
case "invalid_element":
|
|
25210
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
25211
|
+
default:
|
|
25212
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
25213
|
+
}
|
|
25214
|
+
};
|
|
25215
|
+
};
|
|
25216
|
+
function el_default() {
|
|
25217
|
+
return {
|
|
25218
|
+
localeError: error9()
|
|
25219
|
+
};
|
|
25220
|
+
}
|
|
25221
|
+
|
|
25222
|
+
// node_modules/zod/v4/locales/en.js
|
|
25223
|
+
var error10 = () => {
|
|
24962
25224
|
const Sizable = {
|
|
24963
25225
|
string: { unit: "characters", verb: "to have" },
|
|
24964
25226
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -25052,6 +25314,10 @@ var error9 = () => {
|
|
|
25052
25314
|
case "invalid_key":
|
|
25053
25315
|
return `Invalid key in ${issue2.origin}`;
|
|
25054
25316
|
case "invalid_union":
|
|
25317
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
25318
|
+
const opts = issue2.options.map((o2) => `'${o2}'`).join(" | ");
|
|
25319
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
25320
|
+
}
|
|
25055
25321
|
return "Invalid input";
|
|
25056
25322
|
case "invalid_element":
|
|
25057
25323
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -25062,12 +25328,12 @@ var error9 = () => {
|
|
|
25062
25328
|
};
|
|
25063
25329
|
function en_default() {
|
|
25064
25330
|
return {
|
|
25065
|
-
localeError:
|
|
25331
|
+
localeError: error10()
|
|
25066
25332
|
};
|
|
25067
25333
|
}
|
|
25068
25334
|
|
|
25069
25335
|
// node_modules/zod/v4/locales/eo.js
|
|
25070
|
-
var
|
|
25336
|
+
var error11 = () => {
|
|
25071
25337
|
const Sizable = {
|
|
25072
25338
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
25073
25339
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -25172,12 +25438,12 @@ var error10 = () => {
|
|
|
25172
25438
|
};
|
|
25173
25439
|
function eo_default() {
|
|
25174
25440
|
return {
|
|
25175
|
-
localeError:
|
|
25441
|
+
localeError: error11()
|
|
25176
25442
|
};
|
|
25177
25443
|
}
|
|
25178
25444
|
|
|
25179
25445
|
// node_modules/zod/v4/locales/es.js
|
|
25180
|
-
var
|
|
25446
|
+
var error12 = () => {
|
|
25181
25447
|
const Sizable = {
|
|
25182
25448
|
string: { unit: "caracteres", verb: "tener" },
|
|
25183
25449
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -25305,12 +25571,12 @@ var error11 = () => {
|
|
|
25305
25571
|
};
|
|
25306
25572
|
function es_default() {
|
|
25307
25573
|
return {
|
|
25308
|
-
localeError:
|
|
25574
|
+
localeError: error12()
|
|
25309
25575
|
};
|
|
25310
25576
|
}
|
|
25311
25577
|
|
|
25312
25578
|
// node_modules/zod/v4/locales/fa.js
|
|
25313
|
-
var
|
|
25579
|
+
var error13 = () => {
|
|
25314
25580
|
const Sizable = {
|
|
25315
25581
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
25316
25582
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -25420,12 +25686,12 @@ var error12 = () => {
|
|
|
25420
25686
|
};
|
|
25421
25687
|
function fa_default() {
|
|
25422
25688
|
return {
|
|
25423
|
-
localeError:
|
|
25689
|
+
localeError: error13()
|
|
25424
25690
|
};
|
|
25425
25691
|
}
|
|
25426
25692
|
|
|
25427
25693
|
// node_modules/zod/v4/locales/fi.js
|
|
25428
|
-
var
|
|
25694
|
+
var error14 = () => {
|
|
25429
25695
|
const Sizable = {
|
|
25430
25696
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
25431
25697
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -25533,12 +25799,12 @@ var error13 = () => {
|
|
|
25533
25799
|
};
|
|
25534
25800
|
function fi_default() {
|
|
25535
25801
|
return {
|
|
25536
|
-
localeError:
|
|
25802
|
+
localeError: error14()
|
|
25537
25803
|
};
|
|
25538
25804
|
}
|
|
25539
25805
|
|
|
25540
25806
|
// node_modules/zod/v4/locales/fr.js
|
|
25541
|
-
var
|
|
25807
|
+
var error15 = () => {
|
|
25542
25808
|
const Sizable = {
|
|
25543
25809
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
25544
25810
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -25579,9 +25845,27 @@ var error14 = () => {
|
|
|
25579
25845
|
template_literal: "entr\xE9e"
|
|
25580
25846
|
};
|
|
25581
25847
|
const TypeDictionary = {
|
|
25582
|
-
|
|
25848
|
+
string: "cha\xEEne",
|
|
25583
25849
|
number: "nombre",
|
|
25584
|
-
|
|
25850
|
+
int: "entier",
|
|
25851
|
+
boolean: "bool\xE9en",
|
|
25852
|
+
bigint: "grand entier",
|
|
25853
|
+
symbol: "symbole",
|
|
25854
|
+
undefined: "ind\xE9fini",
|
|
25855
|
+
null: "null",
|
|
25856
|
+
never: "jamais",
|
|
25857
|
+
void: "vide",
|
|
25858
|
+
date: "date",
|
|
25859
|
+
array: "tableau",
|
|
25860
|
+
object: "objet",
|
|
25861
|
+
tuple: "tuple",
|
|
25862
|
+
record: "enregistrement",
|
|
25863
|
+
map: "carte",
|
|
25864
|
+
set: "ensemble",
|
|
25865
|
+
file: "fichier",
|
|
25866
|
+
nonoptional: "non-optionnel",
|
|
25867
|
+
nan: "NaN",
|
|
25868
|
+
function: "fonction"
|
|
25585
25869
|
};
|
|
25586
25870
|
return (issue2) => {
|
|
25587
25871
|
switch (issue2.code) {
|
|
@@ -25602,16 +25886,15 @@ var error14 = () => {
|
|
|
25602
25886
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
25603
25887
|
const sizing = getSizing(issue2.origin);
|
|
25604
25888
|
if (sizing)
|
|
25605
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
25606
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
25889
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
25890
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
25607
25891
|
}
|
|
25608
25892
|
case "too_small": {
|
|
25609
25893
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
25610
25894
|
const sizing = getSizing(issue2.origin);
|
|
25611
|
-
if (sizing)
|
|
25612
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
25613
|
-
}
|
|
25614
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
25895
|
+
if (sizing)
|
|
25896
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
25897
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
25615
25898
|
}
|
|
25616
25899
|
case "invalid_format": {
|
|
25617
25900
|
const _issue = issue2;
|
|
@@ -25642,12 +25925,12 @@ var error14 = () => {
|
|
|
25642
25925
|
};
|
|
25643
25926
|
function fr_default() {
|
|
25644
25927
|
return {
|
|
25645
|
-
localeError:
|
|
25928
|
+
localeError: error15()
|
|
25646
25929
|
};
|
|
25647
25930
|
}
|
|
25648
25931
|
|
|
25649
25932
|
// node_modules/zod/v4/locales/fr-CA.js
|
|
25650
|
-
var
|
|
25933
|
+
var error16 = () => {
|
|
25651
25934
|
const Sizable = {
|
|
25652
25935
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
25653
25936
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -25750,12 +26033,12 @@ var error15 = () => {
|
|
|
25750
26033
|
};
|
|
25751
26034
|
function fr_CA_default() {
|
|
25752
26035
|
return {
|
|
25753
|
-
localeError:
|
|
26036
|
+
localeError: error16()
|
|
25754
26037
|
};
|
|
25755
26038
|
}
|
|
25756
26039
|
|
|
25757
26040
|
// node_modules/zod/v4/locales/he.js
|
|
25758
|
-
var
|
|
26041
|
+
var error17 = () => {
|
|
25759
26042
|
const TypeNames = {
|
|
25760
26043
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
25761
26044
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -25945,12 +26228,135 @@ var error16 = () => {
|
|
|
25945
26228
|
};
|
|
25946
26229
|
function he_default() {
|
|
25947
26230
|
return {
|
|
25948
|
-
localeError:
|
|
26231
|
+
localeError: error17()
|
|
26232
|
+
};
|
|
26233
|
+
}
|
|
26234
|
+
|
|
26235
|
+
// node_modules/zod/v4/locales/hr.js
|
|
26236
|
+
var error18 = () => {
|
|
26237
|
+
const Sizable = {
|
|
26238
|
+
string: { unit: "znakova", verb: "imati" },
|
|
26239
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
26240
|
+
array: { unit: "stavki", verb: "imati" },
|
|
26241
|
+
set: { unit: "stavki", verb: "imati" }
|
|
26242
|
+
};
|
|
26243
|
+
function getSizing(origin) {
|
|
26244
|
+
return Sizable[origin] ?? null;
|
|
26245
|
+
}
|
|
26246
|
+
const FormatDictionary = {
|
|
26247
|
+
regex: "unos",
|
|
26248
|
+
email: "email adresa",
|
|
26249
|
+
url: "URL",
|
|
26250
|
+
emoji: "emoji",
|
|
26251
|
+
uuid: "UUID",
|
|
26252
|
+
uuidv4: "UUIDv4",
|
|
26253
|
+
uuidv6: "UUIDv6",
|
|
26254
|
+
nanoid: "nanoid",
|
|
26255
|
+
guid: "GUID",
|
|
26256
|
+
cuid: "cuid",
|
|
26257
|
+
cuid2: "cuid2",
|
|
26258
|
+
ulid: "ULID",
|
|
26259
|
+
xid: "XID",
|
|
26260
|
+
ksuid: "KSUID",
|
|
26261
|
+
datetime: "ISO datum i vrijeme",
|
|
26262
|
+
date: "ISO datum",
|
|
26263
|
+
time: "ISO vrijeme",
|
|
26264
|
+
duration: "ISO trajanje",
|
|
26265
|
+
ipv4: "IPv4 adresa",
|
|
26266
|
+
ipv6: "IPv6 adresa",
|
|
26267
|
+
cidrv4: "IPv4 raspon",
|
|
26268
|
+
cidrv6: "IPv6 raspon",
|
|
26269
|
+
base64: "base64 kodirani tekst",
|
|
26270
|
+
base64url: "base64url kodirani tekst",
|
|
26271
|
+
json_string: "JSON tekst",
|
|
26272
|
+
e164: "E.164 broj",
|
|
26273
|
+
jwt: "JWT",
|
|
26274
|
+
template_literal: "unos"
|
|
26275
|
+
};
|
|
26276
|
+
const TypeDictionary = {
|
|
26277
|
+
nan: "NaN",
|
|
26278
|
+
string: "tekst",
|
|
26279
|
+
number: "broj",
|
|
26280
|
+
boolean: "boolean",
|
|
26281
|
+
array: "niz",
|
|
26282
|
+
object: "objekt",
|
|
26283
|
+
set: "skup",
|
|
26284
|
+
file: "datoteka",
|
|
26285
|
+
date: "datum",
|
|
26286
|
+
bigint: "bigint",
|
|
26287
|
+
symbol: "simbol",
|
|
26288
|
+
undefined: "undefined",
|
|
26289
|
+
null: "null",
|
|
26290
|
+
function: "funkcija",
|
|
26291
|
+
map: "mapa"
|
|
26292
|
+
};
|
|
26293
|
+
return (issue2) => {
|
|
26294
|
+
switch (issue2.code) {
|
|
26295
|
+
case "invalid_type": {
|
|
26296
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
26297
|
+
const receivedType = parsedType(issue2.input);
|
|
26298
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
26299
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
26300
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
26301
|
+
}
|
|
26302
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
26303
|
+
}
|
|
26304
|
+
case "invalid_value":
|
|
26305
|
+
if (issue2.values.length === 1)
|
|
26306
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
26307
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
26308
|
+
case "too_big": {
|
|
26309
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
26310
|
+
const sizing = getSizing(issue2.origin);
|
|
26311
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
26312
|
+
if (sizing)
|
|
26313
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
26314
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
26315
|
+
}
|
|
26316
|
+
case "too_small": {
|
|
26317
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
26318
|
+
const sizing = getSizing(issue2.origin);
|
|
26319
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
26320
|
+
if (sizing) {
|
|
26321
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
26322
|
+
}
|
|
26323
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
26324
|
+
}
|
|
26325
|
+
case "invalid_format": {
|
|
26326
|
+
const _issue = issue2;
|
|
26327
|
+
if (_issue.format === "starts_with")
|
|
26328
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
26329
|
+
if (_issue.format === "ends_with")
|
|
26330
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
26331
|
+
if (_issue.format === "includes")
|
|
26332
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
26333
|
+
if (_issue.format === "regex")
|
|
26334
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
26335
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
26336
|
+
}
|
|
26337
|
+
case "not_multiple_of":
|
|
26338
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
26339
|
+
case "unrecognized_keys":
|
|
26340
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
26341
|
+
case "invalid_key":
|
|
26342
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
26343
|
+
case "invalid_union":
|
|
26344
|
+
return "Neispravan unos";
|
|
26345
|
+
case "invalid_element":
|
|
26346
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
26347
|
+
default:
|
|
26348
|
+
return `Neispravan unos`;
|
|
26349
|
+
}
|
|
26350
|
+
};
|
|
26351
|
+
};
|
|
26352
|
+
function hr_default() {
|
|
26353
|
+
return {
|
|
26354
|
+
localeError: error18()
|
|
25949
26355
|
};
|
|
25950
26356
|
}
|
|
25951
26357
|
|
|
25952
26358
|
// node_modules/zod/v4/locales/hu.js
|
|
25953
|
-
var
|
|
26359
|
+
var error19 = () => {
|
|
25954
26360
|
const Sizable = {
|
|
25955
26361
|
string: { unit: "karakter", verb: "legyen" },
|
|
25956
26362
|
file: { unit: "byte", verb: "legyen" },
|
|
@@ -26054,7 +26460,7 @@ var error17 = () => {
|
|
|
26054
26460
|
};
|
|
26055
26461
|
function hu_default() {
|
|
26056
26462
|
return {
|
|
26057
|
-
localeError:
|
|
26463
|
+
localeError: error19()
|
|
26058
26464
|
};
|
|
26059
26465
|
}
|
|
26060
26466
|
|
|
@@ -26069,7 +26475,7 @@ function withDefiniteArticle(word) {
|
|
|
26069
26475
|
const lastChar = word[word.length - 1];
|
|
26070
26476
|
return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
|
|
26071
26477
|
}
|
|
26072
|
-
var
|
|
26478
|
+
var error20 = () => {
|
|
26073
26479
|
const Sizable = {
|
|
26074
26480
|
string: {
|
|
26075
26481
|
unit: {
|
|
@@ -26202,12 +26608,12 @@ var error18 = () => {
|
|
|
26202
26608
|
};
|
|
26203
26609
|
function hy_default() {
|
|
26204
26610
|
return {
|
|
26205
|
-
localeError:
|
|
26611
|
+
localeError: error20()
|
|
26206
26612
|
};
|
|
26207
26613
|
}
|
|
26208
26614
|
|
|
26209
26615
|
// node_modules/zod/v4/locales/id.js
|
|
26210
|
-
var
|
|
26616
|
+
var error21 = () => {
|
|
26211
26617
|
const Sizable = {
|
|
26212
26618
|
string: { unit: "karakter", verb: "memiliki" },
|
|
26213
26619
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -26309,12 +26715,12 @@ var error19 = () => {
|
|
|
26309
26715
|
};
|
|
26310
26716
|
function id_default() {
|
|
26311
26717
|
return {
|
|
26312
|
-
localeError:
|
|
26718
|
+
localeError: error21()
|
|
26313
26719
|
};
|
|
26314
26720
|
}
|
|
26315
26721
|
|
|
26316
26722
|
// node_modules/zod/v4/locales/is.js
|
|
26317
|
-
var
|
|
26723
|
+
var error22 = () => {
|
|
26318
26724
|
const Sizable = {
|
|
26319
26725
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
26320
26726
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -26419,12 +26825,12 @@ var error20 = () => {
|
|
|
26419
26825
|
};
|
|
26420
26826
|
function is_default() {
|
|
26421
26827
|
return {
|
|
26422
|
-
localeError:
|
|
26828
|
+
localeError: error22()
|
|
26423
26829
|
};
|
|
26424
26830
|
}
|
|
26425
26831
|
|
|
26426
26832
|
// node_modules/zod/v4/locales/it.js
|
|
26427
|
-
var
|
|
26833
|
+
var error23 = () => {
|
|
26428
26834
|
const Sizable = {
|
|
26429
26835
|
string: { unit: "caratteri", verb: "avere" },
|
|
26430
26836
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -26509,7 +26915,7 @@ var error21 = () => {
|
|
|
26509
26915
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
26510
26916
|
if (_issue.format === "regex")
|
|
26511
26917
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
26512
|
-
return `
|
|
26918
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
26513
26919
|
}
|
|
26514
26920
|
case "not_multiple_of":
|
|
26515
26921
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -26528,12 +26934,12 @@ var error21 = () => {
|
|
|
26528
26934
|
};
|
|
26529
26935
|
function it_default() {
|
|
26530
26936
|
return {
|
|
26531
|
-
localeError:
|
|
26937
|
+
localeError: error23()
|
|
26532
26938
|
};
|
|
26533
26939
|
}
|
|
26534
26940
|
|
|
26535
26941
|
// node_modules/zod/v4/locales/ja.js
|
|
26536
|
-
var
|
|
26942
|
+
var error24 = () => {
|
|
26537
26943
|
const Sizable = {
|
|
26538
26944
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
26539
26945
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -26636,12 +27042,12 @@ var error22 = () => {
|
|
|
26636
27042
|
};
|
|
26637
27043
|
function ja_default() {
|
|
26638
27044
|
return {
|
|
26639
|
-
localeError:
|
|
27045
|
+
localeError: error24()
|
|
26640
27046
|
};
|
|
26641
27047
|
}
|
|
26642
27048
|
|
|
26643
27049
|
// node_modules/zod/v4/locales/ka.js
|
|
26644
|
-
var
|
|
27050
|
+
var error25 = () => {
|
|
26645
27051
|
const Sizable = {
|
|
26646
27052
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
26647
27053
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -26674,9 +27080,9 @@ var error23 = () => {
|
|
|
26674
27080
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
26675
27081
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
26676
27082
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
26677
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
26678
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
26679
|
-
json_string: "JSON \
|
|
27083
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
27084
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
27085
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
26680
27086
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
26681
27087
|
jwt: "JWT",
|
|
26682
27088
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -26684,7 +27090,7 @@ var error23 = () => {
|
|
|
26684
27090
|
const TypeDictionary = {
|
|
26685
27091
|
nan: "NaN",
|
|
26686
27092
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
26687
|
-
string: "\
|
|
27093
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
26688
27094
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
26689
27095
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
26690
27096
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -26722,14 +27128,14 @@ var error23 = () => {
|
|
|
26722
27128
|
case "invalid_format": {
|
|
26723
27129
|
const _issue = issue2;
|
|
26724
27130
|
if (_issue.format === "starts_with") {
|
|
26725
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
27131
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
|
|
26726
27132
|
}
|
|
26727
27133
|
if (_issue.format === "ends_with")
|
|
26728
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
27134
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
|
|
26729
27135
|
if (_issue.format === "includes")
|
|
26730
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
27136
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
|
|
26731
27137
|
if (_issue.format === "regex")
|
|
26732
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
27138
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
|
|
26733
27139
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
26734
27140
|
}
|
|
26735
27141
|
case "not_multiple_of":
|
|
@@ -26749,12 +27155,12 @@ var error23 = () => {
|
|
|
26749
27155
|
};
|
|
26750
27156
|
function ka_default() {
|
|
26751
27157
|
return {
|
|
26752
|
-
localeError:
|
|
27158
|
+
localeError: error25()
|
|
26753
27159
|
};
|
|
26754
27160
|
}
|
|
26755
27161
|
|
|
26756
27162
|
// node_modules/zod/v4/locales/km.js
|
|
26757
|
-
var
|
|
27163
|
+
var error26 = () => {
|
|
26758
27164
|
const Sizable = {
|
|
26759
27165
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
26760
27166
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -26860,7 +27266,7 @@ var error24 = () => {
|
|
|
26860
27266
|
};
|
|
26861
27267
|
function km_default() {
|
|
26862
27268
|
return {
|
|
26863
|
-
localeError:
|
|
27269
|
+
localeError: error26()
|
|
26864
27270
|
};
|
|
26865
27271
|
}
|
|
26866
27272
|
|
|
@@ -26870,7 +27276,7 @@ function kh_default() {
|
|
|
26870
27276
|
}
|
|
26871
27277
|
|
|
26872
27278
|
// node_modules/zod/v4/locales/ko.js
|
|
26873
|
-
var
|
|
27279
|
+
var error27 = () => {
|
|
26874
27280
|
const Sizable = {
|
|
26875
27281
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
26876
27282
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -26977,7 +27383,7 @@ var error25 = () => {
|
|
|
26977
27383
|
};
|
|
26978
27384
|
function ko_default() {
|
|
26979
27385
|
return {
|
|
26980
|
-
localeError:
|
|
27386
|
+
localeError: error27()
|
|
26981
27387
|
};
|
|
26982
27388
|
}
|
|
26983
27389
|
|
|
@@ -26995,7 +27401,7 @@ function getUnitTypeFromNumber(number4) {
|
|
|
26995
27401
|
return "one";
|
|
26996
27402
|
return "few";
|
|
26997
27403
|
}
|
|
26998
|
-
var
|
|
27404
|
+
var error28 = () => {
|
|
26999
27405
|
const Sizable = {
|
|
27000
27406
|
string: {
|
|
27001
27407
|
unit: {
|
|
@@ -27181,12 +27587,12 @@ var error26 = () => {
|
|
|
27181
27587
|
};
|
|
27182
27588
|
function lt_default() {
|
|
27183
27589
|
return {
|
|
27184
|
-
localeError:
|
|
27590
|
+
localeError: error28()
|
|
27185
27591
|
};
|
|
27186
27592
|
}
|
|
27187
27593
|
|
|
27188
27594
|
// node_modules/zod/v4/locales/mk.js
|
|
27189
|
-
var
|
|
27595
|
+
var error29 = () => {
|
|
27190
27596
|
const Sizable = {
|
|
27191
27597
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
27192
27598
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -27291,12 +27697,12 @@ var error27 = () => {
|
|
|
27291
27697
|
};
|
|
27292
27698
|
function mk_default() {
|
|
27293
27699
|
return {
|
|
27294
|
-
localeError:
|
|
27700
|
+
localeError: error29()
|
|
27295
27701
|
};
|
|
27296
27702
|
}
|
|
27297
27703
|
|
|
27298
27704
|
// node_modules/zod/v4/locales/ms.js
|
|
27299
|
-
var
|
|
27705
|
+
var error30 = () => {
|
|
27300
27706
|
const Sizable = {
|
|
27301
27707
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
27302
27708
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -27399,12 +27805,12 @@ var error28 = () => {
|
|
|
27399
27805
|
};
|
|
27400
27806
|
function ms_default() {
|
|
27401
27807
|
return {
|
|
27402
|
-
localeError:
|
|
27808
|
+
localeError: error30()
|
|
27403
27809
|
};
|
|
27404
27810
|
}
|
|
27405
27811
|
|
|
27406
27812
|
// node_modules/zod/v4/locales/nl.js
|
|
27407
|
-
var
|
|
27813
|
+
var error31 = () => {
|
|
27408
27814
|
const Sizable = {
|
|
27409
27815
|
string: { unit: "tekens", verb: "heeft" },
|
|
27410
27816
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -27510,12 +27916,12 @@ var error29 = () => {
|
|
|
27510
27916
|
};
|
|
27511
27917
|
function nl_default() {
|
|
27512
27918
|
return {
|
|
27513
|
-
localeError:
|
|
27919
|
+
localeError: error31()
|
|
27514
27920
|
};
|
|
27515
27921
|
}
|
|
27516
27922
|
|
|
27517
27923
|
// node_modules/zod/v4/locales/no.js
|
|
27518
|
-
var
|
|
27924
|
+
var error32 = () => {
|
|
27519
27925
|
const Sizable = {
|
|
27520
27926
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
27521
27927
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -27619,12 +28025,12 @@ var error30 = () => {
|
|
|
27619
28025
|
};
|
|
27620
28026
|
function no_default() {
|
|
27621
28027
|
return {
|
|
27622
|
-
localeError:
|
|
28028
|
+
localeError: error32()
|
|
27623
28029
|
};
|
|
27624
28030
|
}
|
|
27625
28031
|
|
|
27626
28032
|
// node_modules/zod/v4/locales/ota.js
|
|
27627
|
-
var
|
|
28033
|
+
var error33 = () => {
|
|
27628
28034
|
const Sizable = {
|
|
27629
28035
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
27630
28036
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -27729,12 +28135,12 @@ var error31 = () => {
|
|
|
27729
28135
|
};
|
|
27730
28136
|
function ota_default() {
|
|
27731
28137
|
return {
|
|
27732
|
-
localeError:
|
|
28138
|
+
localeError: error33()
|
|
27733
28139
|
};
|
|
27734
28140
|
}
|
|
27735
28141
|
|
|
27736
28142
|
// node_modules/zod/v4/locales/ps.js
|
|
27737
|
-
var
|
|
28143
|
+
var error34 = () => {
|
|
27738
28144
|
const Sizable = {
|
|
27739
28145
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
27740
28146
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -27844,12 +28250,12 @@ var error32 = () => {
|
|
|
27844
28250
|
};
|
|
27845
28251
|
function ps_default() {
|
|
27846
28252
|
return {
|
|
27847
|
-
localeError:
|
|
28253
|
+
localeError: error34()
|
|
27848
28254
|
};
|
|
27849
28255
|
}
|
|
27850
28256
|
|
|
27851
28257
|
// node_modules/zod/v4/locales/pl.js
|
|
27852
|
-
var
|
|
28258
|
+
var error35 = () => {
|
|
27853
28259
|
const Sizable = {
|
|
27854
28260
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
27855
28261
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -27954,12 +28360,12 @@ var error33 = () => {
|
|
|
27954
28360
|
};
|
|
27955
28361
|
function pl_default() {
|
|
27956
28362
|
return {
|
|
27957
|
-
localeError:
|
|
28363
|
+
localeError: error35()
|
|
27958
28364
|
};
|
|
27959
28365
|
}
|
|
27960
28366
|
|
|
27961
28367
|
// node_modules/zod/v4/locales/pt.js
|
|
27962
|
-
var
|
|
28368
|
+
var error36 = () => {
|
|
27963
28369
|
const Sizable = {
|
|
27964
28370
|
string: { unit: "caracteres", verb: "ter" },
|
|
27965
28371
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -28063,7 +28469,127 @@ var error34 = () => {
|
|
|
28063
28469
|
};
|
|
28064
28470
|
function pt_default() {
|
|
28065
28471
|
return {
|
|
28066
|
-
localeError:
|
|
28472
|
+
localeError: error36()
|
|
28473
|
+
};
|
|
28474
|
+
}
|
|
28475
|
+
|
|
28476
|
+
// node_modules/zod/v4/locales/ro.js
|
|
28477
|
+
var error37 = () => {
|
|
28478
|
+
const Sizable = {
|
|
28479
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
28480
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
28481
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
28482
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
28483
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
28484
|
+
};
|
|
28485
|
+
function getSizing(origin) {
|
|
28486
|
+
return Sizable[origin] ?? null;
|
|
28487
|
+
}
|
|
28488
|
+
const FormatDictionary = {
|
|
28489
|
+
regex: "intrare",
|
|
28490
|
+
email: "adres\u0103 de email",
|
|
28491
|
+
url: "URL",
|
|
28492
|
+
emoji: "emoji",
|
|
28493
|
+
uuid: "UUID",
|
|
28494
|
+
uuidv4: "UUIDv4",
|
|
28495
|
+
uuidv6: "UUIDv6",
|
|
28496
|
+
nanoid: "nanoid",
|
|
28497
|
+
guid: "GUID",
|
|
28498
|
+
cuid: "cuid",
|
|
28499
|
+
cuid2: "cuid2",
|
|
28500
|
+
ulid: "ULID",
|
|
28501
|
+
xid: "XID",
|
|
28502
|
+
ksuid: "KSUID",
|
|
28503
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
28504
|
+
date: "dat\u0103 ISO",
|
|
28505
|
+
time: "or\u0103 ISO",
|
|
28506
|
+
duration: "durat\u0103 ISO",
|
|
28507
|
+
ipv4: "adres\u0103 IPv4",
|
|
28508
|
+
ipv6: "adres\u0103 IPv6",
|
|
28509
|
+
mac: "adres\u0103 MAC",
|
|
28510
|
+
cidrv4: "interval IPv4",
|
|
28511
|
+
cidrv6: "interval IPv6",
|
|
28512
|
+
base64: "\u0219ir codat base64",
|
|
28513
|
+
base64url: "\u0219ir codat base64url",
|
|
28514
|
+
json_string: "\u0219ir JSON",
|
|
28515
|
+
e164: "num\u0103r E.164",
|
|
28516
|
+
jwt: "JWT",
|
|
28517
|
+
template_literal: "intrare"
|
|
28518
|
+
};
|
|
28519
|
+
const TypeDictionary = {
|
|
28520
|
+
nan: "NaN",
|
|
28521
|
+
string: "\u0219ir",
|
|
28522
|
+
number: "num\u0103r",
|
|
28523
|
+
boolean: "boolean",
|
|
28524
|
+
function: "func\u021Bie",
|
|
28525
|
+
array: "matrice",
|
|
28526
|
+
object: "obiect",
|
|
28527
|
+
undefined: "nedefinit",
|
|
28528
|
+
symbol: "simbol",
|
|
28529
|
+
bigint: "num\u0103r mare",
|
|
28530
|
+
void: "void",
|
|
28531
|
+
never: "never",
|
|
28532
|
+
map: "hart\u0103",
|
|
28533
|
+
set: "set"
|
|
28534
|
+
};
|
|
28535
|
+
return (issue2) => {
|
|
28536
|
+
switch (issue2.code) {
|
|
28537
|
+
case "invalid_type": {
|
|
28538
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
28539
|
+
const receivedType = parsedType(issue2.input);
|
|
28540
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
28541
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
28542
|
+
}
|
|
28543
|
+
case "invalid_value":
|
|
28544
|
+
if (issue2.values.length === 1)
|
|
28545
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
28546
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
28547
|
+
case "too_big": {
|
|
28548
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
28549
|
+
const sizing = getSizing(issue2.origin);
|
|
28550
|
+
if (sizing)
|
|
28551
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
28552
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
28553
|
+
}
|
|
28554
|
+
case "too_small": {
|
|
28555
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
28556
|
+
const sizing = getSizing(issue2.origin);
|
|
28557
|
+
if (sizing) {
|
|
28558
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
28559
|
+
}
|
|
28560
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
28561
|
+
}
|
|
28562
|
+
case "invalid_format": {
|
|
28563
|
+
const _issue = issue2;
|
|
28564
|
+
if (_issue.format === "starts_with") {
|
|
28565
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
28566
|
+
}
|
|
28567
|
+
if (_issue.format === "ends_with")
|
|
28568
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
28569
|
+
if (_issue.format === "includes")
|
|
28570
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
28571
|
+
if (_issue.format === "regex")
|
|
28572
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
28573
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
28574
|
+
}
|
|
28575
|
+
case "not_multiple_of":
|
|
28576
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
28577
|
+
case "unrecognized_keys":
|
|
28578
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
28579
|
+
case "invalid_key":
|
|
28580
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
28581
|
+
case "invalid_union":
|
|
28582
|
+
return "Intrare invalid\u0103";
|
|
28583
|
+
case "invalid_element":
|
|
28584
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
28585
|
+
default:
|
|
28586
|
+
return `Intrare invalid\u0103`;
|
|
28587
|
+
}
|
|
28588
|
+
};
|
|
28589
|
+
};
|
|
28590
|
+
function ro_default() {
|
|
28591
|
+
return {
|
|
28592
|
+
localeError: error37()
|
|
28067
28593
|
};
|
|
28068
28594
|
}
|
|
28069
28595
|
|
|
@@ -28083,7 +28609,7 @@ function getRussianPlural(count, one, few, many) {
|
|
|
28083
28609
|
}
|
|
28084
28610
|
return many;
|
|
28085
28611
|
}
|
|
28086
|
-
var
|
|
28612
|
+
var error38 = () => {
|
|
28087
28613
|
const Sizable = {
|
|
28088
28614
|
string: {
|
|
28089
28615
|
unit: {
|
|
@@ -28220,12 +28746,12 @@ var error35 = () => {
|
|
|
28220
28746
|
};
|
|
28221
28747
|
function ru_default() {
|
|
28222
28748
|
return {
|
|
28223
|
-
localeError:
|
|
28749
|
+
localeError: error38()
|
|
28224
28750
|
};
|
|
28225
28751
|
}
|
|
28226
28752
|
|
|
28227
28753
|
// node_modules/zod/v4/locales/sl.js
|
|
28228
|
-
var
|
|
28754
|
+
var error39 = () => {
|
|
28229
28755
|
const Sizable = {
|
|
28230
28756
|
string: { unit: "znakov", verb: "imeti" },
|
|
28231
28757
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -28330,12 +28856,12 @@ var error36 = () => {
|
|
|
28330
28856
|
};
|
|
28331
28857
|
function sl_default() {
|
|
28332
28858
|
return {
|
|
28333
|
-
localeError:
|
|
28859
|
+
localeError: error39()
|
|
28334
28860
|
};
|
|
28335
28861
|
}
|
|
28336
28862
|
|
|
28337
28863
|
// node_modules/zod/v4/locales/sv.js
|
|
28338
|
-
var
|
|
28864
|
+
var error40 = () => {
|
|
28339
28865
|
const Sizable = {
|
|
28340
28866
|
string: { unit: "tecken", verb: "att ha" },
|
|
28341
28867
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -28441,12 +28967,12 @@ var error37 = () => {
|
|
|
28441
28967
|
};
|
|
28442
28968
|
function sv_default() {
|
|
28443
28969
|
return {
|
|
28444
|
-
localeError:
|
|
28970
|
+
localeError: error40()
|
|
28445
28971
|
};
|
|
28446
28972
|
}
|
|
28447
28973
|
|
|
28448
28974
|
// node_modules/zod/v4/locales/ta.js
|
|
28449
|
-
var
|
|
28975
|
+
var error41 = () => {
|
|
28450
28976
|
const Sizable = {
|
|
28451
28977
|
string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
28452
28978
|
file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
@@ -28552,12 +29078,12 @@ var error38 = () => {
|
|
|
28552
29078
|
};
|
|
28553
29079
|
function ta_default() {
|
|
28554
29080
|
return {
|
|
28555
|
-
localeError:
|
|
29081
|
+
localeError: error41()
|
|
28556
29082
|
};
|
|
28557
29083
|
}
|
|
28558
29084
|
|
|
28559
29085
|
// node_modules/zod/v4/locales/th.js
|
|
28560
|
-
var
|
|
29086
|
+
var error42 = () => {
|
|
28561
29087
|
const Sizable = {
|
|
28562
29088
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
28563
29089
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -28663,12 +29189,12 @@ var error39 = () => {
|
|
|
28663
29189
|
};
|
|
28664
29190
|
function th_default() {
|
|
28665
29191
|
return {
|
|
28666
|
-
localeError:
|
|
29192
|
+
localeError: error42()
|
|
28667
29193
|
};
|
|
28668
29194
|
}
|
|
28669
29195
|
|
|
28670
29196
|
// node_modules/zod/v4/locales/tr.js
|
|
28671
|
-
var
|
|
29197
|
+
var error43 = () => {
|
|
28672
29198
|
const Sizable = {
|
|
28673
29199
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
28674
29200
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -28769,12 +29295,12 @@ var error40 = () => {
|
|
|
28769
29295
|
};
|
|
28770
29296
|
function tr_default() {
|
|
28771
29297
|
return {
|
|
28772
|
-
localeError:
|
|
29298
|
+
localeError: error43()
|
|
28773
29299
|
};
|
|
28774
29300
|
}
|
|
28775
29301
|
|
|
28776
29302
|
// node_modules/zod/v4/locales/uk.js
|
|
28777
|
-
var
|
|
29303
|
+
var error44 = () => {
|
|
28778
29304
|
const Sizable = {
|
|
28779
29305
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
28780
29306
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -28878,7 +29404,7 @@ var error41 = () => {
|
|
|
28878
29404
|
};
|
|
28879
29405
|
function uk_default() {
|
|
28880
29406
|
return {
|
|
28881
|
-
localeError:
|
|
29407
|
+
localeError: error44()
|
|
28882
29408
|
};
|
|
28883
29409
|
}
|
|
28884
29410
|
|
|
@@ -28888,7 +29414,7 @@ function ua_default() {
|
|
|
28888
29414
|
}
|
|
28889
29415
|
|
|
28890
29416
|
// node_modules/zod/v4/locales/ur.js
|
|
28891
|
-
var
|
|
29417
|
+
var error45 = () => {
|
|
28892
29418
|
const Sizable = {
|
|
28893
29419
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
28894
29420
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -28994,17 +29520,18 @@ var error42 = () => {
|
|
|
28994
29520
|
};
|
|
28995
29521
|
function ur_default() {
|
|
28996
29522
|
return {
|
|
28997
|
-
localeError:
|
|
29523
|
+
localeError: error45()
|
|
28998
29524
|
};
|
|
28999
29525
|
}
|
|
29000
29526
|
|
|
29001
29527
|
// node_modules/zod/v4/locales/uz.js
|
|
29002
|
-
var
|
|
29528
|
+
var error46 = () => {
|
|
29003
29529
|
const Sizable = {
|
|
29004
29530
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
29005
29531
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
29006
29532
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
29007
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
29533
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
29534
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
29008
29535
|
};
|
|
29009
29536
|
function getSizing(origin) {
|
|
29010
29537
|
return Sizable[origin] ?? null;
|
|
@@ -29104,12 +29631,12 @@ var error43 = () => {
|
|
|
29104
29631
|
};
|
|
29105
29632
|
function uz_default() {
|
|
29106
29633
|
return {
|
|
29107
|
-
localeError:
|
|
29634
|
+
localeError: error46()
|
|
29108
29635
|
};
|
|
29109
29636
|
}
|
|
29110
29637
|
|
|
29111
29638
|
// node_modules/zod/v4/locales/vi.js
|
|
29112
|
-
var
|
|
29639
|
+
var error47 = () => {
|
|
29113
29640
|
const Sizable = {
|
|
29114
29641
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
29115
29642
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -29213,12 +29740,12 @@ var error44 = () => {
|
|
|
29213
29740
|
};
|
|
29214
29741
|
function vi_default() {
|
|
29215
29742
|
return {
|
|
29216
|
-
localeError:
|
|
29743
|
+
localeError: error47()
|
|
29217
29744
|
};
|
|
29218
29745
|
}
|
|
29219
29746
|
|
|
29220
29747
|
// node_modules/zod/v4/locales/zh-CN.js
|
|
29221
|
-
var
|
|
29748
|
+
var error48 = () => {
|
|
29222
29749
|
const Sizable = {
|
|
29223
29750
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
29224
29751
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -29323,12 +29850,12 @@ var error45 = () => {
|
|
|
29323
29850
|
};
|
|
29324
29851
|
function zh_CN_default() {
|
|
29325
29852
|
return {
|
|
29326
|
-
localeError:
|
|
29853
|
+
localeError: error48()
|
|
29327
29854
|
};
|
|
29328
29855
|
}
|
|
29329
29856
|
|
|
29330
29857
|
// node_modules/zod/v4/locales/zh-TW.js
|
|
29331
|
-
var
|
|
29858
|
+
var error49 = () => {
|
|
29332
29859
|
const Sizable = {
|
|
29333
29860
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
29334
29861
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -29431,12 +29958,12 @@ var error46 = () => {
|
|
|
29431
29958
|
};
|
|
29432
29959
|
function zh_TW_default() {
|
|
29433
29960
|
return {
|
|
29434
|
-
localeError:
|
|
29961
|
+
localeError: error49()
|
|
29435
29962
|
};
|
|
29436
29963
|
}
|
|
29437
29964
|
|
|
29438
29965
|
// node_modules/zod/v4/locales/yo.js
|
|
29439
|
-
var
|
|
29966
|
+
var error50 = () => {
|
|
29440
29967
|
const Sizable = {
|
|
29441
29968
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
29442
29969
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -29539,12 +30066,12 @@ var error47 = () => {
|
|
|
29539
30066
|
};
|
|
29540
30067
|
function yo_default() {
|
|
29541
30068
|
return {
|
|
29542
|
-
localeError:
|
|
30069
|
+
localeError: error50()
|
|
29543
30070
|
};
|
|
29544
30071
|
}
|
|
29545
30072
|
|
|
29546
30073
|
// node_modules/zod/v4/core/registries.js
|
|
29547
|
-
var
|
|
30074
|
+
var _a2;
|
|
29548
30075
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
29549
30076
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
29550
30077
|
var $ZodRegistry = class {
|
|
@@ -29590,7 +30117,7 @@ var $ZodRegistry = class {
|
|
|
29590
30117
|
function registry() {
|
|
29591
30118
|
return new $ZodRegistry();
|
|
29592
30119
|
}
|
|
29593
|
-
(
|
|
30120
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
29594
30121
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
29595
30122
|
|
|
29596
30123
|
// node_modules/zod/v4/core/api.js
|
|
@@ -30508,7 +31035,7 @@ function _refine(Class2, fn, _params) {
|
|
|
30508
31035
|
return schema;
|
|
30509
31036
|
}
|
|
30510
31037
|
// @__NO_SIDE_EFFECTS__
|
|
30511
|
-
function _superRefine(fn) {
|
|
31038
|
+
function _superRefine(fn, params) {
|
|
30512
31039
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
30513
31040
|
payload.addIssue = (issue2) => {
|
|
30514
31041
|
if (typeof issue2 === "string") {
|
|
@@ -30525,7 +31052,7 @@ function _superRefine(fn) {
|
|
|
30525
31052
|
}
|
|
30526
31053
|
};
|
|
30527
31054
|
return fn(payload.value, payload);
|
|
30528
|
-
});
|
|
31055
|
+
}, params);
|
|
30529
31056
|
return ch;
|
|
30530
31057
|
}
|
|
30531
31058
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -30655,7 +31182,7 @@ function initializeContext(params) {
|
|
|
30655
31182
|
};
|
|
30656
31183
|
}
|
|
30657
31184
|
function process2(schema, ctx2, _params = { path: [], schemaPath: [] }) {
|
|
30658
|
-
var
|
|
31185
|
+
var _a3;
|
|
30659
31186
|
const def = schema._zod.def;
|
|
30660
31187
|
const seen = ctx2.seen.get(schema);
|
|
30661
31188
|
if (seen) {
|
|
@@ -30702,8 +31229,8 @@ function process2(schema, ctx2, _params = { path: [], schemaPath: [] }) {
|
|
|
30702
31229
|
delete result.schema.examples;
|
|
30703
31230
|
delete result.schema.default;
|
|
30704
31231
|
}
|
|
30705
|
-
if (ctx2.io === "input" && result.schema
|
|
30706
|
-
(
|
|
31232
|
+
if (ctx2.io === "input" && "_prefault" in result.schema)
|
|
31233
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
30707
31234
|
delete result.schema._prefault;
|
|
30708
31235
|
const _result = ctx2.seen.get(schema);
|
|
30709
31236
|
return _result.schema;
|
|
@@ -30884,10 +31411,15 @@ function finalize(ctx2, schema) {
|
|
|
30884
31411
|
result.$id = ctx2.external.uri(id);
|
|
30885
31412
|
}
|
|
30886
31413
|
Object.assign(result, root.def ?? root.schema);
|
|
31414
|
+
const rootMetaId = ctx2.metadataRegistry.get(schema)?.id;
|
|
31415
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
31416
|
+
delete result.id;
|
|
30887
31417
|
const defs = ctx2.external?.defs ?? {};
|
|
30888
31418
|
for (const entry of ctx2.seen.entries()) {
|
|
30889
31419
|
const seen = entry[1];
|
|
30890
31420
|
if (seen.def && seen.defId) {
|
|
31421
|
+
if (seen.def.id === seen.defId)
|
|
31422
|
+
delete seen.def.id;
|
|
30891
31423
|
defs[seen.defId] = seen.def;
|
|
30892
31424
|
}
|
|
30893
31425
|
}
|
|
@@ -30943,6 +31475,8 @@ function isTransforming(_schema, _ctx2) {
|
|
|
30943
31475
|
return isTransforming(def.keyType, ctx2) || isTransforming(def.valueType, ctx2);
|
|
30944
31476
|
}
|
|
30945
31477
|
if (def.type === "pipe") {
|
|
31478
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
31479
|
+
return true;
|
|
30946
31480
|
return isTransforming(def.in, ctx2) || isTransforming(def.out, ctx2);
|
|
30947
31481
|
}
|
|
30948
31482
|
if (def.type === "object") {
|
|
@@ -31032,39 +31566,28 @@ var numberProcessor = (schema, ctx2, _json, _params) => {
|
|
|
31032
31566
|
json2.type = "integer";
|
|
31033
31567
|
else
|
|
31034
31568
|
json2.type = "number";
|
|
31035
|
-
|
|
31036
|
-
|
|
31569
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
31570
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
31571
|
+
const legacy = ctx2.target === "draft-04" || ctx2.target === "openapi-3.0";
|
|
31572
|
+
if (exMin) {
|
|
31573
|
+
if (legacy) {
|
|
31037
31574
|
json2.minimum = exclusiveMinimum;
|
|
31038
31575
|
json2.exclusiveMinimum = true;
|
|
31039
31576
|
} else {
|
|
31040
31577
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
31041
31578
|
}
|
|
31042
|
-
}
|
|
31043
|
-
if (typeof minimum === "number") {
|
|
31579
|
+
} else if (typeof minimum === "number") {
|
|
31044
31580
|
json2.minimum = minimum;
|
|
31045
|
-
if (typeof exclusiveMinimum === "number" && ctx2.target !== "draft-04") {
|
|
31046
|
-
if (exclusiveMinimum >= minimum)
|
|
31047
|
-
delete json2.minimum;
|
|
31048
|
-
else
|
|
31049
|
-
delete json2.exclusiveMinimum;
|
|
31050
|
-
}
|
|
31051
31581
|
}
|
|
31052
|
-
if (
|
|
31053
|
-
if (
|
|
31582
|
+
if (exMax) {
|
|
31583
|
+
if (legacy) {
|
|
31054
31584
|
json2.maximum = exclusiveMaximum;
|
|
31055
31585
|
json2.exclusiveMaximum = true;
|
|
31056
31586
|
} else {
|
|
31057
31587
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
31058
31588
|
}
|
|
31059
|
-
}
|
|
31060
|
-
if (typeof maximum === "number") {
|
|
31589
|
+
} else if (typeof maximum === "number") {
|
|
31061
31590
|
json2.maximum = maximum;
|
|
31062
|
-
if (typeof exclusiveMaximum === "number" && ctx2.target !== "draft-04") {
|
|
31063
|
-
if (exclusiveMaximum <= maximum)
|
|
31064
|
-
delete json2.maximum;
|
|
31065
|
-
else
|
|
31066
|
-
delete json2.exclusiveMaximum;
|
|
31067
|
-
}
|
|
31068
31591
|
}
|
|
31069
31592
|
if (typeof multipleOf === "number")
|
|
31070
31593
|
json2.multipleOf = multipleOf;
|
|
@@ -31236,7 +31759,10 @@ var arrayProcessor = (schema, ctx2, _json, params) => {
|
|
|
31236
31759
|
if (typeof maximum === "number")
|
|
31237
31760
|
json2.maxItems = maximum;
|
|
31238
31761
|
json2.type = "array";
|
|
31239
|
-
json2.items = process2(def.element, ctx2, {
|
|
31762
|
+
json2.items = process2(def.element, ctx2, {
|
|
31763
|
+
...params,
|
|
31764
|
+
path: [...params.path, "items"]
|
|
31765
|
+
});
|
|
31240
31766
|
};
|
|
31241
31767
|
var objectProcessor = (schema, ctx2, _json, params) => {
|
|
31242
31768
|
const json2 = _json;
|
|
@@ -31429,7 +31955,8 @@ var catchProcessor = (schema, ctx2, json2, params) => {
|
|
|
31429
31955
|
};
|
|
31430
31956
|
var pipeProcessor = (schema, ctx2, _json, params) => {
|
|
31431
31957
|
const def = schema._zod.def;
|
|
31432
|
-
const
|
|
31958
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
31959
|
+
const innerType = ctx2.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
31433
31960
|
process2(innerType, ctx2, params);
|
|
31434
31961
|
const seen = ctx2.seen.get(schema);
|
|
31435
31962
|
seen.ref = innerType;
|
|
@@ -31663,6 +32190,7 @@ __export(schemas_exports2, {
|
|
|
31663
32190
|
ZodOptional: () => ZodOptional,
|
|
31664
32191
|
ZodPipe: () => ZodPipe,
|
|
31665
32192
|
ZodPrefault: () => ZodPrefault,
|
|
32193
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
31666
32194
|
ZodPromise: () => ZodPromise,
|
|
31667
32195
|
ZodReadonly: () => ZodReadonly,
|
|
31668
32196
|
ZodRecord: () => ZodRecord,
|
|
@@ -31723,6 +32251,7 @@ __export(schemas_exports2, {
|
|
|
31723
32251
|
int32: () => int32,
|
|
31724
32252
|
int64: () => int64,
|
|
31725
32253
|
intersection: () => intersection,
|
|
32254
|
+
invertCodec: () => invertCodec,
|
|
31726
32255
|
ipv4: () => ipv42,
|
|
31727
32256
|
ipv6: () => ipv62,
|
|
31728
32257
|
json: () => json,
|
|
@@ -31892,8 +32421,8 @@ var initializer2 = (inst, issues) => {
|
|
|
31892
32421
|
}
|
|
31893
32422
|
});
|
|
31894
32423
|
};
|
|
31895
|
-
var ZodError = $constructor("ZodError", initializer2);
|
|
31896
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
32424
|
+
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
32425
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
31897
32426
|
Parent: Error
|
|
31898
32427
|
});
|
|
31899
32428
|
|
|
@@ -31912,6 +32441,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
|
31912
32441
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
31913
32442
|
|
|
31914
32443
|
// node_modules/zod/v4/classic/schemas.js
|
|
32444
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
32445
|
+
function _installLazyMethods(inst, group, methods) {
|
|
32446
|
+
const proto = Object.getPrototypeOf(inst);
|
|
32447
|
+
let installed = _installedGroups.get(proto);
|
|
32448
|
+
if (!installed) {
|
|
32449
|
+
installed = /* @__PURE__ */ new Set();
|
|
32450
|
+
_installedGroups.set(proto, installed);
|
|
32451
|
+
}
|
|
32452
|
+
if (installed.has(group))
|
|
32453
|
+
return;
|
|
32454
|
+
installed.add(group);
|
|
32455
|
+
for (const key in methods) {
|
|
32456
|
+
const fn = methods[key];
|
|
32457
|
+
Object.defineProperty(proto, key, {
|
|
32458
|
+
configurable: true,
|
|
32459
|
+
enumerable: false,
|
|
32460
|
+
get() {
|
|
32461
|
+
const bound = fn.bind(this);
|
|
32462
|
+
Object.defineProperty(this, key, {
|
|
32463
|
+
configurable: true,
|
|
32464
|
+
writable: true,
|
|
32465
|
+
enumerable: true,
|
|
32466
|
+
value: bound
|
|
32467
|
+
});
|
|
32468
|
+
return bound;
|
|
32469
|
+
},
|
|
32470
|
+
set(v2) {
|
|
32471
|
+
Object.defineProperty(this, key, {
|
|
32472
|
+
configurable: true,
|
|
32473
|
+
writable: true,
|
|
32474
|
+
enumerable: true,
|
|
32475
|
+
value: v2
|
|
32476
|
+
});
|
|
32477
|
+
}
|
|
32478
|
+
});
|
|
32479
|
+
}
|
|
32480
|
+
}
|
|
31915
32481
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
31916
32482
|
$ZodType.init(inst, def);
|
|
31917
32483
|
Object.assign(inst["~standard"], {
|
|
@@ -31924,23 +32490,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
31924
32490
|
inst.def = def;
|
|
31925
32491
|
inst.type = def.type;
|
|
31926
32492
|
Object.defineProperty(inst, "_def", { value: def });
|
|
31927
|
-
inst.check = (...checks) => {
|
|
31928
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
31929
|
-
checks: [
|
|
31930
|
-
...def.checks ?? [],
|
|
31931
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
31932
|
-
]
|
|
31933
|
-
}), {
|
|
31934
|
-
parent: true
|
|
31935
|
-
});
|
|
31936
|
-
};
|
|
31937
|
-
inst.with = inst.check;
|
|
31938
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
31939
|
-
inst.brand = () => inst;
|
|
31940
|
-
inst.register = ((reg, meta3) => {
|
|
31941
|
-
reg.add(inst, meta3);
|
|
31942
|
-
return inst;
|
|
31943
|
-
});
|
|
31944
32493
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
31945
32494
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
31946
32495
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -31954,45 +32503,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
31954
32503
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
31955
32504
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
31956
32505
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
31957
|
-
inst
|
|
31958
|
-
|
|
31959
|
-
|
|
31960
|
-
|
|
31961
|
-
|
|
31962
|
-
|
|
31963
|
-
|
|
31964
|
-
|
|
31965
|
-
|
|
31966
|
-
|
|
31967
|
-
|
|
31968
|
-
|
|
31969
|
-
|
|
31970
|
-
|
|
31971
|
-
|
|
31972
|
-
|
|
31973
|
-
|
|
31974
|
-
|
|
31975
|
-
|
|
31976
|
-
|
|
31977
|
-
|
|
31978
|
-
|
|
32506
|
+
_installLazyMethods(inst, "ZodType", {
|
|
32507
|
+
check(...chks) {
|
|
32508
|
+
const def2 = this.def;
|
|
32509
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
32510
|
+
checks: [
|
|
32511
|
+
...def2.checks ?? [],
|
|
32512
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
32513
|
+
]
|
|
32514
|
+
}), { parent: true });
|
|
32515
|
+
},
|
|
32516
|
+
with(...chks) {
|
|
32517
|
+
return this.check(...chks);
|
|
32518
|
+
},
|
|
32519
|
+
clone(def2, params) {
|
|
32520
|
+
return clone(this, def2, params);
|
|
32521
|
+
},
|
|
32522
|
+
brand() {
|
|
32523
|
+
return this;
|
|
32524
|
+
},
|
|
32525
|
+
register(reg, meta3) {
|
|
32526
|
+
reg.add(this, meta3);
|
|
32527
|
+
return this;
|
|
32528
|
+
},
|
|
32529
|
+
refine(check2, params) {
|
|
32530
|
+
return this.check(refine(check2, params));
|
|
32531
|
+
},
|
|
32532
|
+
superRefine(refinement, params) {
|
|
32533
|
+
return this.check(superRefine(refinement, params));
|
|
32534
|
+
},
|
|
32535
|
+
overwrite(fn) {
|
|
32536
|
+
return this.check(_overwrite(fn));
|
|
32537
|
+
},
|
|
32538
|
+
optional() {
|
|
32539
|
+
return optional(this);
|
|
32540
|
+
},
|
|
32541
|
+
exactOptional() {
|
|
32542
|
+
return exactOptional(this);
|
|
32543
|
+
},
|
|
32544
|
+
nullable() {
|
|
32545
|
+
return nullable(this);
|
|
32546
|
+
},
|
|
32547
|
+
nullish() {
|
|
32548
|
+
return optional(nullable(this));
|
|
32549
|
+
},
|
|
32550
|
+
nonoptional(params) {
|
|
32551
|
+
return nonoptional(this, params);
|
|
32552
|
+
},
|
|
32553
|
+
array() {
|
|
32554
|
+
return array(this);
|
|
32555
|
+
},
|
|
32556
|
+
or(arg) {
|
|
32557
|
+
return union([this, arg]);
|
|
32558
|
+
},
|
|
32559
|
+
and(arg) {
|
|
32560
|
+
return intersection(this, arg);
|
|
32561
|
+
},
|
|
32562
|
+
transform(tx2) {
|
|
32563
|
+
return pipe(this, transform(tx2));
|
|
32564
|
+
},
|
|
32565
|
+
default(d2) {
|
|
32566
|
+
return _default2(this, d2);
|
|
32567
|
+
},
|
|
32568
|
+
prefault(d2) {
|
|
32569
|
+
return prefault(this, d2);
|
|
32570
|
+
},
|
|
32571
|
+
catch(params) {
|
|
32572
|
+
return _catch2(this, params);
|
|
32573
|
+
},
|
|
32574
|
+
pipe(target) {
|
|
32575
|
+
return pipe(this, target);
|
|
32576
|
+
},
|
|
32577
|
+
readonly() {
|
|
32578
|
+
return readonly(this);
|
|
32579
|
+
},
|
|
32580
|
+
describe(description) {
|
|
32581
|
+
const cl = this.clone();
|
|
32582
|
+
globalRegistry.add(cl, { description });
|
|
32583
|
+
return cl;
|
|
32584
|
+
},
|
|
32585
|
+
meta(...args) {
|
|
32586
|
+
if (args.length === 0)
|
|
32587
|
+
return globalRegistry.get(this);
|
|
32588
|
+
const cl = this.clone();
|
|
32589
|
+
globalRegistry.add(cl, args[0]);
|
|
32590
|
+
return cl;
|
|
32591
|
+
},
|
|
32592
|
+
isOptional() {
|
|
32593
|
+
return this.safeParse(void 0).success;
|
|
32594
|
+
},
|
|
32595
|
+
isNullable() {
|
|
32596
|
+
return this.safeParse(null).success;
|
|
32597
|
+
},
|
|
32598
|
+
apply(fn) {
|
|
32599
|
+
return fn(this);
|
|
32600
|
+
}
|
|
32601
|
+
});
|
|
31979
32602
|
Object.defineProperty(inst, "description", {
|
|
31980
32603
|
get() {
|
|
31981
32604
|
return globalRegistry.get(inst)?.description;
|
|
31982
32605
|
},
|
|
31983
32606
|
configurable: true
|
|
31984
32607
|
});
|
|
31985
|
-
inst.meta = (...args) => {
|
|
31986
|
-
if (args.length === 0) {
|
|
31987
|
-
return globalRegistry.get(inst);
|
|
31988
|
-
}
|
|
31989
|
-
const cl = inst.clone();
|
|
31990
|
-
globalRegistry.add(cl, args[0]);
|
|
31991
|
-
return cl;
|
|
31992
|
-
};
|
|
31993
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
31994
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
31995
|
-
inst.apply = (fn) => fn(inst);
|
|
31996
32608
|
return inst;
|
|
31997
32609
|
});
|
|
31998
32610
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -32003,21 +32615,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
32003
32615
|
inst.format = bag.format ?? null;
|
|
32004
32616
|
inst.minLength = bag.minimum ?? null;
|
|
32005
32617
|
inst.maxLength = bag.maximum ?? null;
|
|
32006
|
-
inst
|
|
32007
|
-
|
|
32008
|
-
|
|
32009
|
-
|
|
32010
|
-
|
|
32011
|
-
|
|
32012
|
-
|
|
32013
|
-
|
|
32014
|
-
|
|
32015
|
-
|
|
32016
|
-
|
|
32017
|
-
|
|
32018
|
-
|
|
32019
|
-
|
|
32020
|
-
|
|
32618
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
32619
|
+
regex(...args) {
|
|
32620
|
+
return this.check(_regex(...args));
|
|
32621
|
+
},
|
|
32622
|
+
includes(...args) {
|
|
32623
|
+
return this.check(_includes(...args));
|
|
32624
|
+
},
|
|
32625
|
+
startsWith(...args) {
|
|
32626
|
+
return this.check(_startsWith(...args));
|
|
32627
|
+
},
|
|
32628
|
+
endsWith(...args) {
|
|
32629
|
+
return this.check(_endsWith(...args));
|
|
32630
|
+
},
|
|
32631
|
+
min(...args) {
|
|
32632
|
+
return this.check(_minLength(...args));
|
|
32633
|
+
},
|
|
32634
|
+
max(...args) {
|
|
32635
|
+
return this.check(_maxLength(...args));
|
|
32636
|
+
},
|
|
32637
|
+
length(...args) {
|
|
32638
|
+
return this.check(_length(...args));
|
|
32639
|
+
},
|
|
32640
|
+
nonempty(...args) {
|
|
32641
|
+
return this.check(_minLength(1, ...args));
|
|
32642
|
+
},
|
|
32643
|
+
lowercase(params) {
|
|
32644
|
+
return this.check(_lowercase(params));
|
|
32645
|
+
},
|
|
32646
|
+
uppercase(params) {
|
|
32647
|
+
return this.check(_uppercase(params));
|
|
32648
|
+
},
|
|
32649
|
+
trim() {
|
|
32650
|
+
return this.check(_trim());
|
|
32651
|
+
},
|
|
32652
|
+
normalize(...args) {
|
|
32653
|
+
return this.check(_normalize(...args));
|
|
32654
|
+
},
|
|
32655
|
+
toLowerCase() {
|
|
32656
|
+
return this.check(_toLowerCase());
|
|
32657
|
+
},
|
|
32658
|
+
toUpperCase() {
|
|
32659
|
+
return this.check(_toUpperCase());
|
|
32660
|
+
},
|
|
32661
|
+
slugify() {
|
|
32662
|
+
return this.check(_slugify());
|
|
32663
|
+
}
|
|
32664
|
+
});
|
|
32021
32665
|
});
|
|
32022
32666
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
32023
32667
|
$ZodString.init(inst, def);
|
|
@@ -32096,7 +32740,7 @@ function url(params) {
|
|
|
32096
32740
|
}
|
|
32097
32741
|
function httpUrl(params) {
|
|
32098
32742
|
return _url(ZodURL, {
|
|
32099
|
-
protocol:
|
|
32743
|
+
protocol: regexes_exports.httpProtocol,
|
|
32100
32744
|
hostname: regexes_exports.domain,
|
|
32101
32745
|
...util_exports.normalizeParams(params)
|
|
32102
32746
|
});
|
|
@@ -32238,21 +32882,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
32238
32882
|
$ZodNumber.init(inst, def);
|
|
32239
32883
|
ZodType.init(inst, def);
|
|
32240
32884
|
inst._zod.processJSONSchema = (ctx2, json2, params) => numberProcessor(inst, ctx2, json2, params);
|
|
32241
|
-
inst
|
|
32242
|
-
|
|
32243
|
-
|
|
32244
|
-
|
|
32245
|
-
|
|
32246
|
-
|
|
32247
|
-
|
|
32248
|
-
|
|
32249
|
-
|
|
32250
|
-
|
|
32251
|
-
|
|
32252
|
-
|
|
32253
|
-
|
|
32254
|
-
|
|
32255
|
-
|
|
32885
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
32886
|
+
gt(value, params) {
|
|
32887
|
+
return this.check(_gt(value, params));
|
|
32888
|
+
},
|
|
32889
|
+
gte(value, params) {
|
|
32890
|
+
return this.check(_gte(value, params));
|
|
32891
|
+
},
|
|
32892
|
+
min(value, params) {
|
|
32893
|
+
return this.check(_gte(value, params));
|
|
32894
|
+
},
|
|
32895
|
+
lt(value, params) {
|
|
32896
|
+
return this.check(_lt(value, params));
|
|
32897
|
+
},
|
|
32898
|
+
lte(value, params) {
|
|
32899
|
+
return this.check(_lte(value, params));
|
|
32900
|
+
},
|
|
32901
|
+
max(value, params) {
|
|
32902
|
+
return this.check(_lte(value, params));
|
|
32903
|
+
},
|
|
32904
|
+
int(params) {
|
|
32905
|
+
return this.check(int(params));
|
|
32906
|
+
},
|
|
32907
|
+
safe(params) {
|
|
32908
|
+
return this.check(int(params));
|
|
32909
|
+
},
|
|
32910
|
+
positive(params) {
|
|
32911
|
+
return this.check(_gt(0, params));
|
|
32912
|
+
},
|
|
32913
|
+
nonnegative(params) {
|
|
32914
|
+
return this.check(_gte(0, params));
|
|
32915
|
+
},
|
|
32916
|
+
negative(params) {
|
|
32917
|
+
return this.check(_lt(0, params));
|
|
32918
|
+
},
|
|
32919
|
+
nonpositive(params) {
|
|
32920
|
+
return this.check(_lte(0, params));
|
|
32921
|
+
},
|
|
32922
|
+
multipleOf(value, params) {
|
|
32923
|
+
return this.check(_multipleOf(value, params));
|
|
32924
|
+
},
|
|
32925
|
+
step(value, params) {
|
|
32926
|
+
return this.check(_multipleOf(value, params));
|
|
32927
|
+
},
|
|
32928
|
+
finite() {
|
|
32929
|
+
return this;
|
|
32930
|
+
}
|
|
32931
|
+
});
|
|
32256
32932
|
const bag = inst._zod.bag;
|
|
32257
32933
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
32258
32934
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -32399,11 +33075,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
32399
33075
|
ZodType.init(inst, def);
|
|
32400
33076
|
inst._zod.processJSONSchema = (ctx2, json2, params) => arrayProcessor(inst, ctx2, json2, params);
|
|
32401
33077
|
inst.element = def.element;
|
|
32402
|
-
inst
|
|
32403
|
-
|
|
32404
|
-
|
|
32405
|
-
|
|
32406
|
-
|
|
33078
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
33079
|
+
min(n, params) {
|
|
33080
|
+
return this.check(_minLength(n, params));
|
|
33081
|
+
},
|
|
33082
|
+
nonempty(params) {
|
|
33083
|
+
return this.check(_minLength(1, params));
|
|
33084
|
+
},
|
|
33085
|
+
max(n, params) {
|
|
33086
|
+
return this.check(_maxLength(n, params));
|
|
33087
|
+
},
|
|
33088
|
+
length(n, params) {
|
|
33089
|
+
return this.check(_length(n, params));
|
|
33090
|
+
},
|
|
33091
|
+
unwrap() {
|
|
33092
|
+
return this.element;
|
|
33093
|
+
}
|
|
33094
|
+
});
|
|
32407
33095
|
});
|
|
32408
33096
|
function array(element, params) {
|
|
32409
33097
|
return _array(ZodArray, element, params);
|
|
@@ -32419,23 +33107,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
32419
33107
|
util_exports.defineLazy(inst, "shape", () => {
|
|
32420
33108
|
return def.shape;
|
|
32421
33109
|
});
|
|
32422
|
-
inst
|
|
32423
|
-
|
|
32424
|
-
|
|
32425
|
-
|
|
32426
|
-
|
|
32427
|
-
|
|
32428
|
-
|
|
32429
|
-
|
|
32430
|
-
|
|
32431
|
-
|
|
32432
|
-
|
|
32433
|
-
|
|
32434
|
-
|
|
32435
|
-
|
|
32436
|
-
|
|
32437
|
-
|
|
32438
|
-
|
|
33110
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
33111
|
+
keyof() {
|
|
33112
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
33113
|
+
},
|
|
33114
|
+
catchall(catchall) {
|
|
33115
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
33116
|
+
},
|
|
33117
|
+
passthrough() {
|
|
33118
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
33119
|
+
},
|
|
33120
|
+
loose() {
|
|
33121
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
33122
|
+
},
|
|
33123
|
+
strict() {
|
|
33124
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
33125
|
+
},
|
|
33126
|
+
strip() {
|
|
33127
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
33128
|
+
},
|
|
33129
|
+
extend(incoming) {
|
|
33130
|
+
return util_exports.extend(this, incoming);
|
|
33131
|
+
},
|
|
33132
|
+
safeExtend(incoming) {
|
|
33133
|
+
return util_exports.safeExtend(this, incoming);
|
|
33134
|
+
},
|
|
33135
|
+
merge(other) {
|
|
33136
|
+
return util_exports.merge(this, other);
|
|
33137
|
+
},
|
|
33138
|
+
pick(mask) {
|
|
33139
|
+
return util_exports.pick(this, mask);
|
|
33140
|
+
},
|
|
33141
|
+
omit(mask) {
|
|
33142
|
+
return util_exports.omit(this, mask);
|
|
33143
|
+
},
|
|
33144
|
+
partial(...args) {
|
|
33145
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
33146
|
+
},
|
|
33147
|
+
required(...args) {
|
|
33148
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
33149
|
+
}
|
|
33150
|
+
});
|
|
32439
33151
|
});
|
|
32440
33152
|
function object(shape, params) {
|
|
32441
33153
|
const def = {
|
|
@@ -32540,6 +33252,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
|
32540
33252
|
inst.valueType = def.valueType;
|
|
32541
33253
|
});
|
|
32542
33254
|
function record(keyType, valueType, params) {
|
|
33255
|
+
if (!valueType || !valueType._zod) {
|
|
33256
|
+
return new ZodRecord({
|
|
33257
|
+
type: "record",
|
|
33258
|
+
keyType: string2(),
|
|
33259
|
+
valueType: keyType,
|
|
33260
|
+
...util_exports.normalizeParams(valueType)
|
|
33261
|
+
});
|
|
33262
|
+
}
|
|
32543
33263
|
return new ZodRecord({
|
|
32544
33264
|
type: "record",
|
|
32545
33265
|
keyType,
|
|
@@ -32711,10 +33431,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
32711
33431
|
if (output instanceof Promise) {
|
|
32712
33432
|
return output.then((output2) => {
|
|
32713
33433
|
payload.value = output2;
|
|
33434
|
+
payload.fallback = true;
|
|
32714
33435
|
return payload;
|
|
32715
33436
|
});
|
|
32716
33437
|
}
|
|
32717
33438
|
payload.value = output;
|
|
33439
|
+
payload.fallback = true;
|
|
32718
33440
|
return payload;
|
|
32719
33441
|
};
|
|
32720
33442
|
});
|
|
@@ -32869,6 +33591,20 @@ function codec(in_, out, params) {
|
|
|
32869
33591
|
reverseTransform: params.encode
|
|
32870
33592
|
});
|
|
32871
33593
|
}
|
|
33594
|
+
function invertCodec(codec2) {
|
|
33595
|
+
const def = codec2._zod.def;
|
|
33596
|
+
return new ZodCodec({
|
|
33597
|
+
type: "pipe",
|
|
33598
|
+
in: def.out,
|
|
33599
|
+
out: def.in,
|
|
33600
|
+
transform: def.reverseTransform,
|
|
33601
|
+
reverseTransform: def.transform
|
|
33602
|
+
});
|
|
33603
|
+
}
|
|
33604
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
33605
|
+
ZodPipe.init(inst, def);
|
|
33606
|
+
$ZodPreprocess.init(inst, def);
|
|
33607
|
+
});
|
|
32872
33608
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
32873
33609
|
$ZodReadonly.init(inst, def);
|
|
32874
33610
|
ZodType.init(inst, def);
|
|
@@ -32948,8 +33684,8 @@ function custom(fn, _params) {
|
|
|
32948
33684
|
function refine(fn, _params = {}) {
|
|
32949
33685
|
return _refine(ZodCustom, fn, _params);
|
|
32950
33686
|
}
|
|
32951
|
-
function superRefine(fn) {
|
|
32952
|
-
return _superRefine(fn);
|
|
33687
|
+
function superRefine(fn, params) {
|
|
33688
|
+
return _superRefine(fn, params);
|
|
32953
33689
|
}
|
|
32954
33690
|
var describe2 = describe;
|
|
32955
33691
|
var meta2 = meta;
|
|
@@ -32987,7 +33723,11 @@ function json(params) {
|
|
|
32987
33723
|
return jsonSchema;
|
|
32988
33724
|
}
|
|
32989
33725
|
function preprocess(fn, schema) {
|
|
32990
|
-
return
|
|
33726
|
+
return new ZodPreprocess({
|
|
33727
|
+
type: "pipe",
|
|
33728
|
+
in: transform(fn),
|
|
33729
|
+
out: schema
|
|
33730
|
+
});
|
|
32991
33731
|
}
|
|
32992
33732
|
|
|
32993
33733
|
// node_modules/zod/v4/classic/compat.js
|
|
@@ -33408,12 +34148,6 @@ function convertBaseSchema(schema, ctx2) {
|
|
|
33408
34148
|
default:
|
|
33409
34149
|
throw new Error(`Unsupported type: ${type}`);
|
|
33410
34150
|
}
|
|
33411
|
-
if (schema.description) {
|
|
33412
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
33413
|
-
}
|
|
33414
|
-
if (schema.default !== void 0) {
|
|
33415
|
-
zodSchema = zodSchema.default(schema.default);
|
|
33416
|
-
}
|
|
33417
34151
|
return zodSchema;
|
|
33418
34152
|
}
|
|
33419
34153
|
function convertSchema(schema, ctx2) {
|
|
@@ -33450,6 +34184,9 @@ function convertSchema(schema, ctx2) {
|
|
|
33450
34184
|
if (schema.readOnly === true) {
|
|
33451
34185
|
baseSchema = z.readonly(baseSchema);
|
|
33452
34186
|
}
|
|
34187
|
+
if (schema.default !== void 0) {
|
|
34188
|
+
baseSchema = baseSchema.default(schema.default);
|
|
34189
|
+
}
|
|
33453
34190
|
const extraMeta = {};
|
|
33454
34191
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
33455
34192
|
for (const key of coreMetadataKeys) {
|
|
@@ -33471,23 +34208,32 @@ function convertSchema(schema, ctx2) {
|
|
|
33471
34208
|
if (Object.keys(extraMeta).length > 0) {
|
|
33472
34209
|
ctx2.registry.add(baseSchema, extraMeta);
|
|
33473
34210
|
}
|
|
34211
|
+
if (schema.description) {
|
|
34212
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
34213
|
+
}
|
|
33474
34214
|
return baseSchema;
|
|
33475
34215
|
}
|
|
33476
34216
|
function fromJSONSchema(schema, params) {
|
|
33477
34217
|
if (typeof schema === "boolean") {
|
|
33478
34218
|
return schema ? z.any() : z.never();
|
|
33479
34219
|
}
|
|
33480
|
-
|
|
33481
|
-
|
|
34220
|
+
let normalized;
|
|
34221
|
+
try {
|
|
34222
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
34223
|
+
} catch {
|
|
34224
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
34225
|
+
}
|
|
34226
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
34227
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
33482
34228
|
const ctx2 = {
|
|
33483
34229
|
version: version2,
|
|
33484
34230
|
defs,
|
|
33485
34231
|
refs: /* @__PURE__ */ new Map(),
|
|
33486
34232
|
processing: /* @__PURE__ */ new Set(),
|
|
33487
|
-
rootSchema:
|
|
34233
|
+
rootSchema: normalized,
|
|
33488
34234
|
registry: params?.registry ?? globalRegistry
|
|
33489
34235
|
};
|
|
33490
|
-
return convertSchema(
|
|
34236
|
+
return convertSchema(normalized, ctx2);
|
|
33491
34237
|
}
|
|
33492
34238
|
|
|
33493
34239
|
// node_modules/zod/v4/classic/coerce.js
|
|
@@ -34358,8 +35104,8 @@ function streamClaudeAgentSdk(model, context, options) {
|
|
|
34358
35104
|
ctx().activeQuery = sdkQuery;
|
|
34359
35105
|
}
|
|
34360
35106
|
finalizeCurrentStream(ctx().turnOutput?.stopReason);
|
|
34361
|
-
}).catch((
|
|
34362
|
-
debug(`provider: query error, model=${model.id}, aborted=${Boolean(options?.signal?.aborted)}, error=`,
|
|
35107
|
+
}).catch((error51) => {
|
|
35108
|
+
debug(`provider: query error, model=${model.id}, aborted=${Boolean(options?.signal?.aborted)}, error=`, error51);
|
|
34363
35109
|
if ((wasAborted || options?.signal?.aborted) && sharedSession) {
|
|
34364
35110
|
sharedSession = { ...sharedSession, needsRebuild: true, forceRotate: true };
|
|
34365
35111
|
} else {
|
|
@@ -34368,7 +35114,7 @@ function streamClaudeAgentSdk(model, context, options) {
|
|
|
34368
35114
|
ctx().deferredUserMessages = [];
|
|
34369
35115
|
if (ctx().turnOutput) {
|
|
34370
35116
|
ctx().turnOutput.stopReason = options?.signal?.aborted ? "aborted" : "error";
|
|
34371
|
-
ctx().turnOutput.errorMessage =
|
|
35117
|
+
ctx().turnOutput.errorMessage = error51 instanceof Error ? error51.message : String(error51);
|
|
34372
35118
|
}
|
|
34373
35119
|
ctx().currentPiStream?.push({ type: "error", reason: ctx().turnOutput?.stopReason ?? "error", error: ctx().turnOutput });
|
|
34374
35120
|
ctx().currentPiStream?.end();
|