@critical-path/svelte 0.19.2 → 0.19.4

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/index.js +852 -826
  3. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1059,7 +1059,7 @@ var u = l.arrayToEnum([
1059
1059
  p.create = (e) => new p(e);
1060
1060
  //#endregion
1061
1061
  //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js
1062
- var m = (e, t) => {
1062
+ var ve = (e, t) => {
1063
1063
  let n;
1064
1064
  switch (e.code) {
1065
1065
  case f.invalid_type:
@@ -1113,13 +1113,13 @@ var m = (e, t) => {
1113
1113
  default: n = t.defaultError, l.assertNever(e);
1114
1114
  }
1115
1115
  return { message: n };
1116
- }, ve = m;
1117
- function ye() {
1118
- return ve;
1116
+ }, ye = ve;
1117
+ function be() {
1118
+ return ye;
1119
1119
  }
1120
1120
  //#endregion
1121
1121
  //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
1122
- var be = (e) => {
1122
+ var xe = (e) => {
1123
1123
  let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = {
1124
1124
  ...i,
1125
1125
  path: a
@@ -1140,8 +1140,8 @@ var be = (e) => {
1140
1140
  message: s
1141
1141
  };
1142
1142
  };
1143
- function h(e, t) {
1144
- let n = ye(), r = be({
1143
+ function m(e, t) {
1144
+ let n = be(), r = xe({
1145
1145
  issueData: t,
1146
1146
  data: e.data,
1147
1147
  path: e.path,
@@ -1149,12 +1149,12 @@ function h(e, t) {
1149
1149
  e.common.contextualErrorMap,
1150
1150
  e.schemaErrorMap,
1151
1151
  n,
1152
- n === m ? void 0 : m
1152
+ n === ve ? void 0 : ve
1153
1153
  ].filter((e) => !!e)
1154
1154
  });
1155
1155
  e.common.issues.push(r);
1156
1156
  }
1157
- var g = class e {
1157
+ var h = class e {
1158
1158
  constructor() {
1159
1159
  this.value = "valid";
1160
1160
  }
@@ -1167,7 +1167,7 @@ var g = class e {
1167
1167
  static mergeArray(e, t) {
1168
1168
  let n = [];
1169
1169
  for (let r of t) {
1170
- if (r.status === "aborted") return _;
1170
+ if (r.status === "aborted") return g;
1171
1171
  r.status === "dirty" && e.dirty(), n.push(r.value);
1172
1172
  }
1173
1173
  return {
@@ -1190,7 +1190,7 @@ var g = class e {
1190
1190
  let n = {};
1191
1191
  for (let r of t) {
1192
1192
  let { key: t, value: i } = r;
1193
- if (t.status === "aborted" || i.status === "aborted") return _;
1193
+ if (t.status === "aborted" || i.status === "aborted") return g;
1194
1194
  t.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), t.value !== "__proto__" && (i.value !== void 0 || r.alwaysSet) && (n[t.value] = i.value);
1195
1195
  }
1196
1196
  return {
@@ -1198,27 +1198,27 @@ var g = class e {
1198
1198
  value: n
1199
1199
  };
1200
1200
  }
1201
- }, _ = Object.freeze({ status: "aborted" }), xe = (e) => ({
1201
+ }, g = Object.freeze({ status: "aborted" }), Se = (e) => ({
1202
1202
  status: "dirty",
1203
1203
  value: e
1204
- }), v = (e) => ({
1204
+ }), _ = (e) => ({
1205
1205
  status: "valid",
1206
1206
  value: e
1207
- }), Se = (e) => e.status === "aborted", Ce = (e) => e.status === "dirty", y = (e) => e.status === "valid", we = (e) => typeof Promise < "u" && e instanceof Promise, b;
1207
+ }), Ce = (e) => e.status === "aborted", we = (e) => e.status === "dirty", v = (e) => e.status === "valid", Te = (e) => typeof Promise < "u" && e instanceof Promise, y;
1208
1208
  (function(e) {
1209
1209
  e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
1210
- })(b ||= {});
1210
+ })(y ||= {});
1211
1211
  //#endregion
1212
1212
  //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
1213
- var x = class {
1213
+ var b = class {
1214
1214
  constructor(e, t, n, r) {
1215
1215
  this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = r;
1216
1216
  }
1217
1217
  get path() {
1218
1218
  return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
1219
1219
  }
1220
- }, Te = (e, t) => {
1221
- if (y(t)) return {
1220
+ }, Ee = (e, t) => {
1221
+ if (v(t)) return {
1222
1222
  success: !0,
1223
1223
  data: t.value
1224
1224
  };
@@ -1232,7 +1232,7 @@ var x = class {
1232
1232
  }
1233
1233
  };
1234
1234
  };
1235
- function S(e) {
1235
+ function x(e) {
1236
1236
  if (!e) return {};
1237
1237
  let { errorMap: t, invalid_type_error: n, required_error: r, description: i } = e;
1238
1238
  if (t && (n || r)) throw Error("Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.");
@@ -1247,7 +1247,7 @@ function S(e) {
1247
1247
  description: i
1248
1248
  };
1249
1249
  }
1250
- var C = class {
1250
+ var S = class {
1251
1251
  get description() {
1252
1252
  return this._def.description;
1253
1253
  }
@@ -1266,7 +1266,7 @@ var C = class {
1266
1266
  }
1267
1267
  _processInputParams(e) {
1268
1268
  return {
1269
- status: new g(),
1269
+ status: new h(),
1270
1270
  ctx: {
1271
1271
  common: e.parent.common,
1272
1272
  data: e.data,
@@ -1279,7 +1279,7 @@ var C = class {
1279
1279
  }
1280
1280
  _parseSync(e) {
1281
1281
  let t = this._parse(e);
1282
- if (we(t)) throw Error("Synchronous parse encountered promise.");
1282
+ if (Te(t)) throw Error("Synchronous parse encountered promise.");
1283
1283
  return t;
1284
1284
  }
1285
1285
  _parseAsync(e) {
@@ -1304,7 +1304,7 @@ var C = class {
1304
1304
  data: e,
1305
1305
  parsedType: d(e)
1306
1306
  };
1307
- return Te(n, this._parseSync({
1307
+ return Ee(n, this._parseSync({
1308
1308
  data: e,
1309
1309
  path: n.path,
1310
1310
  parent: n
@@ -1328,7 +1328,7 @@ var C = class {
1328
1328
  path: [],
1329
1329
  parent: t
1330
1330
  });
1331
- return y(n) ? { value: n.value } : { issues: t.common.issues };
1331
+ return v(n) ? { value: n.value } : { issues: t.common.issues };
1332
1332
  } catch (e) {
1333
1333
  e?.message?.toLowerCase()?.includes("encountered") && (this["~standard"].async = !0), t.common = {
1334
1334
  issues: [],
@@ -1339,7 +1339,7 @@ var C = class {
1339
1339
  data: e,
1340
1340
  path: [],
1341
1341
  parent: t
1342
- }).then((e) => y(e) ? { value: e.value } : { issues: t.common.issues });
1342
+ }).then((e) => v(e) ? { value: e.value } : { issues: t.common.issues });
1343
1343
  }
1344
1344
  async parseAsync(e, t) {
1345
1345
  let n = await this.safeParseAsync(e, t);
@@ -1363,7 +1363,7 @@ var C = class {
1363
1363
  path: n.path,
1364
1364
  parent: n
1365
1365
  });
1366
- return Te(n, await (we(r) ? r : Promise.resolve(r)));
1366
+ return Ee(n, await (Te(r) ? r : Promise.resolve(r)));
1367
1367
  }
1368
1368
  refine(e, t) {
1369
1369
  let n = (e) => typeof t == "string" || t === void 0 ? { message: t } : typeof t == "function" ? t(e) : t;
@@ -1379,9 +1379,9 @@ var C = class {
1379
1379
  return this._refinement((n, r) => e(n) ? !0 : (r.addIssue(typeof t == "function" ? t(n, r) : t), !1));
1380
1380
  }
1381
1381
  _refinement(e) {
1382
- return new M({
1382
+ return new j({
1383
1383
  schema: this,
1384
- typeName: F.ZodEffects,
1384
+ typeName: P.ZodEffects,
1385
1385
  effect: {
1386
1386
  type: "refinement",
1387
1387
  refinement: e
@@ -1399,31 +1399,31 @@ var C = class {
1399
1399
  };
1400
1400
  }
1401
1401
  optional() {
1402
- return N.create(this, this._def);
1402
+ return M.create(this, this._def);
1403
1403
  }
1404
1404
  nullable() {
1405
- return P.create(this, this._def);
1405
+ return N.create(this, this._def);
1406
1406
  }
1407
1407
  nullish() {
1408
1408
  return this.nullable().optional();
1409
1409
  }
1410
1410
  array() {
1411
- return E.create(this);
1411
+ return T.create(this);
1412
1412
  }
1413
1413
  promise() {
1414
- return j.create(this, this._def);
1414
+ return A.create(this, this._def);
1415
1415
  }
1416
1416
  or(e) {
1417
- return st.create([this, e], this._def);
1417
+ return ct.create([this, e], this._def);
1418
1418
  }
1419
1419
  and(e) {
1420
- return ut.create(this, e, this._def);
1420
+ return dt.create(this, e, this._def);
1421
1421
  }
1422
1422
  transform(e) {
1423
- return new M({
1424
- ...S(this._def),
1423
+ return new j({
1424
+ ...x(this._def),
1425
1425
  schema: this,
1426
- typeName: F.ZodEffects,
1426
+ typeName: P.ZodEffects,
1427
1427
  effect: {
1428
1428
  type: "transform",
1429
1429
  transform: e
@@ -1432,27 +1432,27 @@ var C = class {
1432
1432
  }
1433
1433
  default(e) {
1434
1434
  let t = typeof e == "function" ? e : () => e;
1435
- return new bt({
1436
- ...S(this._def),
1435
+ return new xt({
1436
+ ...x(this._def),
1437
1437
  innerType: this,
1438
1438
  defaultValue: t,
1439
- typeName: F.ZodDefault
1439
+ typeName: P.ZodDefault
1440
1440
  });
1441
1441
  }
1442
1442
  brand() {
1443
- return new Ct({
1444
- typeName: F.ZodBranded,
1443
+ return new wt({
1444
+ typeName: P.ZodBranded,
1445
1445
  type: this,
1446
- ...S(this._def)
1446
+ ...x(this._def)
1447
1447
  });
1448
1448
  }
1449
1449
  catch(e) {
1450
1450
  let t = typeof e == "function" ? e : () => e;
1451
- return new xt({
1452
- ...S(this._def),
1451
+ return new St({
1452
+ ...x(this._def),
1453
1453
  innerType: this,
1454
1454
  catchValue: t,
1455
- typeName: F.ZodCatch
1455
+ typeName: P.ZodCatch
1456
1456
  });
1457
1457
  }
1458
1458
  describe(e) {
@@ -1463,10 +1463,10 @@ var C = class {
1463
1463
  });
1464
1464
  }
1465
1465
  pipe(e) {
1466
- return wt.create(this, e);
1466
+ return Tt.create(this, e);
1467
1467
  }
1468
1468
  readonly() {
1469
- return Tt.create(this);
1469
+ return Et.create(this);
1470
1470
  }
1471
1471
  isOptional() {
1472
1472
  return this.safeParse(void 0).success;
@@ -1474,25 +1474,25 @@ var C = class {
1474
1474
  isNullable() {
1475
1475
  return this.safeParse(null).success;
1476
1476
  }
1477
- }, Ee = /^c[^\s-]{8,}$/i, De = /^[0-9a-z]+$/, Oe = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ke = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Ae = /^[a-z0-9_-]{21}$/i, je = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Me = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ne = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Pe = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", Fe, Ie = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Le = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Re = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, ze = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Be = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ve = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, He = "((\\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])))", Ue = RegExp(`^${He}$`);
1478
- function We(e) {
1477
+ }, De = /^c[^\s-]{8,}$/i, Oe = /^[0-9a-z]+$/, ke = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Ae = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, je = /^[a-z0-9_-]{21}$/i, Me = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ne = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Pe = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Fe = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", Ie, Le = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Re = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, ze = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Be = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ve = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, He = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Ue = "((\\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])))", We = RegExp(`^${Ue}$`);
1478
+ function Ge(e) {
1479
1479
  let t = "[0-5]\\d";
1480
1480
  e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision ?? (t = `${t}(\\.\\d+)?`);
1481
1481
  let n = e.precision ? "+" : "?";
1482
1482
  return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`;
1483
1483
  }
1484
- function Ge(e) {
1485
- return RegExp(`^${We(e)}$`);
1486
- }
1487
1484
  function Ke(e) {
1488
- let t = `${He}T${We(e)}`, n = [];
1489
- return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
1485
+ return RegExp(`^${Ge(e)}$`);
1490
1486
  }
1491
- function qe(e, t) {
1492
- return !((t !== "v4" && t || !Ie.test(e)) && (t !== "v6" && t || !Re.test(e)));
1487
+ function qe(e) {
1488
+ let t = `${Ue}T${Ge(e)}`, n = [];
1489
+ return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
1493
1490
  }
1494
1491
  function Je(e, t) {
1495
- if (!je.test(e)) return !1;
1492
+ return !((t !== "v4" && t || !Le.test(e)) && (t !== "v6" && t || !ze.test(e)));
1493
+ }
1494
+ function Ye(e, t) {
1495
+ if (!Me.test(e)) return !1;
1496
1496
  try {
1497
1497
  let [n] = e.split(".");
1498
1498
  if (!n) return !1;
@@ -1502,21 +1502,21 @@ function Je(e, t) {
1502
1502
  return !1;
1503
1503
  }
1504
1504
  }
1505
- function Ye(e, t) {
1506
- return !((t !== "v4" && t || !Le.test(e)) && (t !== "v6" && t || !ze.test(e)));
1505
+ function Xe(e, t) {
1506
+ return !((t !== "v4" && t || !Re.test(e)) && (t !== "v6" && t || !Be.test(e)));
1507
1507
  }
1508
- var Xe = class e extends C {
1508
+ var Ze = class e extends S {
1509
1509
  _parse(e) {
1510
1510
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== u.string) {
1511
1511
  let t = this._getOrReturnCtx(e);
1512
- return h(t, {
1512
+ return m(t, {
1513
1513
  code: f.invalid_type,
1514
1514
  expected: u.string,
1515
1515
  received: t.parsedType
1516
- }), _;
1516
+ }), g;
1517
1517
  }
1518
- let t = new g(), n;
1519
- for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n), h(n, {
1518
+ let t = new h(), n;
1519
+ for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n), m(n, {
1520
1520
  code: f.too_small,
1521
1521
  minimum: r.value,
1522
1522
  type: "string",
@@ -1524,7 +1524,7 @@ var Xe = class e extends C {
1524
1524
  exact: !1,
1525
1525
  message: r.message
1526
1526
  }), t.dirty());
1527
- else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n), h(n, {
1527
+ else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n), m(n, {
1528
1528
  code: f.too_big,
1529
1529
  maximum: r.value,
1530
1530
  type: "string",
@@ -1534,14 +1534,14 @@ var Xe = class e extends C {
1534
1534
  }), t.dirty());
1535
1535
  else if (r.kind === "length") {
1536
1536
  let i = e.data.length > r.value, a = e.data.length < r.value;
1537
- (i || a) && (n = this._getOrReturnCtx(e, n), i ? h(n, {
1537
+ (i || a) && (n = this._getOrReturnCtx(e, n), i ? m(n, {
1538
1538
  code: f.too_big,
1539
1539
  maximum: r.value,
1540
1540
  type: "string",
1541
1541
  inclusive: !0,
1542
1542
  exact: !0,
1543
1543
  message: r.message
1544
- }) : a && h(n, {
1544
+ }) : a && m(n, {
1545
1545
  code: f.too_small,
1546
1546
  minimum: r.value,
1547
1547
  type: "string",
@@ -1549,37 +1549,37 @@ var Xe = class e extends C {
1549
1549
  exact: !0,
1550
1550
  message: r.message
1551
1551
  }), t.dirty());
1552
- } else if (r.kind === "email") Ne.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1552
+ } else if (r.kind === "email") Pe.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1553
1553
  validation: "email",
1554
1554
  code: f.invalid_string,
1555
1555
  message: r.message
1556
1556
  }), t.dirty());
1557
- else if (r.kind === "emoji") Fe ||= new RegExp(Pe, "u"), Fe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1557
+ else if (r.kind === "emoji") Ie ||= new RegExp(Fe, "u"), Ie.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1558
1558
  validation: "emoji",
1559
1559
  code: f.invalid_string,
1560
1560
  message: r.message
1561
1561
  }), t.dirty());
1562
- else if (r.kind === "uuid") ke.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1562
+ else if (r.kind === "uuid") Ae.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1563
1563
  validation: "uuid",
1564
1564
  code: f.invalid_string,
1565
1565
  message: r.message
1566
1566
  }), t.dirty());
1567
- else if (r.kind === "nanoid") Ae.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1567
+ else if (r.kind === "nanoid") je.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1568
1568
  validation: "nanoid",
1569
1569
  code: f.invalid_string,
1570
1570
  message: r.message
1571
1571
  }), t.dirty());
1572
- else if (r.kind === "cuid") Ee.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1572
+ else if (r.kind === "cuid") De.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1573
1573
  validation: "cuid",
1574
1574
  code: f.invalid_string,
1575
1575
  message: r.message
1576
1576
  }), t.dirty());
1577
- else if (r.kind === "cuid2") De.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1577
+ else if (r.kind === "cuid2") Oe.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1578
1578
  validation: "cuid2",
1579
1579
  code: f.invalid_string,
1580
1580
  message: r.message
1581
1581
  }), t.dirty());
1582
- else if (r.kind === "ulid") Oe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1582
+ else if (r.kind === "ulid") ke.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1583
1583
  validation: "ulid",
1584
1584
  code: f.invalid_string,
1585
1585
  message: r.message
@@ -1587,64 +1587,64 @@ var Xe = class e extends C {
1587
1587
  else if (r.kind === "url") try {
1588
1588
  new URL(e.data);
1589
1589
  } catch {
1590
- n = this._getOrReturnCtx(e, n), h(n, {
1590
+ n = this._getOrReturnCtx(e, n), m(n, {
1591
1591
  validation: "url",
1592
1592
  code: f.invalid_string,
1593
1593
  message: r.message
1594
1594
  }), t.dirty();
1595
1595
  }
1596
- else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1596
+ else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1597
1597
  validation: "regex",
1598
1598
  code: f.invalid_string,
1599
1599
  message: r.message
1600
- }), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), h(n, {
1600
+ }), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), m(n, {
1601
1601
  code: f.invalid_string,
1602
1602
  validation: {
1603
1603
  includes: r.value,
1604
1604
  position: r.position
1605
1605
  },
1606
1606
  message: r.message
1607
- }), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), h(n, {
1607
+ }), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), m(n, {
1608
1608
  code: f.invalid_string,
1609
1609
  validation: { startsWith: r.value },
1610
1610
  message: r.message
1611
- }), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), h(n, {
1611
+ }), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), m(n, {
1612
1612
  code: f.invalid_string,
1613
1613
  validation: { endsWith: r.value },
1614
1614
  message: r.message
1615
- }), t.dirty()) : r.kind === "datetime" ? Ke(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1615
+ }), t.dirty()) : r.kind === "datetime" ? qe(r).test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1616
1616
  code: f.invalid_string,
1617
1617
  validation: "datetime",
1618
1618
  message: r.message
1619
- }), t.dirty()) : r.kind === "date" ? Ue.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1619
+ }), t.dirty()) : r.kind === "date" ? We.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1620
1620
  code: f.invalid_string,
1621
1621
  validation: "date",
1622
1622
  message: r.message
1623
- }), t.dirty()) : r.kind === "time" ? Ge(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1623
+ }), t.dirty()) : r.kind === "time" ? Ke(r).test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1624
1624
  code: f.invalid_string,
1625
1625
  validation: "time",
1626
1626
  message: r.message
1627
- }), t.dirty()) : r.kind === "duration" ? Me.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1627
+ }), t.dirty()) : r.kind === "duration" ? Ne.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1628
1628
  validation: "duration",
1629
1629
  code: f.invalid_string,
1630
1630
  message: r.message
1631
- }), t.dirty()) : r.kind === "ip" ? qe(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
1631
+ }), t.dirty()) : r.kind === "ip" ? Je(e.data, r.version) || (n = this._getOrReturnCtx(e, n), m(n, {
1632
1632
  validation: "ip",
1633
1633
  code: f.invalid_string,
1634
1634
  message: r.message
1635
- }), t.dirty()) : r.kind === "jwt" ? Je(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), h(n, {
1635
+ }), t.dirty()) : r.kind === "jwt" ? Ye(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), m(n, {
1636
1636
  validation: "jwt",
1637
1637
  code: f.invalid_string,
1638
1638
  message: r.message
1639
- }), t.dirty()) : r.kind === "cidr" ? Ye(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
1639
+ }), t.dirty()) : r.kind === "cidr" ? Xe(e.data, r.version) || (n = this._getOrReturnCtx(e, n), m(n, {
1640
1640
  validation: "cidr",
1641
1641
  code: f.invalid_string,
1642
1642
  message: r.message
1643
- }), t.dirty()) : r.kind === "base64" ? Be.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1643
+ }), t.dirty()) : r.kind === "base64" ? Ve.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1644
1644
  validation: "base64",
1645
1645
  code: f.invalid_string,
1646
1646
  message: r.message
1647
- }), t.dirty()) : r.kind === "base64url" ? Ve.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1647
+ }), t.dirty()) : r.kind === "base64url" ? He.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1648
1648
  validation: "base64url",
1649
1649
  code: f.invalid_string,
1650
1650
  message: r.message
@@ -1658,7 +1658,7 @@ var Xe = class e extends C {
1658
1658
  return this.refinement((t) => e.test(t), {
1659
1659
  validation: t,
1660
1660
  code: f.invalid_string,
1661
- ...b.errToObj(n)
1661
+ ...y.errToObj(n)
1662
1662
  });
1663
1663
  }
1664
1664
  _addCheck(t) {
@@ -1670,79 +1670,79 @@ var Xe = class e extends C {
1670
1670
  email(e) {
1671
1671
  return this._addCheck({
1672
1672
  kind: "email",
1673
- ...b.errToObj(e)
1673
+ ...y.errToObj(e)
1674
1674
  });
1675
1675
  }
1676
1676
  url(e) {
1677
1677
  return this._addCheck({
1678
1678
  kind: "url",
1679
- ...b.errToObj(e)
1679
+ ...y.errToObj(e)
1680
1680
  });
1681
1681
  }
1682
1682
  emoji(e) {
1683
1683
  return this._addCheck({
1684
1684
  kind: "emoji",
1685
- ...b.errToObj(e)
1685
+ ...y.errToObj(e)
1686
1686
  });
1687
1687
  }
1688
1688
  uuid(e) {
1689
1689
  return this._addCheck({
1690
1690
  kind: "uuid",
1691
- ...b.errToObj(e)
1691
+ ...y.errToObj(e)
1692
1692
  });
1693
1693
  }
1694
1694
  nanoid(e) {
1695
1695
  return this._addCheck({
1696
1696
  kind: "nanoid",
1697
- ...b.errToObj(e)
1697
+ ...y.errToObj(e)
1698
1698
  });
1699
1699
  }
1700
1700
  cuid(e) {
1701
1701
  return this._addCheck({
1702
1702
  kind: "cuid",
1703
- ...b.errToObj(e)
1703
+ ...y.errToObj(e)
1704
1704
  });
1705
1705
  }
1706
1706
  cuid2(e) {
1707
1707
  return this._addCheck({
1708
1708
  kind: "cuid2",
1709
- ...b.errToObj(e)
1709
+ ...y.errToObj(e)
1710
1710
  });
1711
1711
  }
1712
1712
  ulid(e) {
1713
1713
  return this._addCheck({
1714
1714
  kind: "ulid",
1715
- ...b.errToObj(e)
1715
+ ...y.errToObj(e)
1716
1716
  });
1717
1717
  }
1718
1718
  base64(e) {
1719
1719
  return this._addCheck({
1720
1720
  kind: "base64",
1721
- ...b.errToObj(e)
1721
+ ...y.errToObj(e)
1722
1722
  });
1723
1723
  }
1724
1724
  base64url(e) {
1725
1725
  return this._addCheck({
1726
1726
  kind: "base64url",
1727
- ...b.errToObj(e)
1727
+ ...y.errToObj(e)
1728
1728
  });
1729
1729
  }
1730
1730
  jwt(e) {
1731
1731
  return this._addCheck({
1732
1732
  kind: "jwt",
1733
- ...b.errToObj(e)
1733
+ ...y.errToObj(e)
1734
1734
  });
1735
1735
  }
1736
1736
  ip(e) {
1737
1737
  return this._addCheck({
1738
1738
  kind: "ip",
1739
- ...b.errToObj(e)
1739
+ ...y.errToObj(e)
1740
1740
  });
1741
1741
  }
1742
1742
  cidr(e) {
1743
1743
  return this._addCheck({
1744
1744
  kind: "cidr",
1745
- ...b.errToObj(e)
1745
+ ...y.errToObj(e)
1746
1746
  });
1747
1747
  }
1748
1748
  datetime(e) {
@@ -1757,7 +1757,7 @@ var Xe = class e extends C {
1757
1757
  precision: e?.precision === void 0 ? null : e?.precision,
1758
1758
  offset: e?.offset ?? !1,
1759
1759
  local: e?.local ?? !1,
1760
- ...b.errToObj(e?.message)
1760
+ ...y.errToObj(e?.message)
1761
1761
  });
1762
1762
  }
1763
1763
  date(e) {
@@ -1774,20 +1774,20 @@ var Xe = class e extends C {
1774
1774
  }) : this._addCheck({
1775
1775
  kind: "time",
1776
1776
  precision: e?.precision === void 0 ? null : e?.precision,
1777
- ...b.errToObj(e?.message)
1777
+ ...y.errToObj(e?.message)
1778
1778
  });
1779
1779
  }
1780
1780
  duration(e) {
1781
1781
  return this._addCheck({
1782
1782
  kind: "duration",
1783
- ...b.errToObj(e)
1783
+ ...y.errToObj(e)
1784
1784
  });
1785
1785
  }
1786
1786
  regex(e, t) {
1787
1787
  return this._addCheck({
1788
1788
  kind: "regex",
1789
1789
  regex: e,
1790
- ...b.errToObj(t)
1790
+ ...y.errToObj(t)
1791
1791
  });
1792
1792
  }
1793
1793
  includes(e, t) {
@@ -1795,46 +1795,46 @@ var Xe = class e extends C {
1795
1795
  kind: "includes",
1796
1796
  value: e,
1797
1797
  position: t?.position,
1798
- ...b.errToObj(t?.message)
1798
+ ...y.errToObj(t?.message)
1799
1799
  });
1800
1800
  }
1801
1801
  startsWith(e, t) {
1802
1802
  return this._addCheck({
1803
1803
  kind: "startsWith",
1804
1804
  value: e,
1805
- ...b.errToObj(t)
1805
+ ...y.errToObj(t)
1806
1806
  });
1807
1807
  }
1808
1808
  endsWith(e, t) {
1809
1809
  return this._addCheck({
1810
1810
  kind: "endsWith",
1811
1811
  value: e,
1812
- ...b.errToObj(t)
1812
+ ...y.errToObj(t)
1813
1813
  });
1814
1814
  }
1815
1815
  min(e, t) {
1816
1816
  return this._addCheck({
1817
1817
  kind: "min",
1818
1818
  value: e,
1819
- ...b.errToObj(t)
1819
+ ...y.errToObj(t)
1820
1820
  });
1821
1821
  }
1822
1822
  max(e, t) {
1823
1823
  return this._addCheck({
1824
1824
  kind: "max",
1825
1825
  value: e,
1826
- ...b.errToObj(t)
1826
+ ...y.errToObj(t)
1827
1827
  });
1828
1828
  }
1829
1829
  length(e, t) {
1830
1830
  return this._addCheck({
1831
1831
  kind: "length",
1832
1832
  value: e,
1833
- ...b.errToObj(t)
1833
+ ...y.errToObj(t)
1834
1834
  });
1835
1835
  }
1836
1836
  nonempty(e) {
1837
- return this.min(1, b.errToObj(e));
1837
+ return this.min(1, y.errToObj(e));
1838
1838
  }
1839
1839
  trim() {
1840
1840
  return new e({
@@ -1913,54 +1913,54 @@ var Xe = class e extends C {
1913
1913
  return e;
1914
1914
  }
1915
1915
  };
1916
- Xe.create = (e) => new Xe({
1916
+ Ze.create = (e) => new Ze({
1917
1917
  checks: [],
1918
- typeName: F.ZodString,
1918
+ typeName: P.ZodString,
1919
1919
  coerce: e?.coerce ?? !1,
1920
- ...S(e)
1920
+ ...x(e)
1921
1921
  });
1922
- function Ze(e, t) {
1922
+ function Qe(e, t) {
1923
1923
  let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = n > r ? n : r;
1924
1924
  return Number.parseInt(e.toFixed(i).replace(".", "")) % Number.parseInt(t.toFixed(i).replace(".", "")) / 10 ** i;
1925
1925
  }
1926
- var Qe = class e extends C {
1926
+ var $e = class e extends S {
1927
1927
  constructor() {
1928
1928
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1929
1929
  }
1930
1930
  _parse(e) {
1931
1931
  if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== u.number) {
1932
1932
  let t = this._getOrReturnCtx(e);
1933
- return h(t, {
1933
+ return m(t, {
1934
1934
  code: f.invalid_type,
1935
1935
  expected: u.number,
1936
1936
  received: t.parsedType
1937
- }), _;
1937
+ }), g;
1938
1938
  }
1939
- let t, n = new g();
1940
- for (let r of this._def.checks) r.kind === "int" ? l.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), h(t, {
1939
+ let t, n = new h();
1940
+ for (let r of this._def.checks) r.kind === "int" ? l.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), m(t, {
1941
1941
  code: f.invalid_type,
1942
1942
  expected: "integer",
1943
1943
  received: "float",
1944
1944
  message: r.message
1945
- }), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), h(t, {
1945
+ }), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), m(t, {
1946
1946
  code: f.too_small,
1947
1947
  minimum: r.value,
1948
1948
  type: "number",
1949
1949
  inclusive: r.inclusive,
1950
1950
  exact: !1,
1951
1951
  message: r.message
1952
- }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), h(t, {
1952
+ }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), m(t, {
1953
1953
  code: f.too_big,
1954
1954
  maximum: r.value,
1955
1955
  type: "number",
1956
1956
  inclusive: r.inclusive,
1957
1957
  exact: !1,
1958
1958
  message: r.message
1959
- }), n.dirty()) : r.kind === "multipleOf" ? Ze(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), h(t, {
1959
+ }), n.dirty()) : r.kind === "multipleOf" ? Qe(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), m(t, {
1960
1960
  code: f.not_multiple_of,
1961
1961
  multipleOf: r.value,
1962
1962
  message: r.message
1963
- }), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), h(t, {
1963
+ }), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), m(t, {
1964
1964
  code: f.not_finite,
1965
1965
  message: r.message
1966
1966
  }), n.dirty()) : l.assertNever(r);
@@ -1970,16 +1970,16 @@ var Qe = class e extends C {
1970
1970
  };
1971
1971
  }
1972
1972
  gte(e, t) {
1973
- return this.setLimit("min", e, !0, b.toString(t));
1973
+ return this.setLimit("min", e, !0, y.toString(t));
1974
1974
  }
1975
1975
  gt(e, t) {
1976
- return this.setLimit("min", e, !1, b.toString(t));
1976
+ return this.setLimit("min", e, !1, y.toString(t));
1977
1977
  }
1978
1978
  lte(e, t) {
1979
- return this.setLimit("max", e, !0, b.toString(t));
1979
+ return this.setLimit("max", e, !0, y.toString(t));
1980
1980
  }
1981
1981
  lt(e, t) {
1982
- return this.setLimit("max", e, !1, b.toString(t));
1982
+ return this.setLimit("max", e, !1, y.toString(t));
1983
1983
  }
1984
1984
  setLimit(t, n, r, i) {
1985
1985
  return new e({
@@ -1988,7 +1988,7 @@ var Qe = class e extends C {
1988
1988
  kind: t,
1989
1989
  value: n,
1990
1990
  inclusive: r,
1991
- message: b.toString(i)
1991
+ message: y.toString(i)
1992
1992
  }]
1993
1993
  });
1994
1994
  }
@@ -2001,7 +2001,7 @@ var Qe = class e extends C {
2001
2001
  int(e) {
2002
2002
  return this._addCheck({
2003
2003
  kind: "int",
2004
- message: b.toString(e)
2004
+ message: y.toString(e)
2005
2005
  });
2006
2006
  }
2007
2007
  positive(e) {
@@ -2009,7 +2009,7 @@ var Qe = class e extends C {
2009
2009
  kind: "min",
2010
2010
  value: 0,
2011
2011
  inclusive: !1,
2012
- message: b.toString(e)
2012
+ message: y.toString(e)
2013
2013
  });
2014
2014
  }
2015
2015
  negative(e) {
@@ -2017,7 +2017,7 @@ var Qe = class e extends C {
2017
2017
  kind: "max",
2018
2018
  value: 0,
2019
2019
  inclusive: !1,
2020
- message: b.toString(e)
2020
+ message: y.toString(e)
2021
2021
  });
2022
2022
  }
2023
2023
  nonpositive(e) {
@@ -2025,7 +2025,7 @@ var Qe = class e extends C {
2025
2025
  kind: "max",
2026
2026
  value: 0,
2027
2027
  inclusive: !0,
2028
- message: b.toString(e)
2028
+ message: y.toString(e)
2029
2029
  });
2030
2030
  }
2031
2031
  nonnegative(e) {
@@ -2033,20 +2033,20 @@ var Qe = class e extends C {
2033
2033
  kind: "min",
2034
2034
  value: 0,
2035
2035
  inclusive: !0,
2036
- message: b.toString(e)
2036
+ message: y.toString(e)
2037
2037
  });
2038
2038
  }
2039
2039
  multipleOf(e, t) {
2040
2040
  return this._addCheck({
2041
2041
  kind: "multipleOf",
2042
2042
  value: e,
2043
- message: b.toString(t)
2043
+ message: y.toString(t)
2044
2044
  });
2045
2045
  }
2046
2046
  finite(e) {
2047
2047
  return this._addCheck({
2048
2048
  kind: "finite",
2049
- message: b.toString(e)
2049
+ message: y.toString(e)
2050
2050
  });
2051
2051
  }
2052
2052
  safe(e) {
@@ -2054,12 +2054,12 @@ var Qe = class e extends C {
2054
2054
  kind: "min",
2055
2055
  inclusive: !0,
2056
2056
  value: -(2 ** 53 - 1),
2057
- message: b.toString(e)
2057
+ message: y.toString(e)
2058
2058
  })._addCheck({
2059
2059
  kind: "max",
2060
2060
  inclusive: !0,
2061
2061
  value: 2 ** 53 - 1,
2062
- message: b.toString(e)
2062
+ message: y.toString(e)
2063
2063
  });
2064
2064
  }
2065
2065
  get minValue() {
@@ -2082,13 +2082,13 @@ var Qe = class e extends C {
2082
2082
  return Number.isFinite(t) && Number.isFinite(e);
2083
2083
  }
2084
2084
  };
2085
- Qe.create = (e) => new Qe({
2085
+ $e.create = (e) => new $e({
2086
2086
  checks: [],
2087
- typeName: F.ZodNumber,
2087
+ typeName: P.ZodNumber,
2088
2088
  coerce: e?.coerce || !1,
2089
- ...S(e)
2089
+ ...x(e)
2090
2090
  });
2091
- var $e = class e extends C {
2091
+ var et = class e extends S {
2092
2092
  constructor() {
2093
2093
  super(...arguments), this.min = this.gte, this.max = this.lte;
2094
2094
  }
@@ -2099,20 +2099,20 @@ var $e = class e extends C {
2099
2099
  return this._getInvalidInput(e);
2100
2100
  }
2101
2101
  if (this._getType(e) !== u.bigint) return this._getInvalidInput(e);
2102
- let t, n = new g();
2103
- for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), h(t, {
2102
+ let t, n = new h();
2103
+ for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), m(t, {
2104
2104
  code: f.too_small,
2105
2105
  type: "bigint",
2106
2106
  minimum: r.value,
2107
2107
  inclusive: r.inclusive,
2108
2108
  message: r.message
2109
- }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), h(t, {
2109
+ }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), m(t, {
2110
2110
  code: f.too_big,
2111
2111
  type: "bigint",
2112
2112
  maximum: r.value,
2113
2113
  inclusive: r.inclusive,
2114
2114
  message: r.message
2115
- }), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), h(t, {
2115
+ }), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), m(t, {
2116
2116
  code: f.not_multiple_of,
2117
2117
  multipleOf: r.value,
2118
2118
  message: r.message
@@ -2124,23 +2124,23 @@ var $e = class e extends C {
2124
2124
  }
2125
2125
  _getInvalidInput(e) {
2126
2126
  let t = this._getOrReturnCtx(e);
2127
- return h(t, {
2127
+ return m(t, {
2128
2128
  code: f.invalid_type,
2129
2129
  expected: u.bigint,
2130
2130
  received: t.parsedType
2131
- }), _;
2131
+ }), g;
2132
2132
  }
2133
2133
  gte(e, t) {
2134
- return this.setLimit("min", e, !0, b.toString(t));
2134
+ return this.setLimit("min", e, !0, y.toString(t));
2135
2135
  }
2136
2136
  gt(e, t) {
2137
- return this.setLimit("min", e, !1, b.toString(t));
2137
+ return this.setLimit("min", e, !1, y.toString(t));
2138
2138
  }
2139
2139
  lte(e, t) {
2140
- return this.setLimit("max", e, !0, b.toString(t));
2140
+ return this.setLimit("max", e, !0, y.toString(t));
2141
2141
  }
2142
2142
  lt(e, t) {
2143
- return this.setLimit("max", e, !1, b.toString(t));
2143
+ return this.setLimit("max", e, !1, y.toString(t));
2144
2144
  }
2145
2145
  setLimit(t, n, r, i) {
2146
2146
  return new e({
@@ -2149,7 +2149,7 @@ var $e = class e extends C {
2149
2149
  kind: t,
2150
2150
  value: n,
2151
2151
  inclusive: r,
2152
- message: b.toString(i)
2152
+ message: y.toString(i)
2153
2153
  }]
2154
2154
  });
2155
2155
  }
@@ -2164,7 +2164,7 @@ var $e = class e extends C {
2164
2164
  kind: "min",
2165
2165
  value: BigInt(0),
2166
2166
  inclusive: !1,
2167
- message: b.toString(e)
2167
+ message: y.toString(e)
2168
2168
  });
2169
2169
  }
2170
2170
  negative(e) {
@@ -2172,7 +2172,7 @@ var $e = class e extends C {
2172
2172
  kind: "max",
2173
2173
  value: BigInt(0),
2174
2174
  inclusive: !1,
2175
- message: b.toString(e)
2175
+ message: y.toString(e)
2176
2176
  });
2177
2177
  }
2178
2178
  nonpositive(e) {
@@ -2180,7 +2180,7 @@ var $e = class e extends C {
2180
2180
  kind: "max",
2181
2181
  value: BigInt(0),
2182
2182
  inclusive: !0,
2183
- message: b.toString(e)
2183
+ message: y.toString(e)
2184
2184
  });
2185
2185
  }
2186
2186
  nonnegative(e) {
@@ -2188,14 +2188,14 @@ var $e = class e extends C {
2188
2188
  kind: "min",
2189
2189
  value: BigInt(0),
2190
2190
  inclusive: !0,
2191
- message: b.toString(e)
2191
+ message: y.toString(e)
2192
2192
  });
2193
2193
  }
2194
2194
  multipleOf(e, t) {
2195
2195
  return this._addCheck({
2196
2196
  kind: "multipleOf",
2197
2197
  value: e,
2198
- message: b.toString(t)
2198
+ message: y.toString(t)
2199
2199
  });
2200
2200
  }
2201
2201
  get minValue() {
@@ -2209,50 +2209,50 @@ var $e = class e extends C {
2209
2209
  return e;
2210
2210
  }
2211
2211
  };
2212
- $e.create = (e) => new $e({
2212
+ et.create = (e) => new et({
2213
2213
  checks: [],
2214
- typeName: F.ZodBigInt,
2214
+ typeName: P.ZodBigInt,
2215
2215
  coerce: e?.coerce ?? !1,
2216
- ...S(e)
2216
+ ...x(e)
2217
2217
  });
2218
- var et = class extends C {
2218
+ var tt = class extends S {
2219
2219
  _parse(e) {
2220
2220
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== u.boolean) {
2221
2221
  let t = this._getOrReturnCtx(e);
2222
- return h(t, {
2222
+ return m(t, {
2223
2223
  code: f.invalid_type,
2224
2224
  expected: u.boolean,
2225
2225
  received: t.parsedType
2226
- }), _;
2226
+ }), g;
2227
2227
  }
2228
- return v(e.data);
2228
+ return _(e.data);
2229
2229
  }
2230
2230
  };
2231
- et.create = (e) => new et({
2232
- typeName: F.ZodBoolean,
2231
+ tt.create = (e) => new tt({
2232
+ typeName: P.ZodBoolean,
2233
2233
  coerce: e?.coerce || !1,
2234
- ...S(e)
2234
+ ...x(e)
2235
2235
  });
2236
- var tt = class e extends C {
2236
+ var nt = class e extends S {
2237
2237
  _parse(e) {
2238
2238
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== u.date) {
2239
2239
  let t = this._getOrReturnCtx(e);
2240
- return h(t, {
2240
+ return m(t, {
2241
2241
  code: f.invalid_type,
2242
2242
  expected: u.date,
2243
2243
  received: t.parsedType
2244
- }), _;
2244
+ }), g;
2245
2245
  }
2246
- if (Number.isNaN(e.data.getTime())) return h(this._getOrReturnCtx(e), { code: f.invalid_date }), _;
2247
- let t = new g(), n;
2248
- for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), h(n, {
2246
+ if (Number.isNaN(e.data.getTime())) return m(this._getOrReturnCtx(e), { code: f.invalid_date }), g;
2247
+ let t = new h(), n;
2248
+ for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), m(n, {
2249
2249
  code: f.too_small,
2250
2250
  message: r.message,
2251
2251
  inclusive: !0,
2252
2252
  exact: !1,
2253
2253
  minimum: r.value,
2254
2254
  type: "date"
2255
- }), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), h(n, {
2255
+ }), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), m(n, {
2256
2256
  code: f.too_big,
2257
2257
  message: r.message,
2258
2258
  inclusive: !0,
@@ -2275,14 +2275,14 @@ var tt = class e extends C {
2275
2275
  return this._addCheck({
2276
2276
  kind: "min",
2277
2277
  value: e.getTime(),
2278
- message: b.toString(t)
2278
+ message: y.toString(t)
2279
2279
  });
2280
2280
  }
2281
2281
  max(e, t) {
2282
2282
  return this._addCheck({
2283
2283
  kind: "max",
2284
2284
  value: e.getTime(),
2285
- message: b.toString(t)
2285
+ message: y.toString(t)
2286
2286
  });
2287
2287
  }
2288
2288
  get minDate() {
@@ -2296,129 +2296,129 @@ var tt = class e extends C {
2296
2296
  return e == null ? null : new Date(e);
2297
2297
  }
2298
2298
  };
2299
- tt.create = (e) => new tt({
2299
+ nt.create = (e) => new nt({
2300
2300
  checks: [],
2301
2301
  coerce: e?.coerce || !1,
2302
- typeName: F.ZodDate,
2303
- ...S(e)
2302
+ typeName: P.ZodDate,
2303
+ ...x(e)
2304
2304
  });
2305
- var nt = class extends C {
2305
+ var rt = class extends S {
2306
2306
  _parse(e) {
2307
2307
  if (this._getType(e) !== u.symbol) {
2308
2308
  let t = this._getOrReturnCtx(e);
2309
- return h(t, {
2309
+ return m(t, {
2310
2310
  code: f.invalid_type,
2311
2311
  expected: u.symbol,
2312
2312
  received: t.parsedType
2313
- }), _;
2313
+ }), g;
2314
2314
  }
2315
- return v(e.data);
2315
+ return _(e.data);
2316
2316
  }
2317
2317
  };
2318
- nt.create = (e) => new nt({
2319
- typeName: F.ZodSymbol,
2320
- ...S(e)
2318
+ rt.create = (e) => new rt({
2319
+ typeName: P.ZodSymbol,
2320
+ ...x(e)
2321
2321
  });
2322
- var rt = class extends C {
2322
+ var it = class extends S {
2323
2323
  _parse(e) {
2324
2324
  if (this._getType(e) !== u.undefined) {
2325
2325
  let t = this._getOrReturnCtx(e);
2326
- return h(t, {
2326
+ return m(t, {
2327
2327
  code: f.invalid_type,
2328
2328
  expected: u.undefined,
2329
2329
  received: t.parsedType
2330
- }), _;
2330
+ }), g;
2331
2331
  }
2332
- return v(e.data);
2332
+ return _(e.data);
2333
2333
  }
2334
2334
  };
2335
- rt.create = (e) => new rt({
2336
- typeName: F.ZodUndefined,
2337
- ...S(e)
2335
+ it.create = (e) => new it({
2336
+ typeName: P.ZodUndefined,
2337
+ ...x(e)
2338
2338
  });
2339
- var it = class extends C {
2339
+ var at = class extends S {
2340
2340
  _parse(e) {
2341
2341
  if (this._getType(e) !== u.null) {
2342
2342
  let t = this._getOrReturnCtx(e);
2343
- return h(t, {
2343
+ return m(t, {
2344
2344
  code: f.invalid_type,
2345
2345
  expected: u.null,
2346
2346
  received: t.parsedType
2347
- }), _;
2347
+ }), g;
2348
2348
  }
2349
- return v(e.data);
2349
+ return _(e.data);
2350
2350
  }
2351
2351
  };
2352
- it.create = (e) => new it({
2353
- typeName: F.ZodNull,
2354
- ...S(e)
2352
+ at.create = (e) => new at({
2353
+ typeName: P.ZodNull,
2354
+ ...x(e)
2355
2355
  });
2356
- var at = class extends C {
2356
+ var ot = class extends S {
2357
2357
  constructor() {
2358
2358
  super(...arguments), this._any = !0;
2359
2359
  }
2360
2360
  _parse(e) {
2361
- return v(e.data);
2361
+ return _(e.data);
2362
2362
  }
2363
2363
  };
2364
- at.create = (e) => new at({
2365
- typeName: F.ZodAny,
2366
- ...S(e)
2364
+ ot.create = (e) => new ot({
2365
+ typeName: P.ZodAny,
2366
+ ...x(e)
2367
2367
  });
2368
- var w = class extends C {
2368
+ var C = class extends S {
2369
2369
  constructor() {
2370
2370
  super(...arguments), this._unknown = !0;
2371
2371
  }
2372
2372
  _parse(e) {
2373
- return v(e.data);
2373
+ return _(e.data);
2374
2374
  }
2375
2375
  };
2376
- w.create = (e) => new w({
2377
- typeName: F.ZodUnknown,
2378
- ...S(e)
2376
+ C.create = (e) => new C({
2377
+ typeName: P.ZodUnknown,
2378
+ ...x(e)
2379
2379
  });
2380
- var T = class extends C {
2380
+ var w = class extends S {
2381
2381
  _parse(e) {
2382
2382
  let t = this._getOrReturnCtx(e);
2383
- return h(t, {
2383
+ return m(t, {
2384
2384
  code: f.invalid_type,
2385
2385
  expected: u.never,
2386
2386
  received: t.parsedType
2387
- }), _;
2387
+ }), g;
2388
2388
  }
2389
2389
  };
2390
- T.create = (e) => new T({
2391
- typeName: F.ZodNever,
2392
- ...S(e)
2390
+ w.create = (e) => new w({
2391
+ typeName: P.ZodNever,
2392
+ ...x(e)
2393
2393
  });
2394
- var ot = class extends C {
2394
+ var st = class extends S {
2395
2395
  _parse(e) {
2396
2396
  if (this._getType(e) !== u.undefined) {
2397
2397
  let t = this._getOrReturnCtx(e);
2398
- return h(t, {
2398
+ return m(t, {
2399
2399
  code: f.invalid_type,
2400
2400
  expected: u.void,
2401
2401
  received: t.parsedType
2402
- }), _;
2402
+ }), g;
2403
2403
  }
2404
- return v(e.data);
2404
+ return _(e.data);
2405
2405
  }
2406
2406
  };
2407
- ot.create = (e) => new ot({
2408
- typeName: F.ZodVoid,
2409
- ...S(e)
2407
+ st.create = (e) => new st({
2408
+ typeName: P.ZodVoid,
2409
+ ...x(e)
2410
2410
  });
2411
- var E = class e extends C {
2411
+ var T = class e extends S {
2412
2412
  _parse(e) {
2413
2413
  let { ctx: t, status: n } = this._processInputParams(e), r = this._def;
2414
- if (t.parsedType !== u.array) return h(t, {
2414
+ if (t.parsedType !== u.array) return m(t, {
2415
2415
  code: f.invalid_type,
2416
2416
  expected: u.array,
2417
2417
  received: t.parsedType
2418
- }), _;
2418
+ }), g;
2419
2419
  if (r.exactLength !== null) {
2420
2420
  let e = t.data.length > r.exactLength.value, i = t.data.length < r.exactLength.value;
2421
- (e || i) && (h(t, {
2421
+ (e || i) && (m(t, {
2422
2422
  code: e ? f.too_big : f.too_small,
2423
2423
  minimum: i ? r.exactLength.value : void 0,
2424
2424
  maximum: e ? r.exactLength.value : void 0,
@@ -2428,23 +2428,23 @@ var E = class e extends C {
2428
2428
  message: r.exactLength.message
2429
2429
  }), n.dirty());
2430
2430
  }
2431
- if (r.minLength !== null && t.data.length < r.minLength.value && (h(t, {
2431
+ if (r.minLength !== null && t.data.length < r.minLength.value && (m(t, {
2432
2432
  code: f.too_small,
2433
2433
  minimum: r.minLength.value,
2434
2434
  type: "array",
2435
2435
  inclusive: !0,
2436
2436
  exact: !1,
2437
2437
  message: r.minLength.message
2438
- }), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (h(t, {
2438
+ }), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (m(t, {
2439
2439
  code: f.too_big,
2440
2440
  maximum: r.maxLength.value,
2441
2441
  type: "array",
2442
2442
  inclusive: !0,
2443
2443
  exact: !1,
2444
2444
  message: r.maxLength.message
2445
- }), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new x(t, e, t.path, n)))).then((e) => g.mergeArray(n, e));
2446
- let i = [...t.data].map((e, n) => r.type._parseSync(new x(t, e, t.path, n)));
2447
- return g.mergeArray(n, i);
2445
+ }), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new b(t, e, t.path, n)))).then((e) => h.mergeArray(n, e));
2446
+ let i = [...t.data].map((e, n) => r.type._parseSync(new b(t, e, t.path, n)));
2447
+ return h.mergeArray(n, i);
2448
2448
  }
2449
2449
  get element() {
2450
2450
  return this._def.type;
@@ -2454,7 +2454,7 @@ var E = class e extends C {
2454
2454
  ...this._def,
2455
2455
  minLength: {
2456
2456
  value: t,
2457
- message: b.toString(n)
2457
+ message: y.toString(n)
2458
2458
  }
2459
2459
  });
2460
2460
  }
@@ -2463,7 +2463,7 @@ var E = class e extends C {
2463
2463
  ...this._def,
2464
2464
  maxLength: {
2465
2465
  value: t,
2466
- message: b.toString(n)
2466
+ message: y.toString(n)
2467
2467
  }
2468
2468
  });
2469
2469
  }
@@ -2472,7 +2472,7 @@ var E = class e extends C {
2472
2472
  ...this._def,
2473
2473
  exactLength: {
2474
2474
  value: t,
2475
- message: b.toString(n)
2475
+ message: y.toString(n)
2476
2476
  }
2477
2477
  });
2478
2478
  }
@@ -2480,32 +2480,32 @@ var E = class e extends C {
2480
2480
  return this.min(1, e);
2481
2481
  }
2482
2482
  };
2483
- E.create = (e, t) => new E({
2483
+ T.create = (e, t) => new T({
2484
2484
  type: e,
2485
2485
  minLength: null,
2486
2486
  maxLength: null,
2487
2487
  exactLength: null,
2488
- typeName: F.ZodArray,
2489
- ...S(t)
2488
+ typeName: P.ZodArray,
2489
+ ...x(t)
2490
2490
  });
2491
- function D(e) {
2492
- if (e instanceof O) {
2491
+ function E(e) {
2492
+ if (e instanceof D) {
2493
2493
  let t = {};
2494
2494
  for (let n in e.shape) {
2495
2495
  let r = e.shape[n];
2496
- t[n] = N.create(D(r));
2496
+ t[n] = M.create(E(r));
2497
2497
  }
2498
- return new O({
2498
+ return new D({
2499
2499
  ...e._def,
2500
2500
  shape: () => t
2501
2501
  });
2502
2502
  }
2503
- return e instanceof E ? new E({
2503
+ return e instanceof T ? new T({
2504
2504
  ...e._def,
2505
- type: D(e.element)
2506
- }) : e instanceof N ? N.create(D(e.unwrap())) : e instanceof P ? P.create(D(e.unwrap())) : e instanceof A ? A.create(e.items.map((e) => D(e))) : e;
2505
+ type: E(e.element)
2506
+ }) : e instanceof M ? M.create(E(e.unwrap())) : e instanceof N ? N.create(E(e.unwrap())) : e instanceof k ? k.create(e.items.map((e) => E(e))) : e;
2507
2507
  }
2508
- var O = class e extends C {
2508
+ var D = class e extends S {
2509
2509
  constructor() {
2510
2510
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
2511
2511
  }
@@ -2520,14 +2520,14 @@ var O = class e extends C {
2520
2520
  _parse(e) {
2521
2521
  if (this._getType(e) !== u.object) {
2522
2522
  let t = this._getOrReturnCtx(e);
2523
- return h(t, {
2523
+ return m(t, {
2524
2524
  code: f.invalid_type,
2525
2525
  expected: u.object,
2526
2526
  received: t.parsedType
2527
- }), _;
2527
+ }), g;
2528
2528
  }
2529
2529
  let { status: t, ctx: n } = this._processInputParams(e), { shape: r, keys: i } = this._getCached(), a = [];
2530
- if (!(this._def.catchall instanceof T && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
2530
+ if (!(this._def.catchall instanceof w && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
2531
2531
  let o = [];
2532
2532
  for (let e of i) {
2533
2533
  let t = r[e], i = n.data[e];
@@ -2536,11 +2536,11 @@ var O = class e extends C {
2536
2536
  status: "valid",
2537
2537
  value: e
2538
2538
  },
2539
- value: t._parse(new x(n, i, n.path, e)),
2539
+ value: t._parse(new b(n, i, n.path, e)),
2540
2540
  alwaysSet: e in n.data
2541
2541
  });
2542
2542
  }
2543
- if (this._def.catchall instanceof T) {
2543
+ if (this._def.catchall instanceof w) {
2544
2544
  let e = this._def.unknownKeys;
2545
2545
  if (e === "passthrough") for (let e of a) o.push({
2546
2546
  key: {
@@ -2552,7 +2552,7 @@ var O = class e extends C {
2552
2552
  value: n.data[e]
2553
2553
  }
2554
2554
  });
2555
- else if (e === "strict") a.length > 0 && (h(n, {
2555
+ else if (e === "strict") a.length > 0 && (m(n, {
2556
2556
  code: f.unrecognized_keys,
2557
2557
  keys: a
2558
2558
  }), t.dirty());
@@ -2566,7 +2566,7 @@ var O = class e extends C {
2566
2566
  status: "valid",
2567
2567
  value: t
2568
2568
  },
2569
- value: e._parse(new x(n, r, n.path, t)),
2569
+ value: e._parse(new b(n, r, n.path, t)),
2570
2570
  alwaysSet: t in n.data
2571
2571
  });
2572
2572
  }
@@ -2582,18 +2582,18 @@ var O = class e extends C {
2582
2582
  });
2583
2583
  }
2584
2584
  return e;
2585
- }).then((e) => g.mergeObjectSync(t, e)) : g.mergeObjectSync(t, o);
2585
+ }).then((e) => h.mergeObjectSync(t, e)) : h.mergeObjectSync(t, o);
2586
2586
  }
2587
2587
  get shape() {
2588
2588
  return this._def.shape();
2589
2589
  }
2590
2590
  strict(t) {
2591
- return b.errToObj, new e({
2591
+ return y.errToObj, new e({
2592
2592
  ...this._def,
2593
2593
  unknownKeys: "strict",
2594
2594
  ...t === void 0 ? {} : { errorMap: (e, n) => {
2595
2595
  let r = this._def.errorMap?.(e, n).message ?? n.defaultError;
2596
- return e.code === "unrecognized_keys" ? { message: b.errToObj(t).message ?? r } : { message: r };
2596
+ return e.code === "unrecognized_keys" ? { message: y.errToObj(t).message ?? r } : { message: r };
2597
2597
  } }
2598
2598
  });
2599
2599
  }
@@ -2626,7 +2626,7 @@ var O = class e extends C {
2626
2626
  ...this._def.shape(),
2627
2627
  ...t._def.shape()
2628
2628
  }),
2629
- typeName: F.ZodObject
2629
+ typeName: P.ZodObject
2630
2630
  });
2631
2631
  }
2632
2632
  setKey(e, t) {
@@ -2655,7 +2655,7 @@ var O = class e extends C {
2655
2655
  });
2656
2656
  }
2657
2657
  deepPartial() {
2658
- return D(this);
2658
+ return E(this);
2659
2659
  }
2660
2660
  partial(t) {
2661
2661
  let n = {};
@@ -2673,7 +2673,7 @@ var O = class e extends C {
2673
2673
  for (let e of l.objectKeys(this.shape)) if (t && !t[e]) n[e] = this.shape[e];
2674
2674
  else {
2675
2675
  let t = this.shape[e];
2676
- for (; t instanceof N;) t = t._def.innerType;
2676
+ for (; t instanceof M;) t = t._def.innerType;
2677
2677
  n[e] = t;
2678
2678
  }
2679
2679
  return new e({
@@ -2682,39 +2682,39 @@ var O = class e extends C {
2682
2682
  });
2683
2683
  }
2684
2684
  keyof() {
2685
- return _t(l.objectKeys(this.shape));
2685
+ return vt(l.objectKeys(this.shape));
2686
2686
  }
2687
2687
  };
2688
- O.create = (e, t) => new O({
2688
+ D.create = (e, t) => new D({
2689
2689
  shape: () => e,
2690
2690
  unknownKeys: "strip",
2691
- catchall: T.create(),
2692
- typeName: F.ZodObject,
2693
- ...S(t)
2694
- }), O.strictCreate = (e, t) => new O({
2691
+ catchall: w.create(),
2692
+ typeName: P.ZodObject,
2693
+ ...x(t)
2694
+ }), D.strictCreate = (e, t) => new D({
2695
2695
  shape: () => e,
2696
2696
  unknownKeys: "strict",
2697
- catchall: T.create(),
2698
- typeName: F.ZodObject,
2699
- ...S(t)
2700
- }), O.lazycreate = (e, t) => new O({
2697
+ catchall: w.create(),
2698
+ typeName: P.ZodObject,
2699
+ ...x(t)
2700
+ }), D.lazycreate = (e, t) => new D({
2701
2701
  shape: e,
2702
2702
  unknownKeys: "strip",
2703
- catchall: T.create(),
2704
- typeName: F.ZodObject,
2705
- ...S(t)
2703
+ catchall: w.create(),
2704
+ typeName: P.ZodObject,
2705
+ ...x(t)
2706
2706
  });
2707
- var st = class extends C {
2707
+ var ct = class extends S {
2708
2708
  _parse(e) {
2709
2709
  let { ctx: t } = this._processInputParams(e), n = this._def.options;
2710
2710
  function r(e) {
2711
2711
  for (let t of e) if (t.result.status === "valid") return t.result;
2712
2712
  for (let n of e) if (n.result.status === "dirty") return t.common.issues.push(...n.ctx.common.issues), n.result;
2713
2713
  let n = e.map((e) => new p(e.ctx.common.issues));
2714
- return h(t, {
2714
+ return m(t, {
2715
2715
  code: f.invalid_union,
2716
2716
  unionErrors: n
2717
- }), _;
2717
+ }), g;
2718
2718
  }
2719
2719
  if (t.common.async) return Promise.all(n.map(async (e) => {
2720
2720
  let n = {
@@ -2757,29 +2757,29 @@ var st = class extends C {
2757
2757
  }
2758
2758
  if (e) return t.common.issues.push(...e.ctx.common.issues), e.result;
2759
2759
  let i = r.map((e) => new p(e));
2760
- return h(t, {
2760
+ return m(t, {
2761
2761
  code: f.invalid_union,
2762
2762
  unionErrors: i
2763
- }), _;
2763
+ }), g;
2764
2764
  }
2765
2765
  }
2766
2766
  get options() {
2767
2767
  return this._def.options;
2768
2768
  }
2769
2769
  };
2770
- st.create = (e, t) => new st({
2770
+ ct.create = (e, t) => new ct({
2771
2771
  options: e,
2772
- typeName: F.ZodUnion,
2773
- ...S(t)
2772
+ typeName: P.ZodUnion,
2773
+ ...x(t)
2774
2774
  });
2775
- var k = (e) => e instanceof ht ? k(e.schema) : e instanceof M ? k(e.innerType()) : e instanceof gt ? [e.value] : e instanceof vt ? e.options : e instanceof yt ? l.objectValues(e.enum) : e instanceof bt ? k(e._def.innerType) : e instanceof rt ? [void 0] : e instanceof it ? [null] : e instanceof N ? [void 0, ...k(e.unwrap())] : e instanceof P ? [null, ...k(e.unwrap())] : e instanceof Ct || e instanceof Tt ? k(e.unwrap()) : e instanceof xt ? k(e._def.innerType) : [], ct = class e extends C {
2775
+ var O = (e) => e instanceof gt ? O(e.schema) : e instanceof j ? O(e.innerType()) : e instanceof _t ? [e.value] : e instanceof yt ? e.options : e instanceof bt ? l.objectValues(e.enum) : e instanceof xt ? O(e._def.innerType) : e instanceof it ? [void 0] : e instanceof at ? [null] : e instanceof M ? [void 0, ...O(e.unwrap())] : e instanceof N ? [null, ...O(e.unwrap())] : e instanceof wt || e instanceof Et ? O(e.unwrap()) : e instanceof St ? O(e._def.innerType) : [], lt = class e extends S {
2776
2776
  _parse(e) {
2777
2777
  let { ctx: t } = this._processInputParams(e);
2778
- if (t.parsedType !== u.object) return h(t, {
2778
+ if (t.parsedType !== u.object) return m(t, {
2779
2779
  code: f.invalid_type,
2780
2780
  expected: u.object,
2781
2781
  received: t.parsedType
2782
- }), _;
2782
+ }), g;
2783
2783
  let n = this.discriminator, r = t.data[n], i = this.optionsMap.get(r);
2784
2784
  return i ? t.common.async ? i._parseAsync({
2785
2785
  data: t.data,
@@ -2789,11 +2789,11 @@ var k = (e) => e instanceof ht ? k(e.schema) : e instanceof M ? k(e.innerType())
2789
2789
  data: t.data,
2790
2790
  path: t.path,
2791
2791
  parent: t
2792
- }) : (h(t, {
2792
+ }) : (m(t, {
2793
2793
  code: f.invalid_union_discriminator,
2794
2794
  options: Array.from(this.optionsMap.keys()),
2795
2795
  path: [n]
2796
- }), _);
2796
+ }), g);
2797
2797
  }
2798
2798
  get discriminator() {
2799
2799
  return this._def.discriminator;
@@ -2807,7 +2807,7 @@ var k = (e) => e instanceof ht ? k(e.schema) : e instanceof M ? k(e.innerType())
2807
2807
  static create(t, n, r) {
2808
2808
  let i = /* @__PURE__ */ new Map();
2809
2809
  for (let e of n) {
2810
- let n = k(e.shape[t]);
2810
+ let n = O(e.shape[t]);
2811
2811
  if (!n.length) throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);
2812
2812
  for (let r of n) {
2813
2813
  if (i.has(r)) throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);
@@ -2815,15 +2815,15 @@ var k = (e) => e instanceof ht ? k(e.schema) : e instanceof M ? k(e.innerType())
2815
2815
  }
2816
2816
  }
2817
2817
  return new e({
2818
- typeName: F.ZodDiscriminatedUnion,
2818
+ typeName: P.ZodDiscriminatedUnion,
2819
2819
  discriminator: t,
2820
2820
  options: n,
2821
2821
  optionsMap: i,
2822
- ...S(r)
2822
+ ...x(r)
2823
2823
  });
2824
2824
  }
2825
2825
  };
2826
- function lt(e, t) {
2826
+ function ut(e, t) {
2827
2827
  let n = d(e), r = d(t);
2828
2828
  if (e === t) return {
2829
2829
  valid: !0,
@@ -2835,7 +2835,7 @@ function lt(e, t) {
2835
2835
  ...t
2836
2836
  };
2837
2837
  for (let n of r) {
2838
- let r = lt(e[n], t[n]);
2838
+ let r = ut(e[n], t[n]);
2839
2839
  if (!r.valid) return { valid: !1 };
2840
2840
  i[n] = r.data;
2841
2841
  }
@@ -2848,7 +2848,7 @@ function lt(e, t) {
2848
2848
  if (e.length !== t.length) return { valid: !1 };
2849
2849
  let n = [];
2850
2850
  for (let r = 0; r < e.length; r++) {
2851
- let i = e[r], a = t[r], o = lt(i, a);
2851
+ let i = e[r], a = t[r], o = ut(i, a);
2852
2852
  if (!o.valid) return { valid: !1 };
2853
2853
  n.push(o.data);
2854
2854
  }
@@ -2862,15 +2862,15 @@ function lt(e, t) {
2862
2862
  data: e
2863
2863
  } : { valid: !1 };
2864
2864
  }
2865
- var ut = class extends C {
2865
+ var dt = class extends S {
2866
2866
  _parse(e) {
2867
2867
  let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
2868
- if (Se(e) || Se(r)) return _;
2869
- let i = lt(e.value, r.value);
2870
- return i.valid ? ((Ce(e) || Ce(r)) && t.dirty(), {
2868
+ if (Ce(e) || Ce(r)) return g;
2869
+ let i = ut(e.value, r.value);
2870
+ return i.valid ? ((we(e) || we(r)) && t.dirty(), {
2871
2871
  status: t.value,
2872
2872
  value: i.data
2873
- }) : (h(n, { code: f.invalid_intersection_types }), _);
2873
+ }) : (m(n, { code: f.invalid_intersection_types }), g);
2874
2874
  };
2875
2875
  return n.common.async ? Promise.all([this._def.left._parseAsync({
2876
2876
  data: n.data,
@@ -2891,28 +2891,28 @@ var ut = class extends C {
2891
2891
  }));
2892
2892
  }
2893
2893
  };
2894
- ut.create = (e, t, n) => new ut({
2894
+ dt.create = (e, t, n) => new dt({
2895
2895
  left: e,
2896
2896
  right: t,
2897
- typeName: F.ZodIntersection,
2898
- ...S(n)
2897
+ typeName: P.ZodIntersection,
2898
+ ...x(n)
2899
2899
  });
2900
- var A = class e extends C {
2900
+ var k = class e extends S {
2901
2901
  _parse(e) {
2902
2902
  let { status: t, ctx: n } = this._processInputParams(e);
2903
- if (n.parsedType !== u.array) return h(n, {
2903
+ if (n.parsedType !== u.array) return m(n, {
2904
2904
  code: f.invalid_type,
2905
2905
  expected: u.array,
2906
2906
  received: n.parsedType
2907
- }), _;
2908
- if (n.data.length < this._def.items.length) return h(n, {
2907
+ }), g;
2908
+ if (n.data.length < this._def.items.length) return m(n, {
2909
2909
  code: f.too_small,
2910
2910
  minimum: this._def.items.length,
2911
2911
  inclusive: !0,
2912
2912
  exact: !1,
2913
2913
  type: "array"
2914
- }), _;
2915
- !this._def.rest && n.data.length > this._def.items.length && (h(n, {
2914
+ }), g;
2915
+ !this._def.rest && n.data.length > this._def.items.length && (m(n, {
2916
2916
  code: f.too_big,
2917
2917
  maximum: this._def.items.length,
2918
2918
  inclusive: !0,
@@ -2921,9 +2921,9 @@ var A = class e extends C {
2921
2921
  }), t.dirty());
2922
2922
  let r = [...n.data].map((e, t) => {
2923
2923
  let r = this._def.items[t] || this._def.rest;
2924
- return r ? r._parse(new x(n, e, n.path, t)) : null;
2924
+ return r ? r._parse(new b(n, e, n.path, t)) : null;
2925
2925
  }).filter((e) => !!e);
2926
- return n.common.async ? Promise.all(r).then((e) => g.mergeArray(t, e)) : g.mergeArray(t, r);
2926
+ return n.common.async ? Promise.all(r).then((e) => h.mergeArray(t, e)) : h.mergeArray(t, r);
2927
2927
  }
2928
2928
  get items() {
2929
2929
  return this._def.items;
@@ -2935,16 +2935,16 @@ var A = class e extends C {
2935
2935
  });
2936
2936
  }
2937
2937
  };
2938
- A.create = (e, t) => {
2938
+ k.create = (e, t) => {
2939
2939
  if (!Array.isArray(e)) throw Error("You must pass an array of schemas to z.tuple([ ... ])");
2940
- return new A({
2940
+ return new k({
2941
2941
  items: e,
2942
- typeName: F.ZodTuple,
2942
+ typeName: P.ZodTuple,
2943
2943
  rest: null,
2944
- ...S(t)
2944
+ ...x(t)
2945
2945
  });
2946
2946
  };
2947
- var dt = class e extends C {
2947
+ var ft = class e extends S {
2948
2948
  get keySchema() {
2949
2949
  return this._def.keyType;
2950
2950
  }
@@ -2953,36 +2953,36 @@ var dt = class e extends C {
2953
2953
  }
2954
2954
  _parse(e) {
2955
2955
  let { status: t, ctx: n } = this._processInputParams(e);
2956
- if (n.parsedType !== u.object) return h(n, {
2956
+ if (n.parsedType !== u.object) return m(n, {
2957
2957
  code: f.invalid_type,
2958
2958
  expected: u.object,
2959
2959
  received: n.parsedType
2960
- }), _;
2960
+ }), g;
2961
2961
  let r = [], i = this._def.keyType, a = this._def.valueType;
2962
2962
  for (let e in n.data) r.push({
2963
- key: i._parse(new x(n, e, n.path, e)),
2964
- value: a._parse(new x(n, n.data[e], n.path, e)),
2963
+ key: i._parse(new b(n, e, n.path, e)),
2964
+ value: a._parse(new b(n, n.data[e], n.path, e)),
2965
2965
  alwaysSet: e in n.data
2966
2966
  });
2967
- return n.common.async ? g.mergeObjectAsync(t, r) : g.mergeObjectSync(t, r);
2967
+ return n.common.async ? h.mergeObjectAsync(t, r) : h.mergeObjectSync(t, r);
2968
2968
  }
2969
2969
  get element() {
2970
2970
  return this._def.valueType;
2971
2971
  }
2972
2972
  static create(t, n, r) {
2973
- return n instanceof C ? new e({
2973
+ return n instanceof S ? new e({
2974
2974
  keyType: t,
2975
2975
  valueType: n,
2976
- typeName: F.ZodRecord,
2977
- ...S(r)
2976
+ typeName: P.ZodRecord,
2977
+ ...x(r)
2978
2978
  }) : new e({
2979
- keyType: Xe.create(),
2979
+ keyType: Ze.create(),
2980
2980
  valueType: t,
2981
- typeName: F.ZodRecord,
2982
- ...S(n)
2981
+ typeName: P.ZodRecord,
2982
+ ...x(n)
2983
2983
  });
2984
2984
  }
2985
- }, ft = class extends C {
2985
+ }, pt = class extends S {
2986
2986
  get keySchema() {
2987
2987
  return this._def.keyType;
2988
2988
  }
@@ -2991,21 +2991,21 @@ var dt = class e extends C {
2991
2991
  }
2992
2992
  _parse(e) {
2993
2993
  let { status: t, ctx: n } = this._processInputParams(e);
2994
- if (n.parsedType !== u.map) return h(n, {
2994
+ if (n.parsedType !== u.map) return m(n, {
2995
2995
  code: f.invalid_type,
2996
2996
  expected: u.map,
2997
2997
  received: n.parsedType
2998
- }), _;
2998
+ }), g;
2999
2999
  let r = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([e, t], a) => ({
3000
- key: r._parse(new x(n, e, n.path, [a, "key"])),
3001
- value: i._parse(new x(n, t, n.path, [a, "value"]))
3000
+ key: r._parse(new b(n, e, n.path, [a, "key"])),
3001
+ value: i._parse(new b(n, t, n.path, [a, "value"]))
3002
3002
  }));
3003
3003
  if (n.common.async) {
3004
3004
  let e = /* @__PURE__ */ new Map();
3005
3005
  return Promise.resolve().then(async () => {
3006
3006
  for (let n of a) {
3007
3007
  let r = await n.key, i = await n.value;
3008
- if (r.status === "aborted" || i.status === "aborted") return _;
3008
+ if (r.status === "aborted" || i.status === "aborted") return g;
3009
3009
  (r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
3010
3010
  }
3011
3011
  return {
@@ -3018,7 +3018,7 @@ var dt = class e extends C {
3018
3018
  let e = /* @__PURE__ */ new Map();
3019
3019
  for (let n of a) {
3020
3020
  let r = n.key, i = n.value;
3021
- if (r.status === "aborted" || i.status === "aborted") return _;
3021
+ if (r.status === "aborted" || i.status === "aborted") return g;
3022
3022
  (r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
3023
3023
  }
3024
3024
  return {
@@ -3028,29 +3028,29 @@ var dt = class e extends C {
3028
3028
  }
3029
3029
  }
3030
3030
  };
3031
- ft.create = (e, t, n) => new ft({
3031
+ pt.create = (e, t, n) => new pt({
3032
3032
  valueType: t,
3033
3033
  keyType: e,
3034
- typeName: F.ZodMap,
3035
- ...S(n)
3034
+ typeName: P.ZodMap,
3035
+ ...x(n)
3036
3036
  });
3037
- var pt = class e extends C {
3037
+ var mt = class e extends S {
3038
3038
  _parse(e) {
3039
3039
  let { status: t, ctx: n } = this._processInputParams(e);
3040
- if (n.parsedType !== u.set) return h(n, {
3040
+ if (n.parsedType !== u.set) return m(n, {
3041
3041
  code: f.invalid_type,
3042
3042
  expected: u.set,
3043
3043
  received: n.parsedType
3044
- }), _;
3044
+ }), g;
3045
3045
  let r = this._def;
3046
- r.minSize !== null && n.data.size < r.minSize.value && (h(n, {
3046
+ r.minSize !== null && n.data.size < r.minSize.value && (m(n, {
3047
3047
  code: f.too_small,
3048
3048
  minimum: r.minSize.value,
3049
3049
  type: "set",
3050
3050
  inclusive: !0,
3051
3051
  exact: !1,
3052
3052
  message: r.minSize.message
3053
- }), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (h(n, {
3053
+ }), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (m(n, {
3054
3054
  code: f.too_big,
3055
3055
  maximum: r.maxSize.value,
3056
3056
  type: "set",
@@ -3062,7 +3062,7 @@ var pt = class e extends C {
3062
3062
  function a(e) {
3063
3063
  let n = /* @__PURE__ */ new Set();
3064
3064
  for (let r of e) {
3065
- if (r.status === "aborted") return _;
3065
+ if (r.status === "aborted") return g;
3066
3066
  r.status === "dirty" && t.dirty(), n.add(r.value);
3067
3067
  }
3068
3068
  return {
@@ -3070,7 +3070,7 @@ var pt = class e extends C {
3070
3070
  value: n
3071
3071
  };
3072
3072
  }
3073
- let o = [...n.data.values()].map((e, t) => i._parse(new x(n, e, n.path, t)));
3073
+ let o = [...n.data.values()].map((e, t) => i._parse(new b(n, e, n.path, t)));
3074
3074
  return n.common.async ? Promise.all(o).then((e) => a(e)) : a(o);
3075
3075
  }
3076
3076
  min(t, n) {
@@ -3078,7 +3078,7 @@ var pt = class e extends C {
3078
3078
  ...this._def,
3079
3079
  minSize: {
3080
3080
  value: t,
3081
- message: b.toString(n)
3081
+ message: y.toString(n)
3082
3082
  }
3083
3083
  });
3084
3084
  }
@@ -3087,7 +3087,7 @@ var pt = class e extends C {
3087
3087
  ...this._def,
3088
3088
  maxSize: {
3089
3089
  value: t,
3090
- message: b.toString(n)
3090
+ message: y.toString(n)
3091
3091
  }
3092
3092
  });
3093
3093
  }
@@ -3098,33 +3098,33 @@ var pt = class e extends C {
3098
3098
  return this.min(1, e);
3099
3099
  }
3100
3100
  };
3101
- pt.create = (e, t) => new pt({
3101
+ mt.create = (e, t) => new mt({
3102
3102
  valueType: e,
3103
3103
  minSize: null,
3104
3104
  maxSize: null,
3105
- typeName: F.ZodSet,
3106
- ...S(t)
3105
+ typeName: P.ZodSet,
3106
+ ...x(t)
3107
3107
  });
3108
- var mt = class e extends C {
3108
+ var ht = class e extends S {
3109
3109
  constructor() {
3110
3110
  super(...arguments), this.validate = this.implement;
3111
3111
  }
3112
3112
  _parse(e) {
3113
3113
  let { ctx: t } = this._processInputParams(e);
3114
- if (t.parsedType !== u.function) return h(t, {
3114
+ if (t.parsedType !== u.function) return m(t, {
3115
3115
  code: f.invalid_type,
3116
3116
  expected: u.function,
3117
3117
  received: t.parsedType
3118
- }), _;
3118
+ }), g;
3119
3119
  function n(e, n) {
3120
- return be({
3120
+ return xe({
3121
3121
  data: e,
3122
3122
  path: t.path,
3123
3123
  errorMaps: [
3124
3124
  t.common.contextualErrorMap,
3125
3125
  t.schemaErrorMap,
3126
- ye(),
3127
- m
3126
+ be(),
3127
+ ve
3128
3128
  ].filter((e) => !!e),
3129
3129
  issueData: {
3130
3130
  code: f.invalid_arguments,
@@ -3133,14 +3133,14 @@ var mt = class e extends C {
3133
3133
  });
3134
3134
  }
3135
3135
  function r(e, n) {
3136
- return be({
3136
+ return xe({
3137
3137
  data: e,
3138
3138
  path: t.path,
3139
3139
  errorMaps: [
3140
3140
  t.common.contextualErrorMap,
3141
3141
  t.schemaErrorMap,
3142
- ye(),
3143
- m
3142
+ be(),
3143
+ ve
3144
3144
  ].filter((e) => !!e),
3145
3145
  issueData: {
3146
3146
  code: f.invalid_return_type,
@@ -3149,9 +3149,9 @@ var mt = class e extends C {
3149
3149
  });
3150
3150
  }
3151
3151
  let i = { errorMap: t.common.contextualErrorMap }, a = t.data;
3152
- if (this._def.returns instanceof j) {
3152
+ if (this._def.returns instanceof A) {
3153
3153
  let e = this;
3154
- return v(async function(...t) {
3154
+ return _(async function(...t) {
3155
3155
  let o = new p([]), s = await e._def.args.parseAsync(t, i).catch((e) => {
3156
3156
  throw o.addIssue(n(t, e)), o;
3157
3157
  }), c = await Reflect.apply(a, this, s);
@@ -3162,7 +3162,7 @@ var mt = class e extends C {
3162
3162
  }
3163
3163
  {
3164
3164
  let e = this;
3165
- return v(function(...t) {
3165
+ return _(function(...t) {
3166
3166
  let o = e._def.args.safeParse(t, i);
3167
3167
  if (!o.success) throw new p([n(t, o.error)]);
3168
3168
  let s = Reflect.apply(a, this, o.data), c = e._def.returns.safeParse(s, i);
@@ -3180,7 +3180,7 @@ var mt = class e extends C {
3180
3180
  args(...t) {
3181
3181
  return new e({
3182
3182
  ...this._def,
3183
- args: A.create(t).rest(w.create())
3183
+ args: k.create(t).rest(C.create())
3184
3184
  });
3185
3185
  }
3186
3186
  returns(t) {
@@ -3197,13 +3197,13 @@ var mt = class e extends C {
3197
3197
  }
3198
3198
  static create(t, n, r) {
3199
3199
  return new e({
3200
- args: t || A.create([]).rest(w.create()),
3201
- returns: n || w.create(),
3202
- typeName: F.ZodFunction,
3203
- ...S(r)
3200
+ args: t || k.create([]).rest(C.create()),
3201
+ returns: n || C.create(),
3202
+ typeName: P.ZodFunction,
3203
+ ...x(r)
3204
3204
  });
3205
3205
  }
3206
- }, ht = class extends C {
3206
+ }, gt = class extends S {
3207
3207
  get schema() {
3208
3208
  return this._def.getter();
3209
3209
  }
@@ -3216,20 +3216,20 @@ var mt = class e extends C {
3216
3216
  });
3217
3217
  }
3218
3218
  };
3219
- ht.create = (e, t) => new ht({
3219
+ gt.create = (e, t) => new gt({
3220
3220
  getter: e,
3221
- typeName: F.ZodLazy,
3222
- ...S(t)
3221
+ typeName: P.ZodLazy,
3222
+ ...x(t)
3223
3223
  });
3224
- var gt = class extends C {
3224
+ var _t = class extends S {
3225
3225
  _parse(e) {
3226
3226
  if (e.data !== this._def.value) {
3227
3227
  let t = this._getOrReturnCtx(e);
3228
- return h(t, {
3228
+ return m(t, {
3229
3229
  received: t.data,
3230
3230
  code: f.invalid_literal,
3231
3231
  expected: this._def.value
3232
- }), _;
3232
+ }), g;
3233
3233
  }
3234
3234
  return {
3235
3235
  status: "valid",
@@ -3240,37 +3240,37 @@ var gt = class extends C {
3240
3240
  return this._def.value;
3241
3241
  }
3242
3242
  };
3243
- gt.create = (e, t) => new gt({
3243
+ _t.create = (e, t) => new _t({
3244
3244
  value: e,
3245
- typeName: F.ZodLiteral,
3246
- ...S(t)
3245
+ typeName: P.ZodLiteral,
3246
+ ...x(t)
3247
3247
  });
3248
- function _t(e, t) {
3249
- return new vt({
3248
+ function vt(e, t) {
3249
+ return new yt({
3250
3250
  values: e,
3251
- typeName: F.ZodEnum,
3252
- ...S(t)
3251
+ typeName: P.ZodEnum,
3252
+ ...x(t)
3253
3253
  });
3254
3254
  }
3255
- var vt = class e extends C {
3255
+ var yt = class e extends S {
3256
3256
  _parse(e) {
3257
3257
  if (typeof e.data != "string") {
3258
3258
  let t = this._getOrReturnCtx(e), n = this._def.values;
3259
- return h(t, {
3259
+ return m(t, {
3260
3260
  expected: l.joinValues(n),
3261
3261
  received: t.parsedType,
3262
3262
  code: f.invalid_type
3263
- }), _;
3263
+ }), g;
3264
3264
  }
3265
3265
  if (this._cache ||= new Set(this._def.values), !this._cache.has(e.data)) {
3266
3266
  let t = this._getOrReturnCtx(e), n = this._def.values;
3267
- return h(t, {
3267
+ return m(t, {
3268
3268
  received: t.data,
3269
3269
  code: f.invalid_enum_value,
3270
3270
  options: n
3271
- }), _;
3271
+ }), g;
3272
3272
  }
3273
- return v(e.data);
3273
+ return _(e.data);
3274
3274
  }
3275
3275
  get options() {
3276
3276
  return this._def.values;
@@ -3303,69 +3303,69 @@ var vt = class e extends C {
3303
3303
  });
3304
3304
  }
3305
3305
  };
3306
- vt.create = _t;
3307
- var yt = class extends C {
3306
+ yt.create = vt;
3307
+ var bt = class extends S {
3308
3308
  _parse(e) {
3309
3309
  let t = l.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
3310
3310
  if (n.parsedType !== u.string && n.parsedType !== u.number) {
3311
3311
  let e = l.objectValues(t);
3312
- return h(n, {
3312
+ return m(n, {
3313
3313
  expected: l.joinValues(e),
3314
3314
  received: n.parsedType,
3315
3315
  code: f.invalid_type
3316
- }), _;
3316
+ }), g;
3317
3317
  }
3318
3318
  if (this._cache ||= new Set(l.getValidEnumValues(this._def.values)), !this._cache.has(e.data)) {
3319
3319
  let e = l.objectValues(t);
3320
- return h(n, {
3320
+ return m(n, {
3321
3321
  received: n.data,
3322
3322
  code: f.invalid_enum_value,
3323
3323
  options: e
3324
- }), _;
3324
+ }), g;
3325
3325
  }
3326
- return v(e.data);
3326
+ return _(e.data);
3327
3327
  }
3328
3328
  get enum() {
3329
3329
  return this._def.values;
3330
3330
  }
3331
3331
  };
3332
- yt.create = (e, t) => new yt({
3332
+ bt.create = (e, t) => new bt({
3333
3333
  values: e,
3334
- typeName: F.ZodNativeEnum,
3335
- ...S(t)
3334
+ typeName: P.ZodNativeEnum,
3335
+ ...x(t)
3336
3336
  });
3337
- var j = class extends C {
3337
+ var A = class extends S {
3338
3338
  unwrap() {
3339
3339
  return this._def.type;
3340
3340
  }
3341
3341
  _parse(e) {
3342
3342
  let { ctx: t } = this._processInputParams(e);
3343
- return t.parsedType !== u.promise && t.common.async === !1 ? (h(t, {
3343
+ return t.parsedType !== u.promise && t.common.async === !1 ? (m(t, {
3344
3344
  code: f.invalid_type,
3345
3345
  expected: u.promise,
3346
3346
  received: t.parsedType
3347
- }), _) : v((t.parsedType === u.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, {
3347
+ }), g) : _((t.parsedType === u.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, {
3348
3348
  path: t.path,
3349
3349
  errorMap: t.common.contextualErrorMap
3350
3350
  })));
3351
3351
  }
3352
3352
  };
3353
- j.create = (e, t) => new j({
3353
+ A.create = (e, t) => new A({
3354
3354
  type: e,
3355
- typeName: F.ZodPromise,
3356
- ...S(t)
3355
+ typeName: P.ZodPromise,
3356
+ ...x(t)
3357
3357
  });
3358
- var M = class extends C {
3358
+ var j = class extends S {
3359
3359
  innerType() {
3360
3360
  return this._def.schema;
3361
3361
  }
3362
3362
  sourceType() {
3363
- return this._def.schema._def.typeName === F.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
3363
+ return this._def.schema._def.typeName === P.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
3364
3364
  }
3365
3365
  _parse(e) {
3366
3366
  let { status: t, ctx: n } = this._processInputParams(e), r = this._def.effect || null, i = {
3367
3367
  addIssue: (e) => {
3368
- h(n, e), e.fatal ? t.abort() : t.dirty();
3368
+ m(n, e), e.fatal ? t.abort() : t.dirty();
3369
3369
  },
3370
3370
  get path() {
3371
3371
  return n.path;
@@ -3374,22 +3374,22 @@ var M = class extends C {
3374
3374
  if (i.addIssue = i.addIssue.bind(i), r.type === "preprocess") {
3375
3375
  let e = r.transform(n.data, i);
3376
3376
  if (n.common.async) return Promise.resolve(e).then(async (e) => {
3377
- if (t.value === "aborted") return _;
3377
+ if (t.value === "aborted") return g;
3378
3378
  let r = await this._def.schema._parseAsync({
3379
3379
  data: e,
3380
3380
  path: n.path,
3381
3381
  parent: n
3382
3382
  });
3383
- return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? xe(r.value) : r;
3383
+ return r.status === "aborted" ? g : r.status === "dirty" || t.value === "dirty" ? Se(r.value) : r;
3384
3384
  });
3385
3385
  {
3386
- if (t.value === "aborted") return _;
3386
+ if (t.value === "aborted") return g;
3387
3387
  let r = this._def.schema._parseSync({
3388
3388
  data: e,
3389
3389
  path: n.path,
3390
3390
  parent: n
3391
3391
  });
3392
- return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? xe(r.value) : r;
3392
+ return r.status === "aborted" ? g : r.status === "dirty" || t.value === "dirty" ? Se(r.value) : r;
3393
3393
  }
3394
3394
  }
3395
3395
  if (r.type === "refinement") {
@@ -3405,7 +3405,7 @@ var M = class extends C {
3405
3405
  path: n.path,
3406
3406
  parent: n
3407
3407
  });
3408
- return r.status === "aborted" ? _ : (r.status === "dirty" && t.dirty(), e(r.value), {
3408
+ return r.status === "aborted" ? g : (r.status === "dirty" && t.dirty(), e(r.value), {
3409
3409
  status: t.value,
3410
3410
  value: r.value
3411
3411
  });
@@ -3414,7 +3414,7 @@ var M = class extends C {
3414
3414
  data: n.data,
3415
3415
  path: n.path,
3416
3416
  parent: n
3417
- }).then((n) => n.status === "aborted" ? _ : (n.status === "dirty" && t.dirty(), e(n.value).then(() => ({
3417
+ }).then((n) => n.status === "aborted" ? g : (n.status === "dirty" && t.dirty(), e(n.value).then(() => ({
3418
3418
  status: t.value,
3419
3419
  value: n.value
3420
3420
  }))));
@@ -3426,7 +3426,7 @@ var M = class extends C {
3426
3426
  path: n.path,
3427
3427
  parent: n
3428
3428
  });
3429
- if (!y(e)) return _;
3429
+ if (!v(e)) return g;
3430
3430
  let a = r.transform(e.value, i);
3431
3431
  if (a instanceof Promise) throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
3432
3432
  return {
@@ -3438,55 +3438,55 @@ var M = class extends C {
3438
3438
  data: n.data,
3439
3439
  path: n.path,
3440
3440
  parent: n
3441
- }).then((e) => y(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
3441
+ }).then((e) => v(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
3442
3442
  status: t.value,
3443
3443
  value: e
3444
- })) : _);
3444
+ })) : g);
3445
3445
  }
3446
3446
  l.assertNever(r);
3447
3447
  }
3448
3448
  };
3449
- M.create = (e, t, n) => new M({
3449
+ j.create = (e, t, n) => new j({
3450
3450
  schema: e,
3451
- typeName: F.ZodEffects,
3451
+ typeName: P.ZodEffects,
3452
3452
  effect: t,
3453
- ...S(n)
3454
- }), M.createWithPreprocess = (e, t, n) => new M({
3453
+ ...x(n)
3454
+ }), j.createWithPreprocess = (e, t, n) => new j({
3455
3455
  schema: t,
3456
3456
  effect: {
3457
3457
  type: "preprocess",
3458
3458
  transform: e
3459
3459
  },
3460
- typeName: F.ZodEffects,
3461
- ...S(n)
3460
+ typeName: P.ZodEffects,
3461
+ ...x(n)
3462
3462
  });
3463
- var N = class extends C {
3463
+ var M = class extends S {
3464
3464
  _parse(e) {
3465
- return this._getType(e) === u.undefined ? v(void 0) : this._def.innerType._parse(e);
3465
+ return this._getType(e) === u.undefined ? _(void 0) : this._def.innerType._parse(e);
3466
3466
  }
3467
3467
  unwrap() {
3468
3468
  return this._def.innerType;
3469
3469
  }
3470
3470
  };
3471
- N.create = (e, t) => new N({
3471
+ M.create = (e, t) => new M({
3472
3472
  innerType: e,
3473
- typeName: F.ZodOptional,
3474
- ...S(t)
3473
+ typeName: P.ZodOptional,
3474
+ ...x(t)
3475
3475
  });
3476
- var P = class extends C {
3476
+ var N = class extends S {
3477
3477
  _parse(e) {
3478
- return this._getType(e) === u.null ? v(null) : this._def.innerType._parse(e);
3478
+ return this._getType(e) === u.null ? _(null) : this._def.innerType._parse(e);
3479
3479
  }
3480
3480
  unwrap() {
3481
3481
  return this._def.innerType;
3482
3482
  }
3483
3483
  };
3484
- P.create = (e, t) => new P({
3484
+ N.create = (e, t) => new N({
3485
3485
  innerType: e,
3486
- typeName: F.ZodNullable,
3487
- ...S(t)
3486
+ typeName: P.ZodNullable,
3487
+ ...x(t)
3488
3488
  });
3489
- var bt = class extends C {
3489
+ var xt = class extends S {
3490
3490
  _parse(e) {
3491
3491
  let { ctx: t } = this._processInputParams(e), n = t.data;
3492
3492
  return t.parsedType === u.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
@@ -3499,13 +3499,13 @@ var bt = class extends C {
3499
3499
  return this._def.innerType;
3500
3500
  }
3501
3501
  };
3502
- bt.create = (e, t) => new bt({
3502
+ xt.create = (e, t) => new xt({
3503
3503
  innerType: e,
3504
- typeName: F.ZodDefault,
3504
+ typeName: P.ZodDefault,
3505
3505
  defaultValue: typeof t.default == "function" ? t.default : () => t.default,
3506
- ...S(t)
3506
+ ...x(t)
3507
3507
  });
3508
- var xt = class extends C {
3508
+ var St = class extends S {
3509
3509
  _parse(e) {
3510
3510
  let { ctx: t } = this._processInputParams(e), n = {
3511
3511
  ...t,
@@ -3518,7 +3518,7 @@ var xt = class extends C {
3518
3518
  path: n.path,
3519
3519
  parent: { ...n }
3520
3520
  });
3521
- return we(r) ? r.then((e) => ({
3521
+ return Te(r) ? r.then((e) => ({
3522
3522
  status: "valid",
3523
3523
  value: e.status === "valid" ? e.value : this._def.catchValue({
3524
3524
  get error() {
@@ -3540,21 +3540,21 @@ var xt = class extends C {
3540
3540
  return this._def.innerType;
3541
3541
  }
3542
3542
  };
3543
- xt.create = (e, t) => new xt({
3543
+ St.create = (e, t) => new St({
3544
3544
  innerType: e,
3545
- typeName: F.ZodCatch,
3545
+ typeName: P.ZodCatch,
3546
3546
  catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
3547
- ...S(t)
3547
+ ...x(t)
3548
3548
  });
3549
- var St = class extends C {
3549
+ var Ct = class extends S {
3550
3550
  _parse(e) {
3551
3551
  if (this._getType(e) !== u.nan) {
3552
3552
  let t = this._getOrReturnCtx(e);
3553
- return h(t, {
3553
+ return m(t, {
3554
3554
  code: f.invalid_type,
3555
3555
  expected: u.nan,
3556
3556
  received: t.parsedType
3557
- }), _;
3557
+ }), g;
3558
3558
  }
3559
3559
  return {
3560
3560
  status: "valid",
@@ -3562,11 +3562,11 @@ var St = class extends C {
3562
3562
  };
3563
3563
  }
3564
3564
  };
3565
- St.create = (e) => new St({
3566
- typeName: F.ZodNaN,
3567
- ...S(e)
3565
+ Ct.create = (e) => new Ct({
3566
+ typeName: P.ZodNaN,
3567
+ ...x(e)
3568
3568
  });
3569
- var Ct = class extends C {
3569
+ var wt = class extends S {
3570
3570
  _parse(e) {
3571
3571
  let { ctx: t } = this._processInputParams(e), n = t.data;
3572
3572
  return this._def.type._parse({
@@ -3578,7 +3578,7 @@ var Ct = class extends C {
3578
3578
  unwrap() {
3579
3579
  return this._def.type;
3580
3580
  }
3581
- }, wt = class e extends C {
3581
+ }, Tt = class e extends S {
3582
3582
  _parse(e) {
3583
3583
  let { status: t, ctx: n } = this._processInputParams(e);
3584
3584
  if (n.common.async) return (async () => {
@@ -3587,7 +3587,7 @@ var Ct = class extends C {
3587
3587
  path: n.path,
3588
3588
  parent: n
3589
3589
  });
3590
- return e.status === "aborted" ? _ : e.status === "dirty" ? (t.dirty(), xe(e.value)) : this._def.out._parseAsync({
3590
+ return e.status === "aborted" ? g : e.status === "dirty" ? (t.dirty(), Se(e.value)) : this._def.out._parseAsync({
3591
3591
  data: e.value,
3592
3592
  path: n.path,
3593
3593
  parent: n
@@ -3599,7 +3599,7 @@ var Ct = class extends C {
3599
3599
  path: n.path,
3600
3600
  parent: n
3601
3601
  });
3602
- return e.status === "aborted" ? _ : e.status === "dirty" ? (t.dirty(), {
3602
+ return e.status === "aborted" ? g : e.status === "dirty" ? (t.dirty(), {
3603
3603
  status: "dirty",
3604
3604
  value: e.value
3605
3605
  }) : this._def.out._parseSync({
@@ -3613,39 +3613,39 @@ var Ct = class extends C {
3613
3613
  return new e({
3614
3614
  in: t,
3615
3615
  out: n,
3616
- typeName: F.ZodPipeline
3616
+ typeName: P.ZodPipeline
3617
3617
  });
3618
3618
  }
3619
- }, Tt = class extends C {
3619
+ }, Et = class extends S {
3620
3620
  _parse(e) {
3621
- let t = this._def.innerType._parse(e), n = (e) => (y(e) && (e.value = Object.freeze(e.value)), e);
3622
- return we(t) ? t.then((e) => n(e)) : n(t);
3621
+ let t = this._def.innerType._parse(e), n = (e) => (v(e) && (e.value = Object.freeze(e.value)), e);
3622
+ return Te(t) ? t.then((e) => n(e)) : n(t);
3623
3623
  }
3624
3624
  unwrap() {
3625
3625
  return this._def.innerType;
3626
3626
  }
3627
3627
  };
3628
- Tt.create = (e, t) => new Tt({
3628
+ Et.create = (e, t) => new Et({
3629
3629
  innerType: e,
3630
- typeName: F.ZodReadonly,
3631
- ...S(t)
3632
- }), O.lazycreate;
3633
- var F;
3630
+ typeName: P.ZodReadonly,
3631
+ ...x(t)
3632
+ }), D.lazycreate;
3633
+ var P;
3634
3634
  (function(e) {
3635
3635
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
3636
- })(F ||= {});
3637
- var I = Xe.create, L = Qe.create;
3638
- St.create, $e.create;
3639
- var R = et.create;
3640
- tt.create, nt.create, rt.create, it.create, at.create;
3641
- var Et = w.create;
3642
- T.create, ot.create;
3643
- var z = E.create, B = O.create;
3644
- O.strictCreate, st.create, ct.create, ut.create, A.create;
3645
- var V = dt.create;
3646
- ft.create, pt.create, mt.create, ht.create, gt.create;
3647
- var H = vt.create;
3648
- yt.create, j.create, M.create, N.create, P.create, M.createWithPreprocess, wt.create;
3636
+ })(P ||= {});
3637
+ var F = Ze.create, I = $e.create;
3638
+ Ct.create, et.create;
3639
+ var L = tt.create;
3640
+ nt.create, rt.create, it.create, at.create, ot.create;
3641
+ var R = C.create;
3642
+ w.create, st.create;
3643
+ var z = T.create, B = D.create;
3644
+ D.strictCreate, ct.create, lt.create, dt.create, k.create;
3645
+ var V = ft.create;
3646
+ pt.create, mt.create, ht.create, gt.create, _t.create;
3647
+ var H = yt.create;
3648
+ bt.create, A.create, j.create, M.create, N.create, j.createWithPreprocess, Tt.create;
3649
3649
  //#endregion
3650
3650
  //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js
3651
3651
  var Dt = Symbol("Let zodToJsonSchema decide on which parser to use"), Ot = {
@@ -3732,7 +3732,7 @@ function W(e) {
3732
3732
  //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
3733
3733
  function Nt(e, t) {
3734
3734
  let n = { type: "array" };
3735
- return e.type?._def && e.type?._def?.typeName !== F.ZodAny && (n.items = J(e.type._def, {
3735
+ return e.type?._def && e.type?._def?.typeName !== P.ZodAny && (n.items = J(e.type._def, {
3736
3736
  ...t,
3737
3737
  currentPath: [...t.currentPath, "items"]
3738
3738
  })), e.minLength && U(n, "minItems", e.minLength.value, e.minLength.message, t), e.maxLength && U(n, "maxItems", e.maxLength.value, e.maxLength.message, t), e.exactLength && (U(n, "minItems", e.exactLength.value, e.exactLength.message, t), U(n, "maxItems", e.exactLength.value, e.exactLength.message, t)), n;
@@ -4047,7 +4047,7 @@ function Zt(e, t) {
4047
4047
  //#endregion
4048
4048
  //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
4049
4049
  function Qt(e, t) {
4050
- if (t.target === "openAi" && console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."), t.target === "openApi3" && e.keyType?._def.typeName === F.ZodEnum) return {
4050
+ if (t.target === "openAi" && console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."), t.target === "openApi3" && e.keyType?._def.typeName === P.ZodEnum) return {
4051
4051
  type: "object",
4052
4052
  required: e.keyType._def.values,
4053
4053
  properties: e.keyType._def.values.reduce((n, r) => ({
@@ -4071,18 +4071,18 @@ function Qt(e, t) {
4071
4071
  }) ?? t.allowedAdditionalProperties
4072
4072
  };
4073
4073
  if (t.target === "openApi3") return n;
4074
- if (e.keyType?._def.typeName === F.ZodString && e.keyType._def.checks?.length) {
4074
+ if (e.keyType?._def.typeName === P.ZodString && e.keyType._def.checks?.length) {
4075
4075
  let { type: r, ...i } = qt(e.keyType._def, t);
4076
4076
  return {
4077
4077
  ...n,
4078
4078
  propertyNames: i
4079
4079
  };
4080
4080
  }
4081
- if (e.keyType?._def.typeName === F.ZodEnum) return {
4081
+ if (e.keyType?._def.typeName === P.ZodEnum) return {
4082
4082
  ...n,
4083
4083
  propertyNames: { enum: e.keyType._def.values }
4084
4084
  };
4085
- if (e.keyType?._def.typeName === F.ZodBranded && e.keyType._def.type._def.typeName === F.ZodString && e.keyType._def.type._def.checks?.length) {
4085
+ if (e.keyType?._def.typeName === P.ZodBranded && e.keyType._def.type._def.typeName === P.ZodString && e.keyType._def.type._def.checks?.length) {
4086
4086
  let { type: r, ...i } = It(e.keyType._def, t);
4087
4087
  return {
4088
4088
  ...n,
@@ -4402,42 +4402,42 @@ function vn(e) {
4402
4402
  //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
4403
4403
  var yn = (e, t) => J(e.innerType._def, t), bn = (e, t, n) => {
4404
4404
  switch (t) {
4405
- case F.ZodString: return qt(e, n);
4406
- case F.ZodNumber: return cn(e, n);
4407
- case F.ZodObject: return ln(e, n);
4408
- case F.ZodBigInt: return Pt(e, n);
4409
- case F.ZodBoolean: return Ft();
4410
- case F.ZodDate: return Rt(e, n);
4411
- case F.ZodUndefined: return _n(n);
4412
- case F.ZodNull: return nn(n);
4413
- case F.ZodArray: return Nt(e, n);
4414
- case F.ZodUnion:
4415
- case F.ZodDiscriminatedUnion: return an(e, n);
4416
- case F.ZodIntersection: return Wt(e, n);
4417
- case F.ZodTuple: return gn(e, n);
4418
- case F.ZodRecord: return Qt(e, n);
4419
- case F.ZodLiteral: return Gt(e, n);
4420
- case F.ZodEnum: return Ht(e);
4421
- case F.ZodNativeEnum: return en(e);
4422
- case F.ZodNullable: return sn(e, n);
4423
- case F.ZodOptional: return fn(e, n);
4424
- case F.ZodMap: return $t(e, n);
4425
- case F.ZodSet: return hn(e, n);
4426
- case F.ZodLazy: return () => e.getter()._def;
4427
- case F.ZodPromise: return mn(e, n);
4428
- case F.ZodNaN:
4429
- case F.ZodNever: return tn(n);
4430
- case F.ZodEffects: return Vt(e, n);
4431
- case F.ZodAny: return W(n);
4432
- case F.ZodUnknown: return vn(n);
4433
- case F.ZodDefault: return Bt(e, n);
4434
- case F.ZodBranded: return It(e, n);
4435
- case F.ZodReadonly: return yn(e, n);
4436
- case F.ZodCatch: return Lt(e, n);
4437
- case F.ZodPipeline: return pn(e, n);
4438
- case F.ZodFunction:
4439
- case F.ZodVoid:
4440
- case F.ZodSymbol: return;
4405
+ case P.ZodString: return qt(e, n);
4406
+ case P.ZodNumber: return cn(e, n);
4407
+ case P.ZodObject: return ln(e, n);
4408
+ case P.ZodBigInt: return Pt(e, n);
4409
+ case P.ZodBoolean: return Ft();
4410
+ case P.ZodDate: return Rt(e, n);
4411
+ case P.ZodUndefined: return _n(n);
4412
+ case P.ZodNull: return nn(n);
4413
+ case P.ZodArray: return Nt(e, n);
4414
+ case P.ZodUnion:
4415
+ case P.ZodDiscriminatedUnion: return an(e, n);
4416
+ case P.ZodIntersection: return Wt(e, n);
4417
+ case P.ZodTuple: return gn(e, n);
4418
+ case P.ZodRecord: return Qt(e, n);
4419
+ case P.ZodLiteral: return Gt(e, n);
4420
+ case P.ZodEnum: return Ht(e);
4421
+ case P.ZodNativeEnum: return en(e);
4422
+ case P.ZodNullable: return sn(e, n);
4423
+ case P.ZodOptional: return fn(e, n);
4424
+ case P.ZodMap: return $t(e, n);
4425
+ case P.ZodSet: return hn(e, n);
4426
+ case P.ZodLazy: return () => e.getter()._def;
4427
+ case P.ZodPromise: return mn(e, n);
4428
+ case P.ZodNaN:
4429
+ case P.ZodNever: return tn(n);
4430
+ case P.ZodEffects: return Vt(e, n);
4431
+ case P.ZodAny: return W(n);
4432
+ case P.ZodUnknown: return vn(n);
4433
+ case P.ZodDefault: return Bt(e, n);
4434
+ case P.ZodBranded: return It(e, n);
4435
+ case P.ZodReadonly: return yn(e, n);
4436
+ case P.ZodCatch: return Lt(e, n);
4437
+ case P.ZodPipeline: return pn(e, n);
4438
+ case P.ZodFunction:
4439
+ case P.ZodVoid:
4440
+ case P.ZodSymbol: return;
4441
4441
  default: return ((e) => void 0)(t);
4442
4442
  }
4443
4443
  };
@@ -4523,176 +4523,185 @@ var xn = (e, t) => {
4523
4523
  };
4524
4524
  return n.target === "jsonSchema7" ? s.$schema = "http://json-schema.org/draft-07/schema#" : (n.target === "jsonSchema2019-09" || n.target === "openAi") && (s.$schema = "https://json-schema.org/draft/2019-09/schema#"), n.target === "openAi" && ("anyOf" in s || "oneOf" in s || "allOf" in s || "type" in s && Array.isArray(s.type)) && console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."), s;
4525
4525
  }, Y = (e) => B(e).passthrough(), X = (e) => e.nullable().optional(), Z = B({}).passthrough(), wn = Y({
4526
- id: I().describe("Project id; pass as projectId to other tools"),
4527
- name: I(),
4528
- key: X(I()).describe("Short prefix, e.g. \"PROJ\""),
4529
- description: X(I())
4526
+ id: F().describe("Project id; pass as projectId to other tools"),
4527
+ name: F(),
4528
+ key: X(F()).describe("Short prefix, e.g. \"PROJ\""),
4529
+ description: X(F())
4530
4530
  }).describe("A project"), Tn = Y({
4531
- id: I().describe("Task id; pass as id or taskId to other tools"),
4532
- projectId: I(),
4533
- title: I(),
4534
- status: I().describe("Workflow status key"),
4535
- priority: I().describe("urgent, high, medium, low or none"),
4536
- assigneeId: X(I()),
4537
- dueDate: X(I()),
4538
- deadline: X(I()).describe("Latest acceptable finish, enforced by critical path analysis"),
4539
- isMilestone: X(R()).describe("A zero-duration checkpoint"),
4540
- estimatedHours: X(L()),
4541
- loggedHours: X(L()),
4542
- isBlocked: X(R())
4531
+ id: F().describe("Task id; pass as id or taskId to other tools"),
4532
+ projectId: F(),
4533
+ title: F(),
4534
+ status: F().describe("Workflow status key"),
4535
+ priority: F().describe("urgent, high, medium, low or none"),
4536
+ assigneeId: X(F()),
4537
+ dueDate: X(F()),
4538
+ deadline: X(F()).describe("Latest acceptable finish, enforced by critical path analysis"),
4539
+ isMilestone: X(L()).describe("A zero-duration checkpoint"),
4540
+ estimatedHours: X(I()),
4541
+ loggedHours: X(I()),
4542
+ isBlocked: X(L())
4543
4543
  }).describe("A task"), En = Y({
4544
- dependencyId: I().describe("Id of the dependency record"),
4545
- taskId: I().describe("The other task"),
4546
- title: I(),
4547
- status: I(),
4548
- type: I().describe("'blocking' (the waiting task cannot start until the other finishes) or 'relates_to' (informational)")
4544
+ dependencyId: F().describe("Id of the dependency record"),
4545
+ taskId: F().describe("The other task"),
4546
+ title: F(),
4547
+ status: F(),
4548
+ type: F().describe("'blocking' (the waiting task cannot start until the other finishes) or 'relates_to' (informational)")
4549
4549
  }), Dn = Tn.extend({ dependencies: X(Y({
4550
4550
  dependsOn: z(En).describe("Tasks this task waits for (upstream)"),
4551
4551
  dependents: z(En).describe("Tasks waiting for this task (downstream)")
4552
4552
  })).describe("Present when includeDependencies is true") }).describe("A task"), On = Y({
4553
- id: I(),
4554
- taskId: I().describe("The task that waits"),
4555
- dependsOnTaskId: I().describe("The task it waits for"),
4556
- type: I().describe("blocking or relates_to")
4553
+ id: F(),
4554
+ taskId: F().describe("The task that waits"),
4555
+ dependsOnTaskId: F().describe("The task it waits for"),
4556
+ type: F().describe("blocking or relates_to")
4557
4557
  }).describe("A dependency between two tasks"), kn = Y({
4558
- id: I(),
4559
- projectId: I(),
4560
- title: I(),
4561
- dueDate: X(I())
4558
+ id: F(),
4559
+ projectId: F(),
4560
+ title: F(),
4561
+ dueDate: X(F())
4562
4562
  }).describe("A deliverable"), An = Y({
4563
- id: I(),
4564
- taskId: I(),
4565
- content: I(),
4566
- authorId: X(I())
4567
- }).describe("A task comment"), jn = Y({
4568
- assigneeId: X(I()),
4569
- teamId: X(I()),
4570
- capacity: L().describe("1 for a person, headcount for a team pool"),
4571
- allocation: L().describe("Total booked in the period, e.g. 1.5 for 150%"),
4572
- start: I(),
4573
- end: I(),
4574
- taskIds: z(I())
4575
- }), Mn = Y({
4576
- taskId: I(),
4577
- isCritical: R().describe("True when any delay to this task delays the project end"),
4578
- totalSlack: L().describe("Slack in hours; 0 means critical, negative means a deadline is missed by that much"),
4579
- slackWorkingHours: X(L()).describe("Slack in working hours on the task calendar"),
4580
- earlyStartDate: X(I()),
4581
- earlyFinishDate: X(I()),
4582
- lateStartDate: X(I()),
4583
- lateFinishDate: X(I()),
4584
- levelingDelayHours: X(L()).describe("With levelling: hours spent waiting for the assignee"),
4585
- waitingOn: X(I()).describe("With levelling: the task this one waited for"),
4586
- isMilestone: X(R()).describe("True for a milestone"),
4587
- deadlineDate: X(I()).describe("The task's deadline as an instant"),
4588
- deadlineVarianceHours: X(L()).describe("Working hours from forecast finish to deadline; negative means it will be missed")
4563
+ id: F(),
4564
+ taskId: F(),
4565
+ hours: I(),
4566
+ userId: X(F()),
4567
+ loggedAt: X(F())
4568
+ }).describe("A time entry"), jn = Y({
4569
+ id: F(),
4570
+ taskId: F(),
4571
+ content: F(),
4572
+ authorId: X(F())
4573
+ }).describe("A task comment"), Mn = Y({
4574
+ assigneeId: X(F()),
4575
+ teamId: X(F()),
4576
+ capacity: I().describe("1 for a person, headcount for a team pool"),
4577
+ allocation: I().describe("Total booked in the period, e.g. 1.5 for 150%"),
4578
+ start: F(),
4579
+ end: F(),
4580
+ taskIds: z(F())
4589
4581
  }), Nn = Y({
4590
- projectId: I(),
4591
- projectStartDate: X(I()),
4592
- projectEndDate: X(I()).describe("Forecast finish date"),
4593
- totalDurationHours: L(),
4594
- criticalTaskIds: z(I()).describe("Tasks with zero or negative slack, in schedule order"),
4595
- missedDeadlineTaskIds: X(z(I())).describe("Tasks forecast to finish after their deadline"),
4596
- tasks: z(Mn),
4597
- leveled: X(R()),
4598
- unleveledProjectEndDate: X(I()).describe("With levelling: the end date before levelling"),
4599
- overallocations: X(z(jn)).describe("Assignee mode: periods where someone is booked above capacity")
4582
+ taskId: F(),
4583
+ isCritical: L().describe("True when any delay to this task delays the project end"),
4584
+ totalSlack: I().describe("Slack in hours; 0 means critical, negative means a deadline is missed by that much"),
4585
+ slackWorkingHours: X(I()).describe("Slack in working hours on the task calendar"),
4586
+ earlyStartDate: X(F()),
4587
+ earlyFinishDate: X(F()),
4588
+ lateStartDate: X(F()),
4589
+ lateFinishDate: X(F()),
4590
+ levelingDelayHours: X(I()).describe("With levelling: hours spent waiting for the assignee"),
4591
+ waitingOn: X(F()).describe("With levelling: the task this one waited for"),
4592
+ isMilestone: X(L()).describe("True for a milestone"),
4593
+ isSummary: X(L()).describe("True for a task with subtasks: its dates and slack are roll-ups of them"),
4594
+ deadlineDate: X(F()).describe("The task's deadline as an instant"),
4595
+ deadlineVarianceHours: X(I()).describe("Working hours from forecast finish to deadline; negative means it will be missed")
4600
4596
  }), Pn = Y({
4601
- projects: z(Nn).describe("One analysis per project"),
4602
- projectEndDate: X(I()).describe("The latest project end"),
4603
- leveled: X(R()),
4604
- overallocations: z(jn)
4597
+ projectId: F(),
4598
+ projectStartDate: X(F()),
4599
+ projectEndDate: X(F()).describe("Forecast finish date"),
4600
+ totalDurationHours: I(),
4601
+ criticalTaskIds: z(F()).describe("Tasks with zero or negative slack, in schedule order"),
4602
+ missedDeadlineTaskIds: X(z(F())).describe("Tasks forecast to finish after their deadline"),
4603
+ unestimatedTaskIds: X(z(F())).describe("Unfinished tasks with no estimate, scheduled for defaultEstimateHours"),
4604
+ cyclicTaskIds: X(z(F())).describe("Tasks on a dependency cycle; their dates are not reliable"),
4605
+ tasks: z(Nn),
4606
+ leveled: X(L()),
4607
+ unleveledProjectEndDate: X(F()).describe("With levelling: the end date before levelling"),
4608
+ overallocations: X(z(Mn)).describe("Assignee mode: periods where someone is booked above capacity")
4605
4609
  }), Fn = Y({
4606
- id: I(),
4607
- type: I().describe("container, iteration, deliverable or phase"),
4608
- name: I(),
4609
- health: I().describe("on_track, at_risk, blocked, overdue or completed"),
4610
- progressPercentage: L().describe("0-100"),
4611
- isCritical: R(),
4612
- blockedTasks: L(),
4613
- taskIds: z(I())
4610
+ projects: z(Pn).describe("One analysis per project"),
4611
+ projectEndDate: X(F()).describe("The latest project end"),
4612
+ leveled: X(L()),
4613
+ overallocations: z(Mn)
4614
4614
  }), In = Y({
4615
- projectId: I(),
4616
- level: I(),
4615
+ id: F(),
4616
+ type: F().describe("container, iteration, deliverable or phase"),
4617
+ name: F(),
4618
+ health: F().describe("on_track, at_risk, blocked, overdue or completed"),
4619
+ progressPercentage: I().describe("0-100"),
4620
+ isCritical: L(),
4621
+ blockedTasks: I(),
4622
+ taskIds: z(F())
4623
+ }), Ln = Y({
4624
+ projectId: F(),
4625
+ level: F(),
4617
4626
  macro: X(Y({
4618
- health: I().describe("on_track, at_risk, blocked, overdue or completed"),
4619
- overallProgressPercentage: L().describe("0-100"),
4620
- projectedFinishDate: X(I()),
4621
- totalTasks: L(),
4622
- completedTasks: L(),
4623
- blockedTasks: L(),
4624
- phases: z(Fn)
4627
+ health: F().describe("on_track, at_risk, blocked, overdue or completed"),
4628
+ overallProgressPercentage: I().describe("0-100"),
4629
+ projectedFinishDate: X(F()),
4630
+ totalTasks: I(),
4631
+ completedTasks: I(),
4632
+ blockedTasks: I(),
4633
+ phases: z(In)
4625
4634
  })).describe("Phase-level summary"),
4626
4635
  standard: X(Z).describe("Task timeline: { tasks, criticalPathTaskIds, dependencies, totalDurationHours }"),
4627
4636
  concrete: X(V(Z)).describe("Work evidence (time entries, attachments) by task id")
4628
- }), Ln = Y({
4629
- taskId: I(),
4630
- macroPhase: X(Fn).describe("The phase this task belongs to"),
4637
+ }), Rn = Y({
4638
+ taskId: F(),
4639
+ macroPhase: X(In).describe("The phase this task belongs to"),
4631
4640
  standard: Z.describe("The task with cpm (isCritical, slackWorkingHours, dates), blockingTaskIds and dependentTaskIds"),
4632
4641
  concrete: Z.describe("Evidence of work on the task"),
4633
4642
  metrics: X(Z).describe("Same as get_task_metrics")
4634
- }), Rn = Y({
4635
- taskId: I(),
4643
+ }), zn = Y({
4644
+ taskId: F(),
4636
4645
  points: z(Y({
4637
- timestamp: I(),
4638
- progress: L().describe("0-100"),
4639
- status: I()
4646
+ timestamp: F(),
4647
+ progress: I().describe("0-100"),
4648
+ status: F()
4640
4649
  })),
4641
- curveProfile: I().describe("linear, s_curve, early_surge, late_rush, stalled or insufficient_data")
4642
- }), zn = Y({
4643
- taskId: I(),
4650
+ curveProfile: F().describe("linear, s_curve, early_surge, late_rush, stalled or insufficient_data")
4651
+ }), Bn = Y({
4652
+ taskId: F(),
4644
4653
  progress: Y({
4645
- progressPercentage: L().describe("0-100"),
4646
- source: I().describe("Where the figure comes from: explicit, todos, time_effort, schedule_elapsed or blended")
4654
+ progressPercentage: I().describe("0-100"),
4655
+ source: F().describe("Where the figure comes from: explicit, todos, time_effort, schedule_elapsed or blended")
4647
4656
  }),
4648
4657
  realityDelta: Y({
4649
- estimatedHours: L(),
4650
- loggedHours: L(),
4651
- varianceHours: L().describe("logged minus estimated"),
4652
- isOverdue: R(),
4653
- isOverEstimate: R(),
4654
- scheduleVarianceWorkingDays: X(L()).describe("Working days late (positive) or early (negative)")
4658
+ estimatedHours: I(),
4659
+ loggedHours: I(),
4660
+ varianceHours: I().describe("logged minus estimated"),
4661
+ isOverdue: L(),
4662
+ isOverEstimate: L(),
4663
+ scheduleVarianceWorkingDays: X(I()).describe("Working days late (positive) or early (negative)")
4655
4664
  }),
4656
4665
  evm: Y({
4657
- plannedValue: L(),
4658
- earnedValue: L(),
4659
- actualCost: L(),
4660
- costPerformanceIndex: L().describe("CPI = EV / AC; below 1 is over budget"),
4661
- schedulePerformanceIndex: L().describe("SPI = EV / PV; below 1 is behind schedule")
4666
+ plannedValue: I(),
4667
+ earnedValue: I(),
4668
+ actualCost: I(),
4669
+ costPerformanceIndex: I().describe("CPI = EV / AC; below 1 is over budget"),
4670
+ schedulePerformanceIndex: I().describe("SPI = EV / PV; below 1 is behind schedule")
4662
4671
  }),
4663
4672
  inferredActuals: Z.describe("Actual start/end dates and active working time"),
4664
- progressHistory: Rn
4665
- }), Bn = Y({
4666
- startDate: I(),
4667
- endDate: I(),
4668
- interval: I(),
4669
- groupBy: I(),
4670
- metric: I(),
4671
- seriesKeys: z(I()).describe("Ids of the people, teams, etc. in the series"),
4672
- seriesLabels: V(I()).describe("Display name for each series key"),
4673
+ progressHistory: zn
4674
+ }), Vn = Y({
4675
+ startDate: F(),
4676
+ endDate: F(),
4677
+ interval: F(),
4678
+ groupBy: F(),
4679
+ metric: F(),
4680
+ seriesKeys: z(F()).describe("Ids of the people, teams, etc. in the series"),
4681
+ seriesLabels: V(F()).describe("Display name for each series key"),
4673
4682
  buckets: z(Y({
4674
- date: I().describe("Start of the bucket (YYYY-MM-DD)"),
4675
- totalHours: L(),
4676
- values: V(L()).describe("Hours per series key"),
4677
- capacity: X(V(L())).describe("Capacity hours per series key"),
4678
- utilizationRatio: X(L()).describe("totalHours / totalCapacity; above 1 is overloaded")
4683
+ date: F().describe("Start of the bucket (YYYY-MM-DD)"),
4684
+ totalHours: I(),
4685
+ values: V(I()).describe("Hours per series key"),
4686
+ capacity: X(V(I())).describe("Capacity hours per series key"),
4687
+ utilizationRatio: X(I()).describe("totalHours / totalCapacity; above 1 is overloaded")
4679
4688
  })),
4680
- totalHours: L(),
4681
- totalCapacity: X(L()),
4682
- averageUtilization: X(L())
4683
- }), Vn = Y({
4689
+ totalHours: I(),
4690
+ totalCapacity: X(I()),
4691
+ averageUtilization: X(I())
4692
+ }), Hn = Y({
4684
4693
  skills: X(z(Y({
4685
- name: I(),
4686
- description: I()
4694
+ name: F(),
4695
+ description: F()
4687
4696
  }))).describe("Present when no name was given"),
4688
- name: X(I()),
4689
- description: X(I()),
4690
- content: X(I()).describe("The playbook (markdown); follow its steps")
4697
+ name: X(F()),
4698
+ description: X(F()),
4699
+ content: X(F()).describe("The playbook (markdown); follow its steps")
4691
4700
  }), Q = [
4692
4701
  {
4693
4702
  name: "analyze-schedule",
4694
4703
  description: "Find what drives a project's end date, how much each task can slip and where people are double-booked, then recommend fixes. Use for \"when will we finish?\", \"what is critical?\" or deadline-risk questions.",
4695
- content: "---\nname: analyze-schedule\ndescription: Find what drives a project's end date, how much each task can slip and where people are double-booked, then recommend fixes. Use for \"when will we finish?\", \"what is critical?\" or deadline-risk questions.\n---\n\n# Analyze the schedule\n\n## 1. Run the schedule\n\n1. Get the `projectId` (`list_projects`).\n2. Call `calculate_critical_path` with `calendars: \"assignee\"` and `levelResources: true`, so each person works on one task at a time on their own calendar. If the user wants the ideal schedule with unlimited people, call it with no options instead.\n3. If the question spans projects that share people, call `calculate_portfolio_critical_path` with their `projectIds` (and `projectOrder` if the user ranked them) instead.\n4. For in-flight projects, pass `effort: \"remaining\"` so finished hours are not scheduled again.\n\n## 2. Read the result\n\n- `projectEndDate` is the forecast finish. With levelling, compare it with `unleveledProjectEndDate`: the gap is time lost waiting for busy people.\n- `criticalTaskIds` are the tasks with zero or negative slack. Any delay to one of them moves the end date or misses a deadline.\n- `missedDeadlineTaskIds` lists tasks forecast to finish after their `deadline`. Their `deadlineVarianceHours` says by how much (negative working hours), and the negative `totalSlack` on the tasks before them shows which work drives the miss. Entries with `isMilestone: true` are checkpoints such as releases or sign-offs.\n- Each entry in `tasks` has `slackWorkingHours`: how many working hours the task can slip without moving the end. Under about 8 hours is near-critical.\n- `levelingDelayHours` and `waitingOn` show a task that waited for its assignee to finish another task.\n- `overallocations` lists periods where a person (`assigneeId`) or team (`teamId`) is booked above `capacity`; `allocation` 1.5 means 150%.\n\nLook up titles for the task ids you mention with `get_task` or `list_tasks`; report titles, not ids. To see why a critical task cannot start earlier, call `get_task` with `includeDependencies: true`: `dependencies.dependsOn` lists what it waits for and `dependencies.dependents` what waits for it.\n\n## 3. Recommend\n\nRank fixes by how much they pull the end date in:\n\n1. **Unblock critical tasks.** A critical task with `isBlocked: true` delays everything; say what it waits for.\n2. **Move work off the bottleneck person.** If critical tasks wait on one assignee (`waitingOn`), suggest reassigning a non-critical task of theirs.\n3. **Remove false dependencies.** A critical task waiting on work it does not really need (`dependencies.dependsOn`) can start earlier once the link is removed.\n4. **Split long critical tasks** so parts can run in parallel.\n5. **Cut or defer** tasks feeding late deliverables, if dates are fixed.\n\nShow the recommendation to the user. Change tasks (`update_task`) or dependencies (`add_dependency`, `remove_dependency`) only when they ask, then run the schedule again to show the effect.\n\n## Report format\n\n- Forecast finish date, and against any deadline the user gave. If the user gives a date that is not yet on a task, offer to record it as a `deadline` (on a milestone task with `isMilestone: true` if it is a checkpoint) so later runs track it.\n- Each milestone: forecast date against its deadline.\n- Critical path: task titles in order, with assignee.\n- Top risks: near-critical tasks, blocked critical tasks, over-allocations.\n- Recommended actions, each with its expected effect.\n"
4704
+ content: "---\nname: analyze-schedule\ndescription: Find what drives a project's end date, how much each task can slip and where people are double-booked, then recommend fixes. Use for \"when will we finish?\", \"what is critical?\" or deadline-risk questions.\n---\n\n# Analyze the schedule\n\n## 1. Run the schedule\n\n1. Get the `projectId` (`list_projects`).\n2. Call `calculate_critical_path` with `calendars: \"assignee\"` and `levelResources: true`, so each person works on one task at a time on their own calendar. If the user wants the ideal schedule with unlimited people, call it with no options instead.\n3. If the question spans projects that share people, call `calculate_portfolio_critical_path` with their `projectIds` (and `projectOrder` if the user ranked them) instead.\n4. For in-flight projects, pass `effort: \"remaining\"` so finished hours are not scheduled again.\n\n## 2. Read the result\n\n- `projectEndDate` is the forecast finish. With levelling, compare it with `unleveledProjectEndDate`: the gap is time lost waiting for busy people.\n- `criticalTaskIds` are the tasks with zero or negative slack. Any delay to one of them moves the end date or misses a deadline.\n- `unestimatedTaskIds` lists unfinished tasks with no estimate; each was assumed to take `defaultEstimateHours` (1 by default), so say the forecast is uncertain and suggest estimating them. Entries with `isSummary: true` are parent tasks shown as the span of their subtasks.\n- `missedDeadlineTaskIds` lists tasks forecast to finish after their `deadline`. Their `deadlineVarianceHours` says by how much (negative working hours), and the negative `totalSlack` on the tasks before them shows which work drives the miss. Entries with `isMilestone: true` are checkpoints such as releases or sign-offs.\n- Each entry in `tasks` has `slackWorkingHours`: how many working hours the task can slip without moving the end. Under about 8 hours is near-critical.\n- `levelingDelayHours` and `waitingOn` show a task that waited for its assignee to finish another task.\n- `overallocations` lists periods where a person (`assigneeId`) or team (`teamId`) is booked above `capacity`; `allocation` 1.5 means 150%.\n\nLook up titles for the task ids you mention with `get_task` or `list_tasks`; report titles, not ids. To see why a critical task cannot start earlier, call `get_task` with `includeDependencies: true`: `dependencies.dependsOn` lists what it waits for and `dependencies.dependents` what waits for it.\n\n## 3. Recommend\n\nRank fixes by how much they pull the end date in:\n\n1. **Unblock critical tasks.** A critical task with `isBlocked: true` delays everything; say what it waits for.\n2. **Move work off the bottleneck person.** If critical tasks wait on one assignee (`waitingOn`), suggest reassigning a non-critical task of theirs.\n3. **Remove false dependencies.** A critical task waiting on work it does not really need (`dependencies.dependsOn`) can start earlier once the link is removed.\n4. **Split long critical tasks** so parts can run in parallel.\n5. **Cut or defer** tasks feeding late deliverables, if dates are fixed.\n\nShow the recommendation to the user. Change tasks (`update_task`) or dependencies (`add_dependency`, `remove_dependency`) only when they ask, then run the schedule again to show the effect.\n\n## Report format\n\n- Forecast finish date, and against any deadline the user gave. If the user gives a date that is not yet on a task, offer to record it as a `deadline` (on a milestone task with `isMilestone: true` if it is a checkpoint) so later runs track it.\n- Each milestone: forecast date against its deadline.\n- Critical path: task titles in order, with assignee.\n- Top risks: near-critical tasks, blocked critical tasks, over-allocations.\n- Recommended actions, each with its expected effect.\n"
4696
4705
  },
4697
4706
  {
4698
4707
  name: "investigate-task",
@@ -4720,19 +4729,19 @@ var xn = (e, t) => {
4720
4729
  content: "---\nname: triage-tasks\ndescription: Review new, unprioritized or stale tasks and set priority, estimate, tags and blocked state consistently. Use when the user asks to triage, groom or clean up a backlog.\n---\n\n# Triage tasks\n\nMake every task in scope actionable: a clear title, a priority, an estimate and an honest blocked state.\n\n## 1. Gather the tasks\n\n1. Get the `projectId` with `list_projects` if you do not have it, then `get_project` to learn the workflow status keys.\n2. Call `list_tasks` with filters that match the request, for example:\n - untriaged: `priority: \"none\"`;\n - a backlog: `status` set to the backlog key from the workflow;\n - one person's work: `assigneeId`.\n Page with `nextCursor` until it is empty, or stop at a sensible batch (about 25) and say how many remain.\n3. For tasks whose description is thin or which look blocked, read the discussion with `list_comments`.\n\n## 2. Decide, task by task\n\n| Field | Rule |\n| --- | --- |\n| `priority` | `urgent`: blocks other people now or a live problem. `high`: needed for the next deliverable. `medium`: planned work. `low`: nice to have. Reserve `urgent` for a handful of tasks. |\n| `estimatedHours` | Effort in hours. If a task is over about 24 hours, propose splitting it instead of estimating it. |\n| `tags` | Reuse tags already used in the project; do not invent a new scheme. |\n| `isBlocked` / `blockedReason` | Blocked only when work cannot continue; the reason names what it waits for. |\n| title | Starts with a verb and says the outcome. Rewrite only when it is unclear. |\n\nFlag likely duplicates (same outcome, different words) instead of deleting them.\n\n## 3. Propose, then apply\n\n1. Show the user a table: task title, current values, proposed values, one-line reason.\n2. After the user approves (all or some), apply each change with `update_task`, passing only the fields that change.\n3. For any non-obvious change, record why with `add_comment` on the task.\n\n## Guardrails\n\n- Do not change `status` or `assigneeId` during triage unless the user asked for it.\n- Never call `delete_task` during triage. Suggest canceling duplicates and let the user decide.\n"
4721
4730
  }
4722
4731
  ];
4723
- function Hn(e) {
4732
+ function Un(e) {
4724
4733
  return Q.find((t) => t.name === e);
4725
4734
  }
4726
4735
  //#endregion
4727
4736
  //#region ../mcp/dist/tools/definitions.js
4728
- var Un = {
4737
+ var Wn = {
4729
4738
  core: "Projects, tasks and task dependencies: find, read, create, update and delete",
4730
4739
  collaboration: "Deliverables and task comments",
4731
4740
  scheduling: "Critical path, portfolio scheduling and workload/capacity",
4732
4741
  analytics: "Project status ladder, task metrics, earned value and progress history",
4733
4742
  guidance: "Skills: step-by-step playbooks for multi-step jobs"
4734
4743
  };
4735
- function Wn(e) {
4744
+ function Gn(e) {
4736
4745
  let { $schema: t, ...n } = Cn(e, { $refStrategy: "none" });
4737
4746
  return n;
4738
4747
  }
@@ -4740,8 +4749,8 @@ function $(e) {
4740
4749
  let t = e.annotations?.readOnlyHint ?? !1;
4741
4750
  return {
4742
4751
  ...e,
4743
- inputSchema: Wn(e.zodSchema),
4744
- outputSchema: Wn(e.outputZodSchema),
4752
+ inputSchema: Gn(e.zodSchema),
4753
+ outputSchema: Gn(e.outputZodSchema),
4745
4754
  annotations: {
4746
4755
  readOnlyHint: t,
4747
4756
  destructiveHint: e.annotations?.destructiveHint ?? !1,
@@ -4750,23 +4759,23 @@ function $(e) {
4750
4759
  }
4751
4760
  };
4752
4761
  }
4753
- var Gn = class extends Error {
4762
+ var Kn = class extends Error {
4754
4763
  constructor(e, t) {
4755
4764
  super(`Invalid arguments for tool "${e}": ${t}`), this.name = "ToolArgumentError";
4756
4765
  }
4757
4766
  };
4758
- function Kn(e, t) {
4767
+ function qn(e, t) {
4759
4768
  let n = e.zodSchema.strict().safeParse(t ?? {});
4760
4769
  if (!n.success) {
4761
4770
  let t = n.error.issues.map((e) => `${e.path.join(".") || "(root)"}: ${e.message}`).join("; ");
4762
- throw new Gn(e.name, t);
4771
+ throw new Kn(e.name, t);
4763
4772
  }
4764
4773
  return n.data;
4765
4774
  }
4766
- async function qn(e) {
4775
+ async function Jn(e) {
4767
4776
  return { isEngine: "store" in e && typeof e.store == "object" };
4768
4777
  }
4769
- var Jn = $({
4778
+ var Yn = $({
4770
4779
  name: "list_projects",
4771
4780
  title: "List Projects",
4772
4781
  description: "List every project you can read, with its id, name and key. Start here to find a projectId; never guess ids. Returns { projects }.",
@@ -4775,40 +4784,40 @@ var Jn = $({
4775
4784
  zodSchema: B({}),
4776
4785
  annotations: { readOnlyHint: !0 },
4777
4786
  execute: async (e, t) => ({ projects: await t.getProjects() })
4778
- }), Yn = $({
4787
+ }), Xn = $({
4779
4788
  name: "get_project",
4780
4789
  title: "Get Project",
4781
4790
  description: "Get one project by id: name, key, workflow statuses, custom field definitions and calendar. Use it before creating or moving tasks to learn the valid status keys and custom fields. Returns the project. For its tasks use `list_tasks`.",
4782
4791
  toolset: "core",
4783
4792
  outputZodSchema: wn,
4784
- zodSchema: B({ id: I().describe("The project ID") }),
4793
+ zodSchema: B({ id: F().describe("The project ID") }),
4785
4794
  annotations: { readOnlyHint: !0 },
4786
4795
  execute: async (e, t) => t.getProject(e.id)
4787
- }), Xn = $({
4796
+ }), Zn = $({
4788
4797
  name: "create_project",
4789
4798
  title: "Create Project",
4790
4799
  description: "Create a new, empty project. Use only when the user wants a new project; to add work to an existing one use `create_task`. Returns the created project with its id.",
4791
4800
  toolset: "core",
4792
4801
  outputZodSchema: wn,
4793
4802
  zodSchema: B({
4794
- name: I().describe("Name of the project"),
4795
- description: I().optional().describe("Description of the project"),
4796
- key: I().optional().describe("Short project key/prefix (e.g. \"PROJ\")"),
4797
- customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4803
+ name: F().describe("Name of the project"),
4804
+ description: F().optional().describe("Description of the project"),
4805
+ key: F().optional().describe("Short project key/prefix (e.g. \"PROJ\")"),
4806
+ customFields: V(R()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4798
4807
  }),
4799
4808
  execute: async (e, t) => t.createProject(e)
4800
- }), Zn = $({
4809
+ }), Qn = $({
4801
4810
  name: "list_tasks",
4802
4811
  title: "List Tasks",
4803
4812
  description: "Find tasks, oldest first, filtered by project, status, priority, assignee, iteration, deliverable, container or parent task ('none' for top-level tasks only). Use it for questions like \"what is blocked / assigned to X / in progress\" and to look up task ids. Returns { tasks, nextCursor }; pass nextCursor back as cursor for the next page. For one task's full record use `get_task`.",
4804
4813
  toolset: "core",
4805
4814
  outputZodSchema: B({
4806
4815
  tasks: z(Tn),
4807
- nextCursor: I().nullable().optional()
4816
+ nextCursor: F().nullable().optional()
4808
4817
  }),
4809
4818
  zodSchema: B({
4810
- projectId: I().optional().describe("Filter by project ID"),
4811
- status: I().optional().describe("Filter by task status key"),
4819
+ projectId: F().optional().describe("Filter by project ID"),
4820
+ status: F().optional().describe("Filter by task status key"),
4812
4821
  priority: H([
4813
4822
  "urgent",
4814
4823
  "high",
@@ -4816,13 +4825,13 @@ var Jn = $({
4816
4825
  "low",
4817
4826
  "none"
4818
4827
  ]).optional().describe("Filter by priority"),
4819
- assigneeId: I().optional().describe("Filter by assignee ID"),
4820
- iterationId: I().optional().describe("Filter by iteration (sprint) ID"),
4821
- deliverableId: I().optional().describe("Filter by deliverable ID"),
4822
- containerId: I().optional().describe("Filter by container (e.g. epic) ID"),
4823
- parentId: I().optional().describe("Subtasks of this task ID, or 'none' for top-level tasks only"),
4824
- limit: L().int().min(1).max(500).optional().describe("Page size (default 100)"),
4825
- cursor: I().optional().describe("nextCursor from a previous call")
4828
+ assigneeId: F().optional().describe("Filter by assignee ID"),
4829
+ iterationId: F().optional().describe("Filter by iteration (sprint) ID"),
4830
+ deliverableId: F().optional().describe("Filter by deliverable ID"),
4831
+ containerId: F().optional().describe("Filter by container (e.g. epic) ID"),
4832
+ parentId: F().optional().describe("Subtasks of this task ID, or 'none' for top-level tasks only"),
4833
+ limit: I().int().min(1).max(500).optional().describe("Page size (default 100)"),
4834
+ cursor: F().optional().describe("nextCursor from a previous call")
4826
4835
  }),
4827
4836
  annotations: { readOnlyHint: !0 },
4828
4837
  execute: async (e, t, n) => {
@@ -4843,21 +4852,21 @@ var Jn = $({
4843
4852
  nextCursor: r.nextCursor
4844
4853
  };
4845
4854
  }
4846
- }), Qn = $({
4855
+ }), $n = $({
4847
4856
  name: "get_task",
4848
4857
  title: "Get Task",
4849
4858
  description: "Get one task by id: status, priority, assignee, estimate, logged hours, dates, blocked state and custom fields. Set includeDependencies to also see which tasks it waits for and which wait for it. Returns the task, with { dependencies: { dependsOn, dependents } } when asked. For its discussion use `list_comments`; for progress and variance use `get_task_metrics`.",
4850
4859
  toolset: "core",
4851
4860
  outputZodSchema: Dn,
4852
4861
  zodSchema: B({
4853
- id: I().describe("The task ID"),
4854
- includeDependencies: R().optional().describe("Also return the tasks this one waits for (dependsOn) and the tasks waiting for it (dependents)")
4862
+ id: F().describe("The task ID"),
4863
+ includeDependencies: L().optional().describe("Also return the tasks this one waits for (dependsOn) and the tasks waiting for it (dependents)")
4855
4864
  }),
4856
4865
  annotations: { readOnlyHint: !0 },
4857
4866
  execute: async (e, t) => {
4858
4867
  let n = await t.getTask(e.id);
4859
4868
  if (!n || !e.includeDependencies) return n;
4860
- let r = await tr(t, e.id), i = new Map([...r.upstreamTasks, ...r.downstreamTasks].map((e) => [e.id, e]));
4869
+ let r = await nr(t, e.id), i = new Map([...r.upstreamTasks, ...r.downstreamTasks].map((e) => [e.id, e]));
4861
4870
  for (let n of r.dependencies) {
4862
4871
  let r = n.taskId === e.id ? n.dependsOnTaskId : n.taskId;
4863
4872
  if (i.has(r) || r === e.id) continue;
@@ -4866,14 +4875,14 @@ var Jn = $({
4866
4875
  }
4867
4876
  let a = [], o = [];
4868
4877
  for (let t of r.dependencies) {
4869
- let { waiting: n, waitedFor: r } = $n(t), s = n === e.id ? r : n, c = i.get(s);
4878
+ let { waiting: n, waitedFor: r } = er(t), s = n === e.id ? r : n, c = i.get(s);
4870
4879
  if (!c || s === e.id) continue;
4871
4880
  let ee = {
4872
4881
  dependencyId: t.id,
4873
4882
  taskId: c.id,
4874
4883
  title: c.title,
4875
4884
  status: c.status,
4876
- type: er(t)
4885
+ type: tr(t)
4877
4886
  };
4878
4887
  (n === e.id ? a : o).push(ee);
4879
4888
  }
@@ -4886,7 +4895,7 @@ var Jn = $({
4886
4895
  };
4887
4896
  }
4888
4897
  });
4889
- function $n(e) {
4898
+ function er(e) {
4890
4899
  let t = r(e);
4891
4900
  return t ? {
4892
4901
  waiting: t.after,
@@ -4896,22 +4905,22 @@ function $n(e) {
4896
4905
  waitedFor: e.dependsOnTaskId
4897
4906
  };
4898
4907
  }
4899
- var er = (e) => e.type === "relates_to" ? "relates_to" : "blocking";
4900
- async function tr(e, t) {
4901
- let { isEngine: n } = await qn(e);
4908
+ var tr = (e) => e.type === "relates_to" ? "relates_to" : "blocking";
4909
+ async function nr(e, t) {
4910
+ let { isEngine: n } = await Jn(e);
4902
4911
  return n ? e.getTaskDependencyGraph(t) : e.getTaskDependencies(t);
4903
4912
  }
4904
- var nr = $({
4913
+ var rr = $({
4905
4914
  name: "create_task",
4906
4915
  title: "Create Task",
4907
4916
  description: "Create a task in a project. Check with `list_tasks` first so you do not add a duplicate. Without a status the task starts in the project's default workflow status. Returns the created task with its id.",
4908
4917
  toolset: "core",
4909
4918
  outputZodSchema: Tn,
4910
4919
  zodSchema: B({
4911
- projectId: I().optional().describe("Project ID (inferred from active view in browser if omitted)"),
4912
- title: I().describe("Title of the task"),
4913
- description: I().optional().describe("Detailed description / markdown"),
4914
- status: I().optional().describe("Status key (defaults to the project workflow's default status)"),
4920
+ projectId: F().optional().describe("Project ID (inferred from active view in browser if omitted)"),
4921
+ title: F().describe("Title of the task"),
4922
+ description: F().optional().describe("Detailed description / markdown"),
4923
+ status: F().optional().describe("Status key (defaults to the project workflow's default status)"),
4915
4924
  priority: H([
4916
4925
  "urgent",
4917
4926
  "high",
@@ -4919,16 +4928,16 @@ var nr = $({
4919
4928
  "low",
4920
4929
  "none"
4921
4930
  ]).optional().default("none").describe("Task priority"),
4922
- assigneeId: I().optional().describe("User ID to assign task to"),
4923
- dueDate: I().optional().describe("Due date (ISO string)"),
4924
- deadline: I().optional().describe("Latest acceptable finish (YYYY-MM-DD for the end of that working day, or an ISO date-time). Critical path analysis reports a miss as negative slack"),
4925
- isMilestone: R().optional().describe("Mark the task as a milestone: a zero-duration checkpoint (release, sign-off) fed by dependencies; its estimate is ignored"),
4926
- tags: z(I()).optional().describe("Tags for categorization"),
4927
- estimatedHours: L().optional().describe("Estimated hours to complete"),
4928
- allocation: L().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
4929
- isBlocked: R().optional().describe("Whether the task is blocked"),
4930
- blockedReason: I().optional().describe("Reason why the task is blocked"),
4931
- customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4931
+ assigneeId: F().optional().describe("User ID to assign task to"),
4932
+ dueDate: F().optional().describe("Due date (ISO string)"),
4933
+ deadline: F().optional().describe("Latest acceptable finish (YYYY-MM-DD for the end of that working day, or an ISO date-time). Critical path analysis reports a miss as negative slack"),
4934
+ isMilestone: L().optional().describe("Mark the task as a milestone: a zero-duration checkpoint (release, sign-off) fed by dependencies; its estimate is ignored"),
4935
+ tags: z(F()).optional().describe("Tags for categorization"),
4936
+ estimatedHours: I().optional().describe("Estimated hours to complete"),
4937
+ allocation: I().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
4938
+ isBlocked: L().optional().describe("Whether the task is blocked"),
4939
+ blockedReason: F().optional().describe("Reason why the task is blocked"),
4940
+ customFields: V(R()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4932
4941
  }),
4933
4942
  execute: async (e, t, n) => {
4934
4943
  let r = e.projectId || n?.projectId;
@@ -4952,17 +4961,17 @@ var nr = $({
4952
4961
  };
4953
4962
  return t.createTask(i);
4954
4963
  }
4955
- }), rr = $({
4964
+ }), ir = $({
4956
4965
  name: "update_task",
4957
4966
  title: "Update Task",
4958
- description: "Change an existing task: title, description, status, priority, assignee, due date, deadline, milestone flag, estimate, logged hours, allocation, blocked state, tags or custom fields. Only the fields you pass change. Use it to move a task through its workflow or re-plan it. Returns the updated task.",
4967
+ description: "Change an existing task: title, description, status, priority, assignee, due date, deadline, milestone flag, estimate, allocation, blocked state, tags or custom fields. Only the fields you pass change. Use it to move a task through its workflow or re-plan it. Returns the updated task.",
4959
4968
  toolset: "core",
4960
4969
  outputZodSchema: Tn,
4961
4970
  zodSchema: B({
4962
- id: I().describe("The task ID"),
4963
- title: I().optional().describe("New title"),
4964
- description: I().optional().describe("New description (markdown)"),
4965
- status: I().optional().describe("Status key from the project's workflow (see `get_project`)"),
4971
+ id: F().describe("The task ID"),
4972
+ title: F().optional().describe("New title"),
4973
+ description: F().optional().describe("New description (markdown)"),
4974
+ status: F().optional().describe("Status key from the project's workflow (see `get_project`)"),
4966
4975
  priority: H([
4967
4976
  "urgent",
4968
4977
  "high",
@@ -4970,49 +4979,62 @@ var nr = $({
4970
4979
  "low",
4971
4980
  "none"
4972
4981
  ]).optional().describe("New priority"),
4973
- assigneeId: I().optional().describe("User ID to assign the task to"),
4974
- dueDate: I().optional().describe("Due date (ISO string)"),
4975
- deadline: I().optional().describe("Latest acceptable finish (YYYY-MM-DD for the end of that working day, or an ISO date-time). Critical path analysis reports a miss as negative slack"),
4976
- isMilestone: R().optional().describe("Mark the task as a milestone: a zero-duration checkpoint (release, sign-off) fed by dependencies; its estimate is ignored"),
4977
- tags: z(I()).optional().describe("Replaces all tags"),
4978
- estimatedHours: L().optional().describe("Estimated effort in hours"),
4979
- allocation: L().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
4980
- loggedHours: L().optional().describe("Total hours worked so far"),
4981
- isBlocked: R().optional().describe("Whether the task is blocked"),
4982
- blockedReason: I().optional().describe("Reason why the task is blocked"),
4983
- customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4982
+ assigneeId: F().optional().describe("User ID to assign the task to"),
4983
+ dueDate: F().optional().describe("Due date (ISO string)"),
4984
+ deadline: F().optional().describe("Latest acceptable finish (YYYY-MM-DD for the end of that working day, or an ISO date-time). Critical path analysis reports a miss as negative slack"),
4985
+ isMilestone: L().optional().describe("Mark the task as a milestone: a zero-duration checkpoint (release, sign-off) fed by dependencies; its estimate is ignored"),
4986
+ tags: z(F()).optional().describe("Replaces all tags"),
4987
+ estimatedHours: I().optional().describe("Estimated effort in hours"),
4988
+ allocation: I().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
4989
+ isBlocked: L().optional().describe("Whether the task is blocked"),
4990
+ blockedReason: F().optional().describe("Reason why the task is blocked"),
4991
+ customFields: V(R()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4984
4992
  }),
4985
4993
  annotations: { idempotentHint: !0 },
4986
4994
  execute: async (e, t) => {
4987
4995
  let { id: n, ...r } = e;
4988
4996
  return t.updateTask(n, r);
4989
4997
  }
4990
- }), ir = $({
4998
+ }), ar = $({
4991
4999
  name: "delete_task",
4992
5000
  title: "Delete Task",
4993
5001
  description: "Permanently delete a task by id. This cannot be undone: confirm with the user first, and prefer `update_task` with a canceled status when the history should be kept. Returns { success }.",
4994
5002
  toolset: "core",
4995
- outputZodSchema: B({ success: R() }),
4996
- zodSchema: B({ id: I().describe("The task ID to delete") }),
5003
+ outputZodSchema: B({ success: L() }),
5004
+ zodSchema: B({ id: F().describe("The task ID to delete") }),
4997
5005
  annotations: {
4998
5006
  destructiveHint: !0,
4999
5007
  idempotentHint: !0
5000
5008
  },
5001
5009
  execute: async (e, t) => ({ success: await t.deleteTask(e.id) })
5002
- }), ar = $({
5010
+ }), or = $({
5011
+ name: "log_time",
5012
+ title: "Log Time",
5013
+ description: "Record time worked on a task. The task's logged hours are the sum of its time entries, so this is how hours are added (they cannot be set directly). Returns the time entry.",
5014
+ toolset: "core",
5015
+ outputZodSchema: An,
5016
+ zodSchema: B({
5017
+ taskId: F().describe("The task worked on"),
5018
+ hours: I().positive().describe("Hours worked, e.g. 1.5"),
5019
+ description: F().optional().describe("What was done"),
5020
+ isBillable: L().optional().describe("Whether the time is billable (default true)"),
5021
+ loggedAt: F().optional().describe("When the work was done (ISO date-time; default now)")
5022
+ }),
5023
+ execute: async (e, t) => t.logTime(e)
5024
+ }), sr = $({
5003
5025
  name: "add_dependency",
5004
5026
  title: "Add Dependency",
5005
5027
  description: "Record that a task cannot start until another task finishes, so the critical path schedules them in order. Use it when planning or re-sequencing work. Adding a link that already exists returns it; a link that would make a loop is refused. Returns the dependency { id, taskId, dependsOnTaskId, type }. To undo use `remove_dependency`.",
5006
5028
  toolset: "core",
5007
5029
  outputZodSchema: On,
5008
5030
  zodSchema: B({
5009
- taskId: I().describe("The task that waits"),
5010
- dependsOnTaskId: I().describe("The task that must finish first"),
5031
+ taskId: F().describe("The task that waits"),
5032
+ dependsOnTaskId: F().describe("The task that must finish first"),
5011
5033
  type: H(["blocking", "relates_to"]).optional().describe("'blocking' (default) affects the schedule; 'relates_to' only links the tasks for reference")
5012
5034
  }),
5013
5035
  annotations: { idempotentHint: !0 },
5014
5036
  execute: async (e, t) => {
5015
- let n = e.type ?? "blocking", { isEngine: r } = await qn(t);
5037
+ let n = e.type ?? "blocking", { isEngine: r } = await Jn(t);
5016
5038
  return r ? t.addDependency({
5017
5039
  taskId: e.taskId,
5018
5040
  dependsOnTaskId: e.dependsOnTaskId,
@@ -5022,58 +5044,58 @@ var nr = $({
5022
5044
  type: n
5023
5045
  });
5024
5046
  }
5025
- }), or = $({
5047
+ }), cr = $({
5026
5048
  name: "remove_dependency",
5027
5049
  title: "Remove Dependency",
5028
5050
  description: "Stop a task waiting for another task, for example when the order was wrong or the work no longer depends on it. Identify the link by its two task ids, as given to `add_dependency`. Removing a link that does not exist is not an error. Returns { removed, dependencyIds } with the number of links removed.",
5029
5051
  toolset: "core",
5030
5052
  outputZodSchema: B({
5031
- removed: L().describe("How many dependency records were removed (0 if none matched)"),
5032
- dependencyIds: z(I()).describe("Ids of the removed records")
5053
+ removed: I().describe("How many dependency records were removed (0 if none matched)"),
5054
+ dependencyIds: z(F()).describe("Ids of the removed records")
5033
5055
  }),
5034
5056
  zodSchema: B({
5035
- taskId: I().describe("The task that waits"),
5036
- dependsOnTaskId: I().describe("The task it waits for"),
5057
+ taskId: F().describe("The task that waits"),
5058
+ dependsOnTaskId: F().describe("The task it waits for"),
5037
5059
  type: H(["blocking", "relates_to"]).optional().describe("Remove only links of this type (default: both)")
5038
5060
  }),
5039
5061
  annotations: { idempotentHint: !0 },
5040
5062
  execute: async (e, t) => {
5041
- let n = (await tr(t, e.taskId)).dependencies.filter((t) => {
5042
- let { waiting: n, waitedFor: r } = $n(t);
5043
- return n === e.taskId && r === e.dependsOnTaskId && (!e.type || er(t) === e.type);
5044
- }), { isEngine: r } = await qn(t), i = [];
5063
+ let n = (await nr(t, e.taskId)).dependencies.filter((t) => {
5064
+ let { waiting: n, waitedFor: r } = er(t);
5065
+ return n === e.taskId && r === e.dependsOnTaskId && (!e.type || tr(t) === e.type);
5066
+ }), { isEngine: r } = await Jn(t), i = [];
5045
5067
  for (let e of n) (r ? await t.removeDependency(e.id) : await t.removeDependency(e.taskId, e.id)) && i.push(e.id);
5046
5068
  return {
5047
5069
  removed: i.length,
5048
5070
  dependencyIds: i
5049
5071
  };
5050
5072
  }
5051
- }), sr = $({
5073
+ }), lr = $({
5052
5074
  name: "list_deliverables",
5053
5075
  title: "List Deliverables",
5054
5076
  description: "List a project's deliverables: outputs that group the tasks producing them. Use it to see what is due and which tasks feed each deliverable. For dated checkpoints, look for milestone tasks (`isMilestone`). Returns { deliverables }.",
5055
5077
  toolset: "collaboration",
5056
5078
  outputZodSchema: B({ deliverables: z(kn) }),
5057
- zodSchema: B({ projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)") }),
5079
+ zodSchema: B({ projectId: F().optional().describe("Project ID (falls back to ambient context if omitted)") }),
5058
5080
  annotations: { readOnlyHint: !0 },
5059
5081
  execute: async (e, t, n) => {
5060
5082
  let r = e.projectId || n?.projectId;
5061
5083
  if (!r) throw Error("projectId is required to list deliverables. Find one with `list_projects`.");
5062
5084
  return "getDeliverables" in t && typeof t.getDeliverables == "function" ? { deliverables: await t.getDeliverables(r) } : { deliverables: [] };
5063
5085
  }
5064
- }), cr = $({
5086
+ }), ur = $({
5065
5087
  name: "create_deliverable",
5066
5088
  title: "Create Deliverable",
5067
5089
  description: "Create a deliverable in a project, optionally linking existing tasks by id. Use it for an output (a document, a build, an asset) that several tasks produce. For a dated checkpoint the schedule should enforce, create a task with `isMilestone: true` and a `deadline` instead. Returns the created deliverable.",
5068
5090
  toolset: "collaboration",
5069
5091
  outputZodSchema: kn,
5070
5092
  zodSchema: B({
5071
- projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)"),
5072
- title: I().describe("Name of the deliverable"),
5073
- description: I().optional().describe("What the deliverable is and how it is accepted"),
5074
- dueDate: I().optional().describe("Due date (ISO string)"),
5075
- taskIds: z(I()).optional().describe("IDs of existing tasks that feed this deliverable"),
5076
- customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
5093
+ projectId: F().optional().describe("Project ID (falls back to ambient context if omitted)"),
5094
+ title: F().describe("Name of the deliverable"),
5095
+ description: F().optional().describe("What the deliverable is and how it is accepted"),
5096
+ dueDate: F().optional().describe("Due date (ISO string)"),
5097
+ taskIds: z(F()).optional().describe("IDs of existing tasks that feed this deliverable"),
5098
+ customFields: V(R()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
5077
5099
  }),
5078
5100
  execute: async (e, t, n) => {
5079
5101
  let r = e.projectId || n?.projectId;
@@ -5084,60 +5106,60 @@ var nr = $({
5084
5106
  });
5085
5107
  throw Error("createDeliverable is not supported by this backend target.");
5086
5108
  }
5087
- }), lr = $({
5109
+ }), dr = $({
5088
5110
  name: "list_comments",
5089
5111
  title: "List Comments",
5090
5112
  description: "List the comments on a task. Use it to read the discussion, decisions or blockers recorded there. Returns { comments }.",
5091
5113
  toolset: "collaboration",
5092
- outputZodSchema: B({ comments: z(An) }),
5093
- zodSchema: B({ taskId: I().describe("The task ID") }),
5114
+ outputZodSchema: B({ comments: z(jn) }),
5115
+ zodSchema: B({ taskId: F().describe("The task ID") }),
5094
5116
  annotations: { readOnlyHint: !0 },
5095
5117
  execute: async (e, t) => "getComments" in t && typeof t.getComments == "function" ? { comments: await t.getComments(e.taskId) } : { comments: [] }
5096
- }), ur = $({
5118
+ }), fr = $({
5097
5119
  name: "add_comment",
5098
5120
  title: "Add Comment",
5099
5121
  description: "Post a comment on a task, attributed to the identity this server runs as. Use it to record a decision, status note, question or the reasoning behind a change you made. Returns the created comment.",
5100
5122
  toolset: "collaboration",
5101
- outputZodSchema: An,
5123
+ outputZodSchema: jn,
5102
5124
  zodSchema: B({
5103
- taskId: I().describe("The task ID"),
5104
- content: I().describe("Comment body/markdown"),
5105
- customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
5125
+ taskId: F().describe("The task ID"),
5126
+ content: F().describe("Comment body/markdown"),
5127
+ customFields: V(R()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
5106
5128
  }),
5107
5129
  execute: async (e, t) => t.addComment({
5108
5130
  taskId: e.taskId,
5109
5131
  content: e.content,
5110
5132
  customFields: e.customFields
5111
5133
  })
5112
- }), dr = $({
5134
+ }), pr = $({
5113
5135
  name: "calculate_portfolio_critical_path",
5114
5136
  title: "Calculate Portfolio Critical Path",
5115
5137
  description: "Schedule several projects together (default: every project you can read) so people and teams shared between them are not double-booked. Use it for cross-project delivery dates and resource conflicts. Returns { projects, projectEndDate, overallocations } with one analysis per project. For a single project use `calculate_critical_path`.",
5116
5138
  toolset: "scheduling",
5117
- outputZodSchema: Pn,
5139
+ outputZodSchema: Fn,
5118
5140
  zodSchema: B({
5119
- projectIds: z(I()).optional().describe("Projects to include (default: every project you can read)"),
5120
- projectOrder: z(I()).optional().describe("Project ids in priority order for levelling; unlisted projects come last"),
5121
- includeHiddenWork: R().optional().describe("Also count other projects' work (even unreadable ones, shown only as 'hidden') toward people's capacity. Requires workspace.manage"),
5141
+ projectIds: z(F()).optional().describe("Projects to include (default: every project you can read)"),
5142
+ projectOrder: z(F()).optional().describe("Project ids in priority order for levelling; unlisted projects come last"),
5143
+ includeHiddenWork: L().optional().describe("Also count other projects' work (even unreadable ones, shown only as 'hidden') toward people's capacity. Requires workspace.manage"),
5122
5144
  calendars: H(["project", "assignee"]).optional().describe("'assignee' schedules each task on its assignee's or team's calendar"),
5123
- levelResources: R().optional().describe("With calendars 'assignee': share people and team pools across the projects"),
5145
+ levelResources: L().optional().describe("With calendars 'assignee': share people and team pools across the projects"),
5124
5146
  levelingPriority: H([
5125
5147
  "slack",
5126
5148
  "priority",
5127
5149
  "dueDate",
5128
5150
  "order"
5129
5151
  ]).optional().describe("Which ready task gets an assignee first when levelling (default: least slack, then task priority)"),
5130
- effort: H(["estimate", "remaining"]).optional().describe("'remaining' schedules only estimate minus logged hours for in-progress tasks (default: full estimates)")
5152
+ effort: H(["estimate", "remaining"]).optional().describe("'remaining' schedules only estimate minus logged hours for in-progress tasks (default: full estimates)"),
5153
+ defaultEstimateHours: I().nonnegative().optional().describe("Hours to assume for tasks with no estimate (default 1). They are listed in unestimatedTaskIds")
5131
5154
  }),
5132
5155
  annotations: { readOnlyHint: !0 },
5133
5156
  execute: async (e, t) => t.calculatePortfolioCriticalPath(e)
5134
- }), fr = [
5135
- Jn,
5157
+ }), mr = [
5136
5158
  Yn,
5137
5159
  Xn,
5138
5160
  Zn,
5139
5161
  Qn,
5140
- nr,
5162
+ $n,
5141
5163
  rr,
5142
5164
  ir,
5143
5165
  ar,
@@ -5146,54 +5168,58 @@ var nr = $({
5146
5168
  cr,
5147
5169
  lr,
5148
5170
  ur,
5171
+ dr,
5172
+ fr,
5149
5173
  $({
5150
5174
  name: "calculate_critical_path",
5151
5175
  title: "Calculate Critical Path",
5152
5176
  description: "Schedule one project with the Critical Path Method: which tasks drive the end date, each task's early and late start and finish, and how much it can slip (slack). Use it for \"when will this finish?\", \"what is on the critical path?\" or \"can this task slip?\". Set calendars 'assignee' with levelResources so each person works on one task at a time. Returns { projectEndDate, criticalTaskIds, tasks, overallocations }. For several projects that share people use `calculate_portfolio_critical_path`.",
5153
5177
  toolset: "scheduling",
5154
- outputZodSchema: Nn,
5178
+ outputZodSchema: Pn,
5155
5179
  zodSchema: B({
5156
- projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)"),
5180
+ projectId: F().optional().describe("Project ID (falls back to ambient context if omitted)"),
5157
5181
  calendars: H(["project", "assignee"]).optional().describe("'assignee' schedules each task on its assignee's or team's working calendar; default uses the project calendar"),
5158
- levelResources: R().optional().describe("With calendars 'assignee': delay tasks so each assignee works on one task at a time"),
5182
+ levelResources: L().optional().describe("With calendars 'assignee': delay tasks so each assignee works on one task at a time"),
5159
5183
  levelingPriority: H([
5160
5184
  "slack",
5161
5185
  "priority",
5162
5186
  "dueDate",
5163
5187
  "order"
5164
5188
  ]).optional().describe("Which ready task gets an assignee first when levelling (default: least slack, then task priority)"),
5165
- effort: H(["estimate", "remaining"]).optional().describe("'remaining' schedules only estimate minus logged hours for in-progress tasks (default: full estimates)")
5189
+ effort: H(["estimate", "remaining"]).optional().describe("'remaining' schedules only estimate minus logged hours for in-progress tasks (default: full estimates)"),
5190
+ defaultEstimateHours: I().nonnegative().optional().describe("Hours to assume for tasks with no estimate (default 1). They are listed in unestimatedTaskIds")
5166
5191
  }),
5167
5192
  annotations: { readOnlyHint: !0 },
5168
5193
  execute: async (e, t, n) => {
5169
5194
  let r = e.projectId || n?.projectId;
5170
5195
  if (!r) throw Error("projectId is required to calculate the critical path. Find one with `list_projects`.");
5171
- let { calendars: i, levelResources: a, levelingPriority: o, effort: s } = e;
5196
+ let { calendars: i, levelResources: a, levelingPriority: o, effort: s, defaultEstimateHours: c } = e;
5172
5197
  return t.calculateCriticalPath(r, {
5173
5198
  calendars: i,
5174
5199
  levelResources: a,
5175
5200
  levelingPriority: o,
5176
- effort: s
5201
+ effort: s,
5202
+ defaultEstimateHours: c
5177
5203
  });
5178
5204
  }
5179
5205
  }),
5180
- dr,
5206
+ pr,
5181
5207
  $({
5182
5208
  name: "get_timeline_ladder",
5183
5209
  title: "Get Timeline Ladder of Abstraction",
5184
5210
  description: "Project status at three zoom levels: 'macro' phases with health (on_track, at_risk, blocked, overdue) and progress, 'standard' task timeline with the critical path and dependencies, and 'concrete' evidence of work (time logged, attachments) per task. Use it for project status reports; level 'macro' gives a compact summary. Returns { macro, standard, concrete }. For a single task use `get_task_ladder`.",
5185
5211
  toolset: "analytics",
5186
- outputZodSchema: In,
5212
+ outputZodSchema: Ln,
5187
5213
  zodSchema: B({
5188
- projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)"),
5214
+ projectId: F().optional().describe("Project ID (falls back to ambient context if omitted)"),
5189
5215
  level: H([
5190
5216
  "macro",
5191
5217
  "standard",
5192
5218
  "concrete",
5193
5219
  "all"
5194
5220
  ]).optional().describe("Abstraction level (macro, standard, concrete, or all)"),
5195
- containerId: I().optional().describe("Optional container ID filter"),
5196
- iterationId: I().optional().describe("Optional iteration/sprint ID filter")
5221
+ containerId: F().optional().describe("Optional container ID filter"),
5222
+ iterationId: F().optional().describe("Optional iteration/sprint ID filter")
5197
5223
  }),
5198
5224
  annotations: { readOnlyHint: !0 },
5199
5225
  execute: async (e, t, n) => {
@@ -5211,8 +5237,8 @@ var nr = $({
5211
5237
  title: "Get Task Ladder View",
5212
5238
  description: "One task in context: the phase it belongs to and that phase's health, its place in the schedule (dates, slack, critical or not) and evidence of work done. Use it to explain where a task fits and whether it puts its phase at risk. Returns { macroPhase, standard, concrete, metrics }. For the numbers alone use `get_task_metrics`.",
5213
5239
  toolset: "analytics",
5214
- outputZodSchema: Ln,
5215
- zodSchema: B({ taskId: I().describe("The task ID") }),
5240
+ outputZodSchema: Rn,
5241
+ zodSchema: B({ taskId: F().describe("The task ID") }),
5216
5242
  annotations: { readOnlyHint: !0 },
5217
5243
  execute: async (e, t) => t.getTaskLadder(e.taskId)
5218
5244
  }),
@@ -5221,8 +5247,8 @@ var nr = $({
5221
5247
  title: "Get Task Metrics",
5222
5248
  description: "Is a task on track? Progress percentage, actual against estimated hours, schedule variance, overdue flags and earned value (CPI, SPI). Use it to diagnose a late or over-budget task. Returns { progress, realityDelta, evm, inferredActuals, progressHistory }.",
5223
5249
  toolset: "analytics",
5224
- outputZodSchema: zn,
5225
- zodSchema: B({ taskId: I().describe("The task ID") }),
5250
+ outputZodSchema: Bn,
5251
+ zodSchema: B({ taskId: F().describe("The task ID") }),
5226
5252
  annotations: { readOnlyHint: !0 },
5227
5253
  execute: async (e, t) => t.getTaskMetrics(e.taskId)
5228
5254
  }),
@@ -5231,8 +5257,8 @@ var nr = $({
5231
5257
  title: "Get Task Progress History",
5232
5258
  description: "How a task's progress has moved over time: dated progress points and a curve shape (linear, s_curve, early_surge, late_rush, stalled). Use it to tell whether work is stalling or being rushed at the end. Returns { points, curveProfile }. `get_task_metrics` includes the same history alongside variance and earned value.",
5233
5259
  toolset: "analytics",
5234
- outputZodSchema: Rn,
5235
- zodSchema: B({ taskId: I().describe("The task ID") }),
5260
+ outputZodSchema: zn,
5261
+ zodSchema: B({ taskId: F().describe("The task ID") }),
5236
5262
  annotations: { readOnlyHint: !0 },
5237
5263
  execute: async (e, t) => t.getTaskProgressHistory(e.taskId)
5238
5264
  }),
@@ -5241,11 +5267,11 @@ var nr = $({
5241
5267
  title: "Get Workload Distribution",
5242
5268
  description: "Hours of work per person, team, task type, priority or status in each day, week or month, with capacity and utilization. Use it for \"who is overloaded?\" and capacity planning; a utilizationRatio above 1 means more work than capacity. Omit projectId for the whole workspace. Returns { buckets, seriesKeys, seriesLabels, totalHours, averageUtilization }.",
5243
5269
  toolset: "scheduling",
5244
- outputZodSchema: Bn,
5270
+ outputZodSchema: Vn,
5245
5271
  zodSchema: B({
5246
- projectId: I().optional().describe("Project ID (optional, defaults to workspace-wide or ambient project)"),
5247
- startDate: I().optional().describe("Start date ISO (YYYY-MM-DD)"),
5248
- endDate: I().optional().describe("End date ISO (YYYY-MM-DD)"),
5272
+ projectId: F().optional().describe("Project ID (optional, defaults to workspace-wide or ambient project)"),
5273
+ startDate: F().optional().describe("Start date ISO (YYYY-MM-DD)"),
5274
+ endDate: F().optional().describe("End date ISO (YYYY-MM-DD)"),
5249
5275
  interval: H([
5250
5276
  "day",
5251
5277
  "week",
@@ -5264,7 +5290,7 @@ var nr = $({
5264
5290
  "remaining",
5265
5291
  "blended"
5266
5292
  ]).optional().describe("Effort metric mode"),
5267
- defaultWeeklyCapacityHours: L().optional().describe("Default weekly capacity hours per person (default 40)")
5293
+ defaultWeeklyCapacityHours: I().optional().describe("Default weekly capacity hours per person (default 40)")
5268
5294
  }),
5269
5295
  annotations: { readOnlyHint: !0 },
5270
5296
  execute: async (e, t, n) => {
@@ -5284,49 +5310,49 @@ var nr = $({
5284
5310
  title: "Get Skill",
5285
5311
  description: "Load a step-by-step playbook for a multi-step project management job, such as planning a project, triaging tasks, finding schedule risk, writing a status report, checking capacity or investigating a late task. Call it before starting such a job and follow its steps. Omit name to list the skills. Returns { name, description, content }, or { skills } without a name.",
5286
5312
  toolset: "guidance",
5287
- outputZodSchema: Vn,
5288
- zodSchema: B({ name: I().optional().describe("Skill name, e.g. \"plan-project\"; omit to list all skills") }),
5313
+ outputZodSchema: Hn,
5314
+ zodSchema: B({ name: F().optional().describe("Skill name, e.g. \"plan-project\"; omit to list all skills") }),
5289
5315
  annotations: { readOnlyHint: !0 },
5290
5316
  execute: async (e) => {
5291
5317
  if (!e.name) return { skills: Q.map(({ name: e, description: t }) => ({
5292
5318
  name: e,
5293
5319
  description: t
5294
5320
  })) };
5295
- let t = Hn(e.name);
5321
+ let t = Un(e.name);
5296
5322
  if (!t) throw Error(`Skill "${e.name}" not found. Available skills: ${Q.map((e) => e.name).join(", ")}.`);
5297
5323
  return t;
5298
5324
  }
5299
5325
  })
5300
- ], pr = new Map(fr.map((e) => [e.name, e]));
5301
- function mr(e = {}) {
5302
- let { tools: t, toolsets: n, readOnly: r } = e, i = (t ?? []).filter((e) => !pr.has(e));
5303
- if (i.length > 0) throw Error(`Unknown Critical Path tool(s): ${i.join(", ")}. Known tools: ${fr.map((e) => e.name).join(", ")}.`);
5304
- let a = (n ?? []).filter((e) => !(e in Un));
5305
- if (a.length > 0) throw Error(`Unknown Critical Path toolset(s): ${a.join(", ")}. Known toolsets: ${Object.keys(Un).join(", ")}.`);
5326
+ ], hr = new Map(mr.map((e) => [e.name, e]));
5327
+ function gr(e = {}) {
5328
+ let { tools: t, toolsets: n, readOnly: r } = e, i = (t ?? []).filter((e) => !hr.has(e));
5329
+ if (i.length > 0) throw Error(`Unknown Critical Path tool(s): ${i.join(", ")}. Known tools: ${mr.map((e) => e.name).join(", ")}.`);
5330
+ let a = (n ?? []).filter((e) => !(e in Wn));
5331
+ if (a.length > 0) throw Error(`Unknown Critical Path toolset(s): ${a.join(", ")}. Known toolsets: ${Object.keys(Wn).join(", ")}.`);
5306
5332
  let o = !t && !n;
5307
- return fr.filter((e) => (o || t?.includes(e.name) || n?.includes(e.toolset)) && (!r || e.annotations.readOnlyHint));
5333
+ return mr.filter((e) => (o || t?.includes(e.name) || n?.includes(e.toolset)) && (!r || e.annotations.readOnlyHint));
5308
5334
  }
5309
- var hr = class extends Error {
5335
+ var _r = class extends Error {
5310
5336
  constructor(e) {
5311
5337
  super(e), this.name = "ToolNotFoundError";
5312
5338
  }
5313
- }, gr = "Check the id: find valid project ids with `list_projects` and task ids with `list_tasks`. Ids are never guessable, and items you cannot read are reported as not found.";
5314
- async function _r(e, t, n, r) {
5339
+ }, vr = "Check the id: find valid project ids with `list_projects` and task ids with `list_tasks`. Ids are never guessable, and items you cannot read are reported as not found.";
5340
+ async function yr(e, t, n, r) {
5315
5341
  try {
5316
- let i = await e.execute(Kn(e, t), n, r);
5317
- if (i == null) throw new hr(`Nothing found for ${JSON.stringify(t ?? {})}.`);
5342
+ let i = await e.execute(qn(e, t), n, r);
5343
+ if (i == null) throw new _r(`Nothing found for ${JSON.stringify(t ?? {})}.`);
5318
5344
  return JSON.parse(JSON.stringify(i));
5319
5345
  } catch (t) {
5320
- throw Error(vr(e, t));
5346
+ throw Error(br(e, t));
5321
5347
  }
5322
5348
  }
5323
- function vr(e, t) {
5349
+ function br(e, t) {
5324
5350
  let n = t?.message || String(t);
5325
- return t instanceof Gn ? `${n}. Fix the arguments to match the input schema of "${e.name}" and call it again.` : t instanceof hr || t?.name === "NotFoundError" || t?.status === 404 || /not found/i.test(n) ? `${n} ${gr}` : t?.name === "CircularDependencyError" || /circular/i.test(n) ? `${n} The tasks are already ordered the other way round. Check with \`get_task\` and includeDependencies, and ask the user which order is right rather than retrying.` : t?.name === "ForbiddenError" || t?.status === 403 ? `${n} You do not have permission for this; tell the user rather than retrying.` : n;
5351
+ return t instanceof Kn ? `${n}. Fix the arguments to match the input schema of "${e.name}" and call it again.` : t instanceof _r || t?.name === "NotFoundError" || t?.status === 404 || /not found/i.test(n) ? `${n} ${vr}` : t?.name === "CircularDependencyError" || /circular/i.test(n) ? `${n} The tasks are already ordered the other way round. Check with \`get_task\` and includeDependencies, and ask the user which order is right rather than retrying.` : t?.name === "ForbiddenError" || t?.status === 403 ? `${n} You do not have permission for this; tell the user rather than retrying.` : n;
5326
5352
  }
5327
5353
  //#endregion
5328
5354
  //#region ../mcp/dist/tools/instructions.js
5329
- var yr = [
5355
+ var xr = [
5330
5356
  {
5331
5357
  when: "Find a project or task id",
5332
5358
  tools: ["list_projects", "list_tasks"]
@@ -5380,7 +5406,7 @@ var yr = [
5380
5406
  tools: ["get_workload_distribution"]
5381
5407
  }
5382
5408
  ];
5383
- function br(e, t = {}) {
5409
+ function Sr(e, t = {}) {
5384
5410
  let n = new Set(e.map((e) => e.name)), r = [
5385
5411
  "Critical Path is a project management backend. A project holds tasks and deliverables (outputs that group the tasks producing them). Tasks have a workflow status, priority, assignee, effort estimate, logged hours, optional subtasks (parentId) and dependencies, and comments. A task with `isMilestone: true` is a zero-duration checkpoint, and a `deadline` on any task is enforced by critical path analysis.",
5386
5412
  "",
@@ -5391,7 +5417,7 @@ function br(e, t = {}) {
5391
5417
  "- Confirm with the user before any tool marked destructive."
5392
5418
  ];
5393
5419
  t.projectId && r.push(`- The user is viewing project "${t.projectId}"; tools use it when you omit projectId.`);
5394
- let i = yr.map((e) => ({
5420
+ let i = xr.map((e) => ({
5395
5421
  ...e,
5396
5422
  tools: e.tools.filter((e) => n.has(e))
5397
5423
  })).filter((e) => e.tools.length > 0);
@@ -5407,7 +5433,7 @@ function br(e, t = {}) {
5407
5433
  }
5408
5434
  //#endregion
5409
5435
  //#region ../mcp/dist/web/index.js
5410
- function xr(e = typeof document < "u" ? document : null) {
5436
+ function Cr(e = typeof document < "u" ? document : null) {
5411
5437
  if (!e) return null;
5412
5438
  if (!e.modelContext) {
5413
5439
  let t = /* @__PURE__ */ new Map();
@@ -5432,14 +5458,14 @@ function xr(e = typeof document < "u" ? document : null) {
5432
5458
  }
5433
5459
  return e.modelContext;
5434
5460
  }
5435
- function Sr(e) {
5461
+ function wr(e) {
5436
5462
  let t = e.document ?? (typeof document < "u" ? document : null), n = e.navigator ?? (typeof navigator < "u" ? navigator : null), r = e.window ?? (typeof window < "u" ? window : null), i;
5437
- t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i = xr(t) ?? void 0);
5438
- let a = mr({
5463
+ t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i = Cr(t) ?? void 0);
5464
+ let a = gr({
5439
5465
  tools: e.tools,
5440
5466
  toolsets: e.toolsets,
5441
5467
  readOnly: e.readOnly
5442
- }), o = br(a, { projectId: e.projectId }), s = [], c = new AbortController();
5468
+ }), o = Sr(a, { projectId: e.projectId }), s = [], c = new AbortController();
5443
5469
  if (e.signal?.aborted) return {
5444
5470
  unregister: () => {},
5445
5471
  getRegisteredTools: () => [],
@@ -5455,7 +5481,7 @@ function Sr(e) {
5455
5481
  outputSchema: t.outputSchema,
5456
5482
  annotations: { ...t.annotations },
5457
5483
  execute: async (n) => {
5458
- let r = e.projectId ? { projectId: e.projectId } : void 0, i = await _r(t, n, e.client, r);
5484
+ let r = e.projectId ? { projectId: e.projectId } : void 0, i = await yr(t, n, e.client, r);
5459
5485
  return e.onToolExecuted?.(t.name, n, i), i;
5460
5486
  }
5461
5487
  };
@@ -5485,7 +5511,7 @@ function Sr(e) {
5485
5511
  }
5486
5512
  //#endregion
5487
5513
  //#region src/webmcp-state.svelte.ts
5488
- var Cr = class {
5514
+ var Tr = class {
5489
5515
  client;
5490
5516
  options;
5491
5517
  #e = t.state(!1);
@@ -5532,7 +5558,7 @@ var Cr = class {
5532
5558
  if (!this.registered) {
5533
5559
  this.error = null;
5534
5560
  try {
5535
- this.abortController = new AbortController(), this.handle = Sr({
5561
+ this.abortController = new AbortController(), this.handle = wr({
5536
5562
  client: this.client,
5537
5563
  projectId: this.activeProjectId,
5538
5564
  tools: this.options.tools,
@@ -5558,12 +5584,12 @@ var Cr = class {
5558
5584
  this.activeProjectId !== e && (this.activeProjectId = e, this.registered && (this.unregister(), this.register()));
5559
5585
  }
5560
5586
  };
5561
- function wr(e, t) {
5562
- return new Cr(e, t);
5587
+ function Er(e, t) {
5588
+ return new Tr(e, t);
5563
5589
  }
5564
5590
  //#endregion
5565
5591
  //#region src/critical-path-state.svelte.ts
5566
- var Tr = class {
5592
+ var Dr = class {
5567
5593
  client;
5568
5594
  projectId;
5569
5595
  #e = new a();
@@ -5607,12 +5633,12 @@ var Tr = class {
5607
5633
  this.#e.cancel();
5608
5634
  }
5609
5635
  };
5610
- function Er(e, t) {
5611
- return new Tr(e, t);
5636
+ function Or(e, t) {
5637
+ return new Dr(e, t);
5612
5638
  }
5613
5639
  //#endregion
5614
5640
  //#region src/timeline-ladder-state.svelte.ts
5615
- var Dr = class {
5641
+ var kr = class {
5616
5642
  client;
5617
5643
  projectId;
5618
5644
  #e = new a();
@@ -5690,12 +5716,12 @@ var Dr = class {
5690
5716
  this.#e.cancel();
5691
5717
  }
5692
5718
  };
5693
- function Or(e, t, n) {
5694
- return new Dr(e, t, n);
5719
+ function Ar(e, t, n) {
5720
+ return new kr(e, t, n);
5695
5721
  }
5696
5722
  //#endregion
5697
5723
  //#region src/task-metrics-state.svelte.ts
5698
- var kr = class {
5724
+ var jr = class {
5699
5725
  client;
5700
5726
  taskId;
5701
5727
  #e = new a();
@@ -5814,12 +5840,12 @@ var kr = class {
5814
5840
  this.#e.cancel(), this.#t.cancel(), this.#n.cancel();
5815
5841
  }
5816
5842
  };
5817
- function Ar(e, t) {
5818
- return new kr(e, t);
5843
+ function Mr(e, t) {
5844
+ return new jr(e, t);
5819
5845
  }
5820
5846
  //#endregion
5821
5847
  //#region src/workload-state.svelte.ts
5822
- var jr = class {
5848
+ var Nr = class {
5823
5849
  client;
5824
5850
  projectId;
5825
5851
  initialOptions;
@@ -5942,13 +5968,13 @@ var jr = class {
5942
5968
  this.#e.cancel();
5943
5969
  }
5944
5970
  };
5945
- function Mr(e, t, n) {
5946
- return new jr(e, t, n);
5971
+ function Pr(e, t, n) {
5972
+ return new Nr(e, t, n);
5947
5973
  }
5948
5974
  //#endregion
5949
5975
  //#region src/index.ts
5950
- function Nr(t) {
5976
+ function Fr(t) {
5951
5977
  return new e(t);
5952
5978
  }
5953
5979
  //#endregion
5954
- export { ae as AttachmentState, re as CommentState, Tr as CriticalPathState, le as DeliverableState, de as DeliverableSummaryState, pe as KanbanState, o as ProjectState, se as TaskActivityState, kr as TaskMetricsState, c as TaskState, he as TaskTransitionsState, Dr as TimelineLadderState, Cr as WebMcpState, te as WorkflowState, jr as WorkloadState, oe as createAttachmentState, ie as createCommentState, Nr as createCriticalPathClient, Er as createCriticalPathState, ue as createDeliverableState, fe as createDeliverableSummaryState, me as createKanbanState, s as createProjectState, ce as createTaskActivityState, Ar as createTaskMetricsState, ee as createTaskState, ge as createTaskTransitionsState, Or as createTimelineLadderState, wr as createWebMcpState, ne as createWorkflowState, Mr as createWorkloadState };
5980
+ export { ae as AttachmentState, re as CommentState, Dr as CriticalPathState, le as DeliverableState, de as DeliverableSummaryState, pe as KanbanState, o as ProjectState, se as TaskActivityState, jr as TaskMetricsState, c as TaskState, he as TaskTransitionsState, kr as TimelineLadderState, Tr as WebMcpState, te as WorkflowState, Nr as WorkloadState, oe as createAttachmentState, ie as createCommentState, Fr as createCriticalPathClient, Or as createCriticalPathState, ue as createDeliverableState, fe as createDeliverableSummaryState, me as createKanbanState, s as createProjectState, ce as createTaskActivityState, Mr as createTaskMetricsState, ee as createTaskState, ge as createTaskTransitionsState, Ar as createTimelineLadderState, Er as createWebMcpState, ne as createWorkflowState, Pr as createWorkloadState };