@glasstrace/sdk 1.10.2 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -8
- package/dist/async-context/index.cjs +1189 -440
- package/dist/async-context/index.cjs.map +1 -1
- package/dist/async-context/index.js +2 -2
- package/dist/{capture-error-BeuEXXJO.d.cts → capture-error-CRQSqKgd.d.cts} +2 -2
- package/dist/{capture-error-D02pzB7q.d.ts → capture-error-CqCbjoMq.d.ts} +2 -2
- package/dist/{chunk-OXM2BZMF.js → chunk-4YRYR32D.js} +2 -2
- package/dist/{chunk-XG6WR2KS.js → chunk-6NKMAKMI.js} +3 -3
- package/dist/{chunk-6RKS3DNA.js → chunk-BN5DVIUO.js} +1176 -424
- package/dist/chunk-BN5DVIUO.js.map +1 -0
- package/dist/{chunk-QS5RZ2TC.js → chunk-CZQN6G4I.js} +28 -22
- package/dist/chunk-CZQN6G4I.js.map +1 -0
- package/dist/{chunk-D54FMQHF.js → chunk-FFNGE5RR.js} +2 -2
- package/dist/{chunk-RL43PU2X.js → chunk-J3ZCVE67.js} +2 -2
- package/dist/{chunk-BSVWJSVX.js → chunk-KBHGPQZ2.js} +2 -2
- package/dist/{chunk-CIKPFJOM.js → chunk-KOYZJN6G.js} +310 -20
- package/dist/chunk-KOYZJN6G.js.map +1 -0
- package/dist/{chunk-M5GO2SSO.js → chunk-M3ZTG4P5.js} +2 -2
- package/dist/{chunk-UMGZJYC4.js → chunk-V75ZB4G4.js} +10 -5
- package/dist/chunk-V75ZB4G4.js.map +1 -0
- package/dist/{chunk-ZBQQXVHD.js → chunk-YIEXKQYP.js} +2 -67
- package/dist/chunk-YIEXKQYP.js.map +1 -0
- package/dist/{chunk-QVTONMVZ.js → chunk-ZIL2IY4C.js} +2 -2
- package/dist/cli/init.cjs +1672 -576
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +33 -20
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/mcp-add.cjs +1509 -521
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +34 -16
- package/dist/cli/mcp-add.js.map +1 -1
- package/dist/cli/status.cjs +6 -1
- package/dist/cli/status.cjs.map +1 -1
- package/dist/cli/status.js +7 -2
- package/dist/cli/status.js.map +1 -1
- package/dist/cli/uninit.cjs +6 -1
- package/dist/cli/uninit.cjs.map +1 -1
- package/dist/cli/uninit.js +4 -4
- package/dist/cli/upgrade-instructions.cjs +383 -112
- package/dist/cli/upgrade-instructions.cjs.map +1 -1
- package/dist/cli/upgrade-instructions.js +72 -20
- package/dist/cli/upgrade-instructions.js.map +1 -1
- package/dist/cli/validate.cjs +1168 -422
- package/dist/cli/validate.cjs.map +1 -1
- package/dist/cli/validate.js +2 -2
- package/dist/{correlation-id-NAapJ5jn.d.cts → correlation-id-CFpyJsKv.d.cts} +1 -1
- package/dist/{correlation-id-B_K8adD6.d.ts → correlation-id-DPXyY9-3.d.ts} +1 -1
- package/dist/edge-entry.cjs +1197 -448
- package/dist/edge-entry.cjs.map +1 -1
- package/dist/edge-entry.d.cts +2 -2
- package/dist/edge-entry.d.ts +2 -2
- package/dist/edge-entry.js +4 -4
- package/dist/index.cjs +1341 -553
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-CkTf_boH.d.cts → index.d-D-jdiIPU.d.cts} +1 -1
- package/dist/{index.d-CkTf_boH.d.ts → index.d-D-jdiIPU.d.ts} +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/dist/middleware/index.cjs +1192 -443
- package/dist/middleware/index.cjs.map +1 -1
- package/dist/middleware/index.js +2 -2
- package/dist/node-entry.cjs +1329 -551
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.d.cts +3 -3
- package/dist/node-entry.d.ts +3 -3
- package/dist/node-entry.js +8 -8
- package/dist/node-subpath.cjs +1168 -422
- package/dist/node-subpath.cjs.map +1 -1
- package/dist/node-subpath.d.cts +1 -1
- package/dist/node-subpath.d.ts +1 -1
- package/dist/node-subpath.js +3 -3
- package/dist/{source-map-uploader-CLYCE2TZ.js → source-map-uploader-K67LTPBG.js} +3 -3
- package/dist/trpc/index.cjs +1187 -438
- package/dist/trpc/index.cjs.map +1 -1
- package/dist/trpc/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-6RKS3DNA.js.map +0 -1
- package/dist/chunk-CIKPFJOM.js.map +0 -1
- package/dist/chunk-QS5RZ2TC.js.map +0 -1
- package/dist/chunk-UMGZJYC4.js.map +0 -1
- package/dist/chunk-ZBQQXVHD.js.map +0 -1
- /package/dist/{chunk-OXM2BZMF.js.map → chunk-4YRYR32D.js.map} +0 -0
- /package/dist/{chunk-XG6WR2KS.js.map → chunk-6NKMAKMI.js.map} +0 -0
- /package/dist/{chunk-D54FMQHF.js.map → chunk-FFNGE5RR.js.map} +0 -0
- /package/dist/{chunk-RL43PU2X.js.map → chunk-J3ZCVE67.js.map} +0 -0
- /package/dist/{chunk-BSVWJSVX.js.map → chunk-KBHGPQZ2.js.map} +0 -0
- /package/dist/{chunk-M5GO2SSO.js.map → chunk-M3ZTG4P5.js.map} +0 -0
- /package/dist/{chunk-QVTONMVZ.js.map → chunk-ZIL2IY4C.js.map} +0 -0
- /package/dist/{source-map-uploader-CLYCE2TZ.js.map → source-map-uploader-K67LTPBG.js.map} +0 -0
package/dist/edge-entry.cjs
CHANGED
|
@@ -132,8 +132,8 @@ var major = VERSION.split(".")[0];
|
|
|
132
132
|
var GLOBAL_OPENTELEMETRY_API_KEY = /* @__PURE__ */ Symbol.for(`opentelemetry.js.api.${major}`);
|
|
133
133
|
var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
134
134
|
function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
135
|
-
var
|
|
136
|
-
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (
|
|
135
|
+
var _a3;
|
|
136
|
+
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== void 0 ? _a3 : {
|
|
137
137
|
version: VERSION
|
|
138
138
|
};
|
|
139
139
|
if (!allowOverride && api[type]) {
|
|
@@ -151,8 +151,8 @@ function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
|
151
151
|
return true;
|
|
152
152
|
}
|
|
153
153
|
function getGlobal(type) {
|
|
154
|
-
var
|
|
155
|
-
const globalVersion = (
|
|
154
|
+
var _a3, _b;
|
|
155
|
+
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === void 0 ? void 0 : _a3.version;
|
|
156
156
|
if (!globalVersion || !isCompatible(globalVersion)) {
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
@@ -257,10 +257,10 @@ var DiagAPI = class _DiagAPI {
|
|
|
257
257
|
}
|
|
258
258
|
const self2 = this;
|
|
259
259
|
const setLogger = (logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {
|
|
260
|
-
var
|
|
260
|
+
var _a3, _b, _c;
|
|
261
261
|
if (logger === self2) {
|
|
262
262
|
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
263
|
-
self2.error((
|
|
263
|
+
self2.error((_a3 = err.stack) !== null && _a3 !== void 0 ? _a3 : err.message);
|
|
264
264
|
return false;
|
|
265
265
|
}
|
|
266
266
|
if (typeof optionsOrLogLevel === "number") {
|
|
@@ -478,8 +478,8 @@ function setSpanContext(context2, spanContext) {
|
|
|
478
478
|
return setSpan(context2, new NonRecordingSpan(spanContext));
|
|
479
479
|
}
|
|
480
480
|
function getSpanContext(context2) {
|
|
481
|
-
var
|
|
482
|
-
return (
|
|
481
|
+
var _a3;
|
|
482
|
+
return (_a3 = getSpan(context2)) === null || _a3 === void 0 ? void 0 : _a3.spanContext();
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
// ../../node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js
|
|
@@ -699,12 +699,12 @@ var ProxyTracerProvider = class {
|
|
|
699
699
|
* Get a {@link ProxyTracer}
|
|
700
700
|
*/
|
|
701
701
|
getTracer(name, version2, options) {
|
|
702
|
-
var
|
|
703
|
-
return (
|
|
702
|
+
var _a3;
|
|
703
|
+
return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== void 0 ? _a3 : new ProxyTracer(this, name, version2, options);
|
|
704
704
|
}
|
|
705
705
|
getDelegate() {
|
|
706
|
-
var
|
|
707
|
-
return (
|
|
706
|
+
var _a3;
|
|
707
|
+
return (_a3 = this._delegate) !== null && _a3 !== void 0 ? _a3 : NOOP_TRACER_PROVIDER;
|
|
708
708
|
}
|
|
709
709
|
/**
|
|
710
710
|
* Set the delegate tracer provider
|
|
@@ -713,8 +713,8 @@ var ProxyTracerProvider = class {
|
|
|
713
713
|
this._delegate = delegate;
|
|
714
714
|
}
|
|
715
715
|
getDelegateTracer(name, version2, options) {
|
|
716
|
-
var
|
|
717
|
-
return (
|
|
716
|
+
var _a3;
|
|
717
|
+
return (_a3 = this._delegate) === null || _a3 === void 0 ? void 0 : _a3.getTracer(name, version2, options);
|
|
718
718
|
}
|
|
719
719
|
};
|
|
720
720
|
|
|
@@ -847,6 +847,7 @@ __export(external_exports, {
|
|
|
847
847
|
ZodOptional: () => ZodOptional,
|
|
848
848
|
ZodPipe: () => ZodPipe,
|
|
849
849
|
ZodPrefault: () => ZodPrefault,
|
|
850
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
850
851
|
ZodPromise: () => ZodPromise,
|
|
851
852
|
ZodReadonly: () => ZodReadonly,
|
|
852
853
|
ZodRealError: () => ZodRealError,
|
|
@@ -925,6 +926,7 @@ __export(external_exports, {
|
|
|
925
926
|
int32: () => int32,
|
|
926
927
|
int64: () => int64,
|
|
927
928
|
intersection: () => intersection,
|
|
929
|
+
invertCodec: () => invertCodec,
|
|
928
930
|
ipv4: () => ipv42,
|
|
929
931
|
ipv6: () => ipv62,
|
|
930
932
|
iso: () => iso_exports,
|
|
@@ -1106,6 +1108,7 @@ __export(core_exports2, {
|
|
|
1106
1108
|
$ZodOptional: () => $ZodOptional,
|
|
1107
1109
|
$ZodPipe: () => $ZodPipe,
|
|
1108
1110
|
$ZodPrefault: () => $ZodPrefault,
|
|
1111
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
1109
1112
|
$ZodPromise: () => $ZodPromise,
|
|
1110
1113
|
$ZodReadonly: () => $ZodReadonly,
|
|
1111
1114
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -1305,7 +1308,8 @@ __export(core_exports2, {
|
|
|
1305
1308
|
});
|
|
1306
1309
|
|
|
1307
1310
|
// ../../node_modules/zod/v4/core/core.js
|
|
1308
|
-
var
|
|
1311
|
+
var _a;
|
|
1312
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
1309
1313
|
status: "aborted"
|
|
1310
1314
|
});
|
|
1311
1315
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1340,10 +1344,10 @@ function $constructor(name, initializer3, params) {
|
|
|
1340
1344
|
}
|
|
1341
1345
|
Object.defineProperty(Definition, "name", { value: name });
|
|
1342
1346
|
function _(def) {
|
|
1343
|
-
var
|
|
1347
|
+
var _a3;
|
|
1344
1348
|
const inst = params?.Parent ? new Definition() : this;
|
|
1345
1349
|
init(inst, def);
|
|
1346
|
-
(
|
|
1350
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
1347
1351
|
for (const fn of inst._zod.deferred) {
|
|
1348
1352
|
fn();
|
|
1349
1353
|
}
|
|
@@ -1372,7 +1376,8 @@ var $ZodEncodeError = class extends Error {
|
|
|
1372
1376
|
this.name = "ZodEncodeError";
|
|
1373
1377
|
}
|
|
1374
1378
|
};
|
|
1375
|
-
|
|
1379
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
1380
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
1376
1381
|
function config(newConfig) {
|
|
1377
1382
|
if (newConfig)
|
|
1378
1383
|
Object.assign(globalConfig, newConfig);
|
|
@@ -1405,6 +1410,7 @@ __export(util_exports, {
|
|
|
1405
1410
|
defineLazy: () => defineLazy,
|
|
1406
1411
|
esc: () => esc,
|
|
1407
1412
|
escapeRegex: () => escapeRegex,
|
|
1413
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
1408
1414
|
extend: () => extend,
|
|
1409
1415
|
finalizeIssue: () => finalizeIssue,
|
|
1410
1416
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -1493,19 +1499,12 @@ function cleanRegex(source) {
|
|
|
1493
1499
|
return source.slice(start, end);
|
|
1494
1500
|
}
|
|
1495
1501
|
function floatSafeRemainder(val, step) {
|
|
1496
|
-
const
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1499
|
-
if (
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
1506
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
1507
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
1508
|
-
return valInt % stepInt / 10 ** decCount;
|
|
1502
|
+
const ratio = val / step;
|
|
1503
|
+
const roundedRatio = Math.round(ratio);
|
|
1504
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
1505
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
1506
|
+
return 0;
|
|
1507
|
+
return ratio - roundedRatio;
|
|
1509
1508
|
}
|
|
1510
1509
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
1511
1510
|
function defineLazy(object2, key, getter) {
|
|
@@ -1587,7 +1586,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
|
|
|
1587
1586
|
function isObject(data) {
|
|
1588
1587
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
1589
1588
|
}
|
|
1590
|
-
var allowsEval = cached(() => {
|
|
1589
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
1590
|
+
if (globalConfig.jitless) {
|
|
1591
|
+
return false;
|
|
1592
|
+
}
|
|
1591
1593
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
1592
1594
|
return false;
|
|
1593
1595
|
}
|
|
@@ -1620,6 +1622,10 @@ function shallowClone(o) {
|
|
|
1620
1622
|
return { ...o };
|
|
1621
1623
|
if (Array.isArray(o))
|
|
1622
1624
|
return [...o];
|
|
1625
|
+
if (o instanceof Map)
|
|
1626
|
+
return new Map(o);
|
|
1627
|
+
if (o instanceof Set)
|
|
1628
|
+
return new Set(o);
|
|
1623
1629
|
return o;
|
|
1624
1630
|
}
|
|
1625
1631
|
function numKeys(data) {
|
|
@@ -1676,7 +1682,14 @@ var getParsedType = (data) => {
|
|
|
1676
1682
|
}
|
|
1677
1683
|
};
|
|
1678
1684
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
1679
|
-
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
1685
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
1686
|
+
"string",
|
|
1687
|
+
"number",
|
|
1688
|
+
"bigint",
|
|
1689
|
+
"boolean",
|
|
1690
|
+
"symbol",
|
|
1691
|
+
"undefined"
|
|
1692
|
+
]);
|
|
1680
1693
|
function escapeRegex(str) {
|
|
1681
1694
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1682
1695
|
}
|
|
@@ -1845,6 +1858,9 @@ function safeExtend(schema, shape) {
|
|
|
1845
1858
|
return clone(schema, def);
|
|
1846
1859
|
}
|
|
1847
1860
|
function merge(a, b) {
|
|
1861
|
+
if (a._zod.def.checks?.length) {
|
|
1862
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
1863
|
+
}
|
|
1848
1864
|
const def = mergeDefs(a._zod.def, {
|
|
1849
1865
|
get shape() {
|
|
1850
1866
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -1854,8 +1870,7 @@ function merge(a, b) {
|
|
|
1854
1870
|
get catchall() {
|
|
1855
1871
|
return b._zod.def.catchall;
|
|
1856
1872
|
},
|
|
1857
|
-
checks: []
|
|
1858
|
-
// delete existing checks
|
|
1873
|
+
checks: b._zod.def.checks ?? []
|
|
1859
1874
|
});
|
|
1860
1875
|
return clone(a, def);
|
|
1861
1876
|
}
|
|
@@ -1938,10 +1953,20 @@ function aborted(x, startIndex = 0) {
|
|
|
1938
1953
|
}
|
|
1939
1954
|
return false;
|
|
1940
1955
|
}
|
|
1956
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
1957
|
+
if (x.aborted === true)
|
|
1958
|
+
return true;
|
|
1959
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
1960
|
+
if (x.issues[i]?.continue === false) {
|
|
1961
|
+
return true;
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
return false;
|
|
1965
|
+
}
|
|
1941
1966
|
function prefixIssues(path, issues) {
|
|
1942
1967
|
return issues.map((iss) => {
|
|
1943
|
-
var
|
|
1944
|
-
(
|
|
1968
|
+
var _a3;
|
|
1969
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
1945
1970
|
iss.path.unshift(path);
|
|
1946
1971
|
return iss;
|
|
1947
1972
|
});
|
|
@@ -1950,17 +1975,14 @@ function unwrapMessage(message) {
|
|
|
1950
1975
|
return typeof message === "string" ? message : message?.message;
|
|
1951
1976
|
}
|
|
1952
1977
|
function finalizeIssue(iss, ctx, config2) {
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1978
|
+
const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
|
|
1979
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
1980
|
+
rest.path ?? (rest.path = []);
|
|
1981
|
+
rest.message = message;
|
|
1982
|
+
if (ctx?.reportInput) {
|
|
1983
|
+
rest.input = _input;
|
|
1957
1984
|
}
|
|
1958
|
-
|
|
1959
|
-
delete full.continue;
|
|
1960
|
-
if (!ctx?.reportInput) {
|
|
1961
|
-
delete full.input;
|
|
1962
|
-
}
|
|
1963
|
-
return full;
|
|
1985
|
+
return rest;
|
|
1964
1986
|
}
|
|
1965
1987
|
function getSizableOrigin(input) {
|
|
1966
1988
|
if (input instanceof Set)
|
|
@@ -2077,10 +2099,10 @@ var initializer = (inst, def) => {
|
|
|
2077
2099
|
};
|
|
2078
2100
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
2079
2101
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
2080
|
-
function flattenError(
|
|
2102
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
2081
2103
|
const fieldErrors = {};
|
|
2082
2104
|
const formErrors = [];
|
|
2083
|
-
for (const sub of
|
|
2105
|
+
for (const sub of error51.issues) {
|
|
2084
2106
|
if (sub.path.length > 0) {
|
|
2085
2107
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
2086
2108
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -2090,50 +2112,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
|
|
|
2090
2112
|
}
|
|
2091
2113
|
return { formErrors, fieldErrors };
|
|
2092
2114
|
}
|
|
2093
|
-
function formatError(
|
|
2115
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
2094
2116
|
const fieldErrors = { _errors: [] };
|
|
2095
|
-
const processError = (
|
|
2096
|
-
for (const issue2 of
|
|
2117
|
+
const processError = (error52, path = []) => {
|
|
2118
|
+
for (const issue2 of error52.issues) {
|
|
2097
2119
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
2098
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
2120
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
2099
2121
|
} else if (issue2.code === "invalid_key") {
|
|
2100
|
-
processError({ issues: issue2.issues });
|
|
2122
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
2101
2123
|
} else if (issue2.code === "invalid_element") {
|
|
2102
|
-
processError({ issues: issue2.issues });
|
|
2103
|
-
} else if (issue2.path.length === 0) {
|
|
2104
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
2124
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
2105
2125
|
} else {
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2126
|
+
const fullpath = [...path, ...issue2.path];
|
|
2127
|
+
if (fullpath.length === 0) {
|
|
2128
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
2129
|
+
} else {
|
|
2130
|
+
let curr = fieldErrors;
|
|
2131
|
+
let i = 0;
|
|
2132
|
+
while (i < fullpath.length) {
|
|
2133
|
+
const el = fullpath[i];
|
|
2134
|
+
const terminal = i === fullpath.length - 1;
|
|
2135
|
+
if (!terminal) {
|
|
2136
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
2137
|
+
} else {
|
|
2138
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
2139
|
+
curr[el]._errors.push(mapper(issue2));
|
|
2140
|
+
}
|
|
2141
|
+
curr = curr[el];
|
|
2142
|
+
i++;
|
|
2116
2143
|
}
|
|
2117
|
-
curr = curr[el];
|
|
2118
|
-
i++;
|
|
2119
2144
|
}
|
|
2120
2145
|
}
|
|
2121
2146
|
}
|
|
2122
2147
|
};
|
|
2123
|
-
processError(
|
|
2148
|
+
processError(error51);
|
|
2124
2149
|
return fieldErrors;
|
|
2125
2150
|
}
|
|
2126
|
-
function treeifyError(
|
|
2151
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
2127
2152
|
const result = { errors: [] };
|
|
2128
|
-
const processError = (
|
|
2129
|
-
var
|
|
2130
|
-
for (const issue2 of
|
|
2153
|
+
const processError = (error52, path = []) => {
|
|
2154
|
+
var _a3, _b;
|
|
2155
|
+
for (const issue2 of error52.issues) {
|
|
2131
2156
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
2132
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
2157
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
2133
2158
|
} else if (issue2.code === "invalid_key") {
|
|
2134
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
2159
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
2135
2160
|
} else if (issue2.code === "invalid_element") {
|
|
2136
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
2161
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
2137
2162
|
} else {
|
|
2138
2163
|
const fullpath = [...path, ...issue2.path];
|
|
2139
2164
|
if (fullpath.length === 0) {
|
|
@@ -2147,7 +2172,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
2147
2172
|
const terminal = i === fullpath.length - 1;
|
|
2148
2173
|
if (typeof el === "string") {
|
|
2149
2174
|
curr.properties ?? (curr.properties = {});
|
|
2150
|
-
(
|
|
2175
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
2151
2176
|
curr = curr.properties[el];
|
|
2152
2177
|
} else {
|
|
2153
2178
|
curr.items ?? (curr.items = []);
|
|
@@ -2162,7 +2187,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
2162
2187
|
}
|
|
2163
2188
|
}
|
|
2164
2189
|
};
|
|
2165
|
-
processError(
|
|
2190
|
+
processError(error51);
|
|
2166
2191
|
return result;
|
|
2167
2192
|
}
|
|
2168
2193
|
function toDotPath(_path) {
|
|
@@ -2183,9 +2208,9 @@ function toDotPath(_path) {
|
|
|
2183
2208
|
}
|
|
2184
2209
|
return segs.join("");
|
|
2185
2210
|
}
|
|
2186
|
-
function prettifyError(
|
|
2211
|
+
function prettifyError(error51) {
|
|
2187
2212
|
const lines = [];
|
|
2188
|
-
const issues = [...
|
|
2213
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
2189
2214
|
for (const issue2 of issues) {
|
|
2190
2215
|
lines.push(`\u2716 ${issue2.message}`);
|
|
2191
2216
|
if (issue2.path?.length)
|
|
@@ -2196,7 +2221,7 @@ function prettifyError(error48) {
|
|
|
2196
2221
|
|
|
2197
2222
|
// ../../node_modules/zod/v4/core/parse.js
|
|
2198
2223
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
2199
|
-
const ctx = _ctx ?
|
|
2224
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
2200
2225
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
2201
2226
|
if (result instanceof Promise) {
|
|
2202
2227
|
throw new $ZodAsyncError();
|
|
@@ -2210,7 +2235,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
2210
2235
|
};
|
|
2211
2236
|
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
2212
2237
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
2213
|
-
const ctx = _ctx ?
|
|
2238
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
2214
2239
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
2215
2240
|
if (result instanceof Promise)
|
|
2216
2241
|
result = await result;
|
|
@@ -2235,7 +2260,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
2235
2260
|
};
|
|
2236
2261
|
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
2237
2262
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2238
|
-
const ctx = _ctx ?
|
|
2263
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
2239
2264
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
2240
2265
|
if (result instanceof Promise)
|
|
2241
2266
|
result = await result;
|
|
@@ -2246,7 +2271,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
2246
2271
|
};
|
|
2247
2272
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
2248
2273
|
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
2249
|
-
const ctx = _ctx ?
|
|
2274
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2250
2275
|
return _parse(_Err)(schema, value, ctx);
|
|
2251
2276
|
};
|
|
2252
2277
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -2255,7 +2280,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
|
|
|
2255
2280
|
};
|
|
2256
2281
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
2257
2282
|
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2258
|
-
const ctx = _ctx ?
|
|
2283
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2259
2284
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
2260
2285
|
};
|
|
2261
2286
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -2264,7 +2289,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
2264
2289
|
};
|
|
2265
2290
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
2266
2291
|
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
2267
|
-
const ctx = _ctx ?
|
|
2292
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2268
2293
|
return _safeParse(_Err)(schema, value, ctx);
|
|
2269
2294
|
};
|
|
2270
2295
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -2273,7 +2298,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
|
2273
2298
|
};
|
|
2274
2299
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
2275
2300
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2276
|
-
const ctx = _ctx ?
|
|
2301
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
2277
2302
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
2278
2303
|
};
|
|
2279
2304
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -2306,6 +2331,7 @@ __export(regexes_exports, {
|
|
|
2306
2331
|
hex: () => hex,
|
|
2307
2332
|
hostname: () => hostname,
|
|
2308
2333
|
html5Email: () => html5Email,
|
|
2334
|
+
httpProtocol: () => httpProtocol,
|
|
2309
2335
|
idnEmail: () => idnEmail,
|
|
2310
2336
|
integer: () => integer,
|
|
2311
2337
|
ipv4: () => ipv4,
|
|
@@ -2344,7 +2370,7 @@ __export(regexes_exports, {
|
|
|
2344
2370
|
uuid7: () => uuid7,
|
|
2345
2371
|
xid: () => xid
|
|
2346
2372
|
});
|
|
2347
|
-
var cuid = /^[cC][
|
|
2373
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
2348
2374
|
var cuid2 = /^[0-9a-z]+$/;
|
|
2349
2375
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
2350
2376
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -2383,6 +2409,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
|
|
|
2383
2409
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
2384
2410
|
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])?)*\.?$/;
|
|
2385
2411
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
2412
|
+
var httpProtocol = /^https?$/;
|
|
2386
2413
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
2387
2414
|
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])))`;
|
|
2388
2415
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -2441,10 +2468,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
2441
2468
|
|
|
2442
2469
|
// ../../node_modules/zod/v4/core/checks.js
|
|
2443
2470
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
2444
|
-
var
|
|
2471
|
+
var _a3;
|
|
2445
2472
|
inst._zod ?? (inst._zod = {});
|
|
2446
2473
|
inst._zod.def = def;
|
|
2447
|
-
(
|
|
2474
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
2448
2475
|
});
|
|
2449
2476
|
var numericOriginMap = {
|
|
2450
2477
|
number: "number",
|
|
@@ -2510,8 +2537,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
2510
2537
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
2511
2538
|
$ZodCheck.init(inst, def);
|
|
2512
2539
|
inst._zod.onattach.push((inst2) => {
|
|
2513
|
-
var
|
|
2514
|
-
(
|
|
2540
|
+
var _a3;
|
|
2541
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
2515
2542
|
});
|
|
2516
2543
|
inst._zod.check = (payload) => {
|
|
2517
2544
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -2644,9 +2671,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
2644
2671
|
};
|
|
2645
2672
|
});
|
|
2646
2673
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
2647
|
-
var
|
|
2674
|
+
var _a3;
|
|
2648
2675
|
$ZodCheck.init(inst, def);
|
|
2649
|
-
(
|
|
2676
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2650
2677
|
const val = payload.value;
|
|
2651
2678
|
return !nullish(val) && val.size !== void 0;
|
|
2652
2679
|
});
|
|
@@ -2672,9 +2699,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
2672
2699
|
};
|
|
2673
2700
|
});
|
|
2674
2701
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
2675
|
-
var
|
|
2702
|
+
var _a3;
|
|
2676
2703
|
$ZodCheck.init(inst, def);
|
|
2677
|
-
(
|
|
2704
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2678
2705
|
const val = payload.value;
|
|
2679
2706
|
return !nullish(val) && val.size !== void 0;
|
|
2680
2707
|
});
|
|
@@ -2700,9 +2727,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
2700
2727
|
};
|
|
2701
2728
|
});
|
|
2702
2729
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
2703
|
-
var
|
|
2730
|
+
var _a3;
|
|
2704
2731
|
$ZodCheck.init(inst, def);
|
|
2705
|
-
(
|
|
2732
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2706
2733
|
const val = payload.value;
|
|
2707
2734
|
return !nullish(val) && val.size !== void 0;
|
|
2708
2735
|
});
|
|
@@ -2730,9 +2757,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
2730
2757
|
};
|
|
2731
2758
|
});
|
|
2732
2759
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
2733
|
-
var
|
|
2760
|
+
var _a3;
|
|
2734
2761
|
$ZodCheck.init(inst, def);
|
|
2735
|
-
(
|
|
2762
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2736
2763
|
const val = payload.value;
|
|
2737
2764
|
return !nullish(val) && val.length !== void 0;
|
|
2738
2765
|
});
|
|
@@ -2759,9 +2786,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
2759
2786
|
};
|
|
2760
2787
|
});
|
|
2761
2788
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
2762
|
-
var
|
|
2789
|
+
var _a3;
|
|
2763
2790
|
$ZodCheck.init(inst, def);
|
|
2764
|
-
(
|
|
2791
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2765
2792
|
const val = payload.value;
|
|
2766
2793
|
return !nullish(val) && val.length !== void 0;
|
|
2767
2794
|
});
|
|
@@ -2788,9 +2815,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2788
2815
|
};
|
|
2789
2816
|
});
|
|
2790
2817
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
2791
|
-
var
|
|
2818
|
+
var _a3;
|
|
2792
2819
|
$ZodCheck.init(inst, def);
|
|
2793
|
-
(
|
|
2820
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2794
2821
|
const val = payload.value;
|
|
2795
2822
|
return !nullish(val) && val.length !== void 0;
|
|
2796
2823
|
});
|
|
@@ -2819,7 +2846,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2819
2846
|
};
|
|
2820
2847
|
});
|
|
2821
2848
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2822
|
-
var
|
|
2849
|
+
var _a3, _b;
|
|
2823
2850
|
$ZodCheck.init(inst, def);
|
|
2824
2851
|
inst._zod.onattach.push((inst2) => {
|
|
2825
2852
|
const bag = inst2._zod.bag;
|
|
@@ -2830,7 +2857,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
2830
2857
|
}
|
|
2831
2858
|
});
|
|
2832
2859
|
if (def.pattern)
|
|
2833
|
-
(
|
|
2860
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
2834
2861
|
def.pattern.lastIndex = 0;
|
|
2835
2862
|
if (def.pattern.test(payload.value))
|
|
2836
2863
|
return;
|
|
@@ -3026,13 +3053,13 @@ var Doc = class {
|
|
|
3026
3053
|
// ../../node_modules/zod/v4/core/versions.js
|
|
3027
3054
|
var version = {
|
|
3028
3055
|
major: 4,
|
|
3029
|
-
minor:
|
|
3030
|
-
patch:
|
|
3056
|
+
minor: 4,
|
|
3057
|
+
patch: 3
|
|
3031
3058
|
};
|
|
3032
3059
|
|
|
3033
3060
|
// ../../node_modules/zod/v4/core/schemas.js
|
|
3034
3061
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
3035
|
-
var
|
|
3062
|
+
var _a3;
|
|
3036
3063
|
inst ?? (inst = {});
|
|
3037
3064
|
inst._zod.def = def;
|
|
3038
3065
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -3047,7 +3074,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
3047
3074
|
}
|
|
3048
3075
|
}
|
|
3049
3076
|
if (checks.length === 0) {
|
|
3050
|
-
(
|
|
3077
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
3051
3078
|
inst._zod.deferred?.push(() => {
|
|
3052
3079
|
inst._zod.run = inst._zod.parse;
|
|
3053
3080
|
});
|
|
@@ -3057,6 +3084,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
3057
3084
|
let asyncResult;
|
|
3058
3085
|
for (const ch of checks2) {
|
|
3059
3086
|
if (ch._zod.def.when) {
|
|
3087
|
+
if (explicitlyAborted(payload))
|
|
3088
|
+
continue;
|
|
3060
3089
|
const shouldRun = ch._zod.def.when(payload);
|
|
3061
3090
|
if (!shouldRun)
|
|
3062
3091
|
continue;
|
|
@@ -3197,6 +3226,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
3197
3226
|
inst._zod.check = (payload) => {
|
|
3198
3227
|
try {
|
|
3199
3228
|
const trimmed = payload.value.trim();
|
|
3229
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
3230
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
3231
|
+
payload.issues.push({
|
|
3232
|
+
code: "invalid_format",
|
|
3233
|
+
format: "url",
|
|
3234
|
+
note: "Invalid URL format",
|
|
3235
|
+
input: payload.value,
|
|
3236
|
+
inst,
|
|
3237
|
+
continue: !def.abort
|
|
3238
|
+
});
|
|
3239
|
+
return;
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3200
3242
|
const url2 = new URL(trimmed);
|
|
3201
3243
|
if (def.hostname) {
|
|
3202
3244
|
def.hostname.lastIndex = 0;
|
|
@@ -3350,6 +3392,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
3350
3392
|
function isValidBase64(data) {
|
|
3351
3393
|
if (data === "")
|
|
3352
3394
|
return true;
|
|
3395
|
+
if (/\s/.test(data))
|
|
3396
|
+
return false;
|
|
3353
3397
|
if (data.length % 4 !== 0)
|
|
3354
3398
|
return false;
|
|
3355
3399
|
try {
|
|
@@ -3542,8 +3586,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
3542
3586
|
$ZodType.init(inst, def);
|
|
3543
3587
|
inst._zod.pattern = _undefined;
|
|
3544
3588
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
3545
|
-
inst._zod.optin = "optional";
|
|
3546
|
-
inst._zod.optout = "optional";
|
|
3547
3589
|
inst._zod.parse = (payload, _ctx) => {
|
|
3548
3590
|
const input = payload.value;
|
|
3549
3591
|
if (typeof input === "undefined")
|
|
@@ -3672,15 +3714,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
3672
3714
|
return payload;
|
|
3673
3715
|
};
|
|
3674
3716
|
});
|
|
3675
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
3717
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
3718
|
+
const isPresent = key in input;
|
|
3676
3719
|
if (result.issues.length) {
|
|
3677
|
-
if (isOptionalOut && !
|
|
3720
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
3678
3721
|
return;
|
|
3679
3722
|
}
|
|
3680
3723
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
3681
3724
|
}
|
|
3725
|
+
if (!isPresent && !isOptionalIn) {
|
|
3726
|
+
if (!result.issues.length) {
|
|
3727
|
+
final.issues.push({
|
|
3728
|
+
code: "invalid_type",
|
|
3729
|
+
expected: "nonoptional",
|
|
3730
|
+
input: void 0,
|
|
3731
|
+
path: [key]
|
|
3732
|
+
});
|
|
3733
|
+
}
|
|
3734
|
+
return;
|
|
3735
|
+
}
|
|
3682
3736
|
if (result.value === void 0) {
|
|
3683
|
-
if (
|
|
3737
|
+
if (isPresent) {
|
|
3684
3738
|
final.value[key] = void 0;
|
|
3685
3739
|
}
|
|
3686
3740
|
} else {
|
|
@@ -3708,8 +3762,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
3708
3762
|
const keySet = def.keySet;
|
|
3709
3763
|
const _catchall = def.catchall._zod;
|
|
3710
3764
|
const t = _catchall.def.type;
|
|
3765
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
3711
3766
|
const isOptionalOut = _catchall.optout === "optional";
|
|
3712
3767
|
for (const key in input) {
|
|
3768
|
+
if (key === "__proto__")
|
|
3769
|
+
continue;
|
|
3713
3770
|
if (keySet.has(key))
|
|
3714
3771
|
continue;
|
|
3715
3772
|
if (t === "never") {
|
|
@@ -3718,9 +3775,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
3718
3775
|
}
|
|
3719
3776
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
3720
3777
|
if (r instanceof Promise) {
|
|
3721
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3778
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
3722
3779
|
} else {
|
|
3723
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3780
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
3724
3781
|
}
|
|
3725
3782
|
}
|
|
3726
3783
|
if (unrecognized.length) {
|
|
@@ -3786,12 +3843,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3786
3843
|
const shape = value.shape;
|
|
3787
3844
|
for (const key of value.keys) {
|
|
3788
3845
|
const el = shape[key];
|
|
3846
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
3789
3847
|
const isOptionalOut = el._zod.optout === "optional";
|
|
3790
3848
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3791
3849
|
if (r instanceof Promise) {
|
|
3792
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3850
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
3793
3851
|
} else {
|
|
3794
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3852
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
3795
3853
|
}
|
|
3796
3854
|
}
|
|
3797
3855
|
if (!catchall) {
|
|
@@ -3822,9 +3880,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3822
3880
|
const id = ids[key];
|
|
3823
3881
|
const k = esc(key);
|
|
3824
3882
|
const schema = shape[key];
|
|
3883
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
3825
3884
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
3826
3885
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
3827
|
-
if (isOptionalOut) {
|
|
3886
|
+
if (isOptionalIn && isOptionalOut) {
|
|
3828
3887
|
doc.write(`
|
|
3829
3888
|
if (${id}.issues.length) {
|
|
3830
3889
|
if (${k} in input) {
|
|
@@ -3843,6 +3902,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3843
3902
|
newResult[${k}] = ${id}.value;
|
|
3844
3903
|
}
|
|
3845
3904
|
|
|
3905
|
+
`);
|
|
3906
|
+
} else if (!isOptionalIn) {
|
|
3907
|
+
doc.write(`
|
|
3908
|
+
const ${id}_present = ${k} in input;
|
|
3909
|
+
if (${id}.issues.length) {
|
|
3910
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
3911
|
+
...iss,
|
|
3912
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
3913
|
+
})));
|
|
3914
|
+
}
|
|
3915
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
3916
|
+
payload.issues.push({
|
|
3917
|
+
code: "invalid_type",
|
|
3918
|
+
expected: "nonoptional",
|
|
3919
|
+
input: undefined,
|
|
3920
|
+
path: [${k}]
|
|
3921
|
+
});
|
|
3922
|
+
}
|
|
3923
|
+
|
|
3924
|
+
if (${id}_present) {
|
|
3925
|
+
if (${id}.value === undefined) {
|
|
3926
|
+
newResult[${k}] = undefined;
|
|
3927
|
+
} else {
|
|
3928
|
+
newResult[${k}] = ${id}.value;
|
|
3929
|
+
}
|
|
3930
|
+
}
|
|
3931
|
+
|
|
3846
3932
|
`);
|
|
3847
3933
|
} else {
|
|
3848
3934
|
doc.write(`
|
|
@@ -3936,10 +4022,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
3936
4022
|
}
|
|
3937
4023
|
return void 0;
|
|
3938
4024
|
});
|
|
3939
|
-
const
|
|
3940
|
-
const first = def.options[0]._zod.run;
|
|
4025
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3941
4026
|
inst._zod.parse = (payload, ctx) => {
|
|
3942
|
-
if (
|
|
4027
|
+
if (first) {
|
|
3943
4028
|
return first(payload, ctx);
|
|
3944
4029
|
}
|
|
3945
4030
|
let async = false;
|
|
@@ -3992,10 +4077,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
|
|
|
3992
4077
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
3993
4078
|
$ZodUnion.init(inst, def);
|
|
3994
4079
|
def.inclusive = false;
|
|
3995
|
-
const
|
|
3996
|
-
const first = def.options[0]._zod.run;
|
|
4080
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3997
4081
|
inst._zod.parse = (payload, ctx) => {
|
|
3998
|
-
if (
|
|
4082
|
+
if (first) {
|
|
3999
4083
|
return first(payload, ctx);
|
|
4000
4084
|
}
|
|
4001
4085
|
let async = false;
|
|
@@ -4070,7 +4154,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
4070
4154
|
if (opt) {
|
|
4071
4155
|
return opt._zod.run(payload, ctx);
|
|
4072
4156
|
}
|
|
4073
|
-
if (def.unionFallback) {
|
|
4157
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
4074
4158
|
return _super(payload, ctx);
|
|
4075
4159
|
}
|
|
4076
4160
|
payload.issues.push({
|
|
@@ -4078,6 +4162,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
4078
4162
|
errors: [],
|
|
4079
4163
|
note: "No matching discriminator",
|
|
4080
4164
|
discriminator: def.discriminator,
|
|
4165
|
+
options: Array.from(disc.value.keys()),
|
|
4081
4166
|
input,
|
|
4082
4167
|
path: [def.discriminator],
|
|
4083
4168
|
inst
|
|
@@ -4199,64 +4284,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
4199
4284
|
}
|
|
4200
4285
|
payload.value = [];
|
|
4201
4286
|
const proms = [];
|
|
4202
|
-
const
|
|
4203
|
-
const
|
|
4287
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
4288
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
4204
4289
|
if (!def.rest) {
|
|
4205
|
-
|
|
4206
|
-
const tooSmall = input.length < optStart - 1;
|
|
4207
|
-
if (tooBig || tooSmall) {
|
|
4290
|
+
if (input.length < optinStart) {
|
|
4208
4291
|
payload.issues.push({
|
|
4209
|
-
|
|
4292
|
+
code: "too_small",
|
|
4293
|
+
minimum: optinStart,
|
|
4294
|
+
inclusive: true,
|
|
4210
4295
|
input,
|
|
4211
4296
|
inst,
|
|
4212
4297
|
origin: "array"
|
|
4213
4298
|
});
|
|
4214
4299
|
return payload;
|
|
4215
4300
|
}
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4301
|
+
if (input.length > items.length) {
|
|
4302
|
+
payload.issues.push({
|
|
4303
|
+
code: "too_big",
|
|
4304
|
+
maximum: items.length,
|
|
4305
|
+
inclusive: true,
|
|
4306
|
+
input,
|
|
4307
|
+
inst,
|
|
4308
|
+
origin: "array"
|
|
4309
|
+
});
|
|
4223
4310
|
}
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
}, ctx);
|
|
4228
|
-
if (
|
|
4229
|
-
proms.push(
|
|
4311
|
+
}
|
|
4312
|
+
const itemResults = new Array(items.length);
|
|
4313
|
+
for (let i = 0; i < items.length; i++) {
|
|
4314
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
4315
|
+
if (r instanceof Promise) {
|
|
4316
|
+
proms.push(r.then((rr) => {
|
|
4317
|
+
itemResults[i] = rr;
|
|
4318
|
+
}));
|
|
4230
4319
|
} else {
|
|
4231
|
-
|
|
4320
|
+
itemResults[i] = r;
|
|
4232
4321
|
}
|
|
4233
4322
|
}
|
|
4234
4323
|
if (def.rest) {
|
|
4324
|
+
let i = items.length - 1;
|
|
4235
4325
|
const rest = input.slice(items.length);
|
|
4236
4326
|
for (const el of rest) {
|
|
4237
4327
|
i++;
|
|
4238
|
-
const result = def.rest._zod.run({
|
|
4239
|
-
value: el,
|
|
4240
|
-
issues: []
|
|
4241
|
-
}, ctx);
|
|
4328
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
4242
4329
|
if (result instanceof Promise) {
|
|
4243
|
-
proms.push(result.then((
|
|
4330
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
4244
4331
|
} else {
|
|
4245
4332
|
handleTupleResult(result, payload, i);
|
|
4246
4333
|
}
|
|
4247
4334
|
}
|
|
4248
4335
|
}
|
|
4249
|
-
if (proms.length)
|
|
4250
|
-
return Promise.all(proms).then(() => payload);
|
|
4251
|
-
|
|
4336
|
+
if (proms.length) {
|
|
4337
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
4338
|
+
}
|
|
4339
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
4252
4340
|
};
|
|
4253
4341
|
});
|
|
4342
|
+
function getTupleOptStart(items, key) {
|
|
4343
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
4344
|
+
if (items[i]._zod[key] !== "optional")
|
|
4345
|
+
return i + 1;
|
|
4346
|
+
}
|
|
4347
|
+
return 0;
|
|
4348
|
+
}
|
|
4254
4349
|
function handleTupleResult(result, final, index) {
|
|
4255
4350
|
if (result.issues.length) {
|
|
4256
4351
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
4257
4352
|
}
|
|
4258
4353
|
final.value[index] = result.value;
|
|
4259
4354
|
}
|
|
4355
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
4356
|
+
for (let i = 0; i < items.length; i++) {
|
|
4357
|
+
const r = itemResults[i];
|
|
4358
|
+
const isPresent = i < input.length;
|
|
4359
|
+
if (r.issues.length) {
|
|
4360
|
+
if (!isPresent && i >= optoutStart) {
|
|
4361
|
+
final.value.length = i;
|
|
4362
|
+
break;
|
|
4363
|
+
}
|
|
4364
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
4365
|
+
}
|
|
4366
|
+
final.value[i] = r.value;
|
|
4367
|
+
}
|
|
4368
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
4369
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
4370
|
+
final.value.length = i;
|
|
4371
|
+
} else {
|
|
4372
|
+
break;
|
|
4373
|
+
}
|
|
4374
|
+
}
|
|
4375
|
+
return final;
|
|
4376
|
+
}
|
|
4260
4377
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
4261
4378
|
$ZodType.init(inst, def);
|
|
4262
4379
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -4278,19 +4395,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
4278
4395
|
for (const key of values) {
|
|
4279
4396
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
4280
4397
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
4398
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
4399
|
+
if (keyResult instanceof Promise) {
|
|
4400
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
4401
|
+
}
|
|
4402
|
+
if (keyResult.issues.length) {
|
|
4403
|
+
payload.issues.push({
|
|
4404
|
+
code: "invalid_key",
|
|
4405
|
+
origin: "record",
|
|
4406
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
4407
|
+
input: key,
|
|
4408
|
+
path: [key],
|
|
4409
|
+
inst
|
|
4410
|
+
});
|
|
4411
|
+
continue;
|
|
4412
|
+
}
|
|
4413
|
+
const outKey = keyResult.value;
|
|
4281
4414
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
4282
4415
|
if (result instanceof Promise) {
|
|
4283
4416
|
proms.push(result.then((result2) => {
|
|
4284
4417
|
if (result2.issues.length) {
|
|
4285
4418
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
4286
4419
|
}
|
|
4287
|
-
payload.value[
|
|
4420
|
+
payload.value[outKey] = result2.value;
|
|
4288
4421
|
}));
|
|
4289
4422
|
} else {
|
|
4290
4423
|
if (result.issues.length) {
|
|
4291
4424
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
4292
4425
|
}
|
|
4293
|
-
payload.value[
|
|
4426
|
+
payload.value[outKey] = result.value;
|
|
4294
4427
|
}
|
|
4295
4428
|
}
|
|
4296
4429
|
}
|
|
@@ -4314,6 +4447,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
4314
4447
|
for (const key of Reflect.ownKeys(input)) {
|
|
4315
4448
|
if (key === "__proto__")
|
|
4316
4449
|
continue;
|
|
4450
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
4451
|
+
continue;
|
|
4317
4452
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
4318
4453
|
if (keyResult instanceof Promise) {
|
|
4319
4454
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -4518,6 +4653,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
|
4518
4653
|
});
|
|
4519
4654
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
4520
4655
|
$ZodType.init(inst, def);
|
|
4656
|
+
inst._zod.optin = "optional";
|
|
4521
4657
|
inst._zod.parse = (payload, ctx) => {
|
|
4522
4658
|
if (ctx.direction === "backward") {
|
|
4523
4659
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -4527,6 +4663,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
4527
4663
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
4528
4664
|
return output.then((output2) => {
|
|
4529
4665
|
payload.value = output2;
|
|
4666
|
+
payload.fallback = true;
|
|
4530
4667
|
return payload;
|
|
4531
4668
|
});
|
|
4532
4669
|
}
|
|
@@ -4534,11 +4671,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
4534
4671
|
throw new $ZodAsyncError();
|
|
4535
4672
|
}
|
|
4536
4673
|
payload.value = _out;
|
|
4674
|
+
payload.fallback = true;
|
|
4537
4675
|
return payload;
|
|
4538
4676
|
};
|
|
4539
4677
|
});
|
|
4540
4678
|
function handleOptionalResult(result, input) {
|
|
4541
|
-
if (result.issues.length
|
|
4679
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
4542
4680
|
return { issues: [], value: void 0 };
|
|
4543
4681
|
}
|
|
4544
4682
|
return result;
|
|
@@ -4556,10 +4694,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
4556
4694
|
});
|
|
4557
4695
|
inst._zod.parse = (payload, ctx) => {
|
|
4558
4696
|
if (def.innerType._zod.optin === "optional") {
|
|
4697
|
+
const input = payload.value;
|
|
4559
4698
|
const result = def.innerType._zod.run(payload, ctx);
|
|
4560
4699
|
if (result instanceof Promise)
|
|
4561
|
-
return result.then((r) => handleOptionalResult(r,
|
|
4562
|
-
return handleOptionalResult(result,
|
|
4700
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
4701
|
+
return handleOptionalResult(result, input);
|
|
4563
4702
|
}
|
|
4564
4703
|
if (payload.value === void 0) {
|
|
4565
4704
|
return payload;
|
|
@@ -4675,7 +4814,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
4675
4814
|
});
|
|
4676
4815
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
4677
4816
|
$ZodType.init(inst, def);
|
|
4678
|
-
|
|
4817
|
+
inst._zod.optin = "optional";
|
|
4679
4818
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
4680
4819
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
4681
4820
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -4695,6 +4834,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
4695
4834
|
input: payload.value
|
|
4696
4835
|
});
|
|
4697
4836
|
payload.issues = [];
|
|
4837
|
+
payload.fallback = true;
|
|
4698
4838
|
}
|
|
4699
4839
|
return payload;
|
|
4700
4840
|
});
|
|
@@ -4709,6 +4849,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
4709
4849
|
input: payload.value
|
|
4710
4850
|
});
|
|
4711
4851
|
payload.issues = [];
|
|
4852
|
+
payload.fallback = true;
|
|
4712
4853
|
}
|
|
4713
4854
|
return payload;
|
|
4714
4855
|
};
|
|
@@ -4754,7 +4895,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
4754
4895
|
left.aborted = true;
|
|
4755
4896
|
return left;
|
|
4756
4897
|
}
|
|
4757
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
4898
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
4758
4899
|
}
|
|
4759
4900
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
4760
4901
|
$ZodType.init(inst, def);
|
|
@@ -4806,6 +4947,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
|
|
|
4806
4947
|
}
|
|
4807
4948
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
4808
4949
|
}
|
|
4950
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
4951
|
+
$ZodPipe.init(inst, def);
|
|
4952
|
+
});
|
|
4809
4953
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
4810
4954
|
$ZodType.init(inst, def);
|
|
4811
4955
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -4957,7 +5101,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
|
4957
5101
|
});
|
|
4958
5102
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
4959
5103
|
$ZodType.init(inst, def);
|
|
4960
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
5104
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
5105
|
+
const d = def;
|
|
5106
|
+
if (!d._cachedInner)
|
|
5107
|
+
d._cachedInner = def.getter();
|
|
5108
|
+
return d._cachedInner;
|
|
5109
|
+
});
|
|
4961
5110
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
4962
5111
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
4963
5112
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -5012,6 +5161,7 @@ __export(locales_exports, {
|
|
|
5012
5161
|
cs: () => cs_default,
|
|
5013
5162
|
da: () => da_default,
|
|
5014
5163
|
de: () => de_default,
|
|
5164
|
+
el: () => el_default,
|
|
5015
5165
|
en: () => en_default,
|
|
5016
5166
|
eo: () => eo_default,
|
|
5017
5167
|
es: () => es_default,
|
|
@@ -5020,6 +5170,7 @@ __export(locales_exports, {
|
|
|
5020
5170
|
fr: () => fr_default,
|
|
5021
5171
|
frCA: () => fr_CA_default,
|
|
5022
5172
|
he: () => he_default,
|
|
5173
|
+
hr: () => hr_default,
|
|
5023
5174
|
hu: () => hu_default,
|
|
5024
5175
|
hy: () => hy_default,
|
|
5025
5176
|
id: () => id_default,
|
|
@@ -5039,6 +5190,7 @@ __export(locales_exports, {
|
|
|
5039
5190
|
pl: () => pl_default,
|
|
5040
5191
|
ps: () => ps_default,
|
|
5041
5192
|
pt: () => pt_default,
|
|
5193
|
+
ro: () => ro_default,
|
|
5042
5194
|
ru: () => ru_default,
|
|
5043
5195
|
sl: () => sl_default,
|
|
5044
5196
|
sv: () => sv_default,
|
|
@@ -5992,8 +6144,118 @@ function de_default() {
|
|
|
5992
6144
|
};
|
|
5993
6145
|
}
|
|
5994
6146
|
|
|
5995
|
-
// ../../node_modules/zod/v4/locales/
|
|
6147
|
+
// ../../node_modules/zod/v4/locales/el.js
|
|
5996
6148
|
var error9 = () => {
|
|
6149
|
+
const Sizable = {
|
|
6150
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
6151
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
6152
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
6153
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
6154
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
6155
|
+
};
|
|
6156
|
+
function getSizing(origin) {
|
|
6157
|
+
return Sizable[origin] ?? null;
|
|
6158
|
+
}
|
|
6159
|
+
const FormatDictionary = {
|
|
6160
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
6161
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
6162
|
+
url: "URL",
|
|
6163
|
+
emoji: "emoji",
|
|
6164
|
+
uuid: "UUID",
|
|
6165
|
+
uuidv4: "UUIDv4",
|
|
6166
|
+
uuidv6: "UUIDv6",
|
|
6167
|
+
nanoid: "nanoid",
|
|
6168
|
+
guid: "GUID",
|
|
6169
|
+
cuid: "cuid",
|
|
6170
|
+
cuid2: "cuid2",
|
|
6171
|
+
ulid: "ULID",
|
|
6172
|
+
xid: "XID",
|
|
6173
|
+
ksuid: "KSUID",
|
|
6174
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
6175
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
6176
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
6177
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
6178
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
6179
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
6180
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
6181
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
6182
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
6183
|
+
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",
|
|
6184
|
+
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",
|
|
6185
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
6186
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
6187
|
+
jwt: "JWT",
|
|
6188
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
6189
|
+
};
|
|
6190
|
+
const TypeDictionary = {
|
|
6191
|
+
nan: "NaN"
|
|
6192
|
+
};
|
|
6193
|
+
return (issue2) => {
|
|
6194
|
+
switch (issue2.code) {
|
|
6195
|
+
case "invalid_type": {
|
|
6196
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
6197
|
+
const receivedType = parsedType(issue2.input);
|
|
6198
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
6199
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
6200
|
+
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}`;
|
|
6201
|
+
}
|
|
6202
|
+
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}`;
|
|
6203
|
+
}
|
|
6204
|
+
case "invalid_value":
|
|
6205
|
+
if (issue2.values.length === 1)
|
|
6206
|
+
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])}`;
|
|
6207
|
+
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, "|")}`;
|
|
6208
|
+
case "too_big": {
|
|
6209
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
6210
|
+
const sizing = getSizing(issue2.origin);
|
|
6211
|
+
if (sizing)
|
|
6212
|
+
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"}`;
|
|
6213
|
+
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()}`;
|
|
6214
|
+
}
|
|
6215
|
+
case "too_small": {
|
|
6216
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
6217
|
+
const sizing = getSizing(issue2.origin);
|
|
6218
|
+
if (sizing) {
|
|
6219
|
+
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}`;
|
|
6220
|
+
}
|
|
6221
|
+
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()}`;
|
|
6222
|
+
}
|
|
6223
|
+
case "invalid_format": {
|
|
6224
|
+
const _issue = issue2;
|
|
6225
|
+
if (_issue.format === "starts_with") {
|
|
6226
|
+
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}"`;
|
|
6227
|
+
}
|
|
6228
|
+
if (_issue.format === "ends_with")
|
|
6229
|
+
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}"`;
|
|
6230
|
+
if (_issue.format === "includes")
|
|
6231
|
+
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}"`;
|
|
6232
|
+
if (_issue.format === "regex")
|
|
6233
|
+
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}`;
|
|
6234
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6235
|
+
}
|
|
6236
|
+
case "not_multiple_of":
|
|
6237
|
+
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}`;
|
|
6238
|
+
case "unrecognized_keys":
|
|
6239
|
+
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, ", ")}`;
|
|
6240
|
+
case "invalid_key":
|
|
6241
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
6242
|
+
case "invalid_union":
|
|
6243
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
6244
|
+
case "invalid_element":
|
|
6245
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
6246
|
+
default:
|
|
6247
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
6248
|
+
}
|
|
6249
|
+
};
|
|
6250
|
+
};
|
|
6251
|
+
function el_default() {
|
|
6252
|
+
return {
|
|
6253
|
+
localeError: error9()
|
|
6254
|
+
};
|
|
6255
|
+
}
|
|
6256
|
+
|
|
6257
|
+
// ../../node_modules/zod/v4/locales/en.js
|
|
6258
|
+
var error10 = () => {
|
|
5997
6259
|
const Sizable = {
|
|
5998
6260
|
string: { unit: "characters", verb: "to have" },
|
|
5999
6261
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -6087,6 +6349,10 @@ var error9 = () => {
|
|
|
6087
6349
|
case "invalid_key":
|
|
6088
6350
|
return `Invalid key in ${issue2.origin}`;
|
|
6089
6351
|
case "invalid_union":
|
|
6352
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
6353
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
6354
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
6355
|
+
}
|
|
6090
6356
|
return "Invalid input";
|
|
6091
6357
|
case "invalid_element":
|
|
6092
6358
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -6097,12 +6363,12 @@ var error9 = () => {
|
|
|
6097
6363
|
};
|
|
6098
6364
|
function en_default() {
|
|
6099
6365
|
return {
|
|
6100
|
-
localeError:
|
|
6366
|
+
localeError: error10()
|
|
6101
6367
|
};
|
|
6102
6368
|
}
|
|
6103
6369
|
|
|
6104
6370
|
// ../../node_modules/zod/v4/locales/eo.js
|
|
6105
|
-
var
|
|
6371
|
+
var error11 = () => {
|
|
6106
6372
|
const Sizable = {
|
|
6107
6373
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
6108
6374
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -6207,12 +6473,12 @@ var error10 = () => {
|
|
|
6207
6473
|
};
|
|
6208
6474
|
function eo_default() {
|
|
6209
6475
|
return {
|
|
6210
|
-
localeError:
|
|
6476
|
+
localeError: error11()
|
|
6211
6477
|
};
|
|
6212
6478
|
}
|
|
6213
6479
|
|
|
6214
6480
|
// ../../node_modules/zod/v4/locales/es.js
|
|
6215
|
-
var
|
|
6481
|
+
var error12 = () => {
|
|
6216
6482
|
const Sizable = {
|
|
6217
6483
|
string: { unit: "caracteres", verb: "tener" },
|
|
6218
6484
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -6340,12 +6606,12 @@ var error11 = () => {
|
|
|
6340
6606
|
};
|
|
6341
6607
|
function es_default() {
|
|
6342
6608
|
return {
|
|
6343
|
-
localeError:
|
|
6609
|
+
localeError: error12()
|
|
6344
6610
|
};
|
|
6345
6611
|
}
|
|
6346
6612
|
|
|
6347
6613
|
// ../../node_modules/zod/v4/locales/fa.js
|
|
6348
|
-
var
|
|
6614
|
+
var error13 = () => {
|
|
6349
6615
|
const Sizable = {
|
|
6350
6616
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
6351
6617
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -6455,12 +6721,12 @@ var error12 = () => {
|
|
|
6455
6721
|
};
|
|
6456
6722
|
function fa_default() {
|
|
6457
6723
|
return {
|
|
6458
|
-
localeError:
|
|
6724
|
+
localeError: error13()
|
|
6459
6725
|
};
|
|
6460
6726
|
}
|
|
6461
6727
|
|
|
6462
6728
|
// ../../node_modules/zod/v4/locales/fi.js
|
|
6463
|
-
var
|
|
6729
|
+
var error14 = () => {
|
|
6464
6730
|
const Sizable = {
|
|
6465
6731
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
6466
6732
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -6568,12 +6834,12 @@ var error13 = () => {
|
|
|
6568
6834
|
};
|
|
6569
6835
|
function fi_default() {
|
|
6570
6836
|
return {
|
|
6571
|
-
localeError:
|
|
6837
|
+
localeError: error14()
|
|
6572
6838
|
};
|
|
6573
6839
|
}
|
|
6574
6840
|
|
|
6575
6841
|
// ../../node_modules/zod/v4/locales/fr.js
|
|
6576
|
-
var
|
|
6842
|
+
var error15 = () => {
|
|
6577
6843
|
const Sizable = {
|
|
6578
6844
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
6579
6845
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -6614,9 +6880,27 @@ var error14 = () => {
|
|
|
6614
6880
|
template_literal: "entr\xE9e"
|
|
6615
6881
|
};
|
|
6616
6882
|
const TypeDictionary = {
|
|
6617
|
-
|
|
6883
|
+
string: "cha\xEEne",
|
|
6618
6884
|
number: "nombre",
|
|
6619
|
-
|
|
6885
|
+
int: "entier",
|
|
6886
|
+
boolean: "bool\xE9en",
|
|
6887
|
+
bigint: "grand entier",
|
|
6888
|
+
symbol: "symbole",
|
|
6889
|
+
undefined: "ind\xE9fini",
|
|
6890
|
+
null: "null",
|
|
6891
|
+
never: "jamais",
|
|
6892
|
+
void: "vide",
|
|
6893
|
+
date: "date",
|
|
6894
|
+
array: "tableau",
|
|
6895
|
+
object: "objet",
|
|
6896
|
+
tuple: "tuple",
|
|
6897
|
+
record: "enregistrement",
|
|
6898
|
+
map: "carte",
|
|
6899
|
+
set: "ensemble",
|
|
6900
|
+
file: "fichier",
|
|
6901
|
+
nonoptional: "non-optionnel",
|
|
6902
|
+
nan: "NaN",
|
|
6903
|
+
function: "fonction"
|
|
6620
6904
|
};
|
|
6621
6905
|
return (issue2) => {
|
|
6622
6906
|
switch (issue2.code) {
|
|
@@ -6637,16 +6921,15 @@ var error14 = () => {
|
|
|
6637
6921
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
6638
6922
|
const sizing = getSizing(issue2.origin);
|
|
6639
6923
|
if (sizing)
|
|
6640
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
6641
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
6924
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
6925
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
6642
6926
|
}
|
|
6643
6927
|
case "too_small": {
|
|
6644
6928
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
6645
6929
|
const sizing = getSizing(issue2.origin);
|
|
6646
|
-
if (sizing)
|
|
6647
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6648
|
-
}
|
|
6649
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
6930
|
+
if (sizing)
|
|
6931
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6932
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
6650
6933
|
}
|
|
6651
6934
|
case "invalid_format": {
|
|
6652
6935
|
const _issue = issue2;
|
|
@@ -6677,12 +6960,12 @@ var error14 = () => {
|
|
|
6677
6960
|
};
|
|
6678
6961
|
function fr_default() {
|
|
6679
6962
|
return {
|
|
6680
|
-
localeError:
|
|
6963
|
+
localeError: error15()
|
|
6681
6964
|
};
|
|
6682
6965
|
}
|
|
6683
6966
|
|
|
6684
6967
|
// ../../node_modules/zod/v4/locales/fr-CA.js
|
|
6685
|
-
var
|
|
6968
|
+
var error16 = () => {
|
|
6686
6969
|
const Sizable = {
|
|
6687
6970
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
6688
6971
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -6785,12 +7068,12 @@ var error15 = () => {
|
|
|
6785
7068
|
};
|
|
6786
7069
|
function fr_CA_default() {
|
|
6787
7070
|
return {
|
|
6788
|
-
localeError:
|
|
7071
|
+
localeError: error16()
|
|
6789
7072
|
};
|
|
6790
7073
|
}
|
|
6791
7074
|
|
|
6792
7075
|
// ../../node_modules/zod/v4/locales/he.js
|
|
6793
|
-
var
|
|
7076
|
+
var error17 = () => {
|
|
6794
7077
|
const TypeNames = {
|
|
6795
7078
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
6796
7079
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -6980,24 +7263,24 @@ var error16 = () => {
|
|
|
6980
7263
|
};
|
|
6981
7264
|
function he_default() {
|
|
6982
7265
|
return {
|
|
6983
|
-
localeError:
|
|
7266
|
+
localeError: error17()
|
|
6984
7267
|
};
|
|
6985
7268
|
}
|
|
6986
7269
|
|
|
6987
|
-
// ../../node_modules/zod/v4/locales/
|
|
6988
|
-
var
|
|
7270
|
+
// ../../node_modules/zod/v4/locales/hr.js
|
|
7271
|
+
var error18 = () => {
|
|
6989
7272
|
const Sizable = {
|
|
6990
|
-
string: { unit: "
|
|
6991
|
-
file: { unit: "
|
|
6992
|
-
array: { unit: "
|
|
6993
|
-
set: { unit: "
|
|
7273
|
+
string: { unit: "znakova", verb: "imati" },
|
|
7274
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
7275
|
+
array: { unit: "stavki", verb: "imati" },
|
|
7276
|
+
set: { unit: "stavki", verb: "imati" }
|
|
6994
7277
|
};
|
|
6995
7278
|
function getSizing(origin) {
|
|
6996
7279
|
return Sizable[origin] ?? null;
|
|
6997
7280
|
}
|
|
6998
7281
|
const FormatDictionary = {
|
|
6999
|
-
regex: "
|
|
7000
|
-
email: "email
|
|
7282
|
+
regex: "unos",
|
|
7283
|
+
email: "email adresa",
|
|
7001
7284
|
url: "URL",
|
|
7002
7285
|
emoji: "emoji",
|
|
7003
7286
|
uuid: "UUID",
|
|
@@ -7010,25 +7293,37 @@ var error17 = () => {
|
|
|
7010
7293
|
ulid: "ULID",
|
|
7011
7294
|
xid: "XID",
|
|
7012
7295
|
ksuid: "KSUID",
|
|
7013
|
-
datetime: "ISO
|
|
7014
|
-
date: "ISO
|
|
7015
|
-
time: "ISO
|
|
7016
|
-
duration: "ISO
|
|
7017
|
-
ipv4: "IPv4
|
|
7018
|
-
ipv6: "IPv6
|
|
7019
|
-
cidrv4: "IPv4
|
|
7020
|
-
cidrv6: "IPv6
|
|
7021
|
-
base64: "base64
|
|
7022
|
-
base64url: "base64url
|
|
7023
|
-
json_string: "JSON
|
|
7024
|
-
e164: "E.164
|
|
7296
|
+
datetime: "ISO datum i vrijeme",
|
|
7297
|
+
date: "ISO datum",
|
|
7298
|
+
time: "ISO vrijeme",
|
|
7299
|
+
duration: "ISO trajanje",
|
|
7300
|
+
ipv4: "IPv4 adresa",
|
|
7301
|
+
ipv6: "IPv6 adresa",
|
|
7302
|
+
cidrv4: "IPv4 raspon",
|
|
7303
|
+
cidrv6: "IPv6 raspon",
|
|
7304
|
+
base64: "base64 kodirani tekst",
|
|
7305
|
+
base64url: "base64url kodirani tekst",
|
|
7306
|
+
json_string: "JSON tekst",
|
|
7307
|
+
e164: "E.164 broj",
|
|
7025
7308
|
jwt: "JWT",
|
|
7026
|
-
template_literal: "
|
|
7309
|
+
template_literal: "unos"
|
|
7027
7310
|
};
|
|
7028
7311
|
const TypeDictionary = {
|
|
7029
7312
|
nan: "NaN",
|
|
7030
|
-
|
|
7031
|
-
|
|
7313
|
+
string: "tekst",
|
|
7314
|
+
number: "broj",
|
|
7315
|
+
boolean: "boolean",
|
|
7316
|
+
array: "niz",
|
|
7317
|
+
object: "objekt",
|
|
7318
|
+
set: "skup",
|
|
7319
|
+
file: "datoteka",
|
|
7320
|
+
date: "datum",
|
|
7321
|
+
bigint: "bigint",
|
|
7322
|
+
symbol: "simbol",
|
|
7323
|
+
undefined: "undefined",
|
|
7324
|
+
null: "null",
|
|
7325
|
+
function: "funkcija",
|
|
7326
|
+
map: "mapa"
|
|
7032
7327
|
};
|
|
7033
7328
|
return (issue2) => {
|
|
7034
7329
|
switch (issue2.code) {
|
|
@@ -7037,20 +7332,131 @@ var error17 = () => {
|
|
|
7037
7332
|
const receivedType = parsedType(issue2.input);
|
|
7038
7333
|
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
7039
7334
|
if (/^[A-Z]/.test(issue2.expected)) {
|
|
7040
|
-
return
|
|
7335
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
7041
7336
|
}
|
|
7042
|
-
return
|
|
7337
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
7043
7338
|
}
|
|
7044
7339
|
case "invalid_value":
|
|
7045
7340
|
if (issue2.values.length === 1)
|
|
7046
|
-
return
|
|
7047
|
-
return
|
|
7341
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
7342
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
7048
7343
|
case "too_big": {
|
|
7049
7344
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
7050
7345
|
const sizing = getSizing(issue2.origin);
|
|
7346
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
7051
7347
|
if (sizing)
|
|
7052
|
-
return `
|
|
7053
|
-
return `
|
|
7348
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
7349
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
7350
|
+
}
|
|
7351
|
+
case "too_small": {
|
|
7352
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
7353
|
+
const sizing = getSizing(issue2.origin);
|
|
7354
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
7355
|
+
if (sizing) {
|
|
7356
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
7357
|
+
}
|
|
7358
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
7359
|
+
}
|
|
7360
|
+
case "invalid_format": {
|
|
7361
|
+
const _issue = issue2;
|
|
7362
|
+
if (_issue.format === "starts_with")
|
|
7363
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
7364
|
+
if (_issue.format === "ends_with")
|
|
7365
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
7366
|
+
if (_issue.format === "includes")
|
|
7367
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
7368
|
+
if (_issue.format === "regex")
|
|
7369
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
7370
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7371
|
+
}
|
|
7372
|
+
case "not_multiple_of":
|
|
7373
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
7374
|
+
case "unrecognized_keys":
|
|
7375
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
7376
|
+
case "invalid_key":
|
|
7377
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
7378
|
+
case "invalid_union":
|
|
7379
|
+
return "Neispravan unos";
|
|
7380
|
+
case "invalid_element":
|
|
7381
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
7382
|
+
default:
|
|
7383
|
+
return `Neispravan unos`;
|
|
7384
|
+
}
|
|
7385
|
+
};
|
|
7386
|
+
};
|
|
7387
|
+
function hr_default() {
|
|
7388
|
+
return {
|
|
7389
|
+
localeError: error18()
|
|
7390
|
+
};
|
|
7391
|
+
}
|
|
7392
|
+
|
|
7393
|
+
// ../../node_modules/zod/v4/locales/hu.js
|
|
7394
|
+
var error19 = () => {
|
|
7395
|
+
const Sizable = {
|
|
7396
|
+
string: { unit: "karakter", verb: "legyen" },
|
|
7397
|
+
file: { unit: "byte", verb: "legyen" },
|
|
7398
|
+
array: { unit: "elem", verb: "legyen" },
|
|
7399
|
+
set: { unit: "elem", verb: "legyen" }
|
|
7400
|
+
};
|
|
7401
|
+
function getSizing(origin) {
|
|
7402
|
+
return Sizable[origin] ?? null;
|
|
7403
|
+
}
|
|
7404
|
+
const FormatDictionary = {
|
|
7405
|
+
regex: "bemenet",
|
|
7406
|
+
email: "email c\xEDm",
|
|
7407
|
+
url: "URL",
|
|
7408
|
+
emoji: "emoji",
|
|
7409
|
+
uuid: "UUID",
|
|
7410
|
+
uuidv4: "UUIDv4",
|
|
7411
|
+
uuidv6: "UUIDv6",
|
|
7412
|
+
nanoid: "nanoid",
|
|
7413
|
+
guid: "GUID",
|
|
7414
|
+
cuid: "cuid",
|
|
7415
|
+
cuid2: "cuid2",
|
|
7416
|
+
ulid: "ULID",
|
|
7417
|
+
xid: "XID",
|
|
7418
|
+
ksuid: "KSUID",
|
|
7419
|
+
datetime: "ISO id\u0151b\xE9lyeg",
|
|
7420
|
+
date: "ISO d\xE1tum",
|
|
7421
|
+
time: "ISO id\u0151",
|
|
7422
|
+
duration: "ISO id\u0151intervallum",
|
|
7423
|
+
ipv4: "IPv4 c\xEDm",
|
|
7424
|
+
ipv6: "IPv6 c\xEDm",
|
|
7425
|
+
cidrv4: "IPv4 tartom\xE1ny",
|
|
7426
|
+
cidrv6: "IPv6 tartom\xE1ny",
|
|
7427
|
+
base64: "base64-k\xF3dolt string",
|
|
7428
|
+
base64url: "base64url-k\xF3dolt string",
|
|
7429
|
+
json_string: "JSON string",
|
|
7430
|
+
e164: "E.164 sz\xE1m",
|
|
7431
|
+
jwt: "JWT",
|
|
7432
|
+
template_literal: "bemenet"
|
|
7433
|
+
};
|
|
7434
|
+
const TypeDictionary = {
|
|
7435
|
+
nan: "NaN",
|
|
7436
|
+
number: "sz\xE1m",
|
|
7437
|
+
array: "t\xF6mb"
|
|
7438
|
+
};
|
|
7439
|
+
return (issue2) => {
|
|
7440
|
+
switch (issue2.code) {
|
|
7441
|
+
case "invalid_type": {
|
|
7442
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
7443
|
+
const receivedType = parsedType(issue2.input);
|
|
7444
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
7445
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
7446
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
|
|
7447
|
+
}
|
|
7448
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
|
|
7449
|
+
}
|
|
7450
|
+
case "invalid_value":
|
|
7451
|
+
if (issue2.values.length === 1)
|
|
7452
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
|
|
7453
|
+
return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
|
|
7454
|
+
case "too_big": {
|
|
7455
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
7456
|
+
const sizing = getSizing(issue2.origin);
|
|
7457
|
+
if (sizing)
|
|
7458
|
+
return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
|
|
7459
|
+
return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
|
|
7054
7460
|
}
|
|
7055
7461
|
case "too_small": {
|
|
7056
7462
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
@@ -7089,7 +7495,7 @@ var error17 = () => {
|
|
|
7089
7495
|
};
|
|
7090
7496
|
function hu_default() {
|
|
7091
7497
|
return {
|
|
7092
|
-
localeError:
|
|
7498
|
+
localeError: error19()
|
|
7093
7499
|
};
|
|
7094
7500
|
}
|
|
7095
7501
|
|
|
@@ -7104,7 +7510,7 @@ function withDefiniteArticle(word) {
|
|
|
7104
7510
|
const lastChar = word[word.length - 1];
|
|
7105
7511
|
return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
|
|
7106
7512
|
}
|
|
7107
|
-
var
|
|
7513
|
+
var error20 = () => {
|
|
7108
7514
|
const Sizable = {
|
|
7109
7515
|
string: {
|
|
7110
7516
|
unit: {
|
|
@@ -7237,12 +7643,12 @@ var error18 = () => {
|
|
|
7237
7643
|
};
|
|
7238
7644
|
function hy_default() {
|
|
7239
7645
|
return {
|
|
7240
|
-
localeError:
|
|
7646
|
+
localeError: error20()
|
|
7241
7647
|
};
|
|
7242
7648
|
}
|
|
7243
7649
|
|
|
7244
7650
|
// ../../node_modules/zod/v4/locales/id.js
|
|
7245
|
-
var
|
|
7651
|
+
var error21 = () => {
|
|
7246
7652
|
const Sizable = {
|
|
7247
7653
|
string: { unit: "karakter", verb: "memiliki" },
|
|
7248
7654
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -7344,12 +7750,12 @@ var error19 = () => {
|
|
|
7344
7750
|
};
|
|
7345
7751
|
function id_default() {
|
|
7346
7752
|
return {
|
|
7347
|
-
localeError:
|
|
7753
|
+
localeError: error21()
|
|
7348
7754
|
};
|
|
7349
7755
|
}
|
|
7350
7756
|
|
|
7351
7757
|
// ../../node_modules/zod/v4/locales/is.js
|
|
7352
|
-
var
|
|
7758
|
+
var error22 = () => {
|
|
7353
7759
|
const Sizable = {
|
|
7354
7760
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
7355
7761
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -7454,12 +7860,12 @@ var error20 = () => {
|
|
|
7454
7860
|
};
|
|
7455
7861
|
function is_default() {
|
|
7456
7862
|
return {
|
|
7457
|
-
localeError:
|
|
7863
|
+
localeError: error22()
|
|
7458
7864
|
};
|
|
7459
7865
|
}
|
|
7460
7866
|
|
|
7461
7867
|
// ../../node_modules/zod/v4/locales/it.js
|
|
7462
|
-
var
|
|
7868
|
+
var error23 = () => {
|
|
7463
7869
|
const Sizable = {
|
|
7464
7870
|
string: { unit: "caratteri", verb: "avere" },
|
|
7465
7871
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -7544,7 +7950,7 @@ var error21 = () => {
|
|
|
7544
7950
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
7545
7951
|
if (_issue.format === "regex")
|
|
7546
7952
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
7547
|
-
return `
|
|
7953
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7548
7954
|
}
|
|
7549
7955
|
case "not_multiple_of":
|
|
7550
7956
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -7563,12 +7969,12 @@ var error21 = () => {
|
|
|
7563
7969
|
};
|
|
7564
7970
|
function it_default() {
|
|
7565
7971
|
return {
|
|
7566
|
-
localeError:
|
|
7972
|
+
localeError: error23()
|
|
7567
7973
|
};
|
|
7568
7974
|
}
|
|
7569
7975
|
|
|
7570
7976
|
// ../../node_modules/zod/v4/locales/ja.js
|
|
7571
|
-
var
|
|
7977
|
+
var error24 = () => {
|
|
7572
7978
|
const Sizable = {
|
|
7573
7979
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
7574
7980
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -7671,12 +8077,12 @@ var error22 = () => {
|
|
|
7671
8077
|
};
|
|
7672
8078
|
function ja_default() {
|
|
7673
8079
|
return {
|
|
7674
|
-
localeError:
|
|
8080
|
+
localeError: error24()
|
|
7675
8081
|
};
|
|
7676
8082
|
}
|
|
7677
8083
|
|
|
7678
8084
|
// ../../node_modules/zod/v4/locales/ka.js
|
|
7679
|
-
var
|
|
8085
|
+
var error25 = () => {
|
|
7680
8086
|
const Sizable = {
|
|
7681
8087
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
7682
8088
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -7709,9 +8115,9 @@ var error23 = () => {
|
|
|
7709
8115
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
7710
8116
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
7711
8117
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
7712
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
7713
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
7714
|
-
json_string: "JSON \
|
|
8118
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
8119
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
8120
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
7715
8121
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
7716
8122
|
jwt: "JWT",
|
|
7717
8123
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -7719,7 +8125,7 @@ var error23 = () => {
|
|
|
7719
8125
|
const TypeDictionary = {
|
|
7720
8126
|
nan: "NaN",
|
|
7721
8127
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
7722
|
-
string: "\
|
|
8128
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
7723
8129
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
7724
8130
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
7725
8131
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -7757,14 +8163,14 @@ var error23 = () => {
|
|
|
7757
8163
|
case "invalid_format": {
|
|
7758
8164
|
const _issue = issue2;
|
|
7759
8165
|
if (_issue.format === "starts_with") {
|
|
7760
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
8166
|
+
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`;
|
|
7761
8167
|
}
|
|
7762
8168
|
if (_issue.format === "ends_with")
|
|
7763
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
8169
|
+
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`;
|
|
7764
8170
|
if (_issue.format === "includes")
|
|
7765
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
8171
|
+
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`;
|
|
7766
8172
|
if (_issue.format === "regex")
|
|
7767
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
8173
|
+
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}`;
|
|
7768
8174
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7769
8175
|
}
|
|
7770
8176
|
case "not_multiple_of":
|
|
@@ -7784,12 +8190,12 @@ var error23 = () => {
|
|
|
7784
8190
|
};
|
|
7785
8191
|
function ka_default() {
|
|
7786
8192
|
return {
|
|
7787
|
-
localeError:
|
|
8193
|
+
localeError: error25()
|
|
7788
8194
|
};
|
|
7789
8195
|
}
|
|
7790
8196
|
|
|
7791
8197
|
// ../../node_modules/zod/v4/locales/km.js
|
|
7792
|
-
var
|
|
8198
|
+
var error26 = () => {
|
|
7793
8199
|
const Sizable = {
|
|
7794
8200
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
7795
8201
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -7895,7 +8301,7 @@ var error24 = () => {
|
|
|
7895
8301
|
};
|
|
7896
8302
|
function km_default() {
|
|
7897
8303
|
return {
|
|
7898
|
-
localeError:
|
|
8304
|
+
localeError: error26()
|
|
7899
8305
|
};
|
|
7900
8306
|
}
|
|
7901
8307
|
|
|
@@ -7905,7 +8311,7 @@ function kh_default() {
|
|
|
7905
8311
|
}
|
|
7906
8312
|
|
|
7907
8313
|
// ../../node_modules/zod/v4/locales/ko.js
|
|
7908
|
-
var
|
|
8314
|
+
var error27 = () => {
|
|
7909
8315
|
const Sizable = {
|
|
7910
8316
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
7911
8317
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -8012,7 +8418,7 @@ var error25 = () => {
|
|
|
8012
8418
|
};
|
|
8013
8419
|
function ko_default() {
|
|
8014
8420
|
return {
|
|
8015
|
-
localeError:
|
|
8421
|
+
localeError: error27()
|
|
8016
8422
|
};
|
|
8017
8423
|
}
|
|
8018
8424
|
|
|
@@ -8030,7 +8436,7 @@ function getUnitTypeFromNumber(number4) {
|
|
|
8030
8436
|
return "one";
|
|
8031
8437
|
return "few";
|
|
8032
8438
|
}
|
|
8033
|
-
var
|
|
8439
|
+
var error28 = () => {
|
|
8034
8440
|
const Sizable = {
|
|
8035
8441
|
string: {
|
|
8036
8442
|
unit: {
|
|
@@ -8216,12 +8622,12 @@ var error26 = () => {
|
|
|
8216
8622
|
};
|
|
8217
8623
|
function lt_default() {
|
|
8218
8624
|
return {
|
|
8219
|
-
localeError:
|
|
8625
|
+
localeError: error28()
|
|
8220
8626
|
};
|
|
8221
8627
|
}
|
|
8222
8628
|
|
|
8223
8629
|
// ../../node_modules/zod/v4/locales/mk.js
|
|
8224
|
-
var
|
|
8630
|
+
var error29 = () => {
|
|
8225
8631
|
const Sizable = {
|
|
8226
8632
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
8227
8633
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -8326,12 +8732,12 @@ var error27 = () => {
|
|
|
8326
8732
|
};
|
|
8327
8733
|
function mk_default() {
|
|
8328
8734
|
return {
|
|
8329
|
-
localeError:
|
|
8735
|
+
localeError: error29()
|
|
8330
8736
|
};
|
|
8331
8737
|
}
|
|
8332
8738
|
|
|
8333
8739
|
// ../../node_modules/zod/v4/locales/ms.js
|
|
8334
|
-
var
|
|
8740
|
+
var error30 = () => {
|
|
8335
8741
|
const Sizable = {
|
|
8336
8742
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
8337
8743
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -8434,12 +8840,12 @@ var error28 = () => {
|
|
|
8434
8840
|
};
|
|
8435
8841
|
function ms_default() {
|
|
8436
8842
|
return {
|
|
8437
|
-
localeError:
|
|
8843
|
+
localeError: error30()
|
|
8438
8844
|
};
|
|
8439
8845
|
}
|
|
8440
8846
|
|
|
8441
8847
|
// ../../node_modules/zod/v4/locales/nl.js
|
|
8442
|
-
var
|
|
8848
|
+
var error31 = () => {
|
|
8443
8849
|
const Sizable = {
|
|
8444
8850
|
string: { unit: "tekens", verb: "heeft" },
|
|
8445
8851
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -8545,12 +8951,12 @@ var error29 = () => {
|
|
|
8545
8951
|
};
|
|
8546
8952
|
function nl_default() {
|
|
8547
8953
|
return {
|
|
8548
|
-
localeError:
|
|
8954
|
+
localeError: error31()
|
|
8549
8955
|
};
|
|
8550
8956
|
}
|
|
8551
8957
|
|
|
8552
8958
|
// ../../node_modules/zod/v4/locales/no.js
|
|
8553
|
-
var
|
|
8959
|
+
var error32 = () => {
|
|
8554
8960
|
const Sizable = {
|
|
8555
8961
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
8556
8962
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -8654,12 +9060,12 @@ var error30 = () => {
|
|
|
8654
9060
|
};
|
|
8655
9061
|
function no_default() {
|
|
8656
9062
|
return {
|
|
8657
|
-
localeError:
|
|
9063
|
+
localeError: error32()
|
|
8658
9064
|
};
|
|
8659
9065
|
}
|
|
8660
9066
|
|
|
8661
9067
|
// ../../node_modules/zod/v4/locales/ota.js
|
|
8662
|
-
var
|
|
9068
|
+
var error33 = () => {
|
|
8663
9069
|
const Sizable = {
|
|
8664
9070
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
8665
9071
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -8764,12 +9170,12 @@ var error31 = () => {
|
|
|
8764
9170
|
};
|
|
8765
9171
|
function ota_default() {
|
|
8766
9172
|
return {
|
|
8767
|
-
localeError:
|
|
9173
|
+
localeError: error33()
|
|
8768
9174
|
};
|
|
8769
9175
|
}
|
|
8770
9176
|
|
|
8771
9177
|
// ../../node_modules/zod/v4/locales/ps.js
|
|
8772
|
-
var
|
|
9178
|
+
var error34 = () => {
|
|
8773
9179
|
const Sizable = {
|
|
8774
9180
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
8775
9181
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -8879,12 +9285,12 @@ var error32 = () => {
|
|
|
8879
9285
|
};
|
|
8880
9286
|
function ps_default() {
|
|
8881
9287
|
return {
|
|
8882
|
-
localeError:
|
|
9288
|
+
localeError: error34()
|
|
8883
9289
|
};
|
|
8884
9290
|
}
|
|
8885
9291
|
|
|
8886
9292
|
// ../../node_modules/zod/v4/locales/pl.js
|
|
8887
|
-
var
|
|
9293
|
+
var error35 = () => {
|
|
8888
9294
|
const Sizable = {
|
|
8889
9295
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
8890
9296
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -8989,12 +9395,12 @@ var error33 = () => {
|
|
|
8989
9395
|
};
|
|
8990
9396
|
function pl_default() {
|
|
8991
9397
|
return {
|
|
8992
|
-
localeError:
|
|
9398
|
+
localeError: error35()
|
|
8993
9399
|
};
|
|
8994
9400
|
}
|
|
8995
9401
|
|
|
8996
9402
|
// ../../node_modules/zod/v4/locales/pt.js
|
|
8997
|
-
var
|
|
9403
|
+
var error36 = () => {
|
|
8998
9404
|
const Sizable = {
|
|
8999
9405
|
string: { unit: "caracteres", verb: "ter" },
|
|
9000
9406
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -9098,7 +9504,127 @@ var error34 = () => {
|
|
|
9098
9504
|
};
|
|
9099
9505
|
function pt_default() {
|
|
9100
9506
|
return {
|
|
9101
|
-
localeError:
|
|
9507
|
+
localeError: error36()
|
|
9508
|
+
};
|
|
9509
|
+
}
|
|
9510
|
+
|
|
9511
|
+
// ../../node_modules/zod/v4/locales/ro.js
|
|
9512
|
+
var error37 = () => {
|
|
9513
|
+
const Sizable = {
|
|
9514
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
9515
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
9516
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
9517
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
9518
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
9519
|
+
};
|
|
9520
|
+
function getSizing(origin) {
|
|
9521
|
+
return Sizable[origin] ?? null;
|
|
9522
|
+
}
|
|
9523
|
+
const FormatDictionary = {
|
|
9524
|
+
regex: "intrare",
|
|
9525
|
+
email: "adres\u0103 de email",
|
|
9526
|
+
url: "URL",
|
|
9527
|
+
emoji: "emoji",
|
|
9528
|
+
uuid: "UUID",
|
|
9529
|
+
uuidv4: "UUIDv4",
|
|
9530
|
+
uuidv6: "UUIDv6",
|
|
9531
|
+
nanoid: "nanoid",
|
|
9532
|
+
guid: "GUID",
|
|
9533
|
+
cuid: "cuid",
|
|
9534
|
+
cuid2: "cuid2",
|
|
9535
|
+
ulid: "ULID",
|
|
9536
|
+
xid: "XID",
|
|
9537
|
+
ksuid: "KSUID",
|
|
9538
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
9539
|
+
date: "dat\u0103 ISO",
|
|
9540
|
+
time: "or\u0103 ISO",
|
|
9541
|
+
duration: "durat\u0103 ISO",
|
|
9542
|
+
ipv4: "adres\u0103 IPv4",
|
|
9543
|
+
ipv6: "adres\u0103 IPv6",
|
|
9544
|
+
mac: "adres\u0103 MAC",
|
|
9545
|
+
cidrv4: "interval IPv4",
|
|
9546
|
+
cidrv6: "interval IPv6",
|
|
9547
|
+
base64: "\u0219ir codat base64",
|
|
9548
|
+
base64url: "\u0219ir codat base64url",
|
|
9549
|
+
json_string: "\u0219ir JSON",
|
|
9550
|
+
e164: "num\u0103r E.164",
|
|
9551
|
+
jwt: "JWT",
|
|
9552
|
+
template_literal: "intrare"
|
|
9553
|
+
};
|
|
9554
|
+
const TypeDictionary = {
|
|
9555
|
+
nan: "NaN",
|
|
9556
|
+
string: "\u0219ir",
|
|
9557
|
+
number: "num\u0103r",
|
|
9558
|
+
boolean: "boolean",
|
|
9559
|
+
function: "func\u021Bie",
|
|
9560
|
+
array: "matrice",
|
|
9561
|
+
object: "obiect",
|
|
9562
|
+
undefined: "nedefinit",
|
|
9563
|
+
symbol: "simbol",
|
|
9564
|
+
bigint: "num\u0103r mare",
|
|
9565
|
+
void: "void",
|
|
9566
|
+
never: "never",
|
|
9567
|
+
map: "hart\u0103",
|
|
9568
|
+
set: "set"
|
|
9569
|
+
};
|
|
9570
|
+
return (issue2) => {
|
|
9571
|
+
switch (issue2.code) {
|
|
9572
|
+
case "invalid_type": {
|
|
9573
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
9574
|
+
const receivedType = parsedType(issue2.input);
|
|
9575
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
9576
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
9577
|
+
}
|
|
9578
|
+
case "invalid_value":
|
|
9579
|
+
if (issue2.values.length === 1)
|
|
9580
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
9581
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
9582
|
+
case "too_big": {
|
|
9583
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
9584
|
+
const sizing = getSizing(issue2.origin);
|
|
9585
|
+
if (sizing)
|
|
9586
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
9587
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
9588
|
+
}
|
|
9589
|
+
case "too_small": {
|
|
9590
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
9591
|
+
const sizing = getSizing(issue2.origin);
|
|
9592
|
+
if (sizing) {
|
|
9593
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
9594
|
+
}
|
|
9595
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
9596
|
+
}
|
|
9597
|
+
case "invalid_format": {
|
|
9598
|
+
const _issue = issue2;
|
|
9599
|
+
if (_issue.format === "starts_with") {
|
|
9600
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
9601
|
+
}
|
|
9602
|
+
if (_issue.format === "ends_with")
|
|
9603
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
9604
|
+
if (_issue.format === "includes")
|
|
9605
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
9606
|
+
if (_issue.format === "regex")
|
|
9607
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
9608
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
9609
|
+
}
|
|
9610
|
+
case "not_multiple_of":
|
|
9611
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
9612
|
+
case "unrecognized_keys":
|
|
9613
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
9614
|
+
case "invalid_key":
|
|
9615
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
9616
|
+
case "invalid_union":
|
|
9617
|
+
return "Intrare invalid\u0103";
|
|
9618
|
+
case "invalid_element":
|
|
9619
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
9620
|
+
default:
|
|
9621
|
+
return `Intrare invalid\u0103`;
|
|
9622
|
+
}
|
|
9623
|
+
};
|
|
9624
|
+
};
|
|
9625
|
+
function ro_default() {
|
|
9626
|
+
return {
|
|
9627
|
+
localeError: error37()
|
|
9102
9628
|
};
|
|
9103
9629
|
}
|
|
9104
9630
|
|
|
@@ -9118,7 +9644,7 @@ function getRussianPlural(count, one, few, many) {
|
|
|
9118
9644
|
}
|
|
9119
9645
|
return many;
|
|
9120
9646
|
}
|
|
9121
|
-
var
|
|
9647
|
+
var error38 = () => {
|
|
9122
9648
|
const Sizable = {
|
|
9123
9649
|
string: {
|
|
9124
9650
|
unit: {
|
|
@@ -9255,12 +9781,12 @@ var error35 = () => {
|
|
|
9255
9781
|
};
|
|
9256
9782
|
function ru_default() {
|
|
9257
9783
|
return {
|
|
9258
|
-
localeError:
|
|
9784
|
+
localeError: error38()
|
|
9259
9785
|
};
|
|
9260
9786
|
}
|
|
9261
9787
|
|
|
9262
9788
|
// ../../node_modules/zod/v4/locales/sl.js
|
|
9263
|
-
var
|
|
9789
|
+
var error39 = () => {
|
|
9264
9790
|
const Sizable = {
|
|
9265
9791
|
string: { unit: "znakov", verb: "imeti" },
|
|
9266
9792
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -9365,12 +9891,12 @@ var error36 = () => {
|
|
|
9365
9891
|
};
|
|
9366
9892
|
function sl_default() {
|
|
9367
9893
|
return {
|
|
9368
|
-
localeError:
|
|
9894
|
+
localeError: error39()
|
|
9369
9895
|
};
|
|
9370
9896
|
}
|
|
9371
9897
|
|
|
9372
9898
|
// ../../node_modules/zod/v4/locales/sv.js
|
|
9373
|
-
var
|
|
9899
|
+
var error40 = () => {
|
|
9374
9900
|
const Sizable = {
|
|
9375
9901
|
string: { unit: "tecken", verb: "att ha" },
|
|
9376
9902
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -9476,12 +10002,12 @@ var error37 = () => {
|
|
|
9476
10002
|
};
|
|
9477
10003
|
function sv_default() {
|
|
9478
10004
|
return {
|
|
9479
|
-
localeError:
|
|
10005
|
+
localeError: error40()
|
|
9480
10006
|
};
|
|
9481
10007
|
}
|
|
9482
10008
|
|
|
9483
10009
|
// ../../node_modules/zod/v4/locales/ta.js
|
|
9484
|
-
var
|
|
10010
|
+
var error41 = () => {
|
|
9485
10011
|
const Sizable = {
|
|
9486
10012
|
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" },
|
|
9487
10013
|
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" },
|
|
@@ -9587,12 +10113,12 @@ var error38 = () => {
|
|
|
9587
10113
|
};
|
|
9588
10114
|
function ta_default() {
|
|
9589
10115
|
return {
|
|
9590
|
-
localeError:
|
|
10116
|
+
localeError: error41()
|
|
9591
10117
|
};
|
|
9592
10118
|
}
|
|
9593
10119
|
|
|
9594
10120
|
// ../../node_modules/zod/v4/locales/th.js
|
|
9595
|
-
var
|
|
10121
|
+
var error42 = () => {
|
|
9596
10122
|
const Sizable = {
|
|
9597
10123
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
9598
10124
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -9698,12 +10224,12 @@ var error39 = () => {
|
|
|
9698
10224
|
};
|
|
9699
10225
|
function th_default() {
|
|
9700
10226
|
return {
|
|
9701
|
-
localeError:
|
|
10227
|
+
localeError: error42()
|
|
9702
10228
|
};
|
|
9703
10229
|
}
|
|
9704
10230
|
|
|
9705
10231
|
// ../../node_modules/zod/v4/locales/tr.js
|
|
9706
|
-
var
|
|
10232
|
+
var error43 = () => {
|
|
9707
10233
|
const Sizable = {
|
|
9708
10234
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
9709
10235
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -9804,12 +10330,12 @@ var error40 = () => {
|
|
|
9804
10330
|
};
|
|
9805
10331
|
function tr_default() {
|
|
9806
10332
|
return {
|
|
9807
|
-
localeError:
|
|
10333
|
+
localeError: error43()
|
|
9808
10334
|
};
|
|
9809
10335
|
}
|
|
9810
10336
|
|
|
9811
10337
|
// ../../node_modules/zod/v4/locales/uk.js
|
|
9812
|
-
var
|
|
10338
|
+
var error44 = () => {
|
|
9813
10339
|
const Sizable = {
|
|
9814
10340
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
9815
10341
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -9913,7 +10439,7 @@ var error41 = () => {
|
|
|
9913
10439
|
};
|
|
9914
10440
|
function uk_default() {
|
|
9915
10441
|
return {
|
|
9916
|
-
localeError:
|
|
10442
|
+
localeError: error44()
|
|
9917
10443
|
};
|
|
9918
10444
|
}
|
|
9919
10445
|
|
|
@@ -9923,7 +10449,7 @@ function ua_default() {
|
|
|
9923
10449
|
}
|
|
9924
10450
|
|
|
9925
10451
|
// ../../node_modules/zod/v4/locales/ur.js
|
|
9926
|
-
var
|
|
10452
|
+
var error45 = () => {
|
|
9927
10453
|
const Sizable = {
|
|
9928
10454
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
9929
10455
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -10029,17 +10555,18 @@ var error42 = () => {
|
|
|
10029
10555
|
};
|
|
10030
10556
|
function ur_default() {
|
|
10031
10557
|
return {
|
|
10032
|
-
localeError:
|
|
10558
|
+
localeError: error45()
|
|
10033
10559
|
};
|
|
10034
10560
|
}
|
|
10035
10561
|
|
|
10036
10562
|
// ../../node_modules/zod/v4/locales/uz.js
|
|
10037
|
-
var
|
|
10563
|
+
var error46 = () => {
|
|
10038
10564
|
const Sizable = {
|
|
10039
10565
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
10040
10566
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
10041
10567
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
10042
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
10568
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
10569
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
10043
10570
|
};
|
|
10044
10571
|
function getSizing(origin) {
|
|
10045
10572
|
return Sizable[origin] ?? null;
|
|
@@ -10139,12 +10666,12 @@ var error43 = () => {
|
|
|
10139
10666
|
};
|
|
10140
10667
|
function uz_default() {
|
|
10141
10668
|
return {
|
|
10142
|
-
localeError:
|
|
10669
|
+
localeError: error46()
|
|
10143
10670
|
};
|
|
10144
10671
|
}
|
|
10145
10672
|
|
|
10146
10673
|
// ../../node_modules/zod/v4/locales/vi.js
|
|
10147
|
-
var
|
|
10674
|
+
var error47 = () => {
|
|
10148
10675
|
const Sizable = {
|
|
10149
10676
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
10150
10677
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -10248,12 +10775,12 @@ var error44 = () => {
|
|
|
10248
10775
|
};
|
|
10249
10776
|
function vi_default() {
|
|
10250
10777
|
return {
|
|
10251
|
-
localeError:
|
|
10778
|
+
localeError: error47()
|
|
10252
10779
|
};
|
|
10253
10780
|
}
|
|
10254
10781
|
|
|
10255
10782
|
// ../../node_modules/zod/v4/locales/zh-CN.js
|
|
10256
|
-
var
|
|
10783
|
+
var error48 = () => {
|
|
10257
10784
|
const Sizable = {
|
|
10258
10785
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
10259
10786
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -10358,12 +10885,12 @@ var error45 = () => {
|
|
|
10358
10885
|
};
|
|
10359
10886
|
function zh_CN_default() {
|
|
10360
10887
|
return {
|
|
10361
|
-
localeError:
|
|
10888
|
+
localeError: error48()
|
|
10362
10889
|
};
|
|
10363
10890
|
}
|
|
10364
10891
|
|
|
10365
10892
|
// ../../node_modules/zod/v4/locales/zh-TW.js
|
|
10366
|
-
var
|
|
10893
|
+
var error49 = () => {
|
|
10367
10894
|
const Sizable = {
|
|
10368
10895
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
10369
10896
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -10466,12 +10993,12 @@ var error46 = () => {
|
|
|
10466
10993
|
};
|
|
10467
10994
|
function zh_TW_default() {
|
|
10468
10995
|
return {
|
|
10469
|
-
localeError:
|
|
10996
|
+
localeError: error49()
|
|
10470
10997
|
};
|
|
10471
10998
|
}
|
|
10472
10999
|
|
|
10473
11000
|
// ../../node_modules/zod/v4/locales/yo.js
|
|
10474
|
-
var
|
|
11001
|
+
var error50 = () => {
|
|
10475
11002
|
const Sizable = {
|
|
10476
11003
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
10477
11004
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -10574,12 +11101,12 @@ var error47 = () => {
|
|
|
10574
11101
|
};
|
|
10575
11102
|
function yo_default() {
|
|
10576
11103
|
return {
|
|
10577
|
-
localeError:
|
|
11104
|
+
localeError: error50()
|
|
10578
11105
|
};
|
|
10579
11106
|
}
|
|
10580
11107
|
|
|
10581
11108
|
// ../../node_modules/zod/v4/core/registries.js
|
|
10582
|
-
var
|
|
11109
|
+
var _a2;
|
|
10583
11110
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
10584
11111
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
10585
11112
|
var $ZodRegistry = class {
|
|
@@ -10625,7 +11152,7 @@ var $ZodRegistry = class {
|
|
|
10625
11152
|
function registry() {
|
|
10626
11153
|
return new $ZodRegistry();
|
|
10627
11154
|
}
|
|
10628
|
-
(
|
|
11155
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
10629
11156
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
10630
11157
|
|
|
10631
11158
|
// ../../node_modules/zod/v4/core/api.js
|
|
@@ -11543,7 +12070,7 @@ function _refine(Class2, fn, _params) {
|
|
|
11543
12070
|
return schema;
|
|
11544
12071
|
}
|
|
11545
12072
|
// @__NO_SIDE_EFFECTS__
|
|
11546
|
-
function _superRefine(fn) {
|
|
12073
|
+
function _superRefine(fn, params) {
|
|
11547
12074
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
11548
12075
|
payload.addIssue = (issue2) => {
|
|
11549
12076
|
if (typeof issue2 === "string") {
|
|
@@ -11560,7 +12087,7 @@ function _superRefine(fn) {
|
|
|
11560
12087
|
}
|
|
11561
12088
|
};
|
|
11562
12089
|
return fn(payload.value, payload);
|
|
11563
|
-
});
|
|
12090
|
+
}, params);
|
|
11564
12091
|
return ch;
|
|
11565
12092
|
}
|
|
11566
12093
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -11690,7 +12217,7 @@ function initializeContext(params) {
|
|
|
11690
12217
|
};
|
|
11691
12218
|
}
|
|
11692
12219
|
function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
11693
|
-
var
|
|
12220
|
+
var _a3;
|
|
11694
12221
|
const def = schema._zod.def;
|
|
11695
12222
|
const seen = ctx.seen.get(schema);
|
|
11696
12223
|
if (seen) {
|
|
@@ -11737,8 +12264,8 @@ function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
11737
12264
|
delete result.schema.examples;
|
|
11738
12265
|
delete result.schema.default;
|
|
11739
12266
|
}
|
|
11740
|
-
if (ctx.io === "input" && result.schema
|
|
11741
|
-
(
|
|
12267
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
12268
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
11742
12269
|
delete result.schema._prefault;
|
|
11743
12270
|
const _result = ctx.seen.get(schema);
|
|
11744
12271
|
return _result.schema;
|
|
@@ -11919,10 +12446,15 @@ function finalize(ctx, schema) {
|
|
|
11919
12446
|
result.$id = ctx.external.uri(id);
|
|
11920
12447
|
}
|
|
11921
12448
|
Object.assign(result, root.def ?? root.schema);
|
|
12449
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
12450
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
12451
|
+
delete result.id;
|
|
11922
12452
|
const defs = ctx.external?.defs ?? {};
|
|
11923
12453
|
for (const entry of ctx.seen.entries()) {
|
|
11924
12454
|
const seen = entry[1];
|
|
11925
12455
|
if (seen.def && seen.defId) {
|
|
12456
|
+
if (seen.def.id === seen.defId)
|
|
12457
|
+
delete seen.def.id;
|
|
11926
12458
|
defs[seen.defId] = seen.def;
|
|
11927
12459
|
}
|
|
11928
12460
|
}
|
|
@@ -11978,6 +12510,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
11978
12510
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
11979
12511
|
}
|
|
11980
12512
|
if (def.type === "pipe") {
|
|
12513
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
12514
|
+
return true;
|
|
11981
12515
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
11982
12516
|
}
|
|
11983
12517
|
if (def.type === "object") {
|
|
@@ -12067,39 +12601,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
12067
12601
|
json2.type = "integer";
|
|
12068
12602
|
else
|
|
12069
12603
|
json2.type = "number";
|
|
12070
|
-
|
|
12071
|
-
|
|
12604
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
12605
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
12606
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
12607
|
+
if (exMin) {
|
|
12608
|
+
if (legacy) {
|
|
12072
12609
|
json2.minimum = exclusiveMinimum;
|
|
12073
12610
|
json2.exclusiveMinimum = true;
|
|
12074
12611
|
} else {
|
|
12075
12612
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
12076
12613
|
}
|
|
12077
|
-
}
|
|
12078
|
-
if (typeof minimum === "number") {
|
|
12614
|
+
} else if (typeof minimum === "number") {
|
|
12079
12615
|
json2.minimum = minimum;
|
|
12080
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
12081
|
-
if (exclusiveMinimum >= minimum)
|
|
12082
|
-
delete json2.minimum;
|
|
12083
|
-
else
|
|
12084
|
-
delete json2.exclusiveMinimum;
|
|
12085
|
-
}
|
|
12086
12616
|
}
|
|
12087
|
-
if (
|
|
12088
|
-
if (
|
|
12617
|
+
if (exMax) {
|
|
12618
|
+
if (legacy) {
|
|
12089
12619
|
json2.maximum = exclusiveMaximum;
|
|
12090
12620
|
json2.exclusiveMaximum = true;
|
|
12091
12621
|
} else {
|
|
12092
12622
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
12093
12623
|
}
|
|
12094
|
-
}
|
|
12095
|
-
if (typeof maximum === "number") {
|
|
12624
|
+
} else if (typeof maximum === "number") {
|
|
12096
12625
|
json2.maximum = maximum;
|
|
12097
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
12098
|
-
if (exclusiveMaximum <= maximum)
|
|
12099
|
-
delete json2.maximum;
|
|
12100
|
-
else
|
|
12101
|
-
delete json2.exclusiveMaximum;
|
|
12102
|
-
}
|
|
12103
12626
|
}
|
|
12104
12627
|
if (typeof multipleOf === "number")
|
|
12105
12628
|
json2.multipleOf = multipleOf;
|
|
@@ -12271,7 +12794,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
12271
12794
|
if (typeof maximum === "number")
|
|
12272
12795
|
json2.maxItems = maximum;
|
|
12273
12796
|
json2.type = "array";
|
|
12274
|
-
json2.items = process(def.element, ctx, {
|
|
12797
|
+
json2.items = process(def.element, ctx, {
|
|
12798
|
+
...params,
|
|
12799
|
+
path: [...params.path, "items"]
|
|
12800
|
+
});
|
|
12275
12801
|
};
|
|
12276
12802
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
12277
12803
|
const json2 = _json;
|
|
@@ -12464,7 +12990,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
|
|
|
12464
12990
|
};
|
|
12465
12991
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
12466
12992
|
const def = schema._zod.def;
|
|
12467
|
-
const
|
|
12993
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
12994
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
12468
12995
|
process(innerType, ctx, params);
|
|
12469
12996
|
const seen = ctx.seen.get(schema);
|
|
12470
12997
|
seen.ref = innerType;
|
|
@@ -12698,6 +13225,7 @@ __export(schemas_exports2, {
|
|
|
12698
13225
|
ZodOptional: () => ZodOptional,
|
|
12699
13226
|
ZodPipe: () => ZodPipe,
|
|
12700
13227
|
ZodPrefault: () => ZodPrefault,
|
|
13228
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
12701
13229
|
ZodPromise: () => ZodPromise,
|
|
12702
13230
|
ZodReadonly: () => ZodReadonly,
|
|
12703
13231
|
ZodRecord: () => ZodRecord,
|
|
@@ -12758,6 +13286,7 @@ __export(schemas_exports2, {
|
|
|
12758
13286
|
int32: () => int32,
|
|
12759
13287
|
int64: () => int64,
|
|
12760
13288
|
intersection: () => intersection,
|
|
13289
|
+
invertCodec: () => invertCodec,
|
|
12761
13290
|
ipv4: () => ipv42,
|
|
12762
13291
|
ipv6: () => ipv62,
|
|
12763
13292
|
json: () => json,
|
|
@@ -12927,8 +13456,8 @@ var initializer2 = (inst, issues) => {
|
|
|
12927
13456
|
}
|
|
12928
13457
|
});
|
|
12929
13458
|
};
|
|
12930
|
-
var ZodError = $constructor("ZodError", initializer2);
|
|
12931
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
13459
|
+
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
13460
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
12932
13461
|
Parent: Error
|
|
12933
13462
|
});
|
|
12934
13463
|
|
|
@@ -12947,6 +13476,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
|
12947
13476
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
12948
13477
|
|
|
12949
13478
|
// ../../node_modules/zod/v4/classic/schemas.js
|
|
13479
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
13480
|
+
function _installLazyMethods(inst, group, methods) {
|
|
13481
|
+
const proto = Object.getPrototypeOf(inst);
|
|
13482
|
+
let installed = _installedGroups.get(proto);
|
|
13483
|
+
if (!installed) {
|
|
13484
|
+
installed = /* @__PURE__ */ new Set();
|
|
13485
|
+
_installedGroups.set(proto, installed);
|
|
13486
|
+
}
|
|
13487
|
+
if (installed.has(group))
|
|
13488
|
+
return;
|
|
13489
|
+
installed.add(group);
|
|
13490
|
+
for (const key in methods) {
|
|
13491
|
+
const fn = methods[key];
|
|
13492
|
+
Object.defineProperty(proto, key, {
|
|
13493
|
+
configurable: true,
|
|
13494
|
+
enumerable: false,
|
|
13495
|
+
get() {
|
|
13496
|
+
const bound = fn.bind(this);
|
|
13497
|
+
Object.defineProperty(this, key, {
|
|
13498
|
+
configurable: true,
|
|
13499
|
+
writable: true,
|
|
13500
|
+
enumerable: true,
|
|
13501
|
+
value: bound
|
|
13502
|
+
});
|
|
13503
|
+
return bound;
|
|
13504
|
+
},
|
|
13505
|
+
set(v) {
|
|
13506
|
+
Object.defineProperty(this, key, {
|
|
13507
|
+
configurable: true,
|
|
13508
|
+
writable: true,
|
|
13509
|
+
enumerable: true,
|
|
13510
|
+
value: v
|
|
13511
|
+
});
|
|
13512
|
+
}
|
|
13513
|
+
});
|
|
13514
|
+
}
|
|
13515
|
+
}
|
|
12950
13516
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
12951
13517
|
$ZodType.init(inst, def);
|
|
12952
13518
|
Object.assign(inst["~standard"], {
|
|
@@ -12959,23 +13525,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12959
13525
|
inst.def = def;
|
|
12960
13526
|
inst.type = def.type;
|
|
12961
13527
|
Object.defineProperty(inst, "_def", { value: def });
|
|
12962
|
-
inst.check = (...checks) => {
|
|
12963
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
12964
|
-
checks: [
|
|
12965
|
-
...def.checks ?? [],
|
|
12966
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
12967
|
-
]
|
|
12968
|
-
}), {
|
|
12969
|
-
parent: true
|
|
12970
|
-
});
|
|
12971
|
-
};
|
|
12972
|
-
inst.with = inst.check;
|
|
12973
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
12974
|
-
inst.brand = () => inst;
|
|
12975
|
-
inst.register = ((reg, meta3) => {
|
|
12976
|
-
reg.add(inst, meta3);
|
|
12977
|
-
return inst;
|
|
12978
|
-
});
|
|
12979
13528
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
12980
13529
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
12981
13530
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -12989,45 +13538,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12989
13538
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
12990
13539
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
12991
13540
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
12992
|
-
inst
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
|
|
12996
|
-
|
|
12997
|
-
|
|
12998
|
-
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
|
|
13003
|
-
|
|
13004
|
-
|
|
13005
|
-
|
|
13006
|
-
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13541
|
+
_installLazyMethods(inst, "ZodType", {
|
|
13542
|
+
check(...chks) {
|
|
13543
|
+
const def2 = this.def;
|
|
13544
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
13545
|
+
checks: [
|
|
13546
|
+
...def2.checks ?? [],
|
|
13547
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
13548
|
+
]
|
|
13549
|
+
}), { parent: true });
|
|
13550
|
+
},
|
|
13551
|
+
with(...chks) {
|
|
13552
|
+
return this.check(...chks);
|
|
13553
|
+
},
|
|
13554
|
+
clone(def2, params) {
|
|
13555
|
+
return clone(this, def2, params);
|
|
13556
|
+
},
|
|
13557
|
+
brand() {
|
|
13558
|
+
return this;
|
|
13559
|
+
},
|
|
13560
|
+
register(reg, meta3) {
|
|
13561
|
+
reg.add(this, meta3);
|
|
13562
|
+
return this;
|
|
13563
|
+
},
|
|
13564
|
+
refine(check2, params) {
|
|
13565
|
+
return this.check(refine(check2, params));
|
|
13566
|
+
},
|
|
13567
|
+
superRefine(refinement, params) {
|
|
13568
|
+
return this.check(superRefine(refinement, params));
|
|
13569
|
+
},
|
|
13570
|
+
overwrite(fn) {
|
|
13571
|
+
return this.check(_overwrite(fn));
|
|
13572
|
+
},
|
|
13573
|
+
optional() {
|
|
13574
|
+
return optional(this);
|
|
13575
|
+
},
|
|
13576
|
+
exactOptional() {
|
|
13577
|
+
return exactOptional(this);
|
|
13578
|
+
},
|
|
13579
|
+
nullable() {
|
|
13580
|
+
return nullable(this);
|
|
13581
|
+
},
|
|
13582
|
+
nullish() {
|
|
13583
|
+
return optional(nullable(this));
|
|
13584
|
+
},
|
|
13585
|
+
nonoptional(params) {
|
|
13586
|
+
return nonoptional(this, params);
|
|
13587
|
+
},
|
|
13588
|
+
array() {
|
|
13589
|
+
return array(this);
|
|
13590
|
+
},
|
|
13591
|
+
or(arg) {
|
|
13592
|
+
return union([this, arg]);
|
|
13593
|
+
},
|
|
13594
|
+
and(arg) {
|
|
13595
|
+
return intersection(this, arg);
|
|
13596
|
+
},
|
|
13597
|
+
transform(tx) {
|
|
13598
|
+
return pipe(this, transform(tx));
|
|
13599
|
+
},
|
|
13600
|
+
default(d) {
|
|
13601
|
+
return _default2(this, d);
|
|
13602
|
+
},
|
|
13603
|
+
prefault(d) {
|
|
13604
|
+
return prefault(this, d);
|
|
13605
|
+
},
|
|
13606
|
+
catch(params) {
|
|
13607
|
+
return _catch2(this, params);
|
|
13608
|
+
},
|
|
13609
|
+
pipe(target) {
|
|
13610
|
+
return pipe(this, target);
|
|
13611
|
+
},
|
|
13612
|
+
readonly() {
|
|
13613
|
+
return readonly(this);
|
|
13614
|
+
},
|
|
13615
|
+
describe(description) {
|
|
13616
|
+
const cl = this.clone();
|
|
13617
|
+
globalRegistry.add(cl, { description });
|
|
13618
|
+
return cl;
|
|
13619
|
+
},
|
|
13620
|
+
meta(...args) {
|
|
13621
|
+
if (args.length === 0)
|
|
13622
|
+
return globalRegistry.get(this);
|
|
13623
|
+
const cl = this.clone();
|
|
13624
|
+
globalRegistry.add(cl, args[0]);
|
|
13625
|
+
return cl;
|
|
13626
|
+
},
|
|
13627
|
+
isOptional() {
|
|
13628
|
+
return this.safeParse(void 0).success;
|
|
13629
|
+
},
|
|
13630
|
+
isNullable() {
|
|
13631
|
+
return this.safeParse(null).success;
|
|
13632
|
+
},
|
|
13633
|
+
apply(fn) {
|
|
13634
|
+
return fn(this);
|
|
13635
|
+
}
|
|
13636
|
+
});
|
|
13014
13637
|
Object.defineProperty(inst, "description", {
|
|
13015
13638
|
get() {
|
|
13016
13639
|
return globalRegistry.get(inst)?.description;
|
|
13017
13640
|
},
|
|
13018
13641
|
configurable: true
|
|
13019
13642
|
});
|
|
13020
|
-
inst.meta = (...args) => {
|
|
13021
|
-
if (args.length === 0) {
|
|
13022
|
-
return globalRegistry.get(inst);
|
|
13023
|
-
}
|
|
13024
|
-
const cl = inst.clone();
|
|
13025
|
-
globalRegistry.add(cl, args[0]);
|
|
13026
|
-
return cl;
|
|
13027
|
-
};
|
|
13028
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
13029
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
13030
|
-
inst.apply = (fn) => fn(inst);
|
|
13031
13643
|
return inst;
|
|
13032
13644
|
});
|
|
13033
13645
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -13038,21 +13650,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
13038
13650
|
inst.format = bag.format ?? null;
|
|
13039
13651
|
inst.minLength = bag.minimum ?? null;
|
|
13040
13652
|
inst.maxLength = bag.maximum ?? null;
|
|
13041
|
-
inst
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
|
|
13653
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
13654
|
+
regex(...args) {
|
|
13655
|
+
return this.check(_regex(...args));
|
|
13656
|
+
},
|
|
13657
|
+
includes(...args) {
|
|
13658
|
+
return this.check(_includes(...args));
|
|
13659
|
+
},
|
|
13660
|
+
startsWith(...args) {
|
|
13661
|
+
return this.check(_startsWith(...args));
|
|
13662
|
+
},
|
|
13663
|
+
endsWith(...args) {
|
|
13664
|
+
return this.check(_endsWith(...args));
|
|
13665
|
+
},
|
|
13666
|
+
min(...args) {
|
|
13667
|
+
return this.check(_minLength(...args));
|
|
13668
|
+
},
|
|
13669
|
+
max(...args) {
|
|
13670
|
+
return this.check(_maxLength(...args));
|
|
13671
|
+
},
|
|
13672
|
+
length(...args) {
|
|
13673
|
+
return this.check(_length(...args));
|
|
13674
|
+
},
|
|
13675
|
+
nonempty(...args) {
|
|
13676
|
+
return this.check(_minLength(1, ...args));
|
|
13677
|
+
},
|
|
13678
|
+
lowercase(params) {
|
|
13679
|
+
return this.check(_lowercase(params));
|
|
13680
|
+
},
|
|
13681
|
+
uppercase(params) {
|
|
13682
|
+
return this.check(_uppercase(params));
|
|
13683
|
+
},
|
|
13684
|
+
trim() {
|
|
13685
|
+
return this.check(_trim());
|
|
13686
|
+
},
|
|
13687
|
+
normalize(...args) {
|
|
13688
|
+
return this.check(_normalize(...args));
|
|
13689
|
+
},
|
|
13690
|
+
toLowerCase() {
|
|
13691
|
+
return this.check(_toLowerCase());
|
|
13692
|
+
},
|
|
13693
|
+
toUpperCase() {
|
|
13694
|
+
return this.check(_toUpperCase());
|
|
13695
|
+
},
|
|
13696
|
+
slugify() {
|
|
13697
|
+
return this.check(_slugify());
|
|
13698
|
+
}
|
|
13699
|
+
});
|
|
13056
13700
|
});
|
|
13057
13701
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
13058
13702
|
$ZodString.init(inst, def);
|
|
@@ -13131,7 +13775,7 @@ function url(params) {
|
|
|
13131
13775
|
}
|
|
13132
13776
|
function httpUrl(params) {
|
|
13133
13777
|
return _url(ZodURL, {
|
|
13134
|
-
protocol:
|
|
13778
|
+
protocol: regexes_exports.httpProtocol,
|
|
13135
13779
|
hostname: regexes_exports.domain,
|
|
13136
13780
|
...util_exports.normalizeParams(params)
|
|
13137
13781
|
});
|
|
@@ -13273,21 +13917,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
13273
13917
|
$ZodNumber.init(inst, def);
|
|
13274
13918
|
ZodType.init(inst, def);
|
|
13275
13919
|
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
13276
|
-
inst
|
|
13277
|
-
|
|
13278
|
-
|
|
13279
|
-
|
|
13280
|
-
|
|
13281
|
-
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13920
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
13921
|
+
gt(value, params) {
|
|
13922
|
+
return this.check(_gt(value, params));
|
|
13923
|
+
},
|
|
13924
|
+
gte(value, params) {
|
|
13925
|
+
return this.check(_gte(value, params));
|
|
13926
|
+
},
|
|
13927
|
+
min(value, params) {
|
|
13928
|
+
return this.check(_gte(value, params));
|
|
13929
|
+
},
|
|
13930
|
+
lt(value, params) {
|
|
13931
|
+
return this.check(_lt(value, params));
|
|
13932
|
+
},
|
|
13933
|
+
lte(value, params) {
|
|
13934
|
+
return this.check(_lte(value, params));
|
|
13935
|
+
},
|
|
13936
|
+
max(value, params) {
|
|
13937
|
+
return this.check(_lte(value, params));
|
|
13938
|
+
},
|
|
13939
|
+
int(params) {
|
|
13940
|
+
return this.check(int(params));
|
|
13941
|
+
},
|
|
13942
|
+
safe(params) {
|
|
13943
|
+
return this.check(int(params));
|
|
13944
|
+
},
|
|
13945
|
+
positive(params) {
|
|
13946
|
+
return this.check(_gt(0, params));
|
|
13947
|
+
},
|
|
13948
|
+
nonnegative(params) {
|
|
13949
|
+
return this.check(_gte(0, params));
|
|
13950
|
+
},
|
|
13951
|
+
negative(params) {
|
|
13952
|
+
return this.check(_lt(0, params));
|
|
13953
|
+
},
|
|
13954
|
+
nonpositive(params) {
|
|
13955
|
+
return this.check(_lte(0, params));
|
|
13956
|
+
},
|
|
13957
|
+
multipleOf(value, params) {
|
|
13958
|
+
return this.check(_multipleOf(value, params));
|
|
13959
|
+
},
|
|
13960
|
+
step(value, params) {
|
|
13961
|
+
return this.check(_multipleOf(value, params));
|
|
13962
|
+
},
|
|
13963
|
+
finite() {
|
|
13964
|
+
return this;
|
|
13965
|
+
}
|
|
13966
|
+
});
|
|
13291
13967
|
const bag = inst._zod.bag;
|
|
13292
13968
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
13293
13969
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -13434,11 +14110,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
13434
14110
|
ZodType.init(inst, def);
|
|
13435
14111
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
13436
14112
|
inst.element = def.element;
|
|
13437
|
-
inst
|
|
13438
|
-
|
|
13439
|
-
|
|
13440
|
-
|
|
13441
|
-
|
|
14113
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
14114
|
+
min(n, params) {
|
|
14115
|
+
return this.check(_minLength(n, params));
|
|
14116
|
+
},
|
|
14117
|
+
nonempty(params) {
|
|
14118
|
+
return this.check(_minLength(1, params));
|
|
14119
|
+
},
|
|
14120
|
+
max(n, params) {
|
|
14121
|
+
return this.check(_maxLength(n, params));
|
|
14122
|
+
},
|
|
14123
|
+
length(n, params) {
|
|
14124
|
+
return this.check(_length(n, params));
|
|
14125
|
+
},
|
|
14126
|
+
unwrap() {
|
|
14127
|
+
return this.element;
|
|
14128
|
+
}
|
|
14129
|
+
});
|
|
13442
14130
|
});
|
|
13443
14131
|
function array(element, params) {
|
|
13444
14132
|
return _array(ZodArray, element, params);
|
|
@@ -13454,23 +14142,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
13454
14142
|
util_exports.defineLazy(inst, "shape", () => {
|
|
13455
14143
|
return def.shape;
|
|
13456
14144
|
});
|
|
13457
|
-
inst
|
|
13458
|
-
|
|
13459
|
-
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
13471
|
-
|
|
13472
|
-
|
|
13473
|
-
|
|
14145
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
14146
|
+
keyof() {
|
|
14147
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
14148
|
+
},
|
|
14149
|
+
catchall(catchall) {
|
|
14150
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
14151
|
+
},
|
|
14152
|
+
passthrough() {
|
|
14153
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
14154
|
+
},
|
|
14155
|
+
loose() {
|
|
14156
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
14157
|
+
},
|
|
14158
|
+
strict() {
|
|
14159
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
14160
|
+
},
|
|
14161
|
+
strip() {
|
|
14162
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
14163
|
+
},
|
|
14164
|
+
extend(incoming) {
|
|
14165
|
+
return util_exports.extend(this, incoming);
|
|
14166
|
+
},
|
|
14167
|
+
safeExtend(incoming) {
|
|
14168
|
+
return util_exports.safeExtend(this, incoming);
|
|
14169
|
+
},
|
|
14170
|
+
merge(other) {
|
|
14171
|
+
return util_exports.merge(this, other);
|
|
14172
|
+
},
|
|
14173
|
+
pick(mask) {
|
|
14174
|
+
return util_exports.pick(this, mask);
|
|
14175
|
+
},
|
|
14176
|
+
omit(mask) {
|
|
14177
|
+
return util_exports.omit(this, mask);
|
|
14178
|
+
},
|
|
14179
|
+
partial(...args) {
|
|
14180
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
14181
|
+
},
|
|
14182
|
+
required(...args) {
|
|
14183
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
14184
|
+
}
|
|
14185
|
+
});
|
|
13474
14186
|
});
|
|
13475
14187
|
function object(shape, params) {
|
|
13476
14188
|
const def = {
|
|
@@ -13575,6 +14287,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
|
13575
14287
|
inst.valueType = def.valueType;
|
|
13576
14288
|
});
|
|
13577
14289
|
function record(keyType, valueType, params) {
|
|
14290
|
+
if (!valueType || !valueType._zod) {
|
|
14291
|
+
return new ZodRecord({
|
|
14292
|
+
type: "record",
|
|
14293
|
+
keyType: string2(),
|
|
14294
|
+
valueType: keyType,
|
|
14295
|
+
...util_exports.normalizeParams(valueType)
|
|
14296
|
+
});
|
|
14297
|
+
}
|
|
13578
14298
|
return new ZodRecord({
|
|
13579
14299
|
type: "record",
|
|
13580
14300
|
keyType,
|
|
@@ -13746,10 +14466,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
13746
14466
|
if (output instanceof Promise) {
|
|
13747
14467
|
return output.then((output2) => {
|
|
13748
14468
|
payload.value = output2;
|
|
14469
|
+
payload.fallback = true;
|
|
13749
14470
|
return payload;
|
|
13750
14471
|
});
|
|
13751
14472
|
}
|
|
13752
14473
|
payload.value = output;
|
|
14474
|
+
payload.fallback = true;
|
|
13753
14475
|
return payload;
|
|
13754
14476
|
};
|
|
13755
14477
|
});
|
|
@@ -13904,6 +14626,20 @@ function codec(in_, out, params) {
|
|
|
13904
14626
|
reverseTransform: params.encode
|
|
13905
14627
|
});
|
|
13906
14628
|
}
|
|
14629
|
+
function invertCodec(codec2) {
|
|
14630
|
+
const def = codec2._zod.def;
|
|
14631
|
+
return new ZodCodec({
|
|
14632
|
+
type: "pipe",
|
|
14633
|
+
in: def.out,
|
|
14634
|
+
out: def.in,
|
|
14635
|
+
transform: def.reverseTransform,
|
|
14636
|
+
reverseTransform: def.transform
|
|
14637
|
+
});
|
|
14638
|
+
}
|
|
14639
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
14640
|
+
ZodPipe.init(inst, def);
|
|
14641
|
+
$ZodPreprocess.init(inst, def);
|
|
14642
|
+
});
|
|
13907
14643
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
13908
14644
|
$ZodReadonly.init(inst, def);
|
|
13909
14645
|
ZodType.init(inst, def);
|
|
@@ -13983,8 +14719,8 @@ function custom(fn, _params) {
|
|
|
13983
14719
|
function refine(fn, _params = {}) {
|
|
13984
14720
|
return _refine(ZodCustom, fn, _params);
|
|
13985
14721
|
}
|
|
13986
|
-
function superRefine(fn) {
|
|
13987
|
-
return _superRefine(fn);
|
|
14722
|
+
function superRefine(fn, params) {
|
|
14723
|
+
return _superRefine(fn, params);
|
|
13988
14724
|
}
|
|
13989
14725
|
var describe2 = describe;
|
|
13990
14726
|
var meta2 = meta;
|
|
@@ -14022,7 +14758,11 @@ function json(params) {
|
|
|
14022
14758
|
return jsonSchema;
|
|
14023
14759
|
}
|
|
14024
14760
|
function preprocess(fn, schema) {
|
|
14025
|
-
return
|
|
14761
|
+
return new ZodPreprocess({
|
|
14762
|
+
type: "pipe",
|
|
14763
|
+
in: transform(fn),
|
|
14764
|
+
out: schema
|
|
14765
|
+
});
|
|
14026
14766
|
}
|
|
14027
14767
|
|
|
14028
14768
|
// ../../node_modules/zod/v4/classic/compat.js
|
|
@@ -14443,12 +15183,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
14443
15183
|
default:
|
|
14444
15184
|
throw new Error(`Unsupported type: ${type}`);
|
|
14445
15185
|
}
|
|
14446
|
-
if (schema.description) {
|
|
14447
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
14448
|
-
}
|
|
14449
|
-
if (schema.default !== void 0) {
|
|
14450
|
-
zodSchema = zodSchema.default(schema.default);
|
|
14451
|
-
}
|
|
14452
15186
|
return zodSchema;
|
|
14453
15187
|
}
|
|
14454
15188
|
function convertSchema(schema, ctx) {
|
|
@@ -14485,6 +15219,9 @@ function convertSchema(schema, ctx) {
|
|
|
14485
15219
|
if (schema.readOnly === true) {
|
|
14486
15220
|
baseSchema = z.readonly(baseSchema);
|
|
14487
15221
|
}
|
|
15222
|
+
if (schema.default !== void 0) {
|
|
15223
|
+
baseSchema = baseSchema.default(schema.default);
|
|
15224
|
+
}
|
|
14488
15225
|
const extraMeta = {};
|
|
14489
15226
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
14490
15227
|
for (const key of coreMetadataKeys) {
|
|
@@ -14506,23 +15243,32 @@ function convertSchema(schema, ctx) {
|
|
|
14506
15243
|
if (Object.keys(extraMeta).length > 0) {
|
|
14507
15244
|
ctx.registry.add(baseSchema, extraMeta);
|
|
14508
15245
|
}
|
|
15246
|
+
if (schema.description) {
|
|
15247
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
15248
|
+
}
|
|
14509
15249
|
return baseSchema;
|
|
14510
15250
|
}
|
|
14511
15251
|
function fromJSONSchema(schema, params) {
|
|
14512
15252
|
if (typeof schema === "boolean") {
|
|
14513
15253
|
return schema ? z.any() : z.never();
|
|
14514
15254
|
}
|
|
14515
|
-
|
|
14516
|
-
|
|
15255
|
+
let normalized;
|
|
15256
|
+
try {
|
|
15257
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
15258
|
+
} catch {
|
|
15259
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
15260
|
+
}
|
|
15261
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
15262
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
14517
15263
|
const ctx = {
|
|
14518
15264
|
version: version2,
|
|
14519
15265
|
defs,
|
|
14520
15266
|
refs: /* @__PURE__ */ new Map(),
|
|
14521
15267
|
processing: /* @__PURE__ */ new Set(),
|
|
14522
|
-
rootSchema:
|
|
15268
|
+
rootSchema: normalized,
|
|
14523
15269
|
registry: params?.registry ?? globalRegistry
|
|
14524
15270
|
};
|
|
14525
|
-
return convertSchema(
|
|
15271
|
+
return convertSchema(normalized, ctx);
|
|
14526
15272
|
}
|
|
14527
15273
|
|
|
14528
15274
|
// ../../node_modules/zod/v4/classic/coerce.js
|
|
@@ -14764,6 +15510,9 @@ var GLASSTRACE_ATTRIBUTE_NAMES = {
|
|
|
14764
15510
|
SIDE_EFFECT_FIELD_TIMEZONE: "glasstrace.side_effect.field.timezone",
|
|
14765
15511
|
SIDE_EFFECT_FIELD_STATUS: "glasstrace.side_effect.field.status",
|
|
14766
15512
|
SIDE_EFFECT_FIELD_PHASE: "glasstrace.side_effect.field.phase",
|
|
15513
|
+
SIDE_EFFECT_FIELD_RECIPIENT_CLASS: "glasstrace.side_effect.field.recipientClass",
|
|
15514
|
+
SIDE_EFFECT_FIELD_PARTICIPANT_COUNT: "glasstrace.side_effect.field.participantCount",
|
|
15515
|
+
SIDE_EFFECT_FIELD_ACTIVE_PARTICIPANT_COUNT: "glasstrace.side_effect.field.activeParticipantCount",
|
|
14767
15516
|
// Omission reason attributes — one per allowlisted reason. The
|
|
14768
15517
|
// attribute value carries an integer count; the rejected value is
|
|
14769
15518
|
// never echoed.
|
|
@@ -15106,10 +15855,10 @@ function tracedRequestMiddleware(options, handler) {
|
|
|
15106
15855
|
let result;
|
|
15107
15856
|
try {
|
|
15108
15857
|
result = handler(req, ...rest);
|
|
15109
|
-
} catch (
|
|
15110
|
-
recordSpanError(span,
|
|
15858
|
+
} catch (error51) {
|
|
15859
|
+
recordSpanError(span, error51);
|
|
15111
15860
|
endSpanSafely(span);
|
|
15112
|
-
throw
|
|
15861
|
+
throw error51;
|
|
15113
15862
|
}
|
|
15114
15863
|
if (result !== null && typeof result === "object" && typeof result.then === "function") {
|
|
15115
15864
|
return result.then(
|
|
@@ -15117,10 +15866,10 @@ function tracedRequestMiddleware(options, handler) {
|
|
|
15117
15866
|
endSpanSafely(span);
|
|
15118
15867
|
return value;
|
|
15119
15868
|
},
|
|
15120
|
-
(
|
|
15121
|
-
recordSpanError(span,
|
|
15869
|
+
(error51) => {
|
|
15870
|
+
recordSpanError(span, error51);
|
|
15122
15871
|
endSpanSafely(span);
|
|
15123
|
-
throw
|
|
15872
|
+
throw error51;
|
|
15124
15873
|
}
|
|
15125
15874
|
);
|
|
15126
15875
|
}
|
|
@@ -15136,8 +15885,8 @@ function tracedRequestMiddleware(options, handler) {
|
|
|
15136
15885
|
});
|
|
15137
15886
|
return wrapped;
|
|
15138
15887
|
}
|
|
15139
|
-
function recordSpanError(span,
|
|
15140
|
-
const normalized =
|
|
15888
|
+
function recordSpanError(span, error51) {
|
|
15889
|
+
const normalized = error51 instanceof Error ? error51 : typeof error51 === "string" ? error51 : new Error(String(error51));
|
|
15141
15890
|
const statusMessage = normalized instanceof Error ? normalized.message : normalized;
|
|
15142
15891
|
try {
|
|
15143
15892
|
span.recordException(normalized);
|
|
@@ -15224,9 +15973,9 @@ function withAsyncCausality(options, fn) {
|
|
|
15224
15973
|
fn
|
|
15225
15974
|
);
|
|
15226
15975
|
return value;
|
|
15227
|
-
} catch (
|
|
15228
|
-
recordSpanError2(span,
|
|
15229
|
-
throw
|
|
15976
|
+
} catch (error51) {
|
|
15977
|
+
recordSpanError2(span, error51);
|
|
15978
|
+
throw error51;
|
|
15230
15979
|
} finally {
|
|
15231
15980
|
endSpanSafely2(span);
|
|
15232
15981
|
}
|
|
@@ -15239,8 +15988,8 @@ function isNoopSpan2(span) {
|
|
|
15239
15988
|
return false;
|
|
15240
15989
|
}
|
|
15241
15990
|
}
|
|
15242
|
-
function recordSpanError2(span,
|
|
15243
|
-
const normalized =
|
|
15991
|
+
function recordSpanError2(span, error51) {
|
|
15992
|
+
const normalized = error51 instanceof Error ? error51 : typeof error51 === "string" ? error51 : new Error(String(error51));
|
|
15244
15993
|
const statusMessage = normalized instanceof Error ? normalized.message : normalized;
|
|
15245
15994
|
try {
|
|
15246
15995
|
span.recordException(normalized);
|