@marlinjai/email-mcp 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3197,27 +3197,27 @@ var require_utils = __commonJS({
3197
3197
  "use strict";
3198
3198
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3199
3199
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
3200
- function stringArrayToHexStripped(input) {
3200
+ function stringArrayToHexStripped(input2) {
3201
3201
  let acc = "";
3202
3202
  let code = 0;
3203
3203
  let i = 0;
3204
- for (i = 0; i < input.length; i++) {
3205
- code = input[i].charCodeAt(0);
3204
+ for (i = 0; i < input2.length; i++) {
3205
+ code = input2[i].charCodeAt(0);
3206
3206
  if (code === 48) {
3207
3207
  continue;
3208
3208
  }
3209
3209
  if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
3210
3210
  return "";
3211
3211
  }
3212
- acc += input[i];
3212
+ acc += input2[i];
3213
3213
  break;
3214
3214
  }
3215
- for (i += 1; i < input.length; i++) {
3216
- code = input[i].charCodeAt(0);
3215
+ for (i += 1; i < input2.length; i++) {
3216
+ code = input2[i].charCodeAt(0);
3217
3217
  if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
3218
3218
  return "";
3219
3219
  }
3220
- acc += input[i];
3220
+ acc += input2[i];
3221
3221
  }
3222
3222
  return acc;
3223
3223
  }
@@ -3226,29 +3226,29 @@ var require_utils = __commonJS({
3226
3226
  buffer.length = 0;
3227
3227
  return true;
3228
3228
  }
3229
- function consumeHextets(buffer, address, output) {
3229
+ function consumeHextets(buffer, address, output2) {
3230
3230
  if (buffer.length) {
3231
3231
  const hex3 = stringArrayToHexStripped(buffer);
3232
3232
  if (hex3 !== "") {
3233
3233
  address.push(hex3);
3234
3234
  } else {
3235
- output.error = true;
3235
+ output2.error = true;
3236
3236
  return false;
3237
3237
  }
3238
3238
  buffer.length = 0;
3239
3239
  }
3240
3240
  return true;
3241
3241
  }
3242
- function getIPV6(input) {
3242
+ function getIPV6(input2) {
3243
3243
  let tokenCount = 0;
3244
- const output = { error: false, address: "", zone: "" };
3244
+ const output2 = { error: false, address: "", zone: "" };
3245
3245
  const address = [];
3246
3246
  const buffer = [];
3247
3247
  let endipv6Encountered = false;
3248
3248
  let endIpv6 = false;
3249
3249
  let consume = consumeHextets;
3250
- for (let i = 0; i < input.length; i++) {
3251
- const cursor = input[i];
3250
+ for (let i = 0; i < input2.length; i++) {
3251
+ const cursor = input2[i];
3252
3252
  if (cursor === "[" || cursor === "]") {
3253
3253
  continue;
3254
3254
  }
@@ -3256,20 +3256,20 @@ var require_utils = __commonJS({
3256
3256
  if (endipv6Encountered === true) {
3257
3257
  endIpv6 = true;
3258
3258
  }
3259
- if (!consume(buffer, address, output)) {
3259
+ if (!consume(buffer, address, output2)) {
3260
3260
  break;
3261
3261
  }
3262
3262
  if (++tokenCount > 7) {
3263
- output.error = true;
3263
+ output2.error = true;
3264
3264
  break;
3265
3265
  }
3266
- if (i > 0 && input[i - 1] === ":") {
3266
+ if (i > 0 && input2[i - 1] === ":") {
3267
3267
  endipv6Encountered = true;
3268
3268
  }
3269
3269
  address.push(":");
3270
3270
  continue;
3271
3271
  } else if (cursor === "%") {
3272
- if (!consume(buffer, address, output)) {
3272
+ if (!consume(buffer, address, output2)) {
3273
3273
  break;
3274
3274
  }
3275
3275
  consume = consumeIsZone;
@@ -3280,15 +3280,15 @@ var require_utils = __commonJS({
3280
3280
  }
3281
3281
  if (buffer.length) {
3282
3282
  if (consume === consumeIsZone) {
3283
- output.zone = buffer.join("");
3283
+ output2.zone = buffer.join("");
3284
3284
  } else if (endIpv6) {
3285
3285
  address.push(buffer.join(""));
3286
3286
  } else {
3287
3287
  address.push(stringArrayToHexStripped(buffer));
3288
3288
  }
3289
3289
  }
3290
- output.address = address.join("");
3291
- return output;
3290
+ output2.address = address.join("");
3291
+ return output2;
3292
3292
  }
3293
3293
  function normalizeIPv6(host) {
3294
3294
  if (findToken(host, ":") < 2) {
@@ -3315,79 +3315,79 @@ var require_utils = __commonJS({
3315
3315
  return ind;
3316
3316
  }
3317
3317
  function removeDotSegments(path3) {
3318
- let input = path3;
3319
- const output = [];
3318
+ let input2 = path3;
3319
+ const output2 = [];
3320
3320
  let nextSlash = -1;
3321
3321
  let len = 0;
3322
- while (len = input.length) {
3322
+ while (len = input2.length) {
3323
3323
  if (len === 1) {
3324
- if (input === ".") {
3324
+ if (input2 === ".") {
3325
3325
  break;
3326
- } else if (input === "/") {
3327
- output.push("/");
3326
+ } else if (input2 === "/") {
3327
+ output2.push("/");
3328
3328
  break;
3329
3329
  } else {
3330
- output.push(input);
3330
+ output2.push(input2);
3331
3331
  break;
3332
3332
  }
3333
3333
  } else if (len === 2) {
3334
- if (input[0] === ".") {
3335
- if (input[1] === ".") {
3334
+ if (input2[0] === ".") {
3335
+ if (input2[1] === ".") {
3336
3336
  break;
3337
- } else if (input[1] === "/") {
3338
- input = input.slice(2);
3337
+ } else if (input2[1] === "/") {
3338
+ input2 = input2.slice(2);
3339
3339
  continue;
3340
3340
  }
3341
- } else if (input[0] === "/") {
3342
- if (input[1] === "." || input[1] === "/") {
3343
- output.push("/");
3341
+ } else if (input2[0] === "/") {
3342
+ if (input2[1] === "." || input2[1] === "/") {
3343
+ output2.push("/");
3344
3344
  break;
3345
3345
  }
3346
3346
  }
3347
3347
  } else if (len === 3) {
3348
- if (input === "/..") {
3349
- if (output.length !== 0) {
3350
- output.pop();
3348
+ if (input2 === "/..") {
3349
+ if (output2.length !== 0) {
3350
+ output2.pop();
3351
3351
  }
3352
- output.push("/");
3352
+ output2.push("/");
3353
3353
  break;
3354
3354
  }
3355
3355
  }
3356
- if (input[0] === ".") {
3357
- if (input[1] === ".") {
3358
- if (input[2] === "/") {
3359
- input = input.slice(3);
3356
+ if (input2[0] === ".") {
3357
+ if (input2[1] === ".") {
3358
+ if (input2[2] === "/") {
3359
+ input2 = input2.slice(3);
3360
3360
  continue;
3361
3361
  }
3362
- } else if (input[1] === "/") {
3363
- input = input.slice(2);
3362
+ } else if (input2[1] === "/") {
3363
+ input2 = input2.slice(2);
3364
3364
  continue;
3365
3365
  }
3366
- } else if (input[0] === "/") {
3367
- if (input[1] === ".") {
3368
- if (input[2] === "/") {
3369
- input = input.slice(2);
3366
+ } else if (input2[0] === "/") {
3367
+ if (input2[1] === ".") {
3368
+ if (input2[2] === "/") {
3369
+ input2 = input2.slice(2);
3370
3370
  continue;
3371
- } else if (input[2] === ".") {
3372
- if (input[3] === "/") {
3373
- input = input.slice(3);
3374
- if (output.length !== 0) {
3375
- output.pop();
3371
+ } else if (input2[2] === ".") {
3372
+ if (input2[3] === "/") {
3373
+ input2 = input2.slice(3);
3374
+ if (output2.length !== 0) {
3375
+ output2.pop();
3376
3376
  }
3377
3377
  continue;
3378
3378
  }
3379
3379
  }
3380
3380
  }
3381
3381
  }
3382
- if ((nextSlash = input.indexOf("/", 1)) === -1) {
3383
- output.push(input);
3382
+ if ((nextSlash = input2.indexOf("/", 1)) === -1) {
3383
+ output2.push(input2);
3384
3384
  break;
3385
3385
  } else {
3386
- output.push(input.slice(0, nextSlash));
3387
- input = input.slice(nextSlash);
3386
+ output2.push(input2.slice(0, nextSlash));
3387
+ input2 = input2.slice(nextSlash);
3388
3388
  }
3389
3389
  }
3390
- return output.join("");
3390
+ return output2.join("");
3391
3391
  }
3392
3392
  function normalizeComponentEncoding(component, esc2) {
3393
3393
  const func = esc2 !== true ? escape : unescape;
@@ -9291,6 +9291,107 @@ var init_account_manager = __esm({
9291
9291
  }
9292
9292
  });
9293
9293
 
9294
+ // src/setup/prompts.ts
9295
+ import readline from "node:readline/promises";
9296
+ import { stdin as input, stdout as output } from "node:process";
9297
+ function getInterface() {
9298
+ if (!sharedInterface) {
9299
+ sharedInterface = readline.createInterface({ input, output });
9300
+ }
9301
+ return sharedInterface;
9302
+ }
9303
+ function closePrompts() {
9304
+ sharedInterface?.close();
9305
+ sharedInterface = null;
9306
+ }
9307
+ async function askText(message, defaultValue) {
9308
+ const rl = getInterface();
9309
+ const suffix = defaultValue ? ` (${defaultValue})` : "";
9310
+ const answer = await rl.question(`${message}${suffix} `);
9311
+ const trimmed = answer.trim();
9312
+ return trimmed.length > 0 ? trimmed : defaultValue ?? "";
9313
+ }
9314
+ async function askValidated(message, defaultValue, validate) {
9315
+ for (; ; ) {
9316
+ const value = await askText(message, defaultValue);
9317
+ const result = validate(value);
9318
+ if (result === true) return value;
9319
+ console.log(` ${result}`);
9320
+ }
9321
+ }
9322
+ async function askConfirm(message, defaultValue = false) {
9323
+ const suffix = defaultValue ? "Y/n" : "y/N";
9324
+ const answer = await askText(`${message} (${suffix})`);
9325
+ if (!answer) return defaultValue;
9326
+ return /^y/i.test(answer);
9327
+ }
9328
+ async function askChoice(message, choices) {
9329
+ console.log(message);
9330
+ choices.forEach((c, i) => console.log(` ${i + 1}) ${c.name}`));
9331
+ for (; ; ) {
9332
+ const answer = await askText("Enter a number:");
9333
+ const idx = parseInt(answer, 10) - 1;
9334
+ if (idx >= 0 && idx < choices.length) return choices[idx].value;
9335
+ console.log(` Please enter a number between 1 and ${choices.length}.`);
9336
+ }
9337
+ }
9338
+ function askPassword(message) {
9339
+ return new Promise((resolve) => {
9340
+ output.write(`${message} `);
9341
+ if (!input.isTTY || typeof input.setRawMode !== "function") {
9342
+ const rl = getInterface();
9343
+ rl.question("").then(resolve);
9344
+ return;
9345
+ }
9346
+ let value = "";
9347
+ input.setRawMode(true);
9348
+ input.resume();
9349
+ input.setEncoding("utf8");
9350
+ const cleanup = () => {
9351
+ input.setRawMode(false);
9352
+ input.pause();
9353
+ input.removeListener("data", onData);
9354
+ };
9355
+ const onData = (char) => {
9356
+ switch (char) {
9357
+ case "\n":
9358
+ case "\r":
9359
+ case CTRL_D:
9360
+ cleanup();
9361
+ output.write("\n");
9362
+ resolve(value);
9363
+ break;
9364
+ case CTRL_C:
9365
+ cleanup();
9366
+ output.write("\n");
9367
+ process.exit(130);
9368
+ break;
9369
+ case BACKSPACE:
9370
+ case "\b":
9371
+ if (value.length > 0) {
9372
+ value = value.slice(0, -1);
9373
+ output.write("\b \b");
9374
+ }
9375
+ break;
9376
+ default:
9377
+ value += char;
9378
+ output.write("*");
9379
+ }
9380
+ };
9381
+ input.on("data", onData);
9382
+ });
9383
+ }
9384
+ var CTRL_C, CTRL_D, BACKSPACE, sharedInterface;
9385
+ var init_prompts = __esm({
9386
+ "src/setup/prompts.ts"() {
9387
+ "use strict";
9388
+ CTRL_C = "";
9389
+ CTRL_D = "";
9390
+ BACKSPACE = "\x7F";
9391
+ sharedInterface = null;
9392
+ }
9393
+ });
9394
+
9294
9395
  // src/auth/oauth-server.ts
9295
9396
  import http from "node:http";
9296
9397
  var SUCCESS_HTML, ERROR_HTML, OAuthCallbackServer;
@@ -9388,7 +9489,6 @@ var init_oauth_server = __esm({
9388
9489
  var wizard_exports = {};
9389
9490
  import crypto4 from "node:crypto";
9390
9491
  import { exec } from "node:child_process";
9391
- import inquirer from "inquirer";
9392
9492
  function openBrowser(url2) {
9393
9493
  const platform = process.platform;
9394
9494
  let cmd;
@@ -9429,15 +9529,7 @@ async function testAndSave(creds) {
9429
9529
  }
9430
9530
  }
9431
9531
  async function promptAccountName(defaultName) {
9432
- const { name } = await inquirer.prompt([
9433
- {
9434
- type: "input",
9435
- name: "name",
9436
- message: "Account name:",
9437
- default: defaultName
9438
- }
9439
- ]);
9440
- return name;
9532
+ return askText("Account name:", defaultName);
9441
9533
  }
9442
9534
  async function setupGmail() {
9443
9535
  console.log("\n--- Gmail Setup ---");
@@ -9529,30 +9621,25 @@ async function setupICloud() {
9529
9621
  console.log(
9530
9622
  "You need an app-specific password for iCloud Mail.\nGenerate one at https://appleid.apple.com/account/manage\n(Sign In & Security > App-Specific Passwords)\n"
9531
9623
  );
9532
- const answers = await inquirer.prompt([
9533
- {
9534
- type: "input",
9535
- name: "email",
9536
- message: "iCloud email address:",
9537
- validate: (v) => v.includes("@") || "Enter a valid email address"
9538
- },
9539
- {
9540
- type: "password",
9541
- name: "password",
9542
- message: "App-specific password:",
9543
- mask: "*",
9544
- validate: (v) => v.trim().length > 0 || "Password is required"
9545
- }
9546
- ]);
9624
+ const email3 = await askValidated(
9625
+ "iCloud email address:",
9626
+ void 0,
9627
+ (v) => v.includes("@") || "Enter a valid email address"
9628
+ );
9629
+ let password = await askPassword("App-specific password:");
9630
+ while (password.trim().length === 0) {
9631
+ console.log(" Password is required");
9632
+ password = await askPassword("App-specific password:");
9633
+ }
9547
9634
  const name = await promptAccountName("iCloud");
9548
9635
  const id = crypto4.randomUUID();
9549
9636
  const creds = {
9550
9637
  id,
9551
9638
  name,
9552
9639
  provider: ProviderType.ICloud,
9553
- email: answers.email.trim(),
9640
+ email: email3.trim(),
9554
9641
  password: {
9555
- password: answers.password,
9642
+ password,
9556
9643
  host: "imap.mail.me.com",
9557
9644
  port: 993,
9558
9645
  tls: true,
@@ -9564,72 +9651,26 @@ async function setupICloud() {
9564
9651
  }
9565
9652
  async function setupIMAP() {
9566
9653
  console.log("\n--- Generic IMAP Setup ---\n");
9567
- const answers = await inquirer.prompt([
9568
- {
9569
- type: "input",
9570
- name: "email",
9571
- message: "Email address:",
9572
- validate: (v) => v.includes("@") || "Enter a valid email address"
9573
- },
9574
- {
9575
- type: "input",
9576
- name: "host",
9577
- message: "IMAP host:",
9578
- validate: (v) => v.trim().length > 0 || "Host is required"
9579
- },
9580
- {
9581
- type: "input",
9582
- name: "port",
9583
- message: "IMAP port:",
9584
- default: "993",
9585
- validate: (v) => {
9586
- const n = parseInt(v, 10);
9587
- return n > 0 && n <= 65535 || "Enter a valid port number (1-65535)";
9588
- }
9589
- },
9590
- {
9591
- type: "confirm",
9592
- name: "tls",
9593
- message: "Use TLS?",
9594
- default: true
9595
- },
9596
- {
9597
- type: "password",
9598
- name: "password",
9599
- message: "Password:",
9600
- mask: "*",
9601
- validate: (v) => v.trim().length > 0 || "Password is required"
9602
- },
9603
- {
9604
- type: "confirm",
9605
- name: "configureSmtp",
9606
- message: "Configure SMTP (for sending)?",
9607
- default: false
9608
- }
9609
- ]);
9654
+ const portValidator = (v) => {
9655
+ const n = parseInt(v, 10);
9656
+ return n > 0 && n <= 65535 || "Enter a valid port number (1-65535)";
9657
+ };
9658
+ const email3 = await askValidated("Email address:", void 0, (v) => v.includes("@") || "Enter a valid email address");
9659
+ const host = await askValidated("IMAP host:", void 0, (v) => v.trim().length > 0 || "Host is required");
9660
+ const portStr = await askValidated("IMAP port:", "993", portValidator);
9661
+ const tls = await askConfirm("Use TLS?", true);
9662
+ let password = await askPassword("Password:");
9663
+ while (password.trim().length === 0) {
9664
+ console.log(" Password is required");
9665
+ password = await askPassword("Password:");
9666
+ }
9667
+ const configureSmtp = await askConfirm("Configure SMTP (for sending)?", false);
9610
9668
  let smtpHost;
9611
9669
  let smtpPort;
9612
- if (answers.configureSmtp) {
9613
- const smtp = await inquirer.prompt([
9614
- {
9615
- type: "input",
9616
- name: "smtpHost",
9617
- message: "SMTP host:",
9618
- validate: (v) => v.trim().length > 0 || "SMTP host is required"
9619
- },
9620
- {
9621
- type: "input",
9622
- name: "smtpPort",
9623
- message: "SMTP port:",
9624
- default: "587",
9625
- validate: (v) => {
9626
- const n = parseInt(v, 10);
9627
- return n > 0 && n <= 65535 || "Enter a valid port number (1-65535)";
9628
- }
9629
- }
9630
- ]);
9631
- smtpHost = smtp.smtpHost.trim();
9632
- smtpPort = parseInt(smtp.smtpPort, 10);
9670
+ if (configureSmtp) {
9671
+ smtpHost = await askValidated("SMTP host:", void 0, (v) => v.trim().length > 0 || "SMTP host is required");
9672
+ const smtpPortStr = await askValidated("SMTP port:", "587", portValidator);
9673
+ smtpPort = parseInt(smtpPortStr, 10);
9633
9674
  }
9634
9675
  const name = await promptAccountName("IMAP");
9635
9676
  const id = crypto4.randomUUID();
@@ -9637,12 +9678,12 @@ async function setupIMAP() {
9637
9678
  id,
9638
9679
  name,
9639
9680
  provider: ProviderType.IMAP,
9640
- email: answers.email.trim(),
9681
+ email: email3.trim(),
9641
9682
  password: {
9642
- password: answers.password,
9643
- host: answers.host.trim(),
9644
- port: parseInt(answers.port, 10),
9645
- tls: answers.tls,
9683
+ password,
9684
+ host: host.trim(),
9685
+ port: parseInt(portStr, 10),
9686
+ tls,
9646
9687
  smtpHost,
9647
9688
  smtpPort
9648
9689
  }
@@ -9672,14 +9713,7 @@ async function removeAccount(id) {
9672
9713
  console.error(`Account not found: ${id}`);
9673
9714
  process.exit(1);
9674
9715
  }
9675
- const { confirm } = await inquirer.prompt([
9676
- {
9677
- type: "confirm",
9678
- name: "confirm",
9679
- message: `Remove account "${acct.name}" (${acct.email})?`,
9680
- default: false
9681
- }
9682
- ]);
9716
+ const confirm = await askConfirm(`Remove account "${acct.name}" (${acct.email})?`, false);
9683
9717
  if (confirm) {
9684
9718
  await store.remove(id);
9685
9719
  console.log(`Account "${acct.name}" removed.`);
@@ -9706,18 +9740,11 @@ async function main() {
9706
9740
  console.log("@marlinjai/email-mcp Account Setup\n");
9707
9741
  let addMore = true;
9708
9742
  while (addMore) {
9709
- const { provider } = await inquirer.prompt([
9710
- {
9711
- type: "rawlist",
9712
- name: "provider",
9713
- message: "Select provider:",
9714
- choices: [
9715
- { name: "Gmail", value: "gmail" },
9716
- { name: "Outlook", value: "outlook" },
9717
- { name: "iCloud", value: "icloud" },
9718
- { name: "Other IMAP", value: "imap" }
9719
- ]
9720
- }
9743
+ const provider = await askChoice("Select provider:", [
9744
+ { name: "Gmail", value: "gmail" },
9745
+ { name: "Outlook", value: "outlook" },
9746
+ { name: "iCloud", value: "icloud" },
9747
+ { name: "Other IMAP", value: "imap" }
9721
9748
  ]);
9722
9749
  switch (provider) {
9723
9750
  case ProviderType.Gmail:
@@ -9736,15 +9763,7 @@ async function main() {
9736
9763
  console.error(`Unknown provider: ${provider}`);
9737
9764
  process.exit(1);
9738
9765
  }
9739
- const { another } = await inquirer.prompt([
9740
- {
9741
- type: "confirm",
9742
- name: "another",
9743
- message: "Would you like to add another email account?",
9744
- default: false
9745
- }
9746
- ]);
9747
- addMore = another;
9766
+ addMore = await askConfirm("Would you like to add another email account?", false);
9748
9767
  }
9749
9768
  console.log("\nSetup complete! You can now use the email tools in Claude Code.");
9750
9769
  }
@@ -9752,6 +9771,7 @@ var store, manager;
9752
9771
  var init_wizard = __esm({
9753
9772
  "src/setup/wizard.ts"() {
9754
9773
  "use strict";
9774
+ init_prompts();
9755
9775
  init_credential_store();
9756
9776
  init_oauth_server();
9757
9777
  init_auth();
@@ -9765,7 +9785,7 @@ var init_wizard = __esm({
9765
9785
  console.error(`
9766
9786
  Setup failed: ${err.message}`);
9767
9787
  process.exit(1);
9768
- });
9788
+ }).finally(closePrompts);
9769
9789
  }
9770
9790
  });
9771
9791
 
@@ -10311,41 +10331,41 @@ var ZodType = class {
10311
10331
  get description() {
10312
10332
  return this._def.description;
10313
10333
  }
10314
- _getType(input) {
10315
- return getParsedType(input.data);
10334
+ _getType(input2) {
10335
+ return getParsedType(input2.data);
10316
10336
  }
10317
- _getOrReturnCtx(input, ctx) {
10337
+ _getOrReturnCtx(input2, ctx) {
10318
10338
  return ctx || {
10319
- common: input.parent.common,
10320
- data: input.data,
10321
- parsedType: getParsedType(input.data),
10339
+ common: input2.parent.common,
10340
+ data: input2.data,
10341
+ parsedType: getParsedType(input2.data),
10322
10342
  schemaErrorMap: this._def.errorMap,
10323
- path: input.path,
10324
- parent: input.parent
10343
+ path: input2.path,
10344
+ parent: input2.parent
10325
10345
  };
10326
10346
  }
10327
- _processInputParams(input) {
10347
+ _processInputParams(input2) {
10328
10348
  return {
10329
10349
  status: new ParseStatus(),
10330
10350
  ctx: {
10331
- common: input.parent.common,
10332
- data: input.data,
10333
- parsedType: getParsedType(input.data),
10351
+ common: input2.parent.common,
10352
+ data: input2.data,
10353
+ parsedType: getParsedType(input2.data),
10334
10354
  schemaErrorMap: this._def.errorMap,
10335
- path: input.path,
10336
- parent: input.parent
10355
+ path: input2.path,
10356
+ parent: input2.parent
10337
10357
  }
10338
10358
  };
10339
10359
  }
10340
- _parseSync(input) {
10341
- const result = this._parse(input);
10360
+ _parseSync(input2) {
10361
+ const result = this._parse(input2);
10342
10362
  if (isAsync(result)) {
10343
10363
  throw new Error("Synchronous parse encountered promise.");
10344
10364
  }
10345
10365
  return result;
10346
10366
  }
10347
- _parseAsync(input) {
10348
- const result = this._parse(input);
10367
+ _parseAsync(input2) {
10368
+ const result = this._parse(input2);
10349
10369
  return Promise.resolve(result);
10350
10370
  }
10351
10371
  parse(data, params) {
@@ -10671,13 +10691,13 @@ function isValidCidr(ip, version2) {
10671
10691
  return false;
10672
10692
  }
10673
10693
  var ZodString = class _ZodString2 extends ZodType {
10674
- _parse(input) {
10694
+ _parse(input2) {
10675
10695
  if (this._def.coerce) {
10676
- input.data = String(input.data);
10696
+ input2.data = String(input2.data);
10677
10697
  }
10678
- const parsedType2 = this._getType(input);
10698
+ const parsedType2 = this._getType(input2);
10679
10699
  if (parsedType2 !== ZodParsedType.string) {
10680
- const ctx2 = this._getOrReturnCtx(input);
10700
+ const ctx2 = this._getOrReturnCtx(input2);
10681
10701
  addIssueToContext(ctx2, {
10682
10702
  code: ZodIssueCode.invalid_type,
10683
10703
  expected: ZodParsedType.string,
@@ -10689,8 +10709,8 @@ var ZodString = class _ZodString2 extends ZodType {
10689
10709
  let ctx = void 0;
10690
10710
  for (const check2 of this._def.checks) {
10691
10711
  if (check2.kind === "min") {
10692
- if (input.data.length < check2.value) {
10693
- ctx = this._getOrReturnCtx(input, ctx);
10712
+ if (input2.data.length < check2.value) {
10713
+ ctx = this._getOrReturnCtx(input2, ctx);
10694
10714
  addIssueToContext(ctx, {
10695
10715
  code: ZodIssueCode.too_small,
10696
10716
  minimum: check2.value,
@@ -10702,8 +10722,8 @@ var ZodString = class _ZodString2 extends ZodType {
10702
10722
  status.dirty();
10703
10723
  }
10704
10724
  } else if (check2.kind === "max") {
10705
- if (input.data.length > check2.value) {
10706
- ctx = this._getOrReturnCtx(input, ctx);
10725
+ if (input2.data.length > check2.value) {
10726
+ ctx = this._getOrReturnCtx(input2, ctx);
10707
10727
  addIssueToContext(ctx, {
10708
10728
  code: ZodIssueCode.too_big,
10709
10729
  maximum: check2.value,
@@ -10715,10 +10735,10 @@ var ZodString = class _ZodString2 extends ZodType {
10715
10735
  status.dirty();
10716
10736
  }
10717
10737
  } else if (check2.kind === "length") {
10718
- const tooBig = input.data.length > check2.value;
10719
- const tooSmall = input.data.length < check2.value;
10738
+ const tooBig = input2.data.length > check2.value;
10739
+ const tooSmall = input2.data.length < check2.value;
10720
10740
  if (tooBig || tooSmall) {
10721
- ctx = this._getOrReturnCtx(input, ctx);
10741
+ ctx = this._getOrReturnCtx(input2, ctx);
10722
10742
  if (tooBig) {
10723
10743
  addIssueToContext(ctx, {
10724
10744
  code: ZodIssueCode.too_big,
@@ -10741,8 +10761,8 @@ var ZodString = class _ZodString2 extends ZodType {
10741
10761
  status.dirty();
10742
10762
  }
10743
10763
  } else if (check2.kind === "email") {
10744
- if (!emailRegex.test(input.data)) {
10745
- ctx = this._getOrReturnCtx(input, ctx);
10764
+ if (!emailRegex.test(input2.data)) {
10765
+ ctx = this._getOrReturnCtx(input2, ctx);
10746
10766
  addIssueToContext(ctx, {
10747
10767
  validation: "email",
10748
10768
  code: ZodIssueCode.invalid_string,
@@ -10754,8 +10774,8 @@ var ZodString = class _ZodString2 extends ZodType {
10754
10774
  if (!emojiRegex) {
10755
10775
  emojiRegex = new RegExp(_emojiRegex, "u");
10756
10776
  }
10757
- if (!emojiRegex.test(input.data)) {
10758
- ctx = this._getOrReturnCtx(input, ctx);
10777
+ if (!emojiRegex.test(input2.data)) {
10778
+ ctx = this._getOrReturnCtx(input2, ctx);
10759
10779
  addIssueToContext(ctx, {
10760
10780
  validation: "emoji",
10761
10781
  code: ZodIssueCode.invalid_string,
@@ -10764,8 +10784,8 @@ var ZodString = class _ZodString2 extends ZodType {
10764
10784
  status.dirty();
10765
10785
  }
10766
10786
  } else if (check2.kind === "uuid") {
10767
- if (!uuidRegex.test(input.data)) {
10768
- ctx = this._getOrReturnCtx(input, ctx);
10787
+ if (!uuidRegex.test(input2.data)) {
10788
+ ctx = this._getOrReturnCtx(input2, ctx);
10769
10789
  addIssueToContext(ctx, {
10770
10790
  validation: "uuid",
10771
10791
  code: ZodIssueCode.invalid_string,
@@ -10774,8 +10794,8 @@ var ZodString = class _ZodString2 extends ZodType {
10774
10794
  status.dirty();
10775
10795
  }
10776
10796
  } else if (check2.kind === "nanoid") {
10777
- if (!nanoidRegex.test(input.data)) {
10778
- ctx = this._getOrReturnCtx(input, ctx);
10797
+ if (!nanoidRegex.test(input2.data)) {
10798
+ ctx = this._getOrReturnCtx(input2, ctx);
10779
10799
  addIssueToContext(ctx, {
10780
10800
  validation: "nanoid",
10781
10801
  code: ZodIssueCode.invalid_string,
@@ -10784,8 +10804,8 @@ var ZodString = class _ZodString2 extends ZodType {
10784
10804
  status.dirty();
10785
10805
  }
10786
10806
  } else if (check2.kind === "cuid") {
10787
- if (!cuidRegex.test(input.data)) {
10788
- ctx = this._getOrReturnCtx(input, ctx);
10807
+ if (!cuidRegex.test(input2.data)) {
10808
+ ctx = this._getOrReturnCtx(input2, ctx);
10789
10809
  addIssueToContext(ctx, {
10790
10810
  validation: "cuid",
10791
10811
  code: ZodIssueCode.invalid_string,
@@ -10794,8 +10814,8 @@ var ZodString = class _ZodString2 extends ZodType {
10794
10814
  status.dirty();
10795
10815
  }
10796
10816
  } else if (check2.kind === "cuid2") {
10797
- if (!cuid2Regex.test(input.data)) {
10798
- ctx = this._getOrReturnCtx(input, ctx);
10817
+ if (!cuid2Regex.test(input2.data)) {
10818
+ ctx = this._getOrReturnCtx(input2, ctx);
10799
10819
  addIssueToContext(ctx, {
10800
10820
  validation: "cuid2",
10801
10821
  code: ZodIssueCode.invalid_string,
@@ -10804,8 +10824,8 @@ var ZodString = class _ZodString2 extends ZodType {
10804
10824
  status.dirty();
10805
10825
  }
10806
10826
  } else if (check2.kind === "ulid") {
10807
- if (!ulidRegex.test(input.data)) {
10808
- ctx = this._getOrReturnCtx(input, ctx);
10827
+ if (!ulidRegex.test(input2.data)) {
10828
+ ctx = this._getOrReturnCtx(input2, ctx);
10809
10829
  addIssueToContext(ctx, {
10810
10830
  validation: "ulid",
10811
10831
  code: ZodIssueCode.invalid_string,
@@ -10815,9 +10835,9 @@ var ZodString = class _ZodString2 extends ZodType {
10815
10835
  }
10816
10836
  } else if (check2.kind === "url") {
10817
10837
  try {
10818
- new URL(input.data);
10838
+ new URL(input2.data);
10819
10839
  } catch {
10820
- ctx = this._getOrReturnCtx(input, ctx);
10840
+ ctx = this._getOrReturnCtx(input2, ctx);
10821
10841
  addIssueToContext(ctx, {
10822
10842
  validation: "url",
10823
10843
  code: ZodIssueCode.invalid_string,
@@ -10827,9 +10847,9 @@ var ZodString = class _ZodString2 extends ZodType {
10827
10847
  }
10828
10848
  } else if (check2.kind === "regex") {
10829
10849
  check2.regex.lastIndex = 0;
10830
- const testResult = check2.regex.test(input.data);
10850
+ const testResult = check2.regex.test(input2.data);
10831
10851
  if (!testResult) {
10832
- ctx = this._getOrReturnCtx(input, ctx);
10852
+ ctx = this._getOrReturnCtx(input2, ctx);
10833
10853
  addIssueToContext(ctx, {
10834
10854
  validation: "regex",
10835
10855
  code: ZodIssueCode.invalid_string,
@@ -10838,10 +10858,10 @@ var ZodString = class _ZodString2 extends ZodType {
10838
10858
  status.dirty();
10839
10859
  }
10840
10860
  } else if (check2.kind === "trim") {
10841
- input.data = input.data.trim();
10861
+ input2.data = input2.data.trim();
10842
10862
  } else if (check2.kind === "includes") {
10843
- if (!input.data.includes(check2.value, check2.position)) {
10844
- ctx = this._getOrReturnCtx(input, ctx);
10863
+ if (!input2.data.includes(check2.value, check2.position)) {
10864
+ ctx = this._getOrReturnCtx(input2, ctx);
10845
10865
  addIssueToContext(ctx, {
10846
10866
  code: ZodIssueCode.invalid_string,
10847
10867
  validation: { includes: check2.value, position: check2.position },
@@ -10850,12 +10870,12 @@ var ZodString = class _ZodString2 extends ZodType {
10850
10870
  status.dirty();
10851
10871
  }
10852
10872
  } else if (check2.kind === "toLowerCase") {
10853
- input.data = input.data.toLowerCase();
10873
+ input2.data = input2.data.toLowerCase();
10854
10874
  } else if (check2.kind === "toUpperCase") {
10855
- input.data = input.data.toUpperCase();
10875
+ input2.data = input2.data.toUpperCase();
10856
10876
  } else if (check2.kind === "startsWith") {
10857
- if (!input.data.startsWith(check2.value)) {
10858
- ctx = this._getOrReturnCtx(input, ctx);
10877
+ if (!input2.data.startsWith(check2.value)) {
10878
+ ctx = this._getOrReturnCtx(input2, ctx);
10859
10879
  addIssueToContext(ctx, {
10860
10880
  code: ZodIssueCode.invalid_string,
10861
10881
  validation: { startsWith: check2.value },
@@ -10864,8 +10884,8 @@ var ZodString = class _ZodString2 extends ZodType {
10864
10884
  status.dirty();
10865
10885
  }
10866
10886
  } else if (check2.kind === "endsWith") {
10867
- if (!input.data.endsWith(check2.value)) {
10868
- ctx = this._getOrReturnCtx(input, ctx);
10887
+ if (!input2.data.endsWith(check2.value)) {
10888
+ ctx = this._getOrReturnCtx(input2, ctx);
10869
10889
  addIssueToContext(ctx, {
10870
10890
  code: ZodIssueCode.invalid_string,
10871
10891
  validation: { endsWith: check2.value },
@@ -10875,8 +10895,8 @@ var ZodString = class _ZodString2 extends ZodType {
10875
10895
  }
10876
10896
  } else if (check2.kind === "datetime") {
10877
10897
  const regex = datetimeRegex(check2);
10878
- if (!regex.test(input.data)) {
10879
- ctx = this._getOrReturnCtx(input, ctx);
10898
+ if (!regex.test(input2.data)) {
10899
+ ctx = this._getOrReturnCtx(input2, ctx);
10880
10900
  addIssueToContext(ctx, {
10881
10901
  code: ZodIssueCode.invalid_string,
10882
10902
  validation: "datetime",
@@ -10886,8 +10906,8 @@ var ZodString = class _ZodString2 extends ZodType {
10886
10906
  }
10887
10907
  } else if (check2.kind === "date") {
10888
10908
  const regex = dateRegex;
10889
- if (!regex.test(input.data)) {
10890
- ctx = this._getOrReturnCtx(input, ctx);
10909
+ if (!regex.test(input2.data)) {
10910
+ ctx = this._getOrReturnCtx(input2, ctx);
10891
10911
  addIssueToContext(ctx, {
10892
10912
  code: ZodIssueCode.invalid_string,
10893
10913
  validation: "date",
@@ -10897,8 +10917,8 @@ var ZodString = class _ZodString2 extends ZodType {
10897
10917
  }
10898
10918
  } else if (check2.kind === "time") {
10899
10919
  const regex = timeRegex(check2);
10900
- if (!regex.test(input.data)) {
10901
- ctx = this._getOrReturnCtx(input, ctx);
10920
+ if (!regex.test(input2.data)) {
10921
+ ctx = this._getOrReturnCtx(input2, ctx);
10902
10922
  addIssueToContext(ctx, {
10903
10923
  code: ZodIssueCode.invalid_string,
10904
10924
  validation: "time",
@@ -10907,8 +10927,8 @@ var ZodString = class _ZodString2 extends ZodType {
10907
10927
  status.dirty();
10908
10928
  }
10909
10929
  } else if (check2.kind === "duration") {
10910
- if (!durationRegex.test(input.data)) {
10911
- ctx = this._getOrReturnCtx(input, ctx);
10930
+ if (!durationRegex.test(input2.data)) {
10931
+ ctx = this._getOrReturnCtx(input2, ctx);
10912
10932
  addIssueToContext(ctx, {
10913
10933
  validation: "duration",
10914
10934
  code: ZodIssueCode.invalid_string,
@@ -10917,8 +10937,8 @@ var ZodString = class _ZodString2 extends ZodType {
10917
10937
  status.dirty();
10918
10938
  }
10919
10939
  } else if (check2.kind === "ip") {
10920
- if (!isValidIP(input.data, check2.version)) {
10921
- ctx = this._getOrReturnCtx(input, ctx);
10940
+ if (!isValidIP(input2.data, check2.version)) {
10941
+ ctx = this._getOrReturnCtx(input2, ctx);
10922
10942
  addIssueToContext(ctx, {
10923
10943
  validation: "ip",
10924
10944
  code: ZodIssueCode.invalid_string,
@@ -10927,8 +10947,8 @@ var ZodString = class _ZodString2 extends ZodType {
10927
10947
  status.dirty();
10928
10948
  }
10929
10949
  } else if (check2.kind === "jwt") {
10930
- if (!isValidJWT(input.data, check2.alg)) {
10931
- ctx = this._getOrReturnCtx(input, ctx);
10950
+ if (!isValidJWT(input2.data, check2.alg)) {
10951
+ ctx = this._getOrReturnCtx(input2, ctx);
10932
10952
  addIssueToContext(ctx, {
10933
10953
  validation: "jwt",
10934
10954
  code: ZodIssueCode.invalid_string,
@@ -10937,8 +10957,8 @@ var ZodString = class _ZodString2 extends ZodType {
10937
10957
  status.dirty();
10938
10958
  }
10939
10959
  } else if (check2.kind === "cidr") {
10940
- if (!isValidCidr(input.data, check2.version)) {
10941
- ctx = this._getOrReturnCtx(input, ctx);
10960
+ if (!isValidCidr(input2.data, check2.version)) {
10961
+ ctx = this._getOrReturnCtx(input2, ctx);
10942
10962
  addIssueToContext(ctx, {
10943
10963
  validation: "cidr",
10944
10964
  code: ZodIssueCode.invalid_string,
@@ -10947,8 +10967,8 @@ var ZodString = class _ZodString2 extends ZodType {
10947
10967
  status.dirty();
10948
10968
  }
10949
10969
  } else if (check2.kind === "base64") {
10950
- if (!base64Regex.test(input.data)) {
10951
- ctx = this._getOrReturnCtx(input, ctx);
10970
+ if (!base64Regex.test(input2.data)) {
10971
+ ctx = this._getOrReturnCtx(input2, ctx);
10952
10972
  addIssueToContext(ctx, {
10953
10973
  validation: "base64",
10954
10974
  code: ZodIssueCode.invalid_string,
@@ -10957,8 +10977,8 @@ var ZodString = class _ZodString2 extends ZodType {
10957
10977
  status.dirty();
10958
10978
  }
10959
10979
  } else if (check2.kind === "base64url") {
10960
- if (!base64urlRegex.test(input.data)) {
10961
- ctx = this._getOrReturnCtx(input, ctx);
10980
+ if (!base64urlRegex.test(input2.data)) {
10981
+ ctx = this._getOrReturnCtx(input2, ctx);
10962
10982
  addIssueToContext(ctx, {
10963
10983
  validation: "base64url",
10964
10984
  code: ZodIssueCode.invalid_string,
@@ -10970,7 +10990,7 @@ var ZodString = class _ZodString2 extends ZodType {
10970
10990
  util.assertNever(check2);
10971
10991
  }
10972
10992
  }
10973
- return { status: status.value, value: input.data };
10993
+ return { status: status.value, value: input2.data };
10974
10994
  }
10975
10995
  _regex(regex, validation, message) {
10976
10996
  return this.refinement((data) => regex.test(data), {
@@ -11231,13 +11251,13 @@ var ZodNumber = class _ZodNumber extends ZodType {
11231
11251
  this.max = this.lte;
11232
11252
  this.step = this.multipleOf;
11233
11253
  }
11234
- _parse(input) {
11254
+ _parse(input2) {
11235
11255
  if (this._def.coerce) {
11236
- input.data = Number(input.data);
11256
+ input2.data = Number(input2.data);
11237
11257
  }
11238
- const parsedType2 = this._getType(input);
11258
+ const parsedType2 = this._getType(input2);
11239
11259
  if (parsedType2 !== ZodParsedType.number) {
11240
- const ctx2 = this._getOrReturnCtx(input);
11260
+ const ctx2 = this._getOrReturnCtx(input2);
11241
11261
  addIssueToContext(ctx2, {
11242
11262
  code: ZodIssueCode.invalid_type,
11243
11263
  expected: ZodParsedType.number,
@@ -11249,8 +11269,8 @@ var ZodNumber = class _ZodNumber extends ZodType {
11249
11269
  const status = new ParseStatus();
11250
11270
  for (const check2 of this._def.checks) {
11251
11271
  if (check2.kind === "int") {
11252
- if (!util.isInteger(input.data)) {
11253
- ctx = this._getOrReturnCtx(input, ctx);
11272
+ if (!util.isInteger(input2.data)) {
11273
+ ctx = this._getOrReturnCtx(input2, ctx);
11254
11274
  addIssueToContext(ctx, {
11255
11275
  code: ZodIssueCode.invalid_type,
11256
11276
  expected: "integer",
@@ -11260,9 +11280,9 @@ var ZodNumber = class _ZodNumber extends ZodType {
11260
11280
  status.dirty();
11261
11281
  }
11262
11282
  } else if (check2.kind === "min") {
11263
- const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;
11283
+ const tooSmall = check2.inclusive ? input2.data < check2.value : input2.data <= check2.value;
11264
11284
  if (tooSmall) {
11265
- ctx = this._getOrReturnCtx(input, ctx);
11285
+ ctx = this._getOrReturnCtx(input2, ctx);
11266
11286
  addIssueToContext(ctx, {
11267
11287
  code: ZodIssueCode.too_small,
11268
11288
  minimum: check2.value,
@@ -11274,9 +11294,9 @@ var ZodNumber = class _ZodNumber extends ZodType {
11274
11294
  status.dirty();
11275
11295
  }
11276
11296
  } else if (check2.kind === "max") {
11277
- const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;
11297
+ const tooBig = check2.inclusive ? input2.data > check2.value : input2.data >= check2.value;
11278
11298
  if (tooBig) {
11279
- ctx = this._getOrReturnCtx(input, ctx);
11299
+ ctx = this._getOrReturnCtx(input2, ctx);
11280
11300
  addIssueToContext(ctx, {
11281
11301
  code: ZodIssueCode.too_big,
11282
11302
  maximum: check2.value,
@@ -11288,8 +11308,8 @@ var ZodNumber = class _ZodNumber extends ZodType {
11288
11308
  status.dirty();
11289
11309
  }
11290
11310
  } else if (check2.kind === "multipleOf") {
11291
- if (floatSafeRemainder(input.data, check2.value) !== 0) {
11292
- ctx = this._getOrReturnCtx(input, ctx);
11311
+ if (floatSafeRemainder(input2.data, check2.value) !== 0) {
11312
+ ctx = this._getOrReturnCtx(input2, ctx);
11293
11313
  addIssueToContext(ctx, {
11294
11314
  code: ZodIssueCode.not_multiple_of,
11295
11315
  multipleOf: check2.value,
@@ -11298,8 +11318,8 @@ var ZodNumber = class _ZodNumber extends ZodType {
11298
11318
  status.dirty();
11299
11319
  }
11300
11320
  } else if (check2.kind === "finite") {
11301
- if (!Number.isFinite(input.data)) {
11302
- ctx = this._getOrReturnCtx(input, ctx);
11321
+ if (!Number.isFinite(input2.data)) {
11322
+ ctx = this._getOrReturnCtx(input2, ctx);
11303
11323
  addIssueToContext(ctx, {
11304
11324
  code: ZodIssueCode.not_finite,
11305
11325
  message: check2.message
@@ -11310,7 +11330,7 @@ var ZodNumber = class _ZodNumber extends ZodType {
11310
11330
  util.assertNever(check2);
11311
11331
  }
11312
11332
  }
11313
- return { status: status.value, value: input.data };
11333
+ return { status: status.value, value: input2.data };
11314
11334
  }
11315
11335
  gte(value, message) {
11316
11336
  return this.setLimit("min", value, true, errorUtil.toString(message));
@@ -11462,25 +11482,25 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
11462
11482
  this.min = this.gte;
11463
11483
  this.max = this.lte;
11464
11484
  }
11465
- _parse(input) {
11485
+ _parse(input2) {
11466
11486
  if (this._def.coerce) {
11467
11487
  try {
11468
- input.data = BigInt(input.data);
11488
+ input2.data = BigInt(input2.data);
11469
11489
  } catch {
11470
- return this._getInvalidInput(input);
11490
+ return this._getInvalidInput(input2);
11471
11491
  }
11472
11492
  }
11473
- const parsedType2 = this._getType(input);
11493
+ const parsedType2 = this._getType(input2);
11474
11494
  if (parsedType2 !== ZodParsedType.bigint) {
11475
- return this._getInvalidInput(input);
11495
+ return this._getInvalidInput(input2);
11476
11496
  }
11477
11497
  let ctx = void 0;
11478
11498
  const status = new ParseStatus();
11479
11499
  for (const check2 of this._def.checks) {
11480
11500
  if (check2.kind === "min") {
11481
- const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;
11501
+ const tooSmall = check2.inclusive ? input2.data < check2.value : input2.data <= check2.value;
11482
11502
  if (tooSmall) {
11483
- ctx = this._getOrReturnCtx(input, ctx);
11503
+ ctx = this._getOrReturnCtx(input2, ctx);
11484
11504
  addIssueToContext(ctx, {
11485
11505
  code: ZodIssueCode.too_small,
11486
11506
  type: "bigint",
@@ -11491,9 +11511,9 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
11491
11511
  status.dirty();
11492
11512
  }
11493
11513
  } else if (check2.kind === "max") {
11494
- const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;
11514
+ const tooBig = check2.inclusive ? input2.data > check2.value : input2.data >= check2.value;
11495
11515
  if (tooBig) {
11496
- ctx = this._getOrReturnCtx(input, ctx);
11516
+ ctx = this._getOrReturnCtx(input2, ctx);
11497
11517
  addIssueToContext(ctx, {
11498
11518
  code: ZodIssueCode.too_big,
11499
11519
  type: "bigint",
@@ -11504,8 +11524,8 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
11504
11524
  status.dirty();
11505
11525
  }
11506
11526
  } else if (check2.kind === "multipleOf") {
11507
- if (input.data % check2.value !== BigInt(0)) {
11508
- ctx = this._getOrReturnCtx(input, ctx);
11527
+ if (input2.data % check2.value !== BigInt(0)) {
11528
+ ctx = this._getOrReturnCtx(input2, ctx);
11509
11529
  addIssueToContext(ctx, {
11510
11530
  code: ZodIssueCode.not_multiple_of,
11511
11531
  multipleOf: check2.value,
@@ -11517,10 +11537,10 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
11517
11537
  util.assertNever(check2);
11518
11538
  }
11519
11539
  }
11520
- return { status: status.value, value: input.data };
11540
+ return { status: status.value, value: input2.data };
11521
11541
  }
11522
- _getInvalidInput(input) {
11523
- const ctx = this._getOrReturnCtx(input);
11542
+ _getInvalidInput(input2) {
11543
+ const ctx = this._getOrReturnCtx(input2);
11524
11544
  addIssueToContext(ctx, {
11525
11545
  code: ZodIssueCode.invalid_type,
11526
11546
  expected: ZodParsedType.bigint,
@@ -11629,13 +11649,13 @@ ZodBigInt.create = (params) => {
11629
11649
  });
11630
11650
  };
11631
11651
  var ZodBoolean = class extends ZodType {
11632
- _parse(input) {
11652
+ _parse(input2) {
11633
11653
  if (this._def.coerce) {
11634
- input.data = Boolean(input.data);
11654
+ input2.data = Boolean(input2.data);
11635
11655
  }
11636
- const parsedType2 = this._getType(input);
11656
+ const parsedType2 = this._getType(input2);
11637
11657
  if (parsedType2 !== ZodParsedType.boolean) {
11638
- const ctx = this._getOrReturnCtx(input);
11658
+ const ctx = this._getOrReturnCtx(input2);
11639
11659
  addIssueToContext(ctx, {
11640
11660
  code: ZodIssueCode.invalid_type,
11641
11661
  expected: ZodParsedType.boolean,
@@ -11643,7 +11663,7 @@ var ZodBoolean = class extends ZodType {
11643
11663
  });
11644
11664
  return INVALID;
11645
11665
  }
11646
- return OK(input.data);
11666
+ return OK(input2.data);
11647
11667
  }
11648
11668
  };
11649
11669
  ZodBoolean.create = (params) => {
@@ -11654,13 +11674,13 @@ ZodBoolean.create = (params) => {
11654
11674
  });
11655
11675
  };
11656
11676
  var ZodDate = class _ZodDate extends ZodType {
11657
- _parse(input) {
11677
+ _parse(input2) {
11658
11678
  if (this._def.coerce) {
11659
- input.data = new Date(input.data);
11679
+ input2.data = new Date(input2.data);
11660
11680
  }
11661
- const parsedType2 = this._getType(input);
11681
+ const parsedType2 = this._getType(input2);
11662
11682
  if (parsedType2 !== ZodParsedType.date) {
11663
- const ctx2 = this._getOrReturnCtx(input);
11683
+ const ctx2 = this._getOrReturnCtx(input2);
11664
11684
  addIssueToContext(ctx2, {
11665
11685
  code: ZodIssueCode.invalid_type,
11666
11686
  expected: ZodParsedType.date,
@@ -11668,8 +11688,8 @@ var ZodDate = class _ZodDate extends ZodType {
11668
11688
  });
11669
11689
  return INVALID;
11670
11690
  }
11671
- if (Number.isNaN(input.data.getTime())) {
11672
- const ctx2 = this._getOrReturnCtx(input);
11691
+ if (Number.isNaN(input2.data.getTime())) {
11692
+ const ctx2 = this._getOrReturnCtx(input2);
11673
11693
  addIssueToContext(ctx2, {
11674
11694
  code: ZodIssueCode.invalid_date
11675
11695
  });
@@ -11679,8 +11699,8 @@ var ZodDate = class _ZodDate extends ZodType {
11679
11699
  let ctx = void 0;
11680
11700
  for (const check2 of this._def.checks) {
11681
11701
  if (check2.kind === "min") {
11682
- if (input.data.getTime() < check2.value) {
11683
- ctx = this._getOrReturnCtx(input, ctx);
11702
+ if (input2.data.getTime() < check2.value) {
11703
+ ctx = this._getOrReturnCtx(input2, ctx);
11684
11704
  addIssueToContext(ctx, {
11685
11705
  code: ZodIssueCode.too_small,
11686
11706
  message: check2.message,
@@ -11692,8 +11712,8 @@ var ZodDate = class _ZodDate extends ZodType {
11692
11712
  status.dirty();
11693
11713
  }
11694
11714
  } else if (check2.kind === "max") {
11695
- if (input.data.getTime() > check2.value) {
11696
- ctx = this._getOrReturnCtx(input, ctx);
11715
+ if (input2.data.getTime() > check2.value) {
11716
+ ctx = this._getOrReturnCtx(input2, ctx);
11697
11717
  addIssueToContext(ctx, {
11698
11718
  code: ZodIssueCode.too_big,
11699
11719
  message: check2.message,
@@ -11710,7 +11730,7 @@ var ZodDate = class _ZodDate extends ZodType {
11710
11730
  }
11711
11731
  return {
11712
11732
  status: status.value,
11713
- value: new Date(input.data.getTime())
11733
+ value: new Date(input2.data.getTime())
11714
11734
  };
11715
11735
  }
11716
11736
  _addCheck(check2) {
@@ -11763,10 +11783,10 @@ ZodDate.create = (params) => {
11763
11783
  });
11764
11784
  };
11765
11785
  var ZodSymbol = class extends ZodType {
11766
- _parse(input) {
11767
- const parsedType2 = this._getType(input);
11786
+ _parse(input2) {
11787
+ const parsedType2 = this._getType(input2);
11768
11788
  if (parsedType2 !== ZodParsedType.symbol) {
11769
- const ctx = this._getOrReturnCtx(input);
11789
+ const ctx = this._getOrReturnCtx(input2);
11770
11790
  addIssueToContext(ctx, {
11771
11791
  code: ZodIssueCode.invalid_type,
11772
11792
  expected: ZodParsedType.symbol,
@@ -11774,7 +11794,7 @@ var ZodSymbol = class extends ZodType {
11774
11794
  });
11775
11795
  return INVALID;
11776
11796
  }
11777
- return OK(input.data);
11797
+ return OK(input2.data);
11778
11798
  }
11779
11799
  };
11780
11800
  ZodSymbol.create = (params) => {
@@ -11784,10 +11804,10 @@ ZodSymbol.create = (params) => {
11784
11804
  });
11785
11805
  };
11786
11806
  var ZodUndefined = class extends ZodType {
11787
- _parse(input) {
11788
- const parsedType2 = this._getType(input);
11807
+ _parse(input2) {
11808
+ const parsedType2 = this._getType(input2);
11789
11809
  if (parsedType2 !== ZodParsedType.undefined) {
11790
- const ctx = this._getOrReturnCtx(input);
11810
+ const ctx = this._getOrReturnCtx(input2);
11791
11811
  addIssueToContext(ctx, {
11792
11812
  code: ZodIssueCode.invalid_type,
11793
11813
  expected: ZodParsedType.undefined,
@@ -11795,7 +11815,7 @@ var ZodUndefined = class extends ZodType {
11795
11815
  });
11796
11816
  return INVALID;
11797
11817
  }
11798
- return OK(input.data);
11818
+ return OK(input2.data);
11799
11819
  }
11800
11820
  };
11801
11821
  ZodUndefined.create = (params) => {
@@ -11805,10 +11825,10 @@ ZodUndefined.create = (params) => {
11805
11825
  });
11806
11826
  };
11807
11827
  var ZodNull = class extends ZodType {
11808
- _parse(input) {
11809
- const parsedType2 = this._getType(input);
11828
+ _parse(input2) {
11829
+ const parsedType2 = this._getType(input2);
11810
11830
  if (parsedType2 !== ZodParsedType.null) {
11811
- const ctx = this._getOrReturnCtx(input);
11831
+ const ctx = this._getOrReturnCtx(input2);
11812
11832
  addIssueToContext(ctx, {
11813
11833
  code: ZodIssueCode.invalid_type,
11814
11834
  expected: ZodParsedType.null,
@@ -11816,7 +11836,7 @@ var ZodNull = class extends ZodType {
11816
11836
  });
11817
11837
  return INVALID;
11818
11838
  }
11819
- return OK(input.data);
11839
+ return OK(input2.data);
11820
11840
  }
11821
11841
  };
11822
11842
  ZodNull.create = (params) => {
@@ -11830,8 +11850,8 @@ var ZodAny = class extends ZodType {
11830
11850
  super(...arguments);
11831
11851
  this._any = true;
11832
11852
  }
11833
- _parse(input) {
11834
- return OK(input.data);
11853
+ _parse(input2) {
11854
+ return OK(input2.data);
11835
11855
  }
11836
11856
  };
11837
11857
  ZodAny.create = (params) => {
@@ -11845,8 +11865,8 @@ var ZodUnknown = class extends ZodType {
11845
11865
  super(...arguments);
11846
11866
  this._unknown = true;
11847
11867
  }
11848
- _parse(input) {
11849
- return OK(input.data);
11868
+ _parse(input2) {
11869
+ return OK(input2.data);
11850
11870
  }
11851
11871
  };
11852
11872
  ZodUnknown.create = (params) => {
@@ -11856,8 +11876,8 @@ ZodUnknown.create = (params) => {
11856
11876
  });
11857
11877
  };
11858
11878
  var ZodNever = class extends ZodType {
11859
- _parse(input) {
11860
- const ctx = this._getOrReturnCtx(input);
11879
+ _parse(input2) {
11880
+ const ctx = this._getOrReturnCtx(input2);
11861
11881
  addIssueToContext(ctx, {
11862
11882
  code: ZodIssueCode.invalid_type,
11863
11883
  expected: ZodParsedType.never,
@@ -11873,10 +11893,10 @@ ZodNever.create = (params) => {
11873
11893
  });
11874
11894
  };
11875
11895
  var ZodVoid = class extends ZodType {
11876
- _parse(input) {
11877
- const parsedType2 = this._getType(input);
11896
+ _parse(input2) {
11897
+ const parsedType2 = this._getType(input2);
11878
11898
  if (parsedType2 !== ZodParsedType.undefined) {
11879
- const ctx = this._getOrReturnCtx(input);
11899
+ const ctx = this._getOrReturnCtx(input2);
11880
11900
  addIssueToContext(ctx, {
11881
11901
  code: ZodIssueCode.invalid_type,
11882
11902
  expected: ZodParsedType.void,
@@ -11884,7 +11904,7 @@ var ZodVoid = class extends ZodType {
11884
11904
  });
11885
11905
  return INVALID;
11886
11906
  }
11887
- return OK(input.data);
11907
+ return OK(input2.data);
11888
11908
  }
11889
11909
  };
11890
11910
  ZodVoid.create = (params) => {
@@ -11894,8 +11914,8 @@ ZodVoid.create = (params) => {
11894
11914
  });
11895
11915
  };
11896
11916
  var ZodArray = class _ZodArray extends ZodType {
11897
- _parse(input) {
11898
- const { ctx, status } = this._processInputParams(input);
11917
+ _parse(input2) {
11918
+ const { ctx, status } = this._processInputParams(input2);
11899
11919
  const def = this._def;
11900
11920
  if (ctx.parsedType !== ZodParsedType.array) {
11901
11921
  addIssueToContext(ctx, {
@@ -12035,10 +12055,10 @@ var ZodObject = class _ZodObject extends ZodType {
12035
12055
  this._cached = { shape, keys };
12036
12056
  return this._cached;
12037
12057
  }
12038
- _parse(input) {
12039
- const parsedType2 = this._getType(input);
12058
+ _parse(input2) {
12059
+ const parsedType2 = this._getType(input2);
12040
12060
  if (parsedType2 !== ZodParsedType.object) {
12041
- const ctx2 = this._getOrReturnCtx(input);
12061
+ const ctx2 = this._getOrReturnCtx(input2);
12042
12062
  addIssueToContext(ctx2, {
12043
12063
  code: ZodIssueCode.invalid_type,
12044
12064
  expected: ZodParsedType.object,
@@ -12046,7 +12066,7 @@ var ZodObject = class _ZodObject extends ZodType {
12046
12066
  });
12047
12067
  return INVALID;
12048
12068
  }
12049
- const { status, ctx } = this._processInputParams(input);
12069
+ const { status, ctx } = this._processInputParams(input2);
12050
12070
  const { shape, keys: shapeKeys } = this._getCached();
12051
12071
  const extraKeys = [];
12052
12072
  if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) {
@@ -12359,8 +12379,8 @@ ZodObject.lazycreate = (shape, params) => {
12359
12379
  });
12360
12380
  };
12361
12381
  var ZodUnion = class extends ZodType {
12362
- _parse(input) {
12363
- const { ctx } = this._processInputParams(input);
12382
+ _parse(input2) {
12383
+ const { ctx } = this._processInputParams(input2);
12364
12384
  const options = this._def.options;
12365
12385
  function handleResults(results) {
12366
12386
  for (const result of results) {
@@ -12481,8 +12501,8 @@ var getDiscriminator = (type) => {
12481
12501
  }
12482
12502
  };
12483
12503
  var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {
12484
- _parse(input) {
12485
- const { ctx } = this._processInputParams(input);
12504
+ _parse(input2) {
12505
+ const { ctx } = this._processInputParams(input2);
12486
12506
  if (ctx.parsedType !== ZodParsedType.object) {
12487
12507
  addIssueToContext(ctx, {
12488
12508
  code: ZodIssueCode.invalid_type,
@@ -12595,8 +12615,8 @@ function mergeValues(a, b) {
12595
12615
  }
12596
12616
  }
12597
12617
  var ZodIntersection = class extends ZodType {
12598
- _parse(input) {
12599
- const { status, ctx } = this._processInputParams(input);
12618
+ _parse(input2) {
12619
+ const { status, ctx } = this._processInputParams(input2);
12600
12620
  const handleParsed = (parsedLeft, parsedRight) => {
12601
12621
  if (isAborted(parsedLeft) || isAborted(parsedRight)) {
12602
12622
  return INVALID;
@@ -12648,8 +12668,8 @@ ZodIntersection.create = (left, right, params) => {
12648
12668
  });
12649
12669
  };
12650
12670
  var ZodTuple = class _ZodTuple extends ZodType {
12651
- _parse(input) {
12652
- const { status, ctx } = this._processInputParams(input);
12671
+ _parse(input2) {
12672
+ const { status, ctx } = this._processInputParams(input2);
12653
12673
  if (ctx.parsedType !== ZodParsedType.array) {
12654
12674
  addIssueToContext(ctx, {
12655
12675
  code: ZodIssueCode.invalid_type,
@@ -12721,8 +12741,8 @@ var ZodRecord = class _ZodRecord extends ZodType {
12721
12741
  get valueSchema() {
12722
12742
  return this._def.valueType;
12723
12743
  }
12724
- _parse(input) {
12725
- const { status, ctx } = this._processInputParams(input);
12744
+ _parse(input2) {
12745
+ const { status, ctx } = this._processInputParams(input2);
12726
12746
  if (ctx.parsedType !== ZodParsedType.object) {
12727
12747
  addIssueToContext(ctx, {
12728
12748
  code: ZodIssueCode.invalid_type,
@@ -12774,8 +12794,8 @@ var ZodMap = class extends ZodType {
12774
12794
  get valueSchema() {
12775
12795
  return this._def.valueType;
12776
12796
  }
12777
- _parse(input) {
12778
- const { status, ctx } = this._processInputParams(input);
12797
+ _parse(input2) {
12798
+ const { status, ctx } = this._processInputParams(input2);
12779
12799
  if (ctx.parsedType !== ZodParsedType.map) {
12780
12800
  addIssueToContext(ctx, {
12781
12801
  code: ZodIssueCode.invalid_type,
@@ -12834,8 +12854,8 @@ ZodMap.create = (keyType, valueType, params) => {
12834
12854
  });
12835
12855
  };
12836
12856
  var ZodSet = class _ZodSet extends ZodType {
12837
- _parse(input) {
12838
- const { status, ctx } = this._processInputParams(input);
12857
+ _parse(input2) {
12858
+ const { status, ctx } = this._processInputParams(input2);
12839
12859
  if (ctx.parsedType !== ZodParsedType.set) {
12840
12860
  addIssueToContext(ctx, {
12841
12861
  code: ZodIssueCode.invalid_type,
@@ -12923,8 +12943,8 @@ var ZodFunction = class _ZodFunction extends ZodType {
12923
12943
  super(...arguments);
12924
12944
  this.validate = this.implement;
12925
12945
  }
12926
- _parse(input) {
12927
- const { ctx } = this._processInputParams(input);
12946
+ _parse(input2) {
12947
+ const { ctx } = this._processInputParams(input2);
12928
12948
  if (ctx.parsedType !== ZodParsedType.function) {
12929
12949
  addIssueToContext(ctx, {
12930
12950
  code: ZodIssueCode.invalid_type,
@@ -13027,8 +13047,8 @@ var ZodLazy = class extends ZodType {
13027
13047
  get schema() {
13028
13048
  return this._def.getter();
13029
13049
  }
13030
- _parse(input) {
13031
- const { ctx } = this._processInputParams(input);
13050
+ _parse(input2) {
13051
+ const { ctx } = this._processInputParams(input2);
13032
13052
  const lazySchema = this._def.getter();
13033
13053
  return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });
13034
13054
  }
@@ -13041,9 +13061,9 @@ ZodLazy.create = (getter, params) => {
13041
13061
  });
13042
13062
  };
13043
13063
  var ZodLiteral = class extends ZodType {
13044
- _parse(input) {
13045
- if (input.data !== this._def.value) {
13046
- const ctx = this._getOrReturnCtx(input);
13064
+ _parse(input2) {
13065
+ if (input2.data !== this._def.value) {
13066
+ const ctx = this._getOrReturnCtx(input2);
13047
13067
  addIssueToContext(ctx, {
13048
13068
  received: ctx.data,
13049
13069
  code: ZodIssueCode.invalid_literal,
@@ -13051,7 +13071,7 @@ var ZodLiteral = class extends ZodType {
13051
13071
  });
13052
13072
  return INVALID;
13053
13073
  }
13054
- return { status: "valid", value: input.data };
13074
+ return { status: "valid", value: input2.data };
13055
13075
  }
13056
13076
  get value() {
13057
13077
  return this._def.value;
@@ -13072,9 +13092,9 @@ function createZodEnum(values, params) {
13072
13092
  });
13073
13093
  }
13074
13094
  var ZodEnum = class _ZodEnum extends ZodType {
13075
- _parse(input) {
13076
- if (typeof input.data !== "string") {
13077
- const ctx = this._getOrReturnCtx(input);
13095
+ _parse(input2) {
13096
+ if (typeof input2.data !== "string") {
13097
+ const ctx = this._getOrReturnCtx(input2);
13078
13098
  const expectedValues = this._def.values;
13079
13099
  addIssueToContext(ctx, {
13080
13100
  expected: util.joinValues(expectedValues),
@@ -13086,8 +13106,8 @@ var ZodEnum = class _ZodEnum extends ZodType {
13086
13106
  if (!this._cache) {
13087
13107
  this._cache = new Set(this._def.values);
13088
13108
  }
13089
- if (!this._cache.has(input.data)) {
13090
- const ctx = this._getOrReturnCtx(input);
13109
+ if (!this._cache.has(input2.data)) {
13110
+ const ctx = this._getOrReturnCtx(input2);
13091
13111
  const expectedValues = this._def.values;
13092
13112
  addIssueToContext(ctx, {
13093
13113
  received: ctx.data,
@@ -13096,7 +13116,7 @@ var ZodEnum = class _ZodEnum extends ZodType {
13096
13116
  });
13097
13117
  return INVALID;
13098
13118
  }
13099
- return OK(input.data);
13119
+ return OK(input2.data);
13100
13120
  }
13101
13121
  get options() {
13102
13122
  return this._def.values;
@@ -13137,9 +13157,9 @@ var ZodEnum = class _ZodEnum extends ZodType {
13137
13157
  };
13138
13158
  ZodEnum.create = createZodEnum;
13139
13159
  var ZodNativeEnum = class extends ZodType {
13140
- _parse(input) {
13160
+ _parse(input2) {
13141
13161
  const nativeEnumValues = util.getValidEnumValues(this._def.values);
13142
- const ctx = this._getOrReturnCtx(input);
13162
+ const ctx = this._getOrReturnCtx(input2);
13143
13163
  if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {
13144
13164
  const expectedValues = util.objectValues(nativeEnumValues);
13145
13165
  addIssueToContext(ctx, {
@@ -13152,7 +13172,7 @@ var ZodNativeEnum = class extends ZodType {
13152
13172
  if (!this._cache) {
13153
13173
  this._cache = new Set(util.getValidEnumValues(this._def.values));
13154
13174
  }
13155
- if (!this._cache.has(input.data)) {
13175
+ if (!this._cache.has(input2.data)) {
13156
13176
  const expectedValues = util.objectValues(nativeEnumValues);
13157
13177
  addIssueToContext(ctx, {
13158
13178
  received: ctx.data,
@@ -13161,7 +13181,7 @@ var ZodNativeEnum = class extends ZodType {
13161
13181
  });
13162
13182
  return INVALID;
13163
13183
  }
13164
- return OK(input.data);
13184
+ return OK(input2.data);
13165
13185
  }
13166
13186
  get enum() {
13167
13187
  return this._def.values;
@@ -13178,8 +13198,8 @@ var ZodPromise = class extends ZodType {
13178
13198
  unwrap() {
13179
13199
  return this._def.type;
13180
13200
  }
13181
- _parse(input) {
13182
- const { ctx } = this._processInputParams(input);
13201
+ _parse(input2) {
13202
+ const { ctx } = this._processInputParams(input2);
13183
13203
  if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
13184
13204
  addIssueToContext(ctx, {
13185
13205
  code: ZodIssueCode.invalid_type,
@@ -13211,8 +13231,8 @@ var ZodEffects = class extends ZodType {
13211
13231
  sourceType() {
13212
13232
  return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
13213
13233
  }
13214
- _parse(input) {
13215
- const { status, ctx } = this._processInputParams(input);
13234
+ _parse(input2) {
13235
+ const { status, ctx } = this._processInputParams(input2);
13216
13236
  const effect = this._def.effect || null;
13217
13237
  const checkCtx = {
13218
13238
  addIssue: (arg) => {
@@ -13344,12 +13364,12 @@ ZodEffects.createWithPreprocess = (preprocess2, schema, params) => {
13344
13364
  });
13345
13365
  };
13346
13366
  var ZodOptional = class extends ZodType {
13347
- _parse(input) {
13348
- const parsedType2 = this._getType(input);
13367
+ _parse(input2) {
13368
+ const parsedType2 = this._getType(input2);
13349
13369
  if (parsedType2 === ZodParsedType.undefined) {
13350
13370
  return OK(void 0);
13351
13371
  }
13352
- return this._def.innerType._parse(input);
13372
+ return this._def.innerType._parse(input2);
13353
13373
  }
13354
13374
  unwrap() {
13355
13375
  return this._def.innerType;
@@ -13363,12 +13383,12 @@ ZodOptional.create = (type, params) => {
13363
13383
  });
13364
13384
  };
13365
13385
  var ZodNullable = class extends ZodType {
13366
- _parse(input) {
13367
- const parsedType2 = this._getType(input);
13386
+ _parse(input2) {
13387
+ const parsedType2 = this._getType(input2);
13368
13388
  if (parsedType2 === ZodParsedType.null) {
13369
13389
  return OK(null);
13370
13390
  }
13371
- return this._def.innerType._parse(input);
13391
+ return this._def.innerType._parse(input2);
13372
13392
  }
13373
13393
  unwrap() {
13374
13394
  return this._def.innerType;
@@ -13382,8 +13402,8 @@ ZodNullable.create = (type, params) => {
13382
13402
  });
13383
13403
  };
13384
13404
  var ZodDefault = class extends ZodType {
13385
- _parse(input) {
13386
- const { ctx } = this._processInputParams(input);
13405
+ _parse(input2) {
13406
+ const { ctx } = this._processInputParams(input2);
13387
13407
  let data = ctx.data;
13388
13408
  if (ctx.parsedType === ZodParsedType.undefined) {
13389
13409
  data = this._def.defaultValue();
@@ -13407,8 +13427,8 @@ ZodDefault.create = (type, params) => {
13407
13427
  });
13408
13428
  };
13409
13429
  var ZodCatch = class extends ZodType {
13410
- _parse(input) {
13411
- const { ctx } = this._processInputParams(input);
13430
+ _parse(input2) {
13431
+ const { ctx } = this._processInputParams(input2);
13412
13432
  const newCtx = {
13413
13433
  ...ctx,
13414
13434
  common: {
@@ -13460,10 +13480,10 @@ ZodCatch.create = (type, params) => {
13460
13480
  });
13461
13481
  };
13462
13482
  var ZodNaN = class extends ZodType {
13463
- _parse(input) {
13464
- const parsedType2 = this._getType(input);
13483
+ _parse(input2) {
13484
+ const parsedType2 = this._getType(input2);
13465
13485
  if (parsedType2 !== ZodParsedType.nan) {
13466
- const ctx = this._getOrReturnCtx(input);
13486
+ const ctx = this._getOrReturnCtx(input2);
13467
13487
  addIssueToContext(ctx, {
13468
13488
  code: ZodIssueCode.invalid_type,
13469
13489
  expected: ZodParsedType.nan,
@@ -13471,7 +13491,7 @@ var ZodNaN = class extends ZodType {
13471
13491
  });
13472
13492
  return INVALID;
13473
13493
  }
13474
- return { status: "valid", value: input.data };
13494
+ return { status: "valid", value: input2.data };
13475
13495
  }
13476
13496
  };
13477
13497
  ZodNaN.create = (params) => {
@@ -13481,8 +13501,8 @@ ZodNaN.create = (params) => {
13481
13501
  });
13482
13502
  };
13483
13503
  var ZodBranded = class extends ZodType {
13484
- _parse(input) {
13485
- const { ctx } = this._processInputParams(input);
13504
+ _parse(input2) {
13505
+ const { ctx } = this._processInputParams(input2);
13486
13506
  const data = ctx.data;
13487
13507
  return this._def.type._parse({
13488
13508
  data,
@@ -13495,8 +13515,8 @@ var ZodBranded = class extends ZodType {
13495
13515
  }
13496
13516
  };
13497
13517
  var ZodPipeline = class _ZodPipeline extends ZodType {
13498
- _parse(input) {
13499
- const { status, ctx } = this._processInputParams(input);
13518
+ _parse(input2) {
13519
+ const { status, ctx } = this._processInputParams(input2);
13500
13520
  if (ctx.common.async) {
13501
13521
  const handleAsync = async () => {
13502
13522
  const inResult = await this._def.in._parseAsync({
@@ -13550,8 +13570,8 @@ var ZodPipeline = class _ZodPipeline extends ZodType {
13550
13570
  }
13551
13571
  };
13552
13572
  var ZodReadonly = class extends ZodType {
13553
- _parse(input) {
13554
- const result = this._def.innerType._parse(input);
13573
+ _parse(input2) {
13574
+ const result = this._def.innerType._parse(input2);
13555
13575
  const freeze = (data) => {
13556
13576
  if (isValid(data)) {
13557
13577
  data.value = Object.freeze(data.value);
@@ -14106,8 +14126,8 @@ function cached(getter) {
14106
14126
  }
14107
14127
  };
14108
14128
  }
14109
- function nullish(input) {
14110
- return input === null || input === void 0;
14129
+ function nullish(input2) {
14130
+ return input2 === null || input2 === void 0;
14111
14131
  }
14112
14132
  function cleanRegex(source) {
14113
14133
  const start = source.startsWith("^") ? 1 : 0;
@@ -14201,8 +14221,8 @@ function randomString(length = 10) {
14201
14221
  function esc(str) {
14202
14222
  return JSON.stringify(str);
14203
14223
  }
14204
- function slugify(input) {
14205
- return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
14224
+ function slugify(input2) {
14225
+ return input2.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
14206
14226
  }
14207
14227
  var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
14208
14228
  };
@@ -14584,19 +14604,19 @@ function finalizeIssue(iss, ctx, config2) {
14584
14604
  }
14585
14605
  return full;
14586
14606
  }
14587
- function getSizableOrigin(input) {
14588
- if (input instanceof Set)
14607
+ function getSizableOrigin(input2) {
14608
+ if (input2 instanceof Set)
14589
14609
  return "set";
14590
- if (input instanceof Map)
14610
+ if (input2 instanceof Map)
14591
14611
  return "map";
14592
- if (input instanceof File)
14612
+ if (input2 instanceof File)
14593
14613
  return "file";
14594
14614
  return "unknown";
14595
14615
  }
14596
- function getLengthableOrigin(input) {
14597
- if (Array.isArray(input))
14616
+ function getLengthableOrigin(input2) {
14617
+ if (Array.isArray(input2))
14598
14618
  return "array";
14599
- if (typeof input === "string")
14619
+ if (typeof input2 === "string")
14600
14620
  return "string";
14601
14621
  return "unknown";
14602
14622
  }
@@ -14622,12 +14642,12 @@ function parsedType(data) {
14622
14642
  return t;
14623
14643
  }
14624
14644
  function issue(...args) {
14625
- const [iss, input, inst] = args;
14645
+ const [iss, input2, inst] = args;
14626
14646
  if (typeof iss === "string") {
14627
14647
  return {
14628
14648
  message: iss,
14629
14649
  code: "custom",
14630
- input,
14650
+ input: input2,
14631
14651
  inst
14632
14652
  };
14633
14653
  }
@@ -15166,23 +15186,23 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
15166
15186
  bag.pattern = integer;
15167
15187
  });
15168
15188
  inst._zod.check = (payload) => {
15169
- const input = payload.value;
15189
+ const input2 = payload.value;
15170
15190
  if (isInt) {
15171
- if (!Number.isInteger(input)) {
15191
+ if (!Number.isInteger(input2)) {
15172
15192
  payload.issues.push({
15173
15193
  expected: origin,
15174
15194
  format: def.format,
15175
15195
  code: "invalid_type",
15176
15196
  continue: false,
15177
- input,
15197
+ input: input2,
15178
15198
  inst
15179
15199
  });
15180
15200
  return;
15181
15201
  }
15182
- if (!Number.isSafeInteger(input)) {
15183
- if (input > 0) {
15202
+ if (!Number.isSafeInteger(input2)) {
15203
+ if (input2 > 0) {
15184
15204
  payload.issues.push({
15185
- input,
15205
+ input: input2,
15186
15206
  code: "too_big",
15187
15207
  maximum: Number.MAX_SAFE_INTEGER,
15188
15208
  note: "Integers must be within the safe integer range.",
@@ -15193,7 +15213,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
15193
15213
  });
15194
15214
  } else {
15195
15215
  payload.issues.push({
15196
- input,
15216
+ input: input2,
15197
15217
  code: "too_small",
15198
15218
  minimum: Number.MIN_SAFE_INTEGER,
15199
15219
  note: "Integers must be within the safe integer range.",
@@ -15206,10 +15226,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
15206
15226
  return;
15207
15227
  }
15208
15228
  }
15209
- if (input < minimum) {
15229
+ if (input2 < minimum) {
15210
15230
  payload.issues.push({
15211
15231
  origin: "number",
15212
- input,
15232
+ input: input2,
15213
15233
  code: "too_small",
15214
15234
  minimum,
15215
15235
  inclusive: true,
@@ -15217,10 +15237,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
15217
15237
  continue: !def.abort
15218
15238
  });
15219
15239
  }
15220
- if (input > maximum) {
15240
+ if (input2 > maximum) {
15221
15241
  payload.issues.push({
15222
15242
  origin: "number",
15223
- input,
15243
+ input: input2,
15224
15244
  code: "too_big",
15225
15245
  maximum,
15226
15246
  inclusive: true,
@@ -15240,11 +15260,11 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
15240
15260
  bag.maximum = maximum;
15241
15261
  });
15242
15262
  inst._zod.check = (payload) => {
15243
- const input = payload.value;
15244
- if (input < minimum) {
15263
+ const input2 = payload.value;
15264
+ if (input2 < minimum) {
15245
15265
  payload.issues.push({
15246
15266
  origin: "bigint",
15247
- input,
15267
+ input: input2,
15248
15268
  code: "too_small",
15249
15269
  minimum,
15250
15270
  inclusive: true,
@@ -15252,10 +15272,10 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
15252
15272
  continue: !def.abort
15253
15273
  });
15254
15274
  }
15255
- if (input > maximum) {
15275
+ if (input2 > maximum) {
15256
15276
  payload.issues.push({
15257
15277
  origin: "bigint",
15258
- input,
15278
+ input: input2,
15259
15279
  code: "too_big",
15260
15280
  maximum,
15261
15281
  inclusive: true,
@@ -15278,16 +15298,16 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
15278
15298
  inst2._zod.bag.maximum = def.maximum;
15279
15299
  });
15280
15300
  inst._zod.check = (payload) => {
15281
- const input = payload.value;
15282
- const size = input.size;
15301
+ const input2 = payload.value;
15302
+ const size = input2.size;
15283
15303
  if (size <= def.maximum)
15284
15304
  return;
15285
15305
  payload.issues.push({
15286
- origin: getSizableOrigin(input),
15306
+ origin: getSizableOrigin(input2),
15287
15307
  code: "too_big",
15288
15308
  maximum: def.maximum,
15289
15309
  inclusive: true,
15290
- input,
15310
+ input: input2,
15291
15311
  inst,
15292
15312
  continue: !def.abort
15293
15313
  });
@@ -15306,16 +15326,16 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
15306
15326
  inst2._zod.bag.minimum = def.minimum;
15307
15327
  });
15308
15328
  inst._zod.check = (payload) => {
15309
- const input = payload.value;
15310
- const size = input.size;
15329
+ const input2 = payload.value;
15330
+ const size = input2.size;
15311
15331
  if (size >= def.minimum)
15312
15332
  return;
15313
15333
  payload.issues.push({
15314
- origin: getSizableOrigin(input),
15334
+ origin: getSizableOrigin(input2),
15315
15335
  code: "too_small",
15316
15336
  minimum: def.minimum,
15317
15337
  inclusive: true,
15318
- input,
15338
+ input: input2,
15319
15339
  inst,
15320
15340
  continue: !def.abort
15321
15341
  });
@@ -15335,13 +15355,13 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
15335
15355
  bag.size = def.size;
15336
15356
  });
15337
15357
  inst._zod.check = (payload) => {
15338
- const input = payload.value;
15339
- const size = input.size;
15358
+ const input2 = payload.value;
15359
+ const size = input2.size;
15340
15360
  if (size === def.size)
15341
15361
  return;
15342
15362
  const tooBig = size > def.size;
15343
15363
  payload.issues.push({
15344
- origin: getSizableOrigin(input),
15364
+ origin: getSizableOrigin(input2),
15345
15365
  ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
15346
15366
  inclusive: true,
15347
15367
  exact: true,
@@ -15364,17 +15384,17 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
15364
15384
  inst2._zod.bag.maximum = def.maximum;
15365
15385
  });
15366
15386
  inst._zod.check = (payload) => {
15367
- const input = payload.value;
15368
- const length = input.length;
15387
+ const input2 = payload.value;
15388
+ const length = input2.length;
15369
15389
  if (length <= def.maximum)
15370
15390
  return;
15371
- const origin = getLengthableOrigin(input);
15391
+ const origin = getLengthableOrigin(input2);
15372
15392
  payload.issues.push({
15373
15393
  origin,
15374
15394
  code: "too_big",
15375
15395
  maximum: def.maximum,
15376
15396
  inclusive: true,
15377
- input,
15397
+ input: input2,
15378
15398
  inst,
15379
15399
  continue: !def.abort
15380
15400
  });
@@ -15393,17 +15413,17 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
15393
15413
  inst2._zod.bag.minimum = def.minimum;
15394
15414
  });
15395
15415
  inst._zod.check = (payload) => {
15396
- const input = payload.value;
15397
- const length = input.length;
15416
+ const input2 = payload.value;
15417
+ const length = input2.length;
15398
15418
  if (length >= def.minimum)
15399
15419
  return;
15400
- const origin = getLengthableOrigin(input);
15420
+ const origin = getLengthableOrigin(input2);
15401
15421
  payload.issues.push({
15402
15422
  origin,
15403
15423
  code: "too_small",
15404
15424
  minimum: def.minimum,
15405
15425
  inclusive: true,
15406
- input,
15426
+ input: input2,
15407
15427
  inst,
15408
15428
  continue: !def.abort
15409
15429
  });
@@ -15423,11 +15443,11 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
15423
15443
  bag.length = def.length;
15424
15444
  });
15425
15445
  inst._zod.check = (payload) => {
15426
- const input = payload.value;
15427
- const length = input.length;
15446
+ const input2 = payload.value;
15447
+ const length = input2.length;
15428
15448
  if (length === def.length)
15429
15449
  return;
15430
- const origin = getLengthableOrigin(input);
15450
+ const origin = getLengthableOrigin(input2);
15431
15451
  const tooBig = length > def.length;
15432
15452
  payload.issues.push({
15433
15453
  origin,
@@ -16081,15 +16101,15 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
16081
16101
  payload.value = Number(payload.value);
16082
16102
  } catch (_) {
16083
16103
  }
16084
- const input = payload.value;
16085
- if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
16104
+ const input2 = payload.value;
16105
+ if (typeof input2 === "number" && !Number.isNaN(input2) && Number.isFinite(input2)) {
16086
16106
  return payload;
16087
16107
  }
16088
- const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
16108
+ const received = typeof input2 === "number" ? Number.isNaN(input2) ? "NaN" : !Number.isFinite(input2) ? "Infinity" : void 0 : void 0;
16089
16109
  payload.issues.push({
16090
16110
  expected: "number",
16091
16111
  code: "invalid_type",
16092
- input,
16112
+ input: input2,
16093
16113
  inst,
16094
16114
  ...received ? { received } : {}
16095
16115
  });
@@ -16109,13 +16129,13 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
16109
16129
  payload.value = Boolean(payload.value);
16110
16130
  } catch (_) {
16111
16131
  }
16112
- const input = payload.value;
16113
- if (typeof input === "boolean")
16132
+ const input2 = payload.value;
16133
+ if (typeof input2 === "boolean")
16114
16134
  return payload;
16115
16135
  payload.issues.push({
16116
16136
  expected: "boolean",
16117
16137
  code: "invalid_type",
16118
- input,
16138
+ input: input2,
16119
16139
  inst
16120
16140
  });
16121
16141
  return payload;
@@ -16148,13 +16168,13 @@ var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, d
16148
16168
  var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
16149
16169
  $ZodType.init(inst, def);
16150
16170
  inst._zod.parse = (payload, _ctx) => {
16151
- const input = payload.value;
16152
- if (typeof input === "symbol")
16171
+ const input2 = payload.value;
16172
+ if (typeof input2 === "symbol")
16153
16173
  return payload;
16154
16174
  payload.issues.push({
16155
16175
  expected: "symbol",
16156
16176
  code: "invalid_type",
16157
- input,
16177
+ input: input2,
16158
16178
  inst
16159
16179
  });
16160
16180
  return payload;
@@ -16167,13 +16187,13 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
16167
16187
  inst._zod.optin = "optional";
16168
16188
  inst._zod.optout = "optional";
16169
16189
  inst._zod.parse = (payload, _ctx) => {
16170
- const input = payload.value;
16171
- if (typeof input === "undefined")
16190
+ const input2 = payload.value;
16191
+ if (typeof input2 === "undefined")
16172
16192
  return payload;
16173
16193
  payload.issues.push({
16174
16194
  expected: "undefined",
16175
16195
  code: "invalid_type",
16176
- input,
16196
+ input: input2,
16177
16197
  inst
16178
16198
  });
16179
16199
  return payload;
@@ -16184,13 +16204,13 @@ var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
16184
16204
  inst._zod.pattern = _null;
16185
16205
  inst._zod.values = /* @__PURE__ */ new Set([null]);
16186
16206
  inst._zod.parse = (payload, _ctx) => {
16187
- const input = payload.value;
16188
- if (input === null)
16207
+ const input2 = payload.value;
16208
+ if (input2 === null)
16189
16209
  return payload;
16190
16210
  payload.issues.push({
16191
16211
  expected: "null",
16192
16212
  code: "invalid_type",
16193
- input,
16213
+ input: input2,
16194
16214
  inst
16195
16215
  });
16196
16216
  return payload;
@@ -16219,13 +16239,13 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
16219
16239
  var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
16220
16240
  $ZodType.init(inst, def);
16221
16241
  inst._zod.parse = (payload, _ctx) => {
16222
- const input = payload.value;
16223
- if (typeof input === "undefined")
16242
+ const input2 = payload.value;
16243
+ if (typeof input2 === "undefined")
16224
16244
  return payload;
16225
16245
  payload.issues.push({
16226
16246
  expected: "void",
16227
16247
  code: "invalid_type",
16228
- input,
16248
+ input: input2,
16229
16249
  inst
16230
16250
  });
16231
16251
  return payload;
@@ -16240,15 +16260,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
16240
16260
  } catch (_err) {
16241
16261
  }
16242
16262
  }
16243
- const input = payload.value;
16244
- const isDate = input instanceof Date;
16245
- const isValidDate = isDate && !Number.isNaN(input.getTime());
16263
+ const input2 = payload.value;
16264
+ const isDate = input2 instanceof Date;
16265
+ const isValidDate = isDate && !Number.isNaN(input2.getTime());
16246
16266
  if (isValidDate)
16247
16267
  return payload;
16248
16268
  payload.issues.push({
16249
16269
  expected: "date",
16250
16270
  code: "invalid_type",
16251
- input,
16271
+ input: input2,
16252
16272
  ...isDate ? { received: "Invalid Date" } : {},
16253
16273
  inst
16254
16274
  });
@@ -16264,20 +16284,20 @@ function handleArrayResult(result, final, index) {
16264
16284
  var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
16265
16285
  $ZodType.init(inst, def);
16266
16286
  inst._zod.parse = (payload, ctx) => {
16267
- const input = payload.value;
16268
- if (!Array.isArray(input)) {
16287
+ const input2 = payload.value;
16288
+ if (!Array.isArray(input2)) {
16269
16289
  payload.issues.push({
16270
16290
  expected: "array",
16271
16291
  code: "invalid_type",
16272
- input,
16292
+ input: input2,
16273
16293
  inst
16274
16294
  });
16275
16295
  return payload;
16276
16296
  }
16277
- payload.value = Array(input.length);
16297
+ payload.value = Array(input2.length);
16278
16298
  const proms = [];
16279
- for (let i = 0; i < input.length; i++) {
16280
- const item = input[i];
16299
+ for (let i = 0; i < input2.length; i++) {
16300
+ const item = input2[i];
16281
16301
  const result = def.element._zod.run({
16282
16302
  value: item,
16283
16303
  issues: []
@@ -16294,15 +16314,15 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
16294
16314
  return payload;
16295
16315
  };
16296
16316
  });
16297
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
16317
+ function handlePropertyResult(result, final, key, input2, isOptionalOut) {
16298
16318
  if (result.issues.length) {
16299
- if (isOptionalOut && !(key in input)) {
16319
+ if (isOptionalOut && !(key in input2)) {
16300
16320
  return;
16301
16321
  }
16302
16322
  final.issues.push(...prefixIssues(key, result.issues));
16303
16323
  }
16304
16324
  if (result.value === void 0) {
16305
- if (key in input) {
16325
+ if (key in input2) {
16306
16326
  final.value[key] = void 0;
16307
16327
  }
16308
16328
  } else {
@@ -16325,31 +16345,31 @@ function normalizeDef(def) {
16325
16345
  optionalKeys: new Set(okeys)
16326
16346
  };
16327
16347
  }
16328
- function handleCatchall(proms, input, payload, ctx, def, inst) {
16348
+ function handleCatchall(proms, input2, payload, ctx, def, inst) {
16329
16349
  const unrecognized = [];
16330
16350
  const keySet = def.keySet;
16331
16351
  const _catchall = def.catchall._zod;
16332
16352
  const t = _catchall.def.type;
16333
16353
  const isOptionalOut = _catchall.optout === "optional";
16334
- for (const key in input) {
16354
+ for (const key in input2) {
16335
16355
  if (keySet.has(key))
16336
16356
  continue;
16337
16357
  if (t === "never") {
16338
16358
  unrecognized.push(key);
16339
16359
  continue;
16340
16360
  }
16341
- const r = _catchall.run({ value: input[key], issues: [] }, ctx);
16361
+ const r = _catchall.run({ value: input2[key], issues: [] }, ctx);
16342
16362
  if (r instanceof Promise) {
16343
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
16363
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalOut)));
16344
16364
  } else {
16345
- handlePropertyResult(r, payload, key, input, isOptionalOut);
16365
+ handlePropertyResult(r, payload, key, input2, isOptionalOut);
16346
16366
  }
16347
16367
  }
16348
16368
  if (unrecognized.length) {
16349
16369
  payload.issues.push({
16350
16370
  code: "unrecognized_keys",
16351
16371
  keys: unrecognized,
16352
- input,
16372
+ input: input2,
16353
16373
  inst
16354
16374
  });
16355
16375
  }
@@ -16393,12 +16413,12 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
16393
16413
  let value;
16394
16414
  inst._zod.parse = (payload, ctx) => {
16395
16415
  value ?? (value = _normalized.value);
16396
- const input = payload.value;
16397
- if (!isObject2(input)) {
16416
+ const input2 = payload.value;
16417
+ if (!isObject2(input2)) {
16398
16418
  payload.issues.push({
16399
16419
  expected: "object",
16400
16420
  code: "invalid_type",
16401
- input,
16421
+ input: input2,
16402
16422
  inst
16403
16423
  });
16404
16424
  return payload;
@@ -16409,17 +16429,17 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
16409
16429
  for (const key of value.keys) {
16410
16430
  const el = shape[key];
16411
16431
  const isOptionalOut = el._zod.optout === "optional";
16412
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
16432
+ const r = el._zod.run({ value: input2[key], issues: [] }, ctx);
16413
16433
  if (r instanceof Promise) {
16414
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
16434
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalOut)));
16415
16435
  } else {
16416
- handlePropertyResult(r, payload, key, input, isOptionalOut);
16436
+ handlePropertyResult(r, payload, key, input2, isOptionalOut);
16417
16437
  }
16418
16438
  }
16419
16439
  if (!catchall) {
16420
16440
  return proms.length ? Promise.all(proms).then(() => payload) : payload;
16421
16441
  }
16422
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
16442
+ return handleCatchall(proms, input2, payload, ctx, _normalized.value, inst);
16423
16443
  };
16424
16444
  });
16425
16445
  var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
@@ -16500,12 +16520,12 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
16500
16520
  let value;
16501
16521
  inst._zod.parse = (payload, ctx) => {
16502
16522
  value ?? (value = _normalized.value);
16503
- const input = payload.value;
16504
- if (!isObject2(input)) {
16523
+ const input2 = payload.value;
16524
+ if (!isObject2(input2)) {
16505
16525
  payload.issues.push({
16506
16526
  expected: "object",
16507
16527
  code: "invalid_type",
16508
- input,
16528
+ input: input2,
16509
16529
  inst
16510
16530
  });
16511
16531
  return payload;
@@ -16516,7 +16536,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
16516
16536
  payload = fastpass(payload, ctx);
16517
16537
  if (!catchall)
16518
16538
  return payload;
16519
- return handleCatchall([], input, payload, ctx, value, inst);
16539
+ return handleCatchall([], input2, payload, ctx, value, inst);
16520
16540
  }
16521
16541
  return superParse(payload, ctx);
16522
16542
  };
@@ -16678,17 +16698,17 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
16678
16698
  return map2;
16679
16699
  });
16680
16700
  inst._zod.parse = (payload, ctx) => {
16681
- const input = payload.value;
16682
- if (!isObject(input)) {
16701
+ const input2 = payload.value;
16702
+ if (!isObject(input2)) {
16683
16703
  payload.issues.push({
16684
16704
  code: "invalid_type",
16685
16705
  expected: "object",
16686
- input,
16706
+ input: input2,
16687
16707
  inst
16688
16708
  });
16689
16709
  return payload;
16690
16710
  }
16691
- const opt = disc.value.get(input?.[def.discriminator]);
16711
+ const opt = disc.value.get(input2?.[def.discriminator]);
16692
16712
  if (opt) {
16693
16713
  return opt._zod.run(payload, ctx);
16694
16714
  }
@@ -16700,7 +16720,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
16700
16720
  errors: [],
16701
16721
  note: "No matching discriminator",
16702
16722
  discriminator: def.discriminator,
16703
- input,
16723
+ input: input2,
16704
16724
  path: [def.discriminator],
16705
16725
  inst
16706
16726
  });
@@ -16710,9 +16730,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
16710
16730
  var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
16711
16731
  $ZodType.init(inst, def);
16712
16732
  inst._zod.parse = (payload, ctx) => {
16713
- const input = payload.value;
16714
- const left = def.left._zod.run({ value: input, issues: [] }, ctx);
16715
- const right = def.right._zod.run({ value: input, issues: [] }, ctx);
16733
+ const input2 = payload.value;
16734
+ const left = def.left._zod.run({ value: input2, issues: [] }, ctx);
16735
+ const right = def.right._zod.run({ value: input2, issues: [] }, ctx);
16716
16736
  const async = left instanceof Promise || right instanceof Promise;
16717
16737
  if (async) {
16718
16738
  return Promise.all([left, right]).then(([left2, right2]) => {
@@ -16809,10 +16829,10 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16809
16829
  $ZodType.init(inst, def);
16810
16830
  const items = def.items;
16811
16831
  inst._zod.parse = (payload, ctx) => {
16812
- const input = payload.value;
16813
- if (!Array.isArray(input)) {
16832
+ const input2 = payload.value;
16833
+ if (!Array.isArray(input2)) {
16814
16834
  payload.issues.push({
16815
- input,
16835
+ input: input2,
16816
16836
  inst,
16817
16837
  expected: "tuple",
16818
16838
  code: "invalid_type"
@@ -16824,12 +16844,12 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16824
16844
  const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
16825
16845
  const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
16826
16846
  if (!def.rest) {
16827
- const tooBig = input.length > items.length;
16828
- const tooSmall = input.length < optStart - 1;
16847
+ const tooBig = input2.length > items.length;
16848
+ const tooSmall = input2.length < optStart - 1;
16829
16849
  if (tooBig || tooSmall) {
16830
16850
  payload.issues.push({
16831
16851
  ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
16832
- input,
16852
+ input: input2,
16833
16853
  inst,
16834
16854
  origin: "array"
16835
16855
  });
@@ -16839,12 +16859,12 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16839
16859
  let i = -1;
16840
16860
  for (const item of items) {
16841
16861
  i++;
16842
- if (i >= input.length) {
16862
+ if (i >= input2.length) {
16843
16863
  if (i >= optStart)
16844
16864
  continue;
16845
16865
  }
16846
16866
  const result = item._zod.run({
16847
- value: input[i],
16867
+ value: input2[i],
16848
16868
  issues: []
16849
16869
  }, ctx);
16850
16870
  if (result instanceof Promise) {
@@ -16854,7 +16874,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16854
16874
  }
16855
16875
  }
16856
16876
  if (def.rest) {
16857
- const rest = input.slice(items.length);
16877
+ const rest = input2.slice(items.length);
16858
16878
  for (const el of rest) {
16859
16879
  i++;
16860
16880
  const result = def.rest._zod.run({
@@ -16882,12 +16902,12 @@ function handleTupleResult(result, final, index) {
16882
16902
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16883
16903
  $ZodType.init(inst, def);
16884
16904
  inst._zod.parse = (payload, ctx) => {
16885
- const input = payload.value;
16886
- if (!isPlainObject(input)) {
16905
+ const input2 = payload.value;
16906
+ if (!isPlainObject(input2)) {
16887
16907
  payload.issues.push({
16888
16908
  expected: "record",
16889
16909
  code: "invalid_type",
16890
- input,
16910
+ input: input2,
16891
16911
  inst
16892
16912
  });
16893
16913
  return payload;
@@ -16900,7 +16920,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16900
16920
  for (const key of values) {
16901
16921
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
16902
16922
  recordKeys.add(typeof key === "number" ? key.toString() : key);
16903
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
16923
+ const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
16904
16924
  if (result instanceof Promise) {
16905
16925
  proms.push(result.then((result2) => {
16906
16926
  if (result2.issues.length) {
@@ -16917,7 +16937,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16917
16937
  }
16918
16938
  }
16919
16939
  let unrecognized;
16920
- for (const key in input) {
16940
+ for (const key in input2) {
16921
16941
  if (!recordKeys.has(key)) {
16922
16942
  unrecognized = unrecognized ?? [];
16923
16943
  unrecognized.push(key);
@@ -16926,14 +16946,14 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16926
16946
  if (unrecognized && unrecognized.length > 0) {
16927
16947
  payload.issues.push({
16928
16948
  code: "unrecognized_keys",
16929
- input,
16949
+ input: input2,
16930
16950
  inst,
16931
16951
  keys: unrecognized
16932
16952
  });
16933
16953
  }
16934
16954
  } else {
16935
16955
  payload.value = {};
16936
- for (const key of Reflect.ownKeys(input)) {
16956
+ for (const key of Reflect.ownKeys(input2)) {
16937
16957
  if (key === "__proto__")
16938
16958
  continue;
16939
16959
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
@@ -16952,7 +16972,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16952
16972
  }
16953
16973
  if (keyResult.issues.length) {
16954
16974
  if (def.mode === "loose") {
16955
- payload.value[key] = input[key];
16975
+ payload.value[key] = input2[key];
16956
16976
  } else {
16957
16977
  payload.issues.push({
16958
16978
  code: "invalid_key",
@@ -16965,7 +16985,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16965
16985
  }
16966
16986
  continue;
16967
16987
  }
16968
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
16988
+ const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
16969
16989
  if (result instanceof Promise) {
16970
16990
  proms.push(result.then((result2) => {
16971
16991
  if (result2.issues.length) {
@@ -16990,27 +17010,27 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16990
17010
  var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
16991
17011
  $ZodType.init(inst, def);
16992
17012
  inst._zod.parse = (payload, ctx) => {
16993
- const input = payload.value;
16994
- if (!(input instanceof Map)) {
17013
+ const input2 = payload.value;
17014
+ if (!(input2 instanceof Map)) {
16995
17015
  payload.issues.push({
16996
17016
  expected: "map",
16997
17017
  code: "invalid_type",
16998
- input,
17018
+ input: input2,
16999
17019
  inst
17000
17020
  });
17001
17021
  return payload;
17002
17022
  }
17003
17023
  const proms = [];
17004
17024
  payload.value = /* @__PURE__ */ new Map();
17005
- for (const [key, value] of input) {
17025
+ for (const [key, value] of input2) {
17006
17026
  const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
17007
17027
  const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
17008
17028
  if (keyResult instanceof Promise || valueResult instanceof Promise) {
17009
17029
  proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
17010
- handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx);
17030
+ handleMapResult(keyResult2, valueResult2, payload, key, input2, inst, ctx);
17011
17031
  }));
17012
17032
  } else {
17013
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
17033
+ handleMapResult(keyResult, valueResult, payload, key, input2, inst, ctx);
17014
17034
  }
17015
17035
  }
17016
17036
  if (proms.length)
@@ -17018,7 +17038,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
17018
17038
  return payload;
17019
17039
  };
17020
17040
  });
17021
- function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
17041
+ function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
17022
17042
  if (keyResult.issues.length) {
17023
17043
  if (propertyKeyTypes.has(typeof key)) {
17024
17044
  final.issues.push(...prefixIssues(key, keyResult.issues));
@@ -17026,7 +17046,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
17026
17046
  final.issues.push({
17027
17047
  code: "invalid_key",
17028
17048
  origin: "map",
17029
- input,
17049
+ input: input2,
17030
17050
  inst,
17031
17051
  issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
17032
17052
  });
@@ -17039,7 +17059,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
17039
17059
  final.issues.push({
17040
17060
  origin: "map",
17041
17061
  code: "invalid_element",
17042
- input,
17062
+ input: input2,
17043
17063
  inst,
17044
17064
  key,
17045
17065
  issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
@@ -17051,10 +17071,10 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
17051
17071
  var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
17052
17072
  $ZodType.init(inst, def);
17053
17073
  inst._zod.parse = (payload, ctx) => {
17054
- const input = payload.value;
17055
- if (!(input instanceof Set)) {
17074
+ const input2 = payload.value;
17075
+ if (!(input2 instanceof Set)) {
17056
17076
  payload.issues.push({
17057
- input,
17077
+ input: input2,
17058
17078
  inst,
17059
17079
  expected: "set",
17060
17080
  code: "invalid_type"
@@ -17063,7 +17083,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
17063
17083
  }
17064
17084
  const proms = [];
17065
17085
  payload.value = /* @__PURE__ */ new Set();
17066
- for (const item of input) {
17086
+ for (const item of input2) {
17067
17087
  const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
17068
17088
  if (result instanceof Promise) {
17069
17089
  proms.push(result.then((result2) => handleSetResult(result2, payload)));
@@ -17088,14 +17108,14 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
17088
17108
  inst._zod.values = valuesSet;
17089
17109
  inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
17090
17110
  inst._zod.parse = (payload, _ctx) => {
17091
- const input = payload.value;
17092
- if (valuesSet.has(input)) {
17111
+ const input2 = payload.value;
17112
+ if (valuesSet.has(input2)) {
17093
17113
  return payload;
17094
17114
  }
17095
17115
  payload.issues.push({
17096
17116
  code: "invalid_value",
17097
17117
  values,
17098
- input,
17118
+ input: input2,
17099
17119
  inst
17100
17120
  });
17101
17121
  return payload;
@@ -17110,14 +17130,14 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
17110
17130
  inst._zod.values = values;
17111
17131
  inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
17112
17132
  inst._zod.parse = (payload, _ctx) => {
17113
- const input = payload.value;
17114
- if (values.has(input)) {
17133
+ const input2 = payload.value;
17134
+ if (values.has(input2)) {
17115
17135
  return payload;
17116
17136
  }
17117
17137
  payload.issues.push({
17118
17138
  code: "invalid_value",
17119
17139
  values: def.values,
17120
- input,
17140
+ input: input2,
17121
17141
  inst
17122
17142
  });
17123
17143
  return payload;
@@ -17126,13 +17146,13 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
17126
17146
  var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
17127
17147
  $ZodType.init(inst, def);
17128
17148
  inst._zod.parse = (payload, _ctx) => {
17129
- const input = payload.value;
17130
- if (input instanceof File)
17149
+ const input2 = payload.value;
17150
+ if (input2 instanceof File)
17131
17151
  return payload;
17132
17152
  payload.issues.push({
17133
17153
  expected: "file",
17134
17154
  code: "invalid_type",
17135
- input,
17155
+ input: input2,
17136
17156
  inst
17137
17157
  });
17138
17158
  return payload;
@@ -17146,9 +17166,9 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
17146
17166
  }
17147
17167
  const _out = def.transform(payload.value, payload);
17148
17168
  if (ctx.async) {
17149
- const output = _out instanceof Promise ? _out : Promise.resolve(_out);
17150
- return output.then((output2) => {
17151
- payload.value = output2;
17169
+ const output2 = _out instanceof Promise ? _out : Promise.resolve(_out);
17170
+ return output2.then((output3) => {
17171
+ payload.value = output3;
17152
17172
  return payload;
17153
17173
  });
17154
17174
  }
@@ -17159,8 +17179,8 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
17159
17179
  return payload;
17160
17180
  };
17161
17181
  });
17162
- function handleOptionalResult(result, input) {
17163
- if (result.issues.length && input === void 0) {
17182
+ function handleOptionalResult(result, input2) {
17183
+ if (result.issues.length && input2 === void 0) {
17164
17184
  return { issues: [], value: void 0 };
17165
17185
  }
17166
17186
  return result;
@@ -17561,12 +17581,12 @@ var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
17561
17581
  output: inst._def.output
17562
17582
  });
17563
17583
  };
17564
- inst.output = (output) => {
17584
+ inst.output = (output2) => {
17565
17585
  const F = inst.constructor;
17566
17586
  return new F({
17567
17587
  type: "function",
17568
17588
  input: inst._def.input,
17569
- output
17589
+ output: output2
17570
17590
  });
17571
17591
  };
17572
17592
  return inst;
@@ -17596,20 +17616,20 @@ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
17596
17616
  return payload;
17597
17617
  };
17598
17618
  inst._zod.check = (payload) => {
17599
- const input = payload.value;
17600
- const r = def.fn(input);
17619
+ const input2 = payload.value;
17620
+ const r = def.fn(input2);
17601
17621
  if (r instanceof Promise) {
17602
- return r.then((r2) => handleRefineResult(r2, payload, input, inst));
17622
+ return r.then((r2) => handleRefineResult(r2, payload, input2, inst));
17603
17623
  }
17604
- handleRefineResult(r, payload, input, inst);
17624
+ handleRefineResult(r, payload, input2, inst);
17605
17625
  return;
17606
17626
  };
17607
17627
  });
17608
- function handleRefineResult(result, payload, input, inst) {
17628
+ function handleRefineResult(result, payload, input2, inst) {
17609
17629
  if (!result) {
17610
17630
  const _iss = {
17611
17631
  code: "custom",
17612
- input,
17632
+ input: input2,
17613
17633
  inst,
17614
17634
  // incorporates params.error into issue reporting
17615
17635
  path: [...inst._zod.def.path ?? []],
@@ -23919,23 +23939,23 @@ function _overwrite(tx) {
23919
23939
  }
23920
23940
  // @__NO_SIDE_EFFECTS__
23921
23941
  function _normalize(form) {
23922
- return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
23942
+ return /* @__PURE__ */ _overwrite((input2) => input2.normalize(form));
23923
23943
  }
23924
23944
  // @__NO_SIDE_EFFECTS__
23925
23945
  function _trim() {
23926
- return /* @__PURE__ */ _overwrite((input) => input.trim());
23946
+ return /* @__PURE__ */ _overwrite((input2) => input2.trim());
23927
23947
  }
23928
23948
  // @__NO_SIDE_EFFECTS__
23929
23949
  function _toLowerCase() {
23930
- return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
23950
+ return /* @__PURE__ */ _overwrite((input2) => input2.toLowerCase());
23931
23951
  }
23932
23952
  // @__NO_SIDE_EFFECTS__
23933
23953
  function _toUpperCase() {
23934
- return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
23954
+ return /* @__PURE__ */ _overwrite((input2) => input2.toUpperCase());
23935
23955
  }
23936
23956
  // @__NO_SIDE_EFFECTS__
23937
23957
  function _slugify() {
23938
- return /* @__PURE__ */ _overwrite((input) => slugify(input));
23958
+ return /* @__PURE__ */ _overwrite((input2) => slugify(input2));
23939
23959
  }
23940
23960
  // @__NO_SIDE_EFFECTS__
23941
23961
  function _array(Class2, element, params) {
@@ -24240,8 +24260,8 @@ function _stringbool(Classes, _params) {
24240
24260
  type: "pipe",
24241
24261
  in: stringSchema,
24242
24262
  out: booleanSchema,
24243
- transform: ((input, payload) => {
24244
- let data = input;
24263
+ transform: ((input2, payload) => {
24264
+ let data = input2;
24245
24265
  if (params.case !== "sensitive")
24246
24266
  data = data.toLowerCase();
24247
24267
  if (truthySet.has(data)) {
@@ -24260,8 +24280,8 @@ function _stringbool(Classes, _params) {
24260
24280
  return {};
24261
24281
  }
24262
24282
  }),
24263
- reverseTransform: ((input, _payload) => {
24264
- if (input === true) {
24283
+ reverseTransform: ((input2, _payload) => {
24284
+ if (input2 === true) {
24265
24285
  return truthyArray[0] || "true";
24266
24286
  } else {
24267
24287
  return falsyArray[0] || "false";
@@ -25157,9 +25177,9 @@ var allProcessors = {
25157
25177
  optional: optionalProcessor,
25158
25178
  lazy: lazyProcessor
25159
25179
  };
25160
- function toJSONSchema(input, params) {
25161
- if ("_idmap" in input) {
25162
- const registry2 = input;
25180
+ function toJSONSchema(input2, params) {
25181
+ if ("_idmap" in input2) {
25182
+ const registry2 = input2;
25163
25183
  const ctx2 = initializeContext({ ...params, processors: allProcessors });
25164
25184
  const defs = {};
25165
25185
  for (const entry of registry2._idmap.entries()) {
@@ -25187,9 +25207,9 @@ function toJSONSchema(input, params) {
25187
25207
  return { schemas };
25188
25208
  }
25189
25209
  const ctx = initializeContext({ ...params, processors: allProcessors });
25190
- process2(input, ctx);
25191
- extractDefs(ctx, input);
25192
- return finalize(ctx, input);
25210
+ process2(input2, ctx);
25211
+ extractDefs(ctx, input2);
25212
+ return finalize(ctx, input2);
25193
25213
  }
25194
25214
 
25195
25215
  // node_modules/zod/v4/core/json-schema-generator.js
@@ -26793,14 +26813,14 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
26793
26813
  payload.issues.push(util_exports.issue(_issue));
26794
26814
  }
26795
26815
  };
26796
- const output = def.transform(payload.value, payload);
26797
- if (output instanceof Promise) {
26798
- return output.then((output2) => {
26799
- payload.value = output2;
26816
+ const output2 = def.transform(payload.value, payload);
26817
+ if (output2 instanceof Promise) {
26818
+ return output2.then((output3) => {
26819
+ payload.value = output3;
26800
26820
  return payload;
26801
26821
  });
26802
26822
  }
26803
- payload.value = output;
26823
+ payload.value = output2;
26804
26824
  return payload;
26805
26825
  };
26806
26826
  });
@@ -31450,12 +31470,12 @@ var AjvJsonSchemaValidator = class {
31450
31470
  */
31451
31471
  getValidator(schema) {
31452
31472
  const ajvValidator = "$id" in schema && typeof schema.$id === "string" ? this._ajv.getSchema(schema.$id) ?? this._ajv.compile(schema) : this._ajv.compile(schema);
31453
- return (input) => {
31454
- const valid = ajvValidator(input);
31473
+ return (input2) => {
31474
+ const valid = ajvValidator(input2);
31455
31475
  if (valid) {
31456
31476
  return {
31457
31477
  valid: true,
31458
- data: input,
31478
+ data: input2,
31459
31479
  errorMessage: void 0
31460
31480
  };
31461
31481
  } else {