ccstatusline 2.2.16 → 2.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/ccstatusline.js +1474 -501
- package/package.json +1 -1
package/dist/ccstatusline.js
CHANGED
|
@@ -38337,10 +38337,10 @@ function $constructor(name, initializer, params) {
|
|
|
38337
38337
|
}
|
|
38338
38338
|
Object.defineProperty(Definition, "name", { value: name });
|
|
38339
38339
|
function _(def) {
|
|
38340
|
-
var
|
|
38340
|
+
var _a2;
|
|
38341
38341
|
const inst = params?.Parent ? new Definition : this;
|
|
38342
38342
|
init(inst, def);
|
|
38343
|
-
(
|
|
38343
|
+
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
38344
38344
|
for (const fn of inst._zod.deferred) {
|
|
38345
38345
|
fn();
|
|
38346
38346
|
}
|
|
@@ -38362,9 +38362,9 @@ function config(newConfig) {
|
|
|
38362
38362
|
Object.assign(globalConfig, newConfig);
|
|
38363
38363
|
return globalConfig;
|
|
38364
38364
|
}
|
|
38365
|
-
var NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig;
|
|
38365
|
+
var _a, NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig;
|
|
38366
38366
|
var init_core = __esm(() => {
|
|
38367
|
-
NEVER = Object.freeze({
|
|
38367
|
+
NEVER = /* @__PURE__ */ Object.freeze({
|
|
38368
38368
|
status: "aborted"
|
|
38369
38369
|
});
|
|
38370
38370
|
$brand = Symbol("zod_brand");
|
|
@@ -38379,7 +38379,8 @@ var init_core = __esm(() => {
|
|
|
38379
38379
|
this.name = "ZodEncodeError";
|
|
38380
38380
|
}
|
|
38381
38381
|
};
|
|
38382
|
-
|
|
38382
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
38383
|
+
globalConfig = globalThis.__zod_globalConfig;
|
|
38383
38384
|
});
|
|
38384
38385
|
|
|
38385
38386
|
// node_modules/zod/v4/core/util.js
|
|
@@ -38424,6 +38425,7 @@ __export(exports_util, {
|
|
|
38424
38425
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
38425
38426
|
finalizeIssue: () => finalizeIssue,
|
|
38426
38427
|
extend: () => extend,
|
|
38428
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
38427
38429
|
escapeRegex: () => escapeRegex,
|
|
38428
38430
|
esc: () => esc,
|
|
38429
38431
|
defineLazy: () => defineLazy,
|
|
@@ -38494,19 +38496,12 @@ function cleanRegex(source) {
|
|
|
38494
38496
|
return source.slice(start, end);
|
|
38495
38497
|
}
|
|
38496
38498
|
function floatSafeRemainder(val, step) {
|
|
38497
|
-
const
|
|
38498
|
-
const
|
|
38499
|
-
|
|
38500
|
-
if (
|
|
38501
|
-
|
|
38502
|
-
|
|
38503
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
38504
|
-
}
|
|
38505
|
-
}
|
|
38506
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
38507
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
38508
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
38509
|
-
return valInt % stepInt / 10 ** decCount;
|
|
38499
|
+
const ratio = val / step;
|
|
38500
|
+
const roundedRatio = Math.round(ratio);
|
|
38501
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
38502
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
38503
|
+
return 0;
|
|
38504
|
+
return ratio - roundedRatio;
|
|
38510
38505
|
}
|
|
38511
38506
|
function defineLazy(object, key, getter) {
|
|
38512
38507
|
let value = undefined;
|
|
@@ -38605,6 +38600,10 @@ function shallowClone(o) {
|
|
|
38605
38600
|
return { ...o };
|
|
38606
38601
|
if (Array.isArray(o))
|
|
38607
38602
|
return [...o];
|
|
38603
|
+
if (o instanceof Map)
|
|
38604
|
+
return new Map(o);
|
|
38605
|
+
if (o instanceof Set)
|
|
38606
|
+
return new Set(o);
|
|
38608
38607
|
return o;
|
|
38609
38608
|
}
|
|
38610
38609
|
function numKeys(data) {
|
|
@@ -38773,6 +38772,9 @@ function safeExtend(schema, shape) {
|
|
|
38773
38772
|
return clone2(schema, def);
|
|
38774
38773
|
}
|
|
38775
38774
|
function merge2(a, b) {
|
|
38775
|
+
if (a._zod.def.checks?.length) {
|
|
38776
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
38777
|
+
}
|
|
38776
38778
|
const def = mergeDefs(a._zod.def, {
|
|
38777
38779
|
get shape() {
|
|
38778
38780
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -38782,7 +38784,7 @@ function merge2(a, b) {
|
|
|
38782
38784
|
get catchall() {
|
|
38783
38785
|
return b._zod.def.catchall;
|
|
38784
38786
|
},
|
|
38785
|
-
checks: []
|
|
38787
|
+
checks: b._zod.def.checks ?? []
|
|
38786
38788
|
});
|
|
38787
38789
|
return clone2(a, def);
|
|
38788
38790
|
}
|
|
@@ -38865,10 +38867,20 @@ function aborted(x, startIndex = 0) {
|
|
|
38865
38867
|
}
|
|
38866
38868
|
return false;
|
|
38867
38869
|
}
|
|
38870
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
38871
|
+
if (x.aborted === true)
|
|
38872
|
+
return true;
|
|
38873
|
+
for (let i = startIndex;i < x.issues.length; i++) {
|
|
38874
|
+
if (x.issues[i]?.continue === false) {
|
|
38875
|
+
return true;
|
|
38876
|
+
}
|
|
38877
|
+
}
|
|
38878
|
+
return false;
|
|
38879
|
+
}
|
|
38868
38880
|
function prefixIssues(path, issues) {
|
|
38869
38881
|
return issues.map((iss) => {
|
|
38870
|
-
var
|
|
38871
|
-
(
|
|
38882
|
+
var _a2;
|
|
38883
|
+
(_a2 = iss).path ?? (_a2.path = []);
|
|
38872
38884
|
iss.path.unshift(path);
|
|
38873
38885
|
return iss;
|
|
38874
38886
|
});
|
|
@@ -38877,17 +38889,14 @@ function unwrapMessage(message) {
|
|
|
38877
38889
|
return typeof message === "string" ? message : message?.message;
|
|
38878
38890
|
}
|
|
38879
38891
|
function finalizeIssue(iss, ctx, config2) {
|
|
38880
|
-
const
|
|
38881
|
-
|
|
38882
|
-
|
|
38883
|
-
|
|
38892
|
+
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";
|
|
38893
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest2 } = iss;
|
|
38894
|
+
rest2.path ?? (rest2.path = []);
|
|
38895
|
+
rest2.message = message;
|
|
38896
|
+
if (ctx?.reportInput) {
|
|
38897
|
+
rest2.input = _input;
|
|
38884
38898
|
}
|
|
38885
|
-
|
|
38886
|
-
delete full.continue;
|
|
38887
|
-
if (!ctx?.reportInput) {
|
|
38888
|
-
delete full.input;
|
|
38889
|
-
}
|
|
38890
|
-
return full;
|
|
38899
|
+
return rest2;
|
|
38891
38900
|
}
|
|
38892
38901
|
function getSizableOrigin(input) {
|
|
38893
38902
|
if (input instanceof Set)
|
|
@@ -39029,9 +39038,13 @@ var EVALUATING, captureStackTrace, allowsEval, getParsedType = (data) => {
|
|
|
39029
39038
|
}
|
|
39030
39039
|
}, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES;
|
|
39031
39040
|
var init_util = __esm(() => {
|
|
39032
|
-
|
|
39041
|
+
init_core();
|
|
39042
|
+
EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
39033
39043
|
captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
|
|
39034
|
-
allowsEval = cached(() => {
|
|
39044
|
+
allowsEval = /* @__PURE__ */ cached(() => {
|
|
39045
|
+
if (globalConfig.jitless) {
|
|
39046
|
+
return false;
|
|
39047
|
+
}
|
|
39035
39048
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
39036
39049
|
return false;
|
|
39037
39050
|
}
|
|
@@ -39043,8 +39056,15 @@ var init_util = __esm(() => {
|
|
|
39043
39056
|
return false;
|
|
39044
39057
|
}
|
|
39045
39058
|
});
|
|
39046
|
-
propertyKeyTypes = new Set(["string", "number", "symbol"]);
|
|
39047
|
-
primitiveTypes = new Set([
|
|
39059
|
+
propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
39060
|
+
primitiveTypes = /* @__PURE__ */ new Set([
|
|
39061
|
+
"string",
|
|
39062
|
+
"number",
|
|
39063
|
+
"bigint",
|
|
39064
|
+
"boolean",
|
|
39065
|
+
"symbol",
|
|
39066
|
+
"undefined"
|
|
39067
|
+
]);
|
|
39048
39068
|
NUMBER_FORMAT_RANGES = {
|
|
39049
39069
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
39050
39070
|
int32: [-2147483648, 2147483647],
|
|
@@ -39074,30 +39094,33 @@ function flattenError(error, mapper = (issue2) => issue2.message) {
|
|
|
39074
39094
|
}
|
|
39075
39095
|
function formatError(error, mapper = (issue2) => issue2.message) {
|
|
39076
39096
|
const fieldErrors = { _errors: [] };
|
|
39077
|
-
const processError = (error2) => {
|
|
39097
|
+
const processError = (error2, path = []) => {
|
|
39078
39098
|
for (const issue2 of error2.issues) {
|
|
39079
39099
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
39080
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
39100
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
39081
39101
|
} else if (issue2.code === "invalid_key") {
|
|
39082
|
-
processError({ issues: issue2.issues });
|
|
39102
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
39083
39103
|
} else if (issue2.code === "invalid_element") {
|
|
39084
|
-
processError({ issues: issue2.issues });
|
|
39085
|
-
} else if (issue2.path.length === 0) {
|
|
39086
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
39104
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
39087
39105
|
} else {
|
|
39088
|
-
|
|
39089
|
-
|
|
39090
|
-
|
|
39091
|
-
|
|
39092
|
-
|
|
39093
|
-
|
|
39094
|
-
|
|
39095
|
-
|
|
39096
|
-
|
|
39097
|
-
|
|
39106
|
+
const fullpath = [...path, ...issue2.path];
|
|
39107
|
+
if (fullpath.length === 0) {
|
|
39108
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
39109
|
+
} else {
|
|
39110
|
+
let curr = fieldErrors;
|
|
39111
|
+
let i = 0;
|
|
39112
|
+
while (i < fullpath.length) {
|
|
39113
|
+
const el = fullpath[i];
|
|
39114
|
+
const terminal = i === fullpath.length - 1;
|
|
39115
|
+
if (!terminal) {
|
|
39116
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
39117
|
+
} else {
|
|
39118
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
39119
|
+
curr[el]._errors.push(mapper(issue2));
|
|
39120
|
+
}
|
|
39121
|
+
curr = curr[el];
|
|
39122
|
+
i++;
|
|
39098
39123
|
}
|
|
39099
|
-
curr = curr[el];
|
|
39100
|
-
i++;
|
|
39101
39124
|
}
|
|
39102
39125
|
}
|
|
39103
39126
|
}
|
|
@@ -39108,14 +39131,14 @@ function formatError(error, mapper = (issue2) => issue2.message) {
|
|
|
39108
39131
|
function treeifyError(error, mapper = (issue2) => issue2.message) {
|
|
39109
39132
|
const result2 = { errors: [] };
|
|
39110
39133
|
const processError = (error2, path = []) => {
|
|
39111
|
-
var
|
|
39134
|
+
var _a2, _b;
|
|
39112
39135
|
for (const issue2 of error2.issues) {
|
|
39113
39136
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
39114
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
39137
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
39115
39138
|
} else if (issue2.code === "invalid_key") {
|
|
39116
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
39139
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
39117
39140
|
} else if (issue2.code === "invalid_element") {
|
|
39118
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
39141
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
39119
39142
|
} else {
|
|
39120
39143
|
const fullpath = [...path, ...issue2.path];
|
|
39121
39144
|
if (fullpath.length === 0) {
|
|
@@ -39129,7 +39152,7 @@ function treeifyError(error, mapper = (issue2) => issue2.message) {
|
|
|
39129
39152
|
const terminal = i === fullpath.length - 1;
|
|
39130
39153
|
if (typeof el === "string") {
|
|
39131
39154
|
curr.properties ?? (curr.properties = {});
|
|
39132
|
-
(
|
|
39155
|
+
(_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
|
|
39133
39156
|
curr = curr.properties[el];
|
|
39134
39157
|
} else {
|
|
39135
39158
|
curr.items ?? (curr.items = []);
|
|
@@ -39201,7 +39224,7 @@ var init_errors = __esm(() => {
|
|
|
39201
39224
|
|
|
39202
39225
|
// node_modules/zod/v4/core/parse.js
|
|
39203
39226
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
39204
|
-
const ctx = _ctx ?
|
|
39227
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
39205
39228
|
const result2 = schema._zod.run({ value, issues: [] }, ctx);
|
|
39206
39229
|
if (result2 instanceof Promise) {
|
|
39207
39230
|
throw new $ZodAsyncError;
|
|
@@ -39213,7 +39236,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
39213
39236
|
}
|
|
39214
39237
|
return result2.value;
|
|
39215
39238
|
}, parse, _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
39216
|
-
const ctx = _ctx ?
|
|
39239
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
39217
39240
|
let result2 = schema._zod.run({ value, issues: [] }, ctx);
|
|
39218
39241
|
if (result2 instanceof Promise)
|
|
39219
39242
|
result2 = await result2;
|
|
@@ -39234,7 +39257,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
39234
39257
|
error: new (_Err ?? $ZodError)(result2.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
39235
39258
|
} : { success: true, data: result2.value };
|
|
39236
39259
|
}, safeParse, _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
39237
|
-
const ctx = _ctx ?
|
|
39260
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
39238
39261
|
let result2 = schema._zod.run({ value, issues: [] }, ctx);
|
|
39239
39262
|
if (result2 instanceof Promise)
|
|
39240
39263
|
result2 = await result2;
|
|
@@ -39243,22 +39266,22 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
39243
39266
|
error: new _Err(result2.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
39244
39267
|
} : { success: true, data: result2.value };
|
|
39245
39268
|
}, safeParseAsync, _encode = (_Err) => (schema, value, _ctx) => {
|
|
39246
|
-
const ctx = _ctx ?
|
|
39269
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
39247
39270
|
return _parse(_Err)(schema, value, ctx);
|
|
39248
39271
|
}, encode, _decode = (_Err) => (schema, value, _ctx) => {
|
|
39249
39272
|
return _parse(_Err)(schema, value, _ctx);
|
|
39250
39273
|
}, decode, _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
39251
|
-
const ctx = _ctx ?
|
|
39274
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
39252
39275
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
39253
39276
|
}, encodeAsync, _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
39254
39277
|
return _parseAsync(_Err)(schema, value, _ctx);
|
|
39255
39278
|
}, decodeAsync, _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
39256
|
-
const ctx = _ctx ?
|
|
39279
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
39257
39280
|
return _safeParse(_Err)(schema, value, ctx);
|
|
39258
39281
|
}, safeEncode, _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
39259
39282
|
return _safeParse(_Err)(schema, value, _ctx);
|
|
39260
39283
|
}, safeDecode, _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
39261
|
-
const ctx = _ctx ?
|
|
39284
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
39262
39285
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
39263
39286
|
}, safeEncodeAsync, _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
39264
39287
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
@@ -39321,6 +39344,7 @@ __export(exports_regexes, {
|
|
|
39321
39344
|
ipv4: () => ipv4,
|
|
39322
39345
|
integer: () => integer,
|
|
39323
39346
|
idnEmail: () => idnEmail,
|
|
39347
|
+
httpProtocol: () => httpProtocol,
|
|
39324
39348
|
html5Email: () => html5Email,
|
|
39325
39349
|
hostname: () => hostname,
|
|
39326
39350
|
hex: () => hex,
|
|
@@ -39377,13 +39401,13 @@ var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uui
|
|
|
39377
39401
|
}, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`, ipv4, ipv6, mac = (delimiter) => {
|
|
39378
39402
|
const escapedDelim = escapeRegex(delimiter ?? ":");
|
|
39379
39403
|
return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
|
|
39380
|
-
}, cidrv4, cidrv6, base64, base64url, hostname, domain, e164, 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])))`, date, string = (params) => {
|
|
39404
|
+
}, cidrv4, cidrv6, base64, base64url, hostname, domain, httpProtocol, e164, 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])))`, date, string = (params) => {
|
|
39381
39405
|
const regex2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
39382
39406
|
return new RegExp(`^${regex2}$`);
|
|
39383
39407
|
}, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url;
|
|
39384
39408
|
var init_regexes = __esm(() => {
|
|
39385
39409
|
init_util();
|
|
39386
|
-
cuid = /^[cC][
|
|
39410
|
+
cuid = /^[cC][0-9a-z]{6,}$/;
|
|
39387
39411
|
cuid2 = /^[0-9a-z]+$/;
|
|
39388
39412
|
ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
39389
39413
|
xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -39409,6 +39433,7 @@ var init_regexes = __esm(() => {
|
|
|
39409
39433
|
base64url = /^[A-Za-z0-9_-]*$/;
|
|
39410
39434
|
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])?)*\.?$/;
|
|
39411
39435
|
domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
39436
|
+
httpProtocol = /^https?$/;
|
|
39412
39437
|
e164 = /^\+[1-9]\d{6,14}$/;
|
|
39413
39438
|
date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
39414
39439
|
bigint = /^-?\d+n?$/;
|
|
@@ -39449,10 +39474,10 @@ var init_checks = __esm(() => {
|
|
|
39449
39474
|
init_regexes();
|
|
39450
39475
|
init_util();
|
|
39451
39476
|
$ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
39452
|
-
var
|
|
39477
|
+
var _a2;
|
|
39453
39478
|
inst._zod ?? (inst._zod = {});
|
|
39454
39479
|
inst._zod.def = def;
|
|
39455
|
-
(
|
|
39480
|
+
(_a2 = inst._zod).onattach ?? (_a2.onattach = []);
|
|
39456
39481
|
});
|
|
39457
39482
|
numericOriginMap = {
|
|
39458
39483
|
number: "number",
|
|
@@ -39518,8 +39543,8 @@ var init_checks = __esm(() => {
|
|
|
39518
39543
|
$ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
39519
39544
|
$ZodCheck.init(inst, def);
|
|
39520
39545
|
inst._zod.onattach.push((inst2) => {
|
|
39521
|
-
var
|
|
39522
|
-
(
|
|
39546
|
+
var _a2;
|
|
39547
|
+
(_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
|
|
39523
39548
|
});
|
|
39524
39549
|
inst._zod.check = (payload) => {
|
|
39525
39550
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -39652,9 +39677,9 @@ var init_checks = __esm(() => {
|
|
|
39652
39677
|
};
|
|
39653
39678
|
});
|
|
39654
39679
|
$ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
39655
|
-
var
|
|
39680
|
+
var _a2;
|
|
39656
39681
|
$ZodCheck.init(inst, def);
|
|
39657
|
-
(
|
|
39682
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
39658
39683
|
const val = payload.value;
|
|
39659
39684
|
return !nullish(val) && val.size !== undefined;
|
|
39660
39685
|
});
|
|
@@ -39680,9 +39705,9 @@ var init_checks = __esm(() => {
|
|
|
39680
39705
|
};
|
|
39681
39706
|
});
|
|
39682
39707
|
$ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
39683
|
-
var
|
|
39708
|
+
var _a2;
|
|
39684
39709
|
$ZodCheck.init(inst, def);
|
|
39685
|
-
(
|
|
39710
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
39686
39711
|
const val = payload.value;
|
|
39687
39712
|
return !nullish(val) && val.size !== undefined;
|
|
39688
39713
|
});
|
|
@@ -39708,9 +39733,9 @@ var init_checks = __esm(() => {
|
|
|
39708
39733
|
};
|
|
39709
39734
|
});
|
|
39710
39735
|
$ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
39711
|
-
var
|
|
39736
|
+
var _a2;
|
|
39712
39737
|
$ZodCheck.init(inst, def);
|
|
39713
|
-
(
|
|
39738
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
39714
39739
|
const val = payload.value;
|
|
39715
39740
|
return !nullish(val) && val.size !== undefined;
|
|
39716
39741
|
});
|
|
@@ -39738,9 +39763,9 @@ var init_checks = __esm(() => {
|
|
|
39738
39763
|
};
|
|
39739
39764
|
});
|
|
39740
39765
|
$ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
39741
|
-
var
|
|
39766
|
+
var _a2;
|
|
39742
39767
|
$ZodCheck.init(inst, def);
|
|
39743
|
-
(
|
|
39768
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
39744
39769
|
const val = payload.value;
|
|
39745
39770
|
return !nullish(val) && val.length !== undefined;
|
|
39746
39771
|
});
|
|
@@ -39767,9 +39792,9 @@ var init_checks = __esm(() => {
|
|
|
39767
39792
|
};
|
|
39768
39793
|
});
|
|
39769
39794
|
$ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
39770
|
-
var
|
|
39795
|
+
var _a2;
|
|
39771
39796
|
$ZodCheck.init(inst, def);
|
|
39772
|
-
(
|
|
39797
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
39773
39798
|
const val = payload.value;
|
|
39774
39799
|
return !nullish(val) && val.length !== undefined;
|
|
39775
39800
|
});
|
|
@@ -39796,9 +39821,9 @@ var init_checks = __esm(() => {
|
|
|
39796
39821
|
};
|
|
39797
39822
|
});
|
|
39798
39823
|
$ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
39799
|
-
var
|
|
39824
|
+
var _a2;
|
|
39800
39825
|
$ZodCheck.init(inst, def);
|
|
39801
|
-
(
|
|
39826
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
39802
39827
|
const val = payload.value;
|
|
39803
39828
|
return !nullish(val) && val.length !== undefined;
|
|
39804
39829
|
});
|
|
@@ -39827,7 +39852,7 @@ var init_checks = __esm(() => {
|
|
|
39827
39852
|
};
|
|
39828
39853
|
});
|
|
39829
39854
|
$ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
39830
|
-
var
|
|
39855
|
+
var _a2, _b;
|
|
39831
39856
|
$ZodCheck.init(inst, def);
|
|
39832
39857
|
inst._zod.onattach.push((inst2) => {
|
|
39833
39858
|
const bag = inst2._zod.bag;
|
|
@@ -39838,7 +39863,7 @@ var init_checks = __esm(() => {
|
|
|
39838
39863
|
}
|
|
39839
39864
|
});
|
|
39840
39865
|
if (def.pattern)
|
|
39841
|
-
(
|
|
39866
|
+
(_a2 = inst._zod).check ?? (_a2.check = (payload) => {
|
|
39842
39867
|
def.pattern.lastIndex = 0;
|
|
39843
39868
|
if (def.pattern.test(payload.value))
|
|
39844
39869
|
return;
|
|
@@ -40033,8 +40058,8 @@ var version;
|
|
|
40033
40058
|
var init_versions = __esm(() => {
|
|
40034
40059
|
version = {
|
|
40035
40060
|
major: 4,
|
|
40036
|
-
minor:
|
|
40037
|
-
patch:
|
|
40061
|
+
minor: 4,
|
|
40062
|
+
patch: 3
|
|
40038
40063
|
};
|
|
40039
40064
|
});
|
|
40040
40065
|
|
|
@@ -40042,6 +40067,8 @@ var init_versions = __esm(() => {
|
|
|
40042
40067
|
function isValidBase64(data) {
|
|
40043
40068
|
if (data === "")
|
|
40044
40069
|
return true;
|
|
40070
|
+
if (/\s/.test(data))
|
|
40071
|
+
return false;
|
|
40045
40072
|
if (data.length % 4 !== 0)
|
|
40046
40073
|
return false;
|
|
40047
40074
|
try {
|
|
@@ -40084,15 +40111,27 @@ function handleArrayResult(result2, final, index) {
|
|
|
40084
40111
|
}
|
|
40085
40112
|
final.value[index] = result2.value;
|
|
40086
40113
|
}
|
|
40087
|
-
function handlePropertyResult(result2, final, key, input, isOptionalOut) {
|
|
40114
|
+
function handlePropertyResult(result2, final, key, input, isOptionalIn, isOptionalOut) {
|
|
40115
|
+
const isPresent = key in input;
|
|
40088
40116
|
if (result2.issues.length) {
|
|
40089
|
-
if (isOptionalOut && !
|
|
40117
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
40090
40118
|
return;
|
|
40091
40119
|
}
|
|
40092
40120
|
final.issues.push(...prefixIssues(key, result2.issues));
|
|
40093
40121
|
}
|
|
40122
|
+
if (!isPresent && !isOptionalIn) {
|
|
40123
|
+
if (!result2.issues.length) {
|
|
40124
|
+
final.issues.push({
|
|
40125
|
+
code: "invalid_type",
|
|
40126
|
+
expected: "nonoptional",
|
|
40127
|
+
input: undefined,
|
|
40128
|
+
path: [key]
|
|
40129
|
+
});
|
|
40130
|
+
}
|
|
40131
|
+
return;
|
|
40132
|
+
}
|
|
40094
40133
|
if (result2.value === undefined) {
|
|
40095
|
-
if (
|
|
40134
|
+
if (isPresent) {
|
|
40096
40135
|
final.value[key] = undefined;
|
|
40097
40136
|
}
|
|
40098
40137
|
} else {
|
|
@@ -40120,8 +40159,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
40120
40159
|
const keySet = def.keySet;
|
|
40121
40160
|
const _catchall = def.catchall._zod;
|
|
40122
40161
|
const t = _catchall.def.type;
|
|
40162
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
40123
40163
|
const isOptionalOut = _catchall.optout === "optional";
|
|
40124
40164
|
for (const key in input) {
|
|
40165
|
+
if (key === "__proto__")
|
|
40166
|
+
continue;
|
|
40125
40167
|
if (keySet.has(key))
|
|
40126
40168
|
continue;
|
|
40127
40169
|
if (t === "never") {
|
|
@@ -40130,9 +40172,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
40130
40172
|
}
|
|
40131
40173
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
40132
40174
|
if (r instanceof Promise) {
|
|
40133
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
40175
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
40134
40176
|
} else {
|
|
40135
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
40177
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
40136
40178
|
}
|
|
40137
40179
|
}
|
|
40138
40180
|
if (unrecognized.length) {
|
|
@@ -40276,12 +40318,41 @@ function handleIntersectionResults(result2, left, right) {
|
|
|
40276
40318
|
result2.value = merged.data;
|
|
40277
40319
|
return result2;
|
|
40278
40320
|
}
|
|
40321
|
+
function getTupleOptStart(items, key) {
|
|
40322
|
+
for (let i = items.length - 1;i >= 0; i--) {
|
|
40323
|
+
if (items[i]._zod[key] !== "optional")
|
|
40324
|
+
return i + 1;
|
|
40325
|
+
}
|
|
40326
|
+
return 0;
|
|
40327
|
+
}
|
|
40279
40328
|
function handleTupleResult(result2, final, index) {
|
|
40280
40329
|
if (result2.issues.length) {
|
|
40281
40330
|
final.issues.push(...prefixIssues(index, result2.issues));
|
|
40282
40331
|
}
|
|
40283
40332
|
final.value[index] = result2.value;
|
|
40284
40333
|
}
|
|
40334
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
40335
|
+
for (let i = 0;i < items.length; i++) {
|
|
40336
|
+
const r = itemResults[i];
|
|
40337
|
+
const isPresent = i < input.length;
|
|
40338
|
+
if (r.issues.length) {
|
|
40339
|
+
if (!isPresent && i >= optoutStart) {
|
|
40340
|
+
final.value.length = i;
|
|
40341
|
+
break;
|
|
40342
|
+
}
|
|
40343
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
40344
|
+
}
|
|
40345
|
+
final.value[i] = r.value;
|
|
40346
|
+
}
|
|
40347
|
+
for (let i = final.value.length - 1;i >= input.length; i--) {
|
|
40348
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === undefined) {
|
|
40349
|
+
final.value.length = i;
|
|
40350
|
+
} else {
|
|
40351
|
+
break;
|
|
40352
|
+
}
|
|
40353
|
+
}
|
|
40354
|
+
return final;
|
|
40355
|
+
}
|
|
40285
40356
|
function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
|
|
40286
40357
|
if (keyResult.issues.length) {
|
|
40287
40358
|
if (propertyKeyTypes.has(typeof key)) {
|
|
@@ -40319,7 +40390,7 @@ function handleSetResult(result2, final) {
|
|
|
40319
40390
|
final.value.add(result2.value);
|
|
40320
40391
|
}
|
|
40321
40392
|
function handleOptionalResult(result2, input) {
|
|
40322
|
-
if (result2.issues.length
|
|
40393
|
+
if (input === undefined && (result2.issues.length || result2.fallback)) {
|
|
40323
40394
|
return { issues: [], value: undefined };
|
|
40324
40395
|
}
|
|
40325
40396
|
return result2;
|
|
@@ -40346,7 +40417,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
40346
40417
|
left.aborted = true;
|
|
40347
40418
|
return left;
|
|
40348
40419
|
}
|
|
40349
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
40420
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
40350
40421
|
}
|
|
40351
40422
|
function handleCodecAResult(result2, def, ctx) {
|
|
40352
40423
|
if (result2.issues.length) {
|
|
@@ -40393,7 +40464,7 @@ function handleRefineResult(result2, payload, input, inst) {
|
|
|
40393
40464
|
payload.issues.push(issue(_iss));
|
|
40394
40465
|
}
|
|
40395
40466
|
}
|
|
40396
|
-
var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom;
|
|
40467
|
+
var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodPreprocess, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom;
|
|
40397
40468
|
var init_schemas = __esm(() => {
|
|
40398
40469
|
init_checks();
|
|
40399
40470
|
init_core();
|
|
@@ -40403,7 +40474,7 @@ var init_schemas = __esm(() => {
|
|
|
40403
40474
|
init_versions();
|
|
40404
40475
|
init_util();
|
|
40405
40476
|
$ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
40406
|
-
var
|
|
40477
|
+
var _a2;
|
|
40407
40478
|
inst ?? (inst = {});
|
|
40408
40479
|
inst._zod.def = def;
|
|
40409
40480
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -40418,7 +40489,7 @@ var init_schemas = __esm(() => {
|
|
|
40418
40489
|
}
|
|
40419
40490
|
}
|
|
40420
40491
|
if (checks.length === 0) {
|
|
40421
|
-
(
|
|
40492
|
+
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
40422
40493
|
inst._zod.deferred?.push(() => {
|
|
40423
40494
|
inst._zod.run = inst._zod.parse;
|
|
40424
40495
|
});
|
|
@@ -40428,6 +40499,8 @@ var init_schemas = __esm(() => {
|
|
|
40428
40499
|
let asyncResult;
|
|
40429
40500
|
for (const ch of checks2) {
|
|
40430
40501
|
if (ch._zod.def.when) {
|
|
40502
|
+
if (explicitlyAborted(payload))
|
|
40503
|
+
continue;
|
|
40431
40504
|
const shouldRun = ch._zod.def.when(payload);
|
|
40432
40505
|
if (!shouldRun)
|
|
40433
40506
|
continue;
|
|
@@ -40567,6 +40640,19 @@ var init_schemas = __esm(() => {
|
|
|
40567
40640
|
inst._zod.check = (payload) => {
|
|
40568
40641
|
try {
|
|
40569
40642
|
const trimmed = payload.value.trim();
|
|
40643
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
40644
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
40645
|
+
payload.issues.push({
|
|
40646
|
+
code: "invalid_format",
|
|
40647
|
+
format: "url",
|
|
40648
|
+
note: "Invalid URL format",
|
|
40649
|
+
input: payload.value,
|
|
40650
|
+
inst,
|
|
40651
|
+
continue: !def.abort
|
|
40652
|
+
});
|
|
40653
|
+
return;
|
|
40654
|
+
}
|
|
40655
|
+
}
|
|
40570
40656
|
const url = new URL(trimmed);
|
|
40571
40657
|
if (def.hostname) {
|
|
40572
40658
|
def.hostname.lastIndex = 0;
|
|
@@ -40870,8 +40956,6 @@ var init_schemas = __esm(() => {
|
|
|
40870
40956
|
$ZodType.init(inst, def);
|
|
40871
40957
|
inst._zod.pattern = _undefined;
|
|
40872
40958
|
inst._zod.values = new Set([undefined]);
|
|
40873
|
-
inst._zod.optin = "optional";
|
|
40874
|
-
inst._zod.optout = "optional";
|
|
40875
40959
|
inst._zod.parse = (payload, _ctx) => {
|
|
40876
40960
|
const input = payload.value;
|
|
40877
40961
|
if (typeof input === "undefined")
|
|
@@ -41042,12 +41126,13 @@ var init_schemas = __esm(() => {
|
|
|
41042
41126
|
const shape = value.shape;
|
|
41043
41127
|
for (const key of value.keys) {
|
|
41044
41128
|
const el = shape[key];
|
|
41129
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
41045
41130
|
const isOptionalOut = el._zod.optout === "optional";
|
|
41046
41131
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
41047
41132
|
if (r instanceof Promise) {
|
|
41048
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
41133
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
41049
41134
|
} else {
|
|
41050
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
41135
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
41051
41136
|
}
|
|
41052
41137
|
}
|
|
41053
41138
|
if (!catchall) {
|
|
@@ -41078,9 +41163,10 @@ var init_schemas = __esm(() => {
|
|
|
41078
41163
|
const id = ids[key];
|
|
41079
41164
|
const k = esc(key);
|
|
41080
41165
|
const schema = shape[key];
|
|
41166
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
41081
41167
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
41082
41168
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
41083
|
-
if (isOptionalOut) {
|
|
41169
|
+
if (isOptionalIn && isOptionalOut) {
|
|
41084
41170
|
doc.write(`
|
|
41085
41171
|
if (${id}.issues.length) {
|
|
41086
41172
|
if (${k} in input) {
|
|
@@ -41099,6 +41185,33 @@ var init_schemas = __esm(() => {
|
|
|
41099
41185
|
newResult[${k}] = ${id}.value;
|
|
41100
41186
|
}
|
|
41101
41187
|
|
|
41188
|
+
`);
|
|
41189
|
+
} else if (!isOptionalIn) {
|
|
41190
|
+
doc.write(`
|
|
41191
|
+
const ${id}_present = ${k} in input;
|
|
41192
|
+
if (${id}.issues.length) {
|
|
41193
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
41194
|
+
...iss,
|
|
41195
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
41196
|
+
})));
|
|
41197
|
+
}
|
|
41198
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
41199
|
+
payload.issues.push({
|
|
41200
|
+
code: "invalid_type",
|
|
41201
|
+
expected: "nonoptional",
|
|
41202
|
+
input: undefined,
|
|
41203
|
+
path: [${k}]
|
|
41204
|
+
});
|
|
41205
|
+
}
|
|
41206
|
+
|
|
41207
|
+
if (${id}_present) {
|
|
41208
|
+
if (${id}.value === undefined) {
|
|
41209
|
+
newResult[${k}] = undefined;
|
|
41210
|
+
} else {
|
|
41211
|
+
newResult[${k}] = ${id}.value;
|
|
41212
|
+
}
|
|
41213
|
+
}
|
|
41214
|
+
|
|
41102
41215
|
`);
|
|
41103
41216
|
} else {
|
|
41104
41217
|
doc.write(`
|
|
@@ -41172,10 +41285,9 @@ var init_schemas = __esm(() => {
|
|
|
41172
41285
|
}
|
|
41173
41286
|
return;
|
|
41174
41287
|
});
|
|
41175
|
-
const
|
|
41176
|
-
const first = def.options[0]._zod.run;
|
|
41288
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
41177
41289
|
inst._zod.parse = (payload, ctx) => {
|
|
41178
|
-
if (
|
|
41290
|
+
if (first) {
|
|
41179
41291
|
return first(payload, ctx);
|
|
41180
41292
|
}
|
|
41181
41293
|
let async = false;
|
|
@@ -41204,10 +41316,9 @@ var init_schemas = __esm(() => {
|
|
|
41204
41316
|
$ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
41205
41317
|
$ZodUnion.init(inst, def);
|
|
41206
41318
|
def.inclusive = false;
|
|
41207
|
-
const
|
|
41208
|
-
const first = def.options[0]._zod.run;
|
|
41319
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
41209
41320
|
inst._zod.parse = (payload, ctx) => {
|
|
41210
|
-
if (
|
|
41321
|
+
if (first) {
|
|
41211
41322
|
return first(payload, ctx);
|
|
41212
41323
|
}
|
|
41213
41324
|
let async = false;
|
|
@@ -41282,7 +41393,7 @@ var init_schemas = __esm(() => {
|
|
|
41282
41393
|
if (opt) {
|
|
41283
41394
|
return opt._zod.run(payload, ctx);
|
|
41284
41395
|
}
|
|
41285
|
-
if (def.unionFallback) {
|
|
41396
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
41286
41397
|
return _super(payload, ctx);
|
|
41287
41398
|
}
|
|
41288
41399
|
payload.issues.push({
|
|
@@ -41290,6 +41401,7 @@ var init_schemas = __esm(() => {
|
|
|
41290
41401
|
errors: [],
|
|
41291
41402
|
note: "No matching discriminator",
|
|
41292
41403
|
discriminator: def.discriminator,
|
|
41404
|
+
options: Array.from(disc.value.keys()),
|
|
41293
41405
|
input,
|
|
41294
41406
|
path: [def.discriminator],
|
|
41295
41407
|
inst
|
|
@@ -41328,56 +41440,59 @@ var init_schemas = __esm(() => {
|
|
|
41328
41440
|
}
|
|
41329
41441
|
payload.value = [];
|
|
41330
41442
|
const proms = [];
|
|
41331
|
-
const
|
|
41332
|
-
const
|
|
41443
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
41444
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
41333
41445
|
if (!def.rest) {
|
|
41334
|
-
|
|
41335
|
-
const tooSmall = input.length < optStart - 1;
|
|
41336
|
-
if (tooBig || tooSmall) {
|
|
41446
|
+
if (input.length < optinStart) {
|
|
41337
41447
|
payload.issues.push({
|
|
41338
|
-
|
|
41448
|
+
code: "too_small",
|
|
41449
|
+
minimum: optinStart,
|
|
41450
|
+
inclusive: true,
|
|
41339
41451
|
input,
|
|
41340
41452
|
inst,
|
|
41341
41453
|
origin: "array"
|
|
41342
41454
|
});
|
|
41343
41455
|
return payload;
|
|
41344
41456
|
}
|
|
41345
|
-
|
|
41346
|
-
|
|
41347
|
-
|
|
41348
|
-
|
|
41349
|
-
|
|
41350
|
-
|
|
41351
|
-
|
|
41457
|
+
if (input.length > items.length) {
|
|
41458
|
+
payload.issues.push({
|
|
41459
|
+
code: "too_big",
|
|
41460
|
+
maximum: items.length,
|
|
41461
|
+
inclusive: true,
|
|
41462
|
+
input,
|
|
41463
|
+
inst,
|
|
41464
|
+
origin: "array"
|
|
41465
|
+
});
|
|
41352
41466
|
}
|
|
41353
|
-
|
|
41354
|
-
|
|
41355
|
-
|
|
41356
|
-
}, ctx);
|
|
41357
|
-
if (
|
|
41358
|
-
proms.push(
|
|
41467
|
+
}
|
|
41468
|
+
const itemResults = new Array(items.length);
|
|
41469
|
+
for (let i = 0;i < items.length; i++) {
|
|
41470
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
41471
|
+
if (r instanceof Promise) {
|
|
41472
|
+
proms.push(r.then((rr) => {
|
|
41473
|
+
itemResults[i] = rr;
|
|
41474
|
+
}));
|
|
41359
41475
|
} else {
|
|
41360
|
-
|
|
41476
|
+
itemResults[i] = r;
|
|
41361
41477
|
}
|
|
41362
41478
|
}
|
|
41363
41479
|
if (def.rest) {
|
|
41480
|
+
let i = items.length - 1;
|
|
41364
41481
|
const rest2 = input.slice(items.length);
|
|
41365
41482
|
for (const el of rest2) {
|
|
41366
41483
|
i++;
|
|
41367
|
-
const result2 = def.rest._zod.run({
|
|
41368
|
-
value: el,
|
|
41369
|
-
issues: []
|
|
41370
|
-
}, ctx);
|
|
41484
|
+
const result2 = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
41371
41485
|
if (result2 instanceof Promise) {
|
|
41372
|
-
proms.push(result2.then((
|
|
41486
|
+
proms.push(result2.then((r) => handleTupleResult(r, payload, i)));
|
|
41373
41487
|
} else {
|
|
41374
41488
|
handleTupleResult(result2, payload, i);
|
|
41375
41489
|
}
|
|
41376
41490
|
}
|
|
41377
41491
|
}
|
|
41378
|
-
if (proms.length)
|
|
41379
|
-
return Promise.all(proms).then(() => payload);
|
|
41380
|
-
|
|
41492
|
+
if (proms.length) {
|
|
41493
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
41494
|
+
}
|
|
41495
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
41381
41496
|
};
|
|
41382
41497
|
});
|
|
41383
41498
|
$ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
@@ -41401,19 +41516,35 @@ var init_schemas = __esm(() => {
|
|
|
41401
41516
|
for (const key of values2) {
|
|
41402
41517
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
41403
41518
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
41519
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
41520
|
+
if (keyResult instanceof Promise) {
|
|
41521
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
41522
|
+
}
|
|
41523
|
+
if (keyResult.issues.length) {
|
|
41524
|
+
payload.issues.push({
|
|
41525
|
+
code: "invalid_key",
|
|
41526
|
+
origin: "record",
|
|
41527
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
41528
|
+
input: key,
|
|
41529
|
+
path: [key],
|
|
41530
|
+
inst
|
|
41531
|
+
});
|
|
41532
|
+
continue;
|
|
41533
|
+
}
|
|
41534
|
+
const outKey = keyResult.value;
|
|
41404
41535
|
const result2 = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
41405
41536
|
if (result2 instanceof Promise) {
|
|
41406
41537
|
proms.push(result2.then((result3) => {
|
|
41407
41538
|
if (result3.issues.length) {
|
|
41408
41539
|
payload.issues.push(...prefixIssues(key, result3.issues));
|
|
41409
41540
|
}
|
|
41410
|
-
payload.value[
|
|
41541
|
+
payload.value[outKey] = result3.value;
|
|
41411
41542
|
}));
|
|
41412
41543
|
} else {
|
|
41413
41544
|
if (result2.issues.length) {
|
|
41414
41545
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
41415
41546
|
}
|
|
41416
|
-
payload.value[
|
|
41547
|
+
payload.value[outKey] = result2.value;
|
|
41417
41548
|
}
|
|
41418
41549
|
}
|
|
41419
41550
|
}
|
|
@@ -41437,6 +41568,8 @@ var init_schemas = __esm(() => {
|
|
|
41437
41568
|
for (const key of Reflect.ownKeys(input)) {
|
|
41438
41569
|
if (key === "__proto__")
|
|
41439
41570
|
continue;
|
|
41571
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
41572
|
+
continue;
|
|
41440
41573
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
41441
41574
|
if (keyResult instanceof Promise) {
|
|
41442
41575
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -41605,6 +41738,7 @@ var init_schemas = __esm(() => {
|
|
|
41605
41738
|
});
|
|
41606
41739
|
$ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
41607
41740
|
$ZodType.init(inst, def);
|
|
41741
|
+
inst._zod.optin = "optional";
|
|
41608
41742
|
inst._zod.parse = (payload, ctx) => {
|
|
41609
41743
|
if (ctx.direction === "backward") {
|
|
41610
41744
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -41614,6 +41748,7 @@ var init_schemas = __esm(() => {
|
|
|
41614
41748
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
41615
41749
|
return output.then((output2) => {
|
|
41616
41750
|
payload.value = output2;
|
|
41751
|
+
payload.fallback = true;
|
|
41617
41752
|
return payload;
|
|
41618
41753
|
});
|
|
41619
41754
|
}
|
|
@@ -41621,6 +41756,7 @@ var init_schemas = __esm(() => {
|
|
|
41621
41756
|
throw new $ZodAsyncError;
|
|
41622
41757
|
}
|
|
41623
41758
|
payload.value = _out;
|
|
41759
|
+
payload.fallback = true;
|
|
41624
41760
|
return payload;
|
|
41625
41761
|
};
|
|
41626
41762
|
});
|
|
@@ -41637,10 +41773,11 @@ var init_schemas = __esm(() => {
|
|
|
41637
41773
|
});
|
|
41638
41774
|
inst._zod.parse = (payload, ctx) => {
|
|
41639
41775
|
if (def.innerType._zod.optin === "optional") {
|
|
41776
|
+
const input = payload.value;
|
|
41640
41777
|
const result2 = def.innerType._zod.run(payload, ctx);
|
|
41641
41778
|
if (result2 instanceof Promise)
|
|
41642
|
-
return result2.then((r) => handleOptionalResult(r,
|
|
41643
|
-
return handleOptionalResult(result2,
|
|
41779
|
+
return result2.then((r) => handleOptionalResult(r, input));
|
|
41780
|
+
return handleOptionalResult(result2, input);
|
|
41644
41781
|
}
|
|
41645
41782
|
if (payload.value === undefined) {
|
|
41646
41783
|
return payload;
|
|
@@ -41739,7 +41876,7 @@ var init_schemas = __esm(() => {
|
|
|
41739
41876
|
});
|
|
41740
41877
|
$ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
41741
41878
|
$ZodType.init(inst, def);
|
|
41742
|
-
|
|
41879
|
+
inst._zod.optin = "optional";
|
|
41743
41880
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
41744
41881
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
41745
41882
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -41759,6 +41896,7 @@ var init_schemas = __esm(() => {
|
|
|
41759
41896
|
input: payload.value
|
|
41760
41897
|
});
|
|
41761
41898
|
payload.issues = [];
|
|
41899
|
+
payload.fallback = true;
|
|
41762
41900
|
}
|
|
41763
41901
|
return payload;
|
|
41764
41902
|
});
|
|
@@ -41773,6 +41911,7 @@ var init_schemas = __esm(() => {
|
|
|
41773
41911
|
input: payload.value
|
|
41774
41912
|
});
|
|
41775
41913
|
payload.issues = [];
|
|
41914
|
+
payload.fallback = true;
|
|
41776
41915
|
}
|
|
41777
41916
|
return payload;
|
|
41778
41917
|
};
|
|
@@ -41836,6 +41975,9 @@ var init_schemas = __esm(() => {
|
|
|
41836
41975
|
}
|
|
41837
41976
|
};
|
|
41838
41977
|
});
|
|
41978
|
+
$ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
41979
|
+
$ZodPipe.init(inst, def);
|
|
41980
|
+
});
|
|
41839
41981
|
$ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
41840
41982
|
$ZodType.init(inst, def);
|
|
41841
41983
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -41983,7 +42125,12 @@ var init_schemas = __esm(() => {
|
|
|
41983
42125
|
});
|
|
41984
42126
|
$ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
41985
42127
|
$ZodType.init(inst, def);
|
|
41986
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
42128
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
42129
|
+
const d = def;
|
|
42130
|
+
if (!d._cachedInner)
|
|
42131
|
+
d._cachedInner = def.getter();
|
|
42132
|
+
return d._cachedInner;
|
|
42133
|
+
});
|
|
41987
42134
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
41988
42135
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
41989
42136
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? undefined);
|
|
@@ -42971,13 +43118,126 @@ var init_de = __esm(() => {
|
|
|
42971
43118
|
init_util();
|
|
42972
43119
|
});
|
|
42973
43120
|
|
|
42974
|
-
// node_modules/zod/v4/locales/
|
|
42975
|
-
function
|
|
43121
|
+
// node_modules/zod/v4/locales/el.js
|
|
43122
|
+
function el_default() {
|
|
42976
43123
|
return {
|
|
42977
43124
|
localeError: error9()
|
|
42978
43125
|
};
|
|
42979
43126
|
}
|
|
42980
43127
|
var error9 = () => {
|
|
43128
|
+
const Sizable = {
|
|
43129
|
+
string: { unit: "χαρακτήρες", verb: "να έχει" },
|
|
43130
|
+
file: { unit: "bytes", verb: "να έχει" },
|
|
43131
|
+
array: { unit: "στοιχεία", verb: "να έχει" },
|
|
43132
|
+
set: { unit: "στοιχεία", verb: "να έχει" },
|
|
43133
|
+
map: { unit: "καταχωρήσεις", verb: "να έχει" }
|
|
43134
|
+
};
|
|
43135
|
+
function getSizing(origin) {
|
|
43136
|
+
return Sizable[origin] ?? null;
|
|
43137
|
+
}
|
|
43138
|
+
const FormatDictionary = {
|
|
43139
|
+
regex: "είσοδος",
|
|
43140
|
+
email: "διεύθυνση email",
|
|
43141
|
+
url: "URL",
|
|
43142
|
+
emoji: "emoji",
|
|
43143
|
+
uuid: "UUID",
|
|
43144
|
+
uuidv4: "UUIDv4",
|
|
43145
|
+
uuidv6: "UUIDv6",
|
|
43146
|
+
nanoid: "nanoid",
|
|
43147
|
+
guid: "GUID",
|
|
43148
|
+
cuid: "cuid",
|
|
43149
|
+
cuid2: "cuid2",
|
|
43150
|
+
ulid: "ULID",
|
|
43151
|
+
xid: "XID",
|
|
43152
|
+
ksuid: "KSUID",
|
|
43153
|
+
datetime: "ISO ημερομηνία και ώρα",
|
|
43154
|
+
date: "ISO ημερομηνία",
|
|
43155
|
+
time: "ISO ώρα",
|
|
43156
|
+
duration: "ISO διάρκεια",
|
|
43157
|
+
ipv4: "διεύθυνση IPv4",
|
|
43158
|
+
ipv6: "διεύθυνση IPv6",
|
|
43159
|
+
mac: "διεύθυνση MAC",
|
|
43160
|
+
cidrv4: "εύρος IPv4",
|
|
43161
|
+
cidrv6: "εύρος IPv6",
|
|
43162
|
+
base64: "συμβολοσειρά κωδικοποιημένη σε base64",
|
|
43163
|
+
base64url: "συμβολοσειρά κωδικοποιημένη σε base64url",
|
|
43164
|
+
json_string: "συμβολοσειρά JSON",
|
|
43165
|
+
e164: "αριθμός E.164",
|
|
43166
|
+
jwt: "JWT",
|
|
43167
|
+
template_literal: "είσοδος"
|
|
43168
|
+
};
|
|
43169
|
+
const TypeDictionary = {
|
|
43170
|
+
nan: "NaN"
|
|
43171
|
+
};
|
|
43172
|
+
return (issue2) => {
|
|
43173
|
+
switch (issue2.code) {
|
|
43174
|
+
case "invalid_type": {
|
|
43175
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
43176
|
+
const receivedType = parsedType(issue2.input);
|
|
43177
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
43178
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
43179
|
+
return `Μη έγκυρη είσοδος: αναμενόταν instanceof ${issue2.expected}, λήφθηκε ${received}`;
|
|
43180
|
+
}
|
|
43181
|
+
return `Μη έγκυρη είσοδος: αναμενόταν ${expected}, λήφθηκε ${received}`;
|
|
43182
|
+
}
|
|
43183
|
+
case "invalid_value":
|
|
43184
|
+
if (issue2.values.length === 1)
|
|
43185
|
+
return `Μη έγκυρη είσοδος: αναμενόταν ${stringifyPrimitive(issue2.values[0])}`;
|
|
43186
|
+
return `Μη έγκυρη επιλογή: αναμενόταν ένα από ${joinValues(issue2.values, "|")}`;
|
|
43187
|
+
case "too_big": {
|
|
43188
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
43189
|
+
const sizing = getSizing(issue2.origin);
|
|
43190
|
+
if (sizing)
|
|
43191
|
+
return `Πολύ μεγάλο: αναμενόταν ${issue2.origin ?? "τιμή"} να έχει ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "στοιχεία"}`;
|
|
43192
|
+
return `Πολύ μεγάλο: αναμενόταν ${issue2.origin ?? "τιμή"} να είναι ${adj}${issue2.maximum.toString()}`;
|
|
43193
|
+
}
|
|
43194
|
+
case "too_small": {
|
|
43195
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
43196
|
+
const sizing = getSizing(issue2.origin);
|
|
43197
|
+
if (sizing) {
|
|
43198
|
+
return `Πολύ μικρό: αναμενόταν ${issue2.origin} να έχει ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
43199
|
+
}
|
|
43200
|
+
return `Πολύ μικρό: αναμενόταν ${issue2.origin} να είναι ${adj}${issue2.minimum.toString()}`;
|
|
43201
|
+
}
|
|
43202
|
+
case "invalid_format": {
|
|
43203
|
+
const _issue = issue2;
|
|
43204
|
+
if (_issue.format === "starts_with") {
|
|
43205
|
+
return `Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${_issue.prefix}"`;
|
|
43206
|
+
}
|
|
43207
|
+
if (_issue.format === "ends_with")
|
|
43208
|
+
return `Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${_issue.suffix}"`;
|
|
43209
|
+
if (_issue.format === "includes")
|
|
43210
|
+
return `Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${_issue.includes}"`;
|
|
43211
|
+
if (_issue.format === "regex")
|
|
43212
|
+
return `Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${_issue.pattern}`;
|
|
43213
|
+
return `Μη έγκυρο: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
43214
|
+
}
|
|
43215
|
+
case "not_multiple_of":
|
|
43216
|
+
return `Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${issue2.divisor}`;
|
|
43217
|
+
case "unrecognized_keys":
|
|
43218
|
+
return `Άγνωστ${issue2.keys.length > 1 ? "α" : "ο"} κλειδ${issue2.keys.length > 1 ? "ιά" : "ί"}: ${joinValues(issue2.keys, ", ")}`;
|
|
43219
|
+
case "invalid_key":
|
|
43220
|
+
return `Μη έγκυρο κλειδί στο ${issue2.origin}`;
|
|
43221
|
+
case "invalid_union":
|
|
43222
|
+
return "Μη έγκυρη είσοδος";
|
|
43223
|
+
case "invalid_element":
|
|
43224
|
+
return `Μη έγκυρη τιμή στο ${issue2.origin}`;
|
|
43225
|
+
default:
|
|
43226
|
+
return `Μη έγκυρη είσοδος`;
|
|
43227
|
+
}
|
|
43228
|
+
};
|
|
43229
|
+
};
|
|
43230
|
+
var init_el = __esm(() => {
|
|
43231
|
+
init_util();
|
|
43232
|
+
});
|
|
43233
|
+
|
|
43234
|
+
// node_modules/zod/v4/locales/en.js
|
|
43235
|
+
function en_default() {
|
|
43236
|
+
return {
|
|
43237
|
+
localeError: error10()
|
|
43238
|
+
};
|
|
43239
|
+
}
|
|
43240
|
+
var error10 = () => {
|
|
42981
43241
|
const Sizable = {
|
|
42982
43242
|
string: { unit: "characters", verb: "to have" },
|
|
42983
43243
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -43069,6 +43329,10 @@ var error9 = () => {
|
|
|
43069
43329
|
case "invalid_key":
|
|
43070
43330
|
return `Invalid key in ${issue2.origin}`;
|
|
43071
43331
|
case "invalid_union":
|
|
43332
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
43333
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
43334
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
43335
|
+
}
|
|
43072
43336
|
return "Invalid input";
|
|
43073
43337
|
case "invalid_element":
|
|
43074
43338
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -43084,10 +43348,10 @@ var init_en = __esm(() => {
|
|
|
43084
43348
|
// node_modules/zod/v4/locales/eo.js
|
|
43085
43349
|
function eo_default() {
|
|
43086
43350
|
return {
|
|
43087
|
-
localeError:
|
|
43351
|
+
localeError: error11()
|
|
43088
43352
|
};
|
|
43089
43353
|
}
|
|
43090
|
-
var
|
|
43354
|
+
var error11 = () => {
|
|
43091
43355
|
const Sizable = {
|
|
43092
43356
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
43093
43357
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -43197,10 +43461,10 @@ var init_eo = __esm(() => {
|
|
|
43197
43461
|
// node_modules/zod/v4/locales/es.js
|
|
43198
43462
|
function es_default() {
|
|
43199
43463
|
return {
|
|
43200
|
-
localeError:
|
|
43464
|
+
localeError: error12()
|
|
43201
43465
|
};
|
|
43202
43466
|
}
|
|
43203
|
-
var
|
|
43467
|
+
var error12 = () => {
|
|
43204
43468
|
const Sizable = {
|
|
43205
43469
|
string: { unit: "caracteres", verb: "tener" },
|
|
43206
43470
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -43333,10 +43597,10 @@ var init_es = __esm(() => {
|
|
|
43333
43597
|
// node_modules/zod/v4/locales/fa.js
|
|
43334
43598
|
function fa_default() {
|
|
43335
43599
|
return {
|
|
43336
|
-
localeError:
|
|
43600
|
+
localeError: error13()
|
|
43337
43601
|
};
|
|
43338
43602
|
}
|
|
43339
|
-
var
|
|
43603
|
+
var error13 = () => {
|
|
43340
43604
|
const Sizable = {
|
|
43341
43605
|
string: { unit: "کاراکتر", verb: "داشته باشد" },
|
|
43342
43606
|
file: { unit: "بایت", verb: "داشته باشد" },
|
|
@@ -43451,10 +43715,10 @@ var init_fa = __esm(() => {
|
|
|
43451
43715
|
// node_modules/zod/v4/locales/fi.js
|
|
43452
43716
|
function fi_default() {
|
|
43453
43717
|
return {
|
|
43454
|
-
localeError:
|
|
43718
|
+
localeError: error14()
|
|
43455
43719
|
};
|
|
43456
43720
|
}
|
|
43457
|
-
var
|
|
43721
|
+
var error14 = () => {
|
|
43458
43722
|
const Sizable = {
|
|
43459
43723
|
string: { unit: "merkkiä", subject: "merkkijonon" },
|
|
43460
43724
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -43567,10 +43831,10 @@ var init_fi = __esm(() => {
|
|
|
43567
43831
|
// node_modules/zod/v4/locales/fr.js
|
|
43568
43832
|
function fr_default() {
|
|
43569
43833
|
return {
|
|
43570
|
-
localeError:
|
|
43834
|
+
localeError: error15()
|
|
43571
43835
|
};
|
|
43572
43836
|
}
|
|
43573
|
-
var
|
|
43837
|
+
var error15 = () => {
|
|
43574
43838
|
const Sizable = {
|
|
43575
43839
|
string: { unit: "caractères", verb: "avoir" },
|
|
43576
43840
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -43611,9 +43875,27 @@ var error14 = () => {
|
|
|
43611
43875
|
template_literal: "entrée"
|
|
43612
43876
|
};
|
|
43613
43877
|
const TypeDictionary = {
|
|
43614
|
-
|
|
43878
|
+
string: "chaîne",
|
|
43615
43879
|
number: "nombre",
|
|
43616
|
-
|
|
43880
|
+
int: "entier",
|
|
43881
|
+
boolean: "booléen",
|
|
43882
|
+
bigint: "grand entier",
|
|
43883
|
+
symbol: "symbole",
|
|
43884
|
+
undefined: "indéfini",
|
|
43885
|
+
null: "null",
|
|
43886
|
+
never: "jamais",
|
|
43887
|
+
void: "vide",
|
|
43888
|
+
date: "date",
|
|
43889
|
+
array: "tableau",
|
|
43890
|
+
object: "objet",
|
|
43891
|
+
tuple: "tuple",
|
|
43892
|
+
record: "enregistrement",
|
|
43893
|
+
map: "carte",
|
|
43894
|
+
set: "ensemble",
|
|
43895
|
+
file: "fichier",
|
|
43896
|
+
nonoptional: "non-optionnel",
|
|
43897
|
+
nan: "NaN",
|
|
43898
|
+
function: "fonction"
|
|
43617
43899
|
};
|
|
43618
43900
|
return (issue2) => {
|
|
43619
43901
|
switch (issue2.code) {
|
|
@@ -43634,16 +43916,15 @@ var error14 = () => {
|
|
|
43634
43916
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
43635
43917
|
const sizing = getSizing(issue2.origin);
|
|
43636
43918
|
if (sizing)
|
|
43637
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
|
|
43638
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit être ${adj}${issue2.maximum.toString()}`;
|
|
43919
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
|
|
43920
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit être ${adj}${issue2.maximum.toString()}`;
|
|
43639
43921
|
}
|
|
43640
43922
|
case "too_small": {
|
|
43641
43923
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
43642
43924
|
const sizing = getSizing(issue2.origin);
|
|
43643
|
-
if (sizing)
|
|
43644
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
43645
|
-
}
|
|
43646
|
-
return `Trop petit : ${issue2.origin} doit être ${adj}${issue2.minimum.toString()}`;
|
|
43925
|
+
if (sizing)
|
|
43926
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
43927
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit être ${adj}${issue2.minimum.toString()}`;
|
|
43647
43928
|
}
|
|
43648
43929
|
case "invalid_format": {
|
|
43649
43930
|
const _issue = issue2;
|
|
@@ -43679,10 +43960,10 @@ var init_fr = __esm(() => {
|
|
|
43679
43960
|
// node_modules/zod/v4/locales/fr-CA.js
|
|
43680
43961
|
function fr_CA_default() {
|
|
43681
43962
|
return {
|
|
43682
|
-
localeError:
|
|
43963
|
+
localeError: error16()
|
|
43683
43964
|
};
|
|
43684
43965
|
}
|
|
43685
|
-
var
|
|
43966
|
+
var error16 = () => {
|
|
43686
43967
|
const Sizable = {
|
|
43687
43968
|
string: { unit: "caractères", verb: "avoir" },
|
|
43688
43969
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -43790,10 +44071,10 @@ var init_fr_CA = __esm(() => {
|
|
|
43790
44071
|
// node_modules/zod/v4/locales/he.js
|
|
43791
44072
|
function he_default() {
|
|
43792
44073
|
return {
|
|
43793
|
-
localeError:
|
|
44074
|
+
localeError: error17()
|
|
43794
44075
|
};
|
|
43795
44076
|
}
|
|
43796
|
-
var
|
|
44077
|
+
var error17 = () => {
|
|
43797
44078
|
const TypeNames = {
|
|
43798
44079
|
string: { label: "מחרוזת", gender: "f" },
|
|
43799
44080
|
number: { label: "מספר", gender: "m" },
|
|
@@ -43984,13 +44265,139 @@ var init_he = __esm(() => {
|
|
|
43984
44265
|
init_util();
|
|
43985
44266
|
});
|
|
43986
44267
|
|
|
44268
|
+
// node_modules/zod/v4/locales/hr.js
|
|
44269
|
+
function hr_default() {
|
|
44270
|
+
return {
|
|
44271
|
+
localeError: error18()
|
|
44272
|
+
};
|
|
44273
|
+
}
|
|
44274
|
+
var error18 = () => {
|
|
44275
|
+
const Sizable = {
|
|
44276
|
+
string: { unit: "znakova", verb: "imati" },
|
|
44277
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
44278
|
+
array: { unit: "stavki", verb: "imati" },
|
|
44279
|
+
set: { unit: "stavki", verb: "imati" }
|
|
44280
|
+
};
|
|
44281
|
+
function getSizing(origin) {
|
|
44282
|
+
return Sizable[origin] ?? null;
|
|
44283
|
+
}
|
|
44284
|
+
const FormatDictionary = {
|
|
44285
|
+
regex: "unos",
|
|
44286
|
+
email: "email adresa",
|
|
44287
|
+
url: "URL",
|
|
44288
|
+
emoji: "emoji",
|
|
44289
|
+
uuid: "UUID",
|
|
44290
|
+
uuidv4: "UUIDv4",
|
|
44291
|
+
uuidv6: "UUIDv6",
|
|
44292
|
+
nanoid: "nanoid",
|
|
44293
|
+
guid: "GUID",
|
|
44294
|
+
cuid: "cuid",
|
|
44295
|
+
cuid2: "cuid2",
|
|
44296
|
+
ulid: "ULID",
|
|
44297
|
+
xid: "XID",
|
|
44298
|
+
ksuid: "KSUID",
|
|
44299
|
+
datetime: "ISO datum i vrijeme",
|
|
44300
|
+
date: "ISO datum",
|
|
44301
|
+
time: "ISO vrijeme",
|
|
44302
|
+
duration: "ISO trajanje",
|
|
44303
|
+
ipv4: "IPv4 adresa",
|
|
44304
|
+
ipv6: "IPv6 adresa",
|
|
44305
|
+
cidrv4: "IPv4 raspon",
|
|
44306
|
+
cidrv6: "IPv6 raspon",
|
|
44307
|
+
base64: "base64 kodirani tekst",
|
|
44308
|
+
base64url: "base64url kodirani tekst",
|
|
44309
|
+
json_string: "JSON tekst",
|
|
44310
|
+
e164: "E.164 broj",
|
|
44311
|
+
jwt: "JWT",
|
|
44312
|
+
template_literal: "unos"
|
|
44313
|
+
};
|
|
44314
|
+
const TypeDictionary = {
|
|
44315
|
+
nan: "NaN",
|
|
44316
|
+
string: "tekst",
|
|
44317
|
+
number: "broj",
|
|
44318
|
+
boolean: "boolean",
|
|
44319
|
+
array: "niz",
|
|
44320
|
+
object: "objekt",
|
|
44321
|
+
set: "skup",
|
|
44322
|
+
file: "datoteka",
|
|
44323
|
+
date: "datum",
|
|
44324
|
+
bigint: "bigint",
|
|
44325
|
+
symbol: "simbol",
|
|
44326
|
+
undefined: "undefined",
|
|
44327
|
+
null: "null",
|
|
44328
|
+
function: "funkcija",
|
|
44329
|
+
map: "mapa"
|
|
44330
|
+
};
|
|
44331
|
+
return (issue2) => {
|
|
44332
|
+
switch (issue2.code) {
|
|
44333
|
+
case "invalid_type": {
|
|
44334
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
44335
|
+
const receivedType = parsedType(issue2.input);
|
|
44336
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
44337
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
44338
|
+
return `Neispravan unos: očekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
44339
|
+
}
|
|
44340
|
+
return `Neispravan unos: očekuje se ${expected}, a primljeno je ${received}`;
|
|
44341
|
+
}
|
|
44342
|
+
case "invalid_value":
|
|
44343
|
+
if (issue2.values.length === 1)
|
|
44344
|
+
return `Neispravna vrijednost: očekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
44345
|
+
return `Neispravna opcija: očekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
44346
|
+
case "too_big": {
|
|
44347
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
44348
|
+
const sizing = getSizing(issue2.origin);
|
|
44349
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
44350
|
+
if (sizing)
|
|
44351
|
+
return `Preveliko: očekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
44352
|
+
return `Preveliko: očekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
44353
|
+
}
|
|
44354
|
+
case "too_small": {
|
|
44355
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
44356
|
+
const sizing = getSizing(issue2.origin);
|
|
44357
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
44358
|
+
if (sizing) {
|
|
44359
|
+
return `Premalo: očekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
44360
|
+
}
|
|
44361
|
+
return `Premalo: očekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
44362
|
+
}
|
|
44363
|
+
case "invalid_format": {
|
|
44364
|
+
const _issue = issue2;
|
|
44365
|
+
if (_issue.format === "starts_with")
|
|
44366
|
+
return `Neispravan tekst: mora započinjati s "${_issue.prefix}"`;
|
|
44367
|
+
if (_issue.format === "ends_with")
|
|
44368
|
+
return `Neispravan tekst: mora završavati s "${_issue.suffix}"`;
|
|
44369
|
+
if (_issue.format === "includes")
|
|
44370
|
+
return `Neispravan tekst: mora sadržavati "${_issue.includes}"`;
|
|
44371
|
+
if (_issue.format === "regex")
|
|
44372
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
44373
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
44374
|
+
}
|
|
44375
|
+
case "not_multiple_of":
|
|
44376
|
+
return `Neispravan broj: mora biti višekratnik od ${issue2.divisor}`;
|
|
44377
|
+
case "unrecognized_keys":
|
|
44378
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i ključevi" : " ključ"}: ${joinValues(issue2.keys, ", ")}`;
|
|
44379
|
+
case "invalid_key":
|
|
44380
|
+
return `Neispravan ključ u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
44381
|
+
case "invalid_union":
|
|
44382
|
+
return "Neispravan unos";
|
|
44383
|
+
case "invalid_element":
|
|
44384
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
44385
|
+
default:
|
|
44386
|
+
return `Neispravan unos`;
|
|
44387
|
+
}
|
|
44388
|
+
};
|
|
44389
|
+
};
|
|
44390
|
+
var init_hr = __esm(() => {
|
|
44391
|
+
init_util();
|
|
44392
|
+
});
|
|
44393
|
+
|
|
43987
44394
|
// node_modules/zod/v4/locales/hu.js
|
|
43988
44395
|
function hu_default() {
|
|
43989
44396
|
return {
|
|
43990
|
-
localeError:
|
|
44397
|
+
localeError: error19()
|
|
43991
44398
|
};
|
|
43992
44399
|
}
|
|
43993
|
-
var
|
|
44400
|
+
var error19 = () => {
|
|
43994
44401
|
const Sizable = {
|
|
43995
44402
|
string: { unit: "karakter", verb: "legyen" },
|
|
43996
44403
|
file: { unit: "byte", verb: "legyen" },
|
|
@@ -44109,10 +44516,10 @@ function withDefiniteArticle(word) {
|
|
|
44109
44516
|
}
|
|
44110
44517
|
function hy_default() {
|
|
44111
44518
|
return {
|
|
44112
|
-
localeError:
|
|
44519
|
+
localeError: error20()
|
|
44113
44520
|
};
|
|
44114
44521
|
}
|
|
44115
|
-
var
|
|
44522
|
+
var error20 = () => {
|
|
44116
44523
|
const Sizable = {
|
|
44117
44524
|
string: {
|
|
44118
44525
|
unit: {
|
|
@@ -44250,10 +44657,10 @@ var init_hy = __esm(() => {
|
|
|
44250
44657
|
// node_modules/zod/v4/locales/id.js
|
|
44251
44658
|
function id_default() {
|
|
44252
44659
|
return {
|
|
44253
|
-
localeError:
|
|
44660
|
+
localeError: error21()
|
|
44254
44661
|
};
|
|
44255
44662
|
}
|
|
44256
|
-
var
|
|
44663
|
+
var error21 = () => {
|
|
44257
44664
|
const Sizable = {
|
|
44258
44665
|
string: { unit: "karakter", verb: "memiliki" },
|
|
44259
44666
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -44360,10 +44767,10 @@ var init_id = __esm(() => {
|
|
|
44360
44767
|
// node_modules/zod/v4/locales/is.js
|
|
44361
44768
|
function is_default() {
|
|
44362
44769
|
return {
|
|
44363
|
-
localeError:
|
|
44770
|
+
localeError: error22()
|
|
44364
44771
|
};
|
|
44365
44772
|
}
|
|
44366
|
-
var
|
|
44773
|
+
var error22 = () => {
|
|
44367
44774
|
const Sizable = {
|
|
44368
44775
|
string: { unit: "stafi", verb: "að hafa" },
|
|
44369
44776
|
file: { unit: "bæti", verb: "að hafa" },
|
|
@@ -44473,10 +44880,10 @@ var init_is = __esm(() => {
|
|
|
44473
44880
|
// node_modules/zod/v4/locales/it.js
|
|
44474
44881
|
function it_default() {
|
|
44475
44882
|
return {
|
|
44476
|
-
localeError:
|
|
44883
|
+
localeError: error23()
|
|
44477
44884
|
};
|
|
44478
44885
|
}
|
|
44479
|
-
var
|
|
44886
|
+
var error23 = () => {
|
|
44480
44887
|
const Sizable = {
|
|
44481
44888
|
string: { unit: "caratteri", verb: "avere" },
|
|
44482
44889
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -44561,7 +44968,7 @@ var error21 = () => {
|
|
|
44561
44968
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
44562
44969
|
if (_issue.format === "regex")
|
|
44563
44970
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
44564
|
-
return `
|
|
44971
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
44565
44972
|
}
|
|
44566
44973
|
case "not_multiple_of":
|
|
44567
44974
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -44585,10 +44992,10 @@ var init_it = __esm(() => {
|
|
|
44585
44992
|
// node_modules/zod/v4/locales/ja.js
|
|
44586
44993
|
function ja_default() {
|
|
44587
44994
|
return {
|
|
44588
|
-
localeError:
|
|
44995
|
+
localeError: error24()
|
|
44589
44996
|
};
|
|
44590
44997
|
}
|
|
44591
|
-
var
|
|
44998
|
+
var error24 = () => {
|
|
44592
44999
|
const Sizable = {
|
|
44593
45000
|
string: { unit: "文字", verb: "である" },
|
|
44594
45001
|
file: { unit: "バイト", verb: "である" },
|
|
@@ -44696,10 +45103,10 @@ var init_ja = __esm(() => {
|
|
|
44696
45103
|
// node_modules/zod/v4/locales/ka.js
|
|
44697
45104
|
function ka_default() {
|
|
44698
45105
|
return {
|
|
44699
|
-
localeError:
|
|
45106
|
+
localeError: error25()
|
|
44700
45107
|
};
|
|
44701
45108
|
}
|
|
44702
|
-
var
|
|
45109
|
+
var error25 = () => {
|
|
44703
45110
|
const Sizable = {
|
|
44704
45111
|
string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
|
|
44705
45112
|
file: { unit: "ბაიტი", verb: "უნდა შეიცავდეს" },
|
|
@@ -44732,9 +45139,9 @@ var error23 = () => {
|
|
|
44732
45139
|
ipv6: "IPv6 მისამართი",
|
|
44733
45140
|
cidrv4: "IPv4 დიაპაზონი",
|
|
44734
45141
|
cidrv6: "IPv6 დიაპაზონი",
|
|
44735
|
-
base64: "base64-კოდირებული
|
|
44736
|
-
base64url: "base64url-კოდირებული
|
|
44737
|
-
json_string: "JSON
|
|
45142
|
+
base64: "base64-კოდირებული ველი",
|
|
45143
|
+
base64url: "base64url-კოდირებული ველი",
|
|
45144
|
+
json_string: "JSON ველი",
|
|
44738
45145
|
e164: "E.164 ნომერი",
|
|
44739
45146
|
jwt: "JWT",
|
|
44740
45147
|
template_literal: "შეყვანა"
|
|
@@ -44742,7 +45149,7 @@ var error23 = () => {
|
|
|
44742
45149
|
const TypeDictionary = {
|
|
44743
45150
|
nan: "NaN",
|
|
44744
45151
|
number: "რიცხვი",
|
|
44745
|
-
string: "
|
|
45152
|
+
string: "ველი",
|
|
44746
45153
|
boolean: "ბულეანი",
|
|
44747
45154
|
function: "ფუნქცია",
|
|
44748
45155
|
array: "მასივი"
|
|
@@ -44780,14 +45187,14 @@ var error23 = () => {
|
|
|
44780
45187
|
case "invalid_format": {
|
|
44781
45188
|
const _issue = issue2;
|
|
44782
45189
|
if (_issue.format === "starts_with") {
|
|
44783
|
-
return `არასწორი
|
|
45190
|
+
return `არასწორი ველი: უნდა იწყებოდეს "${_issue.prefix}"-ით`;
|
|
44784
45191
|
}
|
|
44785
45192
|
if (_issue.format === "ends_with")
|
|
44786
|
-
return `არასწორი
|
|
45193
|
+
return `არასწორი ველი: უნდა მთავრდებოდეს "${_issue.suffix}"-ით`;
|
|
44787
45194
|
if (_issue.format === "includes")
|
|
44788
|
-
return `არასწორი
|
|
45195
|
+
return `არასწორი ველი: უნდა შეიცავდეს "${_issue.includes}"-ს`;
|
|
44789
45196
|
if (_issue.format === "regex")
|
|
44790
|
-
return `არასწორი
|
|
45197
|
+
return `არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${_issue.pattern}`;
|
|
44791
45198
|
return `არასწორი ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
44792
45199
|
}
|
|
44793
45200
|
case "not_multiple_of":
|
|
@@ -44812,10 +45219,10 @@ var init_ka = __esm(() => {
|
|
|
44812
45219
|
// node_modules/zod/v4/locales/km.js
|
|
44813
45220
|
function km_default() {
|
|
44814
45221
|
return {
|
|
44815
|
-
localeError:
|
|
45222
|
+
localeError: error26()
|
|
44816
45223
|
};
|
|
44817
45224
|
}
|
|
44818
|
-
var
|
|
45225
|
+
var error26 = () => {
|
|
44819
45226
|
const Sizable = {
|
|
44820
45227
|
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
|
|
44821
45228
|
file: { unit: "បៃ", verb: "គួរមាន" },
|
|
@@ -44934,10 +45341,10 @@ var init_kh = __esm(() => {
|
|
|
44934
45341
|
// node_modules/zod/v4/locales/ko.js
|
|
44935
45342
|
function ko_default() {
|
|
44936
45343
|
return {
|
|
44937
|
-
localeError:
|
|
45344
|
+
localeError: error27()
|
|
44938
45345
|
};
|
|
44939
45346
|
}
|
|
44940
|
-
var
|
|
45347
|
+
var error27 = () => {
|
|
44941
45348
|
const Sizable = {
|
|
44942
45349
|
string: { unit: "문자", verb: "to have" },
|
|
44943
45350
|
file: { unit: "바이트", verb: "to have" },
|
|
@@ -45059,12 +45466,12 @@ function getUnitTypeFromNumber(number2) {
|
|
|
45059
45466
|
}
|
|
45060
45467
|
function lt_default() {
|
|
45061
45468
|
return {
|
|
45062
|
-
localeError:
|
|
45469
|
+
localeError: error28()
|
|
45063
45470
|
};
|
|
45064
45471
|
}
|
|
45065
45472
|
var capitalizeFirstCharacter = (text) => {
|
|
45066
45473
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
45067
|
-
},
|
|
45474
|
+
}, error28 = () => {
|
|
45068
45475
|
const Sizable = {
|
|
45069
45476
|
string: {
|
|
45070
45477
|
unit: {
|
|
@@ -45255,10 +45662,10 @@ var init_lt = __esm(() => {
|
|
|
45255
45662
|
// node_modules/zod/v4/locales/mk.js
|
|
45256
45663
|
function mk_default() {
|
|
45257
45664
|
return {
|
|
45258
|
-
localeError:
|
|
45665
|
+
localeError: error29()
|
|
45259
45666
|
};
|
|
45260
45667
|
}
|
|
45261
|
-
var
|
|
45668
|
+
var error29 = () => {
|
|
45262
45669
|
const Sizable = {
|
|
45263
45670
|
string: { unit: "знаци", verb: "да имаат" },
|
|
45264
45671
|
file: { unit: "бајти", verb: "да имаат" },
|
|
@@ -45368,10 +45775,10 @@ var init_mk = __esm(() => {
|
|
|
45368
45775
|
// node_modules/zod/v4/locales/ms.js
|
|
45369
45776
|
function ms_default() {
|
|
45370
45777
|
return {
|
|
45371
|
-
localeError:
|
|
45778
|
+
localeError: error30()
|
|
45372
45779
|
};
|
|
45373
45780
|
}
|
|
45374
|
-
var
|
|
45781
|
+
var error30 = () => {
|
|
45375
45782
|
const Sizable = {
|
|
45376
45783
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
45377
45784
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -45479,10 +45886,10 @@ var init_ms = __esm(() => {
|
|
|
45479
45886
|
// node_modules/zod/v4/locales/nl.js
|
|
45480
45887
|
function nl_default() {
|
|
45481
45888
|
return {
|
|
45482
|
-
localeError:
|
|
45889
|
+
localeError: error31()
|
|
45483
45890
|
};
|
|
45484
45891
|
}
|
|
45485
|
-
var
|
|
45892
|
+
var error31 = () => {
|
|
45486
45893
|
const Sizable = {
|
|
45487
45894
|
string: { unit: "tekens", verb: "heeft" },
|
|
45488
45895
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -45593,10 +46000,10 @@ var init_nl = __esm(() => {
|
|
|
45593
46000
|
// node_modules/zod/v4/locales/no.js
|
|
45594
46001
|
function no_default() {
|
|
45595
46002
|
return {
|
|
45596
|
-
localeError:
|
|
46003
|
+
localeError: error32()
|
|
45597
46004
|
};
|
|
45598
46005
|
}
|
|
45599
|
-
var
|
|
46006
|
+
var error32 = () => {
|
|
45600
46007
|
const Sizable = {
|
|
45601
46008
|
string: { unit: "tegn", verb: "å ha" },
|
|
45602
46009
|
file: { unit: "bytes", verb: "å ha" },
|
|
@@ -45705,10 +46112,10 @@ var init_no = __esm(() => {
|
|
|
45705
46112
|
// node_modules/zod/v4/locales/ota.js
|
|
45706
46113
|
function ota_default() {
|
|
45707
46114
|
return {
|
|
45708
|
-
localeError:
|
|
46115
|
+
localeError: error33()
|
|
45709
46116
|
};
|
|
45710
46117
|
}
|
|
45711
|
-
var
|
|
46118
|
+
var error33 = () => {
|
|
45712
46119
|
const Sizable = {
|
|
45713
46120
|
string: { unit: "harf", verb: "olmalıdır" },
|
|
45714
46121
|
file: { unit: "bayt", verb: "olmalıdır" },
|
|
@@ -45818,10 +46225,10 @@ var init_ota = __esm(() => {
|
|
|
45818
46225
|
// node_modules/zod/v4/locales/ps.js
|
|
45819
46226
|
function ps_default() {
|
|
45820
46227
|
return {
|
|
45821
|
-
localeError:
|
|
46228
|
+
localeError: error34()
|
|
45822
46229
|
};
|
|
45823
46230
|
}
|
|
45824
|
-
var
|
|
46231
|
+
var error34 = () => {
|
|
45825
46232
|
const Sizable = {
|
|
45826
46233
|
string: { unit: "توکي", verb: "ولري" },
|
|
45827
46234
|
file: { unit: "بایټس", verb: "ولري" },
|
|
@@ -45936,10 +46343,10 @@ var init_ps = __esm(() => {
|
|
|
45936
46343
|
// node_modules/zod/v4/locales/pl.js
|
|
45937
46344
|
function pl_default() {
|
|
45938
46345
|
return {
|
|
45939
|
-
localeError:
|
|
46346
|
+
localeError: error35()
|
|
45940
46347
|
};
|
|
45941
46348
|
}
|
|
45942
|
-
var
|
|
46349
|
+
var error35 = () => {
|
|
45943
46350
|
const Sizable = {
|
|
45944
46351
|
string: { unit: "znaków", verb: "mieć" },
|
|
45945
46352
|
file: { unit: "bajtów", verb: "mieć" },
|
|
@@ -46049,10 +46456,10 @@ var init_pl = __esm(() => {
|
|
|
46049
46456
|
// node_modules/zod/v4/locales/pt.js
|
|
46050
46457
|
function pt_default() {
|
|
46051
46458
|
return {
|
|
46052
|
-
localeError:
|
|
46459
|
+
localeError: error36()
|
|
46053
46460
|
};
|
|
46054
46461
|
}
|
|
46055
|
-
var
|
|
46462
|
+
var error36 = () => {
|
|
46056
46463
|
const Sizable = {
|
|
46057
46464
|
string: { unit: "caracteres", verb: "ter" },
|
|
46058
46465
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -46158,6 +46565,129 @@ var init_pt = __esm(() => {
|
|
|
46158
46565
|
init_util();
|
|
46159
46566
|
});
|
|
46160
46567
|
|
|
46568
|
+
// node_modules/zod/v4/locales/ro.js
|
|
46569
|
+
function ro_default() {
|
|
46570
|
+
return {
|
|
46571
|
+
localeError: error37()
|
|
46572
|
+
};
|
|
46573
|
+
}
|
|
46574
|
+
var error37 = () => {
|
|
46575
|
+
const Sizable = {
|
|
46576
|
+
string: { unit: "caractere", verb: "să aibă" },
|
|
46577
|
+
file: { unit: "octeți", verb: "să aibă" },
|
|
46578
|
+
array: { unit: "elemente", verb: "să aibă" },
|
|
46579
|
+
set: { unit: "elemente", verb: "să aibă" },
|
|
46580
|
+
map: { unit: "intrări", verb: "să aibă" }
|
|
46581
|
+
};
|
|
46582
|
+
function getSizing(origin) {
|
|
46583
|
+
return Sizable[origin] ?? null;
|
|
46584
|
+
}
|
|
46585
|
+
const FormatDictionary = {
|
|
46586
|
+
regex: "intrare",
|
|
46587
|
+
email: "adresă de email",
|
|
46588
|
+
url: "URL",
|
|
46589
|
+
emoji: "emoji",
|
|
46590
|
+
uuid: "UUID",
|
|
46591
|
+
uuidv4: "UUIDv4",
|
|
46592
|
+
uuidv6: "UUIDv6",
|
|
46593
|
+
nanoid: "nanoid",
|
|
46594
|
+
guid: "GUID",
|
|
46595
|
+
cuid: "cuid",
|
|
46596
|
+
cuid2: "cuid2",
|
|
46597
|
+
ulid: "ULID",
|
|
46598
|
+
xid: "XID",
|
|
46599
|
+
ksuid: "KSUID",
|
|
46600
|
+
datetime: "dată și oră ISO",
|
|
46601
|
+
date: "dată ISO",
|
|
46602
|
+
time: "oră ISO",
|
|
46603
|
+
duration: "durată ISO",
|
|
46604
|
+
ipv4: "adresă IPv4",
|
|
46605
|
+
ipv6: "adresă IPv6",
|
|
46606
|
+
mac: "adresă MAC",
|
|
46607
|
+
cidrv4: "interval IPv4",
|
|
46608
|
+
cidrv6: "interval IPv6",
|
|
46609
|
+
base64: "șir codat base64",
|
|
46610
|
+
base64url: "șir codat base64url",
|
|
46611
|
+
json_string: "șir JSON",
|
|
46612
|
+
e164: "număr E.164",
|
|
46613
|
+
jwt: "JWT",
|
|
46614
|
+
template_literal: "intrare"
|
|
46615
|
+
};
|
|
46616
|
+
const TypeDictionary = {
|
|
46617
|
+
nan: "NaN",
|
|
46618
|
+
string: "șir",
|
|
46619
|
+
number: "număr",
|
|
46620
|
+
boolean: "boolean",
|
|
46621
|
+
function: "funcție",
|
|
46622
|
+
array: "matrice",
|
|
46623
|
+
object: "obiect",
|
|
46624
|
+
undefined: "nedefinit",
|
|
46625
|
+
symbol: "simbol",
|
|
46626
|
+
bigint: "număr mare",
|
|
46627
|
+
void: "void",
|
|
46628
|
+
never: "never",
|
|
46629
|
+
map: "hartă",
|
|
46630
|
+
set: "set"
|
|
46631
|
+
};
|
|
46632
|
+
return (issue2) => {
|
|
46633
|
+
switch (issue2.code) {
|
|
46634
|
+
case "invalid_type": {
|
|
46635
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
46636
|
+
const receivedType = parsedType(issue2.input);
|
|
46637
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
46638
|
+
return `Intrare invalidă: așteptat ${expected}, primit ${received}`;
|
|
46639
|
+
}
|
|
46640
|
+
case "invalid_value":
|
|
46641
|
+
if (issue2.values.length === 1)
|
|
46642
|
+
return `Intrare invalidă: așteptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
46643
|
+
return `Opțiune invalidă: așteptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
46644
|
+
case "too_big": {
|
|
46645
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
46646
|
+
const sizing = getSizing(issue2.origin);
|
|
46647
|
+
if (sizing)
|
|
46648
|
+
return `Prea mare: așteptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
46649
|
+
return `Prea mare: așteptat ca ${issue2.origin ?? "valoarea"} să fie ${adj}${issue2.maximum.toString()}`;
|
|
46650
|
+
}
|
|
46651
|
+
case "too_small": {
|
|
46652
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
46653
|
+
const sizing = getSizing(issue2.origin);
|
|
46654
|
+
if (sizing) {
|
|
46655
|
+
return `Prea mic: așteptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
46656
|
+
}
|
|
46657
|
+
return `Prea mic: așteptat ca ${issue2.origin} să fie ${adj}${issue2.minimum.toString()}`;
|
|
46658
|
+
}
|
|
46659
|
+
case "invalid_format": {
|
|
46660
|
+
const _issue = issue2;
|
|
46661
|
+
if (_issue.format === "starts_with") {
|
|
46662
|
+
return `Șir invalid: trebuie să înceapă cu "${_issue.prefix}"`;
|
|
46663
|
+
}
|
|
46664
|
+
if (_issue.format === "ends_with")
|
|
46665
|
+
return `Șir invalid: trebuie să se termine cu "${_issue.suffix}"`;
|
|
46666
|
+
if (_issue.format === "includes")
|
|
46667
|
+
return `Șir invalid: trebuie să includă "${_issue.includes}"`;
|
|
46668
|
+
if (_issue.format === "regex")
|
|
46669
|
+
return `Șir invalid: trebuie să se potrivească cu modelul ${_issue.pattern}`;
|
|
46670
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
46671
|
+
}
|
|
46672
|
+
case "not_multiple_of":
|
|
46673
|
+
return `Număr invalid: trebuie să fie multiplu de ${issue2.divisor}`;
|
|
46674
|
+
case "unrecognized_keys":
|
|
46675
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
46676
|
+
case "invalid_key":
|
|
46677
|
+
return `Cheie invalidă în ${issue2.origin}`;
|
|
46678
|
+
case "invalid_union":
|
|
46679
|
+
return "Intrare invalidă";
|
|
46680
|
+
case "invalid_element":
|
|
46681
|
+
return `Valoare invalidă în ${issue2.origin}`;
|
|
46682
|
+
default:
|
|
46683
|
+
return `Intrare invalidă`;
|
|
46684
|
+
}
|
|
46685
|
+
};
|
|
46686
|
+
};
|
|
46687
|
+
var init_ro = __esm(() => {
|
|
46688
|
+
init_util();
|
|
46689
|
+
});
|
|
46690
|
+
|
|
46161
46691
|
// node_modules/zod/v4/locales/ru.js
|
|
46162
46692
|
function getRussianPlural(count, one, few, many) {
|
|
46163
46693
|
const absCount = Math.abs(count);
|
|
@@ -46176,10 +46706,10 @@ function getRussianPlural(count, one, few, many) {
|
|
|
46176
46706
|
}
|
|
46177
46707
|
function ru_default() {
|
|
46178
46708
|
return {
|
|
46179
|
-
localeError:
|
|
46709
|
+
localeError: error38()
|
|
46180
46710
|
};
|
|
46181
46711
|
}
|
|
46182
|
-
var
|
|
46712
|
+
var error38 = () => {
|
|
46183
46713
|
const Sizable = {
|
|
46184
46714
|
string: {
|
|
46185
46715
|
unit: {
|
|
@@ -46321,10 +46851,10 @@ var init_ru = __esm(() => {
|
|
|
46321
46851
|
// node_modules/zod/v4/locales/sl.js
|
|
46322
46852
|
function sl_default() {
|
|
46323
46853
|
return {
|
|
46324
|
-
localeError:
|
|
46854
|
+
localeError: error39()
|
|
46325
46855
|
};
|
|
46326
46856
|
}
|
|
46327
|
-
var
|
|
46857
|
+
var error39 = () => {
|
|
46328
46858
|
const Sizable = {
|
|
46329
46859
|
string: { unit: "znakov", verb: "imeti" },
|
|
46330
46860
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -46434,10 +46964,10 @@ var init_sl = __esm(() => {
|
|
|
46434
46964
|
// node_modules/zod/v4/locales/sv.js
|
|
46435
46965
|
function sv_default() {
|
|
46436
46966
|
return {
|
|
46437
|
-
localeError:
|
|
46967
|
+
localeError: error40()
|
|
46438
46968
|
};
|
|
46439
46969
|
}
|
|
46440
|
-
var
|
|
46970
|
+
var error40 = () => {
|
|
46441
46971
|
const Sizable = {
|
|
46442
46972
|
string: { unit: "tecken", verb: "att ha" },
|
|
46443
46973
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -46548,10 +47078,10 @@ var init_sv = __esm(() => {
|
|
|
46548
47078
|
// node_modules/zod/v4/locales/ta.js
|
|
46549
47079
|
function ta_default() {
|
|
46550
47080
|
return {
|
|
46551
|
-
localeError:
|
|
47081
|
+
localeError: error41()
|
|
46552
47082
|
};
|
|
46553
47083
|
}
|
|
46554
|
-
var
|
|
47084
|
+
var error41 = () => {
|
|
46555
47085
|
const Sizable = {
|
|
46556
47086
|
string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
46557
47087
|
file: { unit: "பைட்டுகள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
@@ -46662,10 +47192,10 @@ var init_ta = __esm(() => {
|
|
|
46662
47192
|
// node_modules/zod/v4/locales/th.js
|
|
46663
47193
|
function th_default() {
|
|
46664
47194
|
return {
|
|
46665
|
-
localeError:
|
|
47195
|
+
localeError: error42()
|
|
46666
47196
|
};
|
|
46667
47197
|
}
|
|
46668
|
-
var
|
|
47198
|
+
var error42 = () => {
|
|
46669
47199
|
const Sizable = {
|
|
46670
47200
|
string: { unit: "ตัวอักษร", verb: "ควรมี" },
|
|
46671
47201
|
file: { unit: "ไบต์", verb: "ควรมี" },
|
|
@@ -46776,10 +47306,10 @@ var init_th = __esm(() => {
|
|
|
46776
47306
|
// node_modules/zod/v4/locales/tr.js
|
|
46777
47307
|
function tr_default() {
|
|
46778
47308
|
return {
|
|
46779
|
-
localeError:
|
|
47309
|
+
localeError: error43()
|
|
46780
47310
|
};
|
|
46781
47311
|
}
|
|
46782
|
-
var
|
|
47312
|
+
var error43 = () => {
|
|
46783
47313
|
const Sizable = {
|
|
46784
47314
|
string: { unit: "karakter", verb: "olmalı" },
|
|
46785
47315
|
file: { unit: "bayt", verb: "olmalı" },
|
|
@@ -46885,10 +47415,10 @@ var init_tr = __esm(() => {
|
|
|
46885
47415
|
// node_modules/zod/v4/locales/uk.js
|
|
46886
47416
|
function uk_default() {
|
|
46887
47417
|
return {
|
|
46888
|
-
localeError:
|
|
47418
|
+
localeError: error44()
|
|
46889
47419
|
};
|
|
46890
47420
|
}
|
|
46891
|
-
var
|
|
47421
|
+
var error44 = () => {
|
|
46892
47422
|
const Sizable = {
|
|
46893
47423
|
string: { unit: "символів", verb: "матиме" },
|
|
46894
47424
|
file: { unit: "байтів", verb: "матиме" },
|
|
@@ -47005,10 +47535,10 @@ var init_ua = __esm(() => {
|
|
|
47005
47535
|
// node_modules/zod/v4/locales/ur.js
|
|
47006
47536
|
function ur_default() {
|
|
47007
47537
|
return {
|
|
47008
|
-
localeError:
|
|
47538
|
+
localeError: error45()
|
|
47009
47539
|
};
|
|
47010
47540
|
}
|
|
47011
|
-
var
|
|
47541
|
+
var error45 = () => {
|
|
47012
47542
|
const Sizable = {
|
|
47013
47543
|
string: { unit: "حروف", verb: "ہونا" },
|
|
47014
47544
|
file: { unit: "بائٹس", verb: "ہونا" },
|
|
@@ -47119,15 +47649,16 @@ var init_ur = __esm(() => {
|
|
|
47119
47649
|
// node_modules/zod/v4/locales/uz.js
|
|
47120
47650
|
function uz_default() {
|
|
47121
47651
|
return {
|
|
47122
|
-
localeError:
|
|
47652
|
+
localeError: error46()
|
|
47123
47653
|
};
|
|
47124
47654
|
}
|
|
47125
|
-
var
|
|
47655
|
+
var error46 = () => {
|
|
47126
47656
|
const Sizable = {
|
|
47127
47657
|
string: { unit: "belgi", verb: "bo‘lishi kerak" },
|
|
47128
47658
|
file: { unit: "bayt", verb: "bo‘lishi kerak" },
|
|
47129
47659
|
array: { unit: "element", verb: "bo‘lishi kerak" },
|
|
47130
|
-
set: { unit: "element", verb: "bo‘lishi kerak" }
|
|
47660
|
+
set: { unit: "element", verb: "bo‘lishi kerak" },
|
|
47661
|
+
map: { unit: "yozuv", verb: "bo‘lishi kerak" }
|
|
47131
47662
|
};
|
|
47132
47663
|
function getSizing(origin) {
|
|
47133
47664
|
return Sizable[origin] ?? null;
|
|
@@ -47232,10 +47763,10 @@ var init_uz = __esm(() => {
|
|
|
47232
47763
|
// node_modules/zod/v4/locales/vi.js
|
|
47233
47764
|
function vi_default() {
|
|
47234
47765
|
return {
|
|
47235
|
-
localeError:
|
|
47766
|
+
localeError: error47()
|
|
47236
47767
|
};
|
|
47237
47768
|
}
|
|
47238
|
-
var
|
|
47769
|
+
var error47 = () => {
|
|
47239
47770
|
const Sizable = {
|
|
47240
47771
|
string: { unit: "ký tự", verb: "có" },
|
|
47241
47772
|
file: { unit: "byte", verb: "có" },
|
|
@@ -47344,10 +47875,10 @@ var init_vi = __esm(() => {
|
|
|
47344
47875
|
// node_modules/zod/v4/locales/zh-CN.js
|
|
47345
47876
|
function zh_CN_default() {
|
|
47346
47877
|
return {
|
|
47347
|
-
localeError:
|
|
47878
|
+
localeError: error48()
|
|
47348
47879
|
};
|
|
47349
47880
|
}
|
|
47350
|
-
var
|
|
47881
|
+
var error48 = () => {
|
|
47351
47882
|
const Sizable = {
|
|
47352
47883
|
string: { unit: "字符", verb: "包含" },
|
|
47353
47884
|
file: { unit: "字节", verb: "包含" },
|
|
@@ -47457,10 +47988,10 @@ var init_zh_CN = __esm(() => {
|
|
|
47457
47988
|
// node_modules/zod/v4/locales/zh-TW.js
|
|
47458
47989
|
function zh_TW_default() {
|
|
47459
47990
|
return {
|
|
47460
|
-
localeError:
|
|
47991
|
+
localeError: error49()
|
|
47461
47992
|
};
|
|
47462
47993
|
}
|
|
47463
|
-
var
|
|
47994
|
+
var error49 = () => {
|
|
47464
47995
|
const Sizable = {
|
|
47465
47996
|
string: { unit: "字元", verb: "擁有" },
|
|
47466
47997
|
file: { unit: "位元組", verb: "擁有" },
|
|
@@ -47568,10 +48099,10 @@ var init_zh_TW = __esm(() => {
|
|
|
47568
48099
|
// node_modules/zod/v4/locales/yo.js
|
|
47569
48100
|
function yo_default() {
|
|
47570
48101
|
return {
|
|
47571
|
-
localeError:
|
|
48102
|
+
localeError: error50()
|
|
47572
48103
|
};
|
|
47573
48104
|
}
|
|
47574
|
-
var
|
|
48105
|
+
var error50 = () => {
|
|
47575
48106
|
const Sizable = {
|
|
47576
48107
|
string: { unit: "àmi", verb: "ní" },
|
|
47577
48108
|
file: { unit: "bytes", verb: "ní" },
|
|
@@ -47693,6 +48224,7 @@ __export(exports_locales, {
|
|
|
47693
48224
|
sv: () => sv_default,
|
|
47694
48225
|
sl: () => sl_default,
|
|
47695
48226
|
ru: () => ru_default,
|
|
48227
|
+
ro: () => ro_default,
|
|
47696
48228
|
pt: () => pt_default,
|
|
47697
48229
|
ps: () => ps_default,
|
|
47698
48230
|
pl: () => pl_default,
|
|
@@ -47712,6 +48244,7 @@ __export(exports_locales, {
|
|
|
47712
48244
|
id: () => id_default,
|
|
47713
48245
|
hy: () => hy_default,
|
|
47714
48246
|
hu: () => hu_default,
|
|
48247
|
+
hr: () => hr_default,
|
|
47715
48248
|
he: () => he_default,
|
|
47716
48249
|
frCA: () => fr_CA_default,
|
|
47717
48250
|
fr: () => fr_default,
|
|
@@ -47720,6 +48253,7 @@ __export(exports_locales, {
|
|
|
47720
48253
|
es: () => es_default,
|
|
47721
48254
|
eo: () => eo_default,
|
|
47722
48255
|
en: () => en_default,
|
|
48256
|
+
el: () => el_default,
|
|
47723
48257
|
de: () => de_default,
|
|
47724
48258
|
da: () => da_default,
|
|
47725
48259
|
cs: () => cs_default,
|
|
@@ -47738,6 +48272,7 @@ var init_locales = __esm(() => {
|
|
|
47738
48272
|
init_cs();
|
|
47739
48273
|
init_da();
|
|
47740
48274
|
init_de();
|
|
48275
|
+
init_el();
|
|
47741
48276
|
init_en();
|
|
47742
48277
|
init_eo();
|
|
47743
48278
|
init_es();
|
|
@@ -47746,6 +48281,7 @@ var init_locales = __esm(() => {
|
|
|
47746
48281
|
init_fr();
|
|
47747
48282
|
init_fr_CA();
|
|
47748
48283
|
init_he();
|
|
48284
|
+
init_hr();
|
|
47749
48285
|
init_hu();
|
|
47750
48286
|
init_hy();
|
|
47751
48287
|
init_id();
|
|
@@ -47765,6 +48301,7 @@ var init_locales = __esm(() => {
|
|
|
47765
48301
|
init_ps();
|
|
47766
48302
|
init_pl();
|
|
47767
48303
|
init_pt();
|
|
48304
|
+
init_ro();
|
|
47768
48305
|
init_ru();
|
|
47769
48306
|
init_sl();
|
|
47770
48307
|
init_sv();
|
|
@@ -47825,11 +48362,11 @@ class $ZodRegistry {
|
|
|
47825
48362
|
function registry() {
|
|
47826
48363
|
return new $ZodRegistry;
|
|
47827
48364
|
}
|
|
47828
|
-
var
|
|
48365
|
+
var _a2, $output, $input, globalRegistry;
|
|
47829
48366
|
var init_registries = __esm(() => {
|
|
47830
48367
|
$output = Symbol("ZodOutput");
|
|
47831
48368
|
$input = Symbol("ZodInput");
|
|
47832
|
-
(
|
|
48369
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
47833
48370
|
globalRegistry = globalThis.__zod_globalRegistry;
|
|
47834
48371
|
});
|
|
47835
48372
|
|
|
@@ -48630,7 +49167,7 @@ function _refine(Class2, fn, _params) {
|
|
|
48630
49167
|
});
|
|
48631
49168
|
return schema;
|
|
48632
49169
|
}
|
|
48633
|
-
function _superRefine(fn) {
|
|
49170
|
+
function _superRefine(fn, params) {
|
|
48634
49171
|
const ch = _check((payload) => {
|
|
48635
49172
|
payload.addIssue = (issue2) => {
|
|
48636
49173
|
if (typeof issue2 === "string") {
|
|
@@ -48647,7 +49184,7 @@ function _superRefine(fn) {
|
|
|
48647
49184
|
}
|
|
48648
49185
|
};
|
|
48649
49186
|
return fn(payload.value, payload);
|
|
48650
|
-
});
|
|
49187
|
+
}, params);
|
|
48651
49188
|
return ch;
|
|
48652
49189
|
}
|
|
48653
49190
|
function _check(fn, params) {
|
|
@@ -48783,7 +49320,7 @@ function initializeContext(params) {
|
|
|
48783
49320
|
};
|
|
48784
49321
|
}
|
|
48785
49322
|
function process13(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
48786
|
-
var
|
|
49323
|
+
var _a3;
|
|
48787
49324
|
const def = schema._zod.def;
|
|
48788
49325
|
const seen = ctx.seen.get(schema);
|
|
48789
49326
|
if (seen) {
|
|
@@ -48830,8 +49367,8 @@ function process13(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
48830
49367
|
delete result2.schema.examples;
|
|
48831
49368
|
delete result2.schema.default;
|
|
48832
49369
|
}
|
|
48833
|
-
if (ctx.io === "input" && result2.schema
|
|
48834
|
-
(
|
|
49370
|
+
if (ctx.io === "input" && "_prefault" in result2.schema)
|
|
49371
|
+
(_a3 = result2.schema).default ?? (_a3.default = result2.schema._prefault);
|
|
48835
49372
|
delete result2.schema._prefault;
|
|
48836
49373
|
const _result = ctx.seen.get(schema);
|
|
48837
49374
|
return _result.schema;
|
|
@@ -49008,10 +49545,15 @@ function finalize(ctx, schema) {
|
|
|
49008
49545
|
result2.$id = ctx.external.uri(id);
|
|
49009
49546
|
}
|
|
49010
49547
|
Object.assign(result2, root.def ?? root.schema);
|
|
49548
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
49549
|
+
if (rootMetaId !== undefined && result2.id === rootMetaId)
|
|
49550
|
+
delete result2.id;
|
|
49011
49551
|
const defs = ctx.external?.defs ?? {};
|
|
49012
49552
|
for (const entry of ctx.seen.entries()) {
|
|
49013
49553
|
const seen = entry[1];
|
|
49014
49554
|
if (seen.def && seen.defId) {
|
|
49555
|
+
if (seen.def.id === seen.defId)
|
|
49556
|
+
delete seen.def.id;
|
|
49015
49557
|
defs[seen.defId] = seen.def;
|
|
49016
49558
|
}
|
|
49017
49559
|
}
|
|
@@ -49066,6 +49608,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
49066
49608
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
49067
49609
|
}
|
|
49068
49610
|
if (def.type === "pipe") {
|
|
49611
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
49612
|
+
return true;
|
|
49069
49613
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
49070
49614
|
}
|
|
49071
49615
|
if (def.type === "object") {
|
|
@@ -49182,39 +49726,28 @@ var formatMap, stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
49182
49726
|
json.type = "integer";
|
|
49183
49727
|
else
|
|
49184
49728
|
json.type = "number";
|
|
49185
|
-
|
|
49186
|
-
|
|
49729
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
49730
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
49731
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
49732
|
+
if (exMin) {
|
|
49733
|
+
if (legacy) {
|
|
49187
49734
|
json.minimum = exclusiveMinimum;
|
|
49188
49735
|
json.exclusiveMinimum = true;
|
|
49189
49736
|
} else {
|
|
49190
49737
|
json.exclusiveMinimum = exclusiveMinimum;
|
|
49191
49738
|
}
|
|
49192
|
-
}
|
|
49193
|
-
if (typeof minimum === "number") {
|
|
49739
|
+
} else if (typeof minimum === "number") {
|
|
49194
49740
|
json.minimum = minimum;
|
|
49195
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
49196
|
-
if (exclusiveMinimum >= minimum)
|
|
49197
|
-
delete json.minimum;
|
|
49198
|
-
else
|
|
49199
|
-
delete json.exclusiveMinimum;
|
|
49200
|
-
}
|
|
49201
49741
|
}
|
|
49202
|
-
if (
|
|
49203
|
-
if (
|
|
49742
|
+
if (exMax) {
|
|
49743
|
+
if (legacy) {
|
|
49204
49744
|
json.maximum = exclusiveMaximum;
|
|
49205
49745
|
json.exclusiveMaximum = true;
|
|
49206
49746
|
} else {
|
|
49207
49747
|
json.exclusiveMaximum = exclusiveMaximum;
|
|
49208
49748
|
}
|
|
49209
|
-
}
|
|
49210
|
-
if (typeof maximum === "number") {
|
|
49749
|
+
} else if (typeof maximum === "number") {
|
|
49211
49750
|
json.maximum = maximum;
|
|
49212
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
49213
|
-
if (exclusiveMaximum <= maximum)
|
|
49214
|
-
delete json.maximum;
|
|
49215
|
-
else
|
|
49216
|
-
delete json.exclusiveMaximum;
|
|
49217
|
-
}
|
|
49218
49751
|
}
|
|
49219
49752
|
if (typeof multipleOf === "number")
|
|
49220
49753
|
json.multipleOf = multipleOf;
|
|
@@ -49360,7 +49893,10 @@ var formatMap, stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
49360
49893
|
if (typeof maximum === "number")
|
|
49361
49894
|
json.maxItems = maximum;
|
|
49362
49895
|
json.type = "array";
|
|
49363
|
-
json.items = process13(def.element, ctx, {
|
|
49896
|
+
json.items = process13(def.element, ctx, {
|
|
49897
|
+
...params,
|
|
49898
|
+
path: [...params.path, "items"]
|
|
49899
|
+
});
|
|
49364
49900
|
}, objectProcessor = (schema, ctx, _json, params) => {
|
|
49365
49901
|
const json = _json;
|
|
49366
49902
|
const def = schema._zod.def;
|
|
@@ -49542,7 +50078,8 @@ var formatMap, stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
49542
50078
|
json.default = catchValue;
|
|
49543
50079
|
}, pipeProcessor = (schema, ctx, _json, params) => {
|
|
49544
50080
|
const def = schema._zod.def;
|
|
49545
|
-
const
|
|
50081
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
50082
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
49546
50083
|
process13(innerType, ctx, params);
|
|
49547
50084
|
const seen = ctx.seen.get(schema);
|
|
49548
50085
|
seen.ref = innerType;
|
|
@@ -49888,6 +50425,7 @@ __export(exports_core2, {
|
|
|
49888
50425
|
$ZodRealError: () => $ZodRealError,
|
|
49889
50426
|
$ZodReadonly: () => $ZodReadonly,
|
|
49890
50427
|
$ZodPromise: () => $ZodPromise,
|
|
50428
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
49891
50429
|
$ZodPrefault: () => $ZodPrefault,
|
|
49892
50430
|
$ZodPipe: () => $ZodPipe,
|
|
49893
50431
|
$ZodOptional: () => $ZodOptional,
|
|
@@ -50101,8 +50639,8 @@ var init_errors2 = __esm(() => {
|
|
|
50101
50639
|
init_core2();
|
|
50102
50640
|
init_core2();
|
|
50103
50641
|
init_util();
|
|
50104
|
-
ZodError = $constructor("ZodError", initializer2);
|
|
50105
|
-
ZodRealError = $constructor("ZodError", initializer2, {
|
|
50642
|
+
ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
50643
|
+
ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
50106
50644
|
Parent: Error
|
|
50107
50645
|
});
|
|
50108
50646
|
});
|
|
@@ -50186,6 +50724,7 @@ __export(exports_schemas2, {
|
|
|
50186
50724
|
json: () => json,
|
|
50187
50725
|
ipv6: () => ipv62,
|
|
50188
50726
|
ipv4: () => ipv42,
|
|
50727
|
+
invertCodec: () => invertCodec,
|
|
50189
50728
|
intersection: () => intersection2,
|
|
50190
50729
|
int64: () => int64,
|
|
50191
50730
|
int32: () => int32,
|
|
@@ -50246,6 +50785,7 @@ __export(exports_schemas2, {
|
|
|
50246
50785
|
ZodRecord: () => ZodRecord,
|
|
50247
50786
|
ZodReadonly: () => ZodReadonly,
|
|
50248
50787
|
ZodPromise: () => ZodPromise,
|
|
50788
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
50249
50789
|
ZodPrefault: () => ZodPrefault,
|
|
50250
50790
|
ZodPipe: () => ZodPipe,
|
|
50251
50791
|
ZodOptional: () => ZodOptional,
|
|
@@ -50294,6 +50834,42 @@ __export(exports_schemas2, {
|
|
|
50294
50834
|
ZodArray: () => ZodArray,
|
|
50295
50835
|
ZodAny: () => ZodAny
|
|
50296
50836
|
});
|
|
50837
|
+
function _installLazyMethods(inst, group, methods) {
|
|
50838
|
+
const proto2 = Object.getPrototypeOf(inst);
|
|
50839
|
+
let installed = _installedGroups.get(proto2);
|
|
50840
|
+
if (!installed) {
|
|
50841
|
+
installed = new Set;
|
|
50842
|
+
_installedGroups.set(proto2, installed);
|
|
50843
|
+
}
|
|
50844
|
+
if (installed.has(group))
|
|
50845
|
+
return;
|
|
50846
|
+
installed.add(group);
|
|
50847
|
+
for (const key in methods) {
|
|
50848
|
+
const fn = methods[key];
|
|
50849
|
+
Object.defineProperty(proto2, key, {
|
|
50850
|
+
configurable: true,
|
|
50851
|
+
enumerable: false,
|
|
50852
|
+
get() {
|
|
50853
|
+
const bound = fn.bind(this);
|
|
50854
|
+
Object.defineProperty(this, key, {
|
|
50855
|
+
configurable: true,
|
|
50856
|
+
writable: true,
|
|
50857
|
+
enumerable: true,
|
|
50858
|
+
value: bound
|
|
50859
|
+
});
|
|
50860
|
+
return bound;
|
|
50861
|
+
},
|
|
50862
|
+
set(v) {
|
|
50863
|
+
Object.defineProperty(this, key, {
|
|
50864
|
+
configurable: true,
|
|
50865
|
+
writable: true,
|
|
50866
|
+
enumerable: true,
|
|
50867
|
+
value: v
|
|
50868
|
+
});
|
|
50869
|
+
}
|
|
50870
|
+
});
|
|
50871
|
+
}
|
|
50872
|
+
}
|
|
50297
50873
|
function string2(params) {
|
|
50298
50874
|
return _string(ZodString, params);
|
|
50299
50875
|
}
|
|
@@ -50320,7 +50896,7 @@ function url(params) {
|
|
|
50320
50896
|
}
|
|
50321
50897
|
function httpUrl(params) {
|
|
50322
50898
|
return _url(ZodURL, {
|
|
50323
|
-
protocol:
|
|
50899
|
+
protocol: exports_regexes.httpProtocol,
|
|
50324
50900
|
hostname: exports_regexes.domain,
|
|
50325
50901
|
...exports_util.normalizeParams(params)
|
|
50326
50902
|
});
|
|
@@ -50517,6 +51093,14 @@ function tuple(items, _paramsOrRest, _params) {
|
|
|
50517
51093
|
});
|
|
50518
51094
|
}
|
|
50519
51095
|
function record(keyType, valueType, params) {
|
|
51096
|
+
if (!valueType || !valueType._zod) {
|
|
51097
|
+
return new ZodRecord({
|
|
51098
|
+
type: "record",
|
|
51099
|
+
keyType: string2(),
|
|
51100
|
+
valueType: keyType,
|
|
51101
|
+
...exports_util.normalizeParams(valueType)
|
|
51102
|
+
});
|
|
51103
|
+
}
|
|
50520
51104
|
return new ZodRecord({
|
|
50521
51105
|
type: "record",
|
|
50522
51106
|
keyType,
|
|
@@ -50667,6 +51251,16 @@ function codec(in_, out, params) {
|
|
|
50667
51251
|
reverseTransform: params.encode
|
|
50668
51252
|
});
|
|
50669
51253
|
}
|
|
51254
|
+
function invertCodec(codec2) {
|
|
51255
|
+
const def = codec2._zod.def;
|
|
51256
|
+
return new ZodCodec({
|
|
51257
|
+
type: "pipe",
|
|
51258
|
+
in: def.out,
|
|
51259
|
+
out: def.in,
|
|
51260
|
+
transform: def.reverseTransform,
|
|
51261
|
+
reverseTransform: def.transform
|
|
51262
|
+
});
|
|
51263
|
+
}
|
|
50670
51264
|
function readonly(innerType) {
|
|
50671
51265
|
return new ZodReadonly({
|
|
50672
51266
|
type: "readonly",
|
|
@@ -50712,8 +51306,8 @@ function custom(fn, _params) {
|
|
|
50712
51306
|
function refine(fn, _params = {}) {
|
|
50713
51307
|
return _refine(ZodCustom, fn, _params);
|
|
50714
51308
|
}
|
|
50715
|
-
function superRefine(fn) {
|
|
50716
|
-
return _superRefine(fn);
|
|
51309
|
+
function superRefine(fn, params) {
|
|
51310
|
+
return _superRefine(fn, params);
|
|
50717
51311
|
}
|
|
50718
51312
|
function _instanceof(cls, params = {}) {
|
|
50719
51313
|
const inst = new ZodCustom({
|
|
@@ -50744,9 +51338,13 @@ function json(params) {
|
|
|
50744
51338
|
return jsonSchema;
|
|
50745
51339
|
}
|
|
50746
51340
|
function preprocess(fn, schema) {
|
|
50747
|
-
return
|
|
51341
|
+
return new ZodPreprocess({
|
|
51342
|
+
type: "pipe",
|
|
51343
|
+
in: transform2(fn),
|
|
51344
|
+
out: schema
|
|
51345
|
+
});
|
|
50748
51346
|
}
|
|
50749
|
-
var ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool = (...args) => _stringbool({
|
|
51347
|
+
var _installedGroups, ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodPreprocess, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool = (...args) => _stringbool({
|
|
50750
51348
|
Codec: ZodCodec,
|
|
50751
51349
|
Boolean: ZodBoolean,
|
|
50752
51350
|
String: ZodString
|
|
@@ -50759,6 +51357,7 @@ var init_schemas2 = __esm(() => {
|
|
|
50759
51357
|
init_checks2();
|
|
50760
51358
|
init_iso();
|
|
50761
51359
|
init_parse2();
|
|
51360
|
+
_installedGroups = /* @__PURE__ */ new WeakMap;
|
|
50762
51361
|
ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
50763
51362
|
$ZodType.init(inst, def);
|
|
50764
51363
|
Object.assign(inst["~standard"], {
|
|
@@ -50771,23 +51370,6 @@ var init_schemas2 = __esm(() => {
|
|
|
50771
51370
|
inst.def = def;
|
|
50772
51371
|
inst.type = def.type;
|
|
50773
51372
|
Object.defineProperty(inst, "_def", { value: def });
|
|
50774
|
-
inst.check = (...checks2) => {
|
|
50775
|
-
return inst.clone(exports_util.mergeDefs(def, {
|
|
50776
|
-
checks: [
|
|
50777
|
-
...def.checks ?? [],
|
|
50778
|
-
...checks2.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
50779
|
-
]
|
|
50780
|
-
}), {
|
|
50781
|
-
parent: true
|
|
50782
|
-
});
|
|
50783
|
-
};
|
|
50784
|
-
inst.with = inst.check;
|
|
50785
|
-
inst.clone = (def2, params) => clone2(inst, def2, params);
|
|
50786
|
-
inst.brand = () => inst;
|
|
50787
|
-
inst.register = (reg, meta2) => {
|
|
50788
|
-
reg.add(inst, meta2);
|
|
50789
|
-
return inst;
|
|
50790
|
-
};
|
|
50791
51373
|
inst.parse = (data, params) => parse3(inst, data, params, { callee: inst.parse });
|
|
50792
51374
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
50793
51375
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -50801,45 +51383,108 @@ var init_schemas2 = __esm(() => {
|
|
|
50801
51383
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
50802
51384
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
50803
51385
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
50804
|
-
inst
|
|
50805
|
-
|
|
50806
|
-
|
|
50807
|
-
|
|
50808
|
-
|
|
50809
|
-
|
|
50810
|
-
|
|
50811
|
-
|
|
50812
|
-
|
|
50813
|
-
|
|
50814
|
-
|
|
50815
|
-
|
|
50816
|
-
|
|
50817
|
-
|
|
50818
|
-
|
|
50819
|
-
|
|
50820
|
-
|
|
50821
|
-
|
|
50822
|
-
|
|
50823
|
-
|
|
50824
|
-
|
|
50825
|
-
|
|
51386
|
+
_installLazyMethods(inst, "ZodType", {
|
|
51387
|
+
check(...chks) {
|
|
51388
|
+
const def2 = this.def;
|
|
51389
|
+
return this.clone(exports_util.mergeDefs(def2, {
|
|
51390
|
+
checks: [
|
|
51391
|
+
...def2.checks ?? [],
|
|
51392
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
51393
|
+
]
|
|
51394
|
+
}), { parent: true });
|
|
51395
|
+
},
|
|
51396
|
+
with(...chks) {
|
|
51397
|
+
return this.check(...chks);
|
|
51398
|
+
},
|
|
51399
|
+
clone(def2, params) {
|
|
51400
|
+
return clone2(this, def2, params);
|
|
51401
|
+
},
|
|
51402
|
+
brand() {
|
|
51403
|
+
return this;
|
|
51404
|
+
},
|
|
51405
|
+
register(reg, meta2) {
|
|
51406
|
+
reg.add(this, meta2);
|
|
51407
|
+
return this;
|
|
51408
|
+
},
|
|
51409
|
+
refine(check, params) {
|
|
51410
|
+
return this.check(refine(check, params));
|
|
51411
|
+
},
|
|
51412
|
+
superRefine(refinement, params) {
|
|
51413
|
+
return this.check(superRefine(refinement, params));
|
|
51414
|
+
},
|
|
51415
|
+
overwrite(fn) {
|
|
51416
|
+
return this.check(_overwrite(fn));
|
|
51417
|
+
},
|
|
51418
|
+
optional() {
|
|
51419
|
+
return optional(this);
|
|
51420
|
+
},
|
|
51421
|
+
exactOptional() {
|
|
51422
|
+
return exactOptional(this);
|
|
51423
|
+
},
|
|
51424
|
+
nullable() {
|
|
51425
|
+
return nullable(this);
|
|
51426
|
+
},
|
|
51427
|
+
nullish() {
|
|
51428
|
+
return optional(nullable(this));
|
|
51429
|
+
},
|
|
51430
|
+
nonoptional(params) {
|
|
51431
|
+
return nonoptional(this, params);
|
|
51432
|
+
},
|
|
51433
|
+
array() {
|
|
51434
|
+
return array(this);
|
|
51435
|
+
},
|
|
51436
|
+
or(arg) {
|
|
51437
|
+
return union2([this, arg]);
|
|
51438
|
+
},
|
|
51439
|
+
and(arg) {
|
|
51440
|
+
return intersection2(this, arg);
|
|
51441
|
+
},
|
|
51442
|
+
transform(tx) {
|
|
51443
|
+
return pipe(this, transform2(tx));
|
|
51444
|
+
},
|
|
51445
|
+
default(d) {
|
|
51446
|
+
return _default2(this, d);
|
|
51447
|
+
},
|
|
51448
|
+
prefault(d) {
|
|
51449
|
+
return prefault(this, d);
|
|
51450
|
+
},
|
|
51451
|
+
catch(params) {
|
|
51452
|
+
return _catch2(this, params);
|
|
51453
|
+
},
|
|
51454
|
+
pipe(target) {
|
|
51455
|
+
return pipe(this, target);
|
|
51456
|
+
},
|
|
51457
|
+
readonly() {
|
|
51458
|
+
return readonly(this);
|
|
51459
|
+
},
|
|
51460
|
+
describe(description) {
|
|
51461
|
+
const cl = this.clone();
|
|
51462
|
+
globalRegistry.add(cl, { description });
|
|
51463
|
+
return cl;
|
|
51464
|
+
},
|
|
51465
|
+
meta(...args) {
|
|
51466
|
+
if (args.length === 0)
|
|
51467
|
+
return globalRegistry.get(this);
|
|
51468
|
+
const cl = this.clone();
|
|
51469
|
+
globalRegistry.add(cl, args[0]);
|
|
51470
|
+
return cl;
|
|
51471
|
+
},
|
|
51472
|
+
isOptional() {
|
|
51473
|
+
return this.safeParse(undefined).success;
|
|
51474
|
+
},
|
|
51475
|
+
isNullable() {
|
|
51476
|
+
return this.safeParse(null).success;
|
|
51477
|
+
},
|
|
51478
|
+
apply(fn) {
|
|
51479
|
+
return fn(this);
|
|
51480
|
+
}
|
|
51481
|
+
});
|
|
50826
51482
|
Object.defineProperty(inst, "description", {
|
|
50827
51483
|
get() {
|
|
50828
51484
|
return globalRegistry.get(inst)?.description;
|
|
50829
51485
|
},
|
|
50830
51486
|
configurable: true
|
|
50831
51487
|
});
|
|
50832
|
-
inst.meta = (...args) => {
|
|
50833
|
-
if (args.length === 0) {
|
|
50834
|
-
return globalRegistry.get(inst);
|
|
50835
|
-
}
|
|
50836
|
-
const cl = inst.clone();
|
|
50837
|
-
globalRegistry.add(cl, args[0]);
|
|
50838
|
-
return cl;
|
|
50839
|
-
};
|
|
50840
|
-
inst.isOptional = () => inst.safeParse(undefined).success;
|
|
50841
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
50842
|
-
inst.apply = (fn) => fn(inst);
|
|
50843
51488
|
return inst;
|
|
50844
51489
|
});
|
|
50845
51490
|
_ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -50850,21 +51495,53 @@ var init_schemas2 = __esm(() => {
|
|
|
50850
51495
|
inst.format = bag.format ?? null;
|
|
50851
51496
|
inst.minLength = bag.minimum ?? null;
|
|
50852
51497
|
inst.maxLength = bag.maximum ?? null;
|
|
50853
|
-
inst
|
|
50854
|
-
|
|
50855
|
-
|
|
50856
|
-
|
|
50857
|
-
|
|
50858
|
-
|
|
50859
|
-
|
|
50860
|
-
|
|
50861
|
-
|
|
50862
|
-
|
|
50863
|
-
|
|
50864
|
-
|
|
50865
|
-
|
|
50866
|
-
|
|
50867
|
-
|
|
51498
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
51499
|
+
regex(...args) {
|
|
51500
|
+
return this.check(_regex(...args));
|
|
51501
|
+
},
|
|
51502
|
+
includes(...args) {
|
|
51503
|
+
return this.check(_includes(...args));
|
|
51504
|
+
},
|
|
51505
|
+
startsWith(...args) {
|
|
51506
|
+
return this.check(_startsWith(...args));
|
|
51507
|
+
},
|
|
51508
|
+
endsWith(...args) {
|
|
51509
|
+
return this.check(_endsWith(...args));
|
|
51510
|
+
},
|
|
51511
|
+
min(...args) {
|
|
51512
|
+
return this.check(_minLength(...args));
|
|
51513
|
+
},
|
|
51514
|
+
max(...args) {
|
|
51515
|
+
return this.check(_maxLength(...args));
|
|
51516
|
+
},
|
|
51517
|
+
length(...args) {
|
|
51518
|
+
return this.check(_length(...args));
|
|
51519
|
+
},
|
|
51520
|
+
nonempty(...args) {
|
|
51521
|
+
return this.check(_minLength(1, ...args));
|
|
51522
|
+
},
|
|
51523
|
+
lowercase(params) {
|
|
51524
|
+
return this.check(_lowercase(params));
|
|
51525
|
+
},
|
|
51526
|
+
uppercase(params) {
|
|
51527
|
+
return this.check(_uppercase(params));
|
|
51528
|
+
},
|
|
51529
|
+
trim() {
|
|
51530
|
+
return this.check(_trim());
|
|
51531
|
+
},
|
|
51532
|
+
normalize(...args) {
|
|
51533
|
+
return this.check(_normalize(...args));
|
|
51534
|
+
},
|
|
51535
|
+
toLowerCase() {
|
|
51536
|
+
return this.check(_toLowerCase());
|
|
51537
|
+
},
|
|
51538
|
+
toUpperCase() {
|
|
51539
|
+
return this.check(_toUpperCase());
|
|
51540
|
+
},
|
|
51541
|
+
slugify() {
|
|
51542
|
+
return this.check(_slugify());
|
|
51543
|
+
}
|
|
51544
|
+
});
|
|
50868
51545
|
});
|
|
50869
51546
|
ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
50870
51547
|
$ZodString.init(inst, def);
|
|
@@ -50989,21 +51666,53 @@ var init_schemas2 = __esm(() => {
|
|
|
50989
51666
|
$ZodNumber.init(inst, def);
|
|
50990
51667
|
ZodType.init(inst, def);
|
|
50991
51668
|
inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
|
|
50992
|
-
inst
|
|
50993
|
-
|
|
50994
|
-
|
|
50995
|
-
|
|
50996
|
-
|
|
50997
|
-
|
|
50998
|
-
|
|
50999
|
-
|
|
51000
|
-
|
|
51001
|
-
|
|
51002
|
-
|
|
51003
|
-
|
|
51004
|
-
|
|
51005
|
-
|
|
51006
|
-
|
|
51669
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
51670
|
+
gt(value, params) {
|
|
51671
|
+
return this.check(_gt(value, params));
|
|
51672
|
+
},
|
|
51673
|
+
gte(value, params) {
|
|
51674
|
+
return this.check(_gte(value, params));
|
|
51675
|
+
},
|
|
51676
|
+
min(value, params) {
|
|
51677
|
+
return this.check(_gte(value, params));
|
|
51678
|
+
},
|
|
51679
|
+
lt(value, params) {
|
|
51680
|
+
return this.check(_lt(value, params));
|
|
51681
|
+
},
|
|
51682
|
+
lte(value, params) {
|
|
51683
|
+
return this.check(_lte(value, params));
|
|
51684
|
+
},
|
|
51685
|
+
max(value, params) {
|
|
51686
|
+
return this.check(_lte(value, params));
|
|
51687
|
+
},
|
|
51688
|
+
int(params) {
|
|
51689
|
+
return this.check(int(params));
|
|
51690
|
+
},
|
|
51691
|
+
safe(params) {
|
|
51692
|
+
return this.check(int(params));
|
|
51693
|
+
},
|
|
51694
|
+
positive(params) {
|
|
51695
|
+
return this.check(_gt(0, params));
|
|
51696
|
+
},
|
|
51697
|
+
nonnegative(params) {
|
|
51698
|
+
return this.check(_gte(0, params));
|
|
51699
|
+
},
|
|
51700
|
+
negative(params) {
|
|
51701
|
+
return this.check(_lt(0, params));
|
|
51702
|
+
},
|
|
51703
|
+
nonpositive(params) {
|
|
51704
|
+
return this.check(_lte(0, params));
|
|
51705
|
+
},
|
|
51706
|
+
multipleOf(value, params) {
|
|
51707
|
+
return this.check(_multipleOf(value, params));
|
|
51708
|
+
},
|
|
51709
|
+
step(value, params) {
|
|
51710
|
+
return this.check(_multipleOf(value, params));
|
|
51711
|
+
},
|
|
51712
|
+
finite() {
|
|
51713
|
+
return this;
|
|
51714
|
+
}
|
|
51715
|
+
});
|
|
51007
51716
|
const bag = inst._zod.bag;
|
|
51008
51717
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
51009
51718
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -51096,11 +51805,23 @@ var init_schemas2 = __esm(() => {
|
|
|
51096
51805
|
ZodType.init(inst, def);
|
|
51097
51806
|
inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
|
|
51098
51807
|
inst.element = def.element;
|
|
51099
|
-
inst
|
|
51100
|
-
|
|
51101
|
-
|
|
51102
|
-
|
|
51103
|
-
|
|
51808
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
51809
|
+
min(n, params) {
|
|
51810
|
+
return this.check(_minLength(n, params));
|
|
51811
|
+
},
|
|
51812
|
+
nonempty(params) {
|
|
51813
|
+
return this.check(_minLength(1, params));
|
|
51814
|
+
},
|
|
51815
|
+
max(n, params) {
|
|
51816
|
+
return this.check(_maxLength(n, params));
|
|
51817
|
+
},
|
|
51818
|
+
length(n, params) {
|
|
51819
|
+
return this.check(_length(n, params));
|
|
51820
|
+
},
|
|
51821
|
+
unwrap() {
|
|
51822
|
+
return this.element;
|
|
51823
|
+
}
|
|
51824
|
+
});
|
|
51104
51825
|
});
|
|
51105
51826
|
ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
51106
51827
|
$ZodObjectJIT.init(inst, def);
|
|
@@ -51109,23 +51830,47 @@ var init_schemas2 = __esm(() => {
|
|
|
51109
51830
|
exports_util.defineLazy(inst, "shape", () => {
|
|
51110
51831
|
return def.shape;
|
|
51111
51832
|
});
|
|
51112
|
-
inst
|
|
51113
|
-
|
|
51114
|
-
|
|
51115
|
-
|
|
51116
|
-
|
|
51117
|
-
|
|
51118
|
-
|
|
51119
|
-
|
|
51120
|
-
|
|
51121
|
-
|
|
51122
|
-
|
|
51123
|
-
|
|
51124
|
-
|
|
51125
|
-
|
|
51126
|
-
|
|
51127
|
-
|
|
51128
|
-
|
|
51833
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
51834
|
+
keyof() {
|
|
51835
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
51836
|
+
},
|
|
51837
|
+
catchall(catchall) {
|
|
51838
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
51839
|
+
},
|
|
51840
|
+
passthrough() {
|
|
51841
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
51842
|
+
},
|
|
51843
|
+
loose() {
|
|
51844
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
51845
|
+
},
|
|
51846
|
+
strict() {
|
|
51847
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
51848
|
+
},
|
|
51849
|
+
strip() {
|
|
51850
|
+
return this.clone({ ...this._zod.def, catchall: undefined });
|
|
51851
|
+
},
|
|
51852
|
+
extend(incoming) {
|
|
51853
|
+
return exports_util.extend(this, incoming);
|
|
51854
|
+
},
|
|
51855
|
+
safeExtend(incoming) {
|
|
51856
|
+
return exports_util.safeExtend(this, incoming);
|
|
51857
|
+
},
|
|
51858
|
+
merge(other) {
|
|
51859
|
+
return exports_util.merge(this, other);
|
|
51860
|
+
},
|
|
51861
|
+
pick(mask) {
|
|
51862
|
+
return exports_util.pick(this, mask);
|
|
51863
|
+
},
|
|
51864
|
+
omit(mask) {
|
|
51865
|
+
return exports_util.omit(this, mask);
|
|
51866
|
+
},
|
|
51867
|
+
partial(...args) {
|
|
51868
|
+
return exports_util.partial(ZodOptional, this, args[0]);
|
|
51869
|
+
},
|
|
51870
|
+
required(...args) {
|
|
51871
|
+
return exports_util.required(ZodNonOptional, this, args[0]);
|
|
51872
|
+
}
|
|
51873
|
+
});
|
|
51129
51874
|
});
|
|
51130
51875
|
ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
51131
51876
|
$ZodUnion.init(inst, def);
|
|
@@ -51269,10 +52014,12 @@ var init_schemas2 = __esm(() => {
|
|
|
51269
52014
|
if (output instanceof Promise) {
|
|
51270
52015
|
return output.then((output2) => {
|
|
51271
52016
|
payload.value = output2;
|
|
52017
|
+
payload.fallback = true;
|
|
51272
52018
|
return payload;
|
|
51273
52019
|
});
|
|
51274
52020
|
}
|
|
51275
52021
|
payload.value = output;
|
|
52022
|
+
payload.fallback = true;
|
|
51276
52023
|
return payload;
|
|
51277
52024
|
};
|
|
51278
52025
|
});
|
|
@@ -51342,6 +52089,10 @@ var init_schemas2 = __esm(() => {
|
|
|
51342
52089
|
ZodPipe.init(inst, def);
|
|
51343
52090
|
$ZodCodec.init(inst, def);
|
|
51344
52091
|
});
|
|
52092
|
+
ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
52093
|
+
ZodPipe.init(inst, def);
|
|
52094
|
+
$ZodPreprocess.init(inst, def);
|
|
52095
|
+
});
|
|
51345
52096
|
ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
51346
52097
|
$ZodReadonly.init(inst, def);
|
|
51347
52098
|
ZodType.init(inst, def);
|
|
@@ -51723,12 +52474,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
51723
52474
|
default:
|
|
51724
52475
|
throw new Error(`Unsupported type: ${type}`);
|
|
51725
52476
|
}
|
|
51726
|
-
if (schema.description) {
|
|
51727
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
51728
|
-
}
|
|
51729
|
-
if (schema.default !== undefined) {
|
|
51730
|
-
zodSchema = zodSchema.default(schema.default);
|
|
51731
|
-
}
|
|
51732
52477
|
return zodSchema;
|
|
51733
52478
|
}
|
|
51734
52479
|
function convertSchema(schema, ctx) {
|
|
@@ -51765,6 +52510,9 @@ function convertSchema(schema, ctx) {
|
|
|
51765
52510
|
if (schema.readOnly === true) {
|
|
51766
52511
|
baseSchema = z.readonly(baseSchema);
|
|
51767
52512
|
}
|
|
52513
|
+
if (schema.default !== undefined) {
|
|
52514
|
+
baseSchema = baseSchema.default(schema.default);
|
|
52515
|
+
}
|
|
51768
52516
|
const extraMeta = {};
|
|
51769
52517
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
51770
52518
|
for (const key of coreMetadataKeys) {
|
|
@@ -51786,23 +52534,32 @@ function convertSchema(schema, ctx) {
|
|
|
51786
52534
|
if (Object.keys(extraMeta).length > 0) {
|
|
51787
52535
|
ctx.registry.add(baseSchema, extraMeta);
|
|
51788
52536
|
}
|
|
52537
|
+
if (schema.description) {
|
|
52538
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
52539
|
+
}
|
|
51789
52540
|
return baseSchema;
|
|
51790
52541
|
}
|
|
51791
52542
|
function fromJSONSchema(schema, params) {
|
|
51792
52543
|
if (typeof schema === "boolean") {
|
|
51793
52544
|
return schema ? z.any() : z.never();
|
|
51794
52545
|
}
|
|
51795
|
-
|
|
51796
|
-
|
|
52546
|
+
let normalized;
|
|
52547
|
+
try {
|
|
52548
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
52549
|
+
} catch {
|
|
52550
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
52551
|
+
}
|
|
52552
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
52553
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
51797
52554
|
const ctx = {
|
|
51798
52555
|
version: version2,
|
|
51799
52556
|
defs,
|
|
51800
52557
|
refs: new Map,
|
|
51801
52558
|
processing: new Set,
|
|
51802
|
-
rootSchema:
|
|
52559
|
+
rootSchema: normalized,
|
|
51803
52560
|
registry: params?.registry ?? globalRegistry
|
|
51804
52561
|
};
|
|
51805
|
-
return convertSchema(
|
|
52562
|
+
return convertSchema(normalized, ctx);
|
|
51806
52563
|
}
|
|
51807
52564
|
var z, RECOGNIZED_KEYS;
|
|
51808
52565
|
var init_from_json_schema = __esm(() => {
|
|
@@ -51815,7 +52572,7 @@ var init_from_json_schema = __esm(() => {
|
|
|
51815
52572
|
...exports_checks2,
|
|
51816
52573
|
iso: exports_iso
|
|
51817
52574
|
};
|
|
51818
|
-
RECOGNIZED_KEYS = new Set([
|
|
52575
|
+
RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
|
|
51819
52576
|
"$schema",
|
|
51820
52577
|
"$ref",
|
|
51821
52578
|
"$defs",
|
|
@@ -52007,6 +52764,7 @@ __export(exports_external, {
|
|
|
52007
52764
|
iso: () => exports_iso,
|
|
52008
52765
|
ipv6: () => ipv62,
|
|
52009
52766
|
ipv4: () => ipv42,
|
|
52767
|
+
invertCodec: () => invertCodec,
|
|
52010
52768
|
intersection: () => intersection2,
|
|
52011
52769
|
int64: () => int64,
|
|
52012
52770
|
int32: () => int32,
|
|
@@ -52085,6 +52843,7 @@ __export(exports_external, {
|
|
|
52085
52843
|
ZodRealError: () => ZodRealError,
|
|
52086
52844
|
ZodReadonly: () => ZodReadonly,
|
|
52087
52845
|
ZodPromise: () => ZodPromise,
|
|
52846
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
52088
52847
|
ZodPrefault: () => ZodPrefault,
|
|
52089
52848
|
ZodPipe: () => ZodPipe,
|
|
52090
52849
|
ZodOptional: () => ZodOptional,
|
|
@@ -52784,8 +53543,9 @@ function runGitArgs(args, context, cacheCommand) {
|
|
|
52784
53543
|
if (gitCommandCache.has(cacheKey)) {
|
|
52785
53544
|
return gitCommandCache.get(cacheKey) ?? null;
|
|
52786
53545
|
}
|
|
53546
|
+
const gitArgs = ["--no-optional-locks", ...args];
|
|
52787
53547
|
try {
|
|
52788
|
-
const output = execFileSync("git",
|
|
53548
|
+
const output = execFileSync("git", gitArgs, {
|
|
52789
53549
|
encoding: "utf8",
|
|
52790
53550
|
stdio: ["pipe", "pipe", "ignore"],
|
|
52791
53551
|
...cwd2 ? { cwd: cwd2 } : {}
|
|
@@ -52823,7 +53583,7 @@ function hasRenameOrCopyStatus(line) {
|
|
|
52823
53583
|
return line.startsWith("R") || line.startsWith("C") || line[1] === "R" || line[1] === "C";
|
|
52824
53584
|
}
|
|
52825
53585
|
function getGitStatus(context) {
|
|
52826
|
-
const output = runGit("
|
|
53586
|
+
const output = runGit("status --porcelain -z", context);
|
|
52827
53587
|
if (!output) {
|
|
52828
53588
|
return { staged: false, unstaged: false, untracked: false, conflicts: false };
|
|
52829
53589
|
}
|
|
@@ -52853,7 +53613,7 @@ function getGitStatus(context) {
|
|
|
52853
53613
|
return { staged, unstaged, untracked, conflicts };
|
|
52854
53614
|
}
|
|
52855
53615
|
function getGitFileStatusCounts(context) {
|
|
52856
|
-
const output = runGit("
|
|
53616
|
+
const output = runGit("status --porcelain -z", context);
|
|
52857
53617
|
if (!output) {
|
|
52858
53618
|
return { staged: 0, unstaged: 0, untracked: 0 };
|
|
52859
53619
|
}
|
|
@@ -56039,16 +56799,26 @@ function getTTYForProcess(pid) {
|
|
|
56039
56799
|
}
|
|
56040
56800
|
}
|
|
56041
56801
|
function getWidthForTTY(tty2) {
|
|
56042
|
-
|
|
56043
|
-
|
|
56044
|
-
|
|
56045
|
-
|
|
56046
|
-
|
|
56047
|
-
|
|
56048
|
-
|
|
56049
|
-
|
|
56050
|
-
|
|
56802
|
+
const devicePath = `/dev/${tty2}`;
|
|
56803
|
+
const attempts = [
|
|
56804
|
+
`stty -F ${devicePath} size`,
|
|
56805
|
+
`stty -f ${devicePath} size`,
|
|
56806
|
+
`stty size < ${devicePath}`
|
|
56807
|
+
];
|
|
56808
|
+
for (const cmd of attempts) {
|
|
56809
|
+
try {
|
|
56810
|
+
const width = execSync(`${cmd} 2>/dev/null | awk '{print $2}'`, {
|
|
56811
|
+
encoding: "utf8",
|
|
56812
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
56813
|
+
shell: "/bin/sh"
|
|
56814
|
+
}).trim();
|
|
56815
|
+
const parsed = parsePositiveInteger(width);
|
|
56816
|
+
if (parsed !== null) {
|
|
56817
|
+
return parsed;
|
|
56818
|
+
}
|
|
56819
|
+
} catch {}
|
|
56051
56820
|
}
|
|
56821
|
+
return null;
|
|
56052
56822
|
}
|
|
56053
56823
|
function getTerminalWidth() {
|
|
56054
56824
|
return probeTerminalWidth();
|
|
@@ -56056,7 +56826,7 @@ function getTerminalWidth() {
|
|
|
56056
56826
|
function canDetectTerminalWidth() {
|
|
56057
56827
|
return probeTerminalWidth() !== null;
|
|
56058
56828
|
}
|
|
56059
|
-
var __dirname = "/home/runner/work/ccstatusline/ccstatusline/src/utils", PACKAGE_VERSION = "2.2.
|
|
56829
|
+
var __dirname = "/home/runner/work/ccstatusline/ccstatusline/src/utils", PACKAGE_VERSION = "2.2.18";
|
|
56060
56830
|
var init_terminal = () => {};
|
|
56061
56831
|
|
|
56062
56832
|
// src/utils/renderer.ts
|
|
@@ -58154,9 +58924,9 @@ class CustomCommandWidget {
|
|
|
58154
58924
|
output = output.substring(0, item.maxWidth - 3) + "...";
|
|
58155
58925
|
}
|
|
58156
58926
|
return output || null;
|
|
58157
|
-
} catch (
|
|
58158
|
-
if (
|
|
58159
|
-
const execError =
|
|
58927
|
+
} catch (error51) {
|
|
58928
|
+
if (error51 instanceof Error) {
|
|
58929
|
+
const execError = error51;
|
|
58160
58930
|
if (execError.code === "ENOENT") {
|
|
58161
58931
|
return "[Cmd not found]";
|
|
58162
58932
|
} else if (execError.code === "ETIMEDOUT") {
|
|
@@ -58772,13 +59542,13 @@ var require_browser = __commonJS((exports, module) => {
|
|
|
58772
59542
|
} else {
|
|
58773
59543
|
exports.storage.removeItem("debug");
|
|
58774
59544
|
}
|
|
58775
|
-
} catch (
|
|
59545
|
+
} catch (error51) {}
|
|
58776
59546
|
}
|
|
58777
59547
|
function load() {
|
|
58778
59548
|
let r;
|
|
58779
59549
|
try {
|
|
58780
59550
|
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
58781
|
-
} catch (
|
|
59551
|
+
} catch (error51) {}
|
|
58782
59552
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
58783
59553
|
r = process.env.DEBUG;
|
|
58784
59554
|
}
|
|
@@ -58787,15 +59557,15 @@ var require_browser = __commonJS((exports, module) => {
|
|
|
58787
59557
|
function localstorage() {
|
|
58788
59558
|
try {
|
|
58789
59559
|
return localStorage;
|
|
58790
|
-
} catch (
|
|
59560
|
+
} catch (error51) {}
|
|
58791
59561
|
}
|
|
58792
59562
|
module.exports = require_common()(exports);
|
|
58793
59563
|
var { formatters } = module.exports;
|
|
58794
59564
|
formatters.j = function(v) {
|
|
58795
59565
|
try {
|
|
58796
59566
|
return JSON.stringify(v);
|
|
58797
|
-
} catch (
|
|
58798
|
-
return "[UnexpectedJSONParseError]: " +
|
|
59567
|
+
} catch (error51) {
|
|
59568
|
+
return "[UnexpectedJSONParseError]: " + error51.message;
|
|
58799
59569
|
}
|
|
58800
59570
|
};
|
|
58801
59571
|
});
|
|
@@ -59015,7 +59785,7 @@ var require_node = __commonJS((exports, module) => {
|
|
|
59015
59785
|
221
|
|
59016
59786
|
];
|
|
59017
59787
|
}
|
|
59018
|
-
} catch (
|
|
59788
|
+
} catch (error51) {}
|
|
59019
59789
|
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
59020
59790
|
return /^debug_/i.test(key);
|
|
59021
59791
|
}).reduce((obj, key) => {
|
|
@@ -59430,6 +60200,9 @@ import * as fs3 from "fs";
|
|
|
59430
60200
|
import * as https from "https";
|
|
59431
60201
|
import * as os4 from "os";
|
|
59432
60202
|
import * as path3 from "path";
|
|
60203
|
+
function getUsageApiBucketUtilization(bucket) {
|
|
60204
|
+
return bucket === null ? 0 : bucket?.utilization ?? undefined;
|
|
60205
|
+
}
|
|
59433
60206
|
function parseJsonWithSchema(rawJson, schema) {
|
|
59434
60207
|
try {
|
|
59435
60208
|
const parsed = schema.safeParse(JSON.parse(rawJson));
|
|
@@ -59470,13 +60243,13 @@ function parseUsageApiResponse(rawJson) {
|
|
|
59470
60243
|
return null;
|
|
59471
60244
|
}
|
|
59472
60245
|
return {
|
|
59473
|
-
sessionUsage: parsed.five_hour
|
|
60246
|
+
sessionUsage: getUsageApiBucketUtilization(parsed.five_hour),
|
|
59474
60247
|
sessionResetAt: parsed.five_hour?.resets_at ?? undefined,
|
|
59475
|
-
weeklyUsage: parsed.seven_day
|
|
60248
|
+
weeklyUsage: getUsageApiBucketUtilization(parsed.seven_day),
|
|
59476
60249
|
weeklyResetAt: parsed.seven_day?.resets_at ?? undefined,
|
|
59477
|
-
weeklySonnetUsage: parsed.seven_day_sonnet
|
|
60250
|
+
weeklySonnetUsage: getUsageApiBucketUtilization(parsed.seven_day_sonnet),
|
|
59478
60251
|
weeklySonnetResetAt: parsed.seven_day_sonnet?.resets_at ?? undefined,
|
|
59479
|
-
weeklyOpusUsage: parsed.seven_day_opus
|
|
60252
|
+
weeklyOpusUsage: getUsageApiBucketUtilization(parsed.seven_day_opus),
|
|
59480
60253
|
weeklyOpusResetAt: parsed.seven_day_opus?.resets_at ?? undefined,
|
|
59481
60254
|
extraUsageEnabled: parsed.extra_usage?.is_enabled ?? undefined,
|
|
59482
60255
|
extraUsageLimit: parsed.extra_usage?.monthly_limit ?? undefined,
|
|
@@ -59489,8 +60262,8 @@ function ensureCacheDirExists() {
|
|
|
59489
60262
|
fs3.mkdirSync(CACHE_DIR, { recursive: true });
|
|
59490
60263
|
}
|
|
59491
60264
|
}
|
|
59492
|
-
function setCachedUsageError(
|
|
59493
|
-
const errorData = { error:
|
|
60265
|
+
function setCachedUsageError(error51, now2, maxAge = LOCK_MAX_AGE) {
|
|
60266
|
+
const errorData = { error: error51 };
|
|
59494
60267
|
cachedUsageData = errorData;
|
|
59495
60268
|
usageCacheTime = now2;
|
|
59496
60269
|
usageErrorCacheMaxAge = maxAge;
|
|
@@ -59502,15 +60275,21 @@ function cacheUsageData(data, now2) {
|
|
|
59502
60275
|
usageErrorCacheMaxAge = LOCK_MAX_AGE;
|
|
59503
60276
|
return data;
|
|
59504
60277
|
}
|
|
60278
|
+
function hasRequiredUsageField(data, field) {
|
|
60279
|
+
if (data[field] !== undefined) {
|
|
60280
|
+
return true;
|
|
60281
|
+
}
|
|
60282
|
+
return data.extraUsageEnabled === false && EXTRA_USAGE_DETAIL_FIELDS.has(field);
|
|
60283
|
+
}
|
|
59505
60284
|
function hasRequiredUsageFields(data, requiredFields = []) {
|
|
59506
|
-
return requiredFields.every((field) => data
|
|
60285
|
+
return requiredFields.every((field) => hasRequiredUsageField(data, field));
|
|
59507
60286
|
}
|
|
59508
|
-
function getStaleUsageOrError(
|
|
60287
|
+
function getStaleUsageOrError(error51, now2, errorCacheMaxAge = LOCK_MAX_AGE, requiredFields = []) {
|
|
59509
60288
|
const stale = readStaleUsageCache();
|
|
59510
60289
|
if (stale && !stale.error && hasRequiredUsageFields(stale, requiredFields)) {
|
|
59511
60290
|
return cacheUsageData(stale, now2);
|
|
59512
60291
|
}
|
|
59513
|
-
return setCachedUsageError(
|
|
60292
|
+
return setCachedUsageError(error51, now2, errorCacheMaxAge);
|
|
59514
60293
|
}
|
|
59515
60294
|
function normalizeSecurityTimedateValue(rawValue) {
|
|
59516
60295
|
const cleaned = rawValue.replace(/\\000/g, "").replace(/\0/g, "").trim();
|
|
@@ -59634,10 +60413,10 @@ function readStaleUsageCache() {
|
|
|
59634
60413
|
return null;
|
|
59635
60414
|
}
|
|
59636
60415
|
}
|
|
59637
|
-
function writeUsageLock(blockedUntil,
|
|
60416
|
+
function writeUsageLock(blockedUntil, error51) {
|
|
59638
60417
|
try {
|
|
59639
60418
|
ensureCacheDirExists();
|
|
59640
|
-
fs3.writeFileSync(LOCK_FILE, JSON.stringify({ blockedUntil, error:
|
|
60419
|
+
fs3.writeFileSync(LOCK_FILE, JSON.stringify({ blockedUntil, error: error51 }));
|
|
59641
60420
|
} catch {}
|
|
59642
60421
|
}
|
|
59643
60422
|
function readActiveUsageLock(now2) {
|
|
@@ -59801,9 +60580,11 @@ async function fetchUsageData(options = {}) {
|
|
|
59801
60580
|
}
|
|
59802
60581
|
const usageData = parseUsageApiResponse(response.body);
|
|
59803
60582
|
if (!usageData) {
|
|
60583
|
+
writeUsageLock(now2 + LOCK_MAX_AGE, "parse-error");
|
|
59804
60584
|
return getStaleUsageOrError("parse-error", now2, LOCK_MAX_AGE, requiredFields);
|
|
59805
60585
|
}
|
|
59806
60586
|
if (usageData.sessionUsage === undefined && usageData.weeklyUsage === undefined) {
|
|
60587
|
+
writeUsageLock(now2 + LOCK_MAX_AGE, "parse-error");
|
|
59807
60588
|
return getStaleUsageOrError("parse-error", now2, LOCK_MAX_AGE, requiredFields);
|
|
59808
60589
|
}
|
|
59809
60590
|
try {
|
|
@@ -59812,10 +60593,11 @@ async function fetchUsageData(options = {}) {
|
|
|
59812
60593
|
} catch {}
|
|
59813
60594
|
return cacheUsageData(usageData, now2);
|
|
59814
60595
|
} catch {
|
|
60596
|
+
writeUsageLock(now2 + LOCK_MAX_AGE, "parse-error");
|
|
59815
60597
|
return getStaleUsageOrError("parse-error", now2, LOCK_MAX_AGE, requiredFields);
|
|
59816
60598
|
}
|
|
59817
60599
|
}
|
|
59818
|
-
var CACHE_DIR, CACHE_FILE, LOCK_FILE, CACHE_MAX_AGE = 180, LOCK_MAX_AGE = 30, DEFAULT_RATE_LIMIT_BACKOFF = 300, MACOS_USAGE_CREDENTIALS_SERVICE = "Claude Code-credentials", MACOS_SECURITY_DUMP_MAX_BUFFER, UsageCredentialsSchema, UsageLockErrorSchema, UsageLockSchema, CachedUsageDataSchema,
|
|
60600
|
+
var CACHE_DIR, CACHE_FILE, LOCK_FILE, CACHE_MAX_AGE = 180, LOCK_MAX_AGE = 30, DEFAULT_RATE_LIMIT_BACKOFF = 300, MACOS_USAGE_CREDENTIALS_SERVICE = "Claude Code-credentials", MACOS_SECURITY_DUMP_MAX_BUFFER, EXTRA_USAGE_DETAIL_FIELDS, UsageCredentialsSchema, UsageLockErrorSchema, UsageLockSchema, CachedUsageDataSchema, UsageApiBucketSchema, UsageApiResponseSchema, cachedUsageData = null, usageCacheTime = 0, usageErrorCacheMaxAge, USAGE_API_HOST = "api.anthropic.com", USAGE_API_PATH = "/api/oauth/usage", USAGE_API_TIMEOUT_MS = 5000;
|
|
59819
60601
|
var init_usage_fetch = __esm(async () => {
|
|
59820
60602
|
init_dist5();
|
|
59821
60603
|
init_zod();
|
|
@@ -59825,8 +60607,13 @@ var init_usage_fetch = __esm(async () => {
|
|
|
59825
60607
|
CACHE_FILE = path3.join(CACHE_DIR, "usage.json");
|
|
59826
60608
|
LOCK_FILE = path3.join(CACHE_DIR, "usage.lock");
|
|
59827
60609
|
MACOS_SECURITY_DUMP_MAX_BUFFER = 8 * 1024 * 1024;
|
|
60610
|
+
EXTRA_USAGE_DETAIL_FIELDS = new Set([
|
|
60611
|
+
"extraUsageLimit",
|
|
60612
|
+
"extraUsageUsed",
|
|
60613
|
+
"extraUsageUtilization"
|
|
60614
|
+
]);
|
|
59828
60615
|
UsageCredentialsSchema = exports_external.object({ claudeAiOauth: exports_external.object({ accessToken: exports_external.string().nullable().optional() }).optional() });
|
|
59829
|
-
UsageLockErrorSchema = exports_external.enum(["timeout", "rate-limited"]);
|
|
60616
|
+
UsageLockErrorSchema = exports_external.enum(["timeout", "rate-limited", "parse-error"]);
|
|
59830
60617
|
UsageLockSchema = exports_external.object({
|
|
59831
60618
|
blockedUntil: exports_external.number(),
|
|
59832
60619
|
error: UsageLockErrorSchema.optional()
|
|
@@ -59846,27 +60633,21 @@ var init_usage_fetch = __esm(async () => {
|
|
|
59846
60633
|
extraUsageUtilization: exports_external.number().nullable().optional(),
|
|
59847
60634
|
error: exports_external.string().nullable().optional()
|
|
59848
60635
|
});
|
|
59849
|
-
|
|
60636
|
+
UsageApiBucketSchema = exports_external.looseObject({
|
|
59850
60637
|
utilization: exports_external.number().nullable().optional(),
|
|
59851
60638
|
resets_at: exports_external.string().nullable().optional()
|
|
59852
60639
|
}).nullable().optional();
|
|
59853
|
-
UsageApiResponseSchema = exports_external.
|
|
59854
|
-
five_hour:
|
|
59855
|
-
|
|
59856
|
-
|
|
59857
|
-
|
|
59858
|
-
|
|
59859
|
-
utilization: exports_external.number().nullable().optional(),
|
|
59860
|
-
resets_at: exports_external.string().nullable().optional()
|
|
59861
|
-
}).optional(),
|
|
59862
|
-
seven_day_sonnet: PerModelWeeklyBucketSchema,
|
|
59863
|
-
seven_day_opus: PerModelWeeklyBucketSchema,
|
|
59864
|
-
extra_usage: exports_external.object({
|
|
60640
|
+
UsageApiResponseSchema = exports_external.looseObject({
|
|
60641
|
+
five_hour: UsageApiBucketSchema,
|
|
60642
|
+
seven_day: UsageApiBucketSchema,
|
|
60643
|
+
seven_day_sonnet: UsageApiBucketSchema,
|
|
60644
|
+
seven_day_opus: UsageApiBucketSchema,
|
|
60645
|
+
extra_usage: exports_external.looseObject({
|
|
59865
60646
|
is_enabled: exports_external.boolean().nullable().optional(),
|
|
59866
60647
|
monthly_limit: exports_external.number().nullable().optional(),
|
|
59867
60648
|
used_credits: exports_external.number().nullable().optional(),
|
|
59868
60649
|
utilization: exports_external.number().nullable().optional()
|
|
59869
|
-
}).optional()
|
|
60650
|
+
}).nullable().optional()
|
|
59870
60651
|
});
|
|
59871
60652
|
usageErrorCacheMaxAge = LOCK_MAX_AGE;
|
|
59872
60653
|
});
|
|
@@ -59982,9 +60763,9 @@ function isRecursive(path4, resolved, state) {
|
|
|
59982
60763
|
function isRecursiveUsingRealPaths(resolved, state) {
|
|
59983
60764
|
return state.visited.includes(resolved + state.options.pathSeparator);
|
|
59984
60765
|
}
|
|
59985
|
-
function report(
|
|
59986
|
-
if (
|
|
59987
|
-
callback$1(
|
|
60766
|
+
function report(error51, callback$1, output, suppressErrors) {
|
|
60767
|
+
if (error51 && !suppressErrors)
|
|
60768
|
+
callback$1(error51, output);
|
|
59988
60769
|
else
|
|
59989
60770
|
callback$1(null, output);
|
|
59990
60771
|
}
|
|
@@ -60048,9 +60829,9 @@ var __require2, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
|
|
|
60048
60829
|
}, empty = () => {}, resolveSymlinksAsync = function(path4, state, callback$1) {
|
|
60049
60830
|
const { queue, fs: fs4, options: { suppressErrors } } = state;
|
|
60050
60831
|
queue.enqueue();
|
|
60051
|
-
fs4.realpath(path4, (
|
|
60052
|
-
if (
|
|
60053
|
-
return queue.dequeue(suppressErrors ? null :
|
|
60832
|
+
fs4.realpath(path4, (error51, resolvedPath) => {
|
|
60833
|
+
if (error51)
|
|
60834
|
+
return queue.dequeue(suppressErrors ? null : error51, state);
|
|
60054
60835
|
fs4.stat(resolvedPath, (error$1, stat) => {
|
|
60055
60836
|
if (error$1)
|
|
60056
60837
|
return queue.dequeue(suppressErrors ? null : error$1, state);
|
|
@@ -60081,17 +60862,17 @@ var __require2, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
|
|
|
60081
60862
|
return state.paths;
|
|
60082
60863
|
}, limitFilesSync = (state) => {
|
|
60083
60864
|
return state.paths.slice(0, state.options.maxFiles);
|
|
60084
|
-
}, onlyCountsAsync = (state,
|
|
60085
|
-
report(
|
|
60865
|
+
}, onlyCountsAsync = (state, error51, callback$1) => {
|
|
60866
|
+
report(error51, callback$1, state.counts, state.options.suppressErrors);
|
|
60086
60867
|
return null;
|
|
60087
|
-
}, defaultAsync = (state,
|
|
60088
|
-
report(
|
|
60868
|
+
}, defaultAsync = (state, error51, callback$1) => {
|
|
60869
|
+
report(error51, callback$1, state.paths, state.options.suppressErrors);
|
|
60089
60870
|
return null;
|
|
60090
|
-
}, limitFilesAsync = (state,
|
|
60091
|
-
report(
|
|
60871
|
+
}, limitFilesAsync = (state, error51, callback$1) => {
|
|
60872
|
+
report(error51, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
|
|
60092
60873
|
return null;
|
|
60093
|
-
}, groupsAsync = (state,
|
|
60094
|
-
report(
|
|
60874
|
+
}, groupsAsync = (state, error51, callback$1) => {
|
|
60875
|
+
report(error51, callback$1, state.groups, state.options.suppressErrors);
|
|
60095
60876
|
return null;
|
|
60096
60877
|
}, readdirOpts, walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
|
60097
60878
|
state.queue.enqueue();
|
|
@@ -60100,9 +60881,9 @@ var __require2, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
|
|
|
60100
60881
|
const { fs: fs4 } = state;
|
|
60101
60882
|
state.visited.push(crawlPath);
|
|
60102
60883
|
state.counts.directories++;
|
|
60103
|
-
fs4.readdir(crawlPath || ".", readdirOpts, (
|
|
60884
|
+
fs4.readdir(crawlPath || ".", readdirOpts, (error51, entries = []) => {
|
|
60104
60885
|
callback$1(entries, directoryPath, currentDepth);
|
|
60105
|
-
state.queue.dequeue(state.options.suppressErrors ? null :
|
|
60886
|
+
state.queue.dequeue(state.options.suppressErrors ? null : error51, state);
|
|
60106
60887
|
});
|
|
60107
60888
|
}, walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
|
60108
60889
|
const { fs: fs4 } = state;
|
|
@@ -60127,10 +60908,10 @@ var __require2, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
|
|
|
60127
60908
|
this.count++;
|
|
60128
60909
|
return this.count;
|
|
60129
60910
|
}
|
|
60130
|
-
dequeue(
|
|
60131
|
-
if (this.onQueueEmpty && (--this.count <= 0 ||
|
|
60132
|
-
this.onQueueEmpty(
|
|
60133
|
-
if (
|
|
60911
|
+
dequeue(error51, output) {
|
|
60912
|
+
if (this.onQueueEmpty && (--this.count <= 0 || error51)) {
|
|
60913
|
+
this.onQueueEmpty(error51, output);
|
|
60914
|
+
if (error51) {
|
|
60134
60915
|
output.controller.abort();
|
|
60135
60916
|
this.onQueueEmpty = undefined;
|
|
60136
60917
|
}
|
|
@@ -60181,7 +60962,7 @@ var __require2, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
|
|
|
60181
60962
|
groups: [],
|
|
60182
60963
|
counts: new Counter,
|
|
60183
60964
|
options,
|
|
60184
|
-
queue: new Queue((
|
|
60965
|
+
queue: new Queue((error51, state) => this.callbackInvoker(state, error51, callback$1)),
|
|
60185
60966
|
symlinks: /* @__PURE__ */ new Map,
|
|
60186
60967
|
visited: [""].slice(0, 0),
|
|
60187
60968
|
controller: new Aborter,
|
|
@@ -63229,8 +64010,8 @@ function formatUsageResetAt(resetAt, compact2 = false, timezone, localeOrHour12,
|
|
|
63229
64010
|
}
|
|
63230
64011
|
return formatResetAtUtc(date5, compact2, hour12);
|
|
63231
64012
|
}
|
|
63232
|
-
function getUsageErrorMessage(
|
|
63233
|
-
switch (
|
|
64013
|
+
function getUsageErrorMessage(error51) {
|
|
64014
|
+
switch (error51) {
|
|
63234
64015
|
case "no-credentials":
|
|
63235
64016
|
return "[No credentials]";
|
|
63236
64017
|
case "timeout":
|
|
@@ -65023,6 +65804,183 @@ var init_WeeklyUsage = __esm(async () => {
|
|
|
65023
65804
|
await init_usage();
|
|
65024
65805
|
});
|
|
65025
65806
|
|
|
65807
|
+
// src/widgets/shared/extra-usage-disabled.ts
|
|
65808
|
+
function isHideExtraUsageDisabledEnabled(item) {
|
|
65809
|
+
return isMetadataFlagEnabled(item, HIDE_DISABLED_KEY);
|
|
65810
|
+
}
|
|
65811
|
+
function handleToggleExtraUsageDisabledAction(action, item) {
|
|
65812
|
+
if (action !== TOGGLE_HIDE_DISABLED_ACTION) {
|
|
65813
|
+
return null;
|
|
65814
|
+
}
|
|
65815
|
+
return toggleMetadataFlag(item, HIDE_DISABLED_KEY);
|
|
65816
|
+
}
|
|
65817
|
+
function getHideExtraUsageDisabledKeybind() {
|
|
65818
|
+
return HIDE_DISABLED_KEYBIND;
|
|
65819
|
+
}
|
|
65820
|
+
function appendHideDisabledModifier(modifierText, item) {
|
|
65821
|
+
if (!isHideExtraUsageDisabledEnabled(item)) {
|
|
65822
|
+
return modifierText;
|
|
65823
|
+
}
|
|
65824
|
+
if (!modifierText) {
|
|
65825
|
+
return "(hide if disabled)";
|
|
65826
|
+
}
|
|
65827
|
+
return `${modifierText.slice(0, -1)}, hide if disabled)`;
|
|
65828
|
+
}
|
|
65829
|
+
var HIDE_DISABLED_KEY = "hideIfDisabled", TOGGLE_HIDE_DISABLED_ACTION = "toggle-hide-disabled", HIDE_DISABLED_KEYBIND;
|
|
65830
|
+
var init_extra_usage_disabled = __esm(() => {
|
|
65831
|
+
HIDE_DISABLED_KEYBIND = {
|
|
65832
|
+
key: "h",
|
|
65833
|
+
label: "(h)ide if disabled",
|
|
65834
|
+
action: TOGGLE_HIDE_DISABLED_ACTION
|
|
65835
|
+
};
|
|
65836
|
+
});
|
|
65837
|
+
|
|
65838
|
+
// src/widgets/ExtraUsageUtilization.ts
|
|
65839
|
+
class ExtraUsageUtilizationWidget {
|
|
65840
|
+
getDefaultColor() {
|
|
65841
|
+
return "green";
|
|
65842
|
+
}
|
|
65843
|
+
getDescription() {
|
|
65844
|
+
return "Shows extra usage (pay-as-you-go) utilization percentage";
|
|
65845
|
+
}
|
|
65846
|
+
getDisplayName() {
|
|
65847
|
+
return "Extra Usage Utilization";
|
|
65848
|
+
}
|
|
65849
|
+
getCategory() {
|
|
65850
|
+
return "Usage";
|
|
65851
|
+
}
|
|
65852
|
+
getEditorDisplay(item) {
|
|
65853
|
+
return {
|
|
65854
|
+
displayText: this.getDisplayName(),
|
|
65855
|
+
modifierText: appendHideDisabledModifier(getUsageDisplayModifierText(item), item)
|
|
65856
|
+
};
|
|
65857
|
+
}
|
|
65858
|
+
handleEditorAction(action, item) {
|
|
65859
|
+
const hideDisabledItem = handleToggleExtraUsageDisabledAction(action, item);
|
|
65860
|
+
if (hideDisabledItem) {
|
|
65861
|
+
return hideDisabledItem;
|
|
65862
|
+
}
|
|
65863
|
+
if (action === "toggle-progress") {
|
|
65864
|
+
return cycleUsageDisplayMode(item, [], true);
|
|
65865
|
+
}
|
|
65866
|
+
if (action === "toggle-invert") {
|
|
65867
|
+
return toggleUsageInverted(item);
|
|
65868
|
+
}
|
|
65869
|
+
return null;
|
|
65870
|
+
}
|
|
65871
|
+
render(item, context, settings) {
|
|
65872
|
+
const displayMode = getUsageDisplayMode(item);
|
|
65873
|
+
const inverted = isUsageInverted(item);
|
|
65874
|
+
if (context.isPreview) {
|
|
65875
|
+
const previewPercent = 2.6;
|
|
65876
|
+
const renderedPercent2 = inverted ? 100 - previewPercent : previewPercent;
|
|
65877
|
+
if (isUsageProgressMode(displayMode)) {
|
|
65878
|
+
const width = getUsageProgressBarWidth(displayMode);
|
|
65879
|
+
const progressBar = makeTimerProgressBar2(renderedPercent2, width);
|
|
65880
|
+
return formatRawOrLabeledValue(item, "Overage: ", `[${progressBar}] ${renderedPercent2.toFixed(1)}%`);
|
|
65881
|
+
}
|
|
65882
|
+
if (isUsageSliderMode(displayMode)) {
|
|
65883
|
+
const slider = makeSliderBar(renderedPercent2);
|
|
65884
|
+
const sliderDisplay = displayMode === "slider" ? `${slider} ${renderedPercent2.toFixed(1)}%` : slider;
|
|
65885
|
+
return formatRawOrLabeledValue(item, "Overage: ", sliderDisplay);
|
|
65886
|
+
}
|
|
65887
|
+
return formatRawOrLabeledValue(item, "Overage: ", `${previewPercent.toFixed(1)}%`);
|
|
65888
|
+
}
|
|
65889
|
+
const data = context.usageData ?? {};
|
|
65890
|
+
if (data.extraUsageEnabled === false) {
|
|
65891
|
+
return isHideExtraUsageDisabledEnabled(item) ? null : formatRawOrLabeledValue(item, "Overage: ", "n/a");
|
|
65892
|
+
}
|
|
65893
|
+
if (data.extraUsageEnabled !== true || data.extraUsageUtilization === undefined) {
|
|
65894
|
+
if (data.error)
|
|
65895
|
+
return getUsageErrorMessage(data.error);
|
|
65896
|
+
return null;
|
|
65897
|
+
}
|
|
65898
|
+
const percent = Math.max(0, Math.min(100, data.extraUsageUtilization * 100));
|
|
65899
|
+
const renderedPercent = inverted ? 100 - percent : percent;
|
|
65900
|
+
if (isUsageProgressMode(displayMode)) {
|
|
65901
|
+
const width = getUsageProgressBarWidth(displayMode);
|
|
65902
|
+
const progressBar = makeTimerProgressBar2(renderedPercent, width);
|
|
65903
|
+
return formatRawOrLabeledValue(item, "Overage: ", `[${progressBar}] ${renderedPercent.toFixed(1)}%`);
|
|
65904
|
+
}
|
|
65905
|
+
if (isUsageSliderMode(displayMode)) {
|
|
65906
|
+
const slider = makeSliderBar(renderedPercent);
|
|
65907
|
+
const sliderDisplay = displayMode === "slider" ? `${slider} ${renderedPercent.toFixed(1)}%` : slider;
|
|
65908
|
+
return formatRawOrLabeledValue(item, "Overage: ", sliderDisplay);
|
|
65909
|
+
}
|
|
65910
|
+
return formatRawOrLabeledValue(item, "Overage: ", `${percent.toFixed(1)}%`);
|
|
65911
|
+
}
|
|
65912
|
+
getCustomKeybinds(item) {
|
|
65913
|
+
return [...getUsagePercentCustomKeybinds(item), getHideExtraUsageDisabledKeybind()];
|
|
65914
|
+
}
|
|
65915
|
+
supportsRawValue() {
|
|
65916
|
+
return true;
|
|
65917
|
+
}
|
|
65918
|
+
supportsColors(item) {
|
|
65919
|
+
return true;
|
|
65920
|
+
}
|
|
65921
|
+
}
|
|
65922
|
+
var init_ExtraUsageUtilization = __esm(async () => {
|
|
65923
|
+
init_extra_usage_disabled();
|
|
65924
|
+
init_usage_display();
|
|
65925
|
+
await init_usage();
|
|
65926
|
+
});
|
|
65927
|
+
|
|
65928
|
+
// src/widgets/ExtraUsageRemaining.ts
|
|
65929
|
+
class ExtraUsageRemainingWidget {
|
|
65930
|
+
getDefaultColor() {
|
|
65931
|
+
return "green";
|
|
65932
|
+
}
|
|
65933
|
+
getDescription() {
|
|
65934
|
+
return "Shows remaining USD of your monthly extra usage limit";
|
|
65935
|
+
}
|
|
65936
|
+
getDisplayName() {
|
|
65937
|
+
return "Extra Usage Remaining";
|
|
65938
|
+
}
|
|
65939
|
+
getCategory() {
|
|
65940
|
+
return "Usage";
|
|
65941
|
+
}
|
|
65942
|
+
getEditorDisplay(item) {
|
|
65943
|
+
return {
|
|
65944
|
+
displayText: this.getDisplayName(),
|
|
65945
|
+
modifierText: appendHideDisabledModifier(undefined, item)
|
|
65946
|
+
};
|
|
65947
|
+
}
|
|
65948
|
+
handleEditorAction(action, item) {
|
|
65949
|
+
return handleToggleExtraUsageDisabledAction(action, item);
|
|
65950
|
+
}
|
|
65951
|
+
render(item, context, settings) {
|
|
65952
|
+
if (context.isPreview) {
|
|
65953
|
+
return formatRawOrLabeledValue(item, "Overage Left: ", "$3,894.00");
|
|
65954
|
+
}
|
|
65955
|
+
const data = context.usageData ?? {};
|
|
65956
|
+
if (data.extraUsageEnabled === false) {
|
|
65957
|
+
return isHideExtraUsageDisabledEnabled(item) ? null : formatRawOrLabeledValue(item, "Overage Left: ", "n/a");
|
|
65958
|
+
}
|
|
65959
|
+
if (data.extraUsageEnabled !== true || data.extraUsageLimit === undefined || data.extraUsageUsed === undefined) {
|
|
65960
|
+
if (data.error)
|
|
65961
|
+
return getUsageErrorMessage(data.error);
|
|
65962
|
+
return null;
|
|
65963
|
+
}
|
|
65964
|
+
const limitDollars = data.extraUsageLimit / 100;
|
|
65965
|
+
const remaining = Math.max(0, limitDollars - data.extraUsageUsed);
|
|
65966
|
+
const formatted = `$${remaining.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
|
|
65967
|
+
return formatRawOrLabeledValue(item, "Overage Left: ", formatted);
|
|
65968
|
+
}
|
|
65969
|
+
getCustomKeybinds() {
|
|
65970
|
+
return [getHideExtraUsageDisabledKeybind()];
|
|
65971
|
+
}
|
|
65972
|
+
supportsRawValue() {
|
|
65973
|
+
return true;
|
|
65974
|
+
}
|
|
65975
|
+
supportsColors(item) {
|
|
65976
|
+
return true;
|
|
65977
|
+
}
|
|
65978
|
+
}
|
|
65979
|
+
var init_ExtraUsageRemaining = __esm(async () => {
|
|
65980
|
+
init_extra_usage_disabled();
|
|
65981
|
+
await init_usage();
|
|
65982
|
+
});
|
|
65983
|
+
|
|
65026
65984
|
// src/widgets/WeeklySonnetUsage.ts
|
|
65027
65985
|
class WeeklySonnetUsageWidget {
|
|
65028
65986
|
getDefaultColor() {
|
|
@@ -67149,6 +68107,8 @@ var init_widgets = __esm(async () => {
|
|
|
67149
68107
|
init_TotalSpeed(),
|
|
67150
68108
|
init_SessionUsage(),
|
|
67151
68109
|
init_WeeklyUsage(),
|
|
68110
|
+
init_ExtraUsageUtilization(),
|
|
68111
|
+
init_ExtraUsageRemaining(),
|
|
67152
68112
|
init_WeeklySonnetUsage(),
|
|
67153
68113
|
init_WeeklyOpusUsage(),
|
|
67154
68114
|
init_BlockResetTimer(),
|
|
@@ -67228,6 +68188,8 @@ var init_widget_manifest = __esm(async () => {
|
|
|
67228
68188
|
{ type: "free-memory", create: () => new FreeMemoryWidget },
|
|
67229
68189
|
{ type: "session-usage", create: () => new SessionUsageWidget },
|
|
67230
68190
|
{ type: "weekly-usage", create: () => new WeeklyUsageWidget },
|
|
68191
|
+
{ type: "extra-usage-utilization", create: () => new ExtraUsageUtilizationWidget },
|
|
68192
|
+
{ type: "extra-usage-remaining", create: () => new ExtraUsageRemainingWidget },
|
|
67231
68193
|
{ type: "weekly-sonnet-usage", create: () => new WeeklySonnetUsageWidget },
|
|
67232
68194
|
{ type: "weekly-opus-usage", create: () => new WeeklyOpusUsageWidget },
|
|
67233
68195
|
{ type: "reset-timer", create: () => new BlockResetTimerWidget },
|
|
@@ -67454,8 +68416,8 @@ async function backupBadSettings(paths) {
|
|
|
67454
68416
|
await writeFile(paths.settingsBackupPath, content, "utf-8");
|
|
67455
68417
|
console.error(`Bad settings backed up to ${paths.settingsBackupPath}`);
|
|
67456
68418
|
}
|
|
67457
|
-
} catch (
|
|
67458
|
-
console.error("Failed to backup bad settings:",
|
|
68419
|
+
} catch (error51) {
|
|
68420
|
+
console.error("Failed to backup bad settings:", error51);
|
|
67459
68421
|
}
|
|
67460
68422
|
}
|
|
67461
68423
|
async function writeDefaultSettings(paths) {
|
|
@@ -67467,8 +68429,8 @@ async function writeDefaultSettings(paths) {
|
|
|
67467
68429
|
try {
|
|
67468
68430
|
await writeSettingsJson(settingsWithVersion, paths);
|
|
67469
68431
|
console.error(`Default settings written to ${paths.settingsPath}`);
|
|
67470
|
-
} catch (
|
|
67471
|
-
console.error("Failed to write default settings:",
|
|
68432
|
+
} catch (error51) {
|
|
68433
|
+
console.error("Failed to write default settings:", error51);
|
|
67472
68434
|
}
|
|
67473
68435
|
return defaults2;
|
|
67474
68436
|
}
|
|
@@ -67511,8 +68473,8 @@ async function loadSettings() {
|
|
|
67511
68473
|
...result2.data,
|
|
67512
68474
|
lines: upgradeLegacyWidgetTypes(result2.data.lines)
|
|
67513
68475
|
};
|
|
67514
|
-
} catch (
|
|
67515
|
-
console.error("Error loading settings:",
|
|
68476
|
+
} catch (error51) {
|
|
68477
|
+
console.error("Error loading settings:", error51);
|
|
67516
68478
|
return await recoverWithDefaults(paths);
|
|
67517
68479
|
}
|
|
67518
68480
|
}
|
|
@@ -67618,8 +68580,8 @@ async function backupClaudeSettings(suffix = ".bak") {
|
|
|
67618
68580
|
await writeFile2(backupPath, content, "utf-8");
|
|
67619
68581
|
return backupPath;
|
|
67620
68582
|
}
|
|
67621
|
-
} catch (
|
|
67622
|
-
console.error("Failed to backup Claude settings:",
|
|
68583
|
+
} catch (error51) {
|
|
68584
|
+
console.error("Failed to backup Claude settings:", error51);
|
|
67623
68585
|
}
|
|
67624
68586
|
return null;
|
|
67625
68587
|
}
|
|
@@ -67632,11 +68594,11 @@ function loadClaudeSettingsSync(options = {}) {
|
|
|
67632
68594
|
try {
|
|
67633
68595
|
const content = fs11.readFileSync(settingsPath2, "utf-8");
|
|
67634
68596
|
return JSON.parse(content);
|
|
67635
|
-
} catch (
|
|
68597
|
+
} catch (error51) {
|
|
67636
68598
|
if (logErrors) {
|
|
67637
|
-
console.error("Failed to load Claude settings:",
|
|
68599
|
+
console.error("Failed to load Claude settings:", error51);
|
|
67638
68600
|
}
|
|
67639
|
-
throw
|
|
68601
|
+
throw error51;
|
|
67640
68602
|
}
|
|
67641
68603
|
}
|
|
67642
68604
|
async function loadClaudeSettings(options = {}) {
|
|
@@ -67648,11 +68610,11 @@ async function loadClaudeSettings(options = {}) {
|
|
|
67648
68610
|
try {
|
|
67649
68611
|
const content = await readFile4(settingsPath2, "utf-8");
|
|
67650
68612
|
return JSON.parse(content);
|
|
67651
|
-
} catch (
|
|
68613
|
+
} catch (error51) {
|
|
67652
68614
|
if (logErrors) {
|
|
67653
|
-
console.error("Failed to load Claude settings:",
|
|
68615
|
+
console.error("Failed to load Claude settings:", error51);
|
|
67654
68616
|
}
|
|
67655
|
-
throw
|
|
68617
|
+
throw error51;
|
|
67656
68618
|
}
|
|
67657
68619
|
}
|
|
67658
68620
|
async function saveClaudeSettings(settings) {
|
|
@@ -67904,8 +68866,8 @@ function tryReadVoiceLayer(filePath) {
|
|
|
67904
68866
|
let content;
|
|
67905
68867
|
try {
|
|
67906
68868
|
content = fs11.readFileSync(filePath, "utf-8");
|
|
67907
|
-
} catch (
|
|
67908
|
-
const isMissing =
|
|
68869
|
+
} catch (error51) {
|
|
68870
|
+
const isMissing = error51.code === "ENOENT";
|
|
67909
68871
|
return { fileExisted: !isMissing, enabled: undefined };
|
|
67910
68872
|
}
|
|
67911
68873
|
try {
|
|
@@ -68895,9 +69857,9 @@ function runGlobalPackageUninstall(packageManager, { platform: platform2 = proce
|
|
|
68895
69857
|
const executable = getPackageManagerExecutable(packageManager, platform2);
|
|
68896
69858
|
const args = packageManager === "npm" ? ["uninstall", "-g", "ccstatusline"] : ["remove", "-g", "ccstatusline"];
|
|
68897
69859
|
return new Promise((resolve5, reject2) => {
|
|
68898
|
-
execFile(executable, args, { timeout: GLOBAL_PACKAGE_TIMEOUT_MS }, (
|
|
68899
|
-
if (
|
|
68900
|
-
reject2(
|
|
69860
|
+
execFile(executable, args, { timeout: GLOBAL_PACKAGE_TIMEOUT_MS }, (error51) => {
|
|
69861
|
+
if (error51) {
|
|
69862
|
+
reject2(error51 instanceof Error ? error51 : new Error("Global uninstall command failed"));
|
|
68901
69863
|
return;
|
|
68902
69864
|
}
|
|
68903
69865
|
resolve5();
|
|
@@ -69204,8 +70166,8 @@ async function installPowerlineFonts() {
|
|
|
69204
70166
|
} catch {}
|
|
69205
70167
|
}
|
|
69206
70168
|
}
|
|
69207
|
-
} catch (
|
|
69208
|
-
const errorMessage =
|
|
70169
|
+
} catch (error51) {
|
|
70170
|
+
const errorMessage = error51 instanceof Error ? error51.message : String(error51);
|
|
69209
70171
|
if (errorMessage.includes("git")) {
|
|
69210
70172
|
return {
|
|
69211
70173
|
success: false,
|
|
@@ -69333,9 +70295,9 @@ function buildUpdateCheckResult({
|
|
|
69333
70295
|
autoUpdateLaunchCommand: getAutoUpdateLaunchCommand(installation)
|
|
69334
70296
|
};
|
|
69335
70297
|
}
|
|
69336
|
-
function getErrorMessage(
|
|
69337
|
-
if (
|
|
69338
|
-
return
|
|
70298
|
+
function getErrorMessage(error51) {
|
|
70299
|
+
if (error51 instanceof Error && error51.message) {
|
|
70300
|
+
return error51.message;
|
|
69339
70301
|
}
|
|
69340
70302
|
return "Unable to query npm registry";
|
|
69341
70303
|
}
|
|
@@ -69356,12 +70318,12 @@ async function checkForUpdates({
|
|
|
69356
70318
|
installationMetadata,
|
|
69357
70319
|
commandAvailability
|
|
69358
70320
|
});
|
|
69359
|
-
} catch (
|
|
70321
|
+
} catch (error51) {
|
|
69360
70322
|
return {
|
|
69361
70323
|
status: "registry-failure",
|
|
69362
70324
|
currentVersion,
|
|
69363
70325
|
installation: getResolvedInstallation(installedCommand, installationMetadata),
|
|
69364
|
-
errorMessage: getErrorMessage(
|
|
70326
|
+
errorMessage: getErrorMessage(error51)
|
|
69365
70327
|
};
|
|
69366
70328
|
}
|
|
69367
70329
|
}
|
|
@@ -69391,8 +70353,8 @@ function fetchLatestNpmVersion(timeoutMs = DEFAULT_REGISTRY_TIMEOUT_MS) {
|
|
|
69391
70353
|
return;
|
|
69392
70354
|
}
|
|
69393
70355
|
resolve5(parsed.version);
|
|
69394
|
-
} catch (
|
|
69395
|
-
reject2(
|
|
70356
|
+
} catch (error51) {
|
|
70357
|
+
reject2(error51 instanceof Error ? error51 : new Error(String(error51)));
|
|
69396
70358
|
}
|
|
69397
70359
|
});
|
|
69398
70360
|
});
|
|
@@ -69407,9 +70369,9 @@ function runGlobalPackageInstall(packageManager, version2, { platform: platform4
|
|
|
69407
70369
|
const executable = getPackageManagerExecutable(packageManager, platform4);
|
|
69408
70370
|
const args = packageManager === "npm" ? ["install", "-g", `ccstatusline@${version2}`] : ["add", "-g", `ccstatusline@${version2}`];
|
|
69409
70371
|
return new Promise((resolve5, reject2) => {
|
|
69410
|
-
execFile2(executable, args, { timeout: GLOBAL_UPDATE_TIMEOUT_MS }, (
|
|
69411
|
-
if (
|
|
69412
|
-
reject2(
|
|
70372
|
+
execFile2(executable, args, { timeout: GLOBAL_UPDATE_TIMEOUT_MS }, (error51) => {
|
|
70373
|
+
if (error51) {
|
|
70374
|
+
reject2(error51 instanceof Error ? error51 : new Error("Global update command failed"));
|
|
69413
70375
|
return;
|
|
69414
70376
|
}
|
|
69415
70377
|
resolve5();
|
|
@@ -73872,9 +74834,9 @@ var RefreshIntervalMenu = ({
|
|
|
73872
74834
|
setValidationError(null);
|
|
73873
74835
|
return;
|
|
73874
74836
|
}
|
|
73875
|
-
const
|
|
73876
|
-
if (
|
|
73877
|
-
setValidationError(
|
|
74837
|
+
const error51 = validateRefreshIntervalInput(refreshInput);
|
|
74838
|
+
if (error51) {
|
|
74839
|
+
setValidationError(error51);
|
|
73878
74840
|
} else {
|
|
73879
74841
|
const value = parseInt(refreshInput, 10);
|
|
73880
74842
|
onUpdate(value);
|
|
@@ -74324,9 +75286,9 @@ var TerminalWidthMenu = ({
|
|
|
74324
75286
|
use_input_default((input, key) => {
|
|
74325
75287
|
if (editingThreshold) {
|
|
74326
75288
|
if (key.return) {
|
|
74327
|
-
const
|
|
74328
|
-
if (
|
|
74329
|
-
setValidationError(
|
|
75289
|
+
const error51 = validateCompactThresholdInput(thresholdInput);
|
|
75290
|
+
if (error51) {
|
|
75291
|
+
setValidationError(error51);
|
|
74330
75292
|
} else {
|
|
74331
75293
|
const value = parseInt(thresholdInput, 10);
|
|
74332
75294
|
setCompactThreshold(value);
|
|
@@ -75887,7 +76849,9 @@ var USAGE_WIDGET_TYPES = new Set([
|
|
|
75887
76849
|
"weekly-opus-usage",
|
|
75888
76850
|
"block-timer",
|
|
75889
76851
|
"reset-timer",
|
|
75890
|
-
"weekly-reset-timer"
|
|
76852
|
+
"weekly-reset-timer",
|
|
76853
|
+
"extra-usage-utilization",
|
|
76854
|
+
"extra-usage-remaining"
|
|
75891
76855
|
]);
|
|
75892
76856
|
var USAGE_DATA_FIELDS = [
|
|
75893
76857
|
"sessionUsage",
|
|
@@ -75911,7 +76875,16 @@ var USAGE_WIDGET_REQUIREMENTS = {
|
|
|
75911
76875
|
"weekly-opus-usage": [{ field: "weeklyOpusUsage" }],
|
|
75912
76876
|
"block-timer": [{ field: "sessionResetAt" }],
|
|
75913
76877
|
"reset-timer": [{ field: "sessionResetAt" }],
|
|
75914
|
-
"weekly-reset-timer": [{ field: "weeklyResetAt" }]
|
|
76878
|
+
"weekly-reset-timer": [{ field: "weeklyResetAt" }],
|
|
76879
|
+
"extra-usage-utilization": [
|
|
76880
|
+
{ field: "extraUsageEnabled" },
|
|
76881
|
+
{ field: "extraUsageUtilization" }
|
|
76882
|
+
],
|
|
76883
|
+
"extra-usage-remaining": [
|
|
76884
|
+
{ field: "extraUsageEnabled" },
|
|
76885
|
+
{ field: "extraUsageLimit" },
|
|
76886
|
+
{ field: "extraUsageUsed" }
|
|
76887
|
+
]
|
|
75915
76888
|
};
|
|
75916
76889
|
var USAGE_CURSOR_REQUIREMENTS = {
|
|
75917
76890
|
"session-usage": { field: "sessionResetAt" },
|
|
@@ -76204,8 +77177,8 @@ async function main() {
|
|
|
76204
77177
|
process.exit(1);
|
|
76205
77178
|
}
|
|
76206
77179
|
await renderMultipleLines(result2.data);
|
|
76207
|
-
} catch (
|
|
76208
|
-
console.error("Error parsing JSON:",
|
|
77180
|
+
} catch (error51) {
|
|
77181
|
+
console.error("Error parsing JSON:", error51);
|
|
76209
77182
|
process.exit(1);
|
|
76210
77183
|
}
|
|
76211
77184
|
} else {
|