@kentico/management-api-mcp 31.4.2-preview → 31.4.4-preview
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1253 -493
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -79,11 +79,11 @@ var require_models = __commonJS({
|
|
|
79
79
|
};
|
|
80
80
|
exports.isJSONRPCResponses = isJSONRPCResponses;
|
|
81
81
|
var createJSONRPCError = function(code, message, data) {
|
|
82
|
-
var
|
|
82
|
+
var error51 = { code, message };
|
|
83
83
|
if (data != null) {
|
|
84
|
-
|
|
84
|
+
error51.data = data;
|
|
85
85
|
}
|
|
86
|
-
return
|
|
86
|
+
return error51;
|
|
87
87
|
};
|
|
88
88
|
var JSONRPCErrorException = (
|
|
89
89
|
/** @class */
|
|
@@ -297,9 +297,9 @@ var require_client = __commonJS({
|
|
|
297
297
|
return request().then(function(result) {
|
|
298
298
|
clearTimeout(timeoutID);
|
|
299
299
|
return result;
|
|
300
|
-
}, function(
|
|
300
|
+
}, function(error51) {
|
|
301
301
|
clearTimeout(timeoutID);
|
|
302
|
-
return Promise.reject(
|
|
302
|
+
return Promise.reject(error51);
|
|
303
303
|
});
|
|
304
304
|
};
|
|
305
305
|
var requestAdvanced = function(request, clientParams) {
|
|
@@ -328,13 +328,13 @@ var require_client = __commonJS({
|
|
|
328
328
|
JSONRPCClient3.prototype.requestWithID = function(method, params, clientParams, id) {
|
|
329
329
|
return __awaiter(this, void 0, void 0, function() {
|
|
330
330
|
var request, response;
|
|
331
|
-
return __generator(this, function(
|
|
332
|
-
switch (
|
|
331
|
+
return __generator(this, function(_a3) {
|
|
332
|
+
switch (_a3.label) {
|
|
333
333
|
case 0:
|
|
334
334
|
request = (0, models_1.createJSONRPCRequest)(id, method, params);
|
|
335
335
|
return [4, this.requestAdvanced(request, clientParams)];
|
|
336
336
|
case 1:
|
|
337
|
-
response =
|
|
337
|
+
response = _a3.sent();
|
|
338
338
|
if (response.result !== void 0 && !response.error) {
|
|
339
339
|
return [2, response.result];
|
|
340
340
|
} else if (response.result === void 0 && response.error) {
|
|
@@ -373,9 +373,9 @@ var require_client = __commonJS({
|
|
|
373
373
|
});
|
|
374
374
|
return this.send(areRequestsOriginallyArray ? requests : requests[0], clientParams).then(function() {
|
|
375
375
|
return promise2;
|
|
376
|
-
}, function(
|
|
376
|
+
}, function(error51) {
|
|
377
377
|
requestsWithID.forEach(function(request) {
|
|
378
|
-
_this.receive((0, models_1.createJSONRPCErrorResponse)(request.id, internal_1.DefaultErrorCode,
|
|
378
|
+
_this.receive((0, models_1.createJSONRPCErrorResponse)(request.id, internal_1.DefaultErrorCode, error51 && error51.message || "Failed to send a request"));
|
|
379
379
|
});
|
|
380
380
|
return promise2;
|
|
381
381
|
});
|
|
@@ -388,7 +388,7 @@ var require_client = __commonJS({
|
|
|
388
388
|
};
|
|
389
389
|
JSONRPCClient3.prototype.send = function(payload, clientParams) {
|
|
390
390
|
return __awaiter(this, void 0, void 0, function() {
|
|
391
|
-
return __generator(this, function(
|
|
391
|
+
return __generator(this, function(_a3) {
|
|
392
392
|
return [2, this._send(payload, clientParams)];
|
|
393
393
|
});
|
|
394
394
|
});
|
|
@@ -570,11 +570,11 @@ var require_server = __commonJS({
|
|
|
570
570
|
if (options === void 0) {
|
|
571
571
|
options = {};
|
|
572
572
|
}
|
|
573
|
-
var
|
|
573
|
+
var _a3;
|
|
574
574
|
this.mapErrorToJSONRPCErrorResponse = defaultMapErrorToJSONRPCErrorResponse;
|
|
575
575
|
this.nameToMethodDictionary = {};
|
|
576
576
|
this.middleware = null;
|
|
577
|
-
this.errorListener = (
|
|
577
|
+
this.errorListener = (_a3 = options.errorListener) !== null && _a3 !== void 0 ? _a3 : console.warn;
|
|
578
578
|
}
|
|
579
579
|
JSONRPCServer3.prototype.hasMethod = function(name) {
|
|
580
580
|
return !!this.nameToMethodDictionary[name];
|
|
@@ -594,8 +594,8 @@ var require_server = __commonJS({
|
|
|
594
594
|
};
|
|
595
595
|
};
|
|
596
596
|
JSONRPCServer3.prototype.addMethodAdvanced = function(name, method) {
|
|
597
|
-
var
|
|
598
|
-
this.nameToMethodDictionary = __assign(__assign({}, this.nameToMethodDictionary), (
|
|
597
|
+
var _a3;
|
|
598
|
+
this.nameToMethodDictionary = __assign(__assign({}, this.nameToMethodDictionary), (_a3 = {}, _a3[name] = method, _a3));
|
|
599
599
|
};
|
|
600
600
|
JSONRPCServer3.prototype.receiveJSON = function(json2, serverParams) {
|
|
601
601
|
var request = this.tryParseRequestJSON(json2);
|
|
@@ -608,7 +608,7 @@ var require_server = __commonJS({
|
|
|
608
608
|
JSONRPCServer3.prototype.tryParseRequestJSON = function(json2) {
|
|
609
609
|
try {
|
|
610
610
|
return JSON.parse(json2);
|
|
611
|
-
} catch (
|
|
611
|
+
} catch (_a3) {
|
|
612
612
|
return null;
|
|
613
613
|
}
|
|
614
614
|
};
|
|
@@ -623,14 +623,14 @@ var require_server = __commonJS({
|
|
|
623
623
|
return __awaiter(this, void 0, void 0, function() {
|
|
624
624
|
var responses;
|
|
625
625
|
var _this = this;
|
|
626
|
-
return __generator(this, function(
|
|
627
|
-
switch (
|
|
626
|
+
return __generator(this, function(_a3) {
|
|
627
|
+
switch (_a3.label) {
|
|
628
628
|
case 0:
|
|
629
629
|
return [4, Promise.all(requests.map(function(request) {
|
|
630
630
|
return _this.receiveSingle(request, serverParams);
|
|
631
631
|
}))];
|
|
632
632
|
case 1:
|
|
633
|
-
responses =
|
|
633
|
+
responses = _a3.sent().filter(isNonNull);
|
|
634
634
|
if (responses.length === 1) {
|
|
635
635
|
return [2, responses[0]];
|
|
636
636
|
} else if (responses.length) {
|
|
@@ -649,8 +649,8 @@ var require_server = __commonJS({
|
|
|
649
649
|
JSONRPCServer3.prototype.receiveSingle = function(request, serverParams) {
|
|
650
650
|
return __awaiter(this, void 0, void 0, function() {
|
|
651
651
|
var method, response;
|
|
652
|
-
return __generator(this, function(
|
|
653
|
-
switch (
|
|
652
|
+
return __generator(this, function(_a3) {
|
|
653
|
+
switch (_a3.label) {
|
|
654
654
|
case 0:
|
|
655
655
|
method = this.nameToMethodDictionary[request.method];
|
|
656
656
|
if (!!(0, models_1.isJSONRPCRequest)(request)) return [3, 1];
|
|
@@ -658,7 +658,7 @@ var require_server = __commonJS({
|
|
|
658
658
|
case 1:
|
|
659
659
|
return [4, this.callMethod(method, request, serverParams)];
|
|
660
660
|
case 2:
|
|
661
|
-
response =
|
|
661
|
+
response = _a3.sent();
|
|
662
662
|
return [2, mapResponse(request, response)];
|
|
663
663
|
}
|
|
664
664
|
});
|
|
@@ -702,19 +702,19 @@ var require_server = __commonJS({
|
|
|
702
702
|
return Promise.resolve(null);
|
|
703
703
|
}
|
|
704
704
|
};
|
|
705
|
-
var onError = function(
|
|
706
|
-
_this.errorListener('An unexpected error occurred while executing "'.concat(request.method, '" JSON-RPC method:'),
|
|
707
|
-
return Promise.resolve(_this.mapErrorToJSONRPCErrorResponseIfNecessary(request.id,
|
|
705
|
+
var onError = function(error51) {
|
|
706
|
+
_this.errorListener('An unexpected error occurred while executing "'.concat(request.method, '" JSON-RPC method:'), error51);
|
|
707
|
+
return Promise.resolve(_this.mapErrorToJSONRPCErrorResponseIfNecessary(request.id, error51));
|
|
708
708
|
};
|
|
709
709
|
try {
|
|
710
710
|
return (this.middleware || noopMiddleware)(callMethod, request, serverParams).then(void 0, onError);
|
|
711
|
-
} catch (
|
|
712
|
-
return onError(
|
|
711
|
+
} catch (error51) {
|
|
712
|
+
return onError(error51);
|
|
713
713
|
}
|
|
714
714
|
};
|
|
715
|
-
JSONRPCServer3.prototype.mapErrorToJSONRPCErrorResponseIfNecessary = function(id,
|
|
715
|
+
JSONRPCServer3.prototype.mapErrorToJSONRPCErrorResponseIfNecessary = function(id, error51) {
|
|
716
716
|
if (id !== void 0) {
|
|
717
|
-
return this.mapErrorToJSONRPCErrorResponse(id,
|
|
717
|
+
return this.mapErrorToJSONRPCErrorResponse(id, error51);
|
|
718
718
|
} else {
|
|
719
719
|
return null;
|
|
720
720
|
}
|
|
@@ -736,14 +736,14 @@ var require_server = __commonJS({
|
|
|
736
736
|
return null;
|
|
737
737
|
}
|
|
738
738
|
};
|
|
739
|
-
var defaultMapErrorToJSONRPCErrorResponse = function(id,
|
|
740
|
-
var
|
|
741
|
-
var message = (
|
|
739
|
+
var defaultMapErrorToJSONRPCErrorResponse = function(id, error51) {
|
|
740
|
+
var _a3;
|
|
741
|
+
var message = (_a3 = error51 === null || error51 === void 0 ? void 0 : error51.message) !== null && _a3 !== void 0 ? _a3 : "An unexpected error occurred";
|
|
742
742
|
var code = internal_1.DefaultErrorCode;
|
|
743
743
|
var data;
|
|
744
|
-
if (
|
|
745
|
-
code =
|
|
746
|
-
data =
|
|
744
|
+
if (error51 instanceof models_1.JSONRPCErrorException) {
|
|
745
|
+
code = error51.code;
|
|
746
|
+
data = error51.data;
|
|
747
747
|
}
|
|
748
748
|
return (0, models_1.createJSONRPCErrorResponse)(id, code, message, data);
|
|
749
749
|
};
|
|
@@ -869,18 +869,18 @@ var require_server_and_client = __commonJS({
|
|
|
869
869
|
if (options === void 0) {
|
|
870
870
|
options = {};
|
|
871
871
|
}
|
|
872
|
-
var
|
|
872
|
+
var _a3;
|
|
873
873
|
this.server = server;
|
|
874
874
|
this.client = client;
|
|
875
|
-
this.errorListener = (
|
|
875
|
+
this.errorListener = (_a3 = options.errorListener) !== null && _a3 !== void 0 ? _a3 : console.warn;
|
|
876
876
|
}
|
|
877
877
|
JSONRPCServerAndClient2.prototype.applyServerMiddleware = function() {
|
|
878
|
-
var
|
|
878
|
+
var _a3;
|
|
879
879
|
var middlewares = [];
|
|
880
880
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
881
881
|
middlewares[_i] = arguments[_i];
|
|
882
882
|
}
|
|
883
|
-
(
|
|
883
|
+
(_a3 = this.server).applyMiddleware.apply(_a3, middlewares);
|
|
884
884
|
};
|
|
885
885
|
JSONRPCServerAndClient2.prototype.hasMethod = function(name) {
|
|
886
886
|
return this.server.hasMethod(name);
|
|
@@ -912,8 +912,8 @@ var require_server_and_client = __commonJS({
|
|
|
912
912
|
JSONRPCServerAndClient2.prototype.receiveAndSend = function(payload, serverParams, clientParams) {
|
|
913
913
|
return __awaiter(this, void 0, void 0, function() {
|
|
914
914
|
var response, message;
|
|
915
|
-
return __generator(this, function(
|
|
916
|
-
switch (
|
|
915
|
+
return __generator(this, function(_a3) {
|
|
916
|
+
switch (_a3.label) {
|
|
917
917
|
case 0:
|
|
918
918
|
if (!((0, models_1.isJSONRPCResponse)(payload) || (0, models_1.isJSONRPCResponses)(payload))) return [3, 1];
|
|
919
919
|
this.client.receive(payload);
|
|
@@ -922,7 +922,7 @@ var require_server_and_client = __commonJS({
|
|
|
922
922
|
if (!((0, models_1.isJSONRPCRequest)(payload) || (0, models_1.isJSONRPCRequests)(payload))) return [3, 3];
|
|
923
923
|
return [4, this.server.receive(payload, serverParams)];
|
|
924
924
|
case 2:
|
|
925
|
-
response =
|
|
925
|
+
response = _a3.sent();
|
|
926
926
|
if (response) {
|
|
927
927
|
return [2, this.client.send(response, clientParams)];
|
|
928
928
|
}
|
|
@@ -1553,8 +1553,8 @@ var init_sqids = __esm({
|
|
|
1553
1553
|
};
|
|
1554
1554
|
Sqids = class {
|
|
1555
1555
|
constructor(options) {
|
|
1556
|
-
var
|
|
1557
|
-
const alphabet = (
|
|
1556
|
+
var _a3, _b, _c;
|
|
1557
|
+
const alphabet = (_a3 = options === null || options === void 0 ? void 0 : options.alphabet) !== null && _a3 !== void 0 ? _a3 : defaultOptions.alphabet;
|
|
1558
1558
|
const minLength = (_b = options === null || options === void 0 ? void 0 : options.minLength) !== null && _b !== void 0 ? _b : defaultOptions.minLength;
|
|
1559
1559
|
const blocklist = (_c = options === null || options === void 0 ? void 0 : options.blocklist) !== null && _c !== void 0 ? _c : defaultOptions.blocklist;
|
|
1560
1560
|
if (new Blob([alphabet]).size !== alphabet.length) {
|
|
@@ -2301,9 +2301,9 @@ var UriTemplateMatcher = class {
|
|
|
2301
2301
|
try {
|
|
2302
2302
|
const parsed = parse_template(template);
|
|
2303
2303
|
this.templates.push(parsed);
|
|
2304
|
-
} catch (
|
|
2304
|
+
} catch (error51) {
|
|
2305
2305
|
throw new Error(
|
|
2306
|
-
`Invalid template: ${template} - ${
|
|
2306
|
+
`Invalid template: ${template} - ${error51 instanceof Error ? error51.message : String(error51)}`
|
|
2307
2307
|
);
|
|
2308
2308
|
}
|
|
2309
2309
|
}
|
|
@@ -2345,8 +2345,15 @@ var UriTemplateMatcher = class {
|
|
|
2345
2345
|
|
|
2346
2346
|
// node_modules/valibot/dist/index.mjs
|
|
2347
2347
|
var store$4;
|
|
2348
|
+
var DEFAULT_CONFIG = {
|
|
2349
|
+
lang: void 0,
|
|
2350
|
+
message: void 0,
|
|
2351
|
+
abortEarly: void 0,
|
|
2352
|
+
abortPipeEarly: void 0
|
|
2353
|
+
};
|
|
2348
2354
|
// @__NO_SIDE_EFFECTS__
|
|
2349
2355
|
function getGlobalConfig(config$1) {
|
|
2356
|
+
if (!config$1 && !store$4) return DEFAULT_CONFIG;
|
|
2350
2357
|
return {
|
|
2351
2358
|
lang: config$1?.lang ?? store$4?.lang,
|
|
2352
2359
|
message: config$1?.message,
|
|
@@ -2402,19 +2409,25 @@ function _addIssue(context, label, dataset, config$1, other) {
|
|
|
2402
2409
|
if (dataset.issues) dataset.issues.push(issue2);
|
|
2403
2410
|
else dataset.issues = [issue2];
|
|
2404
2411
|
}
|
|
2412
|
+
var _standardCache = /* @__PURE__ */ new WeakMap();
|
|
2405
2413
|
// @__NO_SIDE_EFFECTS__
|
|
2406
2414
|
function _getStandardProps(context) {
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2415
|
+
let cached2 = _standardCache.get(context);
|
|
2416
|
+
if (!cached2) {
|
|
2417
|
+
cached2 = {
|
|
2418
|
+
version: 1,
|
|
2419
|
+
vendor: "valibot",
|
|
2420
|
+
validate(value$1) {
|
|
2421
|
+
return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig());
|
|
2422
|
+
}
|
|
2423
|
+
};
|
|
2424
|
+
_standardCache.set(context, cached2);
|
|
2425
|
+
}
|
|
2426
|
+
return cached2;
|
|
2414
2427
|
}
|
|
2415
2428
|
// @__NO_SIDE_EFFECTS__
|
|
2416
2429
|
function _isValidObjectKey(object$1, key) {
|
|
2417
|
-
return Object.
|
|
2430
|
+
return Object.prototype.hasOwnProperty.call(object$1, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
|
|
2418
2431
|
}
|
|
2419
2432
|
// @__NO_SIDE_EFFECTS__
|
|
2420
2433
|
function _joinExpects(values$1, separator) {
|
|
@@ -2564,6 +2577,7 @@ function startsWith(requirement, message$1) {
|
|
|
2564
2577
|
}
|
|
2565
2578
|
};
|
|
2566
2579
|
}
|
|
2580
|
+
var ABORT_EARLY_CONFIG = { abortEarly: true };
|
|
2567
2581
|
// @__NO_SIDE_EFFECTS__
|
|
2568
2582
|
function getFallback(schema, dataset, config$1) {
|
|
2569
2583
|
return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
|
|
@@ -3027,7 +3041,7 @@ function string(message$1) {
|
|
|
3027
3041
|
// @__NO_SIDE_EFFECTS__
|
|
3028
3042
|
function _subIssues(datasets) {
|
|
3029
3043
|
let issues;
|
|
3030
|
-
if (datasets) for (const dataset of datasets) if (issues)
|
|
3044
|
+
if (datasets) for (const dataset of datasets) if (issues) for (const issue2 of dataset.issues) issues.push(issue2);
|
|
3031
3045
|
else issues = dataset.issues;
|
|
3032
3046
|
return issues;
|
|
3033
3047
|
}
|
|
@@ -3119,7 +3133,7 @@ function variant(key, options, message$1) {
|
|
|
3119
3133
|
if (currentKey in input ? discriminatorSchema["~run"]({
|
|
3120
3134
|
typed: false,
|
|
3121
3135
|
value: input[currentKey]
|
|
3122
|
-
},
|
|
3136
|
+
}, ABORT_EARLY_CONFIG).issues : discriminatorSchema.type !== "exact_optional" && discriminatorSchema.type !== "optional" && discriminatorSchema.type !== "nullish") {
|
|
3123
3137
|
keysAreValid = false;
|
|
3124
3138
|
if (invalidDiscriminatorKey !== currentKey && (maxDiscriminatorPriority < currentPriority || maxDiscriminatorPriority === currentPriority && currentKey in input && !(invalidDiscriminatorKey in input))) {
|
|
3125
3139
|
maxDiscriminatorPriority = currentPriority;
|
|
@@ -4376,11 +4390,11 @@ var McpServer = class {
|
|
|
4376
4390
|
if (should_version_negotiation_fail(
|
|
4377
4391
|
validated_initialize.protocolVersion
|
|
4378
4392
|
)) {
|
|
4379
|
-
const
|
|
4393
|
+
const error51 = new McpError(
|
|
4380
4394
|
-32602,
|
|
4381
4395
|
"Invalid protocol version format"
|
|
4382
4396
|
);
|
|
4383
|
-
throw
|
|
4397
|
+
throw error51;
|
|
4384
4398
|
}
|
|
4385
4399
|
const negotiated_version = negotiate_protocol_version(
|
|
4386
4400
|
validated_initialize.protocolVersion
|
|
@@ -4393,27 +4407,27 @@ var McpServer = class {
|
|
|
4393
4407
|
...options,
|
|
4394
4408
|
serverInfo: server_info
|
|
4395
4409
|
};
|
|
4396
|
-
} catch (
|
|
4397
|
-
if (
|
|
4398
|
-
throw
|
|
4410
|
+
} catch (error51) {
|
|
4411
|
+
if (error51 instanceof McpError) {
|
|
4412
|
+
throw error51;
|
|
4399
4413
|
}
|
|
4400
4414
|
if (
|
|
4401
4415
|
/** @type {Error} */
|
|
4402
|
-
|
|
4416
|
+
error51.message?.includes(
|
|
4403
4417
|
"Protocol version"
|
|
4404
4418
|
)
|
|
4405
4419
|
) {
|
|
4406
4420
|
const rpc_error2 = new McpError(
|
|
4407
4421
|
-32602,
|
|
4408
4422
|
`Protocol version validation failed: ${/** @type {Error} */
|
|
4409
|
-
|
|
4423
|
+
error51.message}. Server supports: ${get_supported_versions().join(", ")}`
|
|
4410
4424
|
);
|
|
4411
4425
|
throw rpc_error2;
|
|
4412
4426
|
}
|
|
4413
4427
|
const rpc_error = new McpError(
|
|
4414
4428
|
-32603,
|
|
4415
4429
|
`Initialization failed: ${/** @type {Error} */
|
|
4416
|
-
|
|
4430
|
+
error51.message}`
|
|
4417
4431
|
);
|
|
4418
4432
|
throw rpc_error;
|
|
4419
4433
|
}
|
|
@@ -5403,6 +5417,7 @@ __export(external_exports, {
|
|
|
5403
5417
|
ZodOptional: () => ZodOptional,
|
|
5404
5418
|
ZodPipe: () => ZodPipe,
|
|
5405
5419
|
ZodPrefault: () => ZodPrefault,
|
|
5420
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
5406
5421
|
ZodPromise: () => ZodPromise,
|
|
5407
5422
|
ZodReadonly: () => ZodReadonly,
|
|
5408
5423
|
ZodRealError: () => ZodRealError,
|
|
@@ -5481,6 +5496,7 @@ __export(external_exports, {
|
|
|
5481
5496
|
int32: () => int32,
|
|
5482
5497
|
int64: () => int64,
|
|
5483
5498
|
intersection: () => intersection,
|
|
5499
|
+
invertCodec: () => invertCodec,
|
|
5484
5500
|
ipv4: () => ipv42,
|
|
5485
5501
|
ipv6: () => ipv62,
|
|
5486
5502
|
iso: () => iso_exports,
|
|
@@ -5662,6 +5678,7 @@ __export(core_exports2, {
|
|
|
5662
5678
|
$ZodOptional: () => $ZodOptional,
|
|
5663
5679
|
$ZodPipe: () => $ZodPipe,
|
|
5664
5680
|
$ZodPrefault: () => $ZodPrefault,
|
|
5681
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
5665
5682
|
$ZodPromise: () => $ZodPromise,
|
|
5666
5683
|
$ZodReadonly: () => $ZodReadonly,
|
|
5667
5684
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -5861,7 +5878,8 @@ __export(core_exports2, {
|
|
|
5861
5878
|
});
|
|
5862
5879
|
|
|
5863
5880
|
// node_modules/zod/v4/core/core.js
|
|
5864
|
-
var
|
|
5881
|
+
var _a;
|
|
5882
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
5865
5883
|
status: "aborted"
|
|
5866
5884
|
});
|
|
5867
5885
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -5896,10 +5914,10 @@ function $constructor(name, initializer3, params) {
|
|
|
5896
5914
|
}
|
|
5897
5915
|
Object.defineProperty(Definition, "name", { value: name });
|
|
5898
5916
|
function _(def) {
|
|
5899
|
-
var
|
|
5917
|
+
var _a3;
|
|
5900
5918
|
const inst = params?.Parent ? new Definition() : this;
|
|
5901
5919
|
init(inst, def);
|
|
5902
|
-
(
|
|
5920
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
5903
5921
|
for (const fn of inst._zod.deferred) {
|
|
5904
5922
|
fn();
|
|
5905
5923
|
}
|
|
@@ -5928,7 +5946,8 @@ var $ZodEncodeError = class extends Error {
|
|
|
5928
5946
|
this.name = "ZodEncodeError";
|
|
5929
5947
|
}
|
|
5930
5948
|
};
|
|
5931
|
-
|
|
5949
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
5950
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
5932
5951
|
function config(newConfig) {
|
|
5933
5952
|
if (newConfig)
|
|
5934
5953
|
Object.assign(globalConfig, newConfig);
|
|
@@ -5961,6 +5980,7 @@ __export(util_exports, {
|
|
|
5961
5980
|
defineLazy: () => defineLazy,
|
|
5962
5981
|
esc: () => esc,
|
|
5963
5982
|
escapeRegex: () => escapeRegex,
|
|
5983
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
5964
5984
|
extend: () => extend,
|
|
5965
5985
|
finalizeIssue: () => finalizeIssue,
|
|
5966
5986
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -6049,19 +6069,12 @@ function cleanRegex(source) {
|
|
|
6049
6069
|
return source.slice(start, end);
|
|
6050
6070
|
}
|
|
6051
6071
|
function floatSafeRemainder(val, step) {
|
|
6052
|
-
const
|
|
6053
|
-
const
|
|
6054
|
-
|
|
6055
|
-
if (
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
6059
|
-
}
|
|
6060
|
-
}
|
|
6061
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
6062
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
6063
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
6064
|
-
return valInt % stepInt / 10 ** decCount;
|
|
6072
|
+
const ratio = val / step;
|
|
6073
|
+
const roundedRatio = Math.round(ratio);
|
|
6074
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
6075
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
6076
|
+
return 0;
|
|
6077
|
+
return ratio - roundedRatio;
|
|
6065
6078
|
}
|
|
6066
6079
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
6067
6080
|
function defineLazy(object3, key, getter) {
|
|
@@ -6143,7 +6156,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
|
|
|
6143
6156
|
function isObject(data) {
|
|
6144
6157
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
6145
6158
|
}
|
|
6146
|
-
var allowsEval = cached(() => {
|
|
6159
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
6160
|
+
if (globalConfig.jitless) {
|
|
6161
|
+
return false;
|
|
6162
|
+
}
|
|
6147
6163
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
6148
6164
|
return false;
|
|
6149
6165
|
}
|
|
@@ -6176,6 +6192,10 @@ function shallowClone(o) {
|
|
|
6176
6192
|
return { ...o };
|
|
6177
6193
|
if (Array.isArray(o))
|
|
6178
6194
|
return [...o];
|
|
6195
|
+
if (o instanceof Map)
|
|
6196
|
+
return new Map(o);
|
|
6197
|
+
if (o instanceof Set)
|
|
6198
|
+
return new Set(o);
|
|
6179
6199
|
return o;
|
|
6180
6200
|
}
|
|
6181
6201
|
function numKeys(data) {
|
|
@@ -6232,7 +6252,14 @@ var getParsedType = (data) => {
|
|
|
6232
6252
|
}
|
|
6233
6253
|
};
|
|
6234
6254
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
6235
|
-
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
6255
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
6256
|
+
"string",
|
|
6257
|
+
"number",
|
|
6258
|
+
"bigint",
|
|
6259
|
+
"boolean",
|
|
6260
|
+
"symbol",
|
|
6261
|
+
"undefined"
|
|
6262
|
+
]);
|
|
6236
6263
|
function escapeRegex(str) {
|
|
6237
6264
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
6238
6265
|
}
|
|
@@ -6401,6 +6428,9 @@ function safeExtend(schema, shape) {
|
|
|
6401
6428
|
return clone(schema, def);
|
|
6402
6429
|
}
|
|
6403
6430
|
function merge(a, b) {
|
|
6431
|
+
if (a._zod.def.checks?.length) {
|
|
6432
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
6433
|
+
}
|
|
6404
6434
|
const def = mergeDefs(a._zod.def, {
|
|
6405
6435
|
get shape() {
|
|
6406
6436
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -6410,8 +6440,7 @@ function merge(a, b) {
|
|
|
6410
6440
|
get catchall() {
|
|
6411
6441
|
return b._zod.def.catchall;
|
|
6412
6442
|
},
|
|
6413
|
-
checks: []
|
|
6414
|
-
// delete existing checks
|
|
6443
|
+
checks: b._zod.def.checks ?? []
|
|
6415
6444
|
});
|
|
6416
6445
|
return clone(a, def);
|
|
6417
6446
|
}
|
|
@@ -6494,10 +6523,20 @@ function aborted(x, startIndex = 0) {
|
|
|
6494
6523
|
}
|
|
6495
6524
|
return false;
|
|
6496
6525
|
}
|
|
6526
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
6527
|
+
if (x.aborted === true)
|
|
6528
|
+
return true;
|
|
6529
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
6530
|
+
if (x.issues[i]?.continue === false) {
|
|
6531
|
+
return true;
|
|
6532
|
+
}
|
|
6533
|
+
}
|
|
6534
|
+
return false;
|
|
6535
|
+
}
|
|
6497
6536
|
function prefixIssues(path2, issues) {
|
|
6498
6537
|
return issues.map((iss) => {
|
|
6499
|
-
var
|
|
6500
|
-
(
|
|
6538
|
+
var _a3;
|
|
6539
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
6501
6540
|
iss.path.unshift(path2);
|
|
6502
6541
|
return iss;
|
|
6503
6542
|
});
|
|
@@ -6506,17 +6545,14 @@ function unwrapMessage(message) {
|
|
|
6506
6545
|
return typeof message === "string" ? message : message?.message;
|
|
6507
6546
|
}
|
|
6508
6547
|
function finalizeIssue(iss, ctx, config2) {
|
|
6509
|
-
const
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
delete full.continue;
|
|
6516
|
-
if (!ctx?.reportInput) {
|
|
6517
|
-
delete full.input;
|
|
6548
|
+
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";
|
|
6549
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
6550
|
+
rest.path ?? (rest.path = []);
|
|
6551
|
+
rest.message = message;
|
|
6552
|
+
if (ctx?.reportInput) {
|
|
6553
|
+
rest.input = _input;
|
|
6518
6554
|
}
|
|
6519
|
-
return
|
|
6555
|
+
return rest;
|
|
6520
6556
|
}
|
|
6521
6557
|
function getSizableOrigin(input) {
|
|
6522
6558
|
if (input instanceof Set)
|
|
@@ -6633,10 +6669,10 @@ var initializer = (inst, def) => {
|
|
|
6633
6669
|
};
|
|
6634
6670
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
6635
6671
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
6636
|
-
function flattenError(
|
|
6672
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
6637
6673
|
const fieldErrors = {};
|
|
6638
6674
|
const formErrors = [];
|
|
6639
|
-
for (const sub of
|
|
6675
|
+
for (const sub of error51.issues) {
|
|
6640
6676
|
if (sub.path.length > 0) {
|
|
6641
6677
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
6642
6678
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -6646,50 +6682,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
|
|
|
6646
6682
|
}
|
|
6647
6683
|
return { formErrors, fieldErrors };
|
|
6648
6684
|
}
|
|
6649
|
-
function formatError(
|
|
6685
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
6650
6686
|
const fieldErrors = { _errors: [] };
|
|
6651
|
-
const processError = (
|
|
6652
|
-
for (const issue2 of
|
|
6687
|
+
const processError = (error52, path2 = []) => {
|
|
6688
|
+
for (const issue2 of error52.issues) {
|
|
6653
6689
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
6654
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
6690
|
+
issue2.errors.map((issues) => processError({ issues }, [...path2, ...issue2.path]));
|
|
6655
6691
|
} else if (issue2.code === "invalid_key") {
|
|
6656
|
-
processError({ issues: issue2.issues });
|
|
6692
|
+
processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
|
|
6657
6693
|
} else if (issue2.code === "invalid_element") {
|
|
6658
|
-
processError({ issues: issue2.issues });
|
|
6659
|
-
} else if (issue2.path.length === 0) {
|
|
6660
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
6694
|
+
processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
|
|
6661
6695
|
} else {
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6696
|
+
const fullpath = [...path2, ...issue2.path];
|
|
6697
|
+
if (fullpath.length === 0) {
|
|
6698
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
6699
|
+
} else {
|
|
6700
|
+
let curr = fieldErrors;
|
|
6701
|
+
let i = 0;
|
|
6702
|
+
while (i < fullpath.length) {
|
|
6703
|
+
const el = fullpath[i];
|
|
6704
|
+
const terminal = i === fullpath.length - 1;
|
|
6705
|
+
if (!terminal) {
|
|
6706
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
6707
|
+
} else {
|
|
6708
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
6709
|
+
curr[el]._errors.push(mapper(issue2));
|
|
6710
|
+
}
|
|
6711
|
+
curr = curr[el];
|
|
6712
|
+
i++;
|
|
6672
6713
|
}
|
|
6673
|
-
curr = curr[el];
|
|
6674
|
-
i++;
|
|
6675
6714
|
}
|
|
6676
6715
|
}
|
|
6677
6716
|
}
|
|
6678
6717
|
};
|
|
6679
|
-
processError(
|
|
6718
|
+
processError(error51);
|
|
6680
6719
|
return fieldErrors;
|
|
6681
6720
|
}
|
|
6682
|
-
function treeifyError(
|
|
6721
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
6683
6722
|
const result = { errors: [] };
|
|
6684
|
-
const processError = (
|
|
6685
|
-
var
|
|
6686
|
-
for (const issue2 of
|
|
6723
|
+
const processError = (error52, path2 = []) => {
|
|
6724
|
+
var _a3, _b;
|
|
6725
|
+
for (const issue2 of error52.issues) {
|
|
6687
6726
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
6688
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
6727
|
+
issue2.errors.map((issues) => processError({ issues }, [...path2, ...issue2.path]));
|
|
6689
6728
|
} else if (issue2.code === "invalid_key") {
|
|
6690
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
6729
|
+
processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
|
|
6691
6730
|
} else if (issue2.code === "invalid_element") {
|
|
6692
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
6731
|
+
processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
|
|
6693
6732
|
} else {
|
|
6694
6733
|
const fullpath = [...path2, ...issue2.path];
|
|
6695
6734
|
if (fullpath.length === 0) {
|
|
@@ -6703,7 +6742,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
6703
6742
|
const terminal = i === fullpath.length - 1;
|
|
6704
6743
|
if (typeof el === "string") {
|
|
6705
6744
|
curr.properties ?? (curr.properties = {});
|
|
6706
|
-
(
|
|
6745
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
6707
6746
|
curr = curr.properties[el];
|
|
6708
6747
|
} else {
|
|
6709
6748
|
curr.items ?? (curr.items = []);
|
|
@@ -6718,7 +6757,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
6718
6757
|
}
|
|
6719
6758
|
}
|
|
6720
6759
|
};
|
|
6721
|
-
processError(
|
|
6760
|
+
processError(error51);
|
|
6722
6761
|
return result;
|
|
6723
6762
|
}
|
|
6724
6763
|
function toDotPath(_path) {
|
|
@@ -6739,9 +6778,9 @@ function toDotPath(_path) {
|
|
|
6739
6778
|
}
|
|
6740
6779
|
return segs.join("");
|
|
6741
6780
|
}
|
|
6742
|
-
function prettifyError(
|
|
6781
|
+
function prettifyError(error51) {
|
|
6743
6782
|
const lines = [];
|
|
6744
|
-
const issues = [...
|
|
6783
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
6745
6784
|
for (const issue2 of issues) {
|
|
6746
6785
|
lines.push(`\u2716 ${issue2.message}`);
|
|
6747
6786
|
if (issue2.path?.length)
|
|
@@ -6752,7 +6791,7 @@ function prettifyError(error48) {
|
|
|
6752
6791
|
|
|
6753
6792
|
// node_modules/zod/v4/core/parse.js
|
|
6754
6793
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
6755
|
-
const ctx = _ctx ?
|
|
6794
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
6756
6795
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
6757
6796
|
if (result instanceof Promise) {
|
|
6758
6797
|
throw new $ZodAsyncError();
|
|
@@ -6766,7 +6805,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
6766
6805
|
};
|
|
6767
6806
|
var parse2 = /* @__PURE__ */ _parse($ZodRealError);
|
|
6768
6807
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
6769
|
-
const ctx = _ctx ?
|
|
6808
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
6770
6809
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
6771
6810
|
if (result instanceof Promise)
|
|
6772
6811
|
result = await result;
|
|
@@ -6791,7 +6830,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
6791
6830
|
};
|
|
6792
6831
|
var safeParse2 = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
6793
6832
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
6794
|
-
const ctx = _ctx ?
|
|
6833
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
6795
6834
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
6796
6835
|
if (result instanceof Promise)
|
|
6797
6836
|
result = await result;
|
|
@@ -6802,7 +6841,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
6802
6841
|
};
|
|
6803
6842
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
6804
6843
|
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
6805
|
-
const ctx = _ctx ?
|
|
6844
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
6806
6845
|
return _parse(_Err)(schema, value, ctx);
|
|
6807
6846
|
};
|
|
6808
6847
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -6811,7 +6850,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
|
|
|
6811
6850
|
};
|
|
6812
6851
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
6813
6852
|
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
6814
|
-
const ctx = _ctx ?
|
|
6853
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
6815
6854
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
6816
6855
|
};
|
|
6817
6856
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -6820,7 +6859,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
6820
6859
|
};
|
|
6821
6860
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
6822
6861
|
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
6823
|
-
const ctx = _ctx ?
|
|
6862
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
6824
6863
|
return _safeParse(_Err)(schema, value, ctx);
|
|
6825
6864
|
};
|
|
6826
6865
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -6829,7 +6868,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
|
6829
6868
|
};
|
|
6830
6869
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
6831
6870
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
6832
|
-
const ctx = _ctx ?
|
|
6871
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
6833
6872
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
6834
6873
|
};
|
|
6835
6874
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -6862,6 +6901,7 @@ __export(regexes_exports, {
|
|
|
6862
6901
|
hex: () => hex,
|
|
6863
6902
|
hostname: () => hostname,
|
|
6864
6903
|
html5Email: () => html5Email,
|
|
6904
|
+
httpProtocol: () => httpProtocol,
|
|
6865
6905
|
idnEmail: () => idnEmail,
|
|
6866
6906
|
integer: () => integer2,
|
|
6867
6907
|
ipv4: () => ipv4,
|
|
@@ -6900,7 +6940,7 @@ __export(regexes_exports, {
|
|
|
6900
6940
|
uuid7: () => uuid7,
|
|
6901
6941
|
xid: () => xid
|
|
6902
6942
|
});
|
|
6903
|
-
var cuid = /^[cC][
|
|
6943
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
6904
6944
|
var cuid2 = /^[0-9a-z]+$/;
|
|
6905
6945
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
6906
6946
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -6939,6 +6979,7 @@ var base642 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+
|
|
|
6939
6979
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
6940
6980
|
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])?)*\.?$/;
|
|
6941
6981
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
6982
|
+
var httpProtocol = /^https?$/;
|
|
6942
6983
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
6943
6984
|
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])))`;
|
|
6944
6985
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -6997,10 +7038,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
6997
7038
|
|
|
6998
7039
|
// node_modules/zod/v4/core/checks.js
|
|
6999
7040
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
7000
|
-
var
|
|
7041
|
+
var _a3;
|
|
7001
7042
|
inst._zod ?? (inst._zod = {});
|
|
7002
7043
|
inst._zod.def = def;
|
|
7003
|
-
(
|
|
7044
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
7004
7045
|
});
|
|
7005
7046
|
var numericOriginMap = {
|
|
7006
7047
|
number: "number",
|
|
@@ -7066,8 +7107,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
7066
7107
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
7067
7108
|
$ZodCheck.init(inst, def);
|
|
7068
7109
|
inst._zod.onattach.push((inst2) => {
|
|
7069
|
-
var
|
|
7070
|
-
(
|
|
7110
|
+
var _a3;
|
|
7111
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
7071
7112
|
});
|
|
7072
7113
|
inst._zod.check = (payload) => {
|
|
7073
7114
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -7200,9 +7241,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
7200
7241
|
};
|
|
7201
7242
|
});
|
|
7202
7243
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
7203
|
-
var
|
|
7244
|
+
var _a3;
|
|
7204
7245
|
$ZodCheck.init(inst, def);
|
|
7205
|
-
(
|
|
7246
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
7206
7247
|
const val = payload.value;
|
|
7207
7248
|
return !nullish(val) && val.size !== void 0;
|
|
7208
7249
|
});
|
|
@@ -7228,9 +7269,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
7228
7269
|
};
|
|
7229
7270
|
});
|
|
7230
7271
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
7231
|
-
var
|
|
7272
|
+
var _a3;
|
|
7232
7273
|
$ZodCheck.init(inst, def);
|
|
7233
|
-
(
|
|
7274
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
7234
7275
|
const val = payload.value;
|
|
7235
7276
|
return !nullish(val) && val.size !== void 0;
|
|
7236
7277
|
});
|
|
@@ -7256,9 +7297,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
7256
7297
|
};
|
|
7257
7298
|
});
|
|
7258
7299
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
7259
|
-
var
|
|
7300
|
+
var _a3;
|
|
7260
7301
|
$ZodCheck.init(inst, def);
|
|
7261
|
-
(
|
|
7302
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
7262
7303
|
const val = payload.value;
|
|
7263
7304
|
return !nullish(val) && val.size !== void 0;
|
|
7264
7305
|
});
|
|
@@ -7286,9 +7327,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
7286
7327
|
};
|
|
7287
7328
|
});
|
|
7288
7329
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
7289
|
-
var
|
|
7330
|
+
var _a3;
|
|
7290
7331
|
$ZodCheck.init(inst, def);
|
|
7291
|
-
(
|
|
7332
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
7292
7333
|
const val = payload.value;
|
|
7293
7334
|
return !nullish(val) && val.length !== void 0;
|
|
7294
7335
|
});
|
|
@@ -7315,9 +7356,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
7315
7356
|
};
|
|
7316
7357
|
});
|
|
7317
7358
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
7318
|
-
var
|
|
7359
|
+
var _a3;
|
|
7319
7360
|
$ZodCheck.init(inst, def);
|
|
7320
|
-
(
|
|
7361
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
7321
7362
|
const val = payload.value;
|
|
7322
7363
|
return !nullish(val) && val.length !== void 0;
|
|
7323
7364
|
});
|
|
@@ -7344,9 +7385,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
7344
7385
|
};
|
|
7345
7386
|
});
|
|
7346
7387
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
7347
|
-
var
|
|
7388
|
+
var _a3;
|
|
7348
7389
|
$ZodCheck.init(inst, def);
|
|
7349
|
-
(
|
|
7390
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
7350
7391
|
const val = payload.value;
|
|
7351
7392
|
return !nullish(val) && val.length !== void 0;
|
|
7352
7393
|
});
|
|
@@ -7375,7 +7416,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
7375
7416
|
};
|
|
7376
7417
|
});
|
|
7377
7418
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
7378
|
-
var
|
|
7419
|
+
var _a3, _b;
|
|
7379
7420
|
$ZodCheck.init(inst, def);
|
|
7380
7421
|
inst._zod.onattach.push((inst2) => {
|
|
7381
7422
|
const bag = inst2._zod.bag;
|
|
@@ -7386,7 +7427,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
7386
7427
|
}
|
|
7387
7428
|
});
|
|
7388
7429
|
if (def.pattern)
|
|
7389
|
-
(
|
|
7430
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
7390
7431
|
def.pattern.lastIndex = 0;
|
|
7391
7432
|
if (def.pattern.test(payload.value))
|
|
7392
7433
|
return;
|
|
@@ -7582,13 +7623,13 @@ var Doc = class {
|
|
|
7582
7623
|
// node_modules/zod/v4/core/versions.js
|
|
7583
7624
|
var version = {
|
|
7584
7625
|
major: 4,
|
|
7585
|
-
minor:
|
|
7586
|
-
patch:
|
|
7626
|
+
minor: 4,
|
|
7627
|
+
patch: 3
|
|
7587
7628
|
};
|
|
7588
7629
|
|
|
7589
7630
|
// node_modules/zod/v4/core/schemas.js
|
|
7590
7631
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
7591
|
-
var
|
|
7632
|
+
var _a3;
|
|
7592
7633
|
inst ?? (inst = {});
|
|
7593
7634
|
inst._zod.def = def;
|
|
7594
7635
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -7603,7 +7644,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
7603
7644
|
}
|
|
7604
7645
|
}
|
|
7605
7646
|
if (checks.length === 0) {
|
|
7606
|
-
(
|
|
7647
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
7607
7648
|
inst._zod.deferred?.push(() => {
|
|
7608
7649
|
inst._zod.run = inst._zod.parse;
|
|
7609
7650
|
});
|
|
@@ -7613,6 +7654,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
7613
7654
|
let asyncResult;
|
|
7614
7655
|
for (const ch of checks2) {
|
|
7615
7656
|
if (ch._zod.def.when) {
|
|
7657
|
+
if (explicitlyAborted(payload))
|
|
7658
|
+
continue;
|
|
7616
7659
|
const shouldRun = ch._zod.def.when(payload);
|
|
7617
7660
|
if (!shouldRun)
|
|
7618
7661
|
continue;
|
|
@@ -7753,6 +7796,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
7753
7796
|
inst._zod.check = (payload) => {
|
|
7754
7797
|
try {
|
|
7755
7798
|
const trimmed = payload.value.trim();
|
|
7799
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
7800
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
7801
|
+
payload.issues.push({
|
|
7802
|
+
code: "invalid_format",
|
|
7803
|
+
format: "url",
|
|
7804
|
+
note: "Invalid URL format",
|
|
7805
|
+
input: payload.value,
|
|
7806
|
+
inst,
|
|
7807
|
+
continue: !def.abort
|
|
7808
|
+
});
|
|
7809
|
+
return;
|
|
7810
|
+
}
|
|
7811
|
+
}
|
|
7756
7812
|
const url2 = new URL(trimmed);
|
|
7757
7813
|
if (def.hostname) {
|
|
7758
7814
|
def.hostname.lastIndex = 0;
|
|
@@ -7906,6 +7962,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
7906
7962
|
function isValidBase64(data) {
|
|
7907
7963
|
if (data === "")
|
|
7908
7964
|
return true;
|
|
7965
|
+
if (/\s/.test(data))
|
|
7966
|
+
return false;
|
|
7909
7967
|
if (data.length % 4 !== 0)
|
|
7910
7968
|
return false;
|
|
7911
7969
|
try {
|
|
@@ -8098,8 +8156,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
8098
8156
|
$ZodType.init(inst, def);
|
|
8099
8157
|
inst._zod.pattern = _undefined;
|
|
8100
8158
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
8101
|
-
inst._zod.optin = "optional";
|
|
8102
|
-
inst._zod.optout = "optional";
|
|
8103
8159
|
inst._zod.parse = (payload, _ctx) => {
|
|
8104
8160
|
const input = payload.value;
|
|
8105
8161
|
if (typeof input === "undefined")
|
|
@@ -8228,15 +8284,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
8228
8284
|
return payload;
|
|
8229
8285
|
};
|
|
8230
8286
|
});
|
|
8231
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
8287
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
8288
|
+
const isPresent = key in input;
|
|
8232
8289
|
if (result.issues.length) {
|
|
8233
|
-
if (isOptionalOut && !
|
|
8290
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
8234
8291
|
return;
|
|
8235
8292
|
}
|
|
8236
8293
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
8237
8294
|
}
|
|
8295
|
+
if (!isPresent && !isOptionalIn) {
|
|
8296
|
+
if (!result.issues.length) {
|
|
8297
|
+
final.issues.push({
|
|
8298
|
+
code: "invalid_type",
|
|
8299
|
+
expected: "nonoptional",
|
|
8300
|
+
input: void 0,
|
|
8301
|
+
path: [key]
|
|
8302
|
+
});
|
|
8303
|
+
}
|
|
8304
|
+
return;
|
|
8305
|
+
}
|
|
8238
8306
|
if (result.value === void 0) {
|
|
8239
|
-
if (
|
|
8307
|
+
if (isPresent) {
|
|
8240
8308
|
final.value[key] = void 0;
|
|
8241
8309
|
}
|
|
8242
8310
|
} else {
|
|
@@ -8264,8 +8332,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
8264
8332
|
const keySet = def.keySet;
|
|
8265
8333
|
const _catchall = def.catchall._zod;
|
|
8266
8334
|
const t = _catchall.def.type;
|
|
8335
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
8267
8336
|
const isOptionalOut = _catchall.optout === "optional";
|
|
8268
8337
|
for (const key in input) {
|
|
8338
|
+
if (key === "__proto__")
|
|
8339
|
+
continue;
|
|
8269
8340
|
if (keySet.has(key))
|
|
8270
8341
|
continue;
|
|
8271
8342
|
if (t === "never") {
|
|
@@ -8274,9 +8345,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
8274
8345
|
}
|
|
8275
8346
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
8276
8347
|
if (r instanceof Promise) {
|
|
8277
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
8348
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
8278
8349
|
} else {
|
|
8279
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
8350
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
8280
8351
|
}
|
|
8281
8352
|
}
|
|
8282
8353
|
if (unrecognized.length) {
|
|
@@ -8342,12 +8413,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
8342
8413
|
const shape = value.shape;
|
|
8343
8414
|
for (const key of value.keys) {
|
|
8344
8415
|
const el = shape[key];
|
|
8416
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
8345
8417
|
const isOptionalOut = el._zod.optout === "optional";
|
|
8346
8418
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
8347
8419
|
if (r instanceof Promise) {
|
|
8348
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
8420
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
8349
8421
|
} else {
|
|
8350
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
8422
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
8351
8423
|
}
|
|
8352
8424
|
}
|
|
8353
8425
|
if (!catchall) {
|
|
@@ -8378,9 +8450,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
8378
8450
|
const id = ids[key];
|
|
8379
8451
|
const k = esc(key);
|
|
8380
8452
|
const schema = shape[key];
|
|
8453
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
8381
8454
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
8382
8455
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
8383
|
-
if (isOptionalOut) {
|
|
8456
|
+
if (isOptionalIn && isOptionalOut) {
|
|
8384
8457
|
doc.write(`
|
|
8385
8458
|
if (${id}.issues.length) {
|
|
8386
8459
|
if (${k} in input) {
|
|
@@ -8399,6 +8472,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
8399
8472
|
newResult[${k}] = ${id}.value;
|
|
8400
8473
|
}
|
|
8401
8474
|
|
|
8475
|
+
`);
|
|
8476
|
+
} else if (!isOptionalIn) {
|
|
8477
|
+
doc.write(`
|
|
8478
|
+
const ${id}_present = ${k} in input;
|
|
8479
|
+
if (${id}.issues.length) {
|
|
8480
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
8481
|
+
...iss,
|
|
8482
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
8483
|
+
})));
|
|
8484
|
+
}
|
|
8485
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
8486
|
+
payload.issues.push({
|
|
8487
|
+
code: "invalid_type",
|
|
8488
|
+
expected: "nonoptional",
|
|
8489
|
+
input: undefined,
|
|
8490
|
+
path: [${k}]
|
|
8491
|
+
});
|
|
8492
|
+
}
|
|
8493
|
+
|
|
8494
|
+
if (${id}_present) {
|
|
8495
|
+
if (${id}.value === undefined) {
|
|
8496
|
+
newResult[${k}] = undefined;
|
|
8497
|
+
} else {
|
|
8498
|
+
newResult[${k}] = ${id}.value;
|
|
8499
|
+
}
|
|
8500
|
+
}
|
|
8501
|
+
|
|
8402
8502
|
`);
|
|
8403
8503
|
} else {
|
|
8404
8504
|
doc.write(`
|
|
@@ -8492,10 +8592,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
8492
8592
|
}
|
|
8493
8593
|
return void 0;
|
|
8494
8594
|
});
|
|
8495
|
-
const
|
|
8496
|
-
const first = def.options[0]._zod.run;
|
|
8595
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
8497
8596
|
inst._zod.parse = (payload, ctx) => {
|
|
8498
|
-
if (
|
|
8597
|
+
if (first) {
|
|
8499
8598
|
return first(payload, ctx);
|
|
8500
8599
|
}
|
|
8501
8600
|
let async = false;
|
|
@@ -8548,10 +8647,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
|
|
|
8548
8647
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
8549
8648
|
$ZodUnion.init(inst, def);
|
|
8550
8649
|
def.inclusive = false;
|
|
8551
|
-
const
|
|
8552
|
-
const first = def.options[0]._zod.run;
|
|
8650
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
8553
8651
|
inst._zod.parse = (payload, ctx) => {
|
|
8554
|
-
if (
|
|
8652
|
+
if (first) {
|
|
8555
8653
|
return first(payload, ctx);
|
|
8556
8654
|
}
|
|
8557
8655
|
let async = false;
|
|
@@ -8626,7 +8724,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
8626
8724
|
if (opt) {
|
|
8627
8725
|
return opt._zod.run(payload, ctx);
|
|
8628
8726
|
}
|
|
8629
|
-
if (def.unionFallback) {
|
|
8727
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
8630
8728
|
return _super(payload, ctx);
|
|
8631
8729
|
}
|
|
8632
8730
|
payload.issues.push({
|
|
@@ -8634,6 +8732,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
8634
8732
|
errors: [],
|
|
8635
8733
|
note: "No matching discriminator",
|
|
8636
8734
|
discriminator: def.discriminator,
|
|
8735
|
+
options: Array.from(disc.value.keys()),
|
|
8637
8736
|
input,
|
|
8638
8737
|
path: [def.discriminator],
|
|
8639
8738
|
inst
|
|
@@ -8755,64 +8854,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
8755
8854
|
}
|
|
8756
8855
|
payload.value = [];
|
|
8757
8856
|
const proms = [];
|
|
8758
|
-
const
|
|
8759
|
-
const
|
|
8857
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
8858
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
8760
8859
|
if (!def.rest) {
|
|
8761
|
-
|
|
8762
|
-
const tooSmall = input.length < optStart - 1;
|
|
8763
|
-
if (tooBig || tooSmall) {
|
|
8860
|
+
if (input.length < optinStart) {
|
|
8764
8861
|
payload.issues.push({
|
|
8765
|
-
|
|
8862
|
+
code: "too_small",
|
|
8863
|
+
minimum: optinStart,
|
|
8864
|
+
inclusive: true,
|
|
8766
8865
|
input,
|
|
8767
8866
|
inst,
|
|
8768
8867
|
origin: "array"
|
|
8769
8868
|
});
|
|
8770
8869
|
return payload;
|
|
8771
8870
|
}
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8871
|
+
if (input.length > items.length) {
|
|
8872
|
+
payload.issues.push({
|
|
8873
|
+
code: "too_big",
|
|
8874
|
+
maximum: items.length,
|
|
8875
|
+
inclusive: true,
|
|
8876
|
+
input,
|
|
8877
|
+
inst,
|
|
8878
|
+
origin: "array"
|
|
8879
|
+
});
|
|
8779
8880
|
}
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
}, ctx);
|
|
8784
|
-
if (
|
|
8785
|
-
proms.push(
|
|
8881
|
+
}
|
|
8882
|
+
const itemResults = new Array(items.length);
|
|
8883
|
+
for (let i = 0; i < items.length; i++) {
|
|
8884
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
8885
|
+
if (r instanceof Promise) {
|
|
8886
|
+
proms.push(r.then((rr) => {
|
|
8887
|
+
itemResults[i] = rr;
|
|
8888
|
+
}));
|
|
8786
8889
|
} else {
|
|
8787
|
-
|
|
8890
|
+
itemResults[i] = r;
|
|
8788
8891
|
}
|
|
8789
8892
|
}
|
|
8790
8893
|
if (def.rest) {
|
|
8894
|
+
let i = items.length - 1;
|
|
8791
8895
|
const rest = input.slice(items.length);
|
|
8792
8896
|
for (const el of rest) {
|
|
8793
8897
|
i++;
|
|
8794
|
-
const result = def.rest._zod.run({
|
|
8795
|
-
value: el,
|
|
8796
|
-
issues: []
|
|
8797
|
-
}, ctx);
|
|
8898
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
8798
8899
|
if (result instanceof Promise) {
|
|
8799
|
-
proms.push(result.then((
|
|
8900
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
8800
8901
|
} else {
|
|
8801
8902
|
handleTupleResult(result, payload, i);
|
|
8802
8903
|
}
|
|
8803
8904
|
}
|
|
8804
8905
|
}
|
|
8805
|
-
if (proms.length)
|
|
8806
|
-
return Promise.all(proms).then(() => payload);
|
|
8807
|
-
|
|
8906
|
+
if (proms.length) {
|
|
8907
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
8908
|
+
}
|
|
8909
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
8808
8910
|
};
|
|
8809
8911
|
});
|
|
8912
|
+
function getTupleOptStart(items, key) {
|
|
8913
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
8914
|
+
if (items[i]._zod[key] !== "optional")
|
|
8915
|
+
return i + 1;
|
|
8916
|
+
}
|
|
8917
|
+
return 0;
|
|
8918
|
+
}
|
|
8810
8919
|
function handleTupleResult(result, final, index) {
|
|
8811
8920
|
if (result.issues.length) {
|
|
8812
8921
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
8813
8922
|
}
|
|
8814
8923
|
final.value[index] = result.value;
|
|
8815
8924
|
}
|
|
8925
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
8926
|
+
for (let i = 0; i < items.length; i++) {
|
|
8927
|
+
const r = itemResults[i];
|
|
8928
|
+
const isPresent = i < input.length;
|
|
8929
|
+
if (r.issues.length) {
|
|
8930
|
+
if (!isPresent && i >= optoutStart) {
|
|
8931
|
+
final.value.length = i;
|
|
8932
|
+
break;
|
|
8933
|
+
}
|
|
8934
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
8935
|
+
}
|
|
8936
|
+
final.value[i] = r.value;
|
|
8937
|
+
}
|
|
8938
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
8939
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
8940
|
+
final.value.length = i;
|
|
8941
|
+
} else {
|
|
8942
|
+
break;
|
|
8943
|
+
}
|
|
8944
|
+
}
|
|
8945
|
+
return final;
|
|
8946
|
+
}
|
|
8816
8947
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
8817
8948
|
$ZodType.init(inst, def);
|
|
8818
8949
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -8834,19 +8965,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
8834
8965
|
for (const key of values) {
|
|
8835
8966
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
8836
8967
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
8968
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
8969
|
+
if (keyResult instanceof Promise) {
|
|
8970
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
8971
|
+
}
|
|
8972
|
+
if (keyResult.issues.length) {
|
|
8973
|
+
payload.issues.push({
|
|
8974
|
+
code: "invalid_key",
|
|
8975
|
+
origin: "record",
|
|
8976
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
8977
|
+
input: key,
|
|
8978
|
+
path: [key],
|
|
8979
|
+
inst
|
|
8980
|
+
});
|
|
8981
|
+
continue;
|
|
8982
|
+
}
|
|
8983
|
+
const outKey = keyResult.value;
|
|
8837
8984
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
8838
8985
|
if (result instanceof Promise) {
|
|
8839
8986
|
proms.push(result.then((result2) => {
|
|
8840
8987
|
if (result2.issues.length) {
|
|
8841
8988
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
8842
8989
|
}
|
|
8843
|
-
payload.value[
|
|
8990
|
+
payload.value[outKey] = result2.value;
|
|
8844
8991
|
}));
|
|
8845
8992
|
} else {
|
|
8846
8993
|
if (result.issues.length) {
|
|
8847
8994
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
8848
8995
|
}
|
|
8849
|
-
payload.value[
|
|
8996
|
+
payload.value[outKey] = result.value;
|
|
8850
8997
|
}
|
|
8851
8998
|
}
|
|
8852
8999
|
}
|
|
@@ -8870,6 +9017,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
8870
9017
|
for (const key of Reflect.ownKeys(input)) {
|
|
8871
9018
|
if (key === "__proto__")
|
|
8872
9019
|
continue;
|
|
9020
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
9021
|
+
continue;
|
|
8873
9022
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
8874
9023
|
if (keyResult instanceof Promise) {
|
|
8875
9024
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -9074,6 +9223,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
|
9074
9223
|
});
|
|
9075
9224
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
9076
9225
|
$ZodType.init(inst, def);
|
|
9226
|
+
inst._zod.optin = "optional";
|
|
9077
9227
|
inst._zod.parse = (payload, ctx) => {
|
|
9078
9228
|
if (ctx.direction === "backward") {
|
|
9079
9229
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -9083,6 +9233,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
9083
9233
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
9084
9234
|
return output.then((output2) => {
|
|
9085
9235
|
payload.value = output2;
|
|
9236
|
+
payload.fallback = true;
|
|
9086
9237
|
return payload;
|
|
9087
9238
|
});
|
|
9088
9239
|
}
|
|
@@ -9090,11 +9241,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
9090
9241
|
throw new $ZodAsyncError();
|
|
9091
9242
|
}
|
|
9092
9243
|
payload.value = _out;
|
|
9244
|
+
payload.fallback = true;
|
|
9093
9245
|
return payload;
|
|
9094
9246
|
};
|
|
9095
9247
|
});
|
|
9096
9248
|
function handleOptionalResult(result, input) {
|
|
9097
|
-
if (result.issues.length
|
|
9249
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
9098
9250
|
return { issues: [], value: void 0 };
|
|
9099
9251
|
}
|
|
9100
9252
|
return result;
|
|
@@ -9112,10 +9264,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
9112
9264
|
});
|
|
9113
9265
|
inst._zod.parse = (payload, ctx) => {
|
|
9114
9266
|
if (def.innerType._zod.optin === "optional") {
|
|
9267
|
+
const input = payload.value;
|
|
9115
9268
|
const result = def.innerType._zod.run(payload, ctx);
|
|
9116
9269
|
if (result instanceof Promise)
|
|
9117
|
-
return result.then((r) => handleOptionalResult(r,
|
|
9118
|
-
return handleOptionalResult(result,
|
|
9270
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
9271
|
+
return handleOptionalResult(result, input);
|
|
9119
9272
|
}
|
|
9120
9273
|
if (payload.value === void 0) {
|
|
9121
9274
|
return payload;
|
|
@@ -9231,7 +9384,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
9231
9384
|
});
|
|
9232
9385
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
9233
9386
|
$ZodType.init(inst, def);
|
|
9234
|
-
|
|
9387
|
+
inst._zod.optin = "optional";
|
|
9235
9388
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
9236
9389
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
9237
9390
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -9251,6 +9404,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
9251
9404
|
input: payload.value
|
|
9252
9405
|
});
|
|
9253
9406
|
payload.issues = [];
|
|
9407
|
+
payload.fallback = true;
|
|
9254
9408
|
}
|
|
9255
9409
|
return payload;
|
|
9256
9410
|
});
|
|
@@ -9265,6 +9419,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
9265
9419
|
input: payload.value
|
|
9266
9420
|
});
|
|
9267
9421
|
payload.issues = [];
|
|
9422
|
+
payload.fallback = true;
|
|
9268
9423
|
}
|
|
9269
9424
|
return payload;
|
|
9270
9425
|
};
|
|
@@ -9310,7 +9465,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
9310
9465
|
left.aborted = true;
|
|
9311
9466
|
return left;
|
|
9312
9467
|
}
|
|
9313
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
9468
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
9314
9469
|
}
|
|
9315
9470
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
9316
9471
|
$ZodType.init(inst, def);
|
|
@@ -9362,6 +9517,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
|
|
|
9362
9517
|
}
|
|
9363
9518
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
9364
9519
|
}
|
|
9520
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
9521
|
+
$ZodPipe.init(inst, def);
|
|
9522
|
+
});
|
|
9365
9523
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
9366
9524
|
$ZodType.init(inst, def);
|
|
9367
9525
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -9513,7 +9671,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
|
9513
9671
|
});
|
|
9514
9672
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
9515
9673
|
$ZodType.init(inst, def);
|
|
9516
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
9674
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
9675
|
+
const d = def;
|
|
9676
|
+
if (!d._cachedInner)
|
|
9677
|
+
d._cachedInner = def.getter();
|
|
9678
|
+
return d._cachedInner;
|
|
9679
|
+
});
|
|
9517
9680
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
9518
9681
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
9519
9682
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -9568,6 +9731,7 @@ __export(locales_exports, {
|
|
|
9568
9731
|
cs: () => cs_default,
|
|
9569
9732
|
da: () => da_default,
|
|
9570
9733
|
de: () => de_default,
|
|
9734
|
+
el: () => el_default,
|
|
9571
9735
|
en: () => en_default,
|
|
9572
9736
|
eo: () => eo_default,
|
|
9573
9737
|
es: () => es_default,
|
|
@@ -9576,6 +9740,7 @@ __export(locales_exports, {
|
|
|
9576
9740
|
fr: () => fr_default,
|
|
9577
9741
|
frCA: () => fr_CA_default,
|
|
9578
9742
|
he: () => he_default,
|
|
9743
|
+
hr: () => hr_default,
|
|
9579
9744
|
hu: () => hu_default,
|
|
9580
9745
|
hy: () => hy_default,
|
|
9581
9746
|
id: () => id_default,
|
|
@@ -9595,6 +9760,7 @@ __export(locales_exports, {
|
|
|
9595
9760
|
pl: () => pl_default,
|
|
9596
9761
|
ps: () => ps_default,
|
|
9597
9762
|
pt: () => pt_default,
|
|
9763
|
+
ro: () => ro_default,
|
|
9598
9764
|
ru: () => ru_default,
|
|
9599
9765
|
sl: () => sl_default,
|
|
9600
9766
|
sv: () => sv_default,
|
|
@@ -10548,8 +10714,118 @@ function de_default() {
|
|
|
10548
10714
|
};
|
|
10549
10715
|
}
|
|
10550
10716
|
|
|
10551
|
-
// node_modules/zod/v4/locales/
|
|
10717
|
+
// node_modules/zod/v4/locales/el.js
|
|
10552
10718
|
var error9 = () => {
|
|
10719
|
+
const Sizable = {
|
|
10720
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
10721
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
10722
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
10723
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
10724
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
10725
|
+
};
|
|
10726
|
+
function getSizing(origin) {
|
|
10727
|
+
return Sizable[origin] ?? null;
|
|
10728
|
+
}
|
|
10729
|
+
const FormatDictionary = {
|
|
10730
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
10731
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
10732
|
+
url: "URL",
|
|
10733
|
+
emoji: "emoji",
|
|
10734
|
+
uuid: "UUID",
|
|
10735
|
+
uuidv4: "UUIDv4",
|
|
10736
|
+
uuidv6: "UUIDv6",
|
|
10737
|
+
nanoid: "nanoid",
|
|
10738
|
+
guid: "GUID",
|
|
10739
|
+
cuid: "cuid",
|
|
10740
|
+
cuid2: "cuid2",
|
|
10741
|
+
ulid: "ULID",
|
|
10742
|
+
xid: "XID",
|
|
10743
|
+
ksuid: "KSUID",
|
|
10744
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
10745
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
10746
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
10747
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
10748
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
10749
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
10750
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
10751
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
10752
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
10753
|
+
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",
|
|
10754
|
+
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",
|
|
10755
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
10756
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
10757
|
+
jwt: "JWT",
|
|
10758
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
10759
|
+
};
|
|
10760
|
+
const TypeDictionary = {
|
|
10761
|
+
nan: "NaN"
|
|
10762
|
+
};
|
|
10763
|
+
return (issue2) => {
|
|
10764
|
+
switch (issue2.code) {
|
|
10765
|
+
case "invalid_type": {
|
|
10766
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
10767
|
+
const receivedType = parsedType(issue2.input);
|
|
10768
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
10769
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
10770
|
+
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}`;
|
|
10771
|
+
}
|
|
10772
|
+
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}`;
|
|
10773
|
+
}
|
|
10774
|
+
case "invalid_value":
|
|
10775
|
+
if (issue2.values.length === 1)
|
|
10776
|
+
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])}`;
|
|
10777
|
+
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, "|")}`;
|
|
10778
|
+
case "too_big": {
|
|
10779
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
10780
|
+
const sizing = getSizing(issue2.origin);
|
|
10781
|
+
if (sizing)
|
|
10782
|
+
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"}`;
|
|
10783
|
+
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()}`;
|
|
10784
|
+
}
|
|
10785
|
+
case "too_small": {
|
|
10786
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
10787
|
+
const sizing = getSizing(issue2.origin);
|
|
10788
|
+
if (sizing) {
|
|
10789
|
+
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}`;
|
|
10790
|
+
}
|
|
10791
|
+
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()}`;
|
|
10792
|
+
}
|
|
10793
|
+
case "invalid_format": {
|
|
10794
|
+
const _issue = issue2;
|
|
10795
|
+
if (_issue.format === "starts_with") {
|
|
10796
|
+
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}"`;
|
|
10797
|
+
}
|
|
10798
|
+
if (_issue.format === "ends_with")
|
|
10799
|
+
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}"`;
|
|
10800
|
+
if (_issue.format === "includes")
|
|
10801
|
+
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}"`;
|
|
10802
|
+
if (_issue.format === "regex")
|
|
10803
|
+
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}`;
|
|
10804
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
10805
|
+
}
|
|
10806
|
+
case "not_multiple_of":
|
|
10807
|
+
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}`;
|
|
10808
|
+
case "unrecognized_keys":
|
|
10809
|
+
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, ", ")}`;
|
|
10810
|
+
case "invalid_key":
|
|
10811
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
10812
|
+
case "invalid_union":
|
|
10813
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
10814
|
+
case "invalid_element":
|
|
10815
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
10816
|
+
default:
|
|
10817
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
10818
|
+
}
|
|
10819
|
+
};
|
|
10820
|
+
};
|
|
10821
|
+
function el_default() {
|
|
10822
|
+
return {
|
|
10823
|
+
localeError: error9()
|
|
10824
|
+
};
|
|
10825
|
+
}
|
|
10826
|
+
|
|
10827
|
+
// node_modules/zod/v4/locales/en.js
|
|
10828
|
+
var error10 = () => {
|
|
10553
10829
|
const Sizable = {
|
|
10554
10830
|
string: { unit: "characters", verb: "to have" },
|
|
10555
10831
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -10643,6 +10919,10 @@ var error9 = () => {
|
|
|
10643
10919
|
case "invalid_key":
|
|
10644
10920
|
return `Invalid key in ${issue2.origin}`;
|
|
10645
10921
|
case "invalid_union":
|
|
10922
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
10923
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
10924
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
10925
|
+
}
|
|
10646
10926
|
return "Invalid input";
|
|
10647
10927
|
case "invalid_element":
|
|
10648
10928
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -10653,12 +10933,12 @@ var error9 = () => {
|
|
|
10653
10933
|
};
|
|
10654
10934
|
function en_default() {
|
|
10655
10935
|
return {
|
|
10656
|
-
localeError:
|
|
10936
|
+
localeError: error10()
|
|
10657
10937
|
};
|
|
10658
10938
|
}
|
|
10659
10939
|
|
|
10660
10940
|
// node_modules/zod/v4/locales/eo.js
|
|
10661
|
-
var
|
|
10941
|
+
var error11 = () => {
|
|
10662
10942
|
const Sizable = {
|
|
10663
10943
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
10664
10944
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -10763,12 +11043,12 @@ var error10 = () => {
|
|
|
10763
11043
|
};
|
|
10764
11044
|
function eo_default() {
|
|
10765
11045
|
return {
|
|
10766
|
-
localeError:
|
|
11046
|
+
localeError: error11()
|
|
10767
11047
|
};
|
|
10768
11048
|
}
|
|
10769
11049
|
|
|
10770
11050
|
// node_modules/zod/v4/locales/es.js
|
|
10771
|
-
var
|
|
11051
|
+
var error12 = () => {
|
|
10772
11052
|
const Sizable = {
|
|
10773
11053
|
string: { unit: "caracteres", verb: "tener" },
|
|
10774
11054
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -10896,12 +11176,12 @@ var error11 = () => {
|
|
|
10896
11176
|
};
|
|
10897
11177
|
function es_default() {
|
|
10898
11178
|
return {
|
|
10899
|
-
localeError:
|
|
11179
|
+
localeError: error12()
|
|
10900
11180
|
};
|
|
10901
11181
|
}
|
|
10902
11182
|
|
|
10903
11183
|
// node_modules/zod/v4/locales/fa.js
|
|
10904
|
-
var
|
|
11184
|
+
var error13 = () => {
|
|
10905
11185
|
const Sizable = {
|
|
10906
11186
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
10907
11187
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -11011,12 +11291,12 @@ var error12 = () => {
|
|
|
11011
11291
|
};
|
|
11012
11292
|
function fa_default() {
|
|
11013
11293
|
return {
|
|
11014
|
-
localeError:
|
|
11294
|
+
localeError: error13()
|
|
11015
11295
|
};
|
|
11016
11296
|
}
|
|
11017
11297
|
|
|
11018
11298
|
// node_modules/zod/v4/locales/fi.js
|
|
11019
|
-
var
|
|
11299
|
+
var error14 = () => {
|
|
11020
11300
|
const Sizable = {
|
|
11021
11301
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
11022
11302
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -11124,12 +11404,12 @@ var error13 = () => {
|
|
|
11124
11404
|
};
|
|
11125
11405
|
function fi_default() {
|
|
11126
11406
|
return {
|
|
11127
|
-
localeError:
|
|
11407
|
+
localeError: error14()
|
|
11128
11408
|
};
|
|
11129
11409
|
}
|
|
11130
11410
|
|
|
11131
11411
|
// node_modules/zod/v4/locales/fr.js
|
|
11132
|
-
var
|
|
11412
|
+
var error15 = () => {
|
|
11133
11413
|
const Sizable = {
|
|
11134
11414
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
11135
11415
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -11170,9 +11450,27 @@ var error14 = () => {
|
|
|
11170
11450
|
template_literal: "entr\xE9e"
|
|
11171
11451
|
};
|
|
11172
11452
|
const TypeDictionary = {
|
|
11173
|
-
|
|
11453
|
+
string: "cha\xEEne",
|
|
11174
11454
|
number: "nombre",
|
|
11175
|
-
|
|
11455
|
+
int: "entier",
|
|
11456
|
+
boolean: "bool\xE9en",
|
|
11457
|
+
bigint: "grand entier",
|
|
11458
|
+
symbol: "symbole",
|
|
11459
|
+
undefined: "ind\xE9fini",
|
|
11460
|
+
null: "null",
|
|
11461
|
+
never: "jamais",
|
|
11462
|
+
void: "vide",
|
|
11463
|
+
date: "date",
|
|
11464
|
+
array: "tableau",
|
|
11465
|
+
object: "objet",
|
|
11466
|
+
tuple: "tuple",
|
|
11467
|
+
record: "enregistrement",
|
|
11468
|
+
map: "carte",
|
|
11469
|
+
set: "ensemble",
|
|
11470
|
+
file: "fichier",
|
|
11471
|
+
nonoptional: "non-optionnel",
|
|
11472
|
+
nan: "NaN",
|
|
11473
|
+
function: "fonction"
|
|
11176
11474
|
};
|
|
11177
11475
|
return (issue2) => {
|
|
11178
11476
|
switch (issue2.code) {
|
|
@@ -11193,16 +11491,15 @@ var error14 = () => {
|
|
|
11193
11491
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
11194
11492
|
const sizing = getSizing(issue2.origin);
|
|
11195
11493
|
if (sizing)
|
|
11196
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
11197
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
11494
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
11495
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
11198
11496
|
}
|
|
11199
11497
|
case "too_small": {
|
|
11200
11498
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
11201
11499
|
const sizing = getSizing(issue2.origin);
|
|
11202
|
-
if (sizing)
|
|
11203
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
11204
|
-
}
|
|
11205
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
11500
|
+
if (sizing)
|
|
11501
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
11502
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
11206
11503
|
}
|
|
11207
11504
|
case "invalid_format": {
|
|
11208
11505
|
const _issue = issue2;
|
|
@@ -11233,12 +11530,12 @@ var error14 = () => {
|
|
|
11233
11530
|
};
|
|
11234
11531
|
function fr_default() {
|
|
11235
11532
|
return {
|
|
11236
|
-
localeError:
|
|
11533
|
+
localeError: error15()
|
|
11237
11534
|
};
|
|
11238
11535
|
}
|
|
11239
11536
|
|
|
11240
11537
|
// node_modules/zod/v4/locales/fr-CA.js
|
|
11241
|
-
var
|
|
11538
|
+
var error16 = () => {
|
|
11242
11539
|
const Sizable = {
|
|
11243
11540
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
11244
11541
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -11341,12 +11638,12 @@ var error15 = () => {
|
|
|
11341
11638
|
};
|
|
11342
11639
|
function fr_CA_default() {
|
|
11343
11640
|
return {
|
|
11344
|
-
localeError:
|
|
11641
|
+
localeError: error16()
|
|
11345
11642
|
};
|
|
11346
11643
|
}
|
|
11347
11644
|
|
|
11348
11645
|
// node_modules/zod/v4/locales/he.js
|
|
11349
|
-
var
|
|
11646
|
+
var error17 = () => {
|
|
11350
11647
|
const TypeNames = {
|
|
11351
11648
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
11352
11649
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -11536,24 +11833,24 @@ var error16 = () => {
|
|
|
11536
11833
|
};
|
|
11537
11834
|
function he_default() {
|
|
11538
11835
|
return {
|
|
11539
|
-
localeError:
|
|
11836
|
+
localeError: error17()
|
|
11540
11837
|
};
|
|
11541
11838
|
}
|
|
11542
11839
|
|
|
11543
|
-
// node_modules/zod/v4/locales/
|
|
11544
|
-
var
|
|
11840
|
+
// node_modules/zod/v4/locales/hr.js
|
|
11841
|
+
var error18 = () => {
|
|
11545
11842
|
const Sizable = {
|
|
11546
|
-
string: { unit: "
|
|
11547
|
-
file: { unit: "
|
|
11548
|
-
array: { unit: "
|
|
11549
|
-
set: { unit: "
|
|
11843
|
+
string: { unit: "znakova", verb: "imati" },
|
|
11844
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
11845
|
+
array: { unit: "stavki", verb: "imati" },
|
|
11846
|
+
set: { unit: "stavki", verb: "imati" }
|
|
11550
11847
|
};
|
|
11551
11848
|
function getSizing(origin) {
|
|
11552
11849
|
return Sizable[origin] ?? null;
|
|
11553
11850
|
}
|
|
11554
11851
|
const FormatDictionary = {
|
|
11555
|
-
regex: "
|
|
11556
|
-
email: "email
|
|
11852
|
+
regex: "unos",
|
|
11853
|
+
email: "email adresa",
|
|
11557
11854
|
url: "URL",
|
|
11558
11855
|
emoji: "emoji",
|
|
11559
11856
|
uuid: "UUID",
|
|
@@ -11566,27 +11863,150 @@ var error17 = () => {
|
|
|
11566
11863
|
ulid: "ULID",
|
|
11567
11864
|
xid: "XID",
|
|
11568
11865
|
ksuid: "KSUID",
|
|
11569
|
-
datetime: "ISO
|
|
11570
|
-
date: "ISO
|
|
11571
|
-
time: "ISO
|
|
11572
|
-
duration: "ISO
|
|
11573
|
-
ipv4: "IPv4
|
|
11574
|
-
ipv6: "IPv6
|
|
11575
|
-
cidrv4: "IPv4
|
|
11576
|
-
cidrv6: "IPv6
|
|
11577
|
-
base64: "base64
|
|
11578
|
-
base64url: "base64url
|
|
11579
|
-
json_string: "JSON
|
|
11580
|
-
e164: "E.164
|
|
11866
|
+
datetime: "ISO datum i vrijeme",
|
|
11867
|
+
date: "ISO datum",
|
|
11868
|
+
time: "ISO vrijeme",
|
|
11869
|
+
duration: "ISO trajanje",
|
|
11870
|
+
ipv4: "IPv4 adresa",
|
|
11871
|
+
ipv6: "IPv6 adresa",
|
|
11872
|
+
cidrv4: "IPv4 raspon",
|
|
11873
|
+
cidrv6: "IPv6 raspon",
|
|
11874
|
+
base64: "base64 kodirani tekst",
|
|
11875
|
+
base64url: "base64url kodirani tekst",
|
|
11876
|
+
json_string: "JSON tekst",
|
|
11877
|
+
e164: "E.164 broj",
|
|
11581
11878
|
jwt: "JWT",
|
|
11582
|
-
template_literal: "
|
|
11879
|
+
template_literal: "unos"
|
|
11583
11880
|
};
|
|
11584
11881
|
const TypeDictionary = {
|
|
11585
11882
|
nan: "NaN",
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11883
|
+
string: "tekst",
|
|
11884
|
+
number: "broj",
|
|
11885
|
+
boolean: "boolean",
|
|
11886
|
+
array: "niz",
|
|
11887
|
+
object: "objekt",
|
|
11888
|
+
set: "skup",
|
|
11889
|
+
file: "datoteka",
|
|
11890
|
+
date: "datum",
|
|
11891
|
+
bigint: "bigint",
|
|
11892
|
+
symbol: "simbol",
|
|
11893
|
+
undefined: "undefined",
|
|
11894
|
+
null: "null",
|
|
11895
|
+
function: "funkcija",
|
|
11896
|
+
map: "mapa"
|
|
11897
|
+
};
|
|
11898
|
+
return (issue2) => {
|
|
11899
|
+
switch (issue2.code) {
|
|
11900
|
+
case "invalid_type": {
|
|
11901
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
11902
|
+
const receivedType = parsedType(issue2.input);
|
|
11903
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
11904
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
11905
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
11906
|
+
}
|
|
11907
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
11908
|
+
}
|
|
11909
|
+
case "invalid_value":
|
|
11910
|
+
if (issue2.values.length === 1)
|
|
11911
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
11912
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
11913
|
+
case "too_big": {
|
|
11914
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
11915
|
+
const sizing = getSizing(issue2.origin);
|
|
11916
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
11917
|
+
if (sizing)
|
|
11918
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
11919
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
11920
|
+
}
|
|
11921
|
+
case "too_small": {
|
|
11922
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
11923
|
+
const sizing = getSizing(issue2.origin);
|
|
11924
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
11925
|
+
if (sizing) {
|
|
11926
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
11927
|
+
}
|
|
11928
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
11929
|
+
}
|
|
11930
|
+
case "invalid_format": {
|
|
11931
|
+
const _issue = issue2;
|
|
11932
|
+
if (_issue.format === "starts_with")
|
|
11933
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
11934
|
+
if (_issue.format === "ends_with")
|
|
11935
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
11936
|
+
if (_issue.format === "includes")
|
|
11937
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
11938
|
+
if (_issue.format === "regex")
|
|
11939
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
11940
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
11941
|
+
}
|
|
11942
|
+
case "not_multiple_of":
|
|
11943
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
11944
|
+
case "unrecognized_keys":
|
|
11945
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
11946
|
+
case "invalid_key":
|
|
11947
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
11948
|
+
case "invalid_union":
|
|
11949
|
+
return "Neispravan unos";
|
|
11950
|
+
case "invalid_element":
|
|
11951
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
11952
|
+
default:
|
|
11953
|
+
return `Neispravan unos`;
|
|
11954
|
+
}
|
|
11955
|
+
};
|
|
11956
|
+
};
|
|
11957
|
+
function hr_default() {
|
|
11958
|
+
return {
|
|
11959
|
+
localeError: error18()
|
|
11960
|
+
};
|
|
11961
|
+
}
|
|
11962
|
+
|
|
11963
|
+
// node_modules/zod/v4/locales/hu.js
|
|
11964
|
+
var error19 = () => {
|
|
11965
|
+
const Sizable = {
|
|
11966
|
+
string: { unit: "karakter", verb: "legyen" },
|
|
11967
|
+
file: { unit: "byte", verb: "legyen" },
|
|
11968
|
+
array: { unit: "elem", verb: "legyen" },
|
|
11969
|
+
set: { unit: "elem", verb: "legyen" }
|
|
11970
|
+
};
|
|
11971
|
+
function getSizing(origin) {
|
|
11972
|
+
return Sizable[origin] ?? null;
|
|
11973
|
+
}
|
|
11974
|
+
const FormatDictionary = {
|
|
11975
|
+
regex: "bemenet",
|
|
11976
|
+
email: "email c\xEDm",
|
|
11977
|
+
url: "URL",
|
|
11978
|
+
emoji: "emoji",
|
|
11979
|
+
uuid: "UUID",
|
|
11980
|
+
uuidv4: "UUIDv4",
|
|
11981
|
+
uuidv6: "UUIDv6",
|
|
11982
|
+
nanoid: "nanoid",
|
|
11983
|
+
guid: "GUID",
|
|
11984
|
+
cuid: "cuid",
|
|
11985
|
+
cuid2: "cuid2",
|
|
11986
|
+
ulid: "ULID",
|
|
11987
|
+
xid: "XID",
|
|
11988
|
+
ksuid: "KSUID",
|
|
11989
|
+
datetime: "ISO id\u0151b\xE9lyeg",
|
|
11990
|
+
date: "ISO d\xE1tum",
|
|
11991
|
+
time: "ISO id\u0151",
|
|
11992
|
+
duration: "ISO id\u0151intervallum",
|
|
11993
|
+
ipv4: "IPv4 c\xEDm",
|
|
11994
|
+
ipv6: "IPv6 c\xEDm",
|
|
11995
|
+
cidrv4: "IPv4 tartom\xE1ny",
|
|
11996
|
+
cidrv6: "IPv6 tartom\xE1ny",
|
|
11997
|
+
base64: "base64-k\xF3dolt string",
|
|
11998
|
+
base64url: "base64url-k\xF3dolt string",
|
|
11999
|
+
json_string: "JSON string",
|
|
12000
|
+
e164: "E.164 sz\xE1m",
|
|
12001
|
+
jwt: "JWT",
|
|
12002
|
+
template_literal: "bemenet"
|
|
12003
|
+
};
|
|
12004
|
+
const TypeDictionary = {
|
|
12005
|
+
nan: "NaN",
|
|
12006
|
+
number: "sz\xE1m",
|
|
12007
|
+
array: "t\xF6mb"
|
|
12008
|
+
};
|
|
12009
|
+
return (issue2) => {
|
|
11590
12010
|
switch (issue2.code) {
|
|
11591
12011
|
case "invalid_type": {
|
|
11592
12012
|
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
@@ -11645,7 +12065,7 @@ var error17 = () => {
|
|
|
11645
12065
|
};
|
|
11646
12066
|
function hu_default() {
|
|
11647
12067
|
return {
|
|
11648
|
-
localeError:
|
|
12068
|
+
localeError: error19()
|
|
11649
12069
|
};
|
|
11650
12070
|
}
|
|
11651
12071
|
|
|
@@ -11660,7 +12080,7 @@ function withDefiniteArticle(word) {
|
|
|
11660
12080
|
const lastChar = word[word.length - 1];
|
|
11661
12081
|
return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
|
|
11662
12082
|
}
|
|
11663
|
-
var
|
|
12083
|
+
var error20 = () => {
|
|
11664
12084
|
const Sizable = {
|
|
11665
12085
|
string: {
|
|
11666
12086
|
unit: {
|
|
@@ -11793,12 +12213,12 @@ var error18 = () => {
|
|
|
11793
12213
|
};
|
|
11794
12214
|
function hy_default() {
|
|
11795
12215
|
return {
|
|
11796
|
-
localeError:
|
|
12216
|
+
localeError: error20()
|
|
11797
12217
|
};
|
|
11798
12218
|
}
|
|
11799
12219
|
|
|
11800
12220
|
// node_modules/zod/v4/locales/id.js
|
|
11801
|
-
var
|
|
12221
|
+
var error21 = () => {
|
|
11802
12222
|
const Sizable = {
|
|
11803
12223
|
string: { unit: "karakter", verb: "memiliki" },
|
|
11804
12224
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -11900,12 +12320,12 @@ var error19 = () => {
|
|
|
11900
12320
|
};
|
|
11901
12321
|
function id_default() {
|
|
11902
12322
|
return {
|
|
11903
|
-
localeError:
|
|
12323
|
+
localeError: error21()
|
|
11904
12324
|
};
|
|
11905
12325
|
}
|
|
11906
12326
|
|
|
11907
12327
|
// node_modules/zod/v4/locales/is.js
|
|
11908
|
-
var
|
|
12328
|
+
var error22 = () => {
|
|
11909
12329
|
const Sizable = {
|
|
11910
12330
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
11911
12331
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -12010,12 +12430,12 @@ var error20 = () => {
|
|
|
12010
12430
|
};
|
|
12011
12431
|
function is_default() {
|
|
12012
12432
|
return {
|
|
12013
|
-
localeError:
|
|
12433
|
+
localeError: error22()
|
|
12014
12434
|
};
|
|
12015
12435
|
}
|
|
12016
12436
|
|
|
12017
12437
|
// node_modules/zod/v4/locales/it.js
|
|
12018
|
-
var
|
|
12438
|
+
var error23 = () => {
|
|
12019
12439
|
const Sizable = {
|
|
12020
12440
|
string: { unit: "caratteri", verb: "avere" },
|
|
12021
12441
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -12100,7 +12520,7 @@ var error21 = () => {
|
|
|
12100
12520
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
12101
12521
|
if (_issue.format === "regex")
|
|
12102
12522
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
12103
|
-
return `
|
|
12523
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
12104
12524
|
}
|
|
12105
12525
|
case "not_multiple_of":
|
|
12106
12526
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -12119,12 +12539,12 @@ var error21 = () => {
|
|
|
12119
12539
|
};
|
|
12120
12540
|
function it_default() {
|
|
12121
12541
|
return {
|
|
12122
|
-
localeError:
|
|
12542
|
+
localeError: error23()
|
|
12123
12543
|
};
|
|
12124
12544
|
}
|
|
12125
12545
|
|
|
12126
12546
|
// node_modules/zod/v4/locales/ja.js
|
|
12127
|
-
var
|
|
12547
|
+
var error24 = () => {
|
|
12128
12548
|
const Sizable = {
|
|
12129
12549
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
12130
12550
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -12227,12 +12647,12 @@ var error22 = () => {
|
|
|
12227
12647
|
};
|
|
12228
12648
|
function ja_default() {
|
|
12229
12649
|
return {
|
|
12230
|
-
localeError:
|
|
12650
|
+
localeError: error24()
|
|
12231
12651
|
};
|
|
12232
12652
|
}
|
|
12233
12653
|
|
|
12234
12654
|
// node_modules/zod/v4/locales/ka.js
|
|
12235
|
-
var
|
|
12655
|
+
var error25 = () => {
|
|
12236
12656
|
const Sizable = {
|
|
12237
12657
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
12238
12658
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -12265,9 +12685,9 @@ var error23 = () => {
|
|
|
12265
12685
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
12266
12686
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
12267
12687
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
12268
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
12269
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
12270
|
-
json_string: "JSON \
|
|
12688
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
12689
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
12690
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
12271
12691
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
12272
12692
|
jwt: "JWT",
|
|
12273
12693
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -12275,7 +12695,7 @@ var error23 = () => {
|
|
|
12275
12695
|
const TypeDictionary = {
|
|
12276
12696
|
nan: "NaN",
|
|
12277
12697
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
12278
|
-
string: "\
|
|
12698
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
12279
12699
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
12280
12700
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
12281
12701
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -12313,14 +12733,14 @@ var error23 = () => {
|
|
|
12313
12733
|
case "invalid_format": {
|
|
12314
12734
|
const _issue = issue2;
|
|
12315
12735
|
if (_issue.format === "starts_with") {
|
|
12316
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
12736
|
+
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`;
|
|
12317
12737
|
}
|
|
12318
12738
|
if (_issue.format === "ends_with")
|
|
12319
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
12739
|
+
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`;
|
|
12320
12740
|
if (_issue.format === "includes")
|
|
12321
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
12741
|
+
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`;
|
|
12322
12742
|
if (_issue.format === "regex")
|
|
12323
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
12743
|
+
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}`;
|
|
12324
12744
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
12325
12745
|
}
|
|
12326
12746
|
case "not_multiple_of":
|
|
@@ -12340,12 +12760,12 @@ var error23 = () => {
|
|
|
12340
12760
|
};
|
|
12341
12761
|
function ka_default() {
|
|
12342
12762
|
return {
|
|
12343
|
-
localeError:
|
|
12763
|
+
localeError: error25()
|
|
12344
12764
|
};
|
|
12345
12765
|
}
|
|
12346
12766
|
|
|
12347
12767
|
// node_modules/zod/v4/locales/km.js
|
|
12348
|
-
var
|
|
12768
|
+
var error26 = () => {
|
|
12349
12769
|
const Sizable = {
|
|
12350
12770
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
12351
12771
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -12451,7 +12871,7 @@ var error24 = () => {
|
|
|
12451
12871
|
};
|
|
12452
12872
|
function km_default() {
|
|
12453
12873
|
return {
|
|
12454
|
-
localeError:
|
|
12874
|
+
localeError: error26()
|
|
12455
12875
|
};
|
|
12456
12876
|
}
|
|
12457
12877
|
|
|
@@ -12461,7 +12881,7 @@ function kh_default() {
|
|
|
12461
12881
|
}
|
|
12462
12882
|
|
|
12463
12883
|
// node_modules/zod/v4/locales/ko.js
|
|
12464
|
-
var
|
|
12884
|
+
var error27 = () => {
|
|
12465
12885
|
const Sizable = {
|
|
12466
12886
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
12467
12887
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -12568,7 +12988,7 @@ var error25 = () => {
|
|
|
12568
12988
|
};
|
|
12569
12989
|
function ko_default() {
|
|
12570
12990
|
return {
|
|
12571
|
-
localeError:
|
|
12991
|
+
localeError: error27()
|
|
12572
12992
|
};
|
|
12573
12993
|
}
|
|
12574
12994
|
|
|
@@ -12586,7 +13006,7 @@ function getUnitTypeFromNumber(number5) {
|
|
|
12586
13006
|
return "one";
|
|
12587
13007
|
return "few";
|
|
12588
13008
|
}
|
|
12589
|
-
var
|
|
13009
|
+
var error28 = () => {
|
|
12590
13010
|
const Sizable = {
|
|
12591
13011
|
string: {
|
|
12592
13012
|
unit: {
|
|
@@ -12772,12 +13192,12 @@ var error26 = () => {
|
|
|
12772
13192
|
};
|
|
12773
13193
|
function lt_default() {
|
|
12774
13194
|
return {
|
|
12775
|
-
localeError:
|
|
13195
|
+
localeError: error28()
|
|
12776
13196
|
};
|
|
12777
13197
|
}
|
|
12778
13198
|
|
|
12779
13199
|
// node_modules/zod/v4/locales/mk.js
|
|
12780
|
-
var
|
|
13200
|
+
var error29 = () => {
|
|
12781
13201
|
const Sizable = {
|
|
12782
13202
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
12783
13203
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -12882,12 +13302,12 @@ var error27 = () => {
|
|
|
12882
13302
|
};
|
|
12883
13303
|
function mk_default() {
|
|
12884
13304
|
return {
|
|
12885
|
-
localeError:
|
|
13305
|
+
localeError: error29()
|
|
12886
13306
|
};
|
|
12887
13307
|
}
|
|
12888
13308
|
|
|
12889
13309
|
// node_modules/zod/v4/locales/ms.js
|
|
12890
|
-
var
|
|
13310
|
+
var error30 = () => {
|
|
12891
13311
|
const Sizable = {
|
|
12892
13312
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
12893
13313
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -12990,12 +13410,12 @@ var error28 = () => {
|
|
|
12990
13410
|
};
|
|
12991
13411
|
function ms_default() {
|
|
12992
13412
|
return {
|
|
12993
|
-
localeError:
|
|
13413
|
+
localeError: error30()
|
|
12994
13414
|
};
|
|
12995
13415
|
}
|
|
12996
13416
|
|
|
12997
13417
|
// node_modules/zod/v4/locales/nl.js
|
|
12998
|
-
var
|
|
13418
|
+
var error31 = () => {
|
|
12999
13419
|
const Sizable = {
|
|
13000
13420
|
string: { unit: "tekens", verb: "heeft" },
|
|
13001
13421
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -13101,12 +13521,12 @@ var error29 = () => {
|
|
|
13101
13521
|
};
|
|
13102
13522
|
function nl_default() {
|
|
13103
13523
|
return {
|
|
13104
|
-
localeError:
|
|
13524
|
+
localeError: error31()
|
|
13105
13525
|
};
|
|
13106
13526
|
}
|
|
13107
13527
|
|
|
13108
13528
|
// node_modules/zod/v4/locales/no.js
|
|
13109
|
-
var
|
|
13529
|
+
var error32 = () => {
|
|
13110
13530
|
const Sizable = {
|
|
13111
13531
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
13112
13532
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -13210,12 +13630,12 @@ var error30 = () => {
|
|
|
13210
13630
|
};
|
|
13211
13631
|
function no_default() {
|
|
13212
13632
|
return {
|
|
13213
|
-
localeError:
|
|
13633
|
+
localeError: error32()
|
|
13214
13634
|
};
|
|
13215
13635
|
}
|
|
13216
13636
|
|
|
13217
13637
|
// node_modules/zod/v4/locales/ota.js
|
|
13218
|
-
var
|
|
13638
|
+
var error33 = () => {
|
|
13219
13639
|
const Sizable = {
|
|
13220
13640
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
13221
13641
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -13320,12 +13740,12 @@ var error31 = () => {
|
|
|
13320
13740
|
};
|
|
13321
13741
|
function ota_default() {
|
|
13322
13742
|
return {
|
|
13323
|
-
localeError:
|
|
13743
|
+
localeError: error33()
|
|
13324
13744
|
};
|
|
13325
13745
|
}
|
|
13326
13746
|
|
|
13327
13747
|
// node_modules/zod/v4/locales/ps.js
|
|
13328
|
-
var
|
|
13748
|
+
var error34 = () => {
|
|
13329
13749
|
const Sizable = {
|
|
13330
13750
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
13331
13751
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -13435,12 +13855,12 @@ var error32 = () => {
|
|
|
13435
13855
|
};
|
|
13436
13856
|
function ps_default() {
|
|
13437
13857
|
return {
|
|
13438
|
-
localeError:
|
|
13858
|
+
localeError: error34()
|
|
13439
13859
|
};
|
|
13440
13860
|
}
|
|
13441
13861
|
|
|
13442
13862
|
// node_modules/zod/v4/locales/pl.js
|
|
13443
|
-
var
|
|
13863
|
+
var error35 = () => {
|
|
13444
13864
|
const Sizable = {
|
|
13445
13865
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
13446
13866
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -13545,12 +13965,12 @@ var error33 = () => {
|
|
|
13545
13965
|
};
|
|
13546
13966
|
function pl_default() {
|
|
13547
13967
|
return {
|
|
13548
|
-
localeError:
|
|
13968
|
+
localeError: error35()
|
|
13549
13969
|
};
|
|
13550
13970
|
}
|
|
13551
13971
|
|
|
13552
13972
|
// node_modules/zod/v4/locales/pt.js
|
|
13553
|
-
var
|
|
13973
|
+
var error36 = () => {
|
|
13554
13974
|
const Sizable = {
|
|
13555
13975
|
string: { unit: "caracteres", verb: "ter" },
|
|
13556
13976
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -13654,7 +14074,127 @@ var error34 = () => {
|
|
|
13654
14074
|
};
|
|
13655
14075
|
function pt_default() {
|
|
13656
14076
|
return {
|
|
13657
|
-
localeError:
|
|
14077
|
+
localeError: error36()
|
|
14078
|
+
};
|
|
14079
|
+
}
|
|
14080
|
+
|
|
14081
|
+
// node_modules/zod/v4/locales/ro.js
|
|
14082
|
+
var error37 = () => {
|
|
14083
|
+
const Sizable = {
|
|
14084
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
14085
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
14086
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
14087
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
14088
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
14089
|
+
};
|
|
14090
|
+
function getSizing(origin) {
|
|
14091
|
+
return Sizable[origin] ?? null;
|
|
14092
|
+
}
|
|
14093
|
+
const FormatDictionary = {
|
|
14094
|
+
regex: "intrare",
|
|
14095
|
+
email: "adres\u0103 de email",
|
|
14096
|
+
url: "URL",
|
|
14097
|
+
emoji: "emoji",
|
|
14098
|
+
uuid: "UUID",
|
|
14099
|
+
uuidv4: "UUIDv4",
|
|
14100
|
+
uuidv6: "UUIDv6",
|
|
14101
|
+
nanoid: "nanoid",
|
|
14102
|
+
guid: "GUID",
|
|
14103
|
+
cuid: "cuid",
|
|
14104
|
+
cuid2: "cuid2",
|
|
14105
|
+
ulid: "ULID",
|
|
14106
|
+
xid: "XID",
|
|
14107
|
+
ksuid: "KSUID",
|
|
14108
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
14109
|
+
date: "dat\u0103 ISO",
|
|
14110
|
+
time: "or\u0103 ISO",
|
|
14111
|
+
duration: "durat\u0103 ISO",
|
|
14112
|
+
ipv4: "adres\u0103 IPv4",
|
|
14113
|
+
ipv6: "adres\u0103 IPv6",
|
|
14114
|
+
mac: "adres\u0103 MAC",
|
|
14115
|
+
cidrv4: "interval IPv4",
|
|
14116
|
+
cidrv6: "interval IPv6",
|
|
14117
|
+
base64: "\u0219ir codat base64",
|
|
14118
|
+
base64url: "\u0219ir codat base64url",
|
|
14119
|
+
json_string: "\u0219ir JSON",
|
|
14120
|
+
e164: "num\u0103r E.164",
|
|
14121
|
+
jwt: "JWT",
|
|
14122
|
+
template_literal: "intrare"
|
|
14123
|
+
};
|
|
14124
|
+
const TypeDictionary = {
|
|
14125
|
+
nan: "NaN",
|
|
14126
|
+
string: "\u0219ir",
|
|
14127
|
+
number: "num\u0103r",
|
|
14128
|
+
boolean: "boolean",
|
|
14129
|
+
function: "func\u021Bie",
|
|
14130
|
+
array: "matrice",
|
|
14131
|
+
object: "obiect",
|
|
14132
|
+
undefined: "nedefinit",
|
|
14133
|
+
symbol: "simbol",
|
|
14134
|
+
bigint: "num\u0103r mare",
|
|
14135
|
+
void: "void",
|
|
14136
|
+
never: "never",
|
|
14137
|
+
map: "hart\u0103",
|
|
14138
|
+
set: "set"
|
|
14139
|
+
};
|
|
14140
|
+
return (issue2) => {
|
|
14141
|
+
switch (issue2.code) {
|
|
14142
|
+
case "invalid_type": {
|
|
14143
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
14144
|
+
const receivedType = parsedType(issue2.input);
|
|
14145
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
14146
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
14147
|
+
}
|
|
14148
|
+
case "invalid_value":
|
|
14149
|
+
if (issue2.values.length === 1)
|
|
14150
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
14151
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
14152
|
+
case "too_big": {
|
|
14153
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
14154
|
+
const sizing = getSizing(issue2.origin);
|
|
14155
|
+
if (sizing)
|
|
14156
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
14157
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
14158
|
+
}
|
|
14159
|
+
case "too_small": {
|
|
14160
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
14161
|
+
const sizing = getSizing(issue2.origin);
|
|
14162
|
+
if (sizing) {
|
|
14163
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
14164
|
+
}
|
|
14165
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
14166
|
+
}
|
|
14167
|
+
case "invalid_format": {
|
|
14168
|
+
const _issue = issue2;
|
|
14169
|
+
if (_issue.format === "starts_with") {
|
|
14170
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
14171
|
+
}
|
|
14172
|
+
if (_issue.format === "ends_with")
|
|
14173
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
14174
|
+
if (_issue.format === "includes")
|
|
14175
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
14176
|
+
if (_issue.format === "regex")
|
|
14177
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
14178
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
14179
|
+
}
|
|
14180
|
+
case "not_multiple_of":
|
|
14181
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
14182
|
+
case "unrecognized_keys":
|
|
14183
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
14184
|
+
case "invalid_key":
|
|
14185
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
14186
|
+
case "invalid_union":
|
|
14187
|
+
return "Intrare invalid\u0103";
|
|
14188
|
+
case "invalid_element":
|
|
14189
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
14190
|
+
default:
|
|
14191
|
+
return `Intrare invalid\u0103`;
|
|
14192
|
+
}
|
|
14193
|
+
};
|
|
14194
|
+
};
|
|
14195
|
+
function ro_default() {
|
|
14196
|
+
return {
|
|
14197
|
+
localeError: error37()
|
|
13658
14198
|
};
|
|
13659
14199
|
}
|
|
13660
14200
|
|
|
@@ -13674,7 +14214,7 @@ function getRussianPlural(count, one, few, many) {
|
|
|
13674
14214
|
}
|
|
13675
14215
|
return many;
|
|
13676
14216
|
}
|
|
13677
|
-
var
|
|
14217
|
+
var error38 = () => {
|
|
13678
14218
|
const Sizable = {
|
|
13679
14219
|
string: {
|
|
13680
14220
|
unit: {
|
|
@@ -13811,12 +14351,12 @@ var error35 = () => {
|
|
|
13811
14351
|
};
|
|
13812
14352
|
function ru_default() {
|
|
13813
14353
|
return {
|
|
13814
|
-
localeError:
|
|
14354
|
+
localeError: error38()
|
|
13815
14355
|
};
|
|
13816
14356
|
}
|
|
13817
14357
|
|
|
13818
14358
|
// node_modules/zod/v4/locales/sl.js
|
|
13819
|
-
var
|
|
14359
|
+
var error39 = () => {
|
|
13820
14360
|
const Sizable = {
|
|
13821
14361
|
string: { unit: "znakov", verb: "imeti" },
|
|
13822
14362
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -13921,12 +14461,12 @@ var error36 = () => {
|
|
|
13921
14461
|
};
|
|
13922
14462
|
function sl_default() {
|
|
13923
14463
|
return {
|
|
13924
|
-
localeError:
|
|
14464
|
+
localeError: error39()
|
|
13925
14465
|
};
|
|
13926
14466
|
}
|
|
13927
14467
|
|
|
13928
14468
|
// node_modules/zod/v4/locales/sv.js
|
|
13929
|
-
var
|
|
14469
|
+
var error40 = () => {
|
|
13930
14470
|
const Sizable = {
|
|
13931
14471
|
string: { unit: "tecken", verb: "att ha" },
|
|
13932
14472
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -14032,12 +14572,12 @@ var error37 = () => {
|
|
|
14032
14572
|
};
|
|
14033
14573
|
function sv_default() {
|
|
14034
14574
|
return {
|
|
14035
|
-
localeError:
|
|
14575
|
+
localeError: error40()
|
|
14036
14576
|
};
|
|
14037
14577
|
}
|
|
14038
14578
|
|
|
14039
14579
|
// node_modules/zod/v4/locales/ta.js
|
|
14040
|
-
var
|
|
14580
|
+
var error41 = () => {
|
|
14041
14581
|
const Sizable = {
|
|
14042
14582
|
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" },
|
|
14043
14583
|
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" },
|
|
@@ -14143,12 +14683,12 @@ var error38 = () => {
|
|
|
14143
14683
|
};
|
|
14144
14684
|
function ta_default() {
|
|
14145
14685
|
return {
|
|
14146
|
-
localeError:
|
|
14686
|
+
localeError: error41()
|
|
14147
14687
|
};
|
|
14148
14688
|
}
|
|
14149
14689
|
|
|
14150
14690
|
// node_modules/zod/v4/locales/th.js
|
|
14151
|
-
var
|
|
14691
|
+
var error42 = () => {
|
|
14152
14692
|
const Sizable = {
|
|
14153
14693
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
14154
14694
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -14254,12 +14794,12 @@ var error39 = () => {
|
|
|
14254
14794
|
};
|
|
14255
14795
|
function th_default() {
|
|
14256
14796
|
return {
|
|
14257
|
-
localeError:
|
|
14797
|
+
localeError: error42()
|
|
14258
14798
|
};
|
|
14259
14799
|
}
|
|
14260
14800
|
|
|
14261
14801
|
// node_modules/zod/v4/locales/tr.js
|
|
14262
|
-
var
|
|
14802
|
+
var error43 = () => {
|
|
14263
14803
|
const Sizable = {
|
|
14264
14804
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
14265
14805
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -14360,12 +14900,12 @@ var error40 = () => {
|
|
|
14360
14900
|
};
|
|
14361
14901
|
function tr_default() {
|
|
14362
14902
|
return {
|
|
14363
|
-
localeError:
|
|
14903
|
+
localeError: error43()
|
|
14364
14904
|
};
|
|
14365
14905
|
}
|
|
14366
14906
|
|
|
14367
14907
|
// node_modules/zod/v4/locales/uk.js
|
|
14368
|
-
var
|
|
14908
|
+
var error44 = () => {
|
|
14369
14909
|
const Sizable = {
|
|
14370
14910
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
14371
14911
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -14469,7 +15009,7 @@ var error41 = () => {
|
|
|
14469
15009
|
};
|
|
14470
15010
|
function uk_default() {
|
|
14471
15011
|
return {
|
|
14472
|
-
localeError:
|
|
15012
|
+
localeError: error44()
|
|
14473
15013
|
};
|
|
14474
15014
|
}
|
|
14475
15015
|
|
|
@@ -14479,7 +15019,7 @@ function ua_default() {
|
|
|
14479
15019
|
}
|
|
14480
15020
|
|
|
14481
15021
|
// node_modules/zod/v4/locales/ur.js
|
|
14482
|
-
var
|
|
15022
|
+
var error45 = () => {
|
|
14483
15023
|
const Sizable = {
|
|
14484
15024
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
14485
15025
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -14585,17 +15125,18 @@ var error42 = () => {
|
|
|
14585
15125
|
};
|
|
14586
15126
|
function ur_default() {
|
|
14587
15127
|
return {
|
|
14588
|
-
localeError:
|
|
15128
|
+
localeError: error45()
|
|
14589
15129
|
};
|
|
14590
15130
|
}
|
|
14591
15131
|
|
|
14592
15132
|
// node_modules/zod/v4/locales/uz.js
|
|
14593
|
-
var
|
|
15133
|
+
var error46 = () => {
|
|
14594
15134
|
const Sizable = {
|
|
14595
15135
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
14596
15136
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
14597
15137
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
14598
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
15138
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
15139
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
14599
15140
|
};
|
|
14600
15141
|
function getSizing(origin) {
|
|
14601
15142
|
return Sizable[origin] ?? null;
|
|
@@ -14695,12 +15236,12 @@ var error43 = () => {
|
|
|
14695
15236
|
};
|
|
14696
15237
|
function uz_default() {
|
|
14697
15238
|
return {
|
|
14698
|
-
localeError:
|
|
15239
|
+
localeError: error46()
|
|
14699
15240
|
};
|
|
14700
15241
|
}
|
|
14701
15242
|
|
|
14702
15243
|
// node_modules/zod/v4/locales/vi.js
|
|
14703
|
-
var
|
|
15244
|
+
var error47 = () => {
|
|
14704
15245
|
const Sizable = {
|
|
14705
15246
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
14706
15247
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -14804,12 +15345,12 @@ var error44 = () => {
|
|
|
14804
15345
|
};
|
|
14805
15346
|
function vi_default() {
|
|
14806
15347
|
return {
|
|
14807
|
-
localeError:
|
|
15348
|
+
localeError: error47()
|
|
14808
15349
|
};
|
|
14809
15350
|
}
|
|
14810
15351
|
|
|
14811
15352
|
// node_modules/zod/v4/locales/zh-CN.js
|
|
14812
|
-
var
|
|
15353
|
+
var error48 = () => {
|
|
14813
15354
|
const Sizable = {
|
|
14814
15355
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
14815
15356
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -14914,12 +15455,12 @@ var error45 = () => {
|
|
|
14914
15455
|
};
|
|
14915
15456
|
function zh_CN_default() {
|
|
14916
15457
|
return {
|
|
14917
|
-
localeError:
|
|
15458
|
+
localeError: error48()
|
|
14918
15459
|
};
|
|
14919
15460
|
}
|
|
14920
15461
|
|
|
14921
15462
|
// node_modules/zod/v4/locales/zh-TW.js
|
|
14922
|
-
var
|
|
15463
|
+
var error49 = () => {
|
|
14923
15464
|
const Sizable = {
|
|
14924
15465
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
14925
15466
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -15022,12 +15563,12 @@ var error46 = () => {
|
|
|
15022
15563
|
};
|
|
15023
15564
|
function zh_TW_default() {
|
|
15024
15565
|
return {
|
|
15025
|
-
localeError:
|
|
15566
|
+
localeError: error49()
|
|
15026
15567
|
};
|
|
15027
15568
|
}
|
|
15028
15569
|
|
|
15029
15570
|
// node_modules/zod/v4/locales/yo.js
|
|
15030
|
-
var
|
|
15571
|
+
var error50 = () => {
|
|
15031
15572
|
const Sizable = {
|
|
15032
15573
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
15033
15574
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -15130,12 +15671,12 @@ var error47 = () => {
|
|
|
15130
15671
|
};
|
|
15131
15672
|
function yo_default() {
|
|
15132
15673
|
return {
|
|
15133
|
-
localeError:
|
|
15674
|
+
localeError: error50()
|
|
15134
15675
|
};
|
|
15135
15676
|
}
|
|
15136
15677
|
|
|
15137
15678
|
// node_modules/zod/v4/core/registries.js
|
|
15138
|
-
var
|
|
15679
|
+
var _a2;
|
|
15139
15680
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
15140
15681
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
15141
15682
|
var $ZodRegistry = class {
|
|
@@ -15181,7 +15722,7 @@ var $ZodRegistry = class {
|
|
|
15181
15722
|
function registry() {
|
|
15182
15723
|
return new $ZodRegistry();
|
|
15183
15724
|
}
|
|
15184
|
-
(
|
|
15725
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
15185
15726
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
15186
15727
|
|
|
15187
15728
|
// node_modules/zod/v4/core/api.js
|
|
@@ -16099,7 +16640,7 @@ function _refine(Class2, fn, _params) {
|
|
|
16099
16640
|
return schema;
|
|
16100
16641
|
}
|
|
16101
16642
|
// @__NO_SIDE_EFFECTS__
|
|
16102
|
-
function _superRefine(fn) {
|
|
16643
|
+
function _superRefine(fn, params) {
|
|
16103
16644
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
16104
16645
|
payload.addIssue = (issue2) => {
|
|
16105
16646
|
if (typeof issue2 === "string") {
|
|
@@ -16116,7 +16657,7 @@ function _superRefine(fn) {
|
|
|
16116
16657
|
}
|
|
16117
16658
|
};
|
|
16118
16659
|
return fn(payload.value, payload);
|
|
16119
|
-
});
|
|
16660
|
+
}, params);
|
|
16120
16661
|
return ch;
|
|
16121
16662
|
}
|
|
16122
16663
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -16246,7 +16787,7 @@ function initializeContext(params) {
|
|
|
16246
16787
|
};
|
|
16247
16788
|
}
|
|
16248
16789
|
function process3(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
16249
|
-
var
|
|
16790
|
+
var _a3;
|
|
16250
16791
|
const def = schema._zod.def;
|
|
16251
16792
|
const seen = ctx.seen.get(schema);
|
|
16252
16793
|
if (seen) {
|
|
@@ -16293,8 +16834,8 @@ function process3(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
16293
16834
|
delete result.schema.examples;
|
|
16294
16835
|
delete result.schema.default;
|
|
16295
16836
|
}
|
|
16296
|
-
if (ctx.io === "input" && result.schema
|
|
16297
|
-
(
|
|
16837
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
16838
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
16298
16839
|
delete result.schema._prefault;
|
|
16299
16840
|
const _result = ctx.seen.get(schema);
|
|
16300
16841
|
return _result.schema;
|
|
@@ -16475,10 +17016,15 @@ function finalize(ctx, schema) {
|
|
|
16475
17016
|
result.$id = ctx.external.uri(id);
|
|
16476
17017
|
}
|
|
16477
17018
|
Object.assign(result, root.def ?? root.schema);
|
|
17019
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
17020
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
17021
|
+
delete result.id;
|
|
16478
17022
|
const defs = ctx.external?.defs ?? {};
|
|
16479
17023
|
for (const entry of ctx.seen.entries()) {
|
|
16480
17024
|
const seen = entry[1];
|
|
16481
17025
|
if (seen.def && seen.defId) {
|
|
17026
|
+
if (seen.def.id === seen.defId)
|
|
17027
|
+
delete seen.def.id;
|
|
16482
17028
|
defs[seen.defId] = seen.def;
|
|
16483
17029
|
}
|
|
16484
17030
|
}
|
|
@@ -16534,6 +17080,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
16534
17080
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
16535
17081
|
}
|
|
16536
17082
|
if (def.type === "pipe") {
|
|
17083
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
17084
|
+
return true;
|
|
16537
17085
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
16538
17086
|
}
|
|
16539
17087
|
if (def.type === "object") {
|
|
@@ -16623,39 +17171,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
16623
17171
|
json2.type = "integer";
|
|
16624
17172
|
else
|
|
16625
17173
|
json2.type = "number";
|
|
16626
|
-
|
|
16627
|
-
|
|
17174
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
17175
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
17176
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
17177
|
+
if (exMin) {
|
|
17178
|
+
if (legacy) {
|
|
16628
17179
|
json2.minimum = exclusiveMinimum;
|
|
16629
17180
|
json2.exclusiveMinimum = true;
|
|
16630
17181
|
} else {
|
|
16631
17182
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
16632
17183
|
}
|
|
16633
|
-
}
|
|
16634
|
-
if (typeof minimum === "number") {
|
|
17184
|
+
} else if (typeof minimum === "number") {
|
|
16635
17185
|
json2.minimum = minimum;
|
|
16636
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
16637
|
-
if (exclusiveMinimum >= minimum)
|
|
16638
|
-
delete json2.minimum;
|
|
16639
|
-
else
|
|
16640
|
-
delete json2.exclusiveMinimum;
|
|
16641
|
-
}
|
|
16642
17186
|
}
|
|
16643
|
-
if (
|
|
16644
|
-
if (
|
|
17187
|
+
if (exMax) {
|
|
17188
|
+
if (legacy) {
|
|
16645
17189
|
json2.maximum = exclusiveMaximum;
|
|
16646
17190
|
json2.exclusiveMaximum = true;
|
|
16647
17191
|
} else {
|
|
16648
17192
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
16649
17193
|
}
|
|
16650
|
-
}
|
|
16651
|
-
if (typeof maximum === "number") {
|
|
17194
|
+
} else if (typeof maximum === "number") {
|
|
16652
17195
|
json2.maximum = maximum;
|
|
16653
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
16654
|
-
if (exclusiveMaximum <= maximum)
|
|
16655
|
-
delete json2.maximum;
|
|
16656
|
-
else
|
|
16657
|
-
delete json2.exclusiveMaximum;
|
|
16658
|
-
}
|
|
16659
17196
|
}
|
|
16660
17197
|
if (typeof multipleOf === "number")
|
|
16661
17198
|
json2.multipleOf = multipleOf;
|
|
@@ -16827,7 +17364,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
16827
17364
|
if (typeof maximum === "number")
|
|
16828
17365
|
json2.maxItems = maximum;
|
|
16829
17366
|
json2.type = "array";
|
|
16830
|
-
json2.items = process3(def.element, ctx, {
|
|
17367
|
+
json2.items = process3(def.element, ctx, {
|
|
17368
|
+
...params,
|
|
17369
|
+
path: [...params.path, "items"]
|
|
17370
|
+
});
|
|
16831
17371
|
};
|
|
16832
17372
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
16833
17373
|
const json2 = _json;
|
|
@@ -17020,7 +17560,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
|
|
|
17020
17560
|
};
|
|
17021
17561
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
17022
17562
|
const def = schema._zod.def;
|
|
17023
|
-
const
|
|
17563
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
17564
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
17024
17565
|
process3(innerType, ctx, params);
|
|
17025
17566
|
const seen = ctx.seen.get(schema);
|
|
17026
17567
|
seen.ref = innerType;
|
|
@@ -17254,6 +17795,7 @@ __export(schemas_exports2, {
|
|
|
17254
17795
|
ZodOptional: () => ZodOptional,
|
|
17255
17796
|
ZodPipe: () => ZodPipe,
|
|
17256
17797
|
ZodPrefault: () => ZodPrefault,
|
|
17798
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
17257
17799
|
ZodPromise: () => ZodPromise,
|
|
17258
17800
|
ZodReadonly: () => ZodReadonly,
|
|
17259
17801
|
ZodRecord: () => ZodRecord,
|
|
@@ -17314,6 +17856,7 @@ __export(schemas_exports2, {
|
|
|
17314
17856
|
int32: () => int32,
|
|
17315
17857
|
int64: () => int64,
|
|
17316
17858
|
intersection: () => intersection,
|
|
17859
|
+
invertCodec: () => invertCodec,
|
|
17317
17860
|
ipv4: () => ipv42,
|
|
17318
17861
|
ipv6: () => ipv62,
|
|
17319
17862
|
json: () => json,
|
|
@@ -17483,8 +18026,8 @@ var initializer2 = (inst, issues) => {
|
|
|
17483
18026
|
}
|
|
17484
18027
|
});
|
|
17485
18028
|
};
|
|
17486
|
-
var ZodError = $constructor("ZodError", initializer2);
|
|
17487
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
18029
|
+
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
18030
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
17488
18031
|
Parent: Error
|
|
17489
18032
|
});
|
|
17490
18033
|
|
|
@@ -17503,6 +18046,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
|
17503
18046
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
17504
18047
|
|
|
17505
18048
|
// node_modules/zod/v4/classic/schemas.js
|
|
18049
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
18050
|
+
function _installLazyMethods(inst, group, methods) {
|
|
18051
|
+
const proto = Object.getPrototypeOf(inst);
|
|
18052
|
+
let installed = _installedGroups.get(proto);
|
|
18053
|
+
if (!installed) {
|
|
18054
|
+
installed = /* @__PURE__ */ new Set();
|
|
18055
|
+
_installedGroups.set(proto, installed);
|
|
18056
|
+
}
|
|
18057
|
+
if (installed.has(group))
|
|
18058
|
+
return;
|
|
18059
|
+
installed.add(group);
|
|
18060
|
+
for (const key in methods) {
|
|
18061
|
+
const fn = methods[key];
|
|
18062
|
+
Object.defineProperty(proto, key, {
|
|
18063
|
+
configurable: true,
|
|
18064
|
+
enumerable: false,
|
|
18065
|
+
get() {
|
|
18066
|
+
const bound = fn.bind(this);
|
|
18067
|
+
Object.defineProperty(this, key, {
|
|
18068
|
+
configurable: true,
|
|
18069
|
+
writable: true,
|
|
18070
|
+
enumerable: true,
|
|
18071
|
+
value: bound
|
|
18072
|
+
});
|
|
18073
|
+
return bound;
|
|
18074
|
+
},
|
|
18075
|
+
set(v) {
|
|
18076
|
+
Object.defineProperty(this, key, {
|
|
18077
|
+
configurable: true,
|
|
18078
|
+
writable: true,
|
|
18079
|
+
enumerable: true,
|
|
18080
|
+
value: v
|
|
18081
|
+
});
|
|
18082
|
+
}
|
|
18083
|
+
});
|
|
18084
|
+
}
|
|
18085
|
+
}
|
|
17506
18086
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
17507
18087
|
$ZodType.init(inst, def);
|
|
17508
18088
|
Object.assign(inst["~standard"], {
|
|
@@ -17515,23 +18095,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
17515
18095
|
inst.def = def;
|
|
17516
18096
|
inst.type = def.type;
|
|
17517
18097
|
Object.defineProperty(inst, "_def", { value: def });
|
|
17518
|
-
inst.check = (...checks) => {
|
|
17519
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
17520
|
-
checks: [
|
|
17521
|
-
...def.checks ?? [],
|
|
17522
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
17523
|
-
]
|
|
17524
|
-
}), {
|
|
17525
|
-
parent: true
|
|
17526
|
-
});
|
|
17527
|
-
};
|
|
17528
|
-
inst.with = inst.check;
|
|
17529
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
17530
|
-
inst.brand = () => inst;
|
|
17531
|
-
inst.register = ((reg, meta3) => {
|
|
17532
|
-
reg.add(inst, meta3);
|
|
17533
|
-
return inst;
|
|
17534
|
-
});
|
|
17535
18098
|
inst.parse = (data, params) => parse3(inst, data, params, { callee: inst.parse });
|
|
17536
18099
|
inst.safeParse = (data, params) => safeParse3(inst, data, params);
|
|
17537
18100
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -17545,45 +18108,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
17545
18108
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
17546
18109
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
17547
18110
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
17548
|
-
inst
|
|
17549
|
-
|
|
17550
|
-
|
|
17551
|
-
|
|
17552
|
-
|
|
17553
|
-
|
|
17554
|
-
|
|
17555
|
-
|
|
17556
|
-
|
|
17557
|
-
|
|
17558
|
-
|
|
17559
|
-
|
|
17560
|
-
|
|
17561
|
-
|
|
17562
|
-
|
|
17563
|
-
|
|
17564
|
-
|
|
17565
|
-
|
|
17566
|
-
|
|
17567
|
-
|
|
17568
|
-
|
|
17569
|
-
|
|
18111
|
+
_installLazyMethods(inst, "ZodType", {
|
|
18112
|
+
check(...chks) {
|
|
18113
|
+
const def2 = this.def;
|
|
18114
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
18115
|
+
checks: [
|
|
18116
|
+
...def2.checks ?? [],
|
|
18117
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
18118
|
+
]
|
|
18119
|
+
}), { parent: true });
|
|
18120
|
+
},
|
|
18121
|
+
with(...chks) {
|
|
18122
|
+
return this.check(...chks);
|
|
18123
|
+
},
|
|
18124
|
+
clone(def2, params) {
|
|
18125
|
+
return clone(this, def2, params);
|
|
18126
|
+
},
|
|
18127
|
+
brand() {
|
|
18128
|
+
return this;
|
|
18129
|
+
},
|
|
18130
|
+
register(reg, meta3) {
|
|
18131
|
+
reg.add(this, meta3);
|
|
18132
|
+
return this;
|
|
18133
|
+
},
|
|
18134
|
+
refine(check3, params) {
|
|
18135
|
+
return this.check(refine(check3, params));
|
|
18136
|
+
},
|
|
18137
|
+
superRefine(refinement, params) {
|
|
18138
|
+
return this.check(superRefine(refinement, params));
|
|
18139
|
+
},
|
|
18140
|
+
overwrite(fn) {
|
|
18141
|
+
return this.check(_overwrite(fn));
|
|
18142
|
+
},
|
|
18143
|
+
optional() {
|
|
18144
|
+
return optional2(this);
|
|
18145
|
+
},
|
|
18146
|
+
exactOptional() {
|
|
18147
|
+
return exactOptional(this);
|
|
18148
|
+
},
|
|
18149
|
+
nullable() {
|
|
18150
|
+
return nullable(this);
|
|
18151
|
+
},
|
|
18152
|
+
nullish() {
|
|
18153
|
+
return optional2(nullable(this));
|
|
18154
|
+
},
|
|
18155
|
+
nonoptional(params) {
|
|
18156
|
+
return nonoptional(this, params);
|
|
18157
|
+
},
|
|
18158
|
+
array() {
|
|
18159
|
+
return array2(this);
|
|
18160
|
+
},
|
|
18161
|
+
or(arg) {
|
|
18162
|
+
return union2([this, arg]);
|
|
18163
|
+
},
|
|
18164
|
+
and(arg) {
|
|
18165
|
+
return intersection(this, arg);
|
|
18166
|
+
},
|
|
18167
|
+
transform(tx) {
|
|
18168
|
+
return pipe2(this, transform(tx));
|
|
18169
|
+
},
|
|
18170
|
+
default(d) {
|
|
18171
|
+
return _default2(this, d);
|
|
18172
|
+
},
|
|
18173
|
+
prefault(d) {
|
|
18174
|
+
return prefault(this, d);
|
|
18175
|
+
},
|
|
18176
|
+
catch(params) {
|
|
18177
|
+
return _catch2(this, params);
|
|
18178
|
+
},
|
|
18179
|
+
pipe(target) {
|
|
18180
|
+
return pipe2(this, target);
|
|
18181
|
+
},
|
|
18182
|
+
readonly() {
|
|
18183
|
+
return readonly(this);
|
|
18184
|
+
},
|
|
18185
|
+
describe(description) {
|
|
18186
|
+
const cl = this.clone();
|
|
18187
|
+
globalRegistry.add(cl, { description });
|
|
18188
|
+
return cl;
|
|
18189
|
+
},
|
|
18190
|
+
meta(...args) {
|
|
18191
|
+
if (args.length === 0)
|
|
18192
|
+
return globalRegistry.get(this);
|
|
18193
|
+
const cl = this.clone();
|
|
18194
|
+
globalRegistry.add(cl, args[0]);
|
|
18195
|
+
return cl;
|
|
18196
|
+
},
|
|
18197
|
+
isOptional() {
|
|
18198
|
+
return this.safeParse(void 0).success;
|
|
18199
|
+
},
|
|
18200
|
+
isNullable() {
|
|
18201
|
+
return this.safeParse(null).success;
|
|
18202
|
+
},
|
|
18203
|
+
apply(fn) {
|
|
18204
|
+
return fn(this);
|
|
18205
|
+
}
|
|
18206
|
+
});
|
|
17570
18207
|
Object.defineProperty(inst, "description", {
|
|
17571
18208
|
get() {
|
|
17572
18209
|
return globalRegistry.get(inst)?.description;
|
|
17573
18210
|
},
|
|
17574
18211
|
configurable: true
|
|
17575
18212
|
});
|
|
17576
|
-
inst.meta = (...args) => {
|
|
17577
|
-
if (args.length === 0) {
|
|
17578
|
-
return globalRegistry.get(inst);
|
|
17579
|
-
}
|
|
17580
|
-
const cl = inst.clone();
|
|
17581
|
-
globalRegistry.add(cl, args[0]);
|
|
17582
|
-
return cl;
|
|
17583
|
-
};
|
|
17584
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
17585
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
17586
|
-
inst.apply = (fn) => fn(inst);
|
|
17587
18213
|
return inst;
|
|
17588
18214
|
});
|
|
17589
18215
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -17594,21 +18220,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
17594
18220
|
inst.format = bag.format ?? null;
|
|
17595
18221
|
inst.minLength = bag.minimum ?? null;
|
|
17596
18222
|
inst.maxLength = bag.maximum ?? null;
|
|
17597
|
-
inst
|
|
17598
|
-
|
|
17599
|
-
|
|
17600
|
-
|
|
17601
|
-
|
|
17602
|
-
|
|
17603
|
-
|
|
17604
|
-
|
|
17605
|
-
|
|
17606
|
-
|
|
17607
|
-
|
|
17608
|
-
|
|
17609
|
-
|
|
17610
|
-
|
|
17611
|
-
|
|
18223
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
18224
|
+
regex(...args) {
|
|
18225
|
+
return this.check(_regex(...args));
|
|
18226
|
+
},
|
|
18227
|
+
includes(...args) {
|
|
18228
|
+
return this.check(_includes(...args));
|
|
18229
|
+
},
|
|
18230
|
+
startsWith(...args) {
|
|
18231
|
+
return this.check(_startsWith(...args));
|
|
18232
|
+
},
|
|
18233
|
+
endsWith(...args) {
|
|
18234
|
+
return this.check(_endsWith(...args));
|
|
18235
|
+
},
|
|
18236
|
+
min(...args) {
|
|
18237
|
+
return this.check(_minLength(...args));
|
|
18238
|
+
},
|
|
18239
|
+
max(...args) {
|
|
18240
|
+
return this.check(_maxLength(...args));
|
|
18241
|
+
},
|
|
18242
|
+
length(...args) {
|
|
18243
|
+
return this.check(_length(...args));
|
|
18244
|
+
},
|
|
18245
|
+
nonempty(...args) {
|
|
18246
|
+
return this.check(_minLength(1, ...args));
|
|
18247
|
+
},
|
|
18248
|
+
lowercase(params) {
|
|
18249
|
+
return this.check(_lowercase(params));
|
|
18250
|
+
},
|
|
18251
|
+
uppercase(params) {
|
|
18252
|
+
return this.check(_uppercase(params));
|
|
18253
|
+
},
|
|
18254
|
+
trim() {
|
|
18255
|
+
return this.check(_trim());
|
|
18256
|
+
},
|
|
18257
|
+
normalize(...args) {
|
|
18258
|
+
return this.check(_normalize(...args));
|
|
18259
|
+
},
|
|
18260
|
+
toLowerCase() {
|
|
18261
|
+
return this.check(_toLowerCase());
|
|
18262
|
+
},
|
|
18263
|
+
toUpperCase() {
|
|
18264
|
+
return this.check(_toUpperCase());
|
|
18265
|
+
},
|
|
18266
|
+
slugify() {
|
|
18267
|
+
return this.check(_slugify());
|
|
18268
|
+
}
|
|
18269
|
+
});
|
|
17612
18270
|
});
|
|
17613
18271
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
17614
18272
|
$ZodString.init(inst, def);
|
|
@@ -17687,7 +18345,7 @@ function url(params) {
|
|
|
17687
18345
|
}
|
|
17688
18346
|
function httpUrl(params) {
|
|
17689
18347
|
return _url(ZodURL, {
|
|
17690
|
-
protocol:
|
|
18348
|
+
protocol: regexes_exports.httpProtocol,
|
|
17691
18349
|
hostname: regexes_exports.domain,
|
|
17692
18350
|
...util_exports.normalizeParams(params)
|
|
17693
18351
|
});
|
|
@@ -17829,21 +18487,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
17829
18487
|
$ZodNumber.init(inst, def);
|
|
17830
18488
|
ZodType.init(inst, def);
|
|
17831
18489
|
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
17832
|
-
inst
|
|
17833
|
-
|
|
17834
|
-
|
|
17835
|
-
|
|
17836
|
-
|
|
17837
|
-
|
|
17838
|
-
|
|
17839
|
-
|
|
17840
|
-
|
|
17841
|
-
|
|
17842
|
-
|
|
17843
|
-
|
|
17844
|
-
|
|
17845
|
-
|
|
17846
|
-
|
|
18490
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
18491
|
+
gt(value, params) {
|
|
18492
|
+
return this.check(_gt(value, params));
|
|
18493
|
+
},
|
|
18494
|
+
gte(value, params) {
|
|
18495
|
+
return this.check(_gte(value, params));
|
|
18496
|
+
},
|
|
18497
|
+
min(value, params) {
|
|
18498
|
+
return this.check(_gte(value, params));
|
|
18499
|
+
},
|
|
18500
|
+
lt(value, params) {
|
|
18501
|
+
return this.check(_lt(value, params));
|
|
18502
|
+
},
|
|
18503
|
+
lte(value, params) {
|
|
18504
|
+
return this.check(_lte(value, params));
|
|
18505
|
+
},
|
|
18506
|
+
max(value, params) {
|
|
18507
|
+
return this.check(_lte(value, params));
|
|
18508
|
+
},
|
|
18509
|
+
int(params) {
|
|
18510
|
+
return this.check(int(params));
|
|
18511
|
+
},
|
|
18512
|
+
safe(params) {
|
|
18513
|
+
return this.check(int(params));
|
|
18514
|
+
},
|
|
18515
|
+
positive(params) {
|
|
18516
|
+
return this.check(_gt(0, params));
|
|
18517
|
+
},
|
|
18518
|
+
nonnegative(params) {
|
|
18519
|
+
return this.check(_gte(0, params));
|
|
18520
|
+
},
|
|
18521
|
+
negative(params) {
|
|
18522
|
+
return this.check(_lt(0, params));
|
|
18523
|
+
},
|
|
18524
|
+
nonpositive(params) {
|
|
18525
|
+
return this.check(_lte(0, params));
|
|
18526
|
+
},
|
|
18527
|
+
multipleOf(value, params) {
|
|
18528
|
+
return this.check(_multipleOf(value, params));
|
|
18529
|
+
},
|
|
18530
|
+
step(value, params) {
|
|
18531
|
+
return this.check(_multipleOf(value, params));
|
|
18532
|
+
},
|
|
18533
|
+
finite() {
|
|
18534
|
+
return this;
|
|
18535
|
+
}
|
|
18536
|
+
});
|
|
17847
18537
|
const bag = inst._zod.bag;
|
|
17848
18538
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
17849
18539
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -17990,11 +18680,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
17990
18680
|
ZodType.init(inst, def);
|
|
17991
18681
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
17992
18682
|
inst.element = def.element;
|
|
17993
|
-
inst
|
|
17994
|
-
|
|
17995
|
-
|
|
17996
|
-
|
|
17997
|
-
|
|
18683
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
18684
|
+
min(n, params) {
|
|
18685
|
+
return this.check(_minLength(n, params));
|
|
18686
|
+
},
|
|
18687
|
+
nonempty(params) {
|
|
18688
|
+
return this.check(_minLength(1, params));
|
|
18689
|
+
},
|
|
18690
|
+
max(n, params) {
|
|
18691
|
+
return this.check(_maxLength(n, params));
|
|
18692
|
+
},
|
|
18693
|
+
length(n, params) {
|
|
18694
|
+
return this.check(_length(n, params));
|
|
18695
|
+
},
|
|
18696
|
+
unwrap() {
|
|
18697
|
+
return this.element;
|
|
18698
|
+
}
|
|
18699
|
+
});
|
|
17998
18700
|
});
|
|
17999
18701
|
function array2(element, params) {
|
|
18000
18702
|
return _array(ZodArray, element, params);
|
|
@@ -18010,23 +18712,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
18010
18712
|
util_exports.defineLazy(inst, "shape", () => {
|
|
18011
18713
|
return def.shape;
|
|
18012
18714
|
});
|
|
18013
|
-
inst
|
|
18014
|
-
|
|
18015
|
-
|
|
18016
|
-
|
|
18017
|
-
|
|
18018
|
-
|
|
18019
|
-
|
|
18020
|
-
|
|
18021
|
-
|
|
18022
|
-
|
|
18023
|
-
|
|
18024
|
-
|
|
18025
|
-
|
|
18026
|
-
|
|
18027
|
-
|
|
18028
|
-
|
|
18029
|
-
|
|
18715
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
18716
|
+
keyof() {
|
|
18717
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
18718
|
+
},
|
|
18719
|
+
catchall(catchall) {
|
|
18720
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
18721
|
+
},
|
|
18722
|
+
passthrough() {
|
|
18723
|
+
return this.clone({ ...this._zod.def, catchall: unknown2() });
|
|
18724
|
+
},
|
|
18725
|
+
loose() {
|
|
18726
|
+
return this.clone({ ...this._zod.def, catchall: unknown2() });
|
|
18727
|
+
},
|
|
18728
|
+
strict() {
|
|
18729
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
18730
|
+
},
|
|
18731
|
+
strip() {
|
|
18732
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
18733
|
+
},
|
|
18734
|
+
extend(incoming) {
|
|
18735
|
+
return util_exports.extend(this, incoming);
|
|
18736
|
+
},
|
|
18737
|
+
safeExtend(incoming) {
|
|
18738
|
+
return util_exports.safeExtend(this, incoming);
|
|
18739
|
+
},
|
|
18740
|
+
merge(other) {
|
|
18741
|
+
return util_exports.merge(this, other);
|
|
18742
|
+
},
|
|
18743
|
+
pick(mask) {
|
|
18744
|
+
return util_exports.pick(this, mask);
|
|
18745
|
+
},
|
|
18746
|
+
omit(mask) {
|
|
18747
|
+
return util_exports.omit(this, mask);
|
|
18748
|
+
},
|
|
18749
|
+
partial(...args) {
|
|
18750
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
18751
|
+
},
|
|
18752
|
+
required(...args) {
|
|
18753
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
18754
|
+
}
|
|
18755
|
+
});
|
|
18030
18756
|
});
|
|
18031
18757
|
function object2(shape, params) {
|
|
18032
18758
|
const def = {
|
|
@@ -18131,6 +18857,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
|
18131
18857
|
inst.valueType = def.valueType;
|
|
18132
18858
|
});
|
|
18133
18859
|
function record2(keyType, valueType, params) {
|
|
18860
|
+
if (!valueType || !valueType._zod) {
|
|
18861
|
+
return new ZodRecord({
|
|
18862
|
+
type: "record",
|
|
18863
|
+
keyType: string3(),
|
|
18864
|
+
valueType: keyType,
|
|
18865
|
+
...util_exports.normalizeParams(valueType)
|
|
18866
|
+
});
|
|
18867
|
+
}
|
|
18134
18868
|
return new ZodRecord({
|
|
18135
18869
|
type: "record",
|
|
18136
18870
|
keyType,
|
|
@@ -18302,10 +19036,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
18302
19036
|
if (output instanceof Promise) {
|
|
18303
19037
|
return output.then((output2) => {
|
|
18304
19038
|
payload.value = output2;
|
|
19039
|
+
payload.fallback = true;
|
|
18305
19040
|
return payload;
|
|
18306
19041
|
});
|
|
18307
19042
|
}
|
|
18308
19043
|
payload.value = output;
|
|
19044
|
+
payload.fallback = true;
|
|
18309
19045
|
return payload;
|
|
18310
19046
|
};
|
|
18311
19047
|
});
|
|
@@ -18460,6 +19196,20 @@ function codec(in_, out, params) {
|
|
|
18460
19196
|
reverseTransform: params.encode
|
|
18461
19197
|
});
|
|
18462
19198
|
}
|
|
19199
|
+
function invertCodec(codec2) {
|
|
19200
|
+
const def = codec2._zod.def;
|
|
19201
|
+
return new ZodCodec({
|
|
19202
|
+
type: "pipe",
|
|
19203
|
+
in: def.out,
|
|
19204
|
+
out: def.in,
|
|
19205
|
+
transform: def.reverseTransform,
|
|
19206
|
+
reverseTransform: def.transform
|
|
19207
|
+
});
|
|
19208
|
+
}
|
|
19209
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
19210
|
+
ZodPipe.init(inst, def);
|
|
19211
|
+
$ZodPreprocess.init(inst, def);
|
|
19212
|
+
});
|
|
18463
19213
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
18464
19214
|
$ZodReadonly.init(inst, def);
|
|
18465
19215
|
ZodType.init(inst, def);
|
|
@@ -18539,8 +19289,8 @@ function custom(fn, _params) {
|
|
|
18539
19289
|
function refine(fn, _params = {}) {
|
|
18540
19290
|
return _refine(ZodCustom, fn, _params);
|
|
18541
19291
|
}
|
|
18542
|
-
function superRefine(fn) {
|
|
18543
|
-
return _superRefine(fn);
|
|
19292
|
+
function superRefine(fn, params) {
|
|
19293
|
+
return _superRefine(fn, params);
|
|
18544
19294
|
}
|
|
18545
19295
|
var describe2 = describe;
|
|
18546
19296
|
var meta2 = meta;
|
|
@@ -18578,7 +19328,11 @@ function json(params) {
|
|
|
18578
19328
|
return jsonSchema;
|
|
18579
19329
|
}
|
|
18580
19330
|
function preprocess(fn, schema) {
|
|
18581
|
-
return
|
|
19331
|
+
return new ZodPreprocess({
|
|
19332
|
+
type: "pipe",
|
|
19333
|
+
in: transform(fn),
|
|
19334
|
+
out: schema
|
|
19335
|
+
});
|
|
18582
19336
|
}
|
|
18583
19337
|
|
|
18584
19338
|
// node_modules/zod/v4/classic/compat.js
|
|
@@ -18999,12 +19753,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
18999
19753
|
default:
|
|
19000
19754
|
throw new Error(`Unsupported type: ${type}`);
|
|
19001
19755
|
}
|
|
19002
|
-
if (schema.description) {
|
|
19003
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
19004
|
-
}
|
|
19005
|
-
if (schema.default !== void 0) {
|
|
19006
|
-
zodSchema = zodSchema.default(schema.default);
|
|
19007
|
-
}
|
|
19008
19756
|
return zodSchema;
|
|
19009
19757
|
}
|
|
19010
19758
|
function convertSchema(schema, ctx) {
|
|
@@ -19041,6 +19789,9 @@ function convertSchema(schema, ctx) {
|
|
|
19041
19789
|
if (schema.readOnly === true) {
|
|
19042
19790
|
baseSchema = z.readonly(baseSchema);
|
|
19043
19791
|
}
|
|
19792
|
+
if (schema.default !== void 0) {
|
|
19793
|
+
baseSchema = baseSchema.default(schema.default);
|
|
19794
|
+
}
|
|
19044
19795
|
const extraMeta = {};
|
|
19045
19796
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
19046
19797
|
for (const key of coreMetadataKeys) {
|
|
@@ -19062,23 +19813,32 @@ function convertSchema(schema, ctx) {
|
|
|
19062
19813
|
if (Object.keys(extraMeta).length > 0) {
|
|
19063
19814
|
ctx.registry.add(baseSchema, extraMeta);
|
|
19064
19815
|
}
|
|
19816
|
+
if (schema.description) {
|
|
19817
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
19818
|
+
}
|
|
19065
19819
|
return baseSchema;
|
|
19066
19820
|
}
|
|
19067
19821
|
function fromJSONSchema(schema, params) {
|
|
19068
19822
|
if (typeof schema === "boolean") {
|
|
19069
19823
|
return schema ? z.any() : z.never();
|
|
19070
19824
|
}
|
|
19071
|
-
|
|
19072
|
-
|
|
19825
|
+
let normalized;
|
|
19826
|
+
try {
|
|
19827
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
19828
|
+
} catch {
|
|
19829
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
19830
|
+
}
|
|
19831
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
19832
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
19073
19833
|
const ctx = {
|
|
19074
19834
|
version: version2,
|
|
19075
19835
|
defs,
|
|
19076
19836
|
refs: /* @__PURE__ */ new Map(),
|
|
19077
19837
|
processing: /* @__PURE__ */ new Set(),
|
|
19078
|
-
rootSchema:
|
|
19838
|
+
rootSchema: normalized,
|
|
19079
19839
|
registry: params?.registry ?? globalRegistry
|
|
19080
19840
|
};
|
|
19081
|
-
return convertSchema(
|
|
19841
|
+
return convertSchema(normalized, ctx);
|
|
19082
19842
|
}
|
|
19083
19843
|
|
|
19084
19844
|
// node_modules/zod/v4/classic/coerce.js
|
|
@@ -19372,8 +20132,8 @@ function generateMcpTools(config2) {
|
|
|
19372
20132
|
const tool = generateMcpTool({ method, path: `${defaultServerUrl}${path2}`, operation }, config2);
|
|
19373
20133
|
info(`Generated tool: ${tool.name} for ${method} ${path2}`);
|
|
19374
20134
|
tools.push(tool);
|
|
19375
|
-
} catch (
|
|
19376
|
-
err(`Failed to generate tool for ${method} ${path2}:`,
|
|
20135
|
+
} catch (error51) {
|
|
20136
|
+
err(`Failed to generate tool for ${method} ${path2}:`, error51);
|
|
19377
20137
|
}
|
|
19378
20138
|
}
|
|
19379
20139
|
}
|
|
@@ -19408,8 +20168,8 @@ function generateMcpTool(description, config2) {
|
|
|
19408
20168
|
},
|
|
19409
20169
|
body: "data" in params ? JSON.stringify(params.data, null, 2) : void 0
|
|
19410
20170
|
});
|
|
19411
|
-
} catch (
|
|
19412
|
-
err(`Failed to fetch ${url2}. Are you sure that the server is running?`,
|
|
20171
|
+
} catch (error51) {
|
|
20172
|
+
err(`Failed to fetch ${url2}. Are you sure that the server is running?`, error51);
|
|
19413
20173
|
return {
|
|
19414
20174
|
content: [
|
|
19415
20175
|
{
|
|
@@ -19439,8 +20199,8 @@ function generateMcpTool(description, config2) {
|
|
|
19439
20199
|
const text = await response.text();
|
|
19440
20200
|
return { content: [{ type: "text", text }] };
|
|
19441
20201
|
}
|
|
19442
|
-
} catch (
|
|
19443
|
-
return { content: [{ type: "text", text: String(
|
|
20202
|
+
} catch (error51) {
|
|
20203
|
+
return { content: [{ type: "text", text: String(error51) }], isError: true };
|
|
19444
20204
|
}
|
|
19445
20205
|
}
|
|
19446
20206
|
const inputSchema = {};
|
|
@@ -19520,8 +20280,8 @@ function read() {
|
|
|
19520
20280
|
try {
|
|
19521
20281
|
const data = readFileSync(STORAGE_PATH, { encoding: "utf8" });
|
|
19522
20282
|
return JSON.parse(data);
|
|
19523
|
-
} catch (
|
|
19524
|
-
err("Failed to read storage from file", STORAGE_PATH,
|
|
20283
|
+
} catch (error51) {
|
|
20284
|
+
err("Failed to read storage from file", STORAGE_PATH, error51);
|
|
19525
20285
|
return {};
|
|
19526
20286
|
}
|
|
19527
20287
|
}
|
|
@@ -19530,8 +20290,8 @@ function read() {
|
|
|
19530
20290
|
function write(newStorage) {
|
|
19531
20291
|
try {
|
|
19532
20292
|
writeFile(STORAGE_PATH, JSON.stringify(newStorage, null, 2));
|
|
19533
|
-
} catch (
|
|
19534
|
-
err(`Failed to write storage to file: ${STORAGE_PATH}`,
|
|
20293
|
+
} catch (error51) {
|
|
20294
|
+
err(`Failed to write storage to file: ${STORAGE_PATH}`, error51);
|
|
19535
20295
|
}
|
|
19536
20296
|
}
|
|
19537
20297
|
|
|
@@ -19559,8 +20319,8 @@ async function fetchOpenApiSpec(url2, secret) {
|
|
|
19559
20319
|
headers["Authorization"] = `Bearer ${secret}`;
|
|
19560
20320
|
}
|
|
19561
20321
|
response = await fetch(url2, { headers });
|
|
19562
|
-
} catch (
|
|
19563
|
-
err(`Failed to fetch OpenAPI spec from ${url2}. Are you sure that the server is running?`,
|
|
20322
|
+
} catch (error51) {
|
|
20323
|
+
err(`Failed to fetch OpenAPI spec from ${url2}. Are you sure that the server is running?`, error51);
|
|
19564
20324
|
return;
|
|
19565
20325
|
}
|
|
19566
20326
|
if (!response.ok) {
|