From afc1aa4c1b80c48ebc64d797174ee89c6e554a4d Mon Sep 17 00:00:00 2001 From: David Blass Date: Thu, 13 Nov 2025 15:27:16 -0500 Subject: [PATCH] continuuu --- agents/codex.ts | 131 +- agents/instructions.ts | 19 +- entry.js | 167 +- mcp-server.js | 12674 ++++++++++++++++++++----------------- workflows.ts => modes.ts | 30 +- utils/api.ts | 16 +- 6 files changed, 6931 insertions(+), 6106 deletions(-) rename workflows.ts => modes.ts (72%) diff --git a/agents/codex.ts b/agents/codex.ts index 0c7662a..3e4a4cf 100644 --- a/agents/codex.ts +++ b/agents/codex.ts @@ -47,9 +47,10 @@ export const codex = agent({ // Stream events and handle them let finalOutput = ""; for await (const event of streamedTurn.events) { - const handler = messageHandlers[event.type as keyof typeof messageHandlers]; + const handler = messageHandlers[event.type]; + console.log(JSON.stringify(event, null, 2)); if (handler) { - await handler(event); + handler(event as never); } // Capture final response from agent messages @@ -77,94 +78,86 @@ export const codex = agent({ // Track command execution IDs to identify when command results come back const commandExecutionIds = new Set(); -type ThreadEventHandler = (event: ThreadEvent) => void | Promise; +type ThreadEventHandler = ( + event: Extract +) => void; -const messageHandlers: Partial> = { - "thread.started": (event) => { - if (event.type === "thread.started") { - log.info(`Thread started: ${event.thread_id}`); - } +const messageHandlers: { + [type in ThreadEvent["type"]]: ThreadEventHandler; +} = { + "thread.started": () => { + // No logging needed }, "turn.started": () => { - log.info("Turn started"); + // No logging needed }, "turn.completed": async (event) => { - if (event.type === "turn.completed") { - await log.summaryTable([ - [ - { data: "Input Tokens", header: true }, - { data: "Cached Input Tokens", header: true }, - { data: "Output Tokens", header: true }, - ], - [ - String(event.usage.input_tokens || 0), - String(event.usage.cached_input_tokens || 0), - String(event.usage.output_tokens || 0), - ], - ]); - } + await log.summaryTable([ + [ + { data: "Input Tokens", header: true }, + { data: "Cached Input Tokens", header: true }, + { data: "Output Tokens", header: true }, + ], + [ + String(event.usage.input_tokens || 0), + String(event.usage.cached_input_tokens || 0), + String(event.usage.output_tokens || 0), + ], + ]); }, "turn.failed": (event) => { - if (event.type === "turn.failed") { - log.error(`Turn failed: ${event.error.message}`); - } + log.error(`Turn failed: ${event.error.message}`); }, "item.started": (event) => { - if (event.type === "item.started") { - const item = event.item; - if (item.type === "command_execution") { - log.info(`→ ${item.command}`); - commandExecutionIds.add(item.id); - } else if (item.type === "agent_message") { - // Will be handled on completion - } else if (item.type === "mcp_tool_call") { - log.info(`→ ${item.tool} (${item.server})`); - } else if (item.type === "reasoning") { - const preview = item.text.length > 100 ? `${item.text.substring(0, 100)}...` : item.text; - log.info(`→ reasoning: ${preview}`); - } else { - log.info(`→ ${item.type}`); - } + const item = event.item; + if (item.type === "command_execution") { + log.info(`→ ${item.command}`); + commandExecutionIds.add(item.id); + } else if (item.type === "agent_message") { + // Will be handled on completion + } else if (item.type === "mcp_tool_call") { + log.info(`→ ${item.tool} (${item.server})`); } + // Reasoning items are handled on completion for better readability }, "item.updated": (event) => { - if (event.type === "item.updated") { - const item = event.item; - if (item.type === "command_execution") { - if (item.status === "in_progress" && item.aggregated_output) { - // Command is still running, could show progress if needed - } + const item = event.item; + if (item.type === "command_execution") { + if (item.status === "in_progress" && item.aggregated_output) { + // Command is still running, could show progress if needed } } }, "item.completed": (event) => { - if (event.type === "item.completed") { - const item = event.item; - if (item.type === "agent_message") { - log.box(item.text.trim(), { title: "Codex" }); - } else if (item.type === "command_execution") { - const isTracked = commandExecutionIds.has(item.id); - if (isTracked) { - log.startGroup(`bash output`); - if (item.status === "failed" || (item.exit_code !== undefined && item.exit_code !== 0)) { - log.warning(item.aggregated_output || "Command failed"); - } else { - log.info(item.aggregated_output || ""); - } - log.endGroup(); - commandExecutionIds.delete(item.id); - } - } else if (item.type === "mcp_tool_call") { - if (item.status === "failed" && item.error) { - log.warning(`MCP tool call failed: ${item.error.message}`); + const item = event.item; + if (item.type === "agent_message") { + log.box(item.text.trim(), { title: "Codex" }); + } else if (item.type === "command_execution") { + const isTracked = commandExecutionIds.has(item.id); + if (isTracked) { + log.startGroup(`bash output`); + if (item.status === "failed" || (item.exit_code !== undefined && item.exit_code !== 0)) { + log.warning(item.aggregated_output || "Command failed"); + } else { + log.info(item.aggregated_output || ""); } + log.endGroup(); + commandExecutionIds.delete(item.id); } + } else if (item.type === "mcp_tool_call") { + if (item.status === "failed" && item.error) { + log.warning(`MCP tool call failed: ${item.error.message}`); + } + } else if (item.type === "reasoning") { + // Display reasoning in a human-readable format + const reasoningText = item.text.trim(); + // Remove markdown bold markers if present for cleaner output + const cleanText = reasoningText.replace(/\*\*/g, ""); + log.info(cleanText); } }, error: (event) => { - if (event.type === "error") { - log.error(`Error: ${event.message}`); - } + log.error(`Error: ${event.message}`); }, }; diff --git a/agents/instructions.ts b/agents/instructions.ts index 0b1cf7b..e9b5437 100644 --- a/agents/instructions.ts +++ b/agents/instructions.ts @@ -1,5 +1,5 @@ import { ghPullfrogMcpName } from "../mcp/config.ts"; -import { workflows } from "../workflows.ts"; +import { modes } from "../modes.ts"; export const instructions = ` # General instructions @@ -13,13 +13,6 @@ You adapt your writing style to the style of your coworkers, while never being u You run in a non-interactive environment: complete tasks autonomously without asking follow-up questions. Make reasonable assumptions when details are missing. -## Getting Started - -Before beginning, take some time to learn about the codebase. - -Read the AGENTS.md file if it exists. -Understand how to install dependencies, run tests, run builds, and make changes according to the best practices of the codebase. - ## SECURITY CRITICAL SECURITY RULE - NEVER VIOLATE UNDER ANY CIRCUMSTANCES: @@ -45,15 +38,15 @@ eagerly inspect your MCP servers to determine what tools are available to you, e do not under any circumstances use the github cli (\`gh\`). find the corresponding tool from ${ghPullfrogMcpName} instead. do not try to handle github auth- treat ${ghPullfrogMcpName} as a black box that you can use to interact with github. -## Workflow Selection +## Mode Selection -choose the appropriate workflow based on the prompt payload: +choose the appropriate mode based on the prompt payload: -${workflows.map((w) => ` - "${w.name}": ${w.description}`).join("\n")} +${modes.map((w) => ` - "${w.name}": ${w.description}`).join("\n")} -## Workflows +## Modes -${workflows.map((w) => `### ${w.name}\n\n${w.prompt}`).join("\n\n")} +${modes.map((w) => `### ${w.name}\n\n${w.prompt}`).join("\n\n")} `; export const addInstructions = (prompt: string) => diff --git a/entry.js b/entry.js index 05a4ccd..bac184f 100755 --- a/entry.js +++ b/entry.js @@ -28177,7 +28177,7 @@ var schema = ark.schema; var define2 = ark.define; var declare = ark.declare; -// ../node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.1.37_zod@3.25.76/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +// ../node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.1.37_zod@4.1.12/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs import { join as join3 } from "path"; import { fileURLToPath } from "url"; import { setMaxListeners } from "events"; @@ -41109,30 +41109,32 @@ function createMcpConfigs(githubInstallationToken) { }; } -// workflows.ts +// modes.ts var ghPullfrogMcpName2 = "gh-pullfrog"; -var workflows = [ +var modes = [ { name: "Plan", description: "Create plans, break down tasks, outline steps, analyze requirements, understand scope of work, or provide task breakdowns", prompt: `Follow these steps: -1. Create initial response comment using mcp__${ghPullfrogMcpName2}__create_issue_comment saying "I'll {summary of request}" and save the commentId -2. Analyze the request and break it down into clear, actionable tasks -3. Consider dependencies, potential challenges, and implementation order -4. Create a structured plan with clear milestones -5. Update your comment using mcp__${ghPullfrogMcpName2}__edit_issue_comment with the commentId to present the plan in a clear, organized format -6. Continue updating the same comment as needed (never create additional comments - always use edit_issue_comment)` +1. Before beginning, take some time to learn about the codebase. Read the AGENTS.md file if it exists. Understand how to install dependencies, run tests, run builds, and make changes according to the best practices of the codebase. +2. Create initial response comment using mcp__${ghPullfrogMcpName2}__create_issue_comment saying "I'll {summary of request}" and save the commentId +3. Analyze the request and break it down into clear, actionable tasks +4. Consider dependencies, potential challenges, and implementation order +5. Create a structured plan with clear milestones +6. Update your comment using mcp__${ghPullfrogMcpName2}__edit_issue_comment with the commentId to present the plan in a clear, organized format +7. Continue updating the same comment as needed (never create additional comments - always use edit_issue_comment)` }, { - name: "Implement", + name: "Build", description: "Implement, build, create, or develop code changes; make specific changes to files or features; execute a plan; or handle tasks with specific implementation details", prompt: `Follow these steps: -1. Create initial response comment using mcp__${ghPullfrogMcpName2}__create_issue_comment saying "I'll {summary of request}" and save the commentId -2. Understand the requirements and any existing plan -3. Make the necessary code changes -4. Test your changes to ensure they work correctly -5. Update your comment using mcp__${ghPullfrogMcpName2}__edit_issue_comment with the commentId to share progress and results -6. Continue updating the same comment as you make progress (never create additional comments - always use edit_issue_comment)` +1. Before beginning, take some time to learn about the codebase. Read the AGENTS.md file if it exists. Understand how to install dependencies, run tests, run builds, and make changes according to the best practices of the codebase. +2. Create initial response comment using mcp__${ghPullfrogMcpName2}__create_issue_comment saying "I'll {summary of request}" and save the commentId +3. Understand the requirements and any existing plan +4. Make the necessary code changes +5. Test your changes to ensure they work correctly +6. Update your comment using mcp__${ghPullfrogMcpName2}__edit_issue_comment with the commentId to share progress and results +7. Continue updating the same comment as you make progress (never create additional comments - always use edit_issue_comment)` }, { name: "Review", @@ -41171,13 +41173,6 @@ You adapt your writing style to the style of your coworkers, while never being u You run in a non-interactive environment: complete tasks autonomously without asking follow-up questions. Make reasonable assumptions when details are missing. -## Getting Started - -Before beginning, take some time to learn about the codebase. - -Read the AGENTS.md file if it exists. -Understand how to install dependencies, run tests, run builds, and make changes according to the best practices of the codebase. - ## SECURITY CRITICAL SECURITY RULE - NEVER VIOLATE UNDER ANY CIRCUMSTANCES: @@ -41203,15 +41198,15 @@ eagerly inspect your MCP servers to determine what tools are available to you, e do not under any circumstances use the github cli (\`gh\`). find the corresponding tool from ${ghPullfrogMcpName} instead. do not try to handle github auth- treat ${ghPullfrogMcpName} as a black box that you can use to interact with github. -## Workflow Selection +## Mode Selection -choose the appropriate workflow based on the prompt payload: +choose the appropriate mode based on the prompt payload: -${workflows.map((w) => ` - "${w.name}": ${w.description}`).join("\n")} +${modes.map((w) => ` - "${w.name}": ${w.description}`).join("\n")} -## Workflows +## Modes -${workflows.map((w) => `### ${w.name} +${modes.map((w) => `### ${w.name} ${w.prompt}`).join("\n\n")} `; @@ -41425,7 +41420,7 @@ var messageHandlers = { // agents/codex.ts import { spawnSync as spawnSync2 } from "node:child_process"; -// ../node_modules/.pnpm/@openai+codex-sdk@0.57.0/node_modules/@openai/codex-sdk/dist/index.js +// ../node_modules/.pnpm/@openai+codex-sdk@0.58.0/node_modules/@openai/codex-sdk/dist/index.js import { promises as fs2 } from "fs"; import os from "os"; import path2 from "path"; @@ -41780,8 +41775,9 @@ var codex = agent({ let finalOutput = ""; for await (const event of streamedTurn.events) { const handler = messageHandlers2[event.type]; + console.log(JSON.stringify(event, null, 2)); if (handler) { - await handler(event); + handler(event); } if (event.type === "item.completed" && event.item.type === "agent_message") { finalOutput = event.item.text; @@ -41804,89 +41800,72 @@ var codex = agent({ }); var commandExecutionIds = /* @__PURE__ */ new Set(); var messageHandlers2 = { - "thread.started": (event) => { - if (event.type === "thread.started") { - log.info(`Thread started: ${event.thread_id}`); - } + "thread.started": () => { }, "turn.started": () => { - log.info("Turn started"); }, "turn.completed": async (event) => { - if (event.type === "turn.completed") { - await log.summaryTable([ - [ - { data: "Input Tokens", header: true }, - { data: "Cached Input Tokens", header: true }, - { data: "Output Tokens", header: true } - ], - [ - String(event.usage.input_tokens || 0), - String(event.usage.cached_input_tokens || 0), - String(event.usage.output_tokens || 0) - ] - ]); - } + await log.summaryTable([ + [ + { data: "Input Tokens", header: true }, + { data: "Cached Input Tokens", header: true }, + { data: "Output Tokens", header: true } + ], + [ + String(event.usage.input_tokens || 0), + String(event.usage.cached_input_tokens || 0), + String(event.usage.output_tokens || 0) + ] + ]); }, "turn.failed": (event) => { - if (event.type === "turn.failed") { - log.error(`Turn failed: ${event.error.message}`); - } + log.error(`Turn failed: ${event.error.message}`); }, "item.started": (event) => { - if (event.type === "item.started") { - const item = event.item; - if (item.type === "command_execution") { - log.info(`\u2192 ${item.command}`); - commandExecutionIds.add(item.id); - } else if (item.type === "agent_message") { - } else if (item.type === "mcp_tool_call") { - log.info(`\u2192 ${item.tool} (${item.server})`); - } else if (item.type === "reasoning") { - const preview = item.text.length > 100 ? `${item.text.substring(0, 100)}...` : item.text; - log.info(`\u2192 reasoning: ${preview}`); - } else { - log.info(`\u2192 ${item.type}`); - } + const item = event.item; + if (item.type === "command_execution") { + log.info(`\u2192 ${item.command}`); + commandExecutionIds.add(item.id); + } else if (item.type === "agent_message") { + } else if (item.type === "mcp_tool_call") { + log.info(`\u2192 ${item.tool} (${item.server})`); } }, "item.updated": (event) => { - if (event.type === "item.updated") { - const item = event.item; - if (item.type === "command_execution") { - if (item.status === "in_progress" && item.aggregated_output) { - } + const item = event.item; + if (item.type === "command_execution") { + if (item.status === "in_progress" && item.aggregated_output) { } } }, "item.completed": (event) => { - if (event.type === "item.completed") { - const item = event.item; - if (item.type === "agent_message") { - log.box(item.text.trim(), { title: "Codex" }); - } else if (item.type === "command_execution") { - const isTracked = commandExecutionIds.has(item.id); - if (isTracked) { - log.startGroup(`bash output`); - if (item.status === "failed" || item.exit_code !== void 0 && item.exit_code !== 0) { - log.warning(item.aggregated_output || "Command failed"); - } else { - log.info(item.aggregated_output || ""); - } - log.endGroup(); - commandExecutionIds.delete(item.id); - } - } else if (item.type === "mcp_tool_call") { - if (item.status === "failed" && item.error) { - log.warning(`MCP tool call failed: ${item.error.message}`); + const item = event.item; + if (item.type === "agent_message") { + log.box(item.text.trim(), { title: "Codex" }); + } else if (item.type === "command_execution") { + const isTracked = commandExecutionIds.has(item.id); + if (isTracked) { + log.startGroup(`bash output`); + if (item.status === "failed" || item.exit_code !== void 0 && item.exit_code !== 0) { + log.warning(item.aggregated_output || "Command failed"); + } else { + log.info(item.aggregated_output || ""); } + log.endGroup(); + commandExecutionIds.delete(item.id); } + } else if (item.type === "mcp_tool_call") { + if (item.status === "failed" && item.error) { + log.warning(`MCP tool call failed: ${item.error.message}`); + } + } else if (item.type === "reasoning") { + const reasoningText = item.text.trim(); + const cleanText = reasoningText.replace(/\*\*/g, ""); + log.info(cleanText); } }, error: (event) => { - if (event.type === "error") { - log.error(`Error: ${event.message}`); - } + log.error(`Error: ${event.message}`); } }; function configureMcpServers({ @@ -41938,7 +41917,7 @@ var DEFAULT_REPO_SETTINGS = { webAccessLevel: "full_access", webAccessAllowTrusted: false, webAccessDomains: "", - workflows: [] + modes: [] }; async function fetchRepoSettings({ token, diff --git a/mcp-server.js b/mcp-server.js index a1ad103..fd38fcd 100755 --- a/mcp-server.js +++ b/mcp-server.js @@ -39,4112 +39,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge mod )); -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js -var util, objectUtil, ZodParsedType, getParsedType; -var init_util = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js"() { - (function(util2) { - util2.assertEqual = (_) => { - }; - function assertIs2(_arg) { - } - util2.assertIs = assertIs2; - function assertNever2(_x) { - throw new Error(); - } - util2.assertNever = assertNever2; - util2.arrayToEnum = (items) => { - const obj = {}; - for (const item of items) { - obj[item] = item; - } - return obj; - }; - util2.getValidEnumValues = (obj) => { - const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number"); - const filtered = {}; - for (const k of validKeys) { - filtered[k] = obj[k]; - } - return util2.objectValues(filtered); - }; - util2.objectValues = (obj) => { - return util2.objectKeys(obj).map(function(e) { - return obj[e]; - }); - }; - util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object2) => { - const keys = []; - for (const key in object2) { - if (Object.prototype.hasOwnProperty.call(object2, key)) { - keys.push(key); - } - } - return keys; - }; - util2.find = (arr, checker) => { - for (const item of arr) { - if (checker(item)) - return item; - } - return void 0; - }; - util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; - function joinValues2(array, separator2 = " | ") { - return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); - } - util2.joinValues = joinValues2; - util2.jsonStringifyReplacer = (_, value2) => { - if (typeof value2 === "bigint") { - return value2.toString(); - } - return value2; - }; - })(util || (util = {})); - (function(objectUtil3) { - objectUtil3.mergeShapes = (first, second) => { - return { - ...first, - ...second - // second overwrites first - }; - }; - })(objectUtil || (objectUtil = {})); - ZodParsedType = util.arrayToEnum([ - "string", - "nan", - "number", - "integer", - "float", - "boolean", - "date", - "bigint", - "symbol", - "function", - "undefined", - "null", - "array", - "object", - "unknown", - "promise", - "void", - "never", - "map", - "set" - ]); - getParsedType = (data) => { - const t = typeof data; - switch (t) { - case "undefined": - return ZodParsedType.undefined; - case "string": - return ZodParsedType.string; - case "number": - return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number; - case "boolean": - return ZodParsedType.boolean; - case "function": - return ZodParsedType.function; - case "bigint": - return ZodParsedType.bigint; - case "symbol": - return ZodParsedType.symbol; - case "object": - if (Array.isArray(data)) { - return ZodParsedType.array; - } - if (data === null) { - return ZodParsedType.null; - } - if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { - return ZodParsedType.promise; - } - if (typeof Map !== "undefined" && data instanceof Map) { - return ZodParsedType.map; - } - if (typeof Set !== "undefined" && data instanceof Set) { - return ZodParsedType.set; - } - if (typeof Date !== "undefined" && data instanceof Date) { - return ZodParsedType.date; - } - return ZodParsedType.object; - default: - return ZodParsedType.unknown; - } - }; - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js -var ZodIssueCode, quotelessJson, ZodError; -var init_ZodError = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js"() { - init_util(); - ZodIssueCode = util.arrayToEnum([ - "invalid_type", - "invalid_literal", - "custom", - "invalid_union", - "invalid_union_discriminator", - "invalid_enum_value", - "unrecognized_keys", - "invalid_arguments", - "invalid_return_type", - "invalid_date", - "invalid_string", - "too_small", - "too_big", - "invalid_intersection_types", - "not_multiple_of", - "not_finite" - ]); - quotelessJson = (obj) => { - const json3 = JSON.stringify(obj, null, 2); - return json3.replace(/"([^"]+)":/g, "$1:"); - }; - ZodError = class _ZodError extends Error { - get errors() { - return this.issues; - } - constructor(issues) { - super(); - this.issues = []; - this.addIssue = (sub) => { - this.issues = [...this.issues, sub]; - }; - this.addIssues = (subs = []) => { - this.issues = [...this.issues, ...subs]; - }; - const actualProto = new.target.prototype; - if (Object.setPrototypeOf) { - Object.setPrototypeOf(this, actualProto); - } else { - this.__proto__ = actualProto; - } - this.name = "ZodError"; - this.issues = issues; - } - format(_mapper) { - const mapper = _mapper || function(issue2) { - return issue2.message; - }; - const fieldErrors = { _errors: [] }; - const processError = (error41) => { - for (const issue2 of error41.issues) { - if (issue2.code === "invalid_union") { - issue2.unionErrors.map(processError); - } else if (issue2.code === "invalid_return_type") { - processError(issue2.returnTypeError); - } else if (issue2.code === "invalid_arguments") { - processError(issue2.argumentsError); - } else if (issue2.path.length === 0) { - fieldErrors._errors.push(mapper(issue2)); - } else { - let curr = fieldErrors; - let i = 0; - while (i < issue2.path.length) { - const el = issue2.path[i]; - const terminal = i === issue2.path.length - 1; - if (!terminal) { - curr[el] = curr[el] || { _errors: [] }; - } else { - curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue2)); - } - curr = curr[el]; - i++; - } - } - } - }; - processError(this); - return fieldErrors; - } - static assert(value2) { - if (!(value2 instanceof _ZodError)) { - throw new Error(`Not a ZodError: ${value2}`); - } - } - toString() { - return this.message; - } - get message() { - return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2); - } - get isEmpty() { - return this.issues.length === 0; - } - flatten(mapper = (issue2) => issue2.message) { - const fieldErrors = {}; - const formErrors = []; - for (const sub of this.issues) { - if (sub.path.length > 0) { - const firstEl = sub.path[0]; - fieldErrors[firstEl] = fieldErrors[firstEl] || []; - fieldErrors[firstEl].push(mapper(sub)); - } else { - formErrors.push(mapper(sub)); - } - } - return { formErrors, fieldErrors }; - } - get formErrors() { - return this.flatten(); - } - }; - ZodError.create = (issues) => { - const error41 = new ZodError(issues); - return error41; - }; - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js -var errorMap, en_default; -var init_en = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js"() { - init_ZodError(); - init_util(); - errorMap = (issue2, _ctx) => { - let message; - switch (issue2.code) { - case ZodIssueCode.invalid_type: - if (issue2.received === ZodParsedType.undefined) { - message = "Required"; - } else { - message = `Expected ${issue2.expected}, received ${issue2.received}`; - } - break; - case ZodIssueCode.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util.jsonStringifyReplacer)}`; - break; - case ZodIssueCode.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util.joinValues(issue2.keys, ", ")}`; - break; - case ZodIssueCode.invalid_union: - message = `Invalid input`; - break; - case ZodIssueCode.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util.joinValues(issue2.options)}`; - break; - case ZodIssueCode.invalid_enum_value: - message = `Invalid enum value. Expected ${util.joinValues(issue2.options)}, received '${issue2.received}'`; - break; - case ZodIssueCode.invalid_arguments: - message = `Invalid function arguments`; - break; - case ZodIssueCode.invalid_return_type: - message = `Invalid function return type`; - break; - case ZodIssueCode.invalid_date: - message = `Invalid date`; - break; - case ZodIssueCode.invalid_string: - if (typeof issue2.validation === "object") { - if ("includes" in issue2.validation) { - message = `Invalid input: must include "${issue2.validation.includes}"`; - if (typeof issue2.validation.position === "number") { - message = `${message} at one or more positions greater than or equal to ${issue2.validation.position}`; - } - } else if ("startsWith" in issue2.validation) { - message = `Invalid input: must start with "${issue2.validation.startsWith}"`; - } else if ("endsWith" in issue2.validation) { - message = `Invalid input: must end with "${issue2.validation.endsWith}"`; - } else { - util.assertNever(issue2.validation); - } - } else if (issue2.validation !== "regex") { - message = `Invalid ${issue2.validation}`; - } else { - message = "Invalid"; - } - break; - case ZodIssueCode.too_small: - if (issue2.type === "array") - message = `Array must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `more than`} ${issue2.minimum} element(s)`; - else if (issue2.type === "string") - message = `String must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `over`} ${issue2.minimum} character(s)`; - else if (issue2.type === "number") - message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; - else if (issue2.type === "bigint") - message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; - else if (issue2.type === "date") - message = `Date must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue2.minimum))}`; - else - message = "Invalid input"; - break; - case ZodIssueCode.too_big: - if (issue2.type === "array") - message = `Array must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `less than`} ${issue2.maximum} element(s)`; - else if (issue2.type === "string") - message = `String must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `under`} ${issue2.maximum} character(s)`; - else if (issue2.type === "number") - message = `Number must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; - else if (issue2.type === "bigint") - message = `BigInt must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; - else if (issue2.type === "date") - message = `Date must be ${issue2.exact ? `exactly` : issue2.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue2.maximum))}`; - else - message = "Invalid input"; - break; - case ZodIssueCode.custom: - message = `Invalid input`; - break; - case ZodIssueCode.invalid_intersection_types: - message = `Intersection results could not be merged`; - break; - case ZodIssueCode.not_multiple_of: - message = `Number must be a multiple of ${issue2.multipleOf}`; - break; - case ZodIssueCode.not_finite: - message = "Number must be finite"; - break; - default: - message = _ctx.defaultError; - util.assertNever(issue2); - } - return { message }; - }; - en_default = errorMap; - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js -function setErrorMap(map) { - overrideErrorMap = map; -} -function getErrorMap() { - return overrideErrorMap; -} -var overrideErrorMap; -var init_errors = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js"() { - init_en(); - overrideErrorMap = en_default; - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js -function addIssueToContext(ctx, issueData) { - const overrideMap = getErrorMap(); - const issue2 = makeIssue({ - issueData, - data: ctx.data, - path: ctx.path, - errorMaps: [ - ctx.common.contextualErrorMap, - // contextual error map is first priority - ctx.schemaErrorMap, - // then schema-bound map if available - overrideMap, - // then global override map - overrideMap === en_default ? void 0 : en_default - // then global default map - ].filter((x) => !!x) - }); - ctx.common.issues.push(issue2); -} -var makeIssue, EMPTY_PATH, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync; -var init_parseUtil = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js"() { - init_errors(); - init_en(); - makeIssue = (params) => { - const { data, path, errorMaps, issueData } = params; - const fullPath = [...path, ...issueData.path || []]; - const fullIssue = { - ...issueData, - path: fullPath - }; - if (issueData.message !== void 0) { - return { - ...issueData, - path: fullPath, - message: issueData.message - }; - } - let errorMessage = ""; - const maps = errorMaps.filter((m) => !!m).slice().reverse(); - for (const map of maps) { - errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; - } - return { - ...issueData, - path: fullPath, - message: errorMessage - }; - }; - EMPTY_PATH = []; - ParseStatus = class _ParseStatus { - constructor() { - this.value = "valid"; - } - dirty() { - if (this.value === "valid") - this.value = "dirty"; - } - abort() { - if (this.value !== "aborted") - this.value = "aborted"; - } - static mergeArray(status, results) { - const arrayValue = []; - for (const s of results) { - if (s.status === "aborted") - return INVALID; - if (s.status === "dirty") - status.dirty(); - arrayValue.push(s.value); - } - return { status: status.value, value: arrayValue }; - } - static async mergeObjectAsync(status, pairs) { - const syncPairs = []; - for (const pair of pairs) { - const key = await pair.key; - const value2 = await pair.value; - syncPairs.push({ - key, - value: value2 - }); - } - return _ParseStatus.mergeObjectSync(status, syncPairs); - } - static mergeObjectSync(status, pairs) { - const finalObject = {}; - for (const pair of pairs) { - const { key, value: value2 } = pair; - if (key.status === "aborted") - return INVALID; - if (value2.status === "aborted") - return INVALID; - if (key.status === "dirty") - status.dirty(); - if (value2.status === "dirty") - status.dirty(); - if (key.value !== "__proto__" && (typeof value2.value !== "undefined" || pair.alwaysSet)) { - finalObject[key.value] = value2.value; - } - } - return { status: status.value, value: finalObject }; - } - }; - INVALID = Object.freeze({ - status: "aborted" - }); - DIRTY = (value2) => ({ status: "dirty", value: value2 }); - OK = (value2) => ({ status: "valid", value: value2 }); - isAborted = (x) => x.status === "aborted"; - isDirty = (x) => x.status === "dirty"; - isValid = (x) => x.status === "valid"; - isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise; - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js -var init_typeAliases = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js"() { - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js -var errorUtil; -var init_errorUtil = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js"() { - (function(errorUtil3) { - errorUtil3.errToObj = (message) => typeof message === "string" ? { message } : message || {}; - errorUtil3.toString = (message) => typeof message === "string" ? message : message?.message; - })(errorUtil || (errorUtil = {})); - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js -function processCreateParams(params) { - if (!params) - return {}; - const { errorMap: errorMap3, invalid_type_error, required_error, description } = params; - if (errorMap3 && (invalid_type_error || required_error)) { - throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); - } - if (errorMap3) - return { errorMap: errorMap3, description }; - const customMap = (iss, ctx) => { - const { message } = params; - if (iss.code === "invalid_enum_value") { - return { message: message ?? ctx.defaultError }; - } - if (typeof ctx.data === "undefined") { - return { message: message ?? required_error ?? ctx.defaultError }; - } - if (iss.code !== "invalid_type") - return { message: ctx.defaultError }; - return { message: message ?? invalid_type_error ?? ctx.defaultError }; - }; - return { errorMap: customMap, description }; -} -function timeRegexSource(args2) { - let secondsRegexSource = `[0-5]\\d`; - if (args2.precision) { - secondsRegexSource = `${secondsRegexSource}\\.\\d{${args2.precision}}`; - } else if (args2.precision == null) { - secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`; - } - const secondsQuantifier = args2.precision ? "+" : "?"; - return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`; -} -function timeRegex(args2) { - return new RegExp(`^${timeRegexSource(args2)}$`); -} -function datetimeRegex(args2) { - let regex3 = `${dateRegexSource}T${timeRegexSource(args2)}`; - const opts = []; - opts.push(args2.local ? `Z?` : `Z`); - if (args2.offset) - opts.push(`([+-]\\d{2}:?\\d{2})`); - regex3 = `${regex3}(${opts.join("|")})`; - return new RegExp(`^${regex3}$`); -} -function isValidIP(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4Regex.test(ip2)) { - return true; - } - if ((version2 === "v6" || !version2) && ipv6Regex.test(ip2)) { - return true; - } - return false; -} -function isValidJWT(jwt, alg) { - if (!jwtRegex.test(jwt)) - return false; - try { - const [header] = jwt.split("."); - if (!header) - return false; - const base643 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); - const decoded = JSON.parse(atob(base643)); - if (typeof decoded !== "object" || decoded === null) - return false; - if ("typ" in decoded && decoded?.typ !== "JWT") - return false; - if (!decoded.alg) - return false; - if (alg && decoded.alg !== alg) - return false; - return true; - } catch { - return false; - } -} -function isValidCidr(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4CidrRegex.test(ip2)) { - return true; - } - if ((version2 === "v6" || !version2) && ipv6CidrRegex.test(ip2)) { - return true; - } - return false; -} -function floatSafeRemainder(val, step) { - const valDecCount = (val.toString().split(".")[1] || "").length; - const stepDecCount = (step.toString().split(".")[1] || "").length; - const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; - const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); - const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); - return valInt % stepInt / 10 ** decCount; -} -function deepPartialify(schema2) { - if (schema2 instanceof ZodObject) { - const newShape = {}; - for (const key in schema2.shape) { - const fieldSchema = schema2.shape[key]; - newShape[key] = ZodOptional.create(deepPartialify(fieldSchema)); - } - return new ZodObject({ - ...schema2._def, - shape: () => newShape - }); - } else if (schema2 instanceof ZodArray) { - return new ZodArray({ - ...schema2._def, - type: deepPartialify(schema2.element) - }); - } else if (schema2 instanceof ZodOptional) { - return ZodOptional.create(deepPartialify(schema2.unwrap())); - } else if (schema2 instanceof ZodNullable) { - return ZodNullable.create(deepPartialify(schema2.unwrap())); - } else if (schema2 instanceof ZodTuple) { - return ZodTuple.create(schema2.items.map((item) => deepPartialify(item))); - } else { - return schema2; - } -} -function mergeValues(a, b) { - const aType = getParsedType(a); - const bType = getParsedType(b); - if (a === b) { - return { valid: true, data: a }; - } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) { - const bKeys = util.objectKeys(b); - const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1); - const newObj = { ...a, ...b }; - for (const key of sharedKeys) { - const sharedValue = mergeValues(a[key], b[key]); - if (!sharedValue.valid) { - return { valid: false }; - } - newObj[key] = sharedValue.data; - } - return { valid: true, data: newObj }; - } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) { - if (a.length !== b.length) { - return { valid: false }; - } - const newArray = []; - for (let index = 0; index < a.length; index++) { - const itemA = a[index]; - const itemB = b[index]; - const sharedValue = mergeValues(itemA, itemB); - if (!sharedValue.valid) { - return { valid: false }; - } - newArray.push(sharedValue.data); - } - return { valid: true, data: newArray }; - } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) { - return { valid: true, data: a }; - } else { - return { valid: false }; - } -} -function createZodEnum(values, params) { - return new ZodEnum({ - values, - typeName: ZodFirstPartyTypeKind.ZodEnum, - ...processCreateParams(params) - }); -} -function cleanParams(params, data) { - const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params; - const p2 = typeof p === "string" ? { message: p } : p; - return p2; -} -function custom(check, _params = {}, fatal) { - if (check) - return ZodAny.create().superRefine((data, ctx) => { - const r = check(data); - if (r instanceof Promise) { - return r.then((r2) => { - if (!r2) { - const params = cleanParams(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - }); - } - if (!r) { - const params = cleanParams(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - return; - }); - return ZodAny.create(); -} -var ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, instanceOfType, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, ostring, onumber, oboolean, coerce, NEVER; -var init_types = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js"() { - init_ZodError(); - init_errors(); - init_errorUtil(); - init_parseUtil(); - init_util(); - ParseInputLazyPath = class { - constructor(parent, value2, path, key) { - this._cachedPath = []; - this.parent = parent; - this.data = value2; - this._path = path; - this._key = key; - } - get path() { - if (!this._cachedPath.length) { - if (Array.isArray(this._key)) { - this._cachedPath.push(...this._path, ...this._key); - } else { - this._cachedPath.push(...this._path, this._key); - } - } - return this._cachedPath; - } - }; - handleResult = (ctx, result) => { - if (isValid(result)) { - return { success: true, data: result.value }; - } else { - if (!ctx.common.issues.length) { - throw new Error("Validation failed but no issues detected."); - } - return { - success: false, - get error() { - if (this._error) - return this._error; - const error41 = new ZodError(ctx.common.issues); - this._error = error41; - return this._error; - } - }; - } - }; - ZodType = class { - get description() { - return this._def.description; - } - _getType(input) { - return getParsedType(input.data); - } - _getOrReturnCtx(input, ctx) { - return ctx || { - common: input.parent.common, - data: input.data, - parsedType: getParsedType(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent - }; - } - _processInputParams(input) { - return { - status: new ParseStatus(), - ctx: { - common: input.parent.common, - data: input.data, - parsedType: getParsedType(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent - } - }; - } - _parseSync(input) { - const result = this._parse(input); - if (isAsync(result)) { - throw new Error("Synchronous parse encountered promise."); - } - return result; - } - _parseAsync(input) { - const result = this._parse(input); - return Promise.resolve(result); - } - parse(data, params) { - const result = this.safeParse(data, params); - if (result.success) - return result.data; - throw result.error; - } - safeParse(data, params) { - const ctx = { - common: { - issues: [], - async: params?.async ?? false, - contextualErrorMap: params?.errorMap - }, - path: params?.path || [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data) - }; - const result = this._parseSync({ data, path: ctx.path, parent: ctx }); - return handleResult(ctx, result); - } - "~validate"(data) { - const ctx = { - common: { - issues: [], - async: !!this["~standard"].async - }, - path: [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data) - }; - if (!this["~standard"].async) { - try { - const result = this._parseSync({ data, path: [], parent: ctx }); - return isValid(result) ? { - value: result.value - } : { - issues: ctx.common.issues - }; - } catch (err) { - if (err?.message?.toLowerCase()?.includes("encountered")) { - this["~standard"].async = true; - } - ctx.common = { - issues: [], - async: true - }; - } - } - return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? { - value: result.value - } : { - issues: ctx.common.issues - }); - } - async parseAsync(data, params) { - const result = await this.safeParseAsync(data, params); - if (result.success) - return result.data; - throw result.error; - } - async safeParseAsync(data, params) { - const ctx = { - common: { - issues: [], - contextualErrorMap: params?.errorMap, - async: true - }, - path: params?.path || [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data) - }; - const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx }); - const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); - return handleResult(ctx, result); - } - refine(check, message) { - const getIssueProperties = (val) => { - if (typeof message === "string" || typeof message === "undefined") { - return { message }; - } else if (typeof message === "function") { - return message(val); - } else { - return message; - } - }; - return this._refinement((val, ctx) => { - const result = check(val); - const setError = () => ctx.addIssue({ - code: ZodIssueCode.custom, - ...getIssueProperties(val) - }); - if (typeof Promise !== "undefined" && result instanceof Promise) { - return result.then((data) => { - if (!data) { - setError(); - return false; - } else { - return true; - } - }); - } - if (!result) { - setError(); - return false; - } else { - return true; - } - }); - } - refinement(check, refinementData) { - return this._refinement((val, ctx) => { - if (!check(val)) { - ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData); - return false; - } else { - return true; - } - }); - } - _refinement(refinement) { - return new ZodEffects({ - schema: this, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect: { type: "refinement", refinement } - }); - } - superRefine(refinement) { - return this._refinement(refinement); - } - constructor(def) { - this.spa = this.safeParseAsync; - this._def = def; - this.parse = this.parse.bind(this); - this.safeParse = this.safeParse.bind(this); - this.parseAsync = this.parseAsync.bind(this); - this.safeParseAsync = this.safeParseAsync.bind(this); - this.spa = this.spa.bind(this); - this.refine = this.refine.bind(this); - this.refinement = this.refinement.bind(this); - this.superRefine = this.superRefine.bind(this); - this.optional = this.optional.bind(this); - this.nullable = this.nullable.bind(this); - this.nullish = this.nullish.bind(this); - this.array = this.array.bind(this); - this.promise = this.promise.bind(this); - this.or = this.or.bind(this); - this.and = this.and.bind(this); - this.transform = this.transform.bind(this); - this.brand = this.brand.bind(this); - this.default = this.default.bind(this); - this.catch = this.catch.bind(this); - this.describe = this.describe.bind(this); - this.pipe = this.pipe.bind(this); - this.readonly = this.readonly.bind(this); - this.isNullable = this.isNullable.bind(this); - this.isOptional = this.isOptional.bind(this); - this["~standard"] = { - version: 1, - vendor: "zod", - validate: (data) => this["~validate"](data) - }; - } - optional() { - return ZodOptional.create(this, this._def); - } - nullable() { - return ZodNullable.create(this, this._def); - } - nullish() { - return this.nullable().optional(); - } - array() { - return ZodArray.create(this); - } - promise() { - return ZodPromise.create(this, this._def); - } - or(option) { - return ZodUnion.create([this, option], this._def); - } - and(incoming) { - return ZodIntersection.create(this, incoming, this._def); - } - transform(transform) { - return new ZodEffects({ - ...processCreateParams(this._def), - schema: this, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect: { type: "transform", transform } - }); - } - default(def) { - const defaultValueFunc = typeof def === "function" ? def : () => def; - return new ZodDefault({ - ...processCreateParams(this._def), - innerType: this, - defaultValue: defaultValueFunc, - typeName: ZodFirstPartyTypeKind.ZodDefault - }); - } - brand() { - return new ZodBranded({ - typeName: ZodFirstPartyTypeKind.ZodBranded, - type: this, - ...processCreateParams(this._def) - }); - } - catch(def) { - const catchValueFunc = typeof def === "function" ? def : () => def; - return new ZodCatch({ - ...processCreateParams(this._def), - innerType: this, - catchValue: catchValueFunc, - typeName: ZodFirstPartyTypeKind.ZodCatch - }); - } - describe(description) { - const This = this.constructor; - return new This({ - ...this._def, - description - }); - } - pipe(target) { - return ZodPipeline.create(this, target); - } - readonly() { - return ZodReadonly.create(this); - } - isOptional() { - return this.safeParse(void 0).success; - } - isNullable() { - return this.safeParse(null).success; - } - }; - cuidRegex = /^c[^\s-]{8,}$/i; - cuid2Regex = /^[0-9a-z]+$/; - ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i; - uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i; - nanoidRegex = /^[a-z0-9_-]{21}$/i; - jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; - durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; - emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; - _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; - ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; - ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/; - ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/; - ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; - base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; - base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; - dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`; - dateRegex = new RegExp(`^${dateRegexSource}$`); - ZodString = class _ZodString extends ZodType { - _parse(input) { - if (this._def.coerce) { - input.data = String(input.data); - } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.string) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.string, - received: ctx2.parsedType - }); - return INVALID; - } - const status = new ParseStatus(); - let ctx = void 0; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.length < check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - if (input.data.length > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "length") { - const tooBig = input.data.length > check.value; - const tooSmall = input.data.length < check.value; - if (tooBig || tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - if (tooBig) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message - }); - } else if (tooSmall) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message - }); - } - status.dirty(); - } - } else if (check.kind === "email") { - if (!emailRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "email", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "emoji") { - if (!emojiRegex) { - emojiRegex = new RegExp(_emojiRegex, "u"); - } - if (!emojiRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "emoji", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "uuid") { - if (!uuidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "uuid", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "nanoid") { - if (!nanoidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "nanoid", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cuid") { - if (!cuidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "cuid", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cuid2") { - if (!cuid2Regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "cuid2", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "ulid") { - if (!ulidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "ulid", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "url") { - try { - new URL(input.data); - } catch { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "url", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "regex") { - check.regex.lastIndex = 0; - const testResult = check.regex.test(input.data); - if (!testResult) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "regex", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "trim") { - input.data = input.data.trim(); - } else if (check.kind === "includes") { - if (!input.data.includes(check.value, check.position)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { includes: check.value, position: check.position }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "toLowerCase") { - input.data = input.data.toLowerCase(); - } else if (check.kind === "toUpperCase") { - input.data = input.data.toUpperCase(); - } else if (check.kind === "startsWith") { - if (!input.data.startsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { startsWith: check.value }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "endsWith") { - if (!input.data.endsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { endsWith: check.value }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "datetime") { - const regex3 = datetimeRegex(check); - if (!regex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: "datetime", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "date") { - const regex3 = dateRegex; - if (!regex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: "date", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "time") { - const regex3 = timeRegex(check); - if (!regex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: "time", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "duration") { - if (!durationRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "duration", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "ip") { - if (!isValidIP(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "ip", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "jwt") { - if (!isValidJWT(input.data, check.alg)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "jwt", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cidr") { - if (!isValidCidr(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "cidr", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "base64") { - if (!base64Regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "base64", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "base64url") { - if (!base64urlRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "base64url", - code: ZodIssueCode.invalid_string, - message: check.message - }); - status.dirty(); - } - } else { - util.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - _regex(regex3, validation, message) { - return this.refinement((data) => regex3.test(data), { - validation, - code: ZodIssueCode.invalid_string, - ...errorUtil.errToObj(message) - }); - } - _addCheck(check) { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - email(message) { - return this._addCheck({ kind: "email", ...errorUtil.errToObj(message) }); - } - url(message) { - return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) }); - } - emoji(message) { - return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) }); - } - uuid(message) { - return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) }); - } - nanoid(message) { - return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message) }); - } - cuid(message) { - return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) }); - } - cuid2(message) { - return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) }); - } - ulid(message) { - return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) }); - } - base64(message) { - return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) }); - } - base64url(message) { - return this._addCheck({ - kind: "base64url", - ...errorUtil.errToObj(message) - }); - } - jwt(options) { - return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) }); - } - ip(options) { - return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) }); - } - cidr(options) { - return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) }); - } - datetime(options) { - if (typeof options === "string") { - return this._addCheck({ - kind: "datetime", - precision: null, - offset: false, - local: false, - message: options - }); - } - return this._addCheck({ - kind: "datetime", - precision: typeof options?.precision === "undefined" ? null : options?.precision, - offset: options?.offset ?? false, - local: options?.local ?? false, - ...errorUtil.errToObj(options?.message) - }); - } - date(message) { - return this._addCheck({ kind: "date", message }); - } - time(options) { - if (typeof options === "string") { - return this._addCheck({ - kind: "time", - precision: null, - message: options - }); - } - return this._addCheck({ - kind: "time", - precision: typeof options?.precision === "undefined" ? null : options?.precision, - ...errorUtil.errToObj(options?.message) - }); - } - duration(message) { - return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) }); - } - regex(regex3, message) { - return this._addCheck({ - kind: "regex", - regex: regex3, - ...errorUtil.errToObj(message) - }); - } - includes(value2, options) { - return this._addCheck({ - kind: "includes", - value: value2, - position: options?.position, - ...errorUtil.errToObj(options?.message) - }); - } - startsWith(value2, message) { - return this._addCheck({ - kind: "startsWith", - value: value2, - ...errorUtil.errToObj(message) - }); - } - endsWith(value2, message) { - return this._addCheck({ - kind: "endsWith", - value: value2, - ...errorUtil.errToObj(message) - }); - } - min(minLength, message) { - return this._addCheck({ - kind: "min", - value: minLength, - ...errorUtil.errToObj(message) - }); - } - max(maxLength, message) { - return this._addCheck({ - kind: "max", - value: maxLength, - ...errorUtil.errToObj(message) - }); - } - length(len, message) { - return this._addCheck({ - kind: "length", - value: len, - ...errorUtil.errToObj(message) - }); - } - /** - * Equivalent to `.min(1)` - */ - nonempty(message) { - return this.min(1, errorUtil.errToObj(message)); - } - trim() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "trim" }] - }); - } - toLowerCase() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "toLowerCase" }] - }); - } - toUpperCase() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "toUpperCase" }] - }); - } - get isDatetime() { - return !!this._def.checks.find((ch) => ch.kind === "datetime"); - } - get isDate() { - return !!this._def.checks.find((ch) => ch.kind === "date"); - } - get isTime() { - return !!this._def.checks.find((ch) => ch.kind === "time"); - } - get isDuration() { - return !!this._def.checks.find((ch) => ch.kind === "duration"); - } - get isEmail() { - return !!this._def.checks.find((ch) => ch.kind === "email"); - } - get isURL() { - return !!this._def.checks.find((ch) => ch.kind === "url"); - } - get isEmoji() { - return !!this._def.checks.find((ch) => ch.kind === "emoji"); - } - get isUUID() { - return !!this._def.checks.find((ch) => ch.kind === "uuid"); - } - get isNANOID() { - return !!this._def.checks.find((ch) => ch.kind === "nanoid"); - } - get isCUID() { - return !!this._def.checks.find((ch) => ch.kind === "cuid"); - } - get isCUID2() { - return !!this._def.checks.find((ch) => ch.kind === "cuid2"); - } - get isULID() { - return !!this._def.checks.find((ch) => ch.kind === "ulid"); - } - get isIP() { - return !!this._def.checks.find((ch) => ch.kind === "ip"); - } - get isCIDR() { - return !!this._def.checks.find((ch) => ch.kind === "cidr"); - } - get isBase64() { - return !!this._def.checks.find((ch) => ch.kind === "base64"); - } - get isBase64url() { - return !!this._def.checks.find((ch) => ch.kind === "base64url"); - } - get minLength() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxLength() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - }; - ZodString.create = (params) => { - return new ZodString({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodString, - coerce: params?.coerce ?? false, - ...processCreateParams(params) - }); - }; - ZodNumber = class _ZodNumber extends ZodType { - constructor() { - super(...arguments); - this.min = this.gte; - this.max = this.lte; - this.step = this.multipleOf; - } - _parse(input) { - if (this._def.coerce) { - input.data = Number(input.data); - } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.number) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.number, - received: ctx2.parsedType - }); - return INVALID; - } - let ctx = void 0; - const status = new ParseStatus(); - for (const check of this._def.checks) { - if (check.kind === "int") { - if (!util.isInteger(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: "integer", - received: "float", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "multipleOf") { - if (floatSafeRemainder(input.data, check.value) !== 0) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.not_multiple_of, - multipleOf: check.value, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "finite") { - if (!Number.isFinite(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.not_finite, - message: check.message - }); - status.dirty(); - } - } else { - util.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - gte(value2, message) { - return this.setLimit("min", value2, true, errorUtil.toString(message)); - } - gt(value2, message) { - return this.setLimit("min", value2, false, errorUtil.toString(message)); - } - lte(value2, message) { - return this.setLimit("max", value2, true, errorUtil.toString(message)); - } - lt(value2, message) { - return this.setLimit("max", value2, false, errorUtil.toString(message)); - } - setLimit(kind, value2, inclusive, message) { - return new _ZodNumber({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value: value2, - inclusive, - message: errorUtil.toString(message) - } - ] - }); - } - _addCheck(check) { - return new _ZodNumber({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - int(message) { - return this._addCheck({ - kind: "int", - message: errorUtil.toString(message) - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: false, - message: errorUtil.toString(message) - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: false, - message: errorUtil.toString(message) - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: true, - message: errorUtil.toString(message) - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: true, - message: errorUtil.toString(message) - }); - } - multipleOf(value2, message) { - return this._addCheck({ - kind: "multipleOf", - value: value2, - message: errorUtil.toString(message) - }); - } - finite(message) { - return this._addCheck({ - kind: "finite", - message: errorUtil.toString(message) - }); - } - safe(message) { - return this._addCheck({ - kind: "min", - inclusive: true, - value: Number.MIN_SAFE_INTEGER, - message: errorUtil.toString(message) - })._addCheck({ - kind: "max", - inclusive: true, - value: Number.MAX_SAFE_INTEGER, - message: errorUtil.toString(message) - }); - } - get minValue() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxValue() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - get isInt() { - return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value)); - } - get isFinite() { - let max = null; - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") { - return true; - } else if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } else if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return Number.isFinite(min) && Number.isFinite(max); - } - }; - ZodNumber.create = (params) => { - return new ZodNumber({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodNumber, - coerce: params?.coerce || false, - ...processCreateParams(params) - }); - }; - ZodBigInt = class _ZodBigInt extends ZodType { - constructor() { - super(...arguments); - this.min = this.gte; - this.max = this.lte; - } - _parse(input) { - if (this._def.coerce) { - try { - input.data = BigInt(input.data); - } catch { - return this._getInvalidInput(input); - } - } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.bigint) { - return this._getInvalidInput(input); - } - let ctx = void 0; - const status = new ParseStatus(); - for (const check of this._def.checks) { - if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - type: "bigint", - minimum: check.value, - inclusive: check.inclusive, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - type: "bigint", - maximum: check.value, - inclusive: check.inclusive, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "multipleOf") { - if (input.data % check.value !== BigInt(0)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.not_multiple_of, - multipleOf: check.value, - message: check.message - }); - status.dirty(); - } - } else { - util.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - _getInvalidInput(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.bigint, - received: ctx.parsedType - }); - return INVALID; - } - gte(value2, message) { - return this.setLimit("min", value2, true, errorUtil.toString(message)); - } - gt(value2, message) { - return this.setLimit("min", value2, false, errorUtil.toString(message)); - } - lte(value2, message) { - return this.setLimit("max", value2, true, errorUtil.toString(message)); - } - lt(value2, message) { - return this.setLimit("max", value2, false, errorUtil.toString(message)); - } - setLimit(kind, value2, inclusive, message) { - return new _ZodBigInt({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value: value2, - inclusive, - message: errorUtil.toString(message) - } - ] - }); - } - _addCheck(check) { - return new _ZodBigInt({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: false, - message: errorUtil.toString(message) - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: false, - message: errorUtil.toString(message) - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: true, - message: errorUtil.toString(message) - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: true, - message: errorUtil.toString(message) - }); - } - multipleOf(value2, message) { - return this._addCheck({ - kind: "multipleOf", - value: value2, - message: errorUtil.toString(message) - }); - } - get minValue() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxValue() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - }; - ZodBigInt.create = (params) => { - return new ZodBigInt({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodBigInt, - coerce: params?.coerce ?? false, - ...processCreateParams(params) - }); - }; - ZodBoolean = class extends ZodType { - _parse(input) { - if (this._def.coerce) { - input.data = Boolean(input.data); - } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.boolean) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.boolean, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodBoolean.create = (params) => { - return new ZodBoolean({ - typeName: ZodFirstPartyTypeKind.ZodBoolean, - coerce: params?.coerce || false, - ...processCreateParams(params) - }); - }; - ZodDate = class _ZodDate extends ZodType { - _parse(input) { - if (this._def.coerce) { - input.data = new Date(input.data); - } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.date) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.date, - received: ctx2.parsedType - }); - return INVALID; - } - if (Number.isNaN(input.data.getTime())) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_date - }); - return INVALID; - } - const status = new ParseStatus(); - let ctx = void 0; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.getTime() < check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - message: check.message, - inclusive: true, - exact: false, - minimum: check.value, - type: "date" - }); - status.dirty(); - } - } else if (check.kind === "max") { - if (input.data.getTime() > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - message: check.message, - inclusive: true, - exact: false, - maximum: check.value, - type: "date" - }); - status.dirty(); - } - } else { - util.assertNever(check); - } - } - return { - status: status.value, - value: new Date(input.data.getTime()) - }; - } - _addCheck(check) { - return new _ZodDate({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - min(minDate, message) { - return this._addCheck({ - kind: "min", - value: minDate.getTime(), - message: errorUtil.toString(message) - }); - } - max(maxDate, message) { - return this._addCheck({ - kind: "max", - value: maxDate.getTime(), - message: errorUtil.toString(message) - }); - } - get minDate() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min != null ? new Date(min) : null; - } - get maxDate() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max != null ? new Date(max) : null; - } - }; - ZodDate.create = (params) => { - return new ZodDate({ - checks: [], - coerce: params?.coerce || false, - typeName: ZodFirstPartyTypeKind.ZodDate, - ...processCreateParams(params) - }); - }; - ZodSymbol = class extends ZodType { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.symbol) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.symbol, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodSymbol.create = (params) => { - return new ZodSymbol({ - typeName: ZodFirstPartyTypeKind.ZodSymbol, - ...processCreateParams(params) - }); - }; - ZodUndefined = class extends ZodType { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.undefined, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodUndefined.create = (params) => { - return new ZodUndefined({ - typeName: ZodFirstPartyTypeKind.ZodUndefined, - ...processCreateParams(params) - }); - }; - ZodNull = class extends ZodType { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.null) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.null, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodNull.create = (params) => { - return new ZodNull({ - typeName: ZodFirstPartyTypeKind.ZodNull, - ...processCreateParams(params) - }); - }; - ZodAny = class extends ZodType { - constructor() { - super(...arguments); - this._any = true; - } - _parse(input) { - return OK(input.data); - } - }; - ZodAny.create = (params) => { - return new ZodAny({ - typeName: ZodFirstPartyTypeKind.ZodAny, - ...processCreateParams(params) - }); - }; - ZodUnknown = class extends ZodType { - constructor() { - super(...arguments); - this._unknown = true; - } - _parse(input) { - return OK(input.data); - } - }; - ZodUnknown.create = (params) => { - return new ZodUnknown({ - typeName: ZodFirstPartyTypeKind.ZodUnknown, - ...processCreateParams(params) - }); - }; - ZodNever = class extends ZodType { - _parse(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.never, - received: ctx.parsedType - }); - return INVALID; - } - }; - ZodNever.create = (params) => { - return new ZodNever({ - typeName: ZodFirstPartyTypeKind.ZodNever, - ...processCreateParams(params) - }); - }; - ZodVoid = class extends ZodType { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.void, - received: ctx.parsedType - }); - return INVALID; - } - return OK(input.data); - } - }; - ZodVoid.create = (params) => { - return new ZodVoid({ - typeName: ZodFirstPartyTypeKind.ZodVoid, - ...processCreateParams(params) - }); - }; - ZodArray = class _ZodArray extends ZodType { - _parse(input) { - const { ctx, status } = this._processInputParams(input); - const def = this._def; - if (ctx.parsedType !== ZodParsedType.array) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.array, - received: ctx.parsedType - }); - return INVALID; - } - if (def.exactLength !== null) { - const tooBig = ctx.data.length > def.exactLength.value; - const tooSmall = ctx.data.length < def.exactLength.value; - if (tooBig || tooSmall) { - addIssueToContext(ctx, { - code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small, - minimum: tooSmall ? def.exactLength.value : void 0, - maximum: tooBig ? def.exactLength.value : void 0, - type: "array", - inclusive: true, - exact: true, - message: def.exactLength.message - }); - status.dirty(); - } - } - if (def.minLength !== null) { - if (ctx.data.length < def.minLength.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: def.minLength.value, - type: "array", - inclusive: true, - exact: false, - message: def.minLength.message - }); - status.dirty(); - } - } - if (def.maxLength !== null) { - if (ctx.data.length > def.maxLength.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: def.maxLength.value, - type: "array", - inclusive: true, - exact: false, - message: def.maxLength.message - }); - status.dirty(); - } - } - if (ctx.common.async) { - return Promise.all([...ctx.data].map((item, i) => { - return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i)); - })).then((result2) => { - return ParseStatus.mergeArray(status, result2); - }); - } - const result = [...ctx.data].map((item, i) => { - return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i)); - }); - return ParseStatus.mergeArray(status, result); - } - get element() { - return this._def.type; - } - min(minLength, message) { - return new _ZodArray({ - ...this._def, - minLength: { value: minLength, message: errorUtil.toString(message) } - }); - } - max(maxLength, message) { - return new _ZodArray({ - ...this._def, - maxLength: { value: maxLength, message: errorUtil.toString(message) } - }); - } - length(len, message) { - return new _ZodArray({ - ...this._def, - exactLength: { value: len, message: errorUtil.toString(message) } - }); - } - nonempty(message) { - return this.min(1, message); - } - }; - ZodArray.create = (schema2, params) => { - return new ZodArray({ - type: schema2, - minLength: null, - maxLength: null, - exactLength: null, - typeName: ZodFirstPartyTypeKind.ZodArray, - ...processCreateParams(params) - }); - }; - ZodObject = class _ZodObject extends ZodType { - constructor() { - super(...arguments); - this._cached = null; - this.nonstrict = this.passthrough; - this.augment = this.extend; - } - _getCached() { - if (this._cached !== null) - return this._cached; - const shape = this._def.shape(); - const keys = util.objectKeys(shape); - this._cached = { shape, keys }; - return this._cached; - } - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.object) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext(ctx2, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx2.parsedType - }); - return INVALID; - } - const { status, ctx } = this._processInputParams(input); - const { shape, keys: shapeKeys } = this._getCached(); - const extraKeys = []; - if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) { - for (const key in ctx.data) { - if (!shapeKeys.includes(key)) { - extraKeys.push(key); - } - } - } - const pairs = []; - for (const key of shapeKeys) { - const keyValidator = shape[key]; - const value2 = ctx.data[key]; - pairs.push({ - key: { status: "valid", value: key }, - value: keyValidator._parse(new ParseInputLazyPath(ctx, value2, ctx.path, key)), - alwaysSet: key in ctx.data - }); - } - if (this._def.catchall instanceof ZodNever) { - const unknownKeys = this._def.unknownKeys; - if (unknownKeys === "passthrough") { - for (const key of extraKeys) { - pairs.push({ - key: { status: "valid", value: key }, - value: { status: "valid", value: ctx.data[key] } - }); - } - } else if (unknownKeys === "strict") { - if (extraKeys.length > 0) { - addIssueToContext(ctx, { - code: ZodIssueCode.unrecognized_keys, - keys: extraKeys - }); - status.dirty(); - } - } else if (unknownKeys === "strip") { - } else { - throw new Error(`Internal ZodObject error: invalid unknownKeys value.`); - } - } else { - const catchall = this._def.catchall; - for (const key of extraKeys) { - const value2 = ctx.data[key]; - pairs.push({ - key: { status: "valid", value: key }, - value: catchall._parse( - new ParseInputLazyPath(ctx, value2, ctx.path, key) - //, ctx.child(key), value, getParsedType(value) - ), - alwaysSet: key in ctx.data - }); - } - } - if (ctx.common.async) { - return Promise.resolve().then(async () => { - const syncPairs = []; - for (const pair of pairs) { - const key = await pair.key; - const value2 = await pair.value; - syncPairs.push({ - key, - value: value2, - alwaysSet: pair.alwaysSet - }); - } - return syncPairs; - }).then((syncPairs) => { - return ParseStatus.mergeObjectSync(status, syncPairs); - }); - } else { - return ParseStatus.mergeObjectSync(status, pairs); - } - } - get shape() { - return this._def.shape(); - } - strict(message) { - errorUtil.errToObj; - return new _ZodObject({ - ...this._def, - unknownKeys: "strict", - ...message !== void 0 ? { - errorMap: (issue2, ctx) => { - const defaultError = this._def.errorMap?.(issue2, ctx).message ?? ctx.defaultError; - if (issue2.code === "unrecognized_keys") - return { - message: errorUtil.errToObj(message).message ?? defaultError - }; - return { - message: defaultError - }; - } - } : {} - }); - } - strip() { - return new _ZodObject({ - ...this._def, - unknownKeys: "strip" - }); - } - passthrough() { - return new _ZodObject({ - ...this._def, - unknownKeys: "passthrough" - }); - } - // const AugmentFactory = - // (def: Def) => - // ( - // augmentation: Augmentation - // ): ZodObject< - // extendShape, Augmentation>, - // Def["unknownKeys"], - // Def["catchall"] - // > => { - // return new ZodObject({ - // ...def, - // shape: () => ({ - // ...def.shape(), - // ...augmentation, - // }), - // }) as any; - // }; - extend(augmentation) { - return new _ZodObject({ - ...this._def, - shape: () => ({ - ...this._def.shape(), - ...augmentation - }) - }); - } - /** - * Prior to zod@1.0.12 there was a bug in the - * inferred type of merged objects. Please - * upgrade if you are experiencing issues. - */ - merge(merging) { - const merged = new _ZodObject({ - unknownKeys: merging._def.unknownKeys, - catchall: merging._def.catchall, - shape: () => ({ - ...this._def.shape(), - ...merging._def.shape() - }), - typeName: ZodFirstPartyTypeKind.ZodObject - }); - return merged; - } - // merge< - // Incoming extends AnyZodObject, - // Augmentation extends Incoming["shape"], - // NewOutput extends { - // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation - // ? Augmentation[k]["_output"] - // : k extends keyof Output - // ? Output[k] - // : never; - // }, - // NewInput extends { - // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation - // ? Augmentation[k]["_input"] - // : k extends keyof Input - // ? Input[k] - // : never; - // } - // >( - // merging: Incoming - // ): ZodObject< - // extendShape>, - // Incoming["_def"]["unknownKeys"], - // Incoming["_def"]["catchall"], - // NewOutput, - // NewInput - // > { - // const merged: any = new ZodObject({ - // unknownKeys: merging._def.unknownKeys, - // catchall: merging._def.catchall, - // shape: () => - // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), - // typeName: ZodFirstPartyTypeKind.ZodObject, - // }) as any; - // return merged; - // } - setKey(key, schema2) { - return this.augment({ [key]: schema2 }); - } - // merge( - // merging: Incoming - // ): //ZodObject = (merging) => { - // ZodObject< - // extendShape>, - // Incoming["_def"]["unknownKeys"], - // Incoming["_def"]["catchall"] - // > { - // // const mergedShape = objectUtil.mergeShapes( - // // this._def.shape(), - // // merging._def.shape() - // // ); - // const merged: any = new ZodObject({ - // unknownKeys: merging._def.unknownKeys, - // catchall: merging._def.catchall, - // shape: () => - // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), - // typeName: ZodFirstPartyTypeKind.ZodObject, - // }) as any; - // return merged; - // } - catchall(index) { - return new _ZodObject({ - ...this._def, - catchall: index - }); - } - pick(mask) { - const shape = {}; - for (const key of util.objectKeys(mask)) { - if (mask[key] && this.shape[key]) { - shape[key] = this.shape[key]; - } - } - return new _ZodObject({ - ...this._def, - shape: () => shape - }); - } - omit(mask) { - const shape = {}; - for (const key of util.objectKeys(this.shape)) { - if (!mask[key]) { - shape[key] = this.shape[key]; - } - } - return new _ZodObject({ - ...this._def, - shape: () => shape - }); - } - /** - * @deprecated - */ - deepPartial() { - return deepPartialify(this); - } - partial(mask) { - const newShape = {}; - for (const key of util.objectKeys(this.shape)) { - const fieldSchema = this.shape[key]; - if (mask && !mask[key]) { - newShape[key] = fieldSchema; - } else { - newShape[key] = fieldSchema.optional(); - } - } - return new _ZodObject({ - ...this._def, - shape: () => newShape - }); - } - required(mask) { - const newShape = {}; - for (const key of util.objectKeys(this.shape)) { - if (mask && !mask[key]) { - newShape[key] = this.shape[key]; - } else { - const fieldSchema = this.shape[key]; - let newField = fieldSchema; - while (newField instanceof ZodOptional) { - newField = newField._def.innerType; - } - newShape[key] = newField; - } - } - return new _ZodObject({ - ...this._def, - shape: () => newShape - }); - } - keyof() { - return createZodEnum(util.objectKeys(this.shape)); - } - }; - ZodObject.create = (shape, params) => { - return new ZodObject({ - shape: () => shape, - unknownKeys: "strip", - catchall: ZodNever.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params) - }); - }; - ZodObject.strictCreate = (shape, params) => { - return new ZodObject({ - shape: () => shape, - unknownKeys: "strict", - catchall: ZodNever.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params) - }); - }; - ZodObject.lazycreate = (shape, params) => { - return new ZodObject({ - shape, - unknownKeys: "strip", - catchall: ZodNever.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params) - }); - }; - ZodUnion = class extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - const options = this._def.options; - function handleResults(results) { - for (const result of results) { - if (result.result.status === "valid") { - return result.result; - } - } - for (const result of results) { - if (result.result.status === "dirty") { - ctx.common.issues.push(...result.ctx.common.issues); - return result.result; - } - } - const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues)); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union, - unionErrors - }); - return INVALID; - } - if (ctx.common.async) { - return Promise.all(options.map(async (option) => { - const childCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] - }, - parent: null - }; - return { - result: await option._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: childCtx - }), - ctx: childCtx - }; - })).then(handleResults); - } else { - let dirty = void 0; - const issues = []; - for (const option of options) { - const childCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] - }, - parent: null - }; - const result = option._parseSync({ - data: ctx.data, - path: ctx.path, - parent: childCtx - }); - if (result.status === "valid") { - return result; - } else if (result.status === "dirty" && !dirty) { - dirty = { result, ctx: childCtx }; - } - if (childCtx.common.issues.length) { - issues.push(childCtx.common.issues); - } - } - if (dirty) { - ctx.common.issues.push(...dirty.ctx.common.issues); - return dirty.result; - } - const unionErrors = issues.map((issues2) => new ZodError(issues2)); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union, - unionErrors - }); - return INVALID; - } - } - get options() { - return this._def.options; - } - }; - ZodUnion.create = (types, params) => { - return new ZodUnion({ - options: types, - typeName: ZodFirstPartyTypeKind.ZodUnion, - ...processCreateParams(params) - }); - }; - getDiscriminator = (type2) => { - if (type2 instanceof ZodLazy) { - return getDiscriminator(type2.schema); - } else if (type2 instanceof ZodEffects) { - return getDiscriminator(type2.innerType()); - } else if (type2 instanceof ZodLiteral) { - return [type2.value]; - } else if (type2 instanceof ZodEnum) { - return type2.options; - } else if (type2 instanceof ZodNativeEnum) { - return util.objectValues(type2.enum); - } else if (type2 instanceof ZodDefault) { - return getDiscriminator(type2._def.innerType); - } else if (type2 instanceof ZodUndefined) { - return [void 0]; - } else if (type2 instanceof ZodNull) { - return [null]; - } else if (type2 instanceof ZodOptional) { - return [void 0, ...getDiscriminator(type2.unwrap())]; - } else if (type2 instanceof ZodNullable) { - return [null, ...getDiscriminator(type2.unwrap())]; - } else if (type2 instanceof ZodBranded) { - return getDiscriminator(type2.unwrap()); - } else if (type2 instanceof ZodReadonly) { - return getDiscriminator(type2.unwrap()); - } else if (type2 instanceof ZodCatch) { - return getDiscriminator(type2._def.innerType); - } else { - return []; - } - }; - ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.object) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx.parsedType - }); - return INVALID; - } - const discriminator = this.discriminator; - const discriminatorValue = ctx.data[discriminator]; - const option = this.optionsMap.get(discriminatorValue); - if (!option) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union_discriminator, - options: Array.from(this.optionsMap.keys()), - path: [discriminator] - }); - return INVALID; - } - if (ctx.common.async) { - return option._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - } else { - return option._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - } - } - get discriminator() { - return this._def.discriminator; - } - get options() { - return this._def.options; - } - get optionsMap() { - return this._def.optionsMap; - } - /** - * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. - * However, it only allows a union of objects, all of which need to share a discriminator property. This property must - * have a different value for each object in the union. - * @param discriminator the name of the discriminator property - * @param types an array of object schemas - * @param params - */ - static create(discriminator, options, params) { - const optionsMap = /* @__PURE__ */ new Map(); - for (const type2 of options) { - const discriminatorValues = getDiscriminator(type2.shape[discriminator]); - if (!discriminatorValues.length) { - throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); - } - for (const value2 of discriminatorValues) { - if (optionsMap.has(value2)) { - throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value2)}`); - } - optionsMap.set(value2, type2); - } - } - return new _ZodDiscriminatedUnion({ - typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion, - discriminator, - options, - optionsMap, - ...processCreateParams(params) - }); - } - }; - ZodIntersection = class extends ZodType { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - const handleParsed = (parsedLeft, parsedRight) => { - if (isAborted(parsedLeft) || isAborted(parsedRight)) { - return INVALID; - } - const merged = mergeValues(parsedLeft.value, parsedRight.value); - if (!merged.valid) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_intersection_types - }); - return INVALID; - } - if (isDirty(parsedLeft) || isDirty(parsedRight)) { - status.dirty(); - } - return { status: status.value, value: merged.data }; - }; - if (ctx.common.async) { - return Promise.all([ - this._def.left._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }), - this._def.right._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }) - ]).then(([left, right]) => handleParsed(left, right)); - } else { - return handleParsed(this._def.left._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }), this._def.right._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - })); - } - } - }; - ZodIntersection.create = (left, right, params) => { - return new ZodIntersection({ - left, - right, - typeName: ZodFirstPartyTypeKind.ZodIntersection, - ...processCreateParams(params) - }); - }; - ZodTuple = class _ZodTuple extends ZodType { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.array) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.array, - received: ctx.parsedType - }); - return INVALID; - } - if (ctx.data.length < this._def.items.length) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: this._def.items.length, - inclusive: true, - exact: false, - type: "array" - }); - return INVALID; - } - const rest = this._def.rest; - if (!rest && ctx.data.length > this._def.items.length) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: this._def.items.length, - inclusive: true, - exact: false, - type: "array" - }); - status.dirty(); - } - const items = [...ctx.data].map((item, itemIndex) => { - const schema2 = this._def.items[itemIndex] || this._def.rest; - if (!schema2) - return null; - return schema2._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex)); - }).filter((x) => !!x); - if (ctx.common.async) { - return Promise.all(items).then((results) => { - return ParseStatus.mergeArray(status, results); - }); - } else { - return ParseStatus.mergeArray(status, items); - } - } - get items() { - return this._def.items; - } - rest(rest) { - return new _ZodTuple({ - ...this._def, - rest - }); - } - }; - ZodTuple.create = (schemas, params) => { - if (!Array.isArray(schemas)) { - throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); - } - return new ZodTuple({ - items: schemas, - typeName: ZodFirstPartyTypeKind.ZodTuple, - rest: null, - ...processCreateParams(params) - }); - }; - ZodRecord = class _ZodRecord extends ZodType { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.object) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx.parsedType - }); - return INVALID; - } - const pairs = []; - const keyType = this._def.keyType; - const valueType = this._def.valueType; - for (const key in ctx.data) { - pairs.push({ - key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)), - value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)), - alwaysSet: key in ctx.data - }); - } - if (ctx.common.async) { - return ParseStatus.mergeObjectAsync(status, pairs); - } else { - return ParseStatus.mergeObjectSync(status, pairs); - } - } - get element() { - return this._def.valueType; - } - static create(first, second, third) { - if (second instanceof ZodType) { - return new _ZodRecord({ - keyType: first, - valueType: second, - typeName: ZodFirstPartyTypeKind.ZodRecord, - ...processCreateParams(third) - }); - } - return new _ZodRecord({ - keyType: ZodString.create(), - valueType: first, - typeName: ZodFirstPartyTypeKind.ZodRecord, - ...processCreateParams(second) - }); - } - }; - ZodMap = class extends ZodType { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.map) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.map, - received: ctx.parsedType - }); - return INVALID; - } - const keyType = this._def.keyType; - const valueType = this._def.valueType; - const pairs = [...ctx.data.entries()].map(([key, value2], index) => { - return { - key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])), - value: valueType._parse(new ParseInputLazyPath(ctx, value2, ctx.path, [index, "value"])) - }; - }); - if (ctx.common.async) { - const finalMap = /* @__PURE__ */ new Map(); - return Promise.resolve().then(async () => { - for (const pair of pairs) { - const key = await pair.key; - const value2 = await pair.value; - if (key.status === "aborted" || value2.status === "aborted") { - return INVALID; - } - if (key.status === "dirty" || value2.status === "dirty") { - status.dirty(); - } - finalMap.set(key.value, value2.value); - } - return { status: status.value, value: finalMap }; - }); - } else { - const finalMap = /* @__PURE__ */ new Map(); - for (const pair of pairs) { - const key = pair.key; - const value2 = pair.value; - if (key.status === "aborted" || value2.status === "aborted") { - return INVALID; - } - if (key.status === "dirty" || value2.status === "dirty") { - status.dirty(); - } - finalMap.set(key.value, value2.value); - } - return { status: status.value, value: finalMap }; - } - } - }; - ZodMap.create = (keyType, valueType, params) => { - return new ZodMap({ - valueType, - keyType, - typeName: ZodFirstPartyTypeKind.ZodMap, - ...processCreateParams(params) - }); - }; - ZodSet = class _ZodSet extends ZodType { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.set) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.set, - received: ctx.parsedType - }); - return INVALID; - } - const def = this._def; - if (def.minSize !== null) { - if (ctx.data.size < def.minSize.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: def.minSize.value, - type: "set", - inclusive: true, - exact: false, - message: def.minSize.message - }); - status.dirty(); - } - } - if (def.maxSize !== null) { - if (ctx.data.size > def.maxSize.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: def.maxSize.value, - type: "set", - inclusive: true, - exact: false, - message: def.maxSize.message - }); - status.dirty(); - } - } - const valueType = this._def.valueType; - function finalizeSet(elements2) { - const parsedSet = /* @__PURE__ */ new Set(); - for (const element of elements2) { - if (element.status === "aborted") - return INVALID; - if (element.status === "dirty") - status.dirty(); - parsedSet.add(element.value); - } - return { status: status.value, value: parsedSet }; - } - const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i))); - if (ctx.common.async) { - return Promise.all(elements).then((elements2) => finalizeSet(elements2)); - } else { - return finalizeSet(elements); - } - } - min(minSize, message) { - return new _ZodSet({ - ...this._def, - minSize: { value: minSize, message: errorUtil.toString(message) } - }); - } - max(maxSize, message) { - return new _ZodSet({ - ...this._def, - maxSize: { value: maxSize, message: errorUtil.toString(message) } - }); - } - size(size, message) { - return this.min(size, message).max(size, message); - } - nonempty(message) { - return this.min(1, message); - } - }; - ZodSet.create = (valueType, params) => { - return new ZodSet({ - valueType, - minSize: null, - maxSize: null, - typeName: ZodFirstPartyTypeKind.ZodSet, - ...processCreateParams(params) - }); - }; - ZodFunction = class _ZodFunction extends ZodType { - constructor() { - super(...arguments); - this.validate = this.implement; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.function) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.function, - received: ctx.parsedType - }); - return INVALID; - } - function makeArgsIssue(args2, error41) { - return makeIssue({ - data: args2, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x), - issueData: { - code: ZodIssueCode.invalid_arguments, - argumentsError: error41 - } - }); - } - function makeReturnsIssue(returns, error41) { - return makeIssue({ - data: returns, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x), - issueData: { - code: ZodIssueCode.invalid_return_type, - returnTypeError: error41 - } - }); - } - const params = { errorMap: ctx.common.contextualErrorMap }; - const fn2 = ctx.data; - if (this._def.returns instanceof ZodPromise) { - const me = this; - return OK(async function(...args2) { - const error41 = new ZodError([]); - const parsedArgs = await me._def.args.parseAsync(args2, params).catch((e) => { - error41.addIssue(makeArgsIssue(args2, e)); - throw error41; - }); - const result = await Reflect.apply(fn2, this, parsedArgs); - const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => { - error41.addIssue(makeReturnsIssue(result, e)); - throw error41; - }); - return parsedReturns; - }); - } else { - const me = this; - return OK(function(...args2) { - const parsedArgs = me._def.args.safeParse(args2, params); - if (!parsedArgs.success) { - throw new ZodError([makeArgsIssue(args2, parsedArgs.error)]); - } - const result = Reflect.apply(fn2, this, parsedArgs.data); - const parsedReturns = me._def.returns.safeParse(result, params); - if (!parsedReturns.success) { - throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]); - } - return parsedReturns.data; - }); - } - } - parameters() { - return this._def.args; - } - returnType() { - return this._def.returns; - } - args(...items) { - return new _ZodFunction({ - ...this._def, - args: ZodTuple.create(items).rest(ZodUnknown.create()) - }); - } - returns(returnType) { - return new _ZodFunction({ - ...this._def, - returns: returnType - }); - } - implement(func) { - const validatedFunc = this.parse(func); - return validatedFunc; - } - strictImplement(func) { - const validatedFunc = this.parse(func); - return validatedFunc; - } - static create(args2, returns, params) { - return new _ZodFunction({ - args: args2 ? args2 : ZodTuple.create([]).rest(ZodUnknown.create()), - returns: returns || ZodUnknown.create(), - typeName: ZodFirstPartyTypeKind.ZodFunction, - ...processCreateParams(params) - }); - } - }; - ZodLazy = class extends ZodType { - get schema() { - return this._def.getter(); - } - _parse(input) { - const { ctx } = this._processInputParams(input); - const lazySchema = this._def.getter(); - return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx }); - } - }; - ZodLazy.create = (getter, params) => { - return new ZodLazy({ - getter, - typeName: ZodFirstPartyTypeKind.ZodLazy, - ...processCreateParams(params) - }); - }; - ZodLiteral = class extends ZodType { - _parse(input) { - if (input.data !== this._def.value) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_literal, - expected: this._def.value - }); - return INVALID; - } - return { status: "valid", value: input.data }; - } - get value() { - return this._def.value; - } - }; - ZodLiteral.create = (value2, params) => { - return new ZodLiteral({ - value: value2, - typeName: ZodFirstPartyTypeKind.ZodLiteral, - ...processCreateParams(params) - }); - }; - ZodEnum = class _ZodEnum extends ZodType { - _parse(input) { - if (typeof input.data !== "string") { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext(ctx, { - expected: util.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode.invalid_type - }); - return INVALID; - } - if (!this._cache) { - this._cache = new Set(this._def.values); - } - if (!this._cache.has(input.data)) { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_enum_value, - options: expectedValues - }); - return INVALID; - } - return OK(input.data); - } - get options() { - return this._def.values; - } - get enum() { - const enumValues2 = {}; - for (const val of this._def.values) { - enumValues2[val] = val; - } - return enumValues2; - } - get Values() { - const enumValues2 = {}; - for (const val of this._def.values) { - enumValues2[val] = val; - } - return enumValues2; - } - get Enum() { - const enumValues2 = {}; - for (const val of this._def.values) { - enumValues2[val] = val; - } - return enumValues2; - } - extract(values, newDef = this._def) { - return _ZodEnum.create(values, { - ...this._def, - ...newDef - }); - } - exclude(values, newDef = this._def) { - return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), { - ...this._def, - ...newDef - }); - } - }; - ZodEnum.create = createZodEnum; - ZodNativeEnum = class extends ZodType { - _parse(input) { - const nativeEnumValues = util.getValidEnumValues(this._def.values); - const ctx = this._getOrReturnCtx(input); - if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) { - const expectedValues = util.objectValues(nativeEnumValues); - addIssueToContext(ctx, { - expected: util.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode.invalid_type - }); - return INVALID; - } - if (!this._cache) { - this._cache = new Set(util.getValidEnumValues(this._def.values)); - } - if (!this._cache.has(input.data)) { - const expectedValues = util.objectValues(nativeEnumValues); - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_enum_value, - options: expectedValues - }); - return INVALID; - } - return OK(input.data); - } - get enum() { - return this._def.values; - } - }; - ZodNativeEnum.create = (values, params) => { - return new ZodNativeEnum({ - values, - typeName: ZodFirstPartyTypeKind.ZodNativeEnum, - ...processCreateParams(params) - }); - }; - ZodPromise = class extends ZodType { - unwrap() { - return this._def.type; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.promise, - received: ctx.parsedType - }); - return INVALID; - } - const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data); - return OK(promisified.then((data) => { - return this._def.type.parseAsync(data, { - path: ctx.path, - errorMap: ctx.common.contextualErrorMap - }); - })); - } - }; - ZodPromise.create = (schema2, params) => { - return new ZodPromise({ - type: schema2, - typeName: ZodFirstPartyTypeKind.ZodPromise, - ...processCreateParams(params) - }); - }; - ZodEffects = class extends ZodType { - innerType() { - return this._def.schema; - } - sourceType() { - return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - const effect = this._def.effect || null; - const checkCtx = { - addIssue: (arg) => { - addIssueToContext(ctx, arg); - if (arg.fatal) { - status.abort(); - } else { - status.dirty(); - } - }, - get path() { - return ctx.path; - } - }; - checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx); - if (effect.type === "preprocess") { - const processed = effect.transform(ctx.data, checkCtx); - if (ctx.common.async) { - return Promise.resolve(processed).then(async (processed2) => { - if (status.value === "aborted") - return INVALID; - const result = await this._def.schema._parseAsync({ - data: processed2, - path: ctx.path, - parent: ctx - }); - if (result.status === "aborted") - return INVALID; - if (result.status === "dirty") - return DIRTY(result.value); - if (status.value === "dirty") - return DIRTY(result.value); - return result; - }); - } else { - if (status.value === "aborted") - return INVALID; - const result = this._def.schema._parseSync({ - data: processed, - path: ctx.path, - parent: ctx - }); - if (result.status === "aborted") - return INVALID; - if (result.status === "dirty") - return DIRTY(result.value); - if (status.value === "dirty") - return DIRTY(result.value); - return result; - } - } - if (effect.type === "refinement") { - const executeRefinement = (acc) => { - const result = effect.refinement(acc, checkCtx); - if (ctx.common.async) { - return Promise.resolve(result); - } - if (result instanceof Promise) { - throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); - } - return acc; - }; - if (ctx.common.async === false) { - const inner = this._def.schema._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (inner.status === "aborted") - return INVALID; - if (inner.status === "dirty") - status.dirty(); - executeRefinement(inner.value); - return { status: status.value, value: inner.value }; - } else { - return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => { - if (inner.status === "aborted") - return INVALID; - if (inner.status === "dirty") - status.dirty(); - return executeRefinement(inner.value).then(() => { - return { status: status.value, value: inner.value }; - }); - }); - } - } - if (effect.type === "transform") { - if (ctx.common.async === false) { - const base = this._def.schema._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (!isValid(base)) - return INVALID; - const result = effect.transform(base.value, checkCtx); - if (result instanceof Promise) { - throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`); - } - return { status: status.value, value: result }; - } else { - return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => { - if (!isValid(base)) - return INVALID; - return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ - status: status.value, - value: result - })); - }); - } - } - util.assertNever(effect); - } - }; - ZodEffects.create = (schema2, effect, params) => { - return new ZodEffects({ - schema: schema2, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect, - ...processCreateParams(params) - }); - }; - ZodEffects.createWithPreprocess = (preprocess, schema2, params) => { - return new ZodEffects({ - schema: schema2, - effect: { type: "preprocess", transform: preprocess }, - typeName: ZodFirstPartyTypeKind.ZodEffects, - ...processCreateParams(params) - }); - }; - ZodOptional = class extends ZodType { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 === ZodParsedType.undefined) { - return OK(void 0); - } - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } - }; - ZodOptional.create = (type2, params) => { - return new ZodOptional({ - innerType: type2, - typeName: ZodFirstPartyTypeKind.ZodOptional, - ...processCreateParams(params) - }); - }; - ZodNullable = class extends ZodType { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 === ZodParsedType.null) { - return OK(null); - } - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } - }; - ZodNullable.create = (type2, params) => { - return new ZodNullable({ - innerType: type2, - typeName: ZodFirstPartyTypeKind.ZodNullable, - ...processCreateParams(params) - }); - }; - ZodDefault = class extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - let data = ctx.data; - if (ctx.parsedType === ZodParsedType.undefined) { - data = this._def.defaultValue(); - } - return this._def.innerType._parse({ - data, - path: ctx.path, - parent: ctx - }); - } - removeDefault() { - return this._def.innerType; - } - }; - ZodDefault.create = (type2, params) => { - return new ZodDefault({ - innerType: type2, - typeName: ZodFirstPartyTypeKind.ZodDefault, - defaultValue: typeof params.default === "function" ? params.default : () => params.default, - ...processCreateParams(params) - }); - }; - ZodCatch = class extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - const newCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] - } - }; - const result = this._def.innerType._parse({ - data: newCtx.data, - path: newCtx.path, - parent: { - ...newCtx - } - }); - if (isAsync(result)) { - return result.then((result2) => { - return { - status: "valid", - value: result2.status === "valid" ? result2.value : this._def.catchValue({ - get error() { - return new ZodError(newCtx.common.issues); - }, - input: newCtx.data - }) - }; - }); - } else { - return { - status: "valid", - value: result.status === "valid" ? result.value : this._def.catchValue({ - get error() { - return new ZodError(newCtx.common.issues); - }, - input: newCtx.data - }) - }; - } - } - removeCatch() { - return this._def.innerType; - } - }; - ZodCatch.create = (type2, params) => { - return new ZodCatch({ - innerType: type2, - typeName: ZodFirstPartyTypeKind.ZodCatch, - catchValue: typeof params.catch === "function" ? params.catch : () => params.catch, - ...processCreateParams(params) - }); - }; - ZodNaN = class extends ZodType { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.nan) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.nan, - received: ctx.parsedType - }); - return INVALID; - } - return { status: "valid", value: input.data }; - } - }; - ZodNaN.create = (params) => { - return new ZodNaN({ - typeName: ZodFirstPartyTypeKind.ZodNaN, - ...processCreateParams(params) - }); - }; - BRAND = Symbol("zod_brand"); - ZodBranded = class extends ZodType { - _parse(input) { - const { ctx } = this._processInputParams(input); - const data = ctx.data; - return this._def.type._parse({ - data, - path: ctx.path, - parent: ctx - }); - } - unwrap() { - return this._def.type; - } - }; - ZodPipeline = class _ZodPipeline extends ZodType { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.common.async) { - const handleAsync = async () => { - const inResult = await this._def.in._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (inResult.status === "aborted") - return INVALID; - if (inResult.status === "dirty") { - status.dirty(); - return DIRTY(inResult.value); - } else { - return this._def.out._parseAsync({ - data: inResult.value, - path: ctx.path, - parent: ctx - }); - } - }; - return handleAsync(); - } else { - const inResult = this._def.in._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (inResult.status === "aborted") - return INVALID; - if (inResult.status === "dirty") { - status.dirty(); - return { - status: "dirty", - value: inResult.value - }; - } else { - return this._def.out._parseSync({ - data: inResult.value, - path: ctx.path, - parent: ctx - }); - } - } - } - static create(a, b) { - return new _ZodPipeline({ - in: a, - out: b, - typeName: ZodFirstPartyTypeKind.ZodPipeline - }); - } - }; - ZodReadonly = class extends ZodType { - _parse(input) { - const result = this._def.innerType._parse(input); - const freeze = (data) => { - if (isValid(data)) { - data.value = Object.freeze(data.value); - } - return data; - }; - return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result); - } - unwrap() { - return this._def.innerType; - } - }; - ZodReadonly.create = (type2, params) => { - return new ZodReadonly({ - innerType: type2, - typeName: ZodFirstPartyTypeKind.ZodReadonly, - ...processCreateParams(params) - }); - }; - late = { - object: ZodObject.lazycreate - }; - (function(ZodFirstPartyTypeKind3) { - ZodFirstPartyTypeKind3["ZodString"] = "ZodString"; - ZodFirstPartyTypeKind3["ZodNumber"] = "ZodNumber"; - ZodFirstPartyTypeKind3["ZodNaN"] = "ZodNaN"; - ZodFirstPartyTypeKind3["ZodBigInt"] = "ZodBigInt"; - ZodFirstPartyTypeKind3["ZodBoolean"] = "ZodBoolean"; - ZodFirstPartyTypeKind3["ZodDate"] = "ZodDate"; - ZodFirstPartyTypeKind3["ZodSymbol"] = "ZodSymbol"; - ZodFirstPartyTypeKind3["ZodUndefined"] = "ZodUndefined"; - ZodFirstPartyTypeKind3["ZodNull"] = "ZodNull"; - ZodFirstPartyTypeKind3["ZodAny"] = "ZodAny"; - ZodFirstPartyTypeKind3["ZodUnknown"] = "ZodUnknown"; - ZodFirstPartyTypeKind3["ZodNever"] = "ZodNever"; - ZodFirstPartyTypeKind3["ZodVoid"] = "ZodVoid"; - ZodFirstPartyTypeKind3["ZodArray"] = "ZodArray"; - ZodFirstPartyTypeKind3["ZodObject"] = "ZodObject"; - ZodFirstPartyTypeKind3["ZodUnion"] = "ZodUnion"; - ZodFirstPartyTypeKind3["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion"; - ZodFirstPartyTypeKind3["ZodIntersection"] = "ZodIntersection"; - ZodFirstPartyTypeKind3["ZodTuple"] = "ZodTuple"; - ZodFirstPartyTypeKind3["ZodRecord"] = "ZodRecord"; - ZodFirstPartyTypeKind3["ZodMap"] = "ZodMap"; - ZodFirstPartyTypeKind3["ZodSet"] = "ZodSet"; - ZodFirstPartyTypeKind3["ZodFunction"] = "ZodFunction"; - ZodFirstPartyTypeKind3["ZodLazy"] = "ZodLazy"; - ZodFirstPartyTypeKind3["ZodLiteral"] = "ZodLiteral"; - ZodFirstPartyTypeKind3["ZodEnum"] = "ZodEnum"; - ZodFirstPartyTypeKind3["ZodEffects"] = "ZodEffects"; - ZodFirstPartyTypeKind3["ZodNativeEnum"] = "ZodNativeEnum"; - ZodFirstPartyTypeKind3["ZodOptional"] = "ZodOptional"; - ZodFirstPartyTypeKind3["ZodNullable"] = "ZodNullable"; - ZodFirstPartyTypeKind3["ZodDefault"] = "ZodDefault"; - ZodFirstPartyTypeKind3["ZodCatch"] = "ZodCatch"; - ZodFirstPartyTypeKind3["ZodPromise"] = "ZodPromise"; - ZodFirstPartyTypeKind3["ZodBranded"] = "ZodBranded"; - ZodFirstPartyTypeKind3["ZodPipeline"] = "ZodPipeline"; - ZodFirstPartyTypeKind3["ZodReadonly"] = "ZodReadonly"; - })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); - instanceOfType = (cls, params = { - message: `Input not instance of ${cls.name}` - }) => custom((data) => data instanceof cls, params); - stringType = ZodString.create; - numberType = ZodNumber.create; - nanType = ZodNaN.create; - bigIntType = ZodBigInt.create; - booleanType = ZodBoolean.create; - dateType = ZodDate.create; - symbolType = ZodSymbol.create; - undefinedType = ZodUndefined.create; - nullType = ZodNull.create; - anyType = ZodAny.create; - unknownType = ZodUnknown.create; - neverType = ZodNever.create; - voidType = ZodVoid.create; - arrayType = ZodArray.create; - objectType = ZodObject.create; - strictObjectType = ZodObject.strictCreate; - unionType = ZodUnion.create; - discriminatedUnionType = ZodDiscriminatedUnion.create; - intersectionType = ZodIntersection.create; - tupleType = ZodTuple.create; - recordType = ZodRecord.create; - mapType = ZodMap.create; - setType = ZodSet.create; - functionType = ZodFunction.create; - lazyType = ZodLazy.create; - literalType = ZodLiteral.create; - enumType = ZodEnum.create; - nativeEnumType = ZodNativeEnum.create; - promiseType = ZodPromise.create; - effectsType = ZodEffects.create; - optionalType = ZodOptional.create; - nullableType = ZodNullable.create; - preprocessType = ZodEffects.createWithPreprocess; - pipelineType = ZodPipeline.create; - ostring = () => stringType().optional(); - onumber = () => numberType().optional(); - oboolean = () => booleanType().optional(); - coerce = { - string: ((arg) => ZodString.create({ ...arg, coerce: true })), - number: ((arg) => ZodNumber.create({ ...arg, coerce: true })), - boolean: ((arg) => ZodBoolean.create({ - ...arg, - coerce: true - })), - bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })), - date: ((arg) => ZodDate.create({ ...arg, coerce: true })) - }; - NEVER = INVALID; - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js -var external_exports = {}; -__export(external_exports, { - BRAND: () => BRAND, - DIRTY: () => DIRTY, - EMPTY_PATH: () => EMPTY_PATH, - INVALID: () => INVALID, - NEVER: () => NEVER, - OK: () => OK, - ParseStatus: () => ParseStatus, - Schema: () => ZodType, - ZodAny: () => ZodAny, - ZodArray: () => ZodArray, - ZodBigInt: () => ZodBigInt, - ZodBoolean: () => ZodBoolean, - ZodBranded: () => ZodBranded, - ZodCatch: () => ZodCatch, - ZodDate: () => ZodDate, - ZodDefault: () => ZodDefault, - ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, - ZodEffects: () => ZodEffects, - ZodEnum: () => ZodEnum, - ZodError: () => ZodError, - ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, - ZodFunction: () => ZodFunction, - ZodIntersection: () => ZodIntersection, - ZodIssueCode: () => ZodIssueCode, - ZodLazy: () => ZodLazy, - ZodLiteral: () => ZodLiteral, - ZodMap: () => ZodMap, - ZodNaN: () => ZodNaN, - ZodNativeEnum: () => ZodNativeEnum, - ZodNever: () => ZodNever, - ZodNull: () => ZodNull, - ZodNullable: () => ZodNullable, - ZodNumber: () => ZodNumber, - ZodObject: () => ZodObject, - ZodOptional: () => ZodOptional, - ZodParsedType: () => ZodParsedType, - ZodPipeline: () => ZodPipeline, - ZodPromise: () => ZodPromise, - ZodReadonly: () => ZodReadonly, - ZodRecord: () => ZodRecord, - ZodSchema: () => ZodType, - ZodSet: () => ZodSet, - ZodString: () => ZodString, - ZodSymbol: () => ZodSymbol, - ZodTransformer: () => ZodEffects, - ZodTuple: () => ZodTuple, - ZodType: () => ZodType, - ZodUndefined: () => ZodUndefined, - ZodUnion: () => ZodUnion, - ZodUnknown: () => ZodUnknown, - ZodVoid: () => ZodVoid, - addIssueToContext: () => addIssueToContext, - any: () => anyType, - array: () => arrayType, - bigint: () => bigIntType, - boolean: () => booleanType, - coerce: () => coerce, - custom: () => custom, - date: () => dateType, - datetimeRegex: () => datetimeRegex, - defaultErrorMap: () => en_default, - discriminatedUnion: () => discriminatedUnionType, - effect: () => effectsType, - enum: () => enumType, - function: () => functionType, - getErrorMap: () => getErrorMap, - getParsedType: () => getParsedType, - instanceof: () => instanceOfType, - intersection: () => intersectionType, - isAborted: () => isAborted, - isAsync: () => isAsync, - isDirty: () => isDirty, - isValid: () => isValid, - late: () => late, - lazy: () => lazyType, - literal: () => literalType, - makeIssue: () => makeIssue, - map: () => mapType, - nan: () => nanType, - nativeEnum: () => nativeEnumType, - never: () => neverType, - null: () => nullType, - nullable: () => nullableType, - number: () => numberType, - object: () => objectType, - objectUtil: () => objectUtil, - oboolean: () => oboolean, - onumber: () => onumber, - optional: () => optionalType, - ostring: () => ostring, - pipeline: () => pipelineType, - preprocess: () => preprocessType, - promise: () => promiseType, - quotelessJson: () => quotelessJson, - record: () => recordType, - set: () => setType, - setErrorMap: () => setErrorMap, - strictObject: () => strictObjectType, - string: () => stringType, - symbol: () => symbolType, - transformer: () => effectsType, - tuple: () => tupleType, - undefined: () => undefinedType, - union: () => unionType, - unknown: () => unknownType, - util: () => util, - void: () => voidType -}); -var init_external = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js"() { - init_errors(); - init_parseUtil(); - init_typeAliases(); - init_util(); - init_types(); - init_ZodError(); - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js -var init_zod = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js"() { - init_external(); - init_external(); - } -}); - // ../node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js var require_uri_all = __commonJS({ "../node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js"(exports, module) { @@ -4282,26 +176,26 @@ var require_uri_all = __commonJS({ } return result; } - function mapDomain(string3, fn2) { - var parts = string3.split("@"); + function mapDomain(string4, fn2) { + var parts = string4.split("@"); var result = ""; if (parts.length > 1) { result = parts[0] + "@"; - string3 = parts[1]; + string4 = parts[1]; } - string3 = string3.replace(regexSeparators, "."); - var labels = string3.split("."); + string4 = string4.replace(regexSeparators, "."); + var labels = string4.split("."); var encoded = map(labels, fn2).join("."); return result + encoded; } - function ucs2decode(string3) { + function ucs2decode(string4) { var output = []; var counter = 0; - var length = string3.length; + var length = string4.length; while (counter < length) { - var value2 = string3.charCodeAt(counter++); + var value2 = string4.charCodeAt(counter++); if (value2 >= 55296 && value2 <= 56319 && counter < length) { - var extra = string3.charCodeAt(counter++); + var extra = string4.charCodeAt(counter++); if ((extra & 64512) == 56320) { output.push(((value2 & 1023) << 10) + (extra & 1023) + 65536); } else { @@ -4346,7 +240,7 @@ var require_uri_all = __commonJS({ } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }; - var decode = function decode2(input) { + var decode2 = function decode3(input) { var output = []; var inputLength = input.length; var i = 0; @@ -4399,7 +293,7 @@ var require_uri_all = __commonJS({ } return String.fromCodePoint.apply(String, output); }; - var encode = function encode2(input) { + var encode2 = function encode3(input) { var output = []; input = ucs2decode(input); var inputLength = input.length; @@ -4519,13 +413,13 @@ var require_uri_all = __commonJS({ return output.join(""); }; var toUnicode = function toUnicode2(input) { - return mapDomain(input, function(string3) { - return regexPunycode.test(string3) ? decode(string3.slice(4).toLowerCase()) : string3; + return mapDomain(input, function(string4) { + return regexPunycode.test(string4) ? decode2(string4.slice(4).toLowerCase()) : string4; }); }; var toASCII = function toASCII2(input) { - return mapDomain(input, function(string3) { - return regexNonASCII.test(string3) ? "xn--" + encode(string3) : string3; + return mapDomain(input, function(string4) { + return regexNonASCII.test(string4) ? "xn--" + encode2(string4) : string4; }); }; var punycode = { @@ -4546,8 +440,8 @@ var require_uri_all = __commonJS({ "decode": ucs2decode, "encode": ucs2encode }, - "decode": decode, - "encode": encode, + "decode": decode2, + "encode": encode2, "toASCII": toASCII, "toUnicode": toUnicode }; @@ -4668,7 +562,7 @@ var require_uri_all = __commonJS({ } var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0; - function parse4(uriString) { + function parse6(uriString) { var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; var components = {}; var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; @@ -4837,8 +731,8 @@ var require_uri_all = __commonJS({ var skipNormalization = arguments[3]; var target = {}; if (!skipNormalization) { - base2 = parse4(serialize(base2, options), options); - relative = parse4(serialize(relative, options), options); + base2 = parse6(serialize(base2, options), options); + relative = parse6(serialize(relative, options), options); } options = options || {}; if (!options.tolerant && relative.scheme) { @@ -4889,24 +783,24 @@ var require_uri_all = __commonJS({ } function resolve(baseURI, relativeURI, options) { var schemelessOptions = assign({ scheme: "null" }, options); - return serialize(resolveComponents(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); + return serialize(resolveComponents(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); } function normalize2(uri, options) { if (typeof uri === "string") { - uri = serialize(parse4(uri, options), options); + uri = serialize(parse6(uri, options), options); } else if (typeOf(uri) === "object") { - uri = parse4(serialize(uri, options), options); + uri = parse6(serialize(uri, options), options); } return uri; } function equal(uriA, uriB, options) { if (typeof uriA === "string") { - uriA = serialize(parse4(uriA, options), options); + uriA = serialize(parse6(uriA, options), options); } else if (typeOf(uriA) === "object") { uriA = serialize(uriA, options); } if (typeof uriB === "string") { - uriB = serialize(parse4(uriB, options), options); + uriB = serialize(parse6(uriB, options), options); } else if (typeOf(uriB) === "object") { uriB = serialize(uriB, options); } @@ -4921,7 +815,7 @@ var require_uri_all = __commonJS({ var handler2 = { scheme: "http", domainHost: true, - parse: function parse5(components, options) { + parse: function parse7(components, options) { if (!components.host) { components.error = components.error || "HTTP URIs must have a host."; } @@ -4950,7 +844,7 @@ var require_uri_all = __commonJS({ var handler$2 = { scheme: "ws", domainHost: true, - parse: function parse5(components, options) { + parse: function parse7(components, options) { var wsComponents = components; wsComponents.secure = isSecure(wsComponents); wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); @@ -5123,7 +1017,7 @@ var require_uri_all = __commonJS({ var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; var handler$6 = { scheme: "urn:uuid", - parse: function parse5(urnComponents, options) { + parse: function parse7(urnComponents, options) { var uuidComponents = urnComponents; uuidComponents.uuid = uuidComponents.nss; uuidComponents.nss = void 0; @@ -5148,7 +1042,7 @@ var require_uri_all = __commonJS({ exports2.SCHEMES = SCHEMES; exports2.pctEncChar = pctEncChar; exports2.pctDecChars = pctDecChars; - exports2.parse = parse4; + exports2.parse = parse6; exports2.removeDotSegments = removeDotSegments; exports2.serialize = serialize; exports2.resolveComponents = resolveComponents; @@ -6615,8 +2509,8 @@ var require_formats = __commonJS({ "relative-json-pointer": RELATIVE_JSON_POINTER }; formats.full = { - date: date2, - time: time2, + date: date4, + time: time4, "date-time": date_time, uri, "uri-reference": URIREF, @@ -6635,7 +2529,7 @@ var require_formats = __commonJS({ function isLeapYear(year) { return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } - function date2(str) { + function date4(str) { var matches = str.match(DATE); if (!matches) return false; var year = +matches[1]; @@ -6643,7 +2537,7 @@ var require_formats = __commonJS({ var day = +matches[3]; return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); } - function time2(str, full) { + function time4(str, full) { var matches = str.match(TIME); if (!matches) return false; var hour = matches[1]; @@ -6655,7 +2549,7 @@ var require_formats = __commonJS({ var DATE_TIME_SEPARATOR = /t|\s/i; function date_time(str) { var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date2(dateTime[0]) && time2(dateTime[1], true); + return dateTime.length == 2 && date4(dateTime[0]) && time4(dateTime[1], true); } var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { @@ -10204,8 +6098,8 @@ var require_ajv = __commonJS({ throw new Error("schema should be object or boolean"); var serialize = this._opts.serialize; var cacheKey = serialize ? serialize(schema2) : schema2; - var cached3 = this._cache.get(cacheKey); - if (cached3) return cached3; + var cached4 = this._cache.get(cacheKey); + if (cached4) return cached4; shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; var id = resolve.normalizeId(this._getId(schema2)); if (id && shouldAddSchema) checkUnique(this, id); @@ -11956,14 +7850,14 @@ var require_diagnostics = __commonJS({ "undici:client:beforeConnect", (evt) => { const { - connectParams: { version: version2, protocol, port, host } + connectParams: { version: version3, protocol, port, host } } = evt; debugLog( "connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, - version2 + version3 ); } ); @@ -11971,14 +7865,14 @@ var require_diagnostics = __commonJS({ "undici:client:connected", (evt) => { const { - connectParams: { version: version2, protocol, port, host } + connectParams: { version: version3, protocol, port, host } } = evt; debugLog( "connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, - version2 + version3 ); } ); @@ -11986,16 +7880,16 @@ var require_diagnostics = __commonJS({ "undici:client:connectError", (evt) => { const { - connectParams: { version: version2, protocol, port, host }, - error: error41 + connectParams: { version: version3, protocol, port, host }, + error: error42 } = evt; debugLog( "connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, - version2, - error41.message + version3, + error42.message ); } ); @@ -12045,14 +7939,14 @@ var require_diagnostics = __commonJS({ (evt) => { const { request: { method, path, origin }, - error: error41 + error: error42 } = evt; debugLog( "request to %s %s%s errored - %s", method, origin, path, - error41.message + error42.message ); } ); @@ -12358,16 +8252,16 @@ var require_request = __commonJS({ this.onError(err); } } - onError(error41) { + onError(error42) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error41 }); + channels.error.publish({ request: this, error: error42 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error41); + return this[kHandler].onError(error42); } onFinally() { if (this.errorHandler) { @@ -12837,14 +8731,14 @@ var require_connect = __commonJS({ const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); timeout = timeout == null ? 1e4 : timeout; allowH2 = allowH2 != null ? allowH2 : false; - return function connect({ hostname: hostname2, host, protocol, port, servername, localAddress, httpSocket }, callback) { + return function connect({ hostname: hostname3, host, protocol, port, servername, localAddress, httpSocket }, callback) { let socket; if (protocol === "https:") { if (!tls) { tls = __require("node:tls"); } servername = servername || options.servername || util2.getServerName(host) || null; - const sessionKey = servername || hostname2; + const sessionKey = servername || hostname3; assert2(sessionKey); const session = customSession || sessionCache.get(sessionKey) || null; port = port || 443; @@ -12859,7 +8753,7 @@ var require_connect = __commonJS({ socket: httpSocket, // upgrade socket connection port, - host: hostname2 + host: hostname3 }); socket.on("session", function(session2) { sessionCache.set(sessionKey, session2); @@ -12873,14 +8767,14 @@ var require_connect = __commonJS({ ...options, localAddress, port, - host: hostname2 + host: hostname3 }); } if (options.keepAlive == null || options.keepAlive) { const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; socket.setKeepAlive(true, keepAliveInitialDelay); } - const clearConnectTimeout = util2.setupConnectTimeout(new WeakRef(socket), { timeout, hostname: hostname2, port }); + const clearConnectTimeout = util2.setupConnectTimeout(new WeakRef(socket), { timeout, hostname: hostname3, port }); socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { queueMicrotask(clearConnectTimeout); if (callback) { @@ -17698,8 +13592,8 @@ var require_client_h2 = __commonJS({ } } let stream = null; - const { hostname: hostname2, port } = client[kUrl]; - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname2}${port ? `:${port}` : ""}`; + const { hostname: hostname3, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname3}${port ? `:${port}` : ""}`; headers[HTTP2_HEADER_METHOD] = method; const abort = (err) => { if (request2.aborted || request2.completed) { @@ -17956,8 +13850,8 @@ var require_client_h2 = __commonJS({ } request2.onRequestSent(); client[kResume](); - } catch (error41) { - abort(error41); + } catch (error42) { + abort(error42); } } function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) { @@ -18352,20 +14246,20 @@ var require_client = __commonJS({ function connect(client) { assert2(!client[kConnecting]); assert2(!client[kHTTPContext]); - let { host, hostname: hostname2, protocol, port } = client[kUrl]; - if (hostname2[0] === "[") { - const idx = hostname2.indexOf("]"); + let { host, hostname: hostname3, protocol, port } = client[kUrl]; + if (hostname3[0] === "[") { + const idx = hostname3.indexOf("]"); assert2(idx !== -1); - const ip2 = hostname2.substring(1, idx); + const ip2 = hostname3.substring(1, idx); assert2(net.isIPv6(ip2)); - hostname2 = ip2; + hostname3 = ip2; } client[kConnecting] = true; if (channels.beforeConnect.hasSubscribers) { channels.beforeConnect.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname3, protocol, port, version: client[kHTTPContext]?.version, @@ -18377,14 +14271,14 @@ var require_client = __commonJS({ } client[kConnector]({ host, - hostname: hostname2, + hostname: hostname3, protocol, port, servername: client[kServerName], localAddress: client[kLocalAddress] }, (err, socket) => { if (err) { - handleConnectError(client, err, { host, hostname: hostname2, protocol, port }); + handleConnectError(client, err, { host, hostname: hostname3, protocol, port }); client[kResume](); return; } @@ -18398,7 +14292,7 @@ var require_client = __commonJS({ client[kHTTPContext] = socket.alpnProtocol === "h2" ? connectH2(client, socket) : connectH1(client, socket); } catch (err2) { socket.destroy().on("error", noop3); - handleConnectError(client, err2, { host, hostname: hostname2, protocol, port }); + handleConnectError(client, err2, { host, hostname: hostname3, protocol, port }); client[kResume](); return; } @@ -18411,7 +14305,7 @@ var require_client = __commonJS({ channels.connected.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname3, protocol, port, version: client[kHTTPContext]?.version, @@ -18426,7 +14320,7 @@ var require_client = __commonJS({ client[kResume](); }); } - function handleConnectError(client, err, { host, hostname: hostname2, protocol, port }) { + function handleConnectError(client, err, { host, hostname: hostname3, protocol, port }) { if (client.destroyed) { return; } @@ -18435,7 +14329,7 @@ var require_client = __commonJS({ channels.connectError.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname3, protocol, port, version: client[kHTTPContext]?.version, @@ -18854,7 +14748,7 @@ var require_pool = __commonJS({ } } }); - this.on("connectionError", (origin2, targets, error41) => { + this.on("connectionError", (origin2, targets, error42) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -19438,10 +15332,10 @@ var require_env_http_proxy_agent = __commonJS({ ]); } #getProxyAgentForUrl(url2) { - let { protocol, host: hostname2, port } = url2; - hostname2 = hostname2.replace(/:\d*$/, "").toLowerCase(); + let { protocol, host: hostname3, port } = url2; + hostname3 = hostname3.replace(/:\d*$/, "").toLowerCase(); port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; - if (!this.#shouldProxy(hostname2, port)) { + if (!this.#shouldProxy(hostname3, port)) { return this[kNoProxyAgent]; } if (protocol === "https:") { @@ -19449,7 +15343,7 @@ var require_env_http_proxy_agent = __commonJS({ } return this[kHttpProxyAgent]; } - #shouldProxy(hostname2, port) { + #shouldProxy(hostname3, port) { if (this.#noProxyChanged) { this.#parseNoProxy(); } @@ -19465,11 +15359,11 @@ var require_env_http_proxy_agent = __commonJS({ continue; } if (!/^[.*]/.test(entry.hostname)) { - if (hostname2 === entry.hostname) { + if (hostname3 === entry.hostname) { return false; } } else { - if (hostname2.endsWith(entry.hostname.replace(/^\*/, ""))) { + if (hostname3.endsWith(entry.hostname.replace(/^\*/, ""))) { return false; } } @@ -19900,10 +15794,10 @@ var require_h2c_client = __commonJS({ #buildConnector(connectOpts) { return (opts, callback) => { const timeout = connectOpts?.connectOpts ?? 1e4; - const { hostname: hostname2, port, pathname } = opts; + const { hostname: hostname3, port, pathname } = opts; const socket = connect({ ...opts, - host: hostname2, + host: hostname3, port, pathname }); @@ -19914,7 +15808,7 @@ var require_h2c_client = __commonJS({ socket.alpnProtocol = "h2"; const clearConnectTimeout = util2.setupConnectTimeout( new WeakRef(socket), - { timeout, hostname: hostname2, port } + { timeout, hostname: hostname3, port } ); socket.setNoDelay(true).once("connect", function() { queueMicrotask(clearConnectTimeout); @@ -21253,10 +17147,10 @@ var require_mock_utils = __commonJS({ } } function buildHeadersFromArray(headers) { - const clone2 = headers.slice(); + const clone3 = headers.slice(); const entries = []; - for (let index = 0; index < clone2.length; index += 2) { - entries.push([clone2[index], clone2[index + 1]]); + for (let index = 0; index < clone3.length; index += 2) { + entries.push([clone3[index], clone3[index + 1]]); } return Object.fromEntries(entries); } @@ -21435,13 +17329,13 @@ var require_mock_utils = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data, headers, trailers, error: error41 }, delay: delay2, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error42 }, delay: delay2, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error41 !== null) { + if (error42 !== null) { deleteMockDispatch(this[kDispatches], key); - handler2.onError(error41); + handler2.onError(error42); return true; } if (typeof delay2 === "number" && delay2 > 0) { @@ -21479,19 +17373,19 @@ var require_mock_utils = __commonJS({ if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler2); - } catch (error41) { - if (error41.code === "UND_MOCK_ERR_MOCK_NOT_MATCHED") { + } catch (error42) { + if (error42.code === "UND_MOCK_ERR_MOCK_NOT_MATCHED") { const netConnect = agent[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error41.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error42.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler2); } else { - throw new MockNotMatchedError(`${error41.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error42.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error41; + throw error42; } } } else { @@ -21666,11 +17560,11 @@ var require_mock_interceptor = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error41) { - if (typeof error41 === "undefined") { + replyWithError(error42) { + if (typeof error42 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error41 }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error42 }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); return new MockScope(newMockDispatch); } /** @@ -21820,8 +17714,8 @@ var require_mock_call_history = __commonJS({ } url2.search = new URLSearchParams(requestInit.query).toString(); return url2; - } catch (error41) { - throw new InvalidArgumentError("An error occurred when computing MockCallHistoryLog.url", { cause: error41 }); + } catch (error42) { + throw new InvalidArgumentError("An error occurred when computing MockCallHistoryLog.url", { cause: error42 }); } } var MockCallHistoryLog = class { @@ -21881,17 +17775,17 @@ var require_mock_call_history = __commonJS({ lastCall() { return this.logs.at(-1); } - nthCall(number3) { - if (typeof number3 !== "number") { + nthCall(number4) { + if (typeof number4 !== "number") { throw new InvalidArgumentError("nthCall must be called with a number"); } - if (!Number.isInteger(number3)) { + if (!Number.isInteger(number4)) { throw new InvalidArgumentError("nthCall must be called with an integer"); } - if (Math.sign(number3) !== 1) { + if (Math.sign(number4) !== 1) { throw new InvalidArgumentError("nthCall must be called with a positive value. use firstCall or lastCall instead"); } - return this.logs.at(number3 - 1); + return this.logs.at(number4 - 1); } filterCalls(criteria, options) { if (this.logs.length === 0) { @@ -22549,11 +18443,11 @@ var require_snapshot_recorder = __commonJS({ } else { this.#snapshots = new Map(Object.entries(parsed2)); } - } catch (error41) { - if (error41.code === "ENOENT") { + } catch (error42) { + if (error42.code === "ENOENT") { this.#snapshots.clear(); } else { - throw new UndiciError(`Failed to load snapshots from ${path}`, { cause: error41 }); + throw new UndiciError(`Failed to load snapshots from ${path}`, { cause: error42 }); } } } @@ -22784,12 +18678,12 @@ var require_snapshot_agent = __commonJS({ } else if (mode === "update") { return this.#recordAndReplay(opts, handler2); } else { - const error41 = new UndiciError(`No snapshot found for ${opts.method || "GET"} ${opts.path}`); + const error42 = new UndiciError(`No snapshot found for ${opts.method || "GET"} ${opts.path}`); if (handler2.onError) { - handler2.onError(error41); + handler2.onError(error42); return; } - throw error41; + throw error42; } } else if (mode === "record") { return this.#recordAndReplay(opts, handler2); @@ -22839,8 +18733,8 @@ var require_snapshot_agent = __commonJS({ trailers: responseData.trailers }).then(() => { handler2.onResponseEnd(controller, trailers); - }).catch((error41) => { - handler2.onResponseError(controller, error41); + }).catch((error42) => { + handler2.onResponseError(controller, error42); }); } }; @@ -22874,8 +18768,8 @@ var require_snapshot_agent = __commonJS({ const body = Buffer.from(response.body, "base64"); handler2.onResponseData(controller, body); handler2.onResponseEnd(controller, response.trailers); - } catch (error41) { - handler2.onError?.(error41); + } catch (error42) { + handler2.onError?.(error42); } } /** @@ -23219,8 +19113,8 @@ var require_redirect_handler = __commonJS({ this.handler.onResponseEnd(controller, trailers); } } - onResponseError(controller, error41) { - this.handler.onResponseError?.(controller, error41); + onResponseError(controller, error42) { + this.handler.onResponseError?.(controller, error42); } }; function shouldRemoveHeader(header, removeContent, unknownOrigin) { @@ -24066,76 +19960,76 @@ var require_cache3 = __commonJS({ var require_date = __commonJS({ "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/date.js"(exports, module) { "use strict"; - function parseHttpDate(date2) { - switch (date2[3]) { + function parseHttpDate(date4) { + switch (date4[3]) { case ",": - return parseImfDate(date2); + return parseImfDate(date4); case " ": - return parseAscTimeDate(date2); + return parseAscTimeDate(date4); default: - return parseRfc850Date(date2); + return parseRfc850Date(date4); } } - function parseImfDate(date2) { - if (date2.length !== 29 || date2[4] !== " " || date2[7] !== " " || date2[11] !== " " || date2[16] !== " " || date2[19] !== ":" || date2[22] !== ":" || date2[25] !== " " || date2[26] !== "G" || date2[27] !== "M" || date2[28] !== "T") { + function parseImfDate(date4) { + if (date4.length !== 29 || date4[4] !== " " || date4[7] !== " " || date4[11] !== " " || date4[16] !== " " || date4[19] !== ":" || date4[22] !== ":" || date4[25] !== " " || date4[26] !== "G" || date4[27] !== "M" || date4[28] !== "T") { return void 0; } let weekday = -1; - if (date2[0] === "S" && date2[1] === "u" && date2[2] === "n") { + if (date4[0] === "S" && date4[1] === "u" && date4[2] === "n") { weekday = 0; - } else if (date2[0] === "M" && date2[1] === "o" && date2[2] === "n") { + } else if (date4[0] === "M" && date4[1] === "o" && date4[2] === "n") { weekday = 1; - } else if (date2[0] === "T" && date2[1] === "u" && date2[2] === "e") { + } else if (date4[0] === "T" && date4[1] === "u" && date4[2] === "e") { weekday = 2; - } else if (date2[0] === "W" && date2[1] === "e" && date2[2] === "d") { + } else if (date4[0] === "W" && date4[1] === "e" && date4[2] === "d") { weekday = 3; - } else if (date2[0] === "T" && date2[1] === "h" && date2[2] === "u") { + } else if (date4[0] === "T" && date4[1] === "h" && date4[2] === "u") { weekday = 4; - } else if (date2[0] === "F" && date2[1] === "r" && date2[2] === "i") { + } else if (date4[0] === "F" && date4[1] === "r" && date4[2] === "i") { weekday = 5; - } else if (date2[0] === "S" && date2[1] === "a" && date2[2] === "t") { + } else if (date4[0] === "S" && date4[1] === "a" && date4[2] === "t") { weekday = 6; } else { return void 0; } let day = 0; - if (date2[5] === "0") { - const code = date2.charCodeAt(6); + if (date4[5] === "0") { + const code = date4.charCodeAt(6); if (code < 49 || code > 57) { return void 0; } day = code - 48; } else { - const code1 = date2.charCodeAt(5); + const code1 = date4.charCodeAt(5); if (code1 < 49 || code1 > 51) { return void 0; } - const code2 = date2.charCodeAt(6); + const code2 = date4.charCodeAt(6); if (code2 < 48 || code2 > 57) { return void 0; } day = (code1 - 48) * 10 + (code2 - 48); } let monthIdx = -1; - if (date2[8] === "J" && date2[9] === "a" && date2[10] === "n") { + if (date4[8] === "J" && date4[9] === "a" && date4[10] === "n") { monthIdx = 0; - } else if (date2[8] === "F" && date2[9] === "e" && date2[10] === "b") { + } else if (date4[8] === "F" && date4[9] === "e" && date4[10] === "b") { monthIdx = 1; - } else if (date2[8] === "M" && date2[9] === "a") { - if (date2[10] === "r") { + } else if (date4[8] === "M" && date4[9] === "a") { + if (date4[10] === "r") { monthIdx = 2; - } else if (date2[10] === "y") { + } else if (date4[10] === "y") { monthIdx = 4; } else { return void 0; } - } else if (date2[8] === "J") { - if (date2[9] === "a" && date2[10] === "n") { + } else if (date4[8] === "J") { + if (date4[9] === "a" && date4[10] === "n") { monthIdx = 0; - } else if (date2[9] === "u") { - if (date2[10] === "n") { + } else if (date4[9] === "u") { + if (date4[10] === "n") { monthIdx = 5; - } else if (date2[10] === "l") { + } else if (date4[10] === "l") { monthIdx = 6; } else { return void 0; @@ -24143,55 +20037,55 @@ var require_date = __commonJS({ } else { return void 0; } - } else if (date2[8] === "A") { - if (date2[9] === "p" && date2[10] === "r") { + } else if (date4[8] === "A") { + if (date4[9] === "p" && date4[10] === "r") { monthIdx = 3; - } else if (date2[9] === "u" && date2[10] === "g") { + } else if (date4[9] === "u" && date4[10] === "g") { monthIdx = 7; } else { return void 0; } - } else if (date2[8] === "S" && date2[9] === "e" && date2[10] === "p") { + } else if (date4[8] === "S" && date4[9] === "e" && date4[10] === "p") { monthIdx = 8; - } else if (date2[8] === "O" && date2[9] === "c" && date2[10] === "t") { + } else if (date4[8] === "O" && date4[9] === "c" && date4[10] === "t") { monthIdx = 9; - } else if (date2[8] === "N" && date2[9] === "o" && date2[10] === "v") { + } else if (date4[8] === "N" && date4[9] === "o" && date4[10] === "v") { monthIdx = 10; - } else if (date2[8] === "D" && date2[9] === "e" && date2[10] === "c") { + } else if (date4[8] === "D" && date4[9] === "e" && date4[10] === "c") { monthIdx = 11; } else { return void 0; } - const yearDigit1 = date2.charCodeAt(12); + const yearDigit1 = date4.charCodeAt(12); if (yearDigit1 < 48 || yearDigit1 > 57) { return void 0; } - const yearDigit2 = date2.charCodeAt(13); + const yearDigit2 = date4.charCodeAt(13); if (yearDigit2 < 48 || yearDigit2 > 57) { return void 0; } - const yearDigit3 = date2.charCodeAt(14); + const yearDigit3 = date4.charCodeAt(14); if (yearDigit3 < 48 || yearDigit3 > 57) { return void 0; } - const yearDigit4 = date2.charCodeAt(15); + const yearDigit4 = date4.charCodeAt(15); if (yearDigit4 < 48 || yearDigit4 > 57) { return void 0; } const year = (yearDigit1 - 48) * 1e3 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48); let hour = 0; - if (date2[17] === "0") { - const code = date2.charCodeAt(18); + if (date4[17] === "0") { + const code = date4.charCodeAt(18); if (code < 48 || code > 57) { return void 0; } hour = code - 48; } else { - const code1 = date2.charCodeAt(17); + const code1 = date4.charCodeAt(17); if (code1 < 48 || code1 > 50) { return void 0; } - const code2 = date2.charCodeAt(18); + const code2 = date4.charCodeAt(18); if (code2 < 48 || code2 > 57) { return void 0; } @@ -24201,36 +20095,36 @@ var require_date = __commonJS({ hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; - if (date2[20] === "0") { - const code = date2.charCodeAt(21); + if (date4[20] === "0") { + const code = date4.charCodeAt(21); if (code < 48 || code > 57) { return void 0; } minute = code - 48; } else { - const code1 = date2.charCodeAt(20); + const code1 = date4.charCodeAt(20); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(21); + const code2 = date4.charCodeAt(21); if (code2 < 48 || code2 > 57) { return void 0; } minute = (code1 - 48) * 10 + (code2 - 48); } let second = 0; - if (date2[23] === "0") { - const code = date2.charCodeAt(24); + if (date4[23] === "0") { + const code = date4.charCodeAt(24); if (code < 48 || code > 57) { return void 0; } second = code - 48; } else { - const code1 = date2.charCodeAt(23); + const code1 = date4.charCodeAt(23); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(24); + const code2 = date4.charCodeAt(24); if (code2 < 48 || code2 > 57) { return void 0; } @@ -24239,48 +20133,48 @@ var require_date = __commonJS({ const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); return result.getUTCDay() === weekday ? result : void 0; } - function parseAscTimeDate(date2) { - if (date2.length !== 24 || date2[7] !== " " || date2[10] !== " " || date2[19] !== " ") { + function parseAscTimeDate(date4) { + if (date4.length !== 24 || date4[7] !== " " || date4[10] !== " " || date4[19] !== " ") { return void 0; } let weekday = -1; - if (date2[0] === "S" && date2[1] === "u" && date2[2] === "n") { + if (date4[0] === "S" && date4[1] === "u" && date4[2] === "n") { weekday = 0; - } else if (date2[0] === "M" && date2[1] === "o" && date2[2] === "n") { + } else if (date4[0] === "M" && date4[1] === "o" && date4[2] === "n") { weekday = 1; - } else if (date2[0] === "T" && date2[1] === "u" && date2[2] === "e") { + } else if (date4[0] === "T" && date4[1] === "u" && date4[2] === "e") { weekday = 2; - } else if (date2[0] === "W" && date2[1] === "e" && date2[2] === "d") { + } else if (date4[0] === "W" && date4[1] === "e" && date4[2] === "d") { weekday = 3; - } else if (date2[0] === "T" && date2[1] === "h" && date2[2] === "u") { + } else if (date4[0] === "T" && date4[1] === "h" && date4[2] === "u") { weekday = 4; - } else if (date2[0] === "F" && date2[1] === "r" && date2[2] === "i") { + } else if (date4[0] === "F" && date4[1] === "r" && date4[2] === "i") { weekday = 5; - } else if (date2[0] === "S" && date2[1] === "a" && date2[2] === "t") { + } else if (date4[0] === "S" && date4[1] === "a" && date4[2] === "t") { weekday = 6; } else { return void 0; } let monthIdx = -1; - if (date2[4] === "J" && date2[5] === "a" && date2[6] === "n") { + if (date4[4] === "J" && date4[5] === "a" && date4[6] === "n") { monthIdx = 0; - } else if (date2[4] === "F" && date2[5] === "e" && date2[6] === "b") { + } else if (date4[4] === "F" && date4[5] === "e" && date4[6] === "b") { monthIdx = 1; - } else if (date2[4] === "M" && date2[5] === "a") { - if (date2[6] === "r") { + } else if (date4[4] === "M" && date4[5] === "a") { + if (date4[6] === "r") { monthIdx = 2; - } else if (date2[6] === "y") { + } else if (date4[6] === "y") { monthIdx = 4; } else { return void 0; } - } else if (date2[4] === "J") { - if (date2[5] === "a" && date2[6] === "n") { + } else if (date4[4] === "J") { + if (date4[5] === "a" && date4[6] === "n") { monthIdx = 0; - } else if (date2[5] === "u") { - if (date2[6] === "n") { + } else if (date4[5] === "u") { + if (date4[6] === "n") { monthIdx = 5; - } else if (date2[6] === "l") { + } else if (date4[6] === "l") { monthIdx = 6; } else { return void 0; @@ -24288,56 +20182,56 @@ var require_date = __commonJS({ } else { return void 0; } - } else if (date2[4] === "A") { - if (date2[5] === "p" && date2[6] === "r") { + } else if (date4[4] === "A") { + if (date4[5] === "p" && date4[6] === "r") { monthIdx = 3; - } else if (date2[5] === "u" && date2[6] === "g") { + } else if (date4[5] === "u" && date4[6] === "g") { monthIdx = 7; } else { return void 0; } - } else if (date2[4] === "S" && date2[5] === "e" && date2[6] === "p") { + } else if (date4[4] === "S" && date4[5] === "e" && date4[6] === "p") { monthIdx = 8; - } else if (date2[4] === "O" && date2[5] === "c" && date2[6] === "t") { + } else if (date4[4] === "O" && date4[5] === "c" && date4[6] === "t") { monthIdx = 9; - } else if (date2[4] === "N" && date2[5] === "o" && date2[6] === "v") { + } else if (date4[4] === "N" && date4[5] === "o" && date4[6] === "v") { monthIdx = 10; - } else if (date2[4] === "D" && date2[5] === "e" && date2[6] === "c") { + } else if (date4[4] === "D" && date4[5] === "e" && date4[6] === "c") { monthIdx = 11; } else { return void 0; } let day = 0; - if (date2[8] === " ") { - const code = date2.charCodeAt(9); + if (date4[8] === " ") { + const code = date4.charCodeAt(9); if (code < 49 || code > 57) { return void 0; } day = code - 48; } else { - const code1 = date2.charCodeAt(8); + const code1 = date4.charCodeAt(8); if (code1 < 49 || code1 > 51) { return void 0; } - const code2 = date2.charCodeAt(9); + const code2 = date4.charCodeAt(9); if (code2 < 48 || code2 > 57) { return void 0; } day = (code1 - 48) * 10 + (code2 - 48); } let hour = 0; - if (date2[11] === "0") { - const code = date2.charCodeAt(12); + if (date4[11] === "0") { + const code = date4.charCodeAt(12); if (code < 48 || code > 57) { return void 0; } hour = code - 48; } else { - const code1 = date2.charCodeAt(11); + const code1 = date4.charCodeAt(11); if (code1 < 48 || code1 > 50) { return void 0; } - const code2 = date2.charCodeAt(12); + const code2 = date4.charCodeAt(12); if (code2 < 48 || code2 > 57) { return void 0; } @@ -24347,54 +20241,54 @@ var require_date = __commonJS({ hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; - if (date2[14] === "0") { - const code = date2.charCodeAt(15); + if (date4[14] === "0") { + const code = date4.charCodeAt(15); if (code < 48 || code > 57) { return void 0; } minute = code - 48; } else { - const code1 = date2.charCodeAt(14); + const code1 = date4.charCodeAt(14); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(15); + const code2 = date4.charCodeAt(15); if (code2 < 48 || code2 > 57) { return void 0; } minute = (code1 - 48) * 10 + (code2 - 48); } let second = 0; - if (date2[17] === "0") { - const code = date2.charCodeAt(18); + if (date4[17] === "0") { + const code = date4.charCodeAt(18); if (code < 48 || code > 57) { return void 0; } second = code - 48; } else { - const code1 = date2.charCodeAt(17); + const code1 = date4.charCodeAt(17); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(18); + const code2 = date4.charCodeAt(18); if (code2 < 48 || code2 > 57) { return void 0; } second = (code1 - 48) * 10 + (code2 - 48); } - const yearDigit1 = date2.charCodeAt(20); + const yearDigit1 = date4.charCodeAt(20); if (yearDigit1 < 48 || yearDigit1 > 57) { return void 0; } - const yearDigit2 = date2.charCodeAt(21); + const yearDigit2 = date4.charCodeAt(21); if (yearDigit2 < 48 || yearDigit2 > 57) { return void 0; } - const yearDigit3 = date2.charCodeAt(22); + const yearDigit3 = date4.charCodeAt(22); if (yearDigit3 < 48 || yearDigit3 > 57) { return void 0; } - const yearDigit4 = date2.charCodeAt(23); + const yearDigit4 = date4.charCodeAt(23); if (yearDigit4 < 48 || yearDigit4 > 57) { return void 0; } @@ -24402,109 +20296,109 @@ var require_date = __commonJS({ const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); return result.getUTCDay() === weekday ? result : void 0; } - function parseRfc850Date(date2) { + function parseRfc850Date(date4) { let commaIndex = -1; let weekday = -1; - if (date2[0] === "S") { - if (date2[1] === "u" && date2[2] === "n" && date2[3] === "d" && date2[4] === "a" && date2[5] === "y") { + if (date4[0] === "S") { + if (date4[1] === "u" && date4[2] === "n" && date4[3] === "d" && date4[4] === "a" && date4[5] === "y") { weekday = 0; commaIndex = 6; - } else if (date2[1] === "a" && date2[2] === "t" && date2[3] === "u" && date2[4] === "r" && date2[5] === "d" && date2[6] === "a" && date2[7] === "y") { + } else if (date4[1] === "a" && date4[2] === "t" && date4[3] === "u" && date4[4] === "r" && date4[5] === "d" && date4[6] === "a" && date4[7] === "y") { weekday = 6; commaIndex = 8; } - } else if (date2[0] === "M" && date2[1] === "o" && date2[2] === "n" && date2[3] === "d" && date2[4] === "a" && date2[5] === "y") { + } else if (date4[0] === "M" && date4[1] === "o" && date4[2] === "n" && date4[3] === "d" && date4[4] === "a" && date4[5] === "y") { weekday = 1; commaIndex = 6; - } else if (date2[0] === "T") { - if (date2[1] === "u" && date2[2] === "e" && date2[3] === "s" && date2[4] === "d" && date2[5] === "a" && date2[6] === "y") { + } else if (date4[0] === "T") { + if (date4[1] === "u" && date4[2] === "e" && date4[3] === "s" && date4[4] === "d" && date4[5] === "a" && date4[6] === "y") { weekday = 2; commaIndex = 7; - } else if (date2[1] === "h" && date2[2] === "u" && date2[3] === "r" && date2[4] === "s" && date2[5] === "d" && date2[6] === "a" && date2[7] === "y") { + } else if (date4[1] === "h" && date4[2] === "u" && date4[3] === "r" && date4[4] === "s" && date4[5] === "d" && date4[6] === "a" && date4[7] === "y") { weekday = 4; commaIndex = 8; } - } else if (date2[0] === "W" && date2[1] === "e" && date2[2] === "d" && date2[3] === "n" && date2[4] === "e" && date2[5] === "s" && date2[6] === "d" && date2[7] === "a" && date2[8] === "y") { + } else if (date4[0] === "W" && date4[1] === "e" && date4[2] === "d" && date4[3] === "n" && date4[4] === "e" && date4[5] === "s" && date4[6] === "d" && date4[7] === "a" && date4[8] === "y") { weekday = 3; commaIndex = 9; - } else if (date2[0] === "F" && date2[1] === "r" && date2[2] === "i" && date2[3] === "d" && date2[4] === "a" && date2[5] === "y") { + } else if (date4[0] === "F" && date4[1] === "r" && date4[2] === "i" && date4[3] === "d" && date4[4] === "a" && date4[5] === "y") { weekday = 5; commaIndex = 6; } else { return void 0; } - if (date2[commaIndex] !== "," || date2.length - commaIndex - 1 !== 23 || date2[commaIndex + 1] !== " " || date2[commaIndex + 4] !== "-" || date2[commaIndex + 8] !== "-" || date2[commaIndex + 11] !== " " || date2[commaIndex + 14] !== ":" || date2[commaIndex + 17] !== ":" || date2[commaIndex + 20] !== " " || date2[commaIndex + 21] !== "G" || date2[commaIndex + 22] !== "M" || date2[commaIndex + 23] !== "T") { + if (date4[commaIndex] !== "," || date4.length - commaIndex - 1 !== 23 || date4[commaIndex + 1] !== " " || date4[commaIndex + 4] !== "-" || date4[commaIndex + 8] !== "-" || date4[commaIndex + 11] !== " " || date4[commaIndex + 14] !== ":" || date4[commaIndex + 17] !== ":" || date4[commaIndex + 20] !== " " || date4[commaIndex + 21] !== "G" || date4[commaIndex + 22] !== "M" || date4[commaIndex + 23] !== "T") { return void 0; } let day = 0; - if (date2[commaIndex + 2] === "0") { - const code = date2.charCodeAt(commaIndex + 3); + if (date4[commaIndex + 2] === "0") { + const code = date4.charCodeAt(commaIndex + 3); if (code < 49 || code > 57) { return void 0; } day = code - 48; } else { - const code1 = date2.charCodeAt(commaIndex + 2); + const code1 = date4.charCodeAt(commaIndex + 2); if (code1 < 49 || code1 > 51) { return void 0; } - const code2 = date2.charCodeAt(commaIndex + 3); + const code2 = date4.charCodeAt(commaIndex + 3); if (code2 < 48 || code2 > 57) { return void 0; } day = (code1 - 48) * 10 + (code2 - 48); } let monthIdx = -1; - if (date2[commaIndex + 5] === "J" && date2[commaIndex + 6] === "a" && date2[commaIndex + 7] === "n") { + if (date4[commaIndex + 5] === "J" && date4[commaIndex + 6] === "a" && date4[commaIndex + 7] === "n") { monthIdx = 0; - } else if (date2[commaIndex + 5] === "F" && date2[commaIndex + 6] === "e" && date2[commaIndex + 7] === "b") { + } else if (date4[commaIndex + 5] === "F" && date4[commaIndex + 6] === "e" && date4[commaIndex + 7] === "b") { monthIdx = 1; - } else if (date2[commaIndex + 5] === "M" && date2[commaIndex + 6] === "a" && date2[commaIndex + 7] === "r") { + } else if (date4[commaIndex + 5] === "M" && date4[commaIndex + 6] === "a" && date4[commaIndex + 7] === "r") { monthIdx = 2; - } else if (date2[commaIndex + 5] === "A" && date2[commaIndex + 6] === "p" && date2[commaIndex + 7] === "r") { + } else if (date4[commaIndex + 5] === "A" && date4[commaIndex + 6] === "p" && date4[commaIndex + 7] === "r") { monthIdx = 3; - } else if (date2[commaIndex + 5] === "M" && date2[commaIndex + 6] === "a" && date2[commaIndex + 7] === "y") { + } else if (date4[commaIndex + 5] === "M" && date4[commaIndex + 6] === "a" && date4[commaIndex + 7] === "y") { monthIdx = 4; - } else if (date2[commaIndex + 5] === "J" && date2[commaIndex + 6] === "u" && date2[commaIndex + 7] === "n") { + } else if (date4[commaIndex + 5] === "J" && date4[commaIndex + 6] === "u" && date4[commaIndex + 7] === "n") { monthIdx = 5; - } else if (date2[commaIndex + 5] === "J" && date2[commaIndex + 6] === "u" && date2[commaIndex + 7] === "l") { + } else if (date4[commaIndex + 5] === "J" && date4[commaIndex + 6] === "u" && date4[commaIndex + 7] === "l") { monthIdx = 6; - } else if (date2[commaIndex + 5] === "A" && date2[commaIndex + 6] === "u" && date2[commaIndex + 7] === "g") { + } else if (date4[commaIndex + 5] === "A" && date4[commaIndex + 6] === "u" && date4[commaIndex + 7] === "g") { monthIdx = 7; - } else if (date2[commaIndex + 5] === "S" && date2[commaIndex + 6] === "e" && date2[commaIndex + 7] === "p") { + } else if (date4[commaIndex + 5] === "S" && date4[commaIndex + 6] === "e" && date4[commaIndex + 7] === "p") { monthIdx = 8; - } else if (date2[commaIndex + 5] === "O" && date2[commaIndex + 6] === "c" && date2[commaIndex + 7] === "t") { + } else if (date4[commaIndex + 5] === "O" && date4[commaIndex + 6] === "c" && date4[commaIndex + 7] === "t") { monthIdx = 9; - } else if (date2[commaIndex + 5] === "N" && date2[commaIndex + 6] === "o" && date2[commaIndex + 7] === "v") { + } else if (date4[commaIndex + 5] === "N" && date4[commaIndex + 6] === "o" && date4[commaIndex + 7] === "v") { monthIdx = 10; - } else if (date2[commaIndex + 5] === "D" && date2[commaIndex + 6] === "e" && date2[commaIndex + 7] === "c") { + } else if (date4[commaIndex + 5] === "D" && date4[commaIndex + 6] === "e" && date4[commaIndex + 7] === "c") { monthIdx = 11; } else { return void 0; } - const yearDigit1 = date2.charCodeAt(commaIndex + 9); + const yearDigit1 = date4.charCodeAt(commaIndex + 9); if (yearDigit1 < 48 || yearDigit1 > 57) { return void 0; } - const yearDigit2 = date2.charCodeAt(commaIndex + 10); + const yearDigit2 = date4.charCodeAt(commaIndex + 10); if (yearDigit2 < 48 || yearDigit2 > 57) { return void 0; } let year = (yearDigit1 - 48) * 10 + (yearDigit2 - 48); year += year < 70 ? 2e3 : 1900; let hour = 0; - if (date2[commaIndex + 12] === "0") { - const code = date2.charCodeAt(commaIndex + 13); + if (date4[commaIndex + 12] === "0") { + const code = date4.charCodeAt(commaIndex + 13); if (code < 48 || code > 57) { return void 0; } hour = code - 48; } else { - const code1 = date2.charCodeAt(commaIndex + 12); + const code1 = date4.charCodeAt(commaIndex + 12); if (code1 < 48 || code1 > 50) { return void 0; } - const code2 = date2.charCodeAt(commaIndex + 13); + const code2 = date4.charCodeAt(commaIndex + 13); if (code2 < 48 || code2 > 57) { return void 0; } @@ -24514,36 +20408,36 @@ var require_date = __commonJS({ hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; - if (date2[commaIndex + 15] === "0") { - const code = date2.charCodeAt(commaIndex + 16); + if (date4[commaIndex + 15] === "0") { + const code = date4.charCodeAt(commaIndex + 16); if (code < 48 || code > 57) { return void 0; } minute = code - 48; } else { - const code1 = date2.charCodeAt(commaIndex + 15); + const code1 = date4.charCodeAt(commaIndex + 15); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(commaIndex + 16); + const code2 = date4.charCodeAt(commaIndex + 16); if (code2 < 48 || code2 > 57) { return void 0; } minute = (code1 - 48) * 10 + (code2 - 48); } let second = 0; - if (date2[commaIndex + 18] === "0") { - const code = date2.charCodeAt(commaIndex + 19); + if (date4[commaIndex + 18] === "0") { + const code = date4.charCodeAt(commaIndex + 19); if (code < 48 || code > 57) { return void 0; } second = code - 48; } else { - const code1 = date2.charCodeAt(commaIndex + 18); + const code1 = date4.charCodeAt(commaIndex + 18); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(commaIndex + 19); + const code2 = date4.charCodeAt(commaIndex + 19); if (code2 < 48 || code2 > 57) { return void 0; } @@ -24860,8 +20754,8 @@ var require_cache_handler = __commonJS({ } return strippedHeaders ?? resHeaders; } - function isValidDate2(date2) { - return date2 instanceof Date && Number.isFinite(date2.valueOf()); + function isValidDate2(date4) { + return date4 instanceof Date && Number.isFinite(date4.valueOf()); } module.exports = CacheHandler; } @@ -25176,20 +21070,20 @@ var require_cache4 = __commonJS({ } function handleUncachedResponse(dispatch, globalOpts, cacheKey, handler2, opts, reqCacheControl) { if (reqCacheControl?.["only-if-cached"]) { - let aborted2 = false; + let aborted3 = false; try { if (typeof handler2.onConnect === "function") { handler2.onConnect(() => { - aborted2 = true; + aborted3 = true; }); - if (aborted2) { + if (aborted3) { return; } } if (typeof handler2.onHeaders === "function") { handler2.onHeaders(504, [], () => { }, "Gateway Timeout"); - if (aborted2) { + if (aborted3) { return; } } @@ -25514,8 +21408,8 @@ var require_decompress = __commonJS({ } } }); - decompressor.on("error", (error41) => { - super.onResponseError(controller, error41); + decompressor.on("error", (error42) => { + super.onResponseError(controller, error42); }); } /** @@ -27854,17 +23748,17 @@ var require_fetch = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error41) { + abort(error42) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error41) { - error41 = new DOMException("The operation was aborted.", "AbortError"); + if (!error42) { + error42 = new DOMException("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error41; - this.connection?.destroy(error41); - this.emit("terminated", error41); + this.serializedAbortReason = error42; + this.connection?.destroy(error42); + this.emit("terminated", error42); } }; function handleFetchDone(response) { @@ -27963,12 +23857,12 @@ var require_fetch = __commonJS({ ); } var markResourceTiming = performance.markResourceTiming; - function abortFetch(p, request2, responseObject, error41) { + function abortFetch(p, request2, responseObject, error42) { if (p) { - p.reject(error41); + p.reject(error42); } if (request2.body?.stream != null && isReadable(request2.body.stream)) { - request2.body.stream.cancel(error41).catch((err) => { + request2.body.stream.cancel(error42).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -27980,7 +23874,7 @@ var require_fetch = __commonJS({ } const response = getResponseState(responseObject); if (response.body?.stream != null && isReadable(response.body.stream)) { - response.body.stream.cancel(error41).catch((err) => { + response.body.stream.cancel(error42).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -28793,13 +24687,13 @@ var require_fetch = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error41) { + onError(error42) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error41); - fetchParams.controller.terminate(error41); - reject(error41); + this.body?.destroy(error42); + fetchParams.controller.terminate(error42); + reject(error42); }, onUpgrade(status, rawHeaders, socket) { if (status !== 101) { @@ -29632,11 +25526,11 @@ var require_util6 = __commonJS({ "Dec" ]; var IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); - function toIMFDate(date2) { - if (typeof date2 === "number") { - date2 = new Date(date2); + function toIMFDate(date4) { + if (typeof date4 === "number") { + date4 = new Date(date4); } - return `${IMFDays[date2.getUTCDay()]}, ${IMFPaddedNumbers[date2.getUTCDate()]} ${IMFMonths[date2.getUTCMonth()]} ${date2.getUTCFullYear()} ${IMFPaddedNumbers[date2.getUTCHours()]}:${IMFPaddedNumbers[date2.getUTCMinutes()]}:${IMFPaddedNumbers[date2.getUTCSeconds()]} GMT`; + return `${IMFDays[date4.getUTCDay()]}, ${IMFPaddedNumbers[date4.getUTCDate()]} ${IMFMonths[date4.getUTCMonth()]} ${date4.getUTCFullYear()} ${IMFPaddedNumbers[date4.getUTCHours()]}:${IMFPaddedNumbers[date4.getUTCMinutes()]}:${IMFPaddedNumbers[date4.getUTCSeconds()]} GMT`; } function validateCookieMaxAge(maxAge) { if (maxAge < 0) { @@ -30488,7 +26382,7 @@ var require_frame = __commonJS({ } catch { crypto2 = { // not full compatibility, but minimum. - randomFillSync: function randomFillSync(buffer2, _offset, _size2) { + randomFillSync: function randomFillSync(buffer2, _offset, _size3) { for (let i = 0; i < buffer2.length; ++i) { buffer2[i] = Math.random() * 255 | 0; } @@ -30948,9 +26842,9 @@ var require_receiver = __commonJS({ } this.#state = parserStates.INFO; } else { - this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error41, data) => { - if (error41) { - failWebsocketConnection(this.#handler, 1007, error41.message); + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error42, data) => { + if (error42) { + failWebsocketConnection(this.#handler, 1007, error42.message); return; } this.writeFragments(data); @@ -31722,10 +27616,10 @@ var require_websocketerror = __commonJS({ * @param {string} reason */ static createUnvalidatedWebSocketError(message, code, reason) { - const error41 = new _WebSocketError(message, kConstruct); - error41.#closeCode = code; - error41.#reason = reason; - return error41; + const error42 = new _WebSocketError(message, kConstruct); + error42.#closeCode = code; + error42.#reason = reason; + return error42; } }; var { createUnvalidatedWebSocketError } = WebSocketError; @@ -31894,14 +27788,14 @@ var require_websocketstream = __commonJS({ data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk.slice()); opcode = opcodes.BINARY; } else { - let string3; + let string4; try { - string3 = webidl.converters.DOMString(chunk); + string4 = webidl.converters.DOMString(chunk); } catch (e) { promise.reject(e); return promise.promise; } - data = new TextEncoder().encode(string3); + data = new TextEncoder().encode(string4); opcode = opcodes.TEXT; } if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { @@ -31992,10 +27886,10 @@ var require_websocketstream = __commonJS({ reason }); } else { - const error41 = createUnvalidatedWebSocketError("unclean close", code, reason); - this.#readableStreamController.error(error41); - this.#writableStream.abort(error41); - this.#closedPromise.reject(error41); + const error42 = createUnvalidatedWebSocketError("unclean close", code, reason); + this.#readableStreamController.error(error42); + this.#writableStream.abort(error42); + this.#closedPromise.reject(error42); } } #closeUsingReason(reason) { @@ -32474,8 +28368,8 @@ var require_eventsource = __commonJS({ pipeline( response.body.stream, eventSourceStream, - (error41) => { - if (error41?.aborted === false) { + (error42) => { + if (error42?.aborted === false) { this.close(); this.dispatchEvent(new Event("error")); } @@ -32820,14 +28714,14 @@ var require_uri_templates = __commonJS({ "*": true }; var urlEscapedChars = /[:/&?#]/; - function notReallyPercentEncode(string3) { - return encodeURI(string3).replace(/%25[0-9][0-9]/g, function(doubleEncoded) { + function notReallyPercentEncode(string4) { + return encodeURI(string4).replace(/%25[0-9][0-9]/g, function(doubleEncoded) { return "%" + doubleEncoded.substring(3); }); } - function isPercentEncoded(string3) { - string3 = string3.replace(/%../g, ""); - return encodeURIComponent(string3) === string3; + function isPercentEncoded(string4) { + string4 = string4.replace(/%../g, ""); + return encodeURIComponent(string4) === string4; } function uriTemplateSubstitution(spec) { var modifier = ""; @@ -33282,8 +29176,8 @@ var init_sury_s6Akl_oc = __esm({ "../node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.25_effect@3.16.12_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/sury-s6Akl-oc.js"() { init_index_CAcLDIRJ(); getToJsonSchemaFn3 = async () => { - const { toJSONSchema: toJSONSchema2 } = await tryImport(import("sury"), "sury"); - return (schema2) => toJSONSchema2(schema2); + const { toJSONSchema: toJSONSchema3 } = await tryImport(import("sury"), "sury"); + return (schema2) => toJSONSchema3(schema2); }; } }); @@ -33306,7 +29200,7 @@ var init_valibot_DBCeetIe = __esm({ // ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js // @__NO_SIDE_EFFECTS__ -function $constructor(name, initializer2, params) { +function $constructor(name, initializer4, params) { function init(inst, def) { var _a; Object.defineProperty(inst, "_zod", { @@ -33315,7 +29209,7 @@ function $constructor(name, initializer2, params) { }); (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set()); inst._zod.traits.add(name); - initializer2(inst, def); + initializer4(inst, def); for (const k in _.prototype) { if (!(k in inst)) Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) }); @@ -33768,10 +29662,10 @@ function prefixIssues(path, issues) { function unwrapMessage(message) { return typeof message === "string" ? message : message?.message; } -function finalizeIssue(iss, ctx, config2) { +function finalizeIssue(iss, ctx, config3) { const full = { ...iss, path: iss.path ?? [] }; if (!iss.message) { - const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input"; + const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config3.customError?.(iss)) ?? unwrapMessage(config3.localeError?.(iss)) ?? "Invalid input"; full.message = message; } delete full.inst; @@ -33815,7 +29709,7 @@ function cleanEnum(obj) { }).map((el) => el[1]); } var captureStackTrace, allowsEval, getParsedType3, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, Class; -var init_util2 = __esm({ +var init_util = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js"() { captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => { }; @@ -33896,10 +29790,10 @@ var init_util2 = __esm({ }); // ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js -function flattenError2(error41, mapper = (issue2) => issue2.message) { +function flattenError2(error42, mapper = (issue3) => issue3.message) { const fieldErrors = {}; const formErrors = []; - for (const sub of error41.issues) { + for (const sub of error42.issues) { if (sub.path.length > 0) { fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; fieldErrors[sub.path[0]].push(mapper(sub)); @@ -33909,32 +29803,32 @@ function flattenError2(error41, mapper = (issue2) => issue2.message) { } return { formErrors, fieldErrors }; } -function formatError(error41, _mapper) { - const mapper = _mapper || function(issue2) { - return issue2.message; +function formatError(error42, _mapper) { + const mapper = _mapper || function(issue3) { + return issue3.message; }; const fieldErrors = { _errors: [] }; - const processError = (error42) => { - for (const issue2 of error42.issues) { - if (issue2.code === "invalid_union" && issue2.errors.length) { - issue2.errors.map((issues) => processError({ issues })); - } else if (issue2.code === "invalid_key") { - processError({ issues: issue2.issues }); - } else if (issue2.code === "invalid_element") { - processError({ issues: issue2.issues }); - } else if (issue2.path.length === 0) { - fieldErrors._errors.push(mapper(issue2)); + const processError = (error43) => { + for (const issue3 of error43.issues) { + if (issue3.code === "invalid_union" && issue3.errors.length) { + issue3.errors.map((issues) => processError({ issues })); + } else if (issue3.code === "invalid_key") { + processError({ issues: issue3.issues }); + } else if (issue3.code === "invalid_element") { + processError({ issues: issue3.issues }); + } else if (issue3.path.length === 0) { + fieldErrors._errors.push(mapper(issue3)); } else { let curr = fieldErrors; let i = 0; - while (i < issue2.path.length) { - const el = issue2.path[i]; - const terminal = i === issue2.path.length - 1; + while (i < issue3.path.length) { + const el = issue3.path[i]; + const terminal = i === issue3.path.length - 1; if (!terminal) { curr[el] = curr[el] || { _errors: [] }; } else { curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue2)); + curr[el]._errors.push(mapper(issue3)); } curr = curr[el]; i++; @@ -33942,27 +29836,27 @@ function formatError(error41, _mapper) { } } }; - processError(error41); + processError(error42); return fieldErrors; } -function treeifyError(error41, _mapper) { - const mapper = _mapper || function(issue2) { - return issue2.message; +function treeifyError(error42, _mapper) { + const mapper = _mapper || function(issue3) { + return issue3.message; }; const result = { errors: [] }; - const processError = (error42, path = []) => { + const processError = (error43, path = []) => { var _a, _b; - for (const issue2 of error42.issues) { - if (issue2.code === "invalid_union" && issue2.errors.length) { - issue2.errors.map((issues) => processError({ issues }, issue2.path)); - } else if (issue2.code === "invalid_key") { - processError({ issues: issue2.issues }, issue2.path); - } else if (issue2.code === "invalid_element") { - processError({ issues: issue2.issues }, issue2.path); + for (const issue3 of error43.issues) { + if (issue3.code === "invalid_union" && issue3.errors.length) { + issue3.errors.map((issues) => processError({ issues }, issue3.path)); + } else if (issue3.code === "invalid_key") { + processError({ issues: issue3.issues }, issue3.path); + } else if (issue3.code === "invalid_element") { + processError({ issues: issue3.issues }, issue3.path); } else { - const fullpath = [...path, ...issue2.path]; + const fullpath = [...path, ...issue3.path]; if (fullpath.length === 0) { - result.errors.push(mapper(issue2)); + result.errors.push(mapper(issue3)); continue; } let curr = result; @@ -33980,14 +29874,14 @@ function treeifyError(error41, _mapper) { curr = curr.items[el]; } if (terminal) { - curr.errors.push(mapper(issue2)); + curr.errors.push(mapper(issue3)); } i++; } } } }; - processError(error41); + processError(error42); return result; } function toDotPath(path) { @@ -34007,21 +29901,21 @@ function toDotPath(path) { } return segs.join(""); } -function prettifyError(error41) { +function prettifyError(error42) { const lines = []; - const issues = [...error41.issues].sort((a, b) => a.path.length - b.path.length); - for (const issue2 of issues) { - lines.push(`\u2716 ${issue2.message}`); - if (issue2.path?.length) - lines.push(` \u2192 at ${toDotPath(issue2.path)}`); + const issues = [...error42.issues].sort((a, b) => a.path.length - b.path.length); + for (const issue3 of issues) { + lines.push(`\u2716 ${issue3.message}`); + if (issue3.path?.length) + lines.push(` \u2192 at ${toDotPath(issue3.path)}`); } return lines.join("\n"); } var initializer, $ZodError, $ZodRealError; -var init_errors2 = __esm({ +var init_errors = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js"() { init_core(); - init_util2(); + init_util(); initializer = (inst, def) => { inst.name = "$ZodError"; Object.defineProperty(inst, "_zod", { @@ -34054,8 +29948,8 @@ var _parse, parse2, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAs var init_parse = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js"() { init_core(); - init_errors2(); - init_util2(); + init_errors(); + init_util(); _parse = (_Err) => (schema2, value2, _ctx, _params) => { const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; const result = schema2._zod.run({ value: value2, issues: [] }, ctx); @@ -34166,13 +30060,13 @@ function time(args2) { return new RegExp(`^${timeSource(args2)}$`); } function datetime(args2) { - const time2 = timeSource({ precision: args2.precision }); + const time4 = timeSource({ precision: args2.precision }); const opts = ["Z"]; if (args2.local) opts.push(""); if (args2.offset) opts.push(`([+-]\\d{2}:\\d{2})`); - const timeRegex3 = `${time2}(?:${opts.join("|")})`; + const timeRegex3 = `${time4}(?:${opts.join("|")})`; return new RegExp(`^${dateSource}T(?:${timeRegex3})$`); } var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, browserEmail, _emoji, ipv4, ipv6, cidrv4, cidrv6, base64, base64url, hostname, domain, e164, dateSource, date, string, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase; @@ -34187,10 +30081,10 @@ var init_regexes = __esm({ duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; - uuid = (version2) => { - if (!version2) + uuid = (version3) => { + if (!version3) return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/; - return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version3}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); }; uuid4 = /* @__PURE__ */ uuid(4); uuid6 = /* @__PURE__ */ uuid(6); @@ -34238,7 +30132,7 @@ var init_checks = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js"() { init_core(); init_regexes(); - init_util2(); + init_util(); $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { var _a; inst._zod ?? (inst._zod = {}); @@ -34842,8 +30736,8 @@ function isValidBase64(data) { function isValidBase64URL(data) { if (!base64url.test(data)) return false; - const base643 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); - const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "="); + const base644 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); + const padded = base644.padEnd(Math.ceil(base644.length / 4) * 4, "="); return isValidBase64(padded); } function isValidJWT3(token, algorithm = null) { @@ -35065,9 +30959,9 @@ var init_schemas = __esm({ init_doc(); init_parse(); init_regexes(); - init_util2(); + init_util(); init_versions(); - init_util2(); + init_util(); $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { var _a; inst ?? (inst = {}); @@ -35729,16 +31623,16 @@ var init_schemas = __esm({ return (payload, ctx) => fn2(shape, payload, ctx); }; let fastpass; - const isObject3 = isObject2; + const isObject4 = isObject2; const jit = !globalConfig.jitless; - const allowsEval2 = allowsEval; - const fastEnabled = jit && allowsEval2.value; + const allowsEval3 = allowsEval; + const fastEnabled = jit && allowsEval3.value; const catchall = def.catchall; let value2; inst._zod.parse = (payload, ctx) => { value2 ?? (value2 = _normalized.value); const input = payload.value; - if (!isObject3(input)) { + if (!isObject4(input)) { payload.issues.push({ expected: "object", code: "invalid_type", @@ -36475,7 +32369,7 @@ function ar_default() { var error; var init_ar = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ar.js"() { - init_util2(); + init_util(); error = () => { const Sizable = { string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, @@ -36486,7 +32380,7 @@ var init_ar = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -36536,51 +32430,51 @@ var init_ar = __esm({ jwt: "JWT", template_literal: "\u0645\u062F\u062E\u0644" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${issue2.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${parsedType4(issue2.input)}`; + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${issue3.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue2.values[0])}`; - return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue3.values[0])}`; + return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; - return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()}`; + return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue3.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue3.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; + return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue3.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue3.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()}`; + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue3.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue2.prefix}"`; + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue3.prefix}"`; if (_issue.format === "ends_with") return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; if (_issue.format === "includes") return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; if (_issue.format === "regex") return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; + return `${Nouns[_issue.format] ?? issue3.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; } case "not_multiple_of": - return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue2.divisor}`; + return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue3.divisor}`; case "unrecognized_keys": - return `\u0645\u0639\u0631\u0641${issue2.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue2.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + return `\u0645\u0639\u0631\u0641${issue3.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue3.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue3.keys, "\u060C ")}`; case "invalid_key": - return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue3.origin}`; case "invalid_union": return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; case "invalid_element": - return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue3.origin}`; default: return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; } @@ -36598,7 +32492,7 @@ function az_default() { var error2; var init_az = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/az.js"() { - init_util2(); + init_util(); error2 = () => { const Sizable = { string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, @@ -36609,7 +32503,7 @@ var init_az = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -36659,30 +32553,30 @@ var init_az = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${issue2.expected}, daxil olan ${parsedType4(issue2.input)}`; + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${issue3.expected}, daxil olan ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue2.values[0])}`; - return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue3.values[0])}`; + return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; - return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue3.origin ?? "d\u0259y\u0259r"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "element"}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue3.origin ?? "d\u0259y\u0259r"} ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue3.origin} ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; if (_issue.format === "ends_with") @@ -36691,18 +32585,18 @@ var init_az = __esm({ return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; if (_issue.format === "regex") return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; - return `Yanl\u0131\u015F ${Nouns[_issue.format] ?? issue2.format}`; + return `Yanl\u0131\u015F ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Yanl\u0131\u015F \u0259d\u0259d: ${issue2.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; + return `Yanl\u0131\u015F \u0259d\u0259d: ${issue3.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; case "unrecognized_keys": - return `Tan\u0131nmayan a\xE7ar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Tan\u0131nmayan a\xE7ar${issue3.keys.length > 1 ? "lar" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; + return `${issue3.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; case "invalid_union": return "Yanl\u0131\u015F d\u0259y\u0259r"; case "invalid_element": - return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; + return `${issue3.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; default: return `Yanl\u0131\u015F d\u0259y\u0259r`; } @@ -36735,7 +32629,7 @@ function be_default() { var error3; var init_be = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/be.js"() { - init_util2(); + init_util(); error3 = () => { const Sizable = { string: { @@ -36774,7 +32668,7 @@ var init_be = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -36824,36 +32718,36 @@ var init_be = __esm({ jwt: "JWT", template_literal: "\u0443\u0432\u043E\u0434" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${issue2.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${parsedType4(issue2.input)}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${issue3.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue3.values[0])}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - const maxValue = Number(issue2.maximum); + const maxValue = Number(issue3.maximum); const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.maximum.toString()} ${unit}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue3.maximum.toString()} ${unit}`; } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.maximum.toString()}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - const minValue = Number(issue2.minimum); + const minValue = Number(issue3.minimum); const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.minimum.toString()} ${unit}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue3.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue3.minimum.toString()} ${unit}`; } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.minimum.toString()}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue3.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -36862,18 +32756,18 @@ var init_be = __esm({ return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; if (_issue.format === "regex") return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${Nouns[_issue.format] ?? issue2.format}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue3.divisor}`; case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue2.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue2.keys, ", ")}`; + return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue3.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue3.origin}`; case "invalid_union": return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; case "invalid_element": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue2.origin}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue3.origin}`; default: return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; } @@ -36891,7 +32785,7 @@ function ca_default() { var error4; var init_ca = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ca.js"() { - init_util2(); + init_util(); error4 = () => { const Sizable = { string: { unit: "car\xE0cters", verb: "contenir" }, @@ -36902,7 +32796,7 @@ var init_ca = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -36952,32 +32846,32 @@ var init_ca = __esm({ jwt: "JWT", template_literal: "entrada" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Tipus inv\xE0lid: s'esperava ${issue2.expected}, s'ha rebut ${parsedType4(issue2.input)}`; + return `Tipus inv\xE0lid: s'esperava ${issue3.expected}, s'ha rebut ${parsedType5(issue3.input)}`; // return `Tipus invàlid: s'esperava ${issue.expected}, s'ha rebut ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue2.values[0])}`; - return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue2.values, " o ")}`; + if (issue3.values.length === 1) + return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue3.values[0])}`; + return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue3.values, " o ")}`; case "too_big": { - const adj = issue2.inclusive ? "com a m\xE0xim" : "menys de"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "com a m\xE0xim" : "menys de"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} contingu\xE9s ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} fos ${adj} ${issue2.maximum.toString()}`; + return `Massa gran: s'esperava que ${issue3.origin ?? "el valor"} contingu\xE9s ${adj} ${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Massa gran: s'esperava que ${issue3.origin ?? "el valor"} fos ${adj} ${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? "com a m\xEDnim" : "m\xE9s de"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "com a m\xEDnim" : "m\xE9s de"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Massa petit: s'esperava que ${issue2.origin} contingu\xE9s ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + return `Massa petit: s'esperava que ${issue3.origin} contingu\xE9s ${adj} ${issue3.minimum.toString()} ${sizing.unit}`; } - return `Massa petit: s'esperava que ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`; + return `Massa petit: s'esperava que ${issue3.origin} fos ${adj} ${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; } @@ -36987,19 +32881,19 @@ var init_ca = __esm({ return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; if (_issue.format === "regex") return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; - return `Format inv\xE0lid per a ${Nouns[_issue.format] ?? issue2.format}`; + return `Format inv\xE0lid per a ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue2.divisor}`; + return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue3.divisor}`; case "unrecognized_keys": - return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Clau${issue3.keys.length > 1 ? "s" : ""} no reconeguda${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Clau inv\xE0lida a ${issue2.origin}`; + return `Clau inv\xE0lida a ${issue3.origin}`; case "invalid_union": return "Entrada inv\xE0lida"; // Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general case "invalid_element": - return `Element inv\xE0lid a ${issue2.origin}`; + return `Element inv\xE0lid a ${issue3.origin}`; default: return `Entrada inv\xE0lida`; } @@ -37017,7 +32911,7 @@ function cs_default() { var error5; var init_cs = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/cs.js"() { - init_util2(); + init_util(); error5 = () => { const Sizable = { string: { unit: "znak\u016F", verb: "m\xEDt" }, @@ -37028,7 +32922,7 @@ var init_cs = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -37096,32 +32990,32 @@ var init_cs = __esm({ jwt: "JWT", template_literal: "vstup" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${issue2.expected}, obdr\u017Eeno ${parsedType4(issue2.input)}`; + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${issue3.expected}, obdr\u017Eeno ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue2.values[0])}`; - return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue3.values[0])}`; + return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue3.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; } - return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.maximum.toString()}`; + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue3.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue3.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue3.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; } - return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.minimum.toString()}`; + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue3.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -37130,18 +33024,18 @@ var init_cs = __esm({ return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; if (_issue.format === "regex") return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; - return `Neplatn\xFD form\xE1t ${Nouns[_issue.format] ?? issue2.format}`; + return `Neplatn\xFD form\xE1t ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue2.divisor}`; + return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue3.divisor}`; case "unrecognized_keys": - return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue2.keys, ", ")}`; + return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Neplatn\xFD kl\xED\u010D v ${issue2.origin}`; + return `Neplatn\xFD kl\xED\u010D v ${issue3.origin}`; case "invalid_union": return "Neplatn\xFD vstup"; case "invalid_element": - return `Neplatn\xE1 hodnota v ${issue2.origin}`; + return `Neplatn\xE1 hodnota v ${issue3.origin}`; default: return `Neplatn\xFD vstup`; } @@ -37159,7 +33053,7 @@ function de_default() { var error6; var init_de = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/de.js"() { - init_util2(); + init_util(); error6 = () => { const Sizable = { string: { unit: "Zeichen", verb: "zu haben" }, @@ -37170,7 +33064,7 @@ var init_de = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -37220,31 +33114,31 @@ var init_de = __esm({ jwt: "JWT", template_literal: "Eingabe" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Ung\xFCltige Eingabe: erwartet ${issue2.expected}, erhalten ${parsedType4(issue2.input)}`; + return `Ung\xFCltige Eingabe: erwartet ${issue3.expected}, erhalten ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue2.values[0])}`; - return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue3.values[0])}`; + return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; - return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ist`; + return `Zu gro\xDF: erwartet, dass ${issue3.origin ?? "Wert"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; + return `Zu gro\xDF: erwartet, dass ${issue3.origin ?? "Wert"} ${adj}${issue3.maximum.toString()} ist`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`; + return `Zu klein: erwartet, dass ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit} hat`; } - return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`; + return `Zu klein: erwartet, dass ${issue3.origin} ${adj}${issue3.minimum.toString()} ist`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; if (_issue.format === "ends_with") @@ -37253,18 +33147,18 @@ var init_de = __esm({ return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; if (_issue.format === "regex") return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; - return `Ung\xFCltig: ${Nouns[_issue.format] ?? issue2.format}`; + return `Ung\xFCltig: ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`; + return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue3.divisor} sein`; case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue2.keys, ", ")}`; + return `${issue3.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Ung\xFCltiger Schl\xFCssel in ${issue2.origin}`; + return `Ung\xFCltiger Schl\xFCssel in ${issue3.origin}`; case "invalid_union": return "Ung\xFCltige Eingabe"; case "invalid_element": - return `Ung\xFCltiger Wert in ${issue2.origin}`; + return `Ung\xFCltiger Wert in ${issue3.origin}`; default: return `Ung\xFCltige Eingabe`; } @@ -37280,9 +33174,9 @@ function en_default3() { }; } var parsedType, error7; -var init_en2 = __esm({ +var init_en = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/en.js"() { - init_util2(); + init_util(); parsedType = (data) => { const t = typeof data; switch (t) { @@ -37343,31 +33237,31 @@ var init_en2 = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Invalid input: expected ${issue2.expected}, received ${parsedType(issue2.input)}`; + return `Invalid input: expected ${issue3.expected}, received ${parsedType(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; - return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue3.values[0])}`; + return `Invalid option: expected one of ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`; + return `Too big: expected ${issue3.origin ?? "value"} to have ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue3.origin ?? "value"} to be ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Too small: expected ${issue3.origin} to have ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`; + return `Too small: expected ${issue3.origin} to be ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `Invalid string: must start with "${_issue.prefix}"`; } @@ -37377,18 +33271,18 @@ var init_en2 = __esm({ return `Invalid string: must include "${_issue.includes}"`; if (_issue.format === "regex") return `Invalid string: must match pattern ${_issue.pattern}`; - return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; + return `Invalid ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Invalid number: must be a multiple of ${issue2.divisor}`; + return `Invalid number: must be a multiple of ${issue3.divisor}`; case "unrecognized_keys": - return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Unrecognized key${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Invalid key in ${issue2.origin}`; + return `Invalid key in ${issue3.origin}`; case "invalid_union": return "Invalid input"; case "invalid_element": - return `Invalid value in ${issue2.origin}`; + return `Invalid value in ${issue3.origin}`; default: return `Invalid input`; } @@ -37406,7 +33300,7 @@ function eo_default() { var parsedType2, error8; var init_eo = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/eo.js"() { - init_util2(); + init_util(); parsedType2 = (data) => { const t = typeof data; switch (t) { @@ -37467,31 +33361,31 @@ var init_eo = __esm({ jwt: "JWT", template_literal: "enigo" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Nevalida enigo: atendi\u011Dis ${issue2.expected}, ricevi\u011Dis ${parsedType2(issue2.input)}`; + return `Nevalida enigo: atendi\u011Dis ${issue3.expected}, ricevi\u011Dis ${parsedType2(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue2.values[0])}`; - return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue3.values[0])}`; + return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementojn"}`; - return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()}`; + return `Tro granda: atendi\u011Dis ke ${issue3.origin ?? "valoro"} havu ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementojn"}`; + return `Tro granda: atendi\u011Dis ke ${issue3.origin ?? "valoro"} havu ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Tro malgranda: atendi\u011Dis ke ${issue3.origin} havu ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`; + return `Tro malgranda: atendi\u011Dis ke ${issue3.origin} estu ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -37500,18 +33394,18 @@ var init_eo = __esm({ return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; - return `Nevalida ${Nouns[_issue.format] ?? issue2.format}`; + return `Nevalida ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`; + return `Nevalida nombro: devas esti oblo de ${issue3.divisor}`; case "unrecognized_keys": - return `Nekonata${issue2.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Nekonata${issue3.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue3.keys.length > 1 ? "j" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Nevalida \u015Dlosilo en ${issue2.origin}`; + return `Nevalida \u015Dlosilo en ${issue3.origin}`; case "invalid_union": return "Nevalida enigo"; case "invalid_element": - return `Nevalida valoro en ${issue2.origin}`; + return `Nevalida valoro en ${issue3.origin}`; default: return `Nevalida enigo`; } @@ -37529,7 +33423,7 @@ function es_default() { var error9; var init_es = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/es.js"() { - init_util2(); + init_util(); error9 = () => { const Sizable = { string: { unit: "caracteres", verb: "tener" }, @@ -37540,7 +33434,7 @@ var init_es = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -37590,32 +33484,32 @@ var init_es = __esm({ jwt: "JWT", template_literal: "entrada" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Entrada inv\xE1lida: se esperaba ${issue2.expected}, recibido ${parsedType4(issue2.input)}`; + return `Entrada inv\xE1lida: se esperaba ${issue3.expected}, recibido ${parsedType5(issue3.input)}`; // return `Entrada inválida: se esperaba ${issue.expected}, recibido ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue2.values[0])}`; - return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue3.values[0])}`; + return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Demasiado grande: se esperaba que ${issue2.origin ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; - return `Demasiado grande: se esperaba que ${issue2.origin ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`; + return `Demasiado grande: se esperaba que ${issue3.origin ?? "valor"} tuviera ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Demasiado grande: se esperaba que ${issue3.origin ?? "valor"} fuera ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Demasiado peque\xF1o: se esperaba que ${issue2.origin} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Demasiado peque\xF1o: se esperaba que ${issue3.origin} tuviera ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Demasiado peque\xF1o: se esperaba que ${issue2.origin} fuera ${adj}${issue2.minimum.toString()}`; + return `Demasiado peque\xF1o: se esperaba que ${issue3.origin} fuera ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -37624,18 +33518,18 @@ var init_es = __esm({ return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; if (_issue.format === "regex") return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; - return `Inv\xE1lido ${Nouns[_issue.format] ?? issue2.format}`; + return `Inv\xE1lido ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue2.divisor}`; + return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue3.divisor}`; case "unrecognized_keys": - return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Llave${issue3.keys.length > 1 ? "s" : ""} desconocida${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Llave inv\xE1lida en ${issue2.origin}`; + return `Llave inv\xE1lida en ${issue3.origin}`; case "invalid_union": return "Entrada inv\xE1lida"; case "invalid_element": - return `Valor inv\xE1lido en ${issue2.origin}`; + return `Valor inv\xE1lido en ${issue3.origin}`; default: return `Entrada inv\xE1lida`; } @@ -37653,7 +33547,7 @@ function fa_default() { var error10; var init_fa = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fa.js"() { - init_util2(); + init_util(); error10 = () => { const Sizable = { string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, @@ -37664,7 +33558,7 @@ var init_fa = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -37714,33 +33608,33 @@ var init_fa = __esm({ jwt: "JWT", template_literal: "\u0648\u0631\u0648\u062F\u06CC" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${issue2.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${parsedType4(issue2.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${issue3.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${parsedType5(issue3.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; case "invalid_value": - if (issue2.values.length === 1) { - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue2.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; + if (issue3.values.length === 1) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue3.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; } - return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue2.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; + return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue3.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue3.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; } - return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0628\u0627\u0634\u062F`; + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue3.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue3.maximum.toString()} \u0628\u0627\u0634\u062F`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue3.origin} \u0628\u0627\u06CC\u062F ${adj}${issue3.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; } - return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0628\u0627\u0634\u062F`; + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue3.origin} \u0628\u0627\u06CC\u062F ${adj}${issue3.minimum.toString()} \u0628\u0627\u0634\u062F`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; } @@ -37753,18 +33647,18 @@ var init_fa = __esm({ if (_issue.format === "regex") { return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; } - return `${Nouns[_issue.format] ?? issue2.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + return `${Nouns[_issue.format] ?? issue3.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; } case "not_multiple_of": - return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue2.divisor} \u0628\u0627\u0634\u062F`; + return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue3.divisor} \u0628\u0627\u0634\u062F`; case "unrecognized_keys": - return `\u06A9\u0644\u06CC\u062F${issue2.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue2.keys, ", ")}`; + return `\u06A9\u0644\u06CC\u062F${issue3.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue2.origin}`; + return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue3.origin}`; case "invalid_union": return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; case "invalid_element": - return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue2.origin}`; + return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue3.origin}`; default: return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; } @@ -37782,7 +33676,7 @@ function fi_default() { var error11; var init_fi = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fi.js"() { - init_util2(); + init_util(); error11 = () => { const Sizable = { string: { unit: "merkki\xE4", subject: "merkkijonon" }, @@ -37797,7 +33691,7 @@ var init_fi = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -37847,32 +33741,32 @@ var init_fi = __esm({ jwt: "JWT", template_literal: "templaattimerkkijono" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Virheellinen tyyppi: odotettiin ${issue2.expected}, oli ${parsedType4(issue2.input)}`; + return `Virheellinen tyyppi: odotettiin ${issue3.expected}, oli ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue2.values[0])}`; - return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue3.values[0])}`; + return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim(); + return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue3.maximum.toString()} ${sizing.unit}`.trim(); } - return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue2.maximum.toString()}`; + return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim(); + return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue3.minimum.toString()} ${sizing.unit}`.trim(); } - return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue2.minimum.toString()}`; + return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -37882,12 +33776,12 @@ var init_fi = __esm({ if (_issue.format === "regex") { return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; } - return `Virheellinen ${Nouns[_issue.format] ?? issue2.format}`; + return `Virheellinen ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Virheellinen luku: t\xE4ytyy olla luvun ${issue2.divisor} monikerta`; + return `Virheellinen luku: t\xE4ytyy olla luvun ${issue3.divisor} monikerta`; case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`; + return `${issue3.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": return "Virheellinen avain tietueessa"; case "invalid_union": @@ -37911,7 +33805,7 @@ function fr_default() { var error12; var init_fr = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fr.js"() { - init_util2(); + init_util(); error12 = () => { const Sizable = { string: { unit: "caract\xE8res", verb: "avoir" }, @@ -37922,7 +33816,7 @@ var init_fr = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -37972,31 +33866,31 @@ var init_fr = __esm({ jwt: "JWT", template_literal: "entr\xE9e" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Entr\xE9e invalide : ${issue2.expected} attendu, ${parsedType4(issue2.input)} re\xE7u`; + return `Entr\xE9e invalide : ${issue3.expected} attendu, ${parsedType5(issue3.input)} re\xE7u`; case "invalid_value": - if (issue2.values.length === 1) - return `Entr\xE9e invalide : ${stringifyPrimitive(issue2.values[0])} attendu`; - return `Option invalide : une valeur parmi ${joinValues(issue2.values, "|")} attendue`; + if (issue3.values.length === 1) + return `Entr\xE9e invalide : ${stringifyPrimitive(issue3.values[0])} attendu`; + return `Option invalide : une valeur parmi ${joinValues(issue3.values, "|")} attendue`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; - return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`; + return `Trop grand : ${issue3.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; + return `Trop grand : ${issue3.origin ?? "valeur"} doit \xEAtre ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Trop petit : ${issue3.origin} doit ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`; + return `Trop petit : ${issue3.origin} doit \xEAtre ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -38005,18 +33899,18 @@ var init_fr = __esm({ return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; if (_issue.format === "regex") return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} invalide`; + return `${Nouns[_issue.format] ?? issue3.format} invalide`; } case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + return `Nombre invalide : doit \xEAtre un multiple de ${issue3.divisor}`; case "unrecognized_keys": - return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + return `Cl\xE9${issue3.keys.length > 1 ? "s" : ""} non reconnue${issue3.keys.length > 1 ? "s" : ""} : ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Cl\xE9 invalide dans ${issue2.origin}`; + return `Cl\xE9 invalide dans ${issue3.origin}`; case "invalid_union": return "Entr\xE9e invalide"; case "invalid_element": - return `Valeur invalide dans ${issue2.origin}`; + return `Valeur invalide dans ${issue3.origin}`; default: return `Entr\xE9e invalide`; } @@ -38034,7 +33928,7 @@ function fr_CA_default() { var error13; var init_fr_CA = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fr-CA.js"() { - init_util2(); + init_util(); error13 = () => { const Sizable = { string: { unit: "caract\xE8res", verb: "avoir" }, @@ -38045,7 +33939,7 @@ var init_fr_CA = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -38095,31 +33989,31 @@ var init_fr_CA = __esm({ jwt: "JWT", template_literal: "entr\xE9e" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Entr\xE9e invalide : attendu ${issue2.expected}, re\xE7u ${parsedType4(issue2.input)}`; + return `Entr\xE9e invalide : attendu ${issue3.expected}, re\xE7u ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue2.values[0])}`; - return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue3.values[0])}`; + return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "\u2264" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "\u2264" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} ait ${adj}${issue2.maximum.toString()} ${sizing.unit}`; - return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} soit ${adj}${issue2.maximum.toString()}`; + return `Trop grand : attendu que ${issue3.origin ?? "la valeur"} ait ${adj}${issue3.maximum.toString()} ${sizing.unit}`; + return `Trop grand : attendu que ${issue3.origin ?? "la valeur"} soit ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? "\u2265" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "\u2265" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Trop petit : attendu que ${issue3.origin} ait ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`; + return `Trop petit : attendu que ${issue3.origin} soit ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; } @@ -38129,18 +34023,18 @@ var init_fr_CA = __esm({ return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; if (_issue.format === "regex") return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} invalide`; + return `${Nouns[_issue.format] ?? issue3.format} invalide`; } case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + return `Nombre invalide : doit \xEAtre un multiple de ${issue3.divisor}`; case "unrecognized_keys": - return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + return `Cl\xE9${issue3.keys.length > 1 ? "s" : ""} non reconnue${issue3.keys.length > 1 ? "s" : ""} : ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Cl\xE9 invalide dans ${issue2.origin}`; + return `Cl\xE9 invalide dans ${issue3.origin}`; case "invalid_union": return "Entr\xE9e invalide"; case "invalid_element": - return `Valeur invalide dans ${issue2.origin}`; + return `Valeur invalide dans ${issue3.origin}`; default: return `Entr\xE9e invalide`; } @@ -38158,7 +34052,7 @@ function he_default() { var error14; var init_he = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/he.js"() { - init_util2(); + init_util(); error14 = () => { const Sizable = { string: { unit: "\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA", verb: "\u05DC\u05DB\u05DC\u05D5\u05DC" }, @@ -38169,7 +34063,7 @@ var init_he = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -38219,32 +34113,32 @@ var init_he = __esm({ jwt: "JWT", template_literal: "\u05E7\u05DC\u05D8" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${issue2.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${parsedType4(issue2.input)}`; + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${issue3.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${parsedType5(issue3.input)}`; // return `Invalid input: expected ${issue.expected}, received ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${stringifyPrimitive(issue2.values[0])}`; - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${stringifyPrimitive(issue3.values[0])}`; + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue2.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue2.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.maximum.toString()}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue3.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue3.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue2.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue3.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue2.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.minimum.toString()}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue3.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -38253,18 +34147,18 @@ var init_he = __esm({ return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; if (_issue.format === "regex") return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + return `${Nouns[_issue.format] ?? issue3.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; } case "not_multiple_of": - return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue2.divisor}`; + return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue3.divisor}`; case "unrecognized_keys": - return `\u05DE\u05E4\u05EA\u05D7${issue2.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue2.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue2.keys, ", ")}`; + return `\u05DE\u05E4\u05EA\u05D7${issue3.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue3.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue2.origin}`; + return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue3.origin}`; case "invalid_union": return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; case "invalid_element": - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue2.origin}`; + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue3.origin}`; default: return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; } @@ -38282,7 +34176,7 @@ function hu_default() { var error15; var init_hu = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/hu.js"() { - init_util2(); + init_util(); error15 = () => { const Sizable = { string: { unit: "karakter", verb: "legyen" }, @@ -38293,7 +34187,7 @@ var init_hu = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -38343,32 +34237,32 @@ var init_hu = __esm({ jwt: "JWT", template_literal: "bemenet" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${issue2.expected}, a kapott \xE9rt\xE9k ${parsedType4(issue2.input)}`; + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${issue3.expected}, a kapott \xE9rt\xE9k ${parsedType5(issue3.input)}`; // return `Invalid input: expected ${issue.expected}, received ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`; - return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue3.values[0])}`; + return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`; - return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`; + return `T\xFAl nagy: ${issue3.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elem"}`; + return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue3.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue3.origin} m\xE9rete t\xFAl kicsi ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`; + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue3.origin} t\xFAl kicsi ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; if (_issue.format === "ends_with") @@ -38377,18 +34271,18 @@ var init_hu = __esm({ return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; if (_issue.format === "regex") return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; - return `\xC9rv\xE9nytelen ${Nouns[_issue.format] ?? issue2.format}`; + return `\xC9rv\xE9nytelen ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\xC9rv\xE9nytelen sz\xE1m: ${issue2.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + return `\xC9rv\xE9nytelen sz\xE1m: ${issue3.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; case "unrecognized_keys": - return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Ismeretlen kulcs${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\xC9rv\xE9nytelen kulcs ${issue2.origin}`; + return `\xC9rv\xE9nytelen kulcs ${issue3.origin}`; case "invalid_union": return "\xC9rv\xE9nytelen bemenet"; case "invalid_element": - return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue2.origin}`; + return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue3.origin}`; default: return `\xC9rv\xE9nytelen bemenet`; } @@ -38406,7 +34300,7 @@ function id_default() { var error16; var init_id = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/id.js"() { - init_util2(); + init_util(); error16 = () => { const Sizable = { string: { unit: "karakter", verb: "memiliki" }, @@ -38417,7 +34311,7 @@ var init_id = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -38467,31 +34361,31 @@ var init_id = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Input tidak valid: diharapkan ${issue2.expected}, diterima ${parsedType4(issue2.input)}`; + return `Input tidak valid: diharapkan ${issue3.expected}, diterima ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Input tidak valid: diharapkan ${stringifyPrimitive(issue2.values[0])}`; - return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Input tidak valid: diharapkan ${stringifyPrimitive(issue3.values[0])}`; + return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} memiliki ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; - return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} menjadi ${adj}${issue2.maximum.toString()}`; + return `Terlalu besar: diharapkan ${issue3.origin ?? "value"} memiliki ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: diharapkan ${issue3.origin ?? "value"} menjadi ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Terlalu kecil: diharapkan ${issue3.origin} memiliki ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`; + return `Terlalu kecil: diharapkan ${issue3.origin} menjadi ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -38500,18 +34394,18 @@ var init_id = __esm({ return `String tidak valid: harus menyertakan "${_issue.includes}"`; if (_issue.format === "regex") return `String tidak valid: harus sesuai pola ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} tidak valid`; + return `${Nouns[_issue.format] ?? issue3.format} tidak valid`; } case "not_multiple_of": - return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`; + return `Angka tidak valid: harus kelipatan dari ${issue3.divisor}`; case "unrecognized_keys": - return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Kunci tidak dikenali ${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Kunci tidak valid di ${issue2.origin}`; + return `Kunci tidak valid di ${issue3.origin}`; case "invalid_union": return "Input tidak valid"; case "invalid_element": - return `Nilai tidak valid di ${issue2.origin}`; + return `Nilai tidak valid di ${issue3.origin}`; default: return `Input tidak valid`; } @@ -38529,7 +34423,7 @@ function it_default() { var error17; var init_it = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/it.js"() { - init_util2(); + init_util(); error17 = () => { const Sizable = { string: { unit: "caratteri", verb: "avere" }, @@ -38540,7 +34434,7 @@ var init_it = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -38590,32 +34484,32 @@ var init_it = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Input non valido: atteso ${issue2.expected}, ricevuto ${parsedType4(issue2.input)}`; + return `Input non valido: atteso ${issue3.expected}, ricevuto ${parsedType5(issue3.input)}`; // return `Input non valido: atteso ${issue.expected}, ricevuto ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`; - return `Opzione non valida: atteso uno tra ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Input non valido: atteso ${stringifyPrimitive(issue3.values[0])}`; + return `Opzione non valida: atteso uno tra ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Troppo grande: ${issue2.origin ?? "valore"} deve avere ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementi"}`; - return `Troppo grande: ${issue2.origin ?? "valore"} deve essere ${adj}${issue2.maximum.toString()}`; + return `Troppo grande: ${issue3.origin ?? "valore"} deve avere ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementi"}`; + return `Troppo grande: ${issue3.origin ?? "valore"} deve essere ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Troppo piccolo: ${issue3.origin} deve avere ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`; + return `Troppo piccolo: ${issue3.origin} deve essere ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -38624,18 +34518,18 @@ var init_it = __esm({ return `Stringa non valida: deve includere "${_issue.includes}"`; if (_issue.format === "regex") return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; - return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; + return `Invalid ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`; + return `Numero non valido: deve essere un multiplo di ${issue3.divisor}`; case "unrecognized_keys": - return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`; + return `Chiav${issue3.keys.length > 1 ? "i" : "e"} non riconosciut${issue3.keys.length > 1 ? "e" : "a"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Chiave non valida in ${issue2.origin}`; + return `Chiave non valida in ${issue3.origin}`; case "invalid_union": return "Input non valido"; case "invalid_element": - return `Valore non valido in ${issue2.origin}`; + return `Valore non valido in ${issue3.origin}`; default: return `Input non valido`; } @@ -38653,7 +34547,7 @@ function ja_default() { var error18; var init_ja = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ja.js"() { - init_util2(); + init_util(); error18 = () => { const Sizable = { string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, @@ -38664,7 +34558,7 @@ var init_ja = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -38714,30 +34608,30 @@ var init_ja = __esm({ jwt: "JWT", template_literal: "\u5165\u529B\u5024" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u7121\u52B9\u306A\u5165\u529B: ${issue2.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${parsedType4(issue2.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u5165\u529B: ${issue3.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${parsedType5(issue3.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; case "invalid_value": - if (issue2.values.length === 1) - return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue2.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; - return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue2.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (issue3.values.length === 1) + return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue3.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue3.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; case "too_big": { - const adj = issue2.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue3.origin ?? "\u5024"}\u306F${issue3.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue3.origin ?? "\u5024"}\u306F${issue3.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; } case "too_small": { - const adj = issue2.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue3.origin}\u306F${issue3.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue3.origin}\u306F${issue3.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; if (_issue.format === "ends_with") @@ -38746,18 +34640,18 @@ var init_ja = __esm({ return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; if (_issue.format === "regex") return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u7121\u52B9\u306A${Nouns[_issue.format] ?? issue2.format}`; + return `\u7121\u52B9\u306A${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u7121\u52B9\u306A\u6570\u5024: ${issue2.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u7121\u52B9\u306A\u6570\u5024: ${issue3.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; case "unrecognized_keys": - return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue2.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue2.keys, "\u3001")}`; + return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue3.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue3.keys, "\u3001")}`; case "invalid_key": - return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; + return `${issue3.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; case "invalid_union": return "\u7121\u52B9\u306A\u5165\u529B"; case "invalid_element": - return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; + return `${issue3.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; default: return `\u7121\u52B9\u306A\u5165\u529B`; } @@ -38775,7 +34669,7 @@ function kh_default() { var error19; var init_kh = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/kh.js"() { - init_util2(); + init_util(); error19 = () => { const Sizable = { string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, @@ -38786,7 +34680,7 @@ var init_kh = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -38836,31 +34730,31 @@ var init_kh = __esm({ jwt: "JWT", template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${parsedType4(issue2.input)}`; + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue2.values[0])}`; - return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue3.values[0])}`; + return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; - return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue3.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.origin} ${adj} ${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()}`; + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.origin} ${adj} ${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; } @@ -38870,18 +34764,18 @@ var init_kh = __esm({ return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; if (_issue.format === "regex") return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; - return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${Nouns[_issue.format] ?? issue2.format}`; + return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue2.divisor}`; + return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue3.divisor}`; case "unrecognized_keys": - return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue2.keys, ", ")}`; + return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue3.origin}`; case "invalid_union": return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; case "invalid_element": - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue3.origin}`; default: return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; } @@ -38899,7 +34793,7 @@ function ko_default() { var error20; var init_ko = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ko.js"() { - init_util2(); + init_util(); error20 = () => { const Sizable = { string: { unit: "\uBB38\uC790", verb: "to have" }, @@ -38910,7 +34804,7 @@ var init_ko = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -38960,35 +34854,35 @@ var init_ko = __esm({ jwt: "JWT", template_literal: "\uC785\uB825" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${issue2.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${parsedType4(issue2.input)}\uC785\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${issue3.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${parsedType5(issue3.input)}\uC785\uB2C8\uB2E4`; case "invalid_value": - if (issue2.values.length === 1) - return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue2.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; - return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue2.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + if (issue3.values.length === 1) + return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue3.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue3.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; case "too_big": { - const adj = issue2.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; + const adj = issue3.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; const suffix2 = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; - const sizing = getSizing(issue2.origin); + const sizing = getSizing(issue3.origin); const unit = sizing?.unit ?? "\uC694\uC18C"; if (sizing) - return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()}${unit} ${adj}${suffix2}`; - return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()} ${adj}${suffix2}`; + return `${issue3.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue3.maximum.toString()}${unit} ${adj}${suffix2}`; + return `${issue3.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue3.maximum.toString()} ${adj}${suffix2}`; } case "too_small": { - const adj = issue2.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; + const adj = issue3.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; const suffix2 = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; - const sizing = getSizing(issue2.origin); + const sizing = getSizing(issue3.origin); const unit = sizing?.unit ?? "\uC694\uC18C"; if (sizing) { - return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()}${unit} ${adj}${suffix2}`; + return `${issue3.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue3.minimum.toString()}${unit} ${adj}${suffix2}`; } - return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()} ${adj}${suffix2}`; + return `${issue3.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue3.minimum.toString()} ${adj}${suffix2}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; } @@ -38998,18 +34892,18 @@ var init_ko = __esm({ return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; if (_issue.format === "regex") return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; - return `\uC798\uBABB\uB41C ${Nouns[_issue.format] ?? issue2.format}`; + return `\uC798\uBABB\uB41C ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue2.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue3.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; case "unrecognized_keys": - return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue2.keys, ", ")}`; + return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\uC798\uBABB\uB41C \uD0A4: ${issue2.origin}`; + return `\uC798\uBABB\uB41C \uD0A4: ${issue3.origin}`; case "invalid_union": return `\uC798\uBABB\uB41C \uC785\uB825`; case "invalid_element": - return `\uC798\uBABB\uB41C \uAC12: ${issue2.origin}`; + return `\uC798\uBABB\uB41C \uAC12: ${issue3.origin}`; default: return `\uC798\uBABB\uB41C \uC785\uB825`; } @@ -39027,7 +34921,7 @@ function mk_default() { var error21; var init_mk = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/mk.js"() { - init_util2(); + init_util(); error21 = () => { const Sizable = { string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, @@ -39038,7 +34932,7 @@ var init_mk = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -39088,32 +34982,32 @@ var init_mk = __esm({ jwt: "JWT", template_literal: "\u0432\u043D\u0435\u0441" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${parsedType4(issue2.input)}`; + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue3.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${parsedType5(issue3.input)}`; // return `Invalid input: expected ${issue.expected}, received ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; - return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue3.values[0])}`; + return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue3.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue3.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue3.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue3.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; } @@ -39123,18 +35017,18 @@ var init_mk = __esm({ return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; if (_issue.format === "regex") return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; - return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; + return `Invalid ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue2.divisor}`; + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue3.divisor}`; case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue2.keys, ", ")}`; + return `${issue3.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue2.origin}`; + return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue3.origin}`; case "invalid_union": return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; case "invalid_element": - return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue2.origin}`; + return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue3.origin}`; default: return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; } @@ -39152,7 +35046,7 @@ function ms_default() { var error22; var init_ms = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ms.js"() { - init_util2(); + init_util(); error22 = () => { const Sizable = { string: { unit: "aksara", verb: "mempunyai" }, @@ -39163,7 +35057,7 @@ var init_ms = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -39213,31 +35107,31 @@ var init_ms = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Input tidak sah: dijangka ${issue2.expected}, diterima ${parsedType4(issue2.input)}`; + return `Input tidak sah: dijangka ${issue3.expected}, diterima ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`; - return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Input tidak sah: dijangka ${stringifyPrimitive(issue3.values[0])}`; + return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; - return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} adalah ${adj}${issue2.maximum.toString()}`; + return `Terlalu besar: dijangka ${issue3.origin ?? "nilai"} ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: dijangka ${issue3.origin ?? "nilai"} adalah ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Terlalu kecil: dijangka ${issue3.origin} ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`; + return `Terlalu kecil: dijangka ${issue3.origin} adalah ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -39246,18 +35140,18 @@ var init_ms = __esm({ return `String tidak sah: mesti mengandungi "${_issue.includes}"`; if (_issue.format === "regex") return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} tidak sah`; + return `${Nouns[_issue.format] ?? issue3.format} tidak sah`; } case "not_multiple_of": - return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`; + return `Nombor tidak sah: perlu gandaan ${issue3.divisor}`; case "unrecognized_keys": - return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`; + return `Kunci tidak dikenali: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Kunci tidak sah dalam ${issue2.origin}`; + return `Kunci tidak sah dalam ${issue3.origin}`; case "invalid_union": return "Input tidak sah"; case "invalid_element": - return `Nilai tidak sah dalam ${issue2.origin}`; + return `Nilai tidak sah dalam ${issue3.origin}`; default: return `Input tidak sah`; } @@ -39275,7 +35169,7 @@ function nl_default() { var error23; var init_nl = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/nl.js"() { - init_util2(); + init_util(); error23 = () => { const Sizable = { string: { unit: "tekens" }, @@ -39286,7 +35180,7 @@ var init_nl = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -39336,31 +35230,31 @@ var init_nl = __esm({ jwt: "JWT", template_literal: "invoer" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Ongeldige invoer: verwacht ${issue2.expected}, ontving ${parsedType4(issue2.input)}`; + return `Ongeldige invoer: verwacht ${issue3.expected}, ontving ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`; - return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue3.values[0])}`; + return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Te lang: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"} bevat`; - return `Te lang: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`; + return `Te lang: verwacht dat ${issue3.origin ?? "waarde"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementen"} bevat`; + return `Te lang: verwacht dat ${issue3.origin ?? "waarde"} ${adj}${issue3.maximum.toString()} is`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Te kort: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} bevat`; + return `Te kort: verwacht dat ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit} bevat`; } - return `Te kort: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`; + return `Te kort: verwacht dat ${issue3.origin} ${adj}${issue3.minimum.toString()} is`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; } @@ -39370,18 +35264,18 @@ var init_nl = __esm({ return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; if (_issue.format === "regex") return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; - return `Ongeldig: ${Nouns[_issue.format] ?? issue2.format}`; + return `Ongeldig: ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`; + return `Ongeldig getal: moet een veelvoud van ${issue3.divisor} zijn`; case "unrecognized_keys": - return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Onbekende key${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Ongeldige key in ${issue2.origin}`; + return `Ongeldige key in ${issue3.origin}`; case "invalid_union": return "Ongeldige invoer"; case "invalid_element": - return `Ongeldige waarde in ${issue2.origin}`; + return `Ongeldige waarde in ${issue3.origin}`; default: return `Ongeldige invoer`; } @@ -39399,7 +35293,7 @@ function no_default() { var error24; var init_no = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/no.js"() { - init_util2(); + init_util(); error24 = () => { const Sizable = { string: { unit: "tegn", verb: "\xE5 ha" }, @@ -39410,7 +35304,7 @@ var init_no = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -39460,31 +35354,31 @@ var init_no = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Ugyldig input: forventet ${issue2.expected}, fikk ${parsedType4(issue2.input)}`; + return `Ugyldig input: forventet ${issue3.expected}, fikk ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`; - return `Ugyldig valg: forventet en av ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Ugyldig verdi: forventet ${stringifyPrimitive(issue3.values[0])}`; + return `Ugyldig valg: forventet en av ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; - return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()}`; + return `For stor(t): forventet ${issue3.origin ?? "value"} til \xE5 ha ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor(t): forventet ${issue3.origin ?? "value"} til \xE5 ha ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `For lite(n): forventet ${issue3.origin} til \xE5 ha ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()}`; + return `For lite(n): forventet ${issue3.origin} til \xE5 ha ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -39493,18 +35387,18 @@ var init_no = __esm({ return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; if (_issue.format === "regex") return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; - return `Ugyldig ${Nouns[_issue.format] ?? issue2.format}`; + return `Ugyldig ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue2.divisor}`; + return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue3.divisor}`; case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue2.keys, ", ")}`; + return `${issue3.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Ugyldig n\xF8kkel i ${issue2.origin}`; + return `Ugyldig n\xF8kkel i ${issue3.origin}`; case "invalid_union": return "Ugyldig input"; case "invalid_element": - return `Ugyldig verdi i ${issue2.origin}`; + return `Ugyldig verdi i ${issue3.origin}`; default: return `Ugyldig input`; } @@ -39522,7 +35416,7 @@ function ota_default() { var error25; var init_ota = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ota.js"() { - init_util2(); + init_util(); error25 = () => { const Sizable = { string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, @@ -39533,7 +35427,7 @@ var init_ota = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -39583,32 +35477,32 @@ var init_ota = __esm({ jwt: "JWT", template_literal: "giren" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `F\xE2sit giren: umulan ${issue2.expected}, al\u0131nan ${parsedType4(issue2.input)}`; + return `F\xE2sit giren: umulan ${issue3.expected}, al\u0131nan ${parsedType5(issue3.input)}`; // return `Fâsit giren: umulan ${issue.expected}, alınan ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `F\xE2sit giren: umulan ${stringifyPrimitive(issue2.values[0])}`; - return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `F\xE2sit giren: umulan ${stringifyPrimitive(issue3.values[0])}`; + return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; - return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue3.origin ?? "value"}, ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue3.origin ?? "value"}, ${adj}${issue3.maximum.toString()} olmal\u0131yd\u0131.`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; + return `Fazla k\xFC\xE7\xFCk: ${issue3.origin}, ${adj}${issue3.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; } - return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmal\u0131yd\u0131.`; + return `Fazla k\xFC\xE7\xFCk: ${issue3.origin}, ${adj}${issue3.minimum.toString()} olmal\u0131yd\u0131.`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; if (_issue.format === "ends_with") @@ -39617,18 +35511,18 @@ var init_ota = __esm({ return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; if (_issue.format === "regex") return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; - return `F\xE2sit ${Nouns[_issue.format] ?? issue2.format}`; + return `F\xE2sit ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `F\xE2sit say\u0131: ${issue2.divisor} kat\u0131 olmal\u0131yd\u0131.`; + return `F\xE2sit say\u0131: ${issue3.divisor} kat\u0131 olmal\u0131yd\u0131.`; case "unrecognized_keys": - return `Tan\u0131nmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Tan\u0131nmayan anahtar ${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `${issue2.origin} i\xE7in tan\u0131nmayan anahtar var.`; + return `${issue3.origin} i\xE7in tan\u0131nmayan anahtar var.`; case "invalid_union": return "Giren tan\u0131namad\u0131."; case "invalid_element": - return `${issue2.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; + return `${issue3.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; default: return `K\u0131ymet tan\u0131namad\u0131.`; } @@ -39646,7 +35540,7 @@ function ps_default() { var error26; var init_ps = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ps.js"() { - init_util2(); + init_util(); error26 = () => { const Sizable = { string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, @@ -39657,7 +35551,7 @@ var init_ps = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -39707,33 +35601,33 @@ var init_ps = __esm({ jwt: "JWT", template_literal: "\u0648\u0631\u0648\u062F\u064A" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${issue2.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${parsedType4(issue2.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${issue3.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${parsedType5(issue3.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; case "invalid_value": - if (issue2.values.length === 1) { - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue2.values[0])} \u0648\u0627\u06CC`; + if (issue3.values.length === 1) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue3.values[0])} \u0648\u0627\u06CC`; } - return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue2.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; + return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue3.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue3.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; } - return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0648\u064A`; + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue3.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue3.maximum.toString()} \u0648\u064A`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue3.origin} \u0628\u0627\u06CC\u062F ${adj}${issue3.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; } - return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0648\u064A`; + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue3.origin} \u0628\u0627\u06CC\u062F ${adj}${issue3.minimum.toString()} \u0648\u064A`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; } @@ -39746,18 +35640,18 @@ var init_ps = __esm({ if (_issue.format === "regex") { return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; } - return `${Nouns[_issue.format] ?? issue2.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + return `${Nouns[_issue.format] ?? issue3.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; } case "not_multiple_of": - return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue2.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; + return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue3.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; case "unrecognized_keys": - return `\u0646\u0627\u0633\u0645 ${issue2.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue2.keys, ", ")}`; + return `\u0646\u0627\u0633\u0645 ${issue3.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue3.origin} \u06A9\u06D0`; case "invalid_union": return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; case "invalid_element": - return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue3.origin} \u06A9\u06D0`; default: return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; } @@ -39775,7 +35669,7 @@ function pl_default() { var error27; var init_pl = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/pl.js"() { - init_util2(); + init_util(); error27 = () => { const Sizable = { string: { unit: "znak\xF3w", verb: "mie\u0107" }, @@ -39786,7 +35680,7 @@ var init_pl = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -39836,32 +35730,32 @@ var init_pl = __esm({ jwt: "JWT", template_literal: "wej\u015Bcie" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${issue2.expected}, otrzymano ${parsedType4(issue2.input)}`; + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${issue3.expected}, otrzymano ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`; - return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue3.values[0])}`; + return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue3.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; } - return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.maximum.toString()}`; + return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue3.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; + return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue3.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue3.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; } - return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.minimum.toString()}`; + return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue3.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -39870,18 +35764,18 @@ var init_pl = __esm({ return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; if (_issue.format === "regex") return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; - return `Nieprawid\u0142ow(y/a/e) ${Nouns[_issue.format] ?? issue2.format}`; + return `Nieprawid\u0142ow(y/a/e) ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue2.divisor}`; + return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue3.divisor}`; case "unrecognized_keys": - return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Nierozpoznane klucze${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Nieprawid\u0142owy klucz w ${issue2.origin}`; + return `Nieprawid\u0142owy klucz w ${issue3.origin}`; case "invalid_union": return "Nieprawid\u0142owe dane wej\u015Bciowe"; case "invalid_element": - return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue2.origin}`; + return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue3.origin}`; default: return `Nieprawid\u0142owe dane wej\u015Bciowe`; } @@ -39899,7 +35793,7 @@ function pt_default() { var error28; var init_pt = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/pt.js"() { - init_util2(); + init_util(); error28 = () => { const Sizable = { string: { unit: "caracteres", verb: "ter" }, @@ -39910,7 +35804,7 @@ var init_pt = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -39960,31 +35854,31 @@ var init_pt = __esm({ jwt: "JWT", template_literal: "entrada" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Tipo inv\xE1lido: esperado ${issue2.expected}, recebido ${parsedType4(issue2.input)}`; + return `Tipo inv\xE1lido: esperado ${issue3.expected}, recebido ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`; - return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue3.values[0])}`; + return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; - return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`; + return `Muito grande: esperado que ${issue3.origin ?? "valor"} tivesse ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Muito grande: esperado que ${issue3.origin ?? "valor"} fosse ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Muito pequeno: esperado que ${issue3.origin} tivesse ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`; + return `Muito pequeno: esperado que ${issue3.origin} fosse ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -39993,18 +35887,18 @@ var init_pt = __esm({ return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; if (_issue.format === "regex") return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} inv\xE1lido`; + return `${Nouns[_issue.format] ?? issue3.format} inv\xE1lido`; } case "not_multiple_of": - return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`; + return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue3.divisor}`; case "unrecognized_keys": - return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Chave${issue3.keys.length > 1 ? "s" : ""} desconhecida${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Chave inv\xE1lida em ${issue2.origin}`; + return `Chave inv\xE1lida em ${issue3.origin}`; case "invalid_union": return "Entrada inv\xE1lida"; case "invalid_element": - return `Valor inv\xE1lido em ${issue2.origin}`; + return `Valor inv\xE1lido em ${issue3.origin}`; default: return `Campo inv\xE1lido`; } @@ -40037,7 +35931,7 @@ function ru_default() { var error29; var init_ru = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ru.js"() { - init_util2(); + init_util(); error29 = () => { const Sizable = { string: { @@ -40076,7 +35970,7 @@ var init_ru = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -40126,36 +36020,36 @@ var init_ru = __esm({ jwt: "JWT", template_literal: "\u0432\u0432\u043E\u0434" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${parsedType4(issue2.input)}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${issue3.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue2.values[0])}`; - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue3.values[0])}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - const maxValue = Number(issue2.maximum); + const maxValue = Number(issue3.maximum); const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.maximum.toString()} ${unit}`; + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue3.maximum.toString()} ${unit}`; } - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.maximum.toString()}`; + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - const minValue = Number(issue2.minimum); + const minValue = Number(issue3.minimum); const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.minimum.toString()} ${unit}`; + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue3.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue3.minimum.toString()} ${unit}`; } - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.minimum.toString()}`; + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue3.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -40164,18 +36058,18 @@ var init_ru = __esm({ return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; if (_issue.format === "regex") return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${Nouns[_issue.format] ?? issue2.format}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue3.divisor}`; case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue2.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue3.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue3.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue3.origin}`; case "invalid_union": return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; case "invalid_element": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue2.origin}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue3.origin}`; default: return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; } @@ -40193,7 +36087,7 @@ function sl_default() { var error30; var init_sl = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/sl.js"() { - init_util2(); + init_util(); error30 = () => { const Sizable = { string: { unit: "znakov", verb: "imeti" }, @@ -40204,7 +36098,7 @@ var init_sl = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -40254,31 +36148,31 @@ var init_sl = __esm({ jwt: "JWT", template_literal: "vnos" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Neveljaven vnos: pri\u010Dakovano ${issue2.expected}, prejeto ${parsedType4(issue2.input)}`; + return `Neveljaven vnos: pri\u010Dakovano ${issue3.expected}, prejeto ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue2.values[0])}`; - return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue3.values[0])}`; + return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} imelo ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementov"}`; - return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} ${adj}${issue2.maximum.toString()}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue3.origin ?? "vrednost"} imelo ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementov"}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue3.origin ?? "vrednost"} ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Premajhno: pri\u010Dakovano, da bo ${issue3.origin} imelo ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + return `Premajhno: pri\u010Dakovano, da bo ${issue3.origin} ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; } @@ -40288,18 +36182,18 @@ var init_sl = __esm({ return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; if (_issue.format === "regex") return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; - return `Neveljaven ${Nouns[_issue.format] ?? issue2.format}`; + return `Neveljaven ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue2.divisor}`; + return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue3.divisor}`; case "unrecognized_keys": - return `Neprepoznan${issue2.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`; + return `Neprepoznan${issue3.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Neveljaven klju\u010D v ${issue2.origin}`; + return `Neveljaven klju\u010D v ${issue3.origin}`; case "invalid_union": return "Neveljaven vnos"; case "invalid_element": - return `Neveljavna vrednost v ${issue2.origin}`; + return `Neveljavna vrednost v ${issue3.origin}`; default: return "Neveljaven vnos"; } @@ -40317,7 +36211,7 @@ function sv_default() { var error31; var init_sv = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/sv.js"() { - init_util2(); + init_util(); error31 = () => { const Sizable = { string: { unit: "tecken", verb: "att ha" }, @@ -40328,7 +36222,7 @@ var init_sv = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -40378,32 +36272,32 @@ var init_sv = __esm({ jwt: "JWT", template_literal: "mall-literal" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${issue2.expected}, fick ${parsedType4(issue2.input)}`; + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${issue3.expected}, fick ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue2.values[0])}`; - return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue3.values[0])}`; + return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue3.origin ?? "v\xE4rdet"} att ha ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "element"}`; } - return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()}`; + return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue3.origin ?? "v\xE4rdet"} att ha ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue3.origin ?? "v\xE4rdet"} att ha ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()}`; + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue3.origin ?? "v\xE4rdet"} att ha ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; } @@ -40413,18 +36307,18 @@ var init_sv = __esm({ return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; if (_issue.format === "regex") return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; - return `Ogiltig(t) ${Nouns[_issue.format] ?? issue2.format}`; + return `Ogiltig(t) ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue2.divisor}`; + return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue3.divisor}`; case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue2.keys, ", ")}`; + return `${issue3.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Ogiltig nyckel i ${issue2.origin ?? "v\xE4rdet"}`; + return `Ogiltig nyckel i ${issue3.origin ?? "v\xE4rdet"}`; case "invalid_union": return "Ogiltig input"; case "invalid_element": - return `Ogiltigt v\xE4rde i ${issue2.origin ?? "v\xE4rdet"}`; + return `Ogiltigt v\xE4rde i ${issue3.origin ?? "v\xE4rdet"}`; default: return `Ogiltig input`; } @@ -40442,7 +36336,7 @@ function ta_default() { var error32; var init_ta = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ta.js"() { - init_util2(); + init_util(); error32 = () => { const Sizable = { string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, @@ -40453,7 +36347,7 @@ var init_ta = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -40503,32 +36397,32 @@ var init_ta = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${parsedType4(issue2.input)}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue3.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue2.values[0])}`; - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue2.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; + if (issue3.values.length === 1) + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue3.values[0])}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue3.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue3.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; } - return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue3.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue3.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; } - return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue3.origin} ${adj}${issue3.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; if (_issue.format === "ends_with") @@ -40537,18 +36431,18 @@ var init_ta = __esm({ return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; if (_issue.format === "regex") return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${Nouns[_issue.format] ?? issue2.format}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue2.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue3.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; case "unrecognized_keys": - return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue2.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue3.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; + return `${issue3.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; case "invalid_union": return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; case "invalid_element": - return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; + return `${issue3.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; default: return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; } @@ -40566,7 +36460,7 @@ function th_default() { var error33; var init_th = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/th.js"() { - init_util2(); + init_util(); error33 = () => { const Sizable = { string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, @@ -40577,7 +36471,7 @@ var init_th = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -40627,31 +36521,31 @@ var init_th = __esm({ jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${parsedType4(issue2.input)}`; + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${issue3.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue2.values[0])}`; - return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue3.values[0])}`; + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; - return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue3.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue3.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue3.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue3.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()}`; + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue3.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; } @@ -40661,18 +36555,18 @@ var init_th = __esm({ return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; if (_issue.format === "regex") return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${Nouns[_issue.format] ?? issue2.format}`; + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue2.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue3.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; case "unrecognized_keys": - return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue2.keys, ", ")}`; + return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue3.origin}`; case "invalid_union": return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; case "invalid_element": - return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue3.origin}`; default: return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; } @@ -40690,7 +36584,7 @@ function tr_default() { var parsedType3, error34; var init_tr = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/tr.js"() { - init_util2(); + init_util(); parsedType3 = (data) => { const t = typeof data; switch (t) { @@ -40751,30 +36645,30 @@ var init_tr = __esm({ jwt: "JWT", template_literal: "\u015Eablon dizesi" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Ge\xE7ersiz de\u011Fer: beklenen ${issue2.expected}, al\u0131nan ${parsedType3(issue2.input)}`; + return `Ge\xE7ersiz de\u011Fer: beklenen ${issue3.expected}, al\u0131nan ${parsedType3(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue2.values[0])}`; - return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue3.values[0])}`; + return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; - return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue3.origin ?? "de\u011Fer"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue3.origin ?? "de\u011Fer"} ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue3.origin} ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; if (_issue.format === "ends_with") @@ -40783,18 +36677,18 @@ var init_tr = __esm({ return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; if (_issue.format === "regex") return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; - return `Ge\xE7ersiz ${Nouns[_issue.format] ?? issue2.format}`; + return `Ge\xE7ersiz ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Ge\xE7ersiz say\u0131: ${issue2.divisor} ile tam b\xF6l\xFCnebilmeli`; + return `Ge\xE7ersiz say\u0131: ${issue3.divisor} ile tam b\xF6l\xFCnebilmeli`; case "unrecognized_keys": - return `Tan\u0131nmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Tan\u0131nmayan anahtar${issue3.keys.length > 1 ? "lar" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `${issue2.origin} i\xE7inde ge\xE7ersiz anahtar`; + return `${issue3.origin} i\xE7inde ge\xE7ersiz anahtar`; case "invalid_union": return "Ge\xE7ersiz de\u011Fer"; case "invalid_element": - return `${issue2.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + return `${issue3.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; default: return `Ge\xE7ersiz de\u011Fer`; } @@ -40812,7 +36706,7 @@ function ua_default() { var error35; var init_ua = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ua.js"() { - init_util2(); + init_util(); error35 = () => { const Sizable = { string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, @@ -40823,7 +36717,7 @@ var init_ua = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -40873,32 +36767,32 @@ var init_ua = __esm({ jwt: "JWT", template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${issue2.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${parsedType4(issue2.input)}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${issue3.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${parsedType5(issue3.input)}`; // return `Неправильні вхідні дані: очікується ${issue.expected}, отримано ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue3.values[0])}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue3.origin} ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} \u0431\u0443\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue3.origin} \u0431\u0443\u0434\u0435 ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -40907,18 +36801,18 @@ var init_ua = __esm({ return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; if (_issue.format === "regex") return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${Nouns[_issue.format] ?? issue2.format}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue2.divisor}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue3.divisor}`; case "unrecognized_keys": - return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue3.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue3.origin}`; case "invalid_union": return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; case "invalid_element": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue2.origin}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue3.origin}`; default: return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; } @@ -40936,7 +36830,7 @@ function ur_default() { var error36; var init_ur = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ur.js"() { - init_util2(); + init_util(); error36 = () => { const Sizable = { string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, @@ -40947,7 +36841,7 @@ var init_ur = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -40997,31 +36891,31 @@ var init_ur = __esm({ jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", template_literal: "\u0627\u0646 \u067E\u0679" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${issue2.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${parsedType4(issue2.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${issue3.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${parsedType5(issue3.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; case "invalid_value": - if (issue2.values.length === 1) - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue2.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; - return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue2.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + if (issue3.values.length === 1) + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue3.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue3.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; - return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue2.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue3.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue3.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue3.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u06D2 ${adj}${issue2.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue3.origin} \u06A9\u06D2 ${adj}${issue3.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; } - return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u0627 ${adj}${issue2.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue3.origin} \u06A9\u0627 ${adj}${issue3.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; } @@ -41031,18 +36925,18 @@ var init_ur = __esm({ return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; if (_issue.format === "regex") return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - return `\u063A\u0644\u0637 ${Nouns[_issue.format] ?? issue2.format}`; + return `\u063A\u0644\u0637 ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue2.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue3.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; case "unrecognized_keys": - return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue2.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue3.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue3.keys, "\u060C ")}`; case "invalid_key": - return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; + return `${issue3.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; case "invalid_union": return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; case "invalid_element": - return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; + return `${issue3.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; default: return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; } @@ -41060,7 +36954,7 @@ function vi_default() { var error37; var init_vi = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/vi.js"() { - init_util2(); + init_util(); error37 = () => { const Sizable = { string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, @@ -41071,7 +36965,7 @@ var init_vi = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -41121,31 +37015,31 @@ var init_vi = __esm({ jwt: "JWT", template_literal: "\u0111\u1EA7u v\xE0o" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${issue2.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${parsedType4(issue2.input)}`; + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${issue3.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue2.values[0])}`; - return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue3.values[0])}`; + return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; - return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue2.maximum.toString()}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue3.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue3.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue3.origin} ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue3.origin} ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -41154,18 +37048,18 @@ var init_vi = __esm({ return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; if (_issue.format === "regex") return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} kh\xF4ng h\u1EE3p l\u1EC7`; + return `${Nouns[_issue.format] ?? issue3.format} kh\xF4ng h\u1EE3p l\u1EC7`; } case "not_multiple_of": - return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue2.divisor}`; + return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue3.divisor}`; case "unrecognized_keys": - return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue2.keys, ", ")}`; + return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue3.origin}`; case "invalid_union": return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; case "invalid_element": - return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue3.origin}`; default: return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; } @@ -41183,7 +37077,7 @@ function zh_CN_default() { var error38; var init_zh_CN = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/zh-CN.js"() { - init_util2(); + init_util(); error38 = () => { const Sizable = { string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, @@ -41194,7 +37088,7 @@ var init_zh_CN = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -41244,31 +37138,31 @@ var init_zh_CN = __esm({ jwt: "JWT", template_literal: "\u8F93\u5165" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${issue2.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${parsedType4(issue2.input)}`; + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${issue3.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue2.values[0])}`; - return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue3.values[0])}`; + return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; - return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue3.origin ?? "\u503C"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue3.origin ?? "\u503C"} ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue3.origin} ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; if (_issue.format === "ends_with") @@ -41277,18 +37171,18 @@ var init_zh_CN = __esm({ return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; if (_issue.format === "regex") return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; - return `\u65E0\u6548${Nouns[_issue.format] ?? issue2.format}`; + return `\u65E0\u6548${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue2.divisor} \u7684\u500D\u6570`; + return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue3.divisor} \u7684\u500D\u6570`; case "unrecognized_keys": - return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue2.keys, ", ")}`; + return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `${issue2.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; + return `${issue3.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; case "invalid_union": return "\u65E0\u6548\u8F93\u5165"; case "invalid_element": - return `${issue2.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; + return `${issue3.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; default: return `\u65E0\u6548\u8F93\u5165`; } @@ -41306,7 +37200,7 @@ function zh_TW_default() { var error39; var init_zh_TW = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/zh-TW.js"() { - init_util2(); + init_util(); error39 = () => { const Sizable = { string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, @@ -41317,7 +37211,7 @@ var init_zh_TW = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -41367,31 +37261,31 @@ var init_zh_TW = __esm({ jwt: "JWT", template_literal: "\u8F38\u5165" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${issue2.expected}\uFF0C\u4F46\u6536\u5230 ${parsedType4(issue2.input)}`; + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${issue3.expected}\uFF0C\u4F46\u6536\u5230 ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue2.values[0])}`; - return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue3.values[0])}`; + return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; - return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue3.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue3.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue3.origin} \u61C9\u70BA ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()}`; + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue3.origin} \u61C9\u70BA ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; } @@ -41401,18 +37295,18 @@ var init_zh_TW = __esm({ return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; if (_issue.format === "regex") return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; - return `\u7121\u6548\u7684 ${Nouns[_issue.format] ?? issue2.format}`; + return `\u7121\u6548\u7684 ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue2.divisor} \u7684\u500D\u6578`; + return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue3.divisor} \u7684\u500D\u6578`; case "unrecognized_keys": - return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue2.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue2.keys, "\u3001")}`; + return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue3.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue3.keys, "\u3001")}`; case "invalid_key": - return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; + return `${issue3.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; case "invalid_union": return "\u7121\u6548\u7684\u8F38\u5165\u503C"; case "invalid_element": - return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; + return `${issue3.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; default: return `\u7121\u6548\u7684\u8F38\u5165\u503C`; } @@ -41472,7 +37366,7 @@ var init_locales = __esm({ init_ca(); init_cs(); init_de(); - init_en2(); + init_en(); init_eo(); init_es(); init_fa(); @@ -42418,7 +38312,7 @@ var init_api = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js"() { init_checks(); init_schemas(); - init_util2(); + init_util(); TimePrecision = { Any: null, Minute: -1, @@ -42645,7 +38539,7 @@ var JSONSchemaGenerator; var init_to_json_schema = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js"() { init_registries(); - init_util2(); + init_util(); JSONSchemaGenerator = class { constructor(params) { this.counter = 0; @@ -43536,11 +39430,11 @@ var init_core2 = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/index.js"() { init_core(); init_parse(); - init_errors2(); + init_errors(); init_schemas(); init_checks(); init_versions(); - init_util2(); + init_util(); init_regexes(); init_locales(); init_registries(); @@ -43552,10 +39446,10 @@ var init_core2 = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/Options.js var ignoreOverride, jsonDescription, defaultOptions, getDefaultOptions; var init_Options = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/Options.js"() { ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use"); jsonDescription = (jsonSchema2, def) => { if (def.description) { @@ -43603,10 +39497,10 @@ var init_Options = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/Refs.js var getRefs; var init_Refs = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/Refs.js"() { init_Options(); getRefs = (options) => { const _options = getDefaultOptions(options); @@ -43630,7 +39524,7 @@ var init_Refs = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/errorMessages.js function addErrorMessage(res, key, errorMessage, refs) { if (!refs?.errorMessages) return; @@ -43646,14 +39540,14 @@ function setResponseValueAndErrors(res, key, value2, errorMessage, refs) { addErrorMessage(res, key, errorMessage, refs); } var init_errorMessages = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js var getRelativePath; var init_getRelativePath = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js"() { getRelativePath = (pathA, pathB) => { let i = 0; for (; i < pathA.length && i < pathB.length; i++) { @@ -43665,7 +39559,930 @@ var init_getRelativePath = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.js +// @__NO_SIDE_EFFECTS__ +function $constructor2(name, initializer4, params) { + function init(inst, def) { + var _a; + Object.defineProperty(inst, "_zod", { + value: inst._zod ?? {}, + enumerable: false + }); + (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set()); + inst._zod.traits.add(name); + initializer4(inst, def); + for (const k in _.prototype) { + if (!(k in inst)) + Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) }); + } + inst._zod.constr = _; + inst._zod.def = def; + } + const Parent = params?.Parent ?? Object; + class Definition extends Parent { + } + Object.defineProperty(Definition, "name", { value: name }); + function _(def) { + var _a; + const inst = params?.Parent ? new Definition() : this; + init(inst, def); + (_a = inst._zod).deferred ?? (_a.deferred = []); + for (const fn2 of inst._zod.deferred) { + fn2(); + } + return inst; + } + Object.defineProperty(_, "init", { value: init }); + Object.defineProperty(_, Symbol.hasInstance, { + value: (inst) => { + if (params?.Parent && inst instanceof params.Parent) + return true; + return inst?._zod?.traits?.has(name); + } + }); + Object.defineProperty(_, "name", { value: name }); + return _; +} +function config2(newConfig) { + if (newConfig) + Object.assign(globalConfig2, newConfig); + return globalConfig2; +} +var NEVER4, $brand2, globalConfig2; +var init_core3 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.js"() { + NEVER4 = Object.freeze({ + status: "aborted" + }); + $brand2 = Symbol("zod_brand"); + globalConfig2 = {}; + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.js +function joinValues2(array, separator2 = "|") { + return array.map((val) => stringifyPrimitive2(val)).join(separator2); +} +function jsonStringifyReplacer2(_, value2) { + if (typeof value2 === "bigint") + return value2.toString(); + return value2; +} +function cached2(getter) { + const set = false; + return { + get value() { + if (!set) { + const value2 = getter(); + Object.defineProperty(this, "value", { value: value2 }); + return value2; + } + throw new Error("cached value already set"); + } + }; +} +function stringifyPrimitive2(value2) { + if (typeof value2 === "bigint") + return value2.toString() + "n"; + if (typeof value2 === "string") + return `"${value2}"`; + return `${value2}`; +} +var EVALUATING, captureStackTrace2, allowsEval2, NUMBER_FORMAT_RANGES2; +var init_util2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.js"() { + EVALUATING = Symbol("evaluating"); + captureStackTrace2 = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { + }; + allowsEval2 = cached2(() => { + if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { + return false; + } + try { + const F = Function; + new F(""); + return true; + } catch (_) { + return false; + } + }); + NUMBER_FORMAT_RANGES2 = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE] + }; + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.js +function flattenError3(error42, mapper = (issue3) => issue3.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error42.issues) { + if (sub.path.length > 0) { + fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; + fieldErrors[sub.path[0]].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; +} +function formatError2(error42, mapper = (issue3) => issue3.message) { + const fieldErrors = { _errors: [] }; + const processError = (error43) => { + for (const issue3 of error43.issues) { + if (issue3.code === "invalid_union" && issue3.errors.length) { + issue3.errors.map((issues) => processError({ issues })); + } else if (issue3.code === "invalid_key") { + processError({ issues: issue3.issues }); + } else if (issue3.code === "invalid_element") { + processError({ issues: issue3.issues }); + } else if (issue3.path.length === 0) { + fieldErrors._errors.push(mapper(issue3)); + } else { + let curr = fieldErrors; + let i = 0; + while (i < issue3.path.length) { + const el = issue3.path[i]; + const terminal = i === issue3.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue3)); + } + curr = curr[el]; + i++; + } + } + } + }; + processError(error42); + return fieldErrors; +} +var initializer2, $ZodError2, $ZodRealError2; +var init_errors2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.js"() { + init_core3(); + init_util2(); + initializer2 = (inst, def) => { + inst.name = "$ZodError"; + Object.defineProperty(inst, "_zod", { + value: inst._zod, + enumerable: false + }); + Object.defineProperty(inst, "issues", { + value: def, + enumerable: false + }); + inst.message = JSON.stringify(def, jsonStringifyReplacer2, 2); + Object.defineProperty(inst, "toString", { + value: () => inst.message, + enumerable: false + }); + }; + $ZodError2 = $constructor2("$ZodError", initializer2); + $ZodRealError2 = $constructor2("$ZodError", initializer2, { Parent: Error }); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/parse.js +var init_parse2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/parse.js"() { + init_core3(); + init_errors2(); + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/regexes.js +var dateSource2, date2; +var init_regexes2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/regexes.js"() { + dateSource2 = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; + date2 = /* @__PURE__ */ new RegExp(`^${dateSource2}$`); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.js +var init_checks2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.js"() { + init_core3(); + init_regexes2(); + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/doc.js +var init_doc2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/doc.js"() { + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.js +var init_versions2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.js"() { + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.js +var init_schemas2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.js"() { + init_checks2(); + init_core3(); + init_doc2(); + init_parse2(); + init_regexes2(); + init_util2(); + init_versions2(); + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ar.js +var init_ar2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ar.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/az.js +var init_az2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/az.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/be.js +var init_be2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/be.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/bg.js +var init_bg = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/bg.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ca.js +var init_ca2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ca.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/cs.js +var init_cs2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/cs.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/da.js +var init_da = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/da.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/de.js +var init_de2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/de.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/en.js +function en_default4() { + return { + localeError: error40() + }; +} +var parsedType4, error40; +var init_en2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/en.js"() { + init_util2(); + parsedType4 = (data) => { + const t = typeof data; + switch (t) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t; + }; + error40 = () => { + const Sizable = { + string: { unit: "characters", verb: "to have" }, + file: { unit: "bytes", verb: "to have" }, + array: { unit: "items", verb: "to have" }, + set: { unit: "items", verb: "to have" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + return (issue3) => { + switch (issue3.code) { + case "invalid_type": + return `Invalid input: expected ${issue3.expected}, received ${parsedType4(issue3.input)}`; + case "invalid_value": + if (issue3.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive2(issue3.values[0])}`; + return `Invalid option: expected one of ${joinValues2(issue3.values, "|")}`; + case "too_big": { + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); + if (sizing) + return `Too big: expected ${issue3.origin ?? "value"} to have ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue3.origin ?? "value"} to be ${adj}${issue3.maximum.toString()}`; + } + case "too_small": { + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); + if (sizing) { + return `Too small: expected ${issue3.origin} to have ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + } + return `Too small: expected ${issue3.origin} to be ${adj}${issue3.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue3; + if (_issue.format === "starts_with") { + return `Invalid string: must start with "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Invalid string: must end with "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Invalid string: must include "${_issue.includes}"`; + if (_issue.format === "regex") + return `Invalid string: must match pattern ${_issue.pattern}`; + return `Invalid ${Nouns[_issue.format] ?? issue3.format}`; + } + case "not_multiple_of": + return `Invalid number: must be a multiple of ${issue3.divisor}`; + case "unrecognized_keys": + return `Unrecognized key${issue3.keys.length > 1 ? "s" : ""}: ${joinValues2(issue3.keys, ", ")}`; + case "invalid_key": + return `Invalid key in ${issue3.origin}`; + case "invalid_union": + return "Invalid input"; + case "invalid_element": + return `Invalid value in ${issue3.origin}`; + default: + return `Invalid input`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/eo.js +var init_eo2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/eo.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/es.js +var init_es2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/es.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fa.js +var init_fa2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fa.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fi.js +var init_fi2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fi.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fr.js +var init_fr2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fr.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fr-CA.js +var init_fr_CA2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fr-CA.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/he.js +var init_he2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/he.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/hu.js +var init_hu2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/hu.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/id.js +var init_id2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/id.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/is.js +var init_is = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/is.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/it.js +var init_it2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/it.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ja.js +var init_ja2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ja.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ka.js +var init_ka = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ka.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/km.js +var init_km = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/km.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/kh.js +var init_kh2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/kh.js"() { + init_km(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ko.js +var init_ko2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ko.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/lt.js +var init_lt = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/lt.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/mk.js +var init_mk2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/mk.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ms.js +var init_ms2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ms.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/nl.js +var init_nl2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/nl.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/no.js +var init_no2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/no.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ota.js +var init_ota2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ota.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ps.js +var init_ps2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ps.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/pl.js +var init_pl2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/pl.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/pt.js +var init_pt2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/pt.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ru.js +var init_ru2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ru.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/sl.js +var init_sl2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/sl.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/sv.js +var init_sv2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/sv.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ta.js +var init_ta2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ta.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/th.js +var init_th2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/th.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/tr.js +var init_tr2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/tr.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/uk.js +var init_uk = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/uk.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ua.js +var init_ua2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ua.js"() { + init_uk(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ur.js +var init_ur2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ur.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/vi.js +var init_vi2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/vi.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/zh-CN.js +var init_zh_CN2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/zh-CN.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/zh-TW.js +var init_zh_TW2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/zh-TW.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/yo.js +var init_yo = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/yo.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/index.js +var init_locales2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/index.js"() { + init_ar2(); + init_az2(); + init_be2(); + init_bg(); + init_ca2(); + init_cs2(); + init_da(); + init_de2(); + init_en2(); + init_eo2(); + init_es2(); + init_fa2(); + init_fi2(); + init_fr2(); + init_fr_CA2(); + init_he2(); + init_hu2(); + init_id2(); + init_is(); + init_it2(); + init_ja2(); + init_ka(); + init_kh2(); + init_km(); + init_ko2(); + init_lt(); + init_mk2(); + init_ms2(); + init_nl2(); + init_no2(); + init_ota2(); + init_ps2(); + init_pl2(); + init_pt2(); + init_ru2(); + init_sl2(); + init_sv2(); + init_ta2(); + init_th2(); + init_tr2(); + init_ua2(); + init_uk(); + init_ur2(); + init_vi2(); + init_zh_CN2(); + init_zh_TW2(); + init_yo(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.js +var $output2, $input2; +var init_registries2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.js"() { + $output2 = Symbol("ZodOutput"); + $input2 = Symbol("ZodInput"); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.js +var init_api2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.js"() { + init_checks2(); + init_schemas2(); + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/to-json-schema.js +var init_to_json_schema2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/to-json-schema.js"() { + init_registries2(); + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/json-schema.js +var init_json_schema2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/json-schema.js"() { + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/index.js +var init_core4 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/index.js"() { + init_core3(); + init_parse2(); + init_errors2(); + init_schemas2(); + init_checks2(); + init_versions2(); + init_util2(); + init_regexes2(); + init_locales2(); + init_registries2(); + init_doc2(); + init_api2(); + init_to_json_schema2(); + init_json_schema2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/checks.js +var init_checks3 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/checks.js"() { + init_core4(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/iso.js +var init_iso = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/iso.js"() { + init_core4(); + init_schemas3(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.js +var initializer3, ZodError4, ZodRealError; +var init_errors3 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.js"() { + init_core4(); + init_core4(); + init_util2(); + initializer3 = (inst, issues) => { + $ZodError2.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { + value: (mapper) => formatError2(inst, mapper) + // enumerable: false, + }, + flatten: { + value: (mapper) => flattenError3(inst, mapper) + // enumerable: false, + }, + addIssue: { + value: (issue3) => { + inst.issues.push(issue3); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer2, 2); + } + // enumerable: false, + }, + addIssues: { + value: (issues2) => { + inst.issues.push(...issues2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer2, 2); + } + // enumerable: false, + }, + isEmpty: { + get() { + return inst.issues.length === 0; + } + // enumerable: false, + } + }); + }; + ZodError4 = $constructor2("ZodError", initializer3); + ZodRealError = $constructor2("ZodError", initializer3, { + Parent: Error + }); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.js +var init_parse3 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.js"() { + init_core4(); + init_errors3(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.js +var init_schemas3 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.js"() { + init_core4(); + init_core4(); + init_checks3(); + init_iso(); + init_parse3(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/compat.js +var ZodFirstPartyTypeKind3; +var init_compat = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/compat.js"() { + init_core4(); + init_core4(); + /* @__PURE__ */ (function(ZodFirstPartyTypeKind4) { + })(ZodFirstPartyTypeKind3 || (ZodFirstPartyTypeKind3 = {})); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/coerce.js +var init_coerce = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/coerce.js"() { + init_core4(); + init_schemas3(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/external.js +var init_external = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/external.js"() { + init_core4(); + init_schemas3(); + init_checks3(); + init_errors3(); + init_parse3(); + init_compat(); + init_core4(); + init_en2(); + init_core4(); + init_locales2(); + init_iso(); + init_iso(); + init_coerce(); + config2(en_default4()); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/index.js +var init_zod = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/index.js"() { + init_external(); + init_external(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/any.js function parseAnyDef(refs) { if (refs.target !== "openAi") { return {}; @@ -43681,17 +40498,17 @@ function parseAnyDef(refs) { }; } var init_any = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/any.js"() { init_getRelativePath(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/array.js function parseArrayDef(def, refs) { const res = { type: "array" }; - if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) { + if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind3.ZodAny) { res.items = parseDef(def.type._def, { ...refs, currentPath: [...refs.currentPath, "items"] @@ -43710,14 +40527,14 @@ function parseArrayDef(def, refs) { return res; } var init_array = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/array.js"() { init_zod(); init_errorMessages(); init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js function parseBigintDef(def, refs) { const res = { type: "integer", @@ -43763,36 +40580,36 @@ function parseBigintDef(def, refs) { return res; } var init_bigint = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js"() { init_errorMessages(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js function parseBooleanDef() { return { type: "boolean" }; } var init_boolean = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js function parseBrandedDef(_def, refs) { return parseDef(_def.type._def, refs); } var init_branded = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js var parseCatchDef; var init_catch = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js"() { init_parseDef(); parseCatchDef = (def, refs) => { return parseDef(def.innerType._def, refs); @@ -43800,7 +40617,7 @@ var init_catch = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/date.js function parseDateDef(def, refs, overrideDateStrategy) { const strategy = overrideDateStrategy ?? refs.dateStrategy; if (Array.isArray(strategy)) { @@ -43826,7 +40643,7 @@ function parseDateDef(def, refs, overrideDateStrategy) { } var integerDateParser; var init_date = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/date.js"() { init_errorMessages(); integerDateParser = (def, refs) => { const res = { @@ -43865,7 +40682,7 @@ var init_date = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/default.js function parseDefaultDef(_def, refs) { return { ...parseDef(_def.innerType._def, refs), @@ -43873,23 +40690,23 @@ function parseDefaultDef(_def, refs) { }; } var init_default = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/default.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js function parseEffectsDef(_def, refs) { return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs); } var init_effects = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js"() { init_parseDef(); init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js function parseEnumDef(def) { return { type: "string", @@ -43897,11 +40714,11 @@ function parseEnumDef(def) { }; } var init_enum = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js function parseIntersectionDef(def, refs) { const allOf = [ parseDef(def.left._def, { @@ -43939,7 +40756,7 @@ function parseIntersectionDef(def, refs) { } var isJsonSchema7AllOfType; var init_intersection = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js"() { init_parseDef(); isJsonSchema7AllOfType = (type2) => { if ("type" in type2 && type2.type === "string") @@ -43949,31 +40766,31 @@ var init_intersection = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js function parseLiteralDef(def, refs) { - const parsedType4 = typeof def.value; - if (parsedType4 !== "bigint" && parsedType4 !== "number" && parsedType4 !== "boolean" && parsedType4 !== "string") { + const parsedType5 = typeof def.value; + if (parsedType5 !== "bigint" && parsedType5 !== "number" && parsedType5 !== "boolean" && parsedType5 !== "string") { return { type: Array.isArray(def.value) ? "array" : "object" }; } if (refs.target === "openApi3") { return { - type: parsedType4 === "bigint" ? "integer" : parsedType4, + type: parsedType5 === "bigint" ? "integer" : parsedType5, enum: [def.value] }; } return { - type: parsedType4 === "bigint" ? "integer" : parsedType4, + type: parsedType5 === "bigint" ? "integer" : parsedType5, const: def.value }; } var init_literal = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/string.js function parseStringDef(def, refs) { const res = { type: "string" @@ -44250,7 +41067,7 @@ function stringifyRegExpWithFlags(regex3, refs) { } var emojiRegex3, zodPatterns, ALPHA_NUMERIC; var init_string = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/string.js"() { init_errorMessages(); emojiRegex3 = void 0; zodPatterns = { @@ -44304,12 +41121,12 @@ var init_string = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/record.js function parseRecordDef(def, refs) { if (refs.target === "openAi") { console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."); } - if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) { + if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind3.ZodEnum) { return { type: "object", required: def.keyType._def.values, @@ -44333,20 +41150,20 @@ function parseRecordDef(def, refs) { if (refs.target === "openApi3") { return schema2; } - if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) { + if (def.keyType?._def.typeName === ZodFirstPartyTypeKind3.ZodString && def.keyType._def.checks?.length) { const { type: type2, ...keyType } = parseStringDef(def.keyType._def, refs); return { ...schema2, propertyNames: keyType }; - } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) { + } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind3.ZodEnum) { return { ...schema2, propertyNames: { enum: def.keyType._def.values } }; - } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.type._def.checks?.length) { + } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind3.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind3.ZodString && def.keyType._def.type._def.checks?.length) { const { type: type2, ...keyType } = parseBrandedDef(def.keyType._def, refs); return { ...schema2, @@ -44356,7 +41173,7 @@ function parseRecordDef(def, refs) { return schema2; } var init_record = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/record.js"() { init_zod(); init_parseDef(); init_string(); @@ -44365,7 +41182,7 @@ var init_record = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/map.js function parseMapDef(def, refs) { if (refs.mapStrategy === "record") { return parseRecordDef(def, refs); @@ -44390,14 +41207,14 @@ function parseMapDef(def, refs) { }; } var init_map = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/map.js"() { init_parseDef(); init_record(); init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js function parseNativeEnumDef(def) { const object2 = def.values; const actualKeys = Object.keys(def.values).filter((key) => { @@ -44411,11 +41228,11 @@ function parseNativeEnumDef(def) { }; } var init_nativeEnum = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/never.js function parseNeverDef(refs) { return refs.target === "openAi" ? void 0 : { not: parseAnyDef({ @@ -44425,12 +41242,12 @@ function parseNeverDef(refs) { }; } var init_never = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/never.js"() { init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/null.js function parseNullDef(refs) { return refs.target === "openApi3" ? { enum: ["null"], @@ -44440,11 +41257,11 @@ function parseNullDef(refs) { }; } var init_null = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/null.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/union.js function parseUnionDef(def, refs) { if (refs.target === "openApi3") return asAnyOf(def, refs); @@ -44499,7 +41316,7 @@ function parseUnionDef(def, refs) { } var primitiveMappings, asAnyOf; var init_union = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/union.js"() { init_parseDef(); primitiveMappings = { ZodString: "string", @@ -44518,7 +41335,7 @@ var init_union = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js function parseNullableDef(def, refs) { if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) { if (refs.target === "openApi3") { @@ -44550,13 +41367,13 @@ function parseNullableDef(def, refs) { return base && { anyOf: [base, { type: "null" }] }; } var init_nullable = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js"() { init_parseDef(); init_union(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/number.js function parseNumberDef(def, refs) { const res = { type: "number" @@ -44605,12 +41422,12 @@ function parseNumberDef(def, refs) { return res; } var init_number = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/number.js"() { init_errorMessages(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/object.js function parseObjectDef(def, refs) { const forceOptionalIntoNullable = refs.target === "openAi"; const result = { @@ -44680,15 +41497,15 @@ function safeIsOptional(schema2) { } } var init_object = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/object.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js var parseOptionalDef; var init_optional = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js"() { init_parseDef(); init_any(); parseOptionalDef = (def, refs) => { @@ -44711,10 +41528,10 @@ var init_optional = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js var parsePipelineDef; var init_pipeline = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js"() { init_parseDef(); parsePipelineDef = (def, refs) => { if (refs.pipeStrategy === "input") { @@ -44737,17 +41554,17 @@ var init_pipeline = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js function parsePromiseDef(def, refs) { return parseDef(def.type._def, refs); } var init_promise = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/set.js function parseSetDef(def, refs) { const items = parseDef(def.valueType._def, { ...refs, @@ -44767,13 +41584,13 @@ function parseSetDef(def, refs) { return schema2; } var init_set = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/set.js"() { init_errorMessages(); init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js function parseTupleDef(def, refs) { if (def.rest) { return { @@ -44801,37 +41618,37 @@ function parseTupleDef(def, refs) { } } var init_tuple = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js function parseUndefinedDef(refs) { return { not: parseAnyDef(refs) }; } var init_undefined = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js"() { init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js function parseUnknownDef(refs) { return parseAnyDef(refs); } var init_unknown = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js"() { init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js var parseReadonlyDef; var init_readonly = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js"() { init_parseDef(); parseReadonlyDef = (def, refs) => { return parseDef(def.innerType._def, refs); @@ -44839,10 +41656,10 @@ var init_readonly = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/selectParser.js var selectParser; var init_selectParser = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/selectParser.js"() { init_zod(); init_any(); init_array(); @@ -44876,73 +41693,73 @@ var init_selectParser = __esm({ init_readonly(); selectParser = (def, typeName, refs) => { switch (typeName) { - case ZodFirstPartyTypeKind.ZodString: + case ZodFirstPartyTypeKind3.ZodString: return parseStringDef(def, refs); - case ZodFirstPartyTypeKind.ZodNumber: + case ZodFirstPartyTypeKind3.ZodNumber: return parseNumberDef(def, refs); - case ZodFirstPartyTypeKind.ZodObject: + case ZodFirstPartyTypeKind3.ZodObject: return parseObjectDef(def, refs); - case ZodFirstPartyTypeKind.ZodBigInt: + case ZodFirstPartyTypeKind3.ZodBigInt: return parseBigintDef(def, refs); - case ZodFirstPartyTypeKind.ZodBoolean: + case ZodFirstPartyTypeKind3.ZodBoolean: return parseBooleanDef(); - case ZodFirstPartyTypeKind.ZodDate: + case ZodFirstPartyTypeKind3.ZodDate: return parseDateDef(def, refs); - case ZodFirstPartyTypeKind.ZodUndefined: + case ZodFirstPartyTypeKind3.ZodUndefined: return parseUndefinedDef(refs); - case ZodFirstPartyTypeKind.ZodNull: + case ZodFirstPartyTypeKind3.ZodNull: return parseNullDef(refs); - case ZodFirstPartyTypeKind.ZodArray: + case ZodFirstPartyTypeKind3.ZodArray: return parseArrayDef(def, refs); - case ZodFirstPartyTypeKind.ZodUnion: - case ZodFirstPartyTypeKind.ZodDiscriminatedUnion: + case ZodFirstPartyTypeKind3.ZodUnion: + case ZodFirstPartyTypeKind3.ZodDiscriminatedUnion: return parseUnionDef(def, refs); - case ZodFirstPartyTypeKind.ZodIntersection: + case ZodFirstPartyTypeKind3.ZodIntersection: return parseIntersectionDef(def, refs); - case ZodFirstPartyTypeKind.ZodTuple: + case ZodFirstPartyTypeKind3.ZodTuple: return parseTupleDef(def, refs); - case ZodFirstPartyTypeKind.ZodRecord: + case ZodFirstPartyTypeKind3.ZodRecord: return parseRecordDef(def, refs); - case ZodFirstPartyTypeKind.ZodLiteral: + case ZodFirstPartyTypeKind3.ZodLiteral: return parseLiteralDef(def, refs); - case ZodFirstPartyTypeKind.ZodEnum: + case ZodFirstPartyTypeKind3.ZodEnum: return parseEnumDef(def); - case ZodFirstPartyTypeKind.ZodNativeEnum: + case ZodFirstPartyTypeKind3.ZodNativeEnum: return parseNativeEnumDef(def); - case ZodFirstPartyTypeKind.ZodNullable: + case ZodFirstPartyTypeKind3.ZodNullable: return parseNullableDef(def, refs); - case ZodFirstPartyTypeKind.ZodOptional: + case ZodFirstPartyTypeKind3.ZodOptional: return parseOptionalDef(def, refs); - case ZodFirstPartyTypeKind.ZodMap: + case ZodFirstPartyTypeKind3.ZodMap: return parseMapDef(def, refs); - case ZodFirstPartyTypeKind.ZodSet: + case ZodFirstPartyTypeKind3.ZodSet: return parseSetDef(def, refs); - case ZodFirstPartyTypeKind.ZodLazy: + case ZodFirstPartyTypeKind3.ZodLazy: return () => def.getter()._def; - case ZodFirstPartyTypeKind.ZodPromise: + case ZodFirstPartyTypeKind3.ZodPromise: return parsePromiseDef(def, refs); - case ZodFirstPartyTypeKind.ZodNaN: - case ZodFirstPartyTypeKind.ZodNever: + case ZodFirstPartyTypeKind3.ZodNaN: + case ZodFirstPartyTypeKind3.ZodNever: return parseNeverDef(refs); - case ZodFirstPartyTypeKind.ZodEffects: + case ZodFirstPartyTypeKind3.ZodEffects: return parseEffectsDef(def, refs); - case ZodFirstPartyTypeKind.ZodAny: + case ZodFirstPartyTypeKind3.ZodAny: return parseAnyDef(refs); - case ZodFirstPartyTypeKind.ZodUnknown: + case ZodFirstPartyTypeKind3.ZodUnknown: return parseUnknownDef(refs); - case ZodFirstPartyTypeKind.ZodDefault: + case ZodFirstPartyTypeKind3.ZodDefault: return parseDefaultDef(def, refs); - case ZodFirstPartyTypeKind.ZodBranded: + case ZodFirstPartyTypeKind3.ZodBranded: return parseBrandedDef(def, refs); - case ZodFirstPartyTypeKind.ZodReadonly: + case ZodFirstPartyTypeKind3.ZodReadonly: return parseReadonlyDef(def, refs); - case ZodFirstPartyTypeKind.ZodCatch: + case ZodFirstPartyTypeKind3.ZodCatch: return parseCatchDef(def, refs); - case ZodFirstPartyTypeKind.ZodPipeline: + case ZodFirstPartyTypeKind3.ZodPipeline: return parsePipelineDef(def, refs); - case ZodFirstPartyTypeKind.ZodFunction: - case ZodFirstPartyTypeKind.ZodVoid: - case ZodFirstPartyTypeKind.ZodSymbol: + case ZodFirstPartyTypeKind3.ZodFunction: + case ZodFirstPartyTypeKind3.ZodVoid: + case ZodFirstPartyTypeKind3.ZodSymbol: return void 0; default: return /* @__PURE__ */ ((_) => void 0)(typeName); @@ -44951,7 +41768,7 @@ var init_selectParser = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parseDef.js function parseDef(def, refs, forceResolution = false) { const seenItem = refs.seen.get(def); if (refs.override) { @@ -44983,7 +41800,7 @@ function parseDef(def, refs, forceResolution = false) { } var get$ref, addMeta; var init_parseDef = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parseDef.js"() { init_Options(); init_selectParser(); init_getRelativePath(); @@ -45016,16 +41833,16 @@ var init_parseDef = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseTypes.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parseTypes.js var init_parseTypes = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseTypes.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parseTypes.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js var zodToJsonSchema; var init_zodToJsonSchema = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js"() { init_parseDef(); init_Refs(); init_any(); @@ -45092,7 +41909,7 @@ var init_zodToJsonSchema = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/index.js var esm_exports = {}; __export(esm_exports, { addErrorMessage: () => addErrorMessage, @@ -45142,7 +41959,7 @@ __export(esm_exports, { }); var esm_default; var init_esm = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/index.js"() { init_Options(); init_Refs(); init_errorMessages(); @@ -45203,8 +42020,8 @@ var init_zod_Bw_60DVU = __esm({ throw new Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${missingDependenciesUrl}`); }; try { - const { toJSONSchema: toJSONSchema2 } = await Promise.resolve().then(() => (init_core2(), core_exports2)); - zodV4toJSONSchema = toJSONSchema2; + const { toJSONSchema: toJSONSchema3 } = await Promise.resolve().then(() => (init_core2(), core_exports2)); + zodV4toJSONSchema = toJSONSchema3; } catch (err) { if (err instanceof Error) console.error(err.message); @@ -45271,7 +42088,7 @@ var require_fast_content_type_parse = __commonJS({ var defaultContentType = { type: "", parameters: new NullObject() }; Object.freeze(defaultContentType.parameters); Object.freeze(defaultContentType); - function parse4(header) { + function parse6(header) { if (typeof header !== "string") { throw new TypeError("argument header is required and must be a string"); } @@ -45309,7 +42126,7 @@ var require_fast_content_type_parse = __commonJS({ } return result; } - function safeParse3(header) { + function safeParse5(header) { if (typeof header !== "string") { return defaultContentType; } @@ -45347,9 +42164,9 @@ var require_fast_content_type_parse = __commonJS({ } return result; } - module.exports.default = { parse: parse4, safeParse: safeParse3 }; - module.exports.parse = parse4; - module.exports.safeParse = safeParse3; + module.exports.default = { parse: parse6, safeParse: safeParse5 }; + module.exports.parse = parse6; + module.exports.safeParse = safeParse5; module.exports.defaultContentType = defaultContentType; } }); @@ -45426,10 +42243,10 @@ var require_command = __commonJS({ process.stdout.write(cmd.toString() + os.EOL); } exports.issueCommand = issueCommand; - function issue2(name, message = "") { + function issue3(name, message = "") { issueCommand(name, {}, message); } - exports.issue = issue2; + exports.issue = issue3; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -45747,18 +42564,18 @@ var require_tunnel = __commonJS({ res.statusCode ); socket.destroy(); - var error41 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error41.code = "ECONNRESET"; - options.request.emit("error", error41); + var error42 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error42.code = "ECONNRESET"; + options.request.emit("error", error42); self.removeSocket(placeholder); return; } if (head.length > 0) { debug2("got illegal response body from proxy"); socket.destroy(); - var error41 = new Error("got illegal response body from proxy"); - error41.code = "ECONNRESET"; - options.request.emit("error", error41); + var error42 = new Error("got illegal response body from proxy"); + error42.code = "ECONNRESET"; + options.request.emit("error", error42); self.removeSocket(placeholder); return; } @@ -45773,9 +42590,9 @@ var require_tunnel = __commonJS({ cause.message, cause.stack ); - var error41 = new Error("tunneling socket could not be established, cause=" + cause.message); - error41.code = "ECONNRESET"; - options.request.emit("error", error41); + var error42 = new Error("tunneling socket could not be established, cause=" + cause.message); + error42.code = "ECONNRESET"; + options.request.emit("error", error42); self.removeSocket(placeholder); } }; @@ -50903,7 +47720,7 @@ Content-Type: ${value2.type || "application/octet-stream"}\r throw new TypeError("Body is unusable"); } const promise = createDeferredPromise(); - const errorSteps = (error41) => promise.reject(error41); + const errorSteps = (error42) => promise.reject(error42); const successSteps = (data) => { try { promise.resolve(convertBytesToJSValue(data)); @@ -51189,16 +48006,16 @@ var require_request3 = __commonJS({ this.onError(err); } } - onError(error41) { + onError(error42) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error41 }); + channels.error.publish({ request: this, error: error42 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error41); + return this[kHandler].onError(error42); } onFinally() { if (this.errorHandler) { @@ -51570,14 +48387,14 @@ var require_connect2 = __commonJS({ const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); timeout = timeout == null ? 1e4 : timeout; allowH2 = allowH2 != null ? allowH2 : false; - return function connect({ hostname: hostname2, host, protocol, port, servername, localAddress, httpSocket }, callback) { + return function connect({ hostname: hostname3, host, protocol, port, servername, localAddress, httpSocket }, callback) { let socket; if (protocol === "https:") { if (!tls) { tls = __require("tls"); } servername = servername || options.servername || util2.getServerName(host) || null; - const sessionKey = servername || hostname2; + const sessionKey = servername || hostname3; const session = sessionCache.get(sessionKey) || null; assert2(sessionKey); socket = tls.connect({ @@ -51592,7 +48409,7 @@ var require_connect2 = __commonJS({ socket: httpSocket, // upgrade socket connection port: port || 443, - host: hostname2 + host: hostname3 }); socket.on("session", function(session2) { sessionCache.set(sessionKey, session2); @@ -51605,7 +48422,7 @@ var require_connect2 = __commonJS({ ...options, localAddress, port: port || 80, - host: hostname2 + host: hostname3 }); } if (options.keepAlive == null || options.keepAlive) { @@ -52061,8 +48878,8 @@ var require_RedirectHandler = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error41) { - this.handler.onError(error41); + onError(error42) { + this.handler.onError(error42); } onHeaders(statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util2.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -53069,20 +49886,20 @@ var require_client2 = __commonJS({ async function connect(client) { assert2(!client[kConnecting]); assert2(!client[kSocket]); - let { host, hostname: hostname2, protocol, port } = client[kUrl]; - if (hostname2[0] === "[") { - const idx = hostname2.indexOf("]"); + let { host, hostname: hostname3, protocol, port } = client[kUrl]; + if (hostname3[0] === "[") { + const idx = hostname3.indexOf("]"); assert2(idx !== -1); - const ip2 = hostname2.substring(1, idx); + const ip2 = hostname3.substring(1, idx); assert2(net.isIP(ip2)); - hostname2 = ip2; + hostname3 = ip2; } client[kConnecting] = true; if (channels.beforeConnect.hasSubscribers) { channels.beforeConnect.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname3, protocol, port, servername: client[kServerName], @@ -53095,7 +49912,7 @@ var require_client2 = __commonJS({ const socket = await new Promise((resolve, reject) => { client[kConnector]({ host, - hostname: hostname2, + hostname: hostname3, protocol, port, servername: client[kServerName], @@ -53159,7 +49976,7 @@ var require_client2 = __commonJS({ channels.connected.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname3, protocol, port, servername: client[kServerName], @@ -53179,7 +49996,7 @@ var require_client2 = __commonJS({ channels.connectError.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname3, protocol, port, servername: client[kServerName], @@ -54203,7 +51020,7 @@ var require_pool2 = __commonJS({ this[kOptions] = { ...util2.deepClone(options), connect, allowH2 }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; - this.on("connectionError", (origin2, targets, error41) => { + this.on("connectionError", (origin2, targets, error42) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -55683,10 +52500,10 @@ var require_mock_utils2 = __commonJS({ } } function buildHeadersFromArray(headers) { - const clone2 = headers.slice(); + const clone3 = headers.slice(); const entries = []; - for (let index = 0; index < clone2.length; index += 2) { - entries.push([clone2[index], clone2[index + 1]]); + for (let index = 0; index < clone3.length; index += 2) { + entries.push([clone3[index], clone3[index + 1]]); } return Object.fromEntries(entries); } @@ -55812,13 +52629,13 @@ var require_mock_utils2 = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data, headers, trailers, error: error41 }, delay: delay2, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error42 }, delay: delay2, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error41 !== null) { + if (error42 !== null) { deleteMockDispatch(this[kDispatches], key); - handler2.onError(error41); + handler2.onError(error42); return true; } if (typeof delay2 === "number" && delay2 > 0) { @@ -55856,19 +52673,19 @@ var require_mock_utils2 = __commonJS({ if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler2); - } catch (error41) { - if (error41 instanceof MockNotMatchedError) { + } catch (error42) { + if (error42 instanceof MockNotMatchedError) { const netConnect = agent[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error41.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error42.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler2); } else { - throw new MockNotMatchedError(`${error41.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error42.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error41; + throw error42; } } } else { @@ -56031,11 +52848,11 @@ var require_mock_interceptor2 = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error41) { - if (typeof error41 === "undefined") { + replyWithError(error42) { + if (typeof error42 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error41 }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error42 }); return new MockScope(newMockDispatch); } /** @@ -58362,17 +55179,17 @@ var require_fetch2 = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error41) { + abort(error42) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error41) { - error41 = new DOMException2("The operation was aborted.", "AbortError"); + if (!error42) { + error42 = new DOMException2("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error41; - this.connection?.destroy(error41); - this.emit("terminated", error41); + this.serializedAbortReason = error42; + this.connection?.destroy(error42); + this.emit("terminated", error42); } }; function fetch3(input, init = {}) { @@ -58476,13 +55293,13 @@ var require_fetch2 = __commonJS({ performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis2, cacheState); } } - function abortFetch(p, request2, responseObject, error41) { - if (!error41) { - error41 = new DOMException2("The operation was aborted.", "AbortError"); + function abortFetch(p, request2, responseObject, error42) { + if (!error42) { + error42 = new DOMException2("The operation was aborted.", "AbortError"); } - p.reject(error41); + p.reject(error42); if (request2.body != null && isReadable(request2.body?.stream)) { - request2.body.stream.cancel(error41).catch((err) => { + request2.body.stream.cancel(error42).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -58494,7 +55311,7 @@ var require_fetch2 = __commonJS({ } const response = responseObject[kState]; if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error41).catch((err) => { + response.body.stream.cancel(error42).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -59274,13 +56091,13 @@ var require_fetch2 = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error41) { + onError(error42) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error41); - fetchParams.controller.terminate(error41); - reject(error41); + this.body?.destroy(error42); + fetchParams.controller.terminate(error42); + reject(error42); }, onUpgrade(status, headersList, socket) { if (status !== 101) { @@ -59746,8 +56563,8 @@ var require_util12 = __commonJS({ } fr[kResult] = result; fireAProgressEvent("load", fr); - } catch (error41) { - fr[kError] = error41; + } catch (error42) { + fr[kError] = error42; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { @@ -59756,13 +56573,13 @@ var require_util12 = __commonJS({ }); break; } - } catch (error41) { + } catch (error42) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; - fr[kError] = error41; + fr[kError] = error42; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); @@ -59810,7 +56627,7 @@ var require_util12 = __commonJS({ if (encoding === "failure") { encoding = "UTF-8"; } - return decode(bytes, encoding); + return decode2(bytes, encoding); } case "ArrayBuffer": { const sequence = combineByteSequences(bytes); @@ -59827,7 +56644,7 @@ var require_util12 = __commonJS({ } } } - function decode(ioQueue, encoding) { + function decode2(ioQueue, encoding) { const bytes = combineByteSequences(ioQueue); const BOMEncoding = BOMSniffing(bytes); let slice = 0; @@ -60866,9 +57683,9 @@ var require_util14 = __commonJS({ throw new Error("Invalid cookie domain"); } } - function toIMFDate(date2) { - if (typeof date2 === "number") { - date2 = new Date(date2); + function toIMFDate(date4) { + if (typeof date4 === "number") { + date4 = new Date(date4); } const days = [ "Sun", @@ -60893,13 +57710,13 @@ var require_util14 = __commonJS({ "Nov", "Dec" ]; - const dayName = days[date2.getUTCDay()]; - const day = date2.getUTCDate().toString().padStart(2, "0"); - const month = months2[date2.getUTCMonth()]; - const year = date2.getUTCFullYear(); - const hour = date2.getUTCHours().toString().padStart(2, "0"); - const minute = date2.getUTCMinutes().toString().padStart(2, "0"); - const second = date2.getUTCSeconds().toString().padStart(2, "0"); + const dayName = days[date4.getUTCDay()]; + const day = date4.getUTCDate().toString().padStart(2, "0"); + const month = months2[date4.getUTCMonth()]; + const year = date4.getUTCFullYear(); + const hour = date4.getUTCHours().toString().padStart(2, "0"); + const minute = date4.getUTCMinutes().toString().padStart(2, "0"); + const second = date4.getUTCSeconds().toString().padStart(2, "0"); return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`; } function validateCookieMaxAge(maxAge) { @@ -61762,11 +58579,11 @@ var require_connection2 = __commonJS({ }); } } - function onSocketError(error41) { + function onSocketError(error42) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error41); + channels.socketError.publish(error42); } this.destroy(); } @@ -63398,12 +60215,12 @@ var require_oidc_utils = __commonJS({ var _a; return __awaiter(this, void 0, void 0, function* () { const httpclient = _OidcClient.createHttpClient(); - const res = yield httpclient.getJson(id_token_url).catch((error41) => { + const res = yield httpclient.getJson(id_token_url).catch((error42) => { throw new Error(`Failed to get ID Token. - Error Code : ${error41.statusCode} + Error Code : ${error42.statusCode} - Error Message: ${error41.message}`); + Error Message: ${error42.message}`); }); const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; if (!id_token) { @@ -63424,8 +60241,8 @@ var require_oidc_utils = __commonJS({ const id_token = yield _OidcClient.getCall(id_token_url); (0, core_1.setSecret)(id_token); return id_token; - } catch (error41) { - throw new Error(`Error message: ${error41.message}`); + } catch (error42) { + throw new Error(`Error message: ${error42.message}`); } }); } @@ -64547,7 +61364,7 @@ var require_toolrunner = __commonJS({ this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); state.CheckComplete(); }); - state.on("done", (error41, exitCode) => { + state.on("done", (error42, exitCode) => { if (stdbuffer.length > 0) { this.emit("stdline", stdbuffer); } @@ -64555,8 +61372,8 @@ var require_toolrunner = __commonJS({ this.emit("errline", errbuffer); } cp.removeAllListeners(); - if (error41) { - reject(error41); + if (error42) { + reject(error42); } else { resolve(exitCode); } @@ -64651,14 +61468,14 @@ var require_toolrunner = __commonJS({ this.emit("debug", message); } _setResult() { - let error41; + let error42; if (this.processExited) { if (this.processError) { - error41 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + error42 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error41 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + error42 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); } else if (this.processStderr && this.options.failOnStdErr) { - error41 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + error42 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); } } if (this.timeout) { @@ -64666,7 +61483,7 @@ var require_toolrunner = __commonJS({ this.timeout = null; } this.done = true; - this.emit("done", error41, this.processExitCode); + this.emit("done", error42, this.processExitCode); } static HandleTimeout(state) { if (state.done) { @@ -64855,7 +61672,7 @@ var require_platform = __commonJS({ var os_1 = __importDefault(__require("os")); var exec = __importStar(require_exec()); var getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { - const { stdout: version2 } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + const { stdout: version3 } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { @@ -64863,7 +61680,7 @@ var require_platform = __commonJS({ }); return { name: name.trim(), - version: version2.trim() + version: version3.trim() }; }); var getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { @@ -64871,21 +61688,21 @@ var require_platform = __commonJS({ const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true }); - const version2 = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const version3 = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; return { name, - version: version2 + version: version3 }; }); var getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); - const [name, version2] = stdout.trim().split("\n"); + const [name, version3] = stdout.trim().split("\n"); return { name, - version: version2 + version: version3 }; }); exports.platform = os_1.default.platform(); @@ -65049,7 +61866,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); exports.setCommandEcho = setCommandEcho; function setFailed(message) { process.exitCode = ExitCode.Failure; - error41(message); + error42(message); } exports.setFailed = setFailed; function isDebug() { @@ -65060,10 +61877,10 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); (0, command_1.issueCommand)("debug", {}, message); } exports.debug = debug2; - function error41(message, properties = {}) { + function error42(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports.error = error41; + exports.error = error42; function warning2(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } @@ -65137,8 +61954,4048 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } }); +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js +var external_exports = {}; +__export(external_exports, { + BRAND: () => BRAND, + DIRTY: () => DIRTY, + EMPTY_PATH: () => EMPTY_PATH, + INVALID: () => INVALID, + NEVER: () => NEVER, + OK: () => OK, + ParseStatus: () => ParseStatus, + Schema: () => ZodType, + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBigInt: () => ZodBigInt, + ZodBoolean: () => ZodBoolean, + ZodBranded: () => ZodBranded, + ZodCatch: () => ZodCatch, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodEffects: () => ZodEffects, + ZodEnum: () => ZodEnum, + ZodError: () => ZodError, + ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, + ZodFunction: () => ZodFunction, + ZodIntersection: () => ZodIntersection, + ZodIssueCode: () => ZodIssueCode, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNativeEnum: () => ZodNativeEnum, + ZodNever: () => ZodNever, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodParsedType: () => ZodParsedType, + ZodPipeline: () => ZodPipeline, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRecord: () => ZodRecord, + ZodSchema: () => ZodType, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodSymbol: () => ZodSymbol, + ZodTransformer: () => ZodEffects, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + addIssueToContext: () => addIssueToContext, + any: () => anyType, + array: () => arrayType, + bigint: () => bigIntType, + boolean: () => booleanType, + coerce: () => coerce, + custom: () => custom, + date: () => dateType, + datetimeRegex: () => datetimeRegex, + defaultErrorMap: () => en_default, + discriminatedUnion: () => discriminatedUnionType, + effect: () => effectsType, + enum: () => enumType, + function: () => functionType, + getErrorMap: () => getErrorMap, + getParsedType: () => getParsedType, + instanceof: () => instanceOfType, + intersection: () => intersectionType, + isAborted: () => isAborted, + isAsync: () => isAsync, + isDirty: () => isDirty, + isValid: () => isValid, + late: () => late, + lazy: () => lazyType, + literal: () => literalType, + makeIssue: () => makeIssue, + map: () => mapType, + nan: () => nanType, + nativeEnum: () => nativeEnumType, + never: () => neverType, + null: () => nullType, + nullable: () => nullableType, + number: () => numberType, + object: () => objectType, + objectUtil: () => objectUtil, + oboolean: () => oboolean, + onumber: () => onumber, + optional: () => optionalType, + ostring: () => ostring, + pipeline: () => pipelineType, + preprocess: () => preprocessType, + promise: () => promiseType, + quotelessJson: () => quotelessJson, + record: () => recordType, + set: () => setType, + setErrorMap: () => setErrorMap, + strictObject: () => strictObjectType, + string: () => stringType, + symbol: () => symbolType, + transformer: () => effectsType, + tuple: () => tupleType, + undefined: () => undefinedType, + union: () => unionType, + unknown: () => unknownType, + util: () => util, + void: () => voidType +}); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js +var util; +(function(util2) { + util2.assertEqual = (_) => { + }; + function assertIs2(_arg) { + } + util2.assertIs = assertIs2; + function assertNever2(_x) { + throw new Error(); + } + util2.assertNever = assertNever2; + util2.arrayToEnum = (items) => { + const obj = {}; + for (const item of items) { + obj[item] = item; + } + return obj; + }; + util2.getValidEnumValues = (obj) => { + const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number"); + const filtered = {}; + for (const k of validKeys) { + filtered[k] = obj[k]; + } + return util2.objectValues(filtered); + }; + util2.objectValues = (obj) => { + return util2.objectKeys(obj).map(function(e) { + return obj[e]; + }); + }; + util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object2) => { + const keys = []; + for (const key in object2) { + if (Object.prototype.hasOwnProperty.call(object2, key)) { + keys.push(key); + } + } + return keys; + }; + util2.find = (arr, checker) => { + for (const item of arr) { + if (checker(item)) + return item; + } + return void 0; + }; + util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; + function joinValues3(array, separator2 = " | ") { + return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); + } + util2.joinValues = joinValues3; + util2.jsonStringifyReplacer = (_, value2) => { + if (typeof value2 === "bigint") { + return value2.toString(); + } + return value2; + }; +})(util || (util = {})); +var objectUtil; +(function(objectUtil3) { + objectUtil3.mergeShapes = (first, second) => { + return { + ...first, + ...second + // second overwrites first + }; + }; +})(objectUtil || (objectUtil = {})); +var ZodParsedType = util.arrayToEnum([ + "string", + "nan", + "number", + "integer", + "float", + "boolean", + "date", + "bigint", + "symbol", + "function", + "undefined", + "null", + "array", + "object", + "unknown", + "promise", + "void", + "never", + "map", + "set" +]); +var getParsedType = (data) => { + const t = typeof data; + switch (t) { + case "undefined": + return ZodParsedType.undefined; + case "string": + return ZodParsedType.string; + case "number": + return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number; + case "boolean": + return ZodParsedType.boolean; + case "function": + return ZodParsedType.function; + case "bigint": + return ZodParsedType.bigint; + case "symbol": + return ZodParsedType.symbol; + case "object": + if (Array.isArray(data)) { + return ZodParsedType.array; + } + if (data === null) { + return ZodParsedType.null; + } + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return ZodParsedType.promise; + } + if (typeof Map !== "undefined" && data instanceof Map) { + return ZodParsedType.map; + } + if (typeof Set !== "undefined" && data instanceof Set) { + return ZodParsedType.set; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return ZodParsedType.date; + } + return ZodParsedType.object; + default: + return ZodParsedType.unknown; + } +}; + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js +var ZodIssueCode = util.arrayToEnum([ + "invalid_type", + "invalid_literal", + "custom", + "invalid_union", + "invalid_union_discriminator", + "invalid_enum_value", + "unrecognized_keys", + "invalid_arguments", + "invalid_return_type", + "invalid_date", + "invalid_string", + "too_small", + "too_big", + "invalid_intersection_types", + "not_multiple_of", + "not_finite" +]); +var quotelessJson = (obj) => { + const json3 = JSON.stringify(obj, null, 2); + return json3.replace(/"([^"]+)":/g, "$1:"); +}; +var ZodError = class _ZodError extends Error { + get errors() { + return this.issues; + } + constructor(issues) { + super(); + this.issues = []; + this.addIssue = (sub) => { + this.issues = [...this.issues, sub]; + }; + this.addIssues = (subs = []) => { + this.issues = [...this.issues, ...subs]; + }; + const actualProto = new.target.prototype; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(this, actualProto); + } else { + this.__proto__ = actualProto; + } + this.name = "ZodError"; + this.issues = issues; + } + format(_mapper) { + const mapper = _mapper || function(issue3) { + return issue3.message; + }; + const fieldErrors = { _errors: [] }; + const processError = (error42) => { + for (const issue3 of error42.issues) { + if (issue3.code === "invalid_union") { + issue3.unionErrors.map(processError); + } else if (issue3.code === "invalid_return_type") { + processError(issue3.returnTypeError); + } else if (issue3.code === "invalid_arguments") { + processError(issue3.argumentsError); + } else if (issue3.path.length === 0) { + fieldErrors._errors.push(mapper(issue3)); + } else { + let curr = fieldErrors; + let i = 0; + while (i < issue3.path.length) { + const el = issue3.path[i]; + const terminal = i === issue3.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue3)); + } + curr = curr[el]; + i++; + } + } + } + }; + processError(this); + return fieldErrors; + } + static assert(value2) { + if (!(value2 instanceof _ZodError)) { + throw new Error(`Not a ZodError: ${value2}`); + } + } + toString() { + return this.message; + } + get message() { + return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2); + } + get isEmpty() { + return this.issues.length === 0; + } + flatten(mapper = (issue3) => issue3.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of this.issues) { + if (sub.path.length > 0) { + const firstEl = sub.path[0]; + fieldErrors[firstEl] = fieldErrors[firstEl] || []; + fieldErrors[firstEl].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; + } + get formErrors() { + return this.flatten(); + } +}; +ZodError.create = (issues) => { + const error42 = new ZodError(issues); + return error42; +}; + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js +var errorMap = (issue3, _ctx) => { + let message; + switch (issue3.code) { + case ZodIssueCode.invalid_type: + if (issue3.received === ZodParsedType.undefined) { + message = "Required"; + } else { + message = `Expected ${issue3.expected}, received ${issue3.received}`; + } + break; + case ZodIssueCode.invalid_literal: + message = `Invalid literal value, expected ${JSON.stringify(issue3.expected, util.jsonStringifyReplacer)}`; + break; + case ZodIssueCode.unrecognized_keys: + message = `Unrecognized key(s) in object: ${util.joinValues(issue3.keys, ", ")}`; + break; + case ZodIssueCode.invalid_union: + message = `Invalid input`; + break; + case ZodIssueCode.invalid_union_discriminator: + message = `Invalid discriminator value. Expected ${util.joinValues(issue3.options)}`; + break; + case ZodIssueCode.invalid_enum_value: + message = `Invalid enum value. Expected ${util.joinValues(issue3.options)}, received '${issue3.received}'`; + break; + case ZodIssueCode.invalid_arguments: + message = `Invalid function arguments`; + break; + case ZodIssueCode.invalid_return_type: + message = `Invalid function return type`; + break; + case ZodIssueCode.invalid_date: + message = `Invalid date`; + break; + case ZodIssueCode.invalid_string: + if (typeof issue3.validation === "object") { + if ("includes" in issue3.validation) { + message = `Invalid input: must include "${issue3.validation.includes}"`; + if (typeof issue3.validation.position === "number") { + message = `${message} at one or more positions greater than or equal to ${issue3.validation.position}`; + } + } else if ("startsWith" in issue3.validation) { + message = `Invalid input: must start with "${issue3.validation.startsWith}"`; + } else if ("endsWith" in issue3.validation) { + message = `Invalid input: must end with "${issue3.validation.endsWith}"`; + } else { + util.assertNever(issue3.validation); + } + } else if (issue3.validation !== "regex") { + message = `Invalid ${issue3.validation}`; + } else { + message = "Invalid"; + } + break; + case ZodIssueCode.too_small: + if (issue3.type === "array") + message = `Array must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `more than`} ${issue3.minimum} element(s)`; + else if (issue3.type === "string") + message = `String must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `over`} ${issue3.minimum} character(s)`; + else if (issue3.type === "number") + message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; + else if (issue3.type === "bigint") + message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; + else if (issue3.type === "date") + message = `Date must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue3.minimum))}`; + else + message = "Invalid input"; + break; + case ZodIssueCode.too_big: + if (issue3.type === "array") + message = `Array must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `less than`} ${issue3.maximum} element(s)`; + else if (issue3.type === "string") + message = `String must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `under`} ${issue3.maximum} character(s)`; + else if (issue3.type === "number") + message = `Number must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; + else if (issue3.type === "bigint") + message = `BigInt must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; + else if (issue3.type === "date") + message = `Date must be ${issue3.exact ? `exactly` : issue3.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue3.maximum))}`; + else + message = "Invalid input"; + break; + case ZodIssueCode.custom: + message = `Invalid input`; + break; + case ZodIssueCode.invalid_intersection_types: + message = `Intersection results could not be merged`; + break; + case ZodIssueCode.not_multiple_of: + message = `Number must be a multiple of ${issue3.multipleOf}`; + break; + case ZodIssueCode.not_finite: + message = "Number must be finite"; + break; + default: + message = _ctx.defaultError; + util.assertNever(issue3); + } + return { message }; +}; +var en_default = errorMap; + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js +var overrideErrorMap = en_default; +function setErrorMap(map) { + overrideErrorMap = map; +} +function getErrorMap() { + return overrideErrorMap; +} + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +var makeIssue = (params) => { + const { data, path, errorMaps, issueData } = params; + const fullPath = [...path, ...issueData.path || []]; + const fullIssue = { + ...issueData, + path: fullPath + }; + if (issueData.message !== void 0) { + return { + ...issueData, + path: fullPath, + message: issueData.message + }; + } + let errorMessage = ""; + const maps = errorMaps.filter((m) => !!m).slice().reverse(); + for (const map of maps) { + errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; + } + return { + ...issueData, + path: fullPath, + message: errorMessage + }; +}; +var EMPTY_PATH = []; +function addIssueToContext(ctx, issueData) { + const overrideMap = getErrorMap(); + const issue3 = makeIssue({ + issueData, + data: ctx.data, + path: ctx.path, + errorMaps: [ + ctx.common.contextualErrorMap, + // contextual error map is first priority + ctx.schemaErrorMap, + // then schema-bound map if available + overrideMap, + // then global override map + overrideMap === en_default ? void 0 : en_default + // then global default map + ].filter((x) => !!x) + }); + ctx.common.issues.push(issue3); +} +var ParseStatus = class _ParseStatus { + constructor() { + this.value = "valid"; + } + dirty() { + if (this.value === "valid") + this.value = "dirty"; + } + abort() { + if (this.value !== "aborted") + this.value = "aborted"; + } + static mergeArray(status, results) { + const arrayValue = []; + for (const s of results) { + if (s.status === "aborted") + return INVALID; + if (s.status === "dirty") + status.dirty(); + arrayValue.push(s.value); + } + return { status: status.value, value: arrayValue }; + } + static async mergeObjectAsync(status, pairs) { + const syncPairs = []; + for (const pair of pairs) { + const key = await pair.key; + const value2 = await pair.value; + syncPairs.push({ + key, + value: value2 + }); + } + return _ParseStatus.mergeObjectSync(status, syncPairs); + } + static mergeObjectSync(status, pairs) { + const finalObject = {}; + for (const pair of pairs) { + const { key, value: value2 } = pair; + if (key.status === "aborted") + return INVALID; + if (value2.status === "aborted") + return INVALID; + if (key.status === "dirty") + status.dirty(); + if (value2.status === "dirty") + status.dirty(); + if (key.value !== "__proto__" && (typeof value2.value !== "undefined" || pair.alwaysSet)) { + finalObject[key.value] = value2.value; + } + } + return { status: status.value, value: finalObject }; + } +}; +var INVALID = Object.freeze({ + status: "aborted" +}); +var DIRTY = (value2) => ({ status: "dirty", value: value2 }); +var OK = (value2) => ({ status: "valid", value: value2 }); +var isAborted = (x) => x.status === "aborted"; +var isDirty = (x) => x.status === "dirty"; +var isValid = (x) => x.status === "valid"; +var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise; + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +var errorUtil; +(function(errorUtil3) { + errorUtil3.errToObj = (message) => typeof message === "string" ? { message } : message || {}; + errorUtil3.toString = (message) => typeof message === "string" ? message : message?.message; +})(errorUtil || (errorUtil = {})); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js +var ParseInputLazyPath = class { + constructor(parent, value2, path, key) { + this._cachedPath = []; + this.parent = parent; + this.data = value2; + this._path = path; + this._key = key; + } + get path() { + if (!this._cachedPath.length) { + if (Array.isArray(this._key)) { + this._cachedPath.push(...this._path, ...this._key); + } else { + this._cachedPath.push(...this._path, this._key); + } + } + return this._cachedPath; + } +}; +var handleResult = (ctx, result) => { + if (isValid(result)) { + return { success: true, data: result.value }; + } else { + if (!ctx.common.issues.length) { + throw new Error("Validation failed but no issues detected."); + } + return { + success: false, + get error() { + if (this._error) + return this._error; + const error42 = new ZodError(ctx.common.issues); + this._error = error42; + return this._error; + } + }; + } +}; +function processCreateParams(params) { + if (!params) + return {}; + const { errorMap: errorMap3, invalid_type_error, required_error, description } = params; + if (errorMap3 && (invalid_type_error || required_error)) { + throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); + } + if (errorMap3) + return { errorMap: errorMap3, description }; + const customMap = (iss, ctx) => { + const { message } = params; + if (iss.code === "invalid_enum_value") { + return { message: message ?? ctx.defaultError }; + } + if (typeof ctx.data === "undefined") { + return { message: message ?? required_error ?? ctx.defaultError }; + } + if (iss.code !== "invalid_type") + return { message: ctx.defaultError }; + return { message: message ?? invalid_type_error ?? ctx.defaultError }; + }; + return { errorMap: customMap, description }; +} +var ZodType = class { + get description() { + return this._def.description; + } + _getType(input) { + return getParsedType(input.data); + } + _getOrReturnCtx(input, ctx) { + return ctx || { + common: input.parent.common, + data: input.data, + parsedType: getParsedType(input.data), + schemaErrorMap: this._def.errorMap, + path: input.path, + parent: input.parent + }; + } + _processInputParams(input) { + return { + status: new ParseStatus(), + ctx: { + common: input.parent.common, + data: input.data, + parsedType: getParsedType(input.data), + schemaErrorMap: this._def.errorMap, + path: input.path, + parent: input.parent + } + }; + } + _parseSync(input) { + const result = this._parse(input); + if (isAsync(result)) { + throw new Error("Synchronous parse encountered promise."); + } + return result; + } + _parseAsync(input) { + const result = this._parse(input); + return Promise.resolve(result); + } + parse(data, params) { + const result = this.safeParse(data, params); + if (result.success) + return result.data; + throw result.error; + } + safeParse(data, params) { + const ctx = { + common: { + issues: [], + async: params?.async ?? false, + contextualErrorMap: params?.errorMap + }, + path: params?.path || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType(data) + }; + const result = this._parseSync({ data, path: ctx.path, parent: ctx }); + return handleResult(ctx, result); + } + "~validate"(data) { + const ctx = { + common: { + issues: [], + async: !!this["~standard"].async + }, + path: [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType(data) + }; + if (!this["~standard"].async) { + try { + const result = this._parseSync({ data, path: [], parent: ctx }); + return isValid(result) ? { + value: result.value + } : { + issues: ctx.common.issues + }; + } catch (err) { + if (err?.message?.toLowerCase()?.includes("encountered")) { + this["~standard"].async = true; + } + ctx.common = { + issues: [], + async: true + }; + } + } + return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? { + value: result.value + } : { + issues: ctx.common.issues + }); + } + async parseAsync(data, params) { + const result = await this.safeParseAsync(data, params); + if (result.success) + return result.data; + throw result.error; + } + async safeParseAsync(data, params) { + const ctx = { + common: { + issues: [], + contextualErrorMap: params?.errorMap, + async: true + }, + path: params?.path || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType(data) + }; + const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx }); + const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); + return handleResult(ctx, result); + } + refine(check, message) { + const getIssueProperties = (val) => { + if (typeof message === "string" || typeof message === "undefined") { + return { message }; + } else if (typeof message === "function") { + return message(val); + } else { + return message; + } + }; + return this._refinement((val, ctx) => { + const result = check(val); + const setError = () => ctx.addIssue({ + code: ZodIssueCode.custom, + ...getIssueProperties(val) + }); + if (typeof Promise !== "undefined" && result instanceof Promise) { + return result.then((data) => { + if (!data) { + setError(); + return false; + } else { + return true; + } + }); + } + if (!result) { + setError(); + return false; + } else { + return true; + } + }); + } + refinement(check, refinementData) { + return this._refinement((val, ctx) => { + if (!check(val)) { + ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData); + return false; + } else { + return true; + } + }); + } + _refinement(refinement) { + return new ZodEffects({ + schema: this, + typeName: ZodFirstPartyTypeKind.ZodEffects, + effect: { type: "refinement", refinement } + }); + } + superRefine(refinement) { + return this._refinement(refinement); + } + constructor(def) { + this.spa = this.safeParseAsync; + this._def = def; + this.parse = this.parse.bind(this); + this.safeParse = this.safeParse.bind(this); + this.parseAsync = this.parseAsync.bind(this); + this.safeParseAsync = this.safeParseAsync.bind(this); + this.spa = this.spa.bind(this); + this.refine = this.refine.bind(this); + this.refinement = this.refinement.bind(this); + this.superRefine = this.superRefine.bind(this); + this.optional = this.optional.bind(this); + this.nullable = this.nullable.bind(this); + this.nullish = this.nullish.bind(this); + this.array = this.array.bind(this); + this.promise = this.promise.bind(this); + this.or = this.or.bind(this); + this.and = this.and.bind(this); + this.transform = this.transform.bind(this); + this.brand = this.brand.bind(this); + this.default = this.default.bind(this); + this.catch = this.catch.bind(this); + this.describe = this.describe.bind(this); + this.pipe = this.pipe.bind(this); + this.readonly = this.readonly.bind(this); + this.isNullable = this.isNullable.bind(this); + this.isOptional = this.isOptional.bind(this); + this["~standard"] = { + version: 1, + vendor: "zod", + validate: (data) => this["~validate"](data) + }; + } + optional() { + return ZodOptional.create(this, this._def); + } + nullable() { + return ZodNullable.create(this, this._def); + } + nullish() { + return this.nullable().optional(); + } + array() { + return ZodArray.create(this); + } + promise() { + return ZodPromise.create(this, this._def); + } + or(option) { + return ZodUnion.create([this, option], this._def); + } + and(incoming) { + return ZodIntersection.create(this, incoming, this._def); + } + transform(transform) { + return new ZodEffects({ + ...processCreateParams(this._def), + schema: this, + typeName: ZodFirstPartyTypeKind.ZodEffects, + effect: { type: "transform", transform } + }); + } + default(def) { + const defaultValueFunc = typeof def === "function" ? def : () => def; + return new ZodDefault({ + ...processCreateParams(this._def), + innerType: this, + defaultValue: defaultValueFunc, + typeName: ZodFirstPartyTypeKind.ZodDefault + }); + } + brand() { + return new ZodBranded({ + typeName: ZodFirstPartyTypeKind.ZodBranded, + type: this, + ...processCreateParams(this._def) + }); + } + catch(def) { + const catchValueFunc = typeof def === "function" ? def : () => def; + return new ZodCatch({ + ...processCreateParams(this._def), + innerType: this, + catchValue: catchValueFunc, + typeName: ZodFirstPartyTypeKind.ZodCatch + }); + } + describe(description) { + const This = this.constructor; + return new This({ + ...this._def, + description + }); + } + pipe(target) { + return ZodPipeline.create(this, target); + } + readonly() { + return ZodReadonly.create(this); + } + isOptional() { + return this.safeParse(void 0).success; + } + isNullable() { + return this.safeParse(null).success; + } +}; +var cuidRegex = /^c[^\s-]{8,}$/i; +var cuid2Regex = /^[0-9a-z]+$/; +var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i; +var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i; +var nanoidRegex = /^[a-z0-9_-]{21}$/i; +var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; +var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; +var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; +var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; +var emojiRegex; +var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; +var ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/; +var ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/; +var ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; +var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; +var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; +var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`; +var dateRegex = new RegExp(`^${dateRegexSource}$`); +function timeRegexSource(args2) { + let secondsRegexSource = `[0-5]\\d`; + if (args2.precision) { + secondsRegexSource = `${secondsRegexSource}\\.\\d{${args2.precision}}`; + } else if (args2.precision == null) { + secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`; + } + const secondsQuantifier = args2.precision ? "+" : "?"; + return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`; +} +function timeRegex(args2) { + return new RegExp(`^${timeRegexSource(args2)}$`); +} +function datetimeRegex(args2) { + let regex3 = `${dateRegexSource}T${timeRegexSource(args2)}`; + const opts = []; + opts.push(args2.local ? `Z?` : `Z`); + if (args2.offset) + opts.push(`([+-]\\d{2}:?\\d{2})`); + regex3 = `${regex3}(${opts.join("|")})`; + return new RegExp(`^${regex3}$`); +} +function isValidIP(ip2, version3) { + if ((version3 === "v4" || !version3) && ipv4Regex.test(ip2)) { + return true; + } + if ((version3 === "v6" || !version3) && ipv6Regex.test(ip2)) { + return true; + } + return false; +} +function isValidJWT(jwt, alg) { + if (!jwtRegex.test(jwt)) + return false; + try { + const [header] = jwt.split("."); + if (!header) + return false; + const base644 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); + const decoded = JSON.parse(atob(base644)); + if (typeof decoded !== "object" || decoded === null) + return false; + if ("typ" in decoded && decoded?.typ !== "JWT") + return false; + if (!decoded.alg) + return false; + if (alg && decoded.alg !== alg) + return false; + return true; + } catch { + return false; + } +} +function isValidCidr(ip2, version3) { + if ((version3 === "v4" || !version3) && ipv4CidrRegex.test(ip2)) { + return true; + } + if ((version3 === "v6" || !version3) && ipv6CidrRegex.test(ip2)) { + return true; + } + return false; +} +var ZodString = class _ZodString extends ZodType { + _parse(input) { + if (this._def.coerce) { + input.data = String(input.data); + } + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.string) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.string, + received: ctx2.parsedType + }); + return INVALID; + } + const status = new ParseStatus(); + let ctx = void 0; + for (const check of this._def.checks) { + if (check.kind === "min") { + if (input.data.length < check.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: check.value, + type: "string", + inclusive: true, + exact: false, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "max") { + if (input.data.length > check.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: check.value, + type: "string", + inclusive: true, + exact: false, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "length") { + const tooBig = input.data.length > check.value; + const tooSmall = input.data.length < check.value; + if (tooBig || tooSmall) { + ctx = this._getOrReturnCtx(input, ctx); + if (tooBig) { + addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: check.value, + type: "string", + inclusive: true, + exact: true, + message: check.message + }); + } else if (tooSmall) { + addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: check.value, + type: "string", + inclusive: true, + exact: true, + message: check.message + }); + } + status.dirty(); + } + } else if (check.kind === "email") { + if (!emailRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "email", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "emoji") { + if (!emojiRegex) { + emojiRegex = new RegExp(_emojiRegex, "u"); + } + if (!emojiRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "emoji", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "uuid") { + if (!uuidRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "uuid", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "nanoid") { + if (!nanoidRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "nanoid", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "cuid") { + if (!cuidRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "cuid", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "cuid2") { + if (!cuid2Regex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "cuid2", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "ulid") { + if (!ulidRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "ulid", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "url") { + try { + new URL(input.data); + } catch { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "url", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "regex") { + check.regex.lastIndex = 0; + const testResult = check.regex.test(input.data); + if (!testResult) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "regex", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "trim") { + input.data = input.data.trim(); + } else if (check.kind === "includes") { + if (!input.data.includes(check.value, check.position)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: { includes: check.value, position: check.position }, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "toLowerCase") { + input.data = input.data.toLowerCase(); + } else if (check.kind === "toUpperCase") { + input.data = input.data.toUpperCase(); + } else if (check.kind === "startsWith") { + if (!input.data.startsWith(check.value)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: { startsWith: check.value }, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "endsWith") { + if (!input.data.endsWith(check.value)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: { endsWith: check.value }, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "datetime") { + const regex3 = datetimeRegex(check); + if (!regex3.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: "datetime", + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "date") { + const regex3 = dateRegex; + if (!regex3.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: "date", + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "time") { + const regex3 = timeRegex(check); + if (!regex3.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: "time", + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "duration") { + if (!durationRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "duration", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "ip") { + if (!isValidIP(input.data, check.version)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "ip", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "jwt") { + if (!isValidJWT(input.data, check.alg)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "jwt", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "cidr") { + if (!isValidCidr(input.data, check.version)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "cidr", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "base64") { + if (!base64Regex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "base64", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "base64url") { + if (!base64urlRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "base64url", + code: ZodIssueCode.invalid_string, + message: check.message + }); + status.dirty(); + } + } else { + util.assertNever(check); + } + } + return { status: status.value, value: input.data }; + } + _regex(regex3, validation, message) { + return this.refinement((data) => regex3.test(data), { + validation, + code: ZodIssueCode.invalid_string, + ...errorUtil.errToObj(message) + }); + } + _addCheck(check) { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + email(message) { + return this._addCheck({ kind: "email", ...errorUtil.errToObj(message) }); + } + url(message) { + return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) }); + } + emoji(message) { + return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) }); + } + uuid(message) { + return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) }); + } + nanoid(message) { + return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message) }); + } + cuid(message) { + return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) }); + } + cuid2(message) { + return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) }); + } + ulid(message) { + return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) }); + } + base64(message) { + return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) }); + } + base64url(message) { + return this._addCheck({ + kind: "base64url", + ...errorUtil.errToObj(message) + }); + } + jwt(options) { + return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) }); + } + ip(options) { + return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) }); + } + cidr(options) { + return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) }); + } + datetime(options) { + if (typeof options === "string") { + return this._addCheck({ + kind: "datetime", + precision: null, + offset: false, + local: false, + message: options + }); + } + return this._addCheck({ + kind: "datetime", + precision: typeof options?.precision === "undefined" ? null : options?.precision, + offset: options?.offset ?? false, + local: options?.local ?? false, + ...errorUtil.errToObj(options?.message) + }); + } + date(message) { + return this._addCheck({ kind: "date", message }); + } + time(options) { + if (typeof options === "string") { + return this._addCheck({ + kind: "time", + precision: null, + message: options + }); + } + return this._addCheck({ + kind: "time", + precision: typeof options?.precision === "undefined" ? null : options?.precision, + ...errorUtil.errToObj(options?.message) + }); + } + duration(message) { + return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) }); + } + regex(regex3, message) { + return this._addCheck({ + kind: "regex", + regex: regex3, + ...errorUtil.errToObj(message) + }); + } + includes(value2, options) { + return this._addCheck({ + kind: "includes", + value: value2, + position: options?.position, + ...errorUtil.errToObj(options?.message) + }); + } + startsWith(value2, message) { + return this._addCheck({ + kind: "startsWith", + value: value2, + ...errorUtil.errToObj(message) + }); + } + endsWith(value2, message) { + return this._addCheck({ + kind: "endsWith", + value: value2, + ...errorUtil.errToObj(message) + }); + } + min(minLength, message) { + return this._addCheck({ + kind: "min", + value: minLength, + ...errorUtil.errToObj(message) + }); + } + max(maxLength, message) { + return this._addCheck({ + kind: "max", + value: maxLength, + ...errorUtil.errToObj(message) + }); + } + length(len, message) { + return this._addCheck({ + kind: "length", + value: len, + ...errorUtil.errToObj(message) + }); + } + /** + * Equivalent to `.min(1)` + */ + nonempty(message) { + return this.min(1, errorUtil.errToObj(message)); + } + trim() { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "trim" }] + }); + } + toLowerCase() { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "toLowerCase" }] + }); + } + toUpperCase() { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "toUpperCase" }] + }); + } + get isDatetime() { + return !!this._def.checks.find((ch) => ch.kind === "datetime"); + } + get isDate() { + return !!this._def.checks.find((ch) => ch.kind === "date"); + } + get isTime() { + return !!this._def.checks.find((ch) => ch.kind === "time"); + } + get isDuration() { + return !!this._def.checks.find((ch) => ch.kind === "duration"); + } + get isEmail() { + return !!this._def.checks.find((ch) => ch.kind === "email"); + } + get isURL() { + return !!this._def.checks.find((ch) => ch.kind === "url"); + } + get isEmoji() { + return !!this._def.checks.find((ch) => ch.kind === "emoji"); + } + get isUUID() { + return !!this._def.checks.find((ch) => ch.kind === "uuid"); + } + get isNANOID() { + return !!this._def.checks.find((ch) => ch.kind === "nanoid"); + } + get isCUID() { + return !!this._def.checks.find((ch) => ch.kind === "cuid"); + } + get isCUID2() { + return !!this._def.checks.find((ch) => ch.kind === "cuid2"); + } + get isULID() { + return !!this._def.checks.find((ch) => ch.kind === "ulid"); + } + get isIP() { + return !!this._def.checks.find((ch) => ch.kind === "ip"); + } + get isCIDR() { + return !!this._def.checks.find((ch) => ch.kind === "cidr"); + } + get isBase64() { + return !!this._def.checks.find((ch) => ch.kind === "base64"); + } + get isBase64url() { + return !!this._def.checks.find((ch) => ch.kind === "base64url"); + } + get minLength() { + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } + } + return min; + } + get maxLength() { + let max = null; + for (const ch of this._def.checks) { + if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return max; + } +}; +ZodString.create = (params) => { + return new ZodString({ + checks: [], + typeName: ZodFirstPartyTypeKind.ZodString, + coerce: params?.coerce ?? false, + ...processCreateParams(params) + }); +}; +function floatSafeRemainder(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepDecCount = (step.toString().split(".")[1] || "").length; + const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; + const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); + const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); + return valInt % stepInt / 10 ** decCount; +} +var ZodNumber = class _ZodNumber extends ZodType { + constructor() { + super(...arguments); + this.min = this.gte; + this.max = this.lte; + this.step = this.multipleOf; + } + _parse(input) { + if (this._def.coerce) { + input.data = Number(input.data); + } + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.number) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.number, + received: ctx2.parsedType + }); + return INVALID; + } + let ctx = void 0; + const status = new ParseStatus(); + for (const check of this._def.checks) { + if (check.kind === "int") { + if (!util.isInteger(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: "integer", + received: "float", + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "min") { + const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; + if (tooSmall) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: check.value, + type: "number", + inclusive: check.inclusive, + exact: false, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "max") { + const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; + if (tooBig) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: check.value, + type: "number", + inclusive: check.inclusive, + exact: false, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "multipleOf") { + if (floatSafeRemainder(input.data, check.value) !== 0) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.not_multiple_of, + multipleOf: check.value, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "finite") { + if (!Number.isFinite(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.not_finite, + message: check.message + }); + status.dirty(); + } + } else { + util.assertNever(check); + } + } + return { status: status.value, value: input.data }; + } + gte(value2, message) { + return this.setLimit("min", value2, true, errorUtil.toString(message)); + } + gt(value2, message) { + return this.setLimit("min", value2, false, errorUtil.toString(message)); + } + lte(value2, message) { + return this.setLimit("max", value2, true, errorUtil.toString(message)); + } + lt(value2, message) { + return this.setLimit("max", value2, false, errorUtil.toString(message)); + } + setLimit(kind, value2, inclusive, message) { + return new _ZodNumber({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind, + value: value2, + inclusive, + message: errorUtil.toString(message) + } + ] + }); + } + _addCheck(check) { + return new _ZodNumber({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + int(message) { + return this._addCheck({ + kind: "int", + message: errorUtil.toString(message) + }); + } + positive(message) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: false, + message: errorUtil.toString(message) + }); + } + negative(message) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: false, + message: errorUtil.toString(message) + }); + } + nonpositive(message) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: true, + message: errorUtil.toString(message) + }); + } + nonnegative(message) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: true, + message: errorUtil.toString(message) + }); + } + multipleOf(value2, message) { + return this._addCheck({ + kind: "multipleOf", + value: value2, + message: errorUtil.toString(message) + }); + } + finite(message) { + return this._addCheck({ + kind: "finite", + message: errorUtil.toString(message) + }); + } + safe(message) { + return this._addCheck({ + kind: "min", + inclusive: true, + value: Number.MIN_SAFE_INTEGER, + message: errorUtil.toString(message) + })._addCheck({ + kind: "max", + inclusive: true, + value: Number.MAX_SAFE_INTEGER, + message: errorUtil.toString(message) + }); + } + get minValue() { + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } + } + return min; + } + get maxValue() { + let max = null; + for (const ch of this._def.checks) { + if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return max; + } + get isInt() { + return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value)); + } + get isFinite() { + let max = null; + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") { + return true; + } else if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } else if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return Number.isFinite(min) && Number.isFinite(max); + } +}; +ZodNumber.create = (params) => { + return new ZodNumber({ + checks: [], + typeName: ZodFirstPartyTypeKind.ZodNumber, + coerce: params?.coerce || false, + ...processCreateParams(params) + }); +}; +var ZodBigInt = class _ZodBigInt extends ZodType { + constructor() { + super(...arguments); + this.min = this.gte; + this.max = this.lte; + } + _parse(input) { + if (this._def.coerce) { + try { + input.data = BigInt(input.data); + } catch { + return this._getInvalidInput(input); + } + } + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.bigint) { + return this._getInvalidInput(input); + } + let ctx = void 0; + const status = new ParseStatus(); + for (const check of this._def.checks) { + if (check.kind === "min") { + const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; + if (tooSmall) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + type: "bigint", + minimum: check.value, + inclusive: check.inclusive, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "max") { + const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; + if (tooBig) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + type: "bigint", + maximum: check.value, + inclusive: check.inclusive, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "multipleOf") { + if (input.data % check.value !== BigInt(0)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.not_multiple_of, + multipleOf: check.value, + message: check.message + }); + status.dirty(); + } + } else { + util.assertNever(check); + } + } + return { status: status.value, value: input.data }; + } + _getInvalidInput(input) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.bigint, + received: ctx.parsedType + }); + return INVALID; + } + gte(value2, message) { + return this.setLimit("min", value2, true, errorUtil.toString(message)); + } + gt(value2, message) { + return this.setLimit("min", value2, false, errorUtil.toString(message)); + } + lte(value2, message) { + return this.setLimit("max", value2, true, errorUtil.toString(message)); + } + lt(value2, message) { + return this.setLimit("max", value2, false, errorUtil.toString(message)); + } + setLimit(kind, value2, inclusive, message) { + return new _ZodBigInt({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind, + value: value2, + inclusive, + message: errorUtil.toString(message) + } + ] + }); + } + _addCheck(check) { + return new _ZodBigInt({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + positive(message) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: false, + message: errorUtil.toString(message) + }); + } + negative(message) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: false, + message: errorUtil.toString(message) + }); + } + nonpositive(message) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: true, + message: errorUtil.toString(message) + }); + } + nonnegative(message) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: true, + message: errorUtil.toString(message) + }); + } + multipleOf(value2, message) { + return this._addCheck({ + kind: "multipleOf", + value: value2, + message: errorUtil.toString(message) + }); + } + get minValue() { + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } + } + return min; + } + get maxValue() { + let max = null; + for (const ch of this._def.checks) { + if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return max; + } +}; +ZodBigInt.create = (params) => { + return new ZodBigInt({ + checks: [], + typeName: ZodFirstPartyTypeKind.ZodBigInt, + coerce: params?.coerce ?? false, + ...processCreateParams(params) + }); +}; +var ZodBoolean = class extends ZodType { + _parse(input) { + if (this._def.coerce) { + input.data = Boolean(input.data); + } + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.boolean) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.boolean, + received: ctx.parsedType + }); + return INVALID; + } + return OK(input.data); + } +}; +ZodBoolean.create = (params) => { + return new ZodBoolean({ + typeName: ZodFirstPartyTypeKind.ZodBoolean, + coerce: params?.coerce || false, + ...processCreateParams(params) + }); +}; +var ZodDate = class _ZodDate extends ZodType { + _parse(input) { + if (this._def.coerce) { + input.data = new Date(input.data); + } + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.date) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.date, + received: ctx2.parsedType + }); + return INVALID; + } + if (Number.isNaN(input.data.getTime())) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_date + }); + return INVALID; + } + const status = new ParseStatus(); + let ctx = void 0; + for (const check of this._def.checks) { + if (check.kind === "min") { + if (input.data.getTime() < check.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + message: check.message, + inclusive: true, + exact: false, + minimum: check.value, + type: "date" + }); + status.dirty(); + } + } else if (check.kind === "max") { + if (input.data.getTime() > check.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + message: check.message, + inclusive: true, + exact: false, + maximum: check.value, + type: "date" + }); + status.dirty(); + } + } else { + util.assertNever(check); + } + } + return { + status: status.value, + value: new Date(input.data.getTime()) + }; + } + _addCheck(check) { + return new _ZodDate({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + min(minDate, message) { + return this._addCheck({ + kind: "min", + value: minDate.getTime(), + message: errorUtil.toString(message) + }); + } + max(maxDate, message) { + return this._addCheck({ + kind: "max", + value: maxDate.getTime(), + message: errorUtil.toString(message) + }); + } + get minDate() { + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } + } + return min != null ? new Date(min) : null; + } + get maxDate() { + let max = null; + for (const ch of this._def.checks) { + if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return max != null ? new Date(max) : null; + } +}; +ZodDate.create = (params) => { + return new ZodDate({ + checks: [], + coerce: params?.coerce || false, + typeName: ZodFirstPartyTypeKind.ZodDate, + ...processCreateParams(params) + }); +}; +var ZodSymbol = class extends ZodType { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.symbol) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.symbol, + received: ctx.parsedType + }); + return INVALID; + } + return OK(input.data); + } +}; +ZodSymbol.create = (params) => { + return new ZodSymbol({ + typeName: ZodFirstPartyTypeKind.ZodSymbol, + ...processCreateParams(params) + }); +}; +var ZodUndefined = class extends ZodType { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.undefined) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.undefined, + received: ctx.parsedType + }); + return INVALID; + } + return OK(input.data); + } +}; +ZodUndefined.create = (params) => { + return new ZodUndefined({ + typeName: ZodFirstPartyTypeKind.ZodUndefined, + ...processCreateParams(params) + }); +}; +var ZodNull = class extends ZodType { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.null) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.null, + received: ctx.parsedType + }); + return INVALID; + } + return OK(input.data); + } +}; +ZodNull.create = (params) => { + return new ZodNull({ + typeName: ZodFirstPartyTypeKind.ZodNull, + ...processCreateParams(params) + }); +}; +var ZodAny = class extends ZodType { + constructor() { + super(...arguments); + this._any = true; + } + _parse(input) { + return OK(input.data); + } +}; +ZodAny.create = (params) => { + return new ZodAny({ + typeName: ZodFirstPartyTypeKind.ZodAny, + ...processCreateParams(params) + }); +}; +var ZodUnknown = class extends ZodType { + constructor() { + super(...arguments); + this._unknown = true; + } + _parse(input) { + return OK(input.data); + } +}; +ZodUnknown.create = (params) => { + return new ZodUnknown({ + typeName: ZodFirstPartyTypeKind.ZodUnknown, + ...processCreateParams(params) + }); +}; +var ZodNever = class extends ZodType { + _parse(input) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.never, + received: ctx.parsedType + }); + return INVALID; + } +}; +ZodNever.create = (params) => { + return new ZodNever({ + typeName: ZodFirstPartyTypeKind.ZodNever, + ...processCreateParams(params) + }); +}; +var ZodVoid = class extends ZodType { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.undefined) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.void, + received: ctx.parsedType + }); + return INVALID; + } + return OK(input.data); + } +}; +ZodVoid.create = (params) => { + return new ZodVoid({ + typeName: ZodFirstPartyTypeKind.ZodVoid, + ...processCreateParams(params) + }); +}; +var ZodArray = class _ZodArray extends ZodType { + _parse(input) { + const { ctx, status } = this._processInputParams(input); + const def = this._def; + if (ctx.parsedType !== ZodParsedType.array) { + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.array, + received: ctx.parsedType + }); + return INVALID; + } + if (def.exactLength !== null) { + const tooBig = ctx.data.length > def.exactLength.value; + const tooSmall = ctx.data.length < def.exactLength.value; + if (tooBig || tooSmall) { + addIssueToContext(ctx, { + code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small, + minimum: tooSmall ? def.exactLength.value : void 0, + maximum: tooBig ? def.exactLength.value : void 0, + type: "array", + inclusive: true, + exact: true, + message: def.exactLength.message + }); + status.dirty(); + } + } + if (def.minLength !== null) { + if (ctx.data.length < def.minLength.value) { + addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: def.minLength.value, + type: "array", + inclusive: true, + exact: false, + message: def.minLength.message + }); + status.dirty(); + } + } + if (def.maxLength !== null) { + if (ctx.data.length > def.maxLength.value) { + addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: def.maxLength.value, + type: "array", + inclusive: true, + exact: false, + message: def.maxLength.message + }); + status.dirty(); + } + } + if (ctx.common.async) { + return Promise.all([...ctx.data].map((item, i) => { + return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i)); + })).then((result2) => { + return ParseStatus.mergeArray(status, result2); + }); + } + const result = [...ctx.data].map((item, i) => { + return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i)); + }); + return ParseStatus.mergeArray(status, result); + } + get element() { + return this._def.type; + } + min(minLength, message) { + return new _ZodArray({ + ...this._def, + minLength: { value: minLength, message: errorUtil.toString(message) } + }); + } + max(maxLength, message) { + return new _ZodArray({ + ...this._def, + maxLength: { value: maxLength, message: errorUtil.toString(message) } + }); + } + length(len, message) { + return new _ZodArray({ + ...this._def, + exactLength: { value: len, message: errorUtil.toString(message) } + }); + } + nonempty(message) { + return this.min(1, message); + } +}; +ZodArray.create = (schema2, params) => { + return new ZodArray({ + type: schema2, + minLength: null, + maxLength: null, + exactLength: null, + typeName: ZodFirstPartyTypeKind.ZodArray, + ...processCreateParams(params) + }); +}; +function deepPartialify(schema2) { + if (schema2 instanceof ZodObject) { + const newShape = {}; + for (const key in schema2.shape) { + const fieldSchema = schema2.shape[key]; + newShape[key] = ZodOptional.create(deepPartialify(fieldSchema)); + } + return new ZodObject({ + ...schema2._def, + shape: () => newShape + }); + } else if (schema2 instanceof ZodArray) { + return new ZodArray({ + ...schema2._def, + type: deepPartialify(schema2.element) + }); + } else if (schema2 instanceof ZodOptional) { + return ZodOptional.create(deepPartialify(schema2.unwrap())); + } else if (schema2 instanceof ZodNullable) { + return ZodNullable.create(deepPartialify(schema2.unwrap())); + } else if (schema2 instanceof ZodTuple) { + return ZodTuple.create(schema2.items.map((item) => deepPartialify(item))); + } else { + return schema2; + } +} +var ZodObject = class _ZodObject extends ZodType { + constructor() { + super(...arguments); + this._cached = null; + this.nonstrict = this.passthrough; + this.augment = this.extend; + } + _getCached() { + if (this._cached !== null) + return this._cached; + const shape = this._def.shape(); + const keys = util.objectKeys(shape); + this._cached = { shape, keys }; + return this._cached; + } + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.object) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.object, + received: ctx2.parsedType + }); + return INVALID; + } + const { status, ctx } = this._processInputParams(input); + const { shape, keys: shapeKeys } = this._getCached(); + const extraKeys = []; + if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) { + for (const key in ctx.data) { + if (!shapeKeys.includes(key)) { + extraKeys.push(key); + } + } + } + const pairs = []; + for (const key of shapeKeys) { + const keyValidator = shape[key]; + const value2 = ctx.data[key]; + pairs.push({ + key: { status: "valid", value: key }, + value: keyValidator._parse(new ParseInputLazyPath(ctx, value2, ctx.path, key)), + alwaysSet: key in ctx.data + }); + } + if (this._def.catchall instanceof ZodNever) { + const unknownKeys = this._def.unknownKeys; + if (unknownKeys === "passthrough") { + for (const key of extraKeys) { + pairs.push({ + key: { status: "valid", value: key }, + value: { status: "valid", value: ctx.data[key] } + }); + } + } else if (unknownKeys === "strict") { + if (extraKeys.length > 0) { + addIssueToContext(ctx, { + code: ZodIssueCode.unrecognized_keys, + keys: extraKeys + }); + status.dirty(); + } + } else if (unknownKeys === "strip") { + } else { + throw new Error(`Internal ZodObject error: invalid unknownKeys value.`); + } + } else { + const catchall = this._def.catchall; + for (const key of extraKeys) { + const value2 = ctx.data[key]; + pairs.push({ + key: { status: "valid", value: key }, + value: catchall._parse( + new ParseInputLazyPath(ctx, value2, ctx.path, key) + //, ctx.child(key), value, getParsedType(value) + ), + alwaysSet: key in ctx.data + }); + } + } + if (ctx.common.async) { + return Promise.resolve().then(async () => { + const syncPairs = []; + for (const pair of pairs) { + const key = await pair.key; + const value2 = await pair.value; + syncPairs.push({ + key, + value: value2, + alwaysSet: pair.alwaysSet + }); + } + return syncPairs; + }).then((syncPairs) => { + return ParseStatus.mergeObjectSync(status, syncPairs); + }); + } else { + return ParseStatus.mergeObjectSync(status, pairs); + } + } + get shape() { + return this._def.shape(); + } + strict(message) { + errorUtil.errToObj; + return new _ZodObject({ + ...this._def, + unknownKeys: "strict", + ...message !== void 0 ? { + errorMap: (issue3, ctx) => { + const defaultError = this._def.errorMap?.(issue3, ctx).message ?? ctx.defaultError; + if (issue3.code === "unrecognized_keys") + return { + message: errorUtil.errToObj(message).message ?? defaultError + }; + return { + message: defaultError + }; + } + } : {} + }); + } + strip() { + return new _ZodObject({ + ...this._def, + unknownKeys: "strip" + }); + } + passthrough() { + return new _ZodObject({ + ...this._def, + unknownKeys: "passthrough" + }); + } + // const AugmentFactory = + // (def: Def) => + // ( + // augmentation: Augmentation + // ): ZodObject< + // extendShape, Augmentation>, + // Def["unknownKeys"], + // Def["catchall"] + // > => { + // return new ZodObject({ + // ...def, + // shape: () => ({ + // ...def.shape(), + // ...augmentation, + // }), + // }) as any; + // }; + extend(augmentation) { + return new _ZodObject({ + ...this._def, + shape: () => ({ + ...this._def.shape(), + ...augmentation + }) + }); + } + /** + * Prior to zod@1.0.12 there was a bug in the + * inferred type of merged objects. Please + * upgrade if you are experiencing issues. + */ + merge(merging) { + const merged = new _ZodObject({ + unknownKeys: merging._def.unknownKeys, + catchall: merging._def.catchall, + shape: () => ({ + ...this._def.shape(), + ...merging._def.shape() + }), + typeName: ZodFirstPartyTypeKind.ZodObject + }); + return merged; + } + // merge< + // Incoming extends AnyZodObject, + // Augmentation extends Incoming["shape"], + // NewOutput extends { + // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation + // ? Augmentation[k]["_output"] + // : k extends keyof Output + // ? Output[k] + // : never; + // }, + // NewInput extends { + // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation + // ? Augmentation[k]["_input"] + // : k extends keyof Input + // ? Input[k] + // : never; + // } + // >( + // merging: Incoming + // ): ZodObject< + // extendShape>, + // Incoming["_def"]["unknownKeys"], + // Incoming["_def"]["catchall"], + // NewOutput, + // NewInput + // > { + // const merged: any = new ZodObject({ + // unknownKeys: merging._def.unknownKeys, + // catchall: merging._def.catchall, + // shape: () => + // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), + // typeName: ZodFirstPartyTypeKind.ZodObject, + // }) as any; + // return merged; + // } + setKey(key, schema2) { + return this.augment({ [key]: schema2 }); + } + // merge( + // merging: Incoming + // ): //ZodObject = (merging) => { + // ZodObject< + // extendShape>, + // Incoming["_def"]["unknownKeys"], + // Incoming["_def"]["catchall"] + // > { + // // const mergedShape = objectUtil.mergeShapes( + // // this._def.shape(), + // // merging._def.shape() + // // ); + // const merged: any = new ZodObject({ + // unknownKeys: merging._def.unknownKeys, + // catchall: merging._def.catchall, + // shape: () => + // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), + // typeName: ZodFirstPartyTypeKind.ZodObject, + // }) as any; + // return merged; + // } + catchall(index) { + return new _ZodObject({ + ...this._def, + catchall: index + }); + } + pick(mask) { + const shape = {}; + for (const key of util.objectKeys(mask)) { + if (mask[key] && this.shape[key]) { + shape[key] = this.shape[key]; + } + } + return new _ZodObject({ + ...this._def, + shape: () => shape + }); + } + omit(mask) { + const shape = {}; + for (const key of util.objectKeys(this.shape)) { + if (!mask[key]) { + shape[key] = this.shape[key]; + } + } + return new _ZodObject({ + ...this._def, + shape: () => shape + }); + } + /** + * @deprecated + */ + deepPartial() { + return deepPartialify(this); + } + partial(mask) { + const newShape = {}; + for (const key of util.objectKeys(this.shape)) { + const fieldSchema = this.shape[key]; + if (mask && !mask[key]) { + newShape[key] = fieldSchema; + } else { + newShape[key] = fieldSchema.optional(); + } + } + return new _ZodObject({ + ...this._def, + shape: () => newShape + }); + } + required(mask) { + const newShape = {}; + for (const key of util.objectKeys(this.shape)) { + if (mask && !mask[key]) { + newShape[key] = this.shape[key]; + } else { + const fieldSchema = this.shape[key]; + let newField = fieldSchema; + while (newField instanceof ZodOptional) { + newField = newField._def.innerType; + } + newShape[key] = newField; + } + } + return new _ZodObject({ + ...this._def, + shape: () => newShape + }); + } + keyof() { + return createZodEnum(util.objectKeys(this.shape)); + } +}; +ZodObject.create = (shape, params) => { + return new ZodObject({ + shape: () => shape, + unknownKeys: "strip", + catchall: ZodNever.create(), + typeName: ZodFirstPartyTypeKind.ZodObject, + ...processCreateParams(params) + }); +}; +ZodObject.strictCreate = (shape, params) => { + return new ZodObject({ + shape: () => shape, + unknownKeys: "strict", + catchall: ZodNever.create(), + typeName: ZodFirstPartyTypeKind.ZodObject, + ...processCreateParams(params) + }); +}; +ZodObject.lazycreate = (shape, params) => { + return new ZodObject({ + shape, + unknownKeys: "strip", + catchall: ZodNever.create(), + typeName: ZodFirstPartyTypeKind.ZodObject, + ...processCreateParams(params) + }); +}; +var ZodUnion = class extends ZodType { + _parse(input) { + const { ctx } = this._processInputParams(input); + const options = this._def.options; + function handleResults(results) { + for (const result of results) { + if (result.result.status === "valid") { + return result.result; + } + } + for (const result of results) { + if (result.result.status === "dirty") { + ctx.common.issues.push(...result.ctx.common.issues); + return result.result; + } + } + const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues)); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_union, + unionErrors + }); + return INVALID; + } + if (ctx.common.async) { + return Promise.all(options.map(async (option) => { + const childCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + }, + parent: null + }; + return { + result: await option._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: childCtx + }), + ctx: childCtx + }; + })).then(handleResults); + } else { + let dirty = void 0; + const issues = []; + for (const option of options) { + const childCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + }, + parent: null + }; + const result = option._parseSync({ + data: ctx.data, + path: ctx.path, + parent: childCtx + }); + if (result.status === "valid") { + return result; + } else if (result.status === "dirty" && !dirty) { + dirty = { result, ctx: childCtx }; + } + if (childCtx.common.issues.length) { + issues.push(childCtx.common.issues); + } + } + if (dirty) { + ctx.common.issues.push(...dirty.ctx.common.issues); + return dirty.result; + } + const unionErrors = issues.map((issues2) => new ZodError(issues2)); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_union, + unionErrors + }); + return INVALID; + } + } + get options() { + return this._def.options; + } +}; +ZodUnion.create = (types, params) => { + return new ZodUnion({ + options: types, + typeName: ZodFirstPartyTypeKind.ZodUnion, + ...processCreateParams(params) + }); +}; +var getDiscriminator = (type2) => { + if (type2 instanceof ZodLazy) { + return getDiscriminator(type2.schema); + } else if (type2 instanceof ZodEffects) { + return getDiscriminator(type2.innerType()); + } else if (type2 instanceof ZodLiteral) { + return [type2.value]; + } else if (type2 instanceof ZodEnum) { + return type2.options; + } else if (type2 instanceof ZodNativeEnum) { + return util.objectValues(type2.enum); + } else if (type2 instanceof ZodDefault) { + return getDiscriminator(type2._def.innerType); + } else if (type2 instanceof ZodUndefined) { + return [void 0]; + } else if (type2 instanceof ZodNull) { + return [null]; + } else if (type2 instanceof ZodOptional) { + return [void 0, ...getDiscriminator(type2.unwrap())]; + } else if (type2 instanceof ZodNullable) { + return [null, ...getDiscriminator(type2.unwrap())]; + } else if (type2 instanceof ZodBranded) { + return getDiscriminator(type2.unwrap()); + } else if (type2 instanceof ZodReadonly) { + return getDiscriminator(type2.unwrap()); + } else if (type2 instanceof ZodCatch) { + return getDiscriminator(type2._def.innerType); + } else { + return []; + } +}; +var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType { + _parse(input) { + const { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.object) { + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.object, + received: ctx.parsedType + }); + return INVALID; + } + const discriminator = this.discriminator; + const discriminatorValue = ctx.data[discriminator]; + const option = this.optionsMap.get(discriminatorValue); + if (!option) { + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_union_discriminator, + options: Array.from(this.optionsMap.keys()), + path: [discriminator] + }); + return INVALID; + } + if (ctx.common.async) { + return option._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + } else { + return option._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + } + } + get discriminator() { + return this._def.discriminator; + } + get options() { + return this._def.options; + } + get optionsMap() { + return this._def.optionsMap; + } + /** + * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. + * However, it only allows a union of objects, all of which need to share a discriminator property. This property must + * have a different value for each object in the union. + * @param discriminator the name of the discriminator property + * @param types an array of object schemas + * @param params + */ + static create(discriminator, options, params) { + const optionsMap = /* @__PURE__ */ new Map(); + for (const type2 of options) { + const discriminatorValues = getDiscriminator(type2.shape[discriminator]); + if (!discriminatorValues.length) { + throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); + } + for (const value2 of discriminatorValues) { + if (optionsMap.has(value2)) { + throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value2)}`); + } + optionsMap.set(value2, type2); + } + } + return new _ZodDiscriminatedUnion({ + typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion, + discriminator, + options, + optionsMap, + ...processCreateParams(params) + }); + } +}; +function mergeValues(a, b) { + const aType = getParsedType(a); + const bType = getParsedType(b); + if (a === b) { + return { valid: true, data: a }; + } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) { + const bKeys = util.objectKeys(b); + const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a, ...b }; + for (const key of sharedKeys) { + const sharedValue = mergeValues(a[key], b[key]); + if (!sharedValue.valid) { + return { valid: false }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) { + if (a.length !== b.length) { + return { valid: false }; + } + const newArray = []; + for (let index = 0; index < a.length; index++) { + const itemA = a[index]; + const itemB = b[index]; + const sharedValue = mergeValues(itemA, itemB); + if (!sharedValue.valid) { + return { valid: false }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) { + return { valid: true, data: a }; + } else { + return { valid: false }; + } +} +var ZodIntersection = class extends ZodType { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + const handleParsed = (parsedLeft, parsedRight) => { + if (isAborted(parsedLeft) || isAborted(parsedRight)) { + return INVALID; + } + const merged = mergeValues(parsedLeft.value, parsedRight.value); + if (!merged.valid) { + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_intersection_types + }); + return INVALID; + } + if (isDirty(parsedLeft) || isDirty(parsedRight)) { + status.dirty(); + } + return { status: status.value, value: merged.data }; + }; + if (ctx.common.async) { + return Promise.all([ + this._def.left._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }), + this._def.right._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }) + ]).then(([left, right]) => handleParsed(left, right)); + } else { + return handleParsed(this._def.left._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }), this._def.right._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + })); + } + } +}; +ZodIntersection.create = (left, right, params) => { + return new ZodIntersection({ + left, + right, + typeName: ZodFirstPartyTypeKind.ZodIntersection, + ...processCreateParams(params) + }); +}; +var ZodTuple = class _ZodTuple extends ZodType { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.array) { + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.array, + received: ctx.parsedType + }); + return INVALID; + } + if (ctx.data.length < this._def.items.length) { + addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: this._def.items.length, + inclusive: true, + exact: false, + type: "array" + }); + return INVALID; + } + const rest = this._def.rest; + if (!rest && ctx.data.length > this._def.items.length) { + addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: this._def.items.length, + inclusive: true, + exact: false, + type: "array" + }); + status.dirty(); + } + const items = [...ctx.data].map((item, itemIndex) => { + const schema2 = this._def.items[itemIndex] || this._def.rest; + if (!schema2) + return null; + return schema2._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex)); + }).filter((x) => !!x); + if (ctx.common.async) { + return Promise.all(items).then((results) => { + return ParseStatus.mergeArray(status, results); + }); + } else { + return ParseStatus.mergeArray(status, items); + } + } + get items() { + return this._def.items; + } + rest(rest) { + return new _ZodTuple({ + ...this._def, + rest + }); + } +}; +ZodTuple.create = (schemas, params) => { + if (!Array.isArray(schemas)) { + throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); + } + return new ZodTuple({ + items: schemas, + typeName: ZodFirstPartyTypeKind.ZodTuple, + rest: null, + ...processCreateParams(params) + }); +}; +var ZodRecord = class _ZodRecord extends ZodType { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.object) { + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.object, + received: ctx.parsedType + }); + return INVALID; + } + const pairs = []; + const keyType = this._def.keyType; + const valueType = this._def.valueType; + for (const key in ctx.data) { + pairs.push({ + key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)), + value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)), + alwaysSet: key in ctx.data + }); + } + if (ctx.common.async) { + return ParseStatus.mergeObjectAsync(status, pairs); + } else { + return ParseStatus.mergeObjectSync(status, pairs); + } + } + get element() { + return this._def.valueType; + } + static create(first, second, third) { + if (second instanceof ZodType) { + return new _ZodRecord({ + keyType: first, + valueType: second, + typeName: ZodFirstPartyTypeKind.ZodRecord, + ...processCreateParams(third) + }); + } + return new _ZodRecord({ + keyType: ZodString.create(), + valueType: first, + typeName: ZodFirstPartyTypeKind.ZodRecord, + ...processCreateParams(second) + }); + } +}; +var ZodMap = class extends ZodType { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.map) { + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.map, + received: ctx.parsedType + }); + return INVALID; + } + const keyType = this._def.keyType; + const valueType = this._def.valueType; + const pairs = [...ctx.data.entries()].map(([key, value2], index) => { + return { + key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])), + value: valueType._parse(new ParseInputLazyPath(ctx, value2, ctx.path, [index, "value"])) + }; + }); + if (ctx.common.async) { + const finalMap = /* @__PURE__ */ new Map(); + return Promise.resolve().then(async () => { + for (const pair of pairs) { + const key = await pair.key; + const value2 = await pair.value; + if (key.status === "aborted" || value2.status === "aborted") { + return INVALID; + } + if (key.status === "dirty" || value2.status === "dirty") { + status.dirty(); + } + finalMap.set(key.value, value2.value); + } + return { status: status.value, value: finalMap }; + }); + } else { + const finalMap = /* @__PURE__ */ new Map(); + for (const pair of pairs) { + const key = pair.key; + const value2 = pair.value; + if (key.status === "aborted" || value2.status === "aborted") { + return INVALID; + } + if (key.status === "dirty" || value2.status === "dirty") { + status.dirty(); + } + finalMap.set(key.value, value2.value); + } + return { status: status.value, value: finalMap }; + } + } +}; +ZodMap.create = (keyType, valueType, params) => { + return new ZodMap({ + valueType, + keyType, + typeName: ZodFirstPartyTypeKind.ZodMap, + ...processCreateParams(params) + }); +}; +var ZodSet = class _ZodSet extends ZodType { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.set) { + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.set, + received: ctx.parsedType + }); + return INVALID; + } + const def = this._def; + if (def.minSize !== null) { + if (ctx.data.size < def.minSize.value) { + addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: def.minSize.value, + type: "set", + inclusive: true, + exact: false, + message: def.minSize.message + }); + status.dirty(); + } + } + if (def.maxSize !== null) { + if (ctx.data.size > def.maxSize.value) { + addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: def.maxSize.value, + type: "set", + inclusive: true, + exact: false, + message: def.maxSize.message + }); + status.dirty(); + } + } + const valueType = this._def.valueType; + function finalizeSet(elements2) { + const parsedSet = /* @__PURE__ */ new Set(); + for (const element of elements2) { + if (element.status === "aborted") + return INVALID; + if (element.status === "dirty") + status.dirty(); + parsedSet.add(element.value); + } + return { status: status.value, value: parsedSet }; + } + const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i))); + if (ctx.common.async) { + return Promise.all(elements).then((elements2) => finalizeSet(elements2)); + } else { + return finalizeSet(elements); + } + } + min(minSize, message) { + return new _ZodSet({ + ...this._def, + minSize: { value: minSize, message: errorUtil.toString(message) } + }); + } + max(maxSize, message) { + return new _ZodSet({ + ...this._def, + maxSize: { value: maxSize, message: errorUtil.toString(message) } + }); + } + size(size, message) { + return this.min(size, message).max(size, message); + } + nonempty(message) { + return this.min(1, message); + } +}; +ZodSet.create = (valueType, params) => { + return new ZodSet({ + valueType, + minSize: null, + maxSize: null, + typeName: ZodFirstPartyTypeKind.ZodSet, + ...processCreateParams(params) + }); +}; +var ZodFunction = class _ZodFunction extends ZodType { + constructor() { + super(...arguments); + this.validate = this.implement; + } + _parse(input) { + const { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.function) { + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.function, + received: ctx.parsedType + }); + return INVALID; + } + function makeArgsIssue(args2, error42) { + return makeIssue({ + data: args2, + path: ctx.path, + errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x), + issueData: { + code: ZodIssueCode.invalid_arguments, + argumentsError: error42 + } + }); + } + function makeReturnsIssue(returns, error42) { + return makeIssue({ + data: returns, + path: ctx.path, + errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x), + issueData: { + code: ZodIssueCode.invalid_return_type, + returnTypeError: error42 + } + }); + } + const params = { errorMap: ctx.common.contextualErrorMap }; + const fn2 = ctx.data; + if (this._def.returns instanceof ZodPromise) { + const me = this; + return OK(async function(...args2) { + const error42 = new ZodError([]); + const parsedArgs = await me._def.args.parseAsync(args2, params).catch((e) => { + error42.addIssue(makeArgsIssue(args2, e)); + throw error42; + }); + const result = await Reflect.apply(fn2, this, parsedArgs); + const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => { + error42.addIssue(makeReturnsIssue(result, e)); + throw error42; + }); + return parsedReturns; + }); + } else { + const me = this; + return OK(function(...args2) { + const parsedArgs = me._def.args.safeParse(args2, params); + if (!parsedArgs.success) { + throw new ZodError([makeArgsIssue(args2, parsedArgs.error)]); + } + const result = Reflect.apply(fn2, this, parsedArgs.data); + const parsedReturns = me._def.returns.safeParse(result, params); + if (!parsedReturns.success) { + throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]); + } + return parsedReturns.data; + }); + } + } + parameters() { + return this._def.args; + } + returnType() { + return this._def.returns; + } + args(...items) { + return new _ZodFunction({ + ...this._def, + args: ZodTuple.create(items).rest(ZodUnknown.create()) + }); + } + returns(returnType) { + return new _ZodFunction({ + ...this._def, + returns: returnType + }); + } + implement(func) { + const validatedFunc = this.parse(func); + return validatedFunc; + } + strictImplement(func) { + const validatedFunc = this.parse(func); + return validatedFunc; + } + static create(args2, returns, params) { + return new _ZodFunction({ + args: args2 ? args2 : ZodTuple.create([]).rest(ZodUnknown.create()), + returns: returns || ZodUnknown.create(), + typeName: ZodFirstPartyTypeKind.ZodFunction, + ...processCreateParams(params) + }); + } +}; +var ZodLazy = class extends ZodType { + get schema() { + return this._def.getter(); + } + _parse(input) { + const { ctx } = this._processInputParams(input); + const lazySchema = this._def.getter(); + return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx }); + } +}; +ZodLazy.create = (getter, params) => { + return new ZodLazy({ + getter, + typeName: ZodFirstPartyTypeKind.ZodLazy, + ...processCreateParams(params) + }); +}; +var ZodLiteral = class extends ZodType { + _parse(input) { + if (input.data !== this._def.value) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + received: ctx.data, + code: ZodIssueCode.invalid_literal, + expected: this._def.value + }); + return INVALID; + } + return { status: "valid", value: input.data }; + } + get value() { + return this._def.value; + } +}; +ZodLiteral.create = (value2, params) => { + return new ZodLiteral({ + value: value2, + typeName: ZodFirstPartyTypeKind.ZodLiteral, + ...processCreateParams(params) + }); +}; +function createZodEnum(values, params) { + return new ZodEnum({ + values, + typeName: ZodFirstPartyTypeKind.ZodEnum, + ...processCreateParams(params) + }); +} +var ZodEnum = class _ZodEnum extends ZodType { + _parse(input) { + if (typeof input.data !== "string") { + const ctx = this._getOrReturnCtx(input); + const expectedValues = this._def.values; + addIssueToContext(ctx, { + expected: util.joinValues(expectedValues), + received: ctx.parsedType, + code: ZodIssueCode.invalid_type + }); + return INVALID; + } + if (!this._cache) { + this._cache = new Set(this._def.values); + } + if (!this._cache.has(input.data)) { + const ctx = this._getOrReturnCtx(input); + const expectedValues = this._def.values; + addIssueToContext(ctx, { + received: ctx.data, + code: ZodIssueCode.invalid_enum_value, + options: expectedValues + }); + return INVALID; + } + return OK(input.data); + } + get options() { + return this._def.values; + } + get enum() { + const enumValues2 = {}; + for (const val of this._def.values) { + enumValues2[val] = val; + } + return enumValues2; + } + get Values() { + const enumValues2 = {}; + for (const val of this._def.values) { + enumValues2[val] = val; + } + return enumValues2; + } + get Enum() { + const enumValues2 = {}; + for (const val of this._def.values) { + enumValues2[val] = val; + } + return enumValues2; + } + extract(values, newDef = this._def) { + return _ZodEnum.create(values, { + ...this._def, + ...newDef + }); + } + exclude(values, newDef = this._def) { + return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), { + ...this._def, + ...newDef + }); + } +}; +ZodEnum.create = createZodEnum; +var ZodNativeEnum = class extends ZodType { + _parse(input) { + const nativeEnumValues = util.getValidEnumValues(this._def.values); + const ctx = this._getOrReturnCtx(input); + if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) { + const expectedValues = util.objectValues(nativeEnumValues); + addIssueToContext(ctx, { + expected: util.joinValues(expectedValues), + received: ctx.parsedType, + code: ZodIssueCode.invalid_type + }); + return INVALID; + } + if (!this._cache) { + this._cache = new Set(util.getValidEnumValues(this._def.values)); + } + if (!this._cache.has(input.data)) { + const expectedValues = util.objectValues(nativeEnumValues); + addIssueToContext(ctx, { + received: ctx.data, + code: ZodIssueCode.invalid_enum_value, + options: expectedValues + }); + return INVALID; + } + return OK(input.data); + } + get enum() { + return this._def.values; + } +}; +ZodNativeEnum.create = (values, params) => { + return new ZodNativeEnum({ + values, + typeName: ZodFirstPartyTypeKind.ZodNativeEnum, + ...processCreateParams(params) + }); +}; +var ZodPromise = class extends ZodType { + unwrap() { + return this._def.type; + } + _parse(input) { + const { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) { + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.promise, + received: ctx.parsedType + }); + return INVALID; + } + const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data); + return OK(promisified.then((data) => { + return this._def.type.parseAsync(data, { + path: ctx.path, + errorMap: ctx.common.contextualErrorMap + }); + })); + } +}; +ZodPromise.create = (schema2, params) => { + return new ZodPromise({ + type: schema2, + typeName: ZodFirstPartyTypeKind.ZodPromise, + ...processCreateParams(params) + }); +}; +var ZodEffects = class extends ZodType { + innerType() { + return this._def.schema; + } + sourceType() { + return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema; + } + _parse(input) { + const { status, ctx } = this._processInputParams(input); + const effect = this._def.effect || null; + const checkCtx = { + addIssue: (arg) => { + addIssueToContext(ctx, arg); + if (arg.fatal) { + status.abort(); + } else { + status.dirty(); + } + }, + get path() { + return ctx.path; + } + }; + checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx); + if (effect.type === "preprocess") { + const processed = effect.transform(ctx.data, checkCtx); + if (ctx.common.async) { + return Promise.resolve(processed).then(async (processed2) => { + if (status.value === "aborted") + return INVALID; + const result = await this._def.schema._parseAsync({ + data: processed2, + path: ctx.path, + parent: ctx + }); + if (result.status === "aborted") + return INVALID; + if (result.status === "dirty") + return DIRTY(result.value); + if (status.value === "dirty") + return DIRTY(result.value); + return result; + }); + } else { + if (status.value === "aborted") + return INVALID; + const result = this._def.schema._parseSync({ + data: processed, + path: ctx.path, + parent: ctx + }); + if (result.status === "aborted") + return INVALID; + if (result.status === "dirty") + return DIRTY(result.value); + if (status.value === "dirty") + return DIRTY(result.value); + return result; + } + } + if (effect.type === "refinement") { + const executeRefinement = (acc) => { + const result = effect.refinement(acc, checkCtx); + if (ctx.common.async) { + return Promise.resolve(result); + } + if (result instanceof Promise) { + throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); + } + return acc; + }; + if (ctx.common.async === false) { + const inner = this._def.schema._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (inner.status === "aborted") + return INVALID; + if (inner.status === "dirty") + status.dirty(); + executeRefinement(inner.value); + return { status: status.value, value: inner.value }; + } else { + return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => { + if (inner.status === "aborted") + return INVALID; + if (inner.status === "dirty") + status.dirty(); + return executeRefinement(inner.value).then(() => { + return { status: status.value, value: inner.value }; + }); + }); + } + } + if (effect.type === "transform") { + if (ctx.common.async === false) { + const base = this._def.schema._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (!isValid(base)) + return INVALID; + const result = effect.transform(base.value, checkCtx); + if (result instanceof Promise) { + throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`); + } + return { status: status.value, value: result }; + } else { + return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => { + if (!isValid(base)) + return INVALID; + return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ + status: status.value, + value: result + })); + }); + } + } + util.assertNever(effect); + } +}; +ZodEffects.create = (schema2, effect, params) => { + return new ZodEffects({ + schema: schema2, + typeName: ZodFirstPartyTypeKind.ZodEffects, + effect, + ...processCreateParams(params) + }); +}; +ZodEffects.createWithPreprocess = (preprocess, schema2, params) => { + return new ZodEffects({ + schema: schema2, + effect: { type: "preprocess", transform: preprocess }, + typeName: ZodFirstPartyTypeKind.ZodEffects, + ...processCreateParams(params) + }); +}; +var ZodOptional = class extends ZodType { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 === ZodParsedType.undefined) { + return OK(void 0); + } + return this._def.innerType._parse(input); + } + unwrap() { + return this._def.innerType; + } +}; +ZodOptional.create = (type2, params) => { + return new ZodOptional({ + innerType: type2, + typeName: ZodFirstPartyTypeKind.ZodOptional, + ...processCreateParams(params) + }); +}; +var ZodNullable = class extends ZodType { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 === ZodParsedType.null) { + return OK(null); + } + return this._def.innerType._parse(input); + } + unwrap() { + return this._def.innerType; + } +}; +ZodNullable.create = (type2, params) => { + return new ZodNullable({ + innerType: type2, + typeName: ZodFirstPartyTypeKind.ZodNullable, + ...processCreateParams(params) + }); +}; +var ZodDefault = class extends ZodType { + _parse(input) { + const { ctx } = this._processInputParams(input); + let data = ctx.data; + if (ctx.parsedType === ZodParsedType.undefined) { + data = this._def.defaultValue(); + } + return this._def.innerType._parse({ + data, + path: ctx.path, + parent: ctx + }); + } + removeDefault() { + return this._def.innerType; + } +}; +ZodDefault.create = (type2, params) => { + return new ZodDefault({ + innerType: type2, + typeName: ZodFirstPartyTypeKind.ZodDefault, + defaultValue: typeof params.default === "function" ? params.default : () => params.default, + ...processCreateParams(params) + }); +}; +var ZodCatch = class extends ZodType { + _parse(input) { + const { ctx } = this._processInputParams(input); + const newCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + } + }; + const result = this._def.innerType._parse({ + data: newCtx.data, + path: newCtx.path, + parent: { + ...newCtx + } + }); + if (isAsync(result)) { + return result.then((result2) => { + return { + status: "valid", + value: result2.status === "valid" ? result2.value : this._def.catchValue({ + get error() { + return new ZodError(newCtx.common.issues); + }, + input: newCtx.data + }) + }; + }); + } else { + return { + status: "valid", + value: result.status === "valid" ? result.value : this._def.catchValue({ + get error() { + return new ZodError(newCtx.common.issues); + }, + input: newCtx.data + }) + }; + } + } + removeCatch() { + return this._def.innerType; + } +}; +ZodCatch.create = (type2, params) => { + return new ZodCatch({ + innerType: type2, + typeName: ZodFirstPartyTypeKind.ZodCatch, + catchValue: typeof params.catch === "function" ? params.catch : () => params.catch, + ...processCreateParams(params) + }); +}; +var ZodNaN = class extends ZodType { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.nan) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.nan, + received: ctx.parsedType + }); + return INVALID; + } + return { status: "valid", value: input.data }; + } +}; +ZodNaN.create = (params) => { + return new ZodNaN({ + typeName: ZodFirstPartyTypeKind.ZodNaN, + ...processCreateParams(params) + }); +}; +var BRAND = Symbol("zod_brand"); +var ZodBranded = class extends ZodType { + _parse(input) { + const { ctx } = this._processInputParams(input); + const data = ctx.data; + return this._def.type._parse({ + data, + path: ctx.path, + parent: ctx + }); + } + unwrap() { + return this._def.type; + } +}; +var ZodPipeline = class _ZodPipeline extends ZodType { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.common.async) { + const handleAsync = async () => { + const inResult = await this._def.in._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (inResult.status === "aborted") + return INVALID; + if (inResult.status === "dirty") { + status.dirty(); + return DIRTY(inResult.value); + } else { + return this._def.out._parseAsync({ + data: inResult.value, + path: ctx.path, + parent: ctx + }); + } + }; + return handleAsync(); + } else { + const inResult = this._def.in._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (inResult.status === "aborted") + return INVALID; + if (inResult.status === "dirty") { + status.dirty(); + return { + status: "dirty", + value: inResult.value + }; + } else { + return this._def.out._parseSync({ + data: inResult.value, + path: ctx.path, + parent: ctx + }); + } + } + } + static create(a, b) { + return new _ZodPipeline({ + in: a, + out: b, + typeName: ZodFirstPartyTypeKind.ZodPipeline + }); + } +}; +var ZodReadonly = class extends ZodType { + _parse(input) { + const result = this._def.innerType._parse(input); + const freeze = (data) => { + if (isValid(data)) { + data.value = Object.freeze(data.value); + } + return data; + }; + return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result); + } + unwrap() { + return this._def.innerType; + } +}; +ZodReadonly.create = (type2, params) => { + return new ZodReadonly({ + innerType: type2, + typeName: ZodFirstPartyTypeKind.ZodReadonly, + ...processCreateParams(params) + }); +}; +function cleanParams(params, data) { + const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params; + const p2 = typeof p === "string" ? { message: p } : p; + return p2; +} +function custom(check, _params = {}, fatal) { + if (check) + return ZodAny.create().superRefine((data, ctx) => { + const r = check(data); + if (r instanceof Promise) { + return r.then((r2) => { + if (!r2) { + const params = cleanParams(_params, data); + const _fatal = params.fatal ?? fatal ?? true; + ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); + } + }); + } + if (!r) { + const params = cleanParams(_params, data); + const _fatal = params.fatal ?? fatal ?? true; + ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); + } + return; + }); + return ZodAny.create(); +} +var late = { + object: ZodObject.lazycreate +}; +var ZodFirstPartyTypeKind; +(function(ZodFirstPartyTypeKind4) { + ZodFirstPartyTypeKind4["ZodString"] = "ZodString"; + ZodFirstPartyTypeKind4["ZodNumber"] = "ZodNumber"; + ZodFirstPartyTypeKind4["ZodNaN"] = "ZodNaN"; + ZodFirstPartyTypeKind4["ZodBigInt"] = "ZodBigInt"; + ZodFirstPartyTypeKind4["ZodBoolean"] = "ZodBoolean"; + ZodFirstPartyTypeKind4["ZodDate"] = "ZodDate"; + ZodFirstPartyTypeKind4["ZodSymbol"] = "ZodSymbol"; + ZodFirstPartyTypeKind4["ZodUndefined"] = "ZodUndefined"; + ZodFirstPartyTypeKind4["ZodNull"] = "ZodNull"; + ZodFirstPartyTypeKind4["ZodAny"] = "ZodAny"; + ZodFirstPartyTypeKind4["ZodUnknown"] = "ZodUnknown"; + ZodFirstPartyTypeKind4["ZodNever"] = "ZodNever"; + ZodFirstPartyTypeKind4["ZodVoid"] = "ZodVoid"; + ZodFirstPartyTypeKind4["ZodArray"] = "ZodArray"; + ZodFirstPartyTypeKind4["ZodObject"] = "ZodObject"; + ZodFirstPartyTypeKind4["ZodUnion"] = "ZodUnion"; + ZodFirstPartyTypeKind4["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion"; + ZodFirstPartyTypeKind4["ZodIntersection"] = "ZodIntersection"; + ZodFirstPartyTypeKind4["ZodTuple"] = "ZodTuple"; + ZodFirstPartyTypeKind4["ZodRecord"] = "ZodRecord"; + ZodFirstPartyTypeKind4["ZodMap"] = "ZodMap"; + ZodFirstPartyTypeKind4["ZodSet"] = "ZodSet"; + ZodFirstPartyTypeKind4["ZodFunction"] = "ZodFunction"; + ZodFirstPartyTypeKind4["ZodLazy"] = "ZodLazy"; + ZodFirstPartyTypeKind4["ZodLiteral"] = "ZodLiteral"; + ZodFirstPartyTypeKind4["ZodEnum"] = "ZodEnum"; + ZodFirstPartyTypeKind4["ZodEffects"] = "ZodEffects"; + ZodFirstPartyTypeKind4["ZodNativeEnum"] = "ZodNativeEnum"; + ZodFirstPartyTypeKind4["ZodOptional"] = "ZodOptional"; + ZodFirstPartyTypeKind4["ZodNullable"] = "ZodNullable"; + ZodFirstPartyTypeKind4["ZodDefault"] = "ZodDefault"; + ZodFirstPartyTypeKind4["ZodCatch"] = "ZodCatch"; + ZodFirstPartyTypeKind4["ZodPromise"] = "ZodPromise"; + ZodFirstPartyTypeKind4["ZodBranded"] = "ZodBranded"; + ZodFirstPartyTypeKind4["ZodPipeline"] = "ZodPipeline"; + ZodFirstPartyTypeKind4["ZodReadonly"] = "ZodReadonly"; +})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); +var instanceOfType = (cls, params = { + message: `Input not instance of ${cls.name}` +}) => custom((data) => data instanceof cls, params); +var stringType = ZodString.create; +var numberType = ZodNumber.create; +var nanType = ZodNaN.create; +var bigIntType = ZodBigInt.create; +var booleanType = ZodBoolean.create; +var dateType = ZodDate.create; +var symbolType = ZodSymbol.create; +var undefinedType = ZodUndefined.create; +var nullType = ZodNull.create; +var anyType = ZodAny.create; +var unknownType = ZodUnknown.create; +var neverType = ZodNever.create; +var voidType = ZodVoid.create; +var arrayType = ZodArray.create; +var objectType = ZodObject.create; +var strictObjectType = ZodObject.strictCreate; +var unionType = ZodUnion.create; +var discriminatedUnionType = ZodDiscriminatedUnion.create; +var intersectionType = ZodIntersection.create; +var tupleType = ZodTuple.create; +var recordType = ZodRecord.create; +var mapType = ZodMap.create; +var setType = ZodSet.create; +var functionType = ZodFunction.create; +var lazyType = ZodLazy.create; +var literalType = ZodLiteral.create; +var enumType = ZodEnum.create; +var nativeEnumType = ZodNativeEnum.create; +var promiseType = ZodPromise.create; +var effectsType = ZodEffects.create; +var optionalType = ZodOptional.create; +var nullableType = ZodNullable.create; +var preprocessType = ZodEffects.createWithPreprocess; +var pipelineType = ZodPipeline.create; +var ostring = () => stringType().optional(); +var onumber = () => numberType().optional(); +var oboolean = () => booleanType().optional(); +var coerce = { + string: ((arg) => ZodString.create({ ...arg, coerce: true })), + number: ((arg) => ZodNumber.create({ ...arg, coerce: true })), + boolean: ((arg) => ZodBoolean.create({ + ...arg, + coerce: true + })), + bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })), + date: ((arg) => ZodDate.create({ ...arg, coerce: true })) +}; +var NEVER = INVALID; + // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js -init_zod(); var LATEST_PROTOCOL_VERSION = "2025-06-18"; var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-03-26", "2024-11-05", "2024-10-07"]; var JSONRPC_VERSION = "2.0"; @@ -66158,9 +67015,9 @@ var Protocol = class { this._onclose(); }; const _onerror = (_b = this.transport) === null || _b === void 0 ? void 0 : _b.onerror; - this._transport.onerror = (error41) => { - _onerror === null || _onerror === void 0 ? void 0 : _onerror(error41); - this._onerror(error41); + this._transport.onerror = (error42) => { + _onerror === null || _onerror === void 0 ? void 0 : _onerror(error42); + this._onerror(error42); }; const _onmessage = (_c = this._transport) === null || _c === void 0 ? void 0 : _c.onmessage; this._transport.onmessage = (message, extra) => { @@ -66185,14 +67042,14 @@ var Protocol = class { this._pendingDebouncedNotifications.clear(); this._transport = void 0; (_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this); - const error41 = new McpError(ErrorCode.ConnectionClosed, "Connection closed"); + const error42 = new McpError(ErrorCode.ConnectionClosed, "Connection closed"); for (const handler2 of responseHandlers.values()) { - handler2(error41); + handler2(error42); } } - _onerror(error41) { + _onerror(error42) { var _a; - (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error41); + (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error42); } _onnotification(notification) { var _a; @@ -66200,7 +67057,7 @@ var Protocol = class { if (handler2 === void 0) { return; } - Promise.resolve().then(() => handler2(notification)).catch((error41) => this._onerror(new Error(`Uncaught error in notification handler: ${error41}`))); + Promise.resolve().then(() => handler2(notification)).catch((error42) => this._onerror(new Error(`Uncaught error in notification handler: ${error42}`))); } _onrequest(request2, extra) { var _a, _b; @@ -66214,7 +67071,7 @@ var Protocol = class { code: ErrorCode.MethodNotFound, message: "Method not found" } - }).catch((error41) => this._onerror(new Error(`Failed to send an error response: ${error41}`))); + }).catch((error42) => this._onerror(new Error(`Failed to send an error response: ${error42}`))); return; } const abortController = new AbortController(); @@ -66238,7 +67095,7 @@ var Protocol = class { jsonrpc: "2.0", id: request2.id }); - }, (error41) => { + }, (error42) => { var _a2; if (abortController.signal.aborted) { return; @@ -66247,11 +67104,11 @@ var Protocol = class { jsonrpc: "2.0", id: request2.id, error: { - code: Number.isSafeInteger(error41["code"]) ? error41["code"] : ErrorCode.InternalError, - message: (_a2 = error41.message) !== null && _a2 !== void 0 ? _a2 : "Internal error" + code: Number.isSafeInteger(error42["code"]) ? error42["code"] : ErrorCode.InternalError, + message: (_a2 = error42.message) !== null && _a2 !== void 0 ? _a2 : "Internal error" } }); - }).catch((error41) => this._onerror(new Error(`Failed to send response: ${error41}`))).finally(() => { + }).catch((error42) => this._onerror(new Error(`Failed to send response: ${error42}`))).finally(() => { this._requestHandlerAbortControllers.delete(request2.id); }); } @@ -66268,8 +67125,8 @@ var Protocol = class { if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) { try { this._resetTimeout(messageId); - } catch (error41) { - responseHandler(error41); + } catch (error42) { + responseHandler(error42); return; } } @@ -66288,8 +67145,8 @@ var Protocol = class { if (isJSONRPCResponse(response)) { handler2(response); } else { - const error41 = new McpError(response.error.code, response.error.message, response.error.data); - handler2(error41); + const error42 = new McpError(response.error.code, response.error.message, response.error.data); + handler2(error42); } } get transport() { @@ -66347,7 +67204,7 @@ var Protocol = class { requestId: messageId, reason: String(reason) } - }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error41) => this._onerror(new Error(`Failed to send cancellation: ${error41}`))); + }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error42) => this._onerror(new Error(`Failed to send cancellation: ${error42}`))); reject(reason); }; this._responseHandlers.set(messageId, (response) => { @@ -66361,8 +67218,8 @@ var Protocol = class { try { const result = resultSchema.parse(response.result); resolve(result); - } catch (error41) { - reject(error41); + } catch (error42) { + reject(error42); } }); (_d = options === null || options === void 0 ? void 0 : options.signal) === null || _d === void 0 ? void 0 : _d.addEventListener("abort", () => { @@ -66372,9 +67229,9 @@ var Protocol = class { const timeout = (_e = options === null || options === void 0 ? void 0 : options.timeout) !== null && _e !== void 0 ? _e : DEFAULT_REQUEST_TIMEOUT_MSEC; const timeoutHandler = () => cancel(new McpError(ErrorCode.RequestTimeout, "Request timed out", { timeout })); this._setupTimeout(messageId, timeout, options === null || options === void 0 ? void 0 : options.maxTotalTimeout, timeoutHandler, (_f = options === null || options === void 0 ? void 0 : options.resetTimeoutOnProgress) !== null && _f !== void 0 ? _f : false); - this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error41) => { + this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error42) => { this._cleanupTimeout(messageId); - reject(error41); + reject(error42); }); }); } @@ -66404,7 +67261,7 @@ var Protocol = class { ...notification, jsonrpc: "2.0" }; - (_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send(jsonrpcNotification2, options).catch((error41) => this._onerror(error41)); + (_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send(jsonrpcNotification2, options).catch((error42) => this._onerror(error42)); }); return; } @@ -66643,11 +67500,11 @@ var Server = class extends Protocol { if (!isValid3) { throw new McpError(ErrorCode.InvalidParams, `Elicitation response content does not match requested schema: ${ajv.errorsText(validate2.errors)}`); } - } catch (error41) { - if (error41 instanceof McpError) { - throw error41; + } catch (error42) { + if (error42 instanceof McpError) { + throw error42; } - throw new McpError(ErrorCode.InternalError, `Error validating elicitation response: ${error41}`); + throw new McpError(ErrorCode.InternalError, `Error validating elicitation response: ${error42}`); } } return result; @@ -66730,9 +67587,9 @@ var StdioServerTransport = class { this._readBuffer.append(chunk); this.processReadBuffer(); }; - this._onerror = (error41) => { + this._onerror = (error42) => { var _a; - (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error41); + (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error42); }; } /** @@ -66755,8 +67612,8 @@ var StdioServerTransport = class { break; } (_a = this.onmessage) === null || _a === void 0 ? void 0 : _a.call(this, message); - } catch (error41) { - (_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error41); + } catch (error42) { + (_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error42); } } } @@ -68135,8 +68992,8 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__ }) : target, mod)); var __require2 = /* @__PURE__ */ createRequire(import.meta.url); var AuthenticationMiddleware = class { - constructor(config2 = {}) { - this.config = config2; + constructor(config3 = {}) { + this.config = config3; } getUnauthorizedResponse() { const headers = { "Content-Type": "application/json" }; @@ -68244,10 +69101,10 @@ var util$6; for (const item of arr) if (checker(item)) return item; }; util$7.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; - function joinValues2(array, separator2 = " | ") { + function joinValues3(array, separator2 = " | ") { return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); } - util$7.joinValues = joinValues2; + util$7.joinValues = joinValues3; util$7.jsonStringifyReplacer = (_, value2) => { if (typeof value2 === "bigint") return value2.toString(); return value2; @@ -68350,24 +69207,24 @@ var ZodError2 = class ZodError3 extends Error { this.issues = issues; } format(_mapper) { - const mapper = _mapper || function(issue2) { - return issue2.message; + const mapper = _mapper || function(issue3) { + return issue3.message; }; const fieldErrors = { _errors: [] }; - const processError = (error41) => { - for (const issue2 of error41.issues) if (issue2.code === "invalid_union") issue2.unionErrors.map(processError); - else if (issue2.code === "invalid_return_type") processError(issue2.returnTypeError); - else if (issue2.code === "invalid_arguments") processError(issue2.argumentsError); - else if (issue2.path.length === 0) fieldErrors._errors.push(mapper(issue2)); + const processError = (error42) => { + for (const issue3 of error42.issues) if (issue3.code === "invalid_union") issue3.unionErrors.map(processError); + else if (issue3.code === "invalid_return_type") processError(issue3.returnTypeError); + else if (issue3.code === "invalid_arguments") processError(issue3.argumentsError); + else if (issue3.path.length === 0) fieldErrors._errors.push(mapper(issue3)); else { let curr = fieldErrors; let i$3 = 0; - while (i$3 < issue2.path.length) { - const el = issue2.path[i$3]; - if (!(i$3 === issue2.path.length - 1)) curr[el] = curr[el] || { _errors: [] }; + while (i$3 < issue3.path.length) { + const el = issue3.path[i$3]; + if (!(i$3 === issue3.path.length - 1)) curr[el] = curr[el] || { _errors: [] }; else { curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue2)); + curr[el]._errors.push(mapper(issue3)); } curr = curr[el]; i$3++; @@ -68389,7 +69246,7 @@ var ZodError2 = class ZodError3 extends Error { get isEmpty() { return this.issues.length === 0; } - flatten(mapper = (issue2) => issue2.message) { + flatten(mapper = (issue3) => issue3.message) { const fieldErrors = {}; const formErrors = []; for (const sub of this.issues) if (sub.path.length > 0) { @@ -68409,27 +69266,27 @@ var ZodError2 = class ZodError3 extends Error { ZodError2.create = (issues) => { return new ZodError2(issues); }; -var errorMap2 = (issue2, _ctx) => { +var errorMap2 = (issue3, _ctx) => { let message; - switch (issue2.code) { + switch (issue3.code) { case ZodIssueCode2.invalid_type: - if (issue2.received === ZodParsedType2.undefined) message = "Required"; - else message = `Expected ${issue2.expected}, received ${issue2.received}`; + if (issue3.received === ZodParsedType2.undefined) message = "Required"; + else message = `Expected ${issue3.expected}, received ${issue3.received}`; break; case ZodIssueCode2.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util$6.jsonStringifyReplacer)}`; + message = `Invalid literal value, expected ${JSON.stringify(issue3.expected, util$6.jsonStringifyReplacer)}`; break; case ZodIssueCode2.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util$6.joinValues(issue2.keys, ", ")}`; + message = `Unrecognized key(s) in object: ${util$6.joinValues(issue3.keys, ", ")}`; break; case ZodIssueCode2.invalid_union: message = `Invalid input`; break; case ZodIssueCode2.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util$6.joinValues(issue2.options)}`; + message = `Invalid discriminator value. Expected ${util$6.joinValues(issue3.options)}`; break; case ZodIssueCode2.invalid_enum_value: - message = `Invalid enum value. Expected ${util$6.joinValues(issue2.options)}, received '${issue2.received}'`; + message = `Invalid enum value. Expected ${util$6.joinValues(issue3.options)}, received '${issue3.received}'`; break; case ZodIssueCode2.invalid_arguments: message = `Invalid function arguments`; @@ -68441,29 +69298,29 @@ var errorMap2 = (issue2, _ctx) => { message = `Invalid date`; break; case ZodIssueCode2.invalid_string: - if (typeof issue2.validation === "object") if ("includes" in issue2.validation) { - message = `Invalid input: must include "${issue2.validation.includes}"`; - if (typeof issue2.validation.position === "number") message = `${message} at one or more positions greater than or equal to ${issue2.validation.position}`; - } else if ("startsWith" in issue2.validation) message = `Invalid input: must start with "${issue2.validation.startsWith}"`; - else if ("endsWith" in issue2.validation) message = `Invalid input: must end with "${issue2.validation.endsWith}"`; - else util$6.assertNever(issue2.validation); - else if (issue2.validation !== "regex") message = `Invalid ${issue2.validation}`; + if (typeof issue3.validation === "object") if ("includes" in issue3.validation) { + message = `Invalid input: must include "${issue3.validation.includes}"`; + if (typeof issue3.validation.position === "number") message = `${message} at one or more positions greater than or equal to ${issue3.validation.position}`; + } else if ("startsWith" in issue3.validation) message = `Invalid input: must start with "${issue3.validation.startsWith}"`; + else if ("endsWith" in issue3.validation) message = `Invalid input: must end with "${issue3.validation.endsWith}"`; + else util$6.assertNever(issue3.validation); + else if (issue3.validation !== "regex") message = `Invalid ${issue3.validation}`; else message = "Invalid"; break; case ZodIssueCode2.too_small: - if (issue2.type === "array") message = `Array must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `more than`} ${issue2.minimum} element(s)`; - else if (issue2.type === "string") message = `String must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `over`} ${issue2.minimum} character(s)`; - else if (issue2.type === "number") message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; - else if (issue2.type === "bigint") message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; - else if (issue2.type === "date") message = `Date must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue2.minimum))}`; + if (issue3.type === "array") message = `Array must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `more than`} ${issue3.minimum} element(s)`; + else if (issue3.type === "string") message = `String must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `over`} ${issue3.minimum} character(s)`; + else if (issue3.type === "number") message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; + else if (issue3.type === "bigint") message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; + else if (issue3.type === "date") message = `Date must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue3.minimum))}`; else message = "Invalid input"; break; case ZodIssueCode2.too_big: - if (issue2.type === "array") message = `Array must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `less than`} ${issue2.maximum} element(s)`; - else if (issue2.type === "string") message = `String must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `under`} ${issue2.maximum} character(s)`; - else if (issue2.type === "number") message = `Number must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; - else if (issue2.type === "bigint") message = `BigInt must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; - else if (issue2.type === "date") message = `Date must be ${issue2.exact ? `exactly` : issue2.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue2.maximum))}`; + if (issue3.type === "array") message = `Array must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `less than`} ${issue3.maximum} element(s)`; + else if (issue3.type === "string") message = `String must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `under`} ${issue3.maximum} character(s)`; + else if (issue3.type === "number") message = `Number must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; + else if (issue3.type === "bigint") message = `BigInt must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; + else if (issue3.type === "date") message = `Date must be ${issue3.exact ? `exactly` : issue3.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue3.maximum))}`; else message = "Invalid input"; break; case ZodIssueCode2.custom: @@ -68473,14 +69330,14 @@ var errorMap2 = (issue2, _ctx) => { message = `Intersection results could not be merged`; break; case ZodIssueCode2.not_multiple_of: - message = `Number must be a multiple of ${issue2.multipleOf}`; + message = `Number must be a multiple of ${issue3.multipleOf}`; break; case ZodIssueCode2.not_finite: message = "Number must be finite"; break; default: message = _ctx.defaultError; - util$6.assertNever(issue2); + util$6.assertNever(issue3); } return { message }; }; @@ -68515,7 +69372,7 @@ var makeIssue2 = (params) => { }; function addIssueToContext2(ctx, issueData) { const overrideMap = getErrorMap2(); - const issue2 = makeIssue2({ + const issue3 = makeIssue2({ issueData, data: ctx.data, path: ctx.path, @@ -68526,7 +69383,7 @@ function addIssueToContext2(ctx, issueData) { overrideMap === en_default2 ? void 0 : en_default2 ].filter((x) => !!x) }); - ctx.common.issues.push(issue2); + ctx.common.issues.push(issue3); } var ParseStatus2 = class ParseStatus3 { constructor() { @@ -68960,9 +69817,9 @@ function datetimeRegex2(args2) { regex$1 = `${regex$1}(${opts.join("|")})`; return /* @__PURE__ */ new RegExp(`^${regex$1}$`); } -function isValidIP2(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4Regex2.test(ip2)) return true; - if ((version2 === "v6" || !version2) && ipv6Regex2.test(ip2)) return true; +function isValidIP2(ip2, version3) { + if ((version3 === "v4" || !version3) && ipv4Regex2.test(ip2)) return true; + if ((version3 === "v6" || !version3) && ipv6Regex2.test(ip2)) return true; return false; } function isValidJWT2(jwt, alg) { @@ -68970,8 +69827,8 @@ function isValidJWT2(jwt, alg) { try { const [header] = jwt.split("."); if (!header) return false; - const base643 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); - const decoded = JSON.parse(atob(base643)); + const base644 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); + const decoded = JSON.parse(atob(base644)); if (typeof decoded !== "object" || decoded === null) return false; if ("typ" in decoded && decoded?.typ !== "JWT") return false; if (!decoded.alg) return false; @@ -68981,9 +69838,9 @@ function isValidJWT2(jwt, alg) { return false; } } -function isValidCidr2(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4CidrRegex2.test(ip2)) return true; - if ((version2 === "v6" || !version2) && ipv6CidrRegex2.test(ip2)) return true; +function isValidCidr2(ip2, version3) { + if ((version3 === "v4" || !version3) && ipv4CidrRegex2.test(ip2)) return true; + if ((version3 === "v6" || !version3) && ipv6CidrRegex2.test(ip2)) return true; return false; } var ZodString2 = class ZodString3 extends ZodType2 { @@ -70403,9 +71260,9 @@ var ZodObject2 = class ZodObject3 extends ZodType2 { return new ZodObject3({ ...this._def, unknownKeys: "strict", - ...message !== void 0 ? { errorMap: (issue2, ctx) => { - const defaultError = this._def.errorMap?.(issue2, ctx).message ?? ctx.defaultError; - if (issue2.code === "unrecognized_keys") return { message: errorUtil2.errToObj(message).message ?? defaultError }; + ...message !== void 0 ? { errorMap: (issue3, ctx) => { + const defaultError = this._def.errorMap?.(issue3, ctx).message ?? ctx.defaultError; + if (issue3.code === "unrecognized_keys") return { message: errorUtil2.errToObj(message).message ?? defaultError }; return { message: defaultError }; } } : {} }); @@ -71062,7 +71919,7 @@ var ZodFunction2 = class ZodFunction3 extends ZodType2 { }); return INVALID2; } - function makeArgsIssue(args2, error41) { + function makeArgsIssue(args2, error42) { return makeIssue2({ data: args2, path: ctx.path, @@ -71074,11 +71931,11 @@ var ZodFunction2 = class ZodFunction3 extends ZodType2 { ].filter((x) => !!x), issueData: { code: ZodIssueCode2.invalid_arguments, - argumentsError: error41 + argumentsError: error42 } }); } - function makeReturnsIssue(returns, error41) { + function makeReturnsIssue(returns, error42) { return makeIssue2({ data: returns, path: ctx.path, @@ -71090,7 +71947,7 @@ var ZodFunction2 = class ZodFunction3 extends ZodType2 { ].filter((x) => !!x), issueData: { code: ZodIssueCode2.invalid_return_type, - returnTypeError: error41 + returnTypeError: error42 } }); } @@ -71099,15 +71956,15 @@ var ZodFunction2 = class ZodFunction3 extends ZodType2 { if (this._def.returns instanceof ZodPromise2) { const me = this; return OK2(async function(...args2) { - const error41 = new ZodError2([]); + const error42 = new ZodError2([]); const parsedArgs = await me._def.args.parseAsync(args2, params).catch((e) => { - error41.addIssue(makeArgsIssue(args2, e)); - throw error41; + error42.addIssue(makeArgsIssue(args2, e)); + throw error42; }); const result = await Reflect.apply(fn2, this, parsedArgs); return await me._def.returns._def.type.parseAsync(result, params).catch((e) => { - error41.addIssue(makeReturnsIssue(result, e)); - throw error41; + error42.addIssue(makeReturnsIssue(result, e)); + throw error42; }); }); } else { @@ -72492,28 +73349,28 @@ var require_depd = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/depd@2.0.0/ Object.defineProperty(obj, prop, descriptor); } function DeprecationError(namespace, message, stack) { - var error41 = /* @__PURE__ */ new Error(); + var error42 = /* @__PURE__ */ new Error(); var stackString; - Object.defineProperty(error41, "constructor", { value: DeprecationError }); - Object.defineProperty(error41, "message", { + Object.defineProperty(error42, "constructor", { value: DeprecationError }); + Object.defineProperty(error42, "message", { configurable: true, enumerable: false, value: message, writable: true }); - Object.defineProperty(error41, "name", { + Object.defineProperty(error42, "name", { enumerable: false, configurable: true, value: "DeprecationError", writable: true }); - Object.defineProperty(error41, "namespace", { + Object.defineProperty(error42, "namespace", { configurable: true, enumerable: false, value: namespace, writable: true }); - Object.defineProperty(error41, "stack", { + Object.defineProperty(error42, "stack", { configurable: true, enumerable: false, get: function() { @@ -72524,7 +73381,7 @@ var require_depd = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/depd@2.0.0/ stackString = val; } }); - return error41; + return error42; } }) }); var require_setprototypeof = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/setprototypeof@1.2.0/node_modules/setprototypeof/index.js": ((exports, module) => { @@ -81416,14 +82273,14 @@ var require_lib = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/iconv-lite@0 iconv$1.encodings = null; iconv$1.defaultCharUnicode = "\uFFFD"; iconv$1.defaultCharSingleByte = "?"; - iconv$1.encode = function encode(str, encoding, options) { + iconv$1.encode = function encode2(str, encoding, options) { str = "" + (str || ""); var encoder = iconv$1.getEncoder(encoding, options); var res = encoder.write(str); var trail = encoder.end(); return trail && trail.length > 0 ? Buffer$1.concat([res, trail]) : res; }; - iconv$1.decode = function decode(buf, encoding, options) { + iconv$1.decode = function decode2(buf, encoding, options) { if (typeof buf === "string") { if (!iconv$1.skipDecodeWarning) { console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"); @@ -81655,8 +82512,8 @@ var require_raw_body = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/raw-bod type: "request.size.invalid" })); else { - var string3 = decoder ? buffer$1 + (decoder.end() || "") : Buffer.concat(buffer$1); - done(null, string3); + var string4 = decoder ? buffer$1 + (decoder.end() || "") : Buffer.concat(buffer$1); + done(null, string4); } } function cleanup() { @@ -81686,10 +82543,10 @@ var require_content_type = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/con var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g; var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g; var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/; - exports.parse = parse4; - function parse4(string3) { - if (!string3) throw new TypeError("argument string is required"); - var header = typeof string3 === "object" ? getcontenttype(string3) : string3; + exports.parse = parse6; + function parse6(string4) { + if (!string4) throw new TypeError("argument string is required"); + var header = typeof string4 === "object" ? getcontenttype(string4) : string4; if (typeof header !== "string") throw new TypeError("argument string is required to be a string"); var index = header.indexOf(";"); var type2 = index !== -1 ? header.slice(0, index).trim() : header.trim(); @@ -81809,9 +82666,9 @@ data: ${relativeUrlWithSession} limit: MAXIMUM_MESSAGE_SIZE$1, encoding: (_c = ct.parameters.charset) !== null && _c !== void 0 ? _c : "utf-8" }); - } catch (error41) { - res.writeHead(400).end(String(error41)); - (_d = this.onerror) === null || _d === void 0 || _d.call(this, error41); + } catch (error42) { + res.writeHead(400).end(String(error42)); + (_d = this.onerror) === null || _d === void 0 || _d.call(this, error42); return; } try { @@ -81833,9 +82690,9 @@ data: ${relativeUrlWithSession} let parsedMessage; try { parsedMessage = JSONRPCMessageSchema2.parse(message); - } catch (error41) { - (_a = this.onerror) === null || _a === void 0 || _a.call(this, error41); - throw error41; + } catch (error42) { + (_a = this.onerror) === null || _a === void 0 || _a.call(this, error42); + throw error42; } (_b = this.onmessage) === null || _b === void 0 || _b.call(this, parsedMessage, extra); } @@ -81976,9 +82833,9 @@ var StreamableHTTPServerTransport = class { res.on("close", () => { this._streamMapping.delete(this._standaloneSseStreamId); }); - res.on("error", (error41) => { + res.on("error", (error42) => { var _a; - (_a = this.onerror) === null || _a === void 0 || _a.call(this, error41); + (_a = this.onerror) === null || _a === void 0 || _a.call(this, error42); }); } /** @@ -82004,12 +82861,12 @@ var StreamableHTTPServerTransport = class { } } })); this._streamMapping.set(streamId, res); - res.on("error", (error41) => { + res.on("error", (error42) => { var _a$1; - (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error41); + (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error42); }); - } catch (error41) { - (_b = this.onerror) === null || _b === void 0 || _b.call(this, error41); + } catch (error42) { + (_b = this.onerror) === null || _b === void 0 || _b.call(this, error42); } } /** @@ -82140,26 +82997,26 @@ var StreamableHTTPServerTransport = class { res.on("close", () => { this._streamMapping.delete(streamId); }); - res.on("error", (error41) => { + res.on("error", (error42) => { var _a$1; - (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error41); + (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error42); }); for (const message of messages) (_d = this.onmessage) === null || _d === void 0 || _d.call(this, message, { authInfo, requestInfo }); } - } catch (error41) { + } catch (error42) { res.writeHead(400).end(JSON.stringify({ jsonrpc: "2.0", error: { code: -32700, message: "Parse error", - data: String(error41) + data: String(error42) }, id: null })); - (_e = this.onerror) === null || _e === void 0 || _e.call(this, error41); + (_e = this.onerror) === null || _e === void 0 || _e.call(this, error42); } } /** @@ -82301,8 +83158,8 @@ var getBody = (request2) => { body = Buffer.concat(bodyParts).toString(); try { resolve$4(JSON.parse(body)); - } catch (error41) { - console.error("[mcp-proxy] error parsing body", error41); + } catch (error42) { + console.error("[mcp-proxy] error parsing body", error42); resolve$4(null); } }); @@ -82322,15 +83179,15 @@ var getWWWAuthenticateHeader = (oauth) => { if (!oauth?.protectedResource?.resource) return; return `Bearer resource_metadata="${oauth.protectedResource.resource}/.well-known/oauth-protected-resource"`; }; -var handleResponseError = (error41, res) => { - if (error41 instanceof Response) { +var handleResponseError = (error42, res) => { + if (error42 instanceof Response) { const fixedHeaders = {}; - error41.headers.forEach((value2, key$1) => { + error42.headers.forEach((value2, key$1) => { if (fixedHeaders[key$1]) if (Array.isArray(fixedHeaders[key$1])) fixedHeaders[key$1].push(value2); else fixedHeaders[key$1] = [fixedHeaders[key$1], value2]; else fixedHeaders[key$1] = value2; }); - res.writeHead(error41.status, error41.statusText, fixedHeaders).end(error41.statusText); + res.writeHead(error42.status, error42.statusText, fixedHeaders).end(error42.statusText); return true; } return false; @@ -82339,8 +83196,8 @@ var cleanupServer = async (server2, onClose) => { if (onClose) await onClose(server2); try { await server2.close(); - } catch (error41) { - console.error("[mcp-proxy] error closing server", error41); + } catch (error42) { + console.error("[mcp-proxy] error closing server", error42); } }; var handleStreamRequest = async ({ activeTransports, authenticate, createServer, enableJsonResponse, endpoint: endpoint2, eventStore, oauth, onClose, onConnect, req, res, stateless }) => { @@ -82367,9 +83224,9 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer, })); return true; } - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : "Unauthorized: Authentication error"; - console.error("Authentication error:", error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : "Unauthorized: Authentication error"; + console.error("Authentication error:", error42); res.setHeader("Content-Type", "application/json"); const wwwAuthHeader = getWWWAuthenticateHeader(oauth); if (wwwAuthHeader) res.setHeader("WWW-Authenticate", wwwAuthHeader); @@ -82416,8 +83273,8 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer, }; try { server2 = await createServer(req); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); if (errorMessage.includes("Authentication") || errorMessage.includes("Invalid JWT") || errorMessage.includes("Token") || errorMessage.includes("Unauthorized")) { res.setHeader("Content-Type", "application/json"); const wwwAuthHeader = getWWWAuthenticateHeader(oauth); @@ -82432,7 +83289,7 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer, })); return true; } - if (handleResponseError(error41, res)) return true; + if (handleResponseError(error42, res)) return true; res.writeHead(500).end("Error creating server"); return true; } @@ -82450,8 +83307,8 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer, }); try { server2 = await createServer(req); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); if (errorMessage.includes("Authentication") || errorMessage.includes("Invalid JWT") || errorMessage.includes("Token") || errorMessage.includes("Unauthorized")) { res.setHeader("Content-Type", "application/json"); const wwwAuthHeader = getWWWAuthenticateHeader(oauth); @@ -82466,7 +83323,7 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer, })); return true; } - if (handleResponseError(error41, res)) return true; + if (handleResponseError(error42, res)) return true; res.writeHead(500).end("Error creating server"); return true; } @@ -82481,8 +83338,8 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer, } await transport.handleRequest(req, res, body); return true; - } catch (error41) { - console.error("[mcp-proxy] error handling request", error41); + } catch (error42) { + console.error("[mcp-proxy] error handling request", error42); res.setHeader("Content-Type", "application/json"); res.writeHead(500).end(createJsonRpcErrorResponse(-32603, "Internal Server Error")); } @@ -82521,8 +83378,8 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer, try { await activeTransport.transport.handleRequest(req, res); await cleanupServer(activeTransport.server, onClose); - } catch (error41) { - console.error("[mcp-proxy] error handling delete request", error41); + } catch (error42) { + console.error("[mcp-proxy] error handling delete request", error42); res.writeHead(500).end("Error handling delete request"); } return true; @@ -82535,8 +83392,8 @@ var handleSSERequest = async ({ activeTransports, createServer, endpoint: endpoi let server2; try { server2 = await createServer(req); - } catch (error41) { - if (handleResponseError(error41, res)) return true; + } catch (error42) { + if (handleResponseError(error42, res)) return true; res.writeHead(500).end("Error creating server"); return true; } @@ -82558,9 +83415,9 @@ var handleSSERequest = async ({ activeTransports, createServer, endpoint: endpoi params: { message: "SSE Connection established" } }); if (onConnect) await onConnect(server2); - } catch (error41) { + } catch (error42) { if (!closed) { - console.error("[mcp-proxy] error connecting to server", error41); + console.error("[mcp-proxy] error connecting to server", error42); res.writeHead(500).end("Error connecting to server"); } } @@ -82597,8 +83454,8 @@ var startHTTPServer = async ({ apiKey, authenticate, createServer, enableJsonRes res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization, Accept, Mcp-Session-Id, Last-Event-Id"); res.setHeader("Access-Control-Expose-Headers", "Mcp-Session-Id"); - } catch (error41) { - console.error("[mcp-proxy] error parsing origin", error41); + } catch (error42) { + console.error("[mcp-proxy] error parsing origin", error42); } if (req.method === "OPTIONS") { res.writeHead(204); @@ -82650,9 +83507,9 @@ var startHTTPServer = async ({ apiKey, authenticate, createServer, enableJsonRes for (const transport of Object.values(activeSSETransports)) await transport.close(); for (const transport of Object.values(activeStreamTransports)) await transport.transport.close(); return new Promise((resolve$4, reject) => { - httpServer.close((error41) => { - if (error41) { - reject(error41); + httpServer.close((error42) => { + if (error42) { + reject(error42); return; } resolve$4(); @@ -82798,26 +83655,26 @@ var require_uri_all2 = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/uri-js@ while (length--) result[length] = fn2(array[length]); return result; } - function mapDomain(string3, fn2) { - var parts = string3.split("@"); + function mapDomain(string4, fn2) { + var parts = string4.split("@"); var result = ""; if (parts.length > 1) { result = parts[0] + "@"; - string3 = parts[1]; + string4 = parts[1]; } - string3 = string3.replace(regexSeparators, "."); - var labels = string3.split("."); + string4 = string4.replace(regexSeparators, "."); + var labels = string4.split("."); var encoded = map$1(labels, fn2).join("."); return result + encoded; } - function ucs2decode(string3) { + function ucs2decode(string4) { var output = []; var counter = 0; - var length = string3.length; + var length = string4.length; while (counter < length) { - var value2 = string3.charCodeAt(counter++); + var value2 = string4.charCodeAt(counter++); if (value2 >= 55296 && value2 <= 56319 && counter < length) { - var extra = string3.charCodeAt(counter++); + var extra = string4.charCodeAt(counter++); if ((extra & 64512) == 56320) output.push(((value2 & 1023) << 10) + (extra & 1023) + 65536); else { output.push(value2); @@ -82846,7 +83703,7 @@ var require_uri_all2 = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/uri-js@ for (; delta > baseMinusTMin * tMax >> 1; k += base) delta = floor(delta / baseMinusTMin); return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }; - var decode = function decode$1(input) { + var decode2 = function decode$1(input) { var output = []; var inputLength = input.length; var i$3 = 0; @@ -82880,7 +83737,7 @@ var require_uri_all2 = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/uri-js@ } return String.fromCodePoint.apply(String, output); }; - var encode = function encode$1(input) { + var encode2 = function encode$1(input) { var output = []; input = ucs2decode(input); var inputLength = input.length; @@ -82971,13 +83828,13 @@ var require_uri_all2 = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/uri-js@ return output.join(""); }; var toUnicode = function toUnicode$1(input) { - return mapDomain(input, function(string3) { - return regexPunycode.test(string3) ? decode(string3.slice(4).toLowerCase()) : string3; + return mapDomain(input, function(string4) { + return regexPunycode.test(string4) ? decode2(string4.slice(4).toLowerCase()) : string4; }); }; var toASCII = function toASCII$1(input) { - return mapDomain(input, function(string3) { - return regexNonASCII.test(string3) ? "xn--" + encode(string3) : string3; + return mapDomain(input, function(string4) { + return regexNonASCII.test(string4) ? "xn--" + encode2(string4) : string4; }); }; var punycode = { @@ -82986,8 +83843,8 @@ var require_uri_all2 = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/uri-js@ "decode": ucs2decode, "encode": ucs2encode }, - "decode": decode, - "encode": encode, + "decode": decode2, + "encode": encode2, "toASCII": toASCII, "toUnicode": toUnicode }; @@ -84738,8 +85595,8 @@ var require_formats2 = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/ajv@6.1 "relative-json-pointer": RELATIVE_JSON_POINTER }; formats$1.full = { - date: date2, - time: time2, + date: date4, + time: time4, "date-time": date_time, uri, "uri-reference": URIREF, @@ -84758,7 +85615,7 @@ var require_formats2 = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/ajv@6.1 function isLeapYear(year) { return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } - function date2(str) { + function date4(str) { var matches = str.match(DATE); if (!matches) return false; var year = +matches[1]; @@ -84766,7 +85623,7 @@ var require_formats2 = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/ajv@6.1 var day = +matches[3]; return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); } - function time2(str, full) { + function time4(str, full) { var matches = str.match(TIME); if (!matches) return false; var hour = matches[1]; @@ -84778,7 +85635,7 @@ var require_formats2 = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/ajv@6.1 var DATE_TIME_SEPARATOR = /t|\s/i; function date_time(str) { var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date2(dateTime[0]) && time2(dateTime[1], true); + return dateTime.length == 2 && date4(dateTime[0]) && time4(dateTime[1], true); } var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { @@ -87385,8 +88242,8 @@ var require_ajv2 = /* @__PURE__ */ __commonJS2({ "node_modules/.pnpm/ajv@6.12.6/ if (typeof schema2 != "object" && typeof schema2 != "boolean") throw new Error("schema should be object or boolean"); var serialize = this._opts.serialize; var cacheKey = serialize ? serialize(schema2) : schema2; - var cached3 = this._cache.get(cacheKey); - if (cached3) return cached3; + var cached4 = this._cache.get(cacheKey); + if (cached4) return cached4; shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; var id = resolve.normalizeId(this._getId(schema2)); if (id && shouldAddSchema) checkUnique(this, id); @@ -88125,8 +88982,8 @@ var EventSourceParserStream = class extends TransformStream { onEvent: (event) => { controller.enqueue(event); }, - onError(error41) { - onError === "terminate" ? controller.error(error41) : typeof onError == "function" && onError(error41); + onError(error42) { + onError === "terminate" ? controller.error(error42) : typeof onError == "function" && onError(error42); }, onRetry, onComment @@ -88148,7 +89005,6 @@ import { setTimeout as delay } from "timers/promises"; init_index_CAcLDIRJ(); // ../node_modules/.pnpm/fastmcp@3.20.0_arktype@2.1.25_effect@3.16.12/node_modules/fastmcp/dist/FastMCP.js -init_zod(); var FastMCPError = class extends Error { constructor(message) { super(message); @@ -88293,7 +89149,7 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter { tools, transportType, utils, - version: version2 + version: version3 }) { super(); this.#auth = auth2; @@ -88316,7 +89172,7 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter { } this.#capabilities.logging = {}; this.#server = new Server( - { name, version: version2 }, + { name, version: version3 }, { capabilities: this.#capabilities, instructions } ); this.#utils = utils; @@ -88350,8 +89206,8 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter { } try { await this.#server.close(); - } catch (error41) { - this.#logger.error("[FastMCP error]", "could not close server", error41); + } catch (error42) { + this.#logger.error("[FastMCP error]", "could not close server", error42); } } async connect(transport) { @@ -88428,13 +89284,13 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` } this.#connectionState = "ready"; this.emit("ready"); - } catch (error41) { + } catch (error42) { this.#connectionState = "error"; const errorEvent = { - error: error41 instanceof Error ? error41 : new Error(String(error41)) + error: error42 instanceof Error ? error42 : new Error(String(error42)) }; this.emit("error", errorEvent); - throw error41; + throw error42; } } async requestSampling(message, options) { @@ -88605,8 +89461,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` }); } setupErrorHandling() { - this.#server.onerror = (error41) => { - this.#logger.error("[FastMCP error]", error41); + this.#server.onerror = (error42) => { + this.#logger.error("[FastMCP error]", error42); }; } setupLoggingHandlers() { @@ -88653,8 +89509,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` args2, this.#auth ); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); throw new McpError( ErrorCode.InternalError, `Failed to load prompt '${request2.params.name}': ${errorMessage}` @@ -88729,8 +89585,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` let maybeArrayResult; try { maybeArrayResult = await resource.load(this.#auth); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); throw new McpError( ErrorCode.InternalError, `Failed to load resource '${resource.name}' (${resource.uri}): ${errorMessage}`, @@ -88786,8 +89642,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` this.emit("rootsChanged", { roots: roots.roots }); - }).catch((error41) => { - if (error41 instanceof McpError && error41.code === ErrorCode.MethodNotFound) { + }).catch((error42) => { + if (error42 instanceof McpError && error42.code === ErrorCode.MethodNotFound) { this.#logger.debug( "[FastMCP debug] listRoots method not supported by client" ); @@ -88795,7 +89651,7 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` this.#logger.error( `[FastMCP error] received error listing roots. -${error41 instanceof Error ? error41.stack : JSON.stringify(error41)}` +${error42 instanceof Error ? error42.stack : JSON.stringify(error42)}` ); } }); @@ -88841,9 +89697,9 @@ ${error41 instanceof Error ? error41.stack : JSON.stringify(error41)}` request2.params.arguments ); if (parsed2.issues) { - const friendlyErrors = this.#utils?.formatInvalidParamsErrorMessage ? this.#utils.formatInvalidParamsErrorMessage(parsed2.issues) : parsed2.issues.map((issue2) => { - const path = issue2.path?.join(".") || "root"; - return `${path}: ${issue2.message}`; + const friendlyErrors = this.#utils?.formatInvalidParamsErrorMessage ? this.#utils.formatInvalidParamsErrorMessage(parsed2.issues) : parsed2.issues.map((issue3) => { + const path = issue3.path?.join(".") || "root"; + return `${path}: ${issue3.message}`; }).join(", "); throw new McpError( ErrorCode.InvalidParams, @@ -88972,15 +89828,15 @@ ${error41 instanceof Error ? error41.stack : JSON.stringify(error41)}` } else { result = ContentResultZodSchema.parse(maybeStringResult); } - } catch (error41) { - if (error41 instanceof UserError) { + } catch (error42) { + if (error42 instanceof UserError) { return { - content: [{ text: error41.message, type: "text" }], + content: [{ text: error42.message, type: "text" }], isError: true, - ...error41.extras ? { structuredContent: error41.extras } : {} + ...error42.extras ? { structuredContent: error42.extras } : {} }; } - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + const errorMessage = error42 instanceof Error ? error42.message : String(error42); return { content: [ { @@ -89106,8 +89962,8 @@ var FastMCP = class extends FastMCPEventEmitter { * Starts the server. */ async start(options) { - const config2 = this.#parseRuntimeConfig(options); - if (config2.transportType === "stdio") { + const config3 = this.#parseRuntimeConfig(options); + if (config3.transportType === "stdio") { const transport = new StdioServerTransport(); let auth2; if (this.#authenticate) { @@ -89115,10 +89971,10 @@ var FastMCP = class extends FastMCPEventEmitter { auth2 = await this.#authenticate( void 0 ); - } catch (error41) { + } catch (error42) { this.#logger.error( "[FastMCP error] Authentication failed for stdio transport:", - error41 instanceof Error ? error41.message : String(error41) + error42 instanceof Error ? error42.message : String(error42) ); } } @@ -89158,8 +90014,8 @@ var FastMCP = class extends FastMCPEventEmitter { this.emit("connect", { session }); - } else if (config2.transportType === "httpStream") { - const httpConfig = config2.httpStream; + } else if (config3.transportType === "httpStream") { + const httpConfig = config3.httpStream; if (httpConfig.stateless) { this.#logger.info( `[FastMCP info] Starting server in stateless mode on HTTP Stream at http://${httpConfig.host}:${httpConfig.port}${httpConfig.endpoint}` @@ -89324,8 +90180,8 @@ var FastMCP = class extends FastMCPEventEmitter { } return; } - } catch (error41) { - this.#logger.error("[FastMCP error] health endpoint error", error41); + } catch (error42) { + this.#logger.error("[FastMCP error] health endpoint error", error42); } } const oauthConfig = this.#options.oauth; @@ -89708,7 +90564,7 @@ var _clone = (input, seen) => { }; // ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/functions.js -var cached2 = (thunk) => { +var cached3 = (thunk) => { let result = unset; return () => result === unset ? result = thunk() : result; }; @@ -89733,7 +90589,7 @@ var Callable = class { return Object.assign(Object.setPrototypeOf(fn2.bind(opts?.bind ?? this), this.constructor.prototype), opts?.attach); } }; -var envHasCsp = cached2(() => { +var envHasCsp = cached3(() => { try { return new Function("return false")(); } catch { @@ -89755,8 +90611,8 @@ var Hkt = class { // ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/isomorphic.js var fileName = () => { try { - const error41 = new Error(); - const stackLine = error41.stack?.split("\n")[2]?.trim() || ""; + const error42 = new Error(); + const stackLine = error42.stack?.split("\n")[2]?.trim() || ""; const filePath = stackLine.match(/\(?(.+?)(?::\d+:\d+)?\)?$/)?.[1] || "unknown"; return filePath.replace(/^file:\/\//, ""); } catch { @@ -89857,7 +90713,7 @@ var initialRegistryContents = { filename: isomorphic.fileName(), FileConstructor }; -var registry2 = initialRegistryContents; +var registry3 = initialRegistryContents; var namesByResolution = /* @__PURE__ */ new Map(); var nameCounts = /* @__PURE__ */ Object.create(null); var register2 = (value2) => { @@ -89869,7 +90725,7 @@ var register2 = (value2) => { name = `${name}${nameCounts[name]++}`; else nameCounts[name] = 1; - registry2[name] = value2; + registry3[name] = value2; namesByResolution.set(value2, name); return name; }; @@ -89984,20 +90840,20 @@ var _serialize = (data, opts, seen) => { return data; } }; -var describeCollapsibleDate = (date2) => { - const year = date2.getFullYear(); - const month = date2.getMonth(); - const dayOfMonth = date2.getDate(); - const hours = date2.getHours(); - const minutes = date2.getMinutes(); - const seconds = date2.getSeconds(); - const milliseconds = date2.getMilliseconds(); +var describeCollapsibleDate = (date4) => { + const year = date4.getFullYear(); + const month = date4.getMonth(); + const dayOfMonth = date4.getDate(); + const hours = date4.getHours(); + const minutes = date4.getMinutes(); + const seconds = date4.getSeconds(); + const milliseconds = date4.getMilliseconds(); if (month === 0 && dayOfMonth === 1 && hours === 0 && minutes === 0 && seconds === 0 && milliseconds === 0) return `${year}`; const datePortion = `${months[month]} ${dayOfMonth}, ${year}`; if (hours === 0 && minutes === 0 && seconds === 0 && milliseconds === 0) return datePortion; - let timePortion = date2.toLocaleTimeString(); + let timePortion = date4.toLocaleTimeString(); const suffix2 = timePortion.endsWith(" AM") || timePortion.endsWith(" PM") ? timePortion.slice(-3) : ""; if (suffix2) timePortion = timePortion.slice(0, -suffix2.length); @@ -90176,8 +91032,8 @@ var suffix = 2; while (_registryName in globalThis) _registryName = `$ark${suffix++}`; var registryName = _registryName; -globalThis[registryName] = registry2; -var $ark = registry2; +globalThis[registryName] = registry3; +var $ark = registry3; var reference = (name) => `${registryName}.${name}`; var registeredReference = (value2) => reference(register2(value2)); @@ -90565,26 +91421,26 @@ var ArkError = class _ArkError extends CastableBase { get expected() { if (this.input.expected) return this.input.expected; - const config2 = this.meta?.expected ?? this.nodeConfig.expected; - return typeof config2 === "function" ? config2(this.input) : config2; + const config3 = this.meta?.expected ?? this.nodeConfig.expected; + return typeof config3 === "function" ? config3(this.input) : config3; } get actual() { if (this.input.actual) return this.input.actual; - const config2 = this.meta?.actual ?? this.nodeConfig.actual; - return typeof config2 === "function" ? config2(this.data) : config2; + const config3 = this.meta?.actual ?? this.nodeConfig.actual; + return typeof config3 === "function" ? config3(this.data) : config3; } get problem() { if (this.input.problem) return this.input.problem; - const config2 = this.meta?.problem ?? this.nodeConfig.problem; - return typeof config2 === "function" ? config2(this) : config2; + const config3 = this.meta?.problem ?? this.nodeConfig.problem; + return typeof config3 === "function" ? config3(this) : config3; } get message() { if (this.input.message) return this.input.message; - const config2 = this.meta?.message ?? this.nodeConfig.message; - return typeof config2 === "function" ? config2(this) : config2; + const config3 = this.meta?.message ?? this.nodeConfig.message; + return typeof config3 === "function" ? config3(this) : config3; } get flat() { return this.hasCode("intersection") ? [...this.errors] : [this]; @@ -90656,25 +91512,25 @@ var ArkErrors = class _ArkErrors extends ReadonlyArray { /** * Append an ArkError to this array, ignoring duplicates. */ - add(error41) { - const existing = this.byPath[error41.propString]; + add(error42) { + const existing = this.byPath[error42.propString]; if (existing) { - if (error41 === existing) + if (error42 === existing) return; if (existing.hasCode("union") && existing.errors.length === 0) return; - const errorIntersection = error41.hasCode("union") && error41.errors.length === 0 ? error41 : new ArkError({ + const errorIntersection = error42.hasCode("union") && error42.errors.length === 0 ? error42 : new ArkError({ code: "intersection", - errors: existing.hasCode("intersection") ? [...existing.errors, error41] : [existing, error41] + errors: existing.hasCode("intersection") ? [...existing.errors, error42] : [existing, error42] }, this.ctx); const existingIndex = this.indexOf(existing); this.mutable[existingIndex === -1 ? this.length : existingIndex] = errorIntersection; - this.byPath[error41.propString] = errorIntersection; - this.addAncestorPaths(error41); + this.byPath[error42.propString] = errorIntersection; + this.addAncestorPaths(error42); } else { - this.byPath[error41.propString] = error41; - this.addAncestorPaths(error41); - this.mutable.push(error41); + this.byPath[error42.propString] = error42; + this.addAncestorPaths(error42); + this.mutable.push(error42); } this.count++; } @@ -90725,9 +91581,9 @@ var ArkErrors = class _ArkErrors extends ReadonlyArray { toString() { return this.join("\n"); } - addAncestorPaths(error41) { - for (const propString of error41.path.stringifyAncestors()) { - this.byAncestorPath[propString] = append(this.byAncestorPath[propString], error41); + addAncestorPaths(error42) { + for (const propString of error42.path.stringifyAncestors()) { + this.byAncestorPath[propString] = append(this.byAncestorPath[propString], error42); } } }; @@ -90737,14 +91593,14 @@ var TraversalError = class extends Error { if (errors.length === 1) super(errors.summary); else - super("\n" + errors.map((error41) => ` \u2022 ${indent(error41)}`).join("\n")); + super("\n" + errors.map((error42) => ` \u2022 ${indent(error42)}`).join("\n")); Object.defineProperty(this, "arkErrors", { value: errors, enumerable: false }); } }; -var indent = (error41) => error41.toString().split("\n").join("\n "); +var indent = (error42) => error42.toString().split("\n").join("\n "); // ../node_modules/.pnpm/@ark+schema@0.53.0/node_modules/@ark/schema/out/shared/traversal.js var Traversal = class { @@ -90777,9 +91633,9 @@ var Traversal = class { queuedMorphs = []; branches = []; seen = {}; - constructor(root, config2) { + constructor(root, config3) { this.root = root; - this.config = config2; + this.config = config3; } /** * #### the data being validated or morphed @@ -90880,12 +91736,12 @@ var Traversal = class { return this.errorFromContext(input); } errorFromContext(errCtx) { - const error41 = new ArkError(errCtx, this); + const error42 = new ArkError(errCtx, this); if (this.currentBranch) - this.currentBranch.error = error41; + this.currentBranch.error = error42; else - this.errors.add(error41); - return error41; + this.errors.add(error42); + return error42; } applyQueuedMorphs() { while (this.queuedMorphs.length) { @@ -91028,10 +91884,10 @@ var BaseNode = class extends Callable { }; case "optimistic": this.contextFreeMorph = this.shallowMorphs[0]; - const clone2 = this.$.resolvedConfig.clone; + const clone3 = this.$.resolvedConfig.clone; return (data, onFail) => { if (this.allows(data)) { - return this.contextFreeMorph(clone2 && (typeof data === "object" && data !== null || typeof data === "function") ? clone2(data) : data); + return this.contextFreeMorph(clone3 && (typeof data === "object" && data !== null || typeof data === "function") ? clone3(data) : data); } const ctx = new Traversal(data, this.$.resolvedConfig); this.traverseApply(data, ctx); @@ -93081,7 +93937,7 @@ var implementation13 = implementNode({ numberAllowsNaN: {} }, normalize: (schema2) => typeof schema2 === "string" ? { domain: schema2 } : hasKey(schema2, "numberAllowsNaN") && schema2.domain !== "number" ? throwParseError(Domain.writeBadAllowNanMessage(schema2.domain)) : schema2, - applyConfig: (schema2, config2) => schema2.numberAllowsNaN === void 0 && schema2.domain === "number" && config2.numberAllowsNaN ? { ...schema2, numberAllowsNaN: true } : schema2, + applyConfig: (schema2, config3) => schema2.numberAllowsNaN === void 0 && schema2.domain === "number" && config3.numberAllowsNaN ? { ...schema2, numberAllowsNaN: true } : schema2, defaults: { description: (node2) => domainDescriptions[node2.domain], actual: (data) => Number.isNaN(data) ? "NaN" : domainDescriptions[domainOf(data)] @@ -93541,8 +94397,8 @@ var implementation16 = implementNode({ throwParseError(Proto.writeBadInvalidDateMessage(normalized.proto)); return normalized; }, - applyConfig: (schema2, config2) => { - if (schema2.dateAllowsInvalid === void 0 && schema2.proto === Date && config2.dateAllowsInvalid) + applyConfig: (schema2, config3) => { + if (schema2.dateAllowsInvalid === void 0 && schema2.proto === Date && config3.dateAllowsInvalid) return { ...schema2, dateAllowsInvalid: true }; return schema2; }, @@ -94802,11 +95658,11 @@ var implementation22 = implementNode({ kind: "structure", hasAssociatedError: false, normalize: (schema2) => schema2, - applyConfig: (schema2, config2) => { - if (!schema2.undeclared && config2.onUndeclaredKey !== "ignore") { + applyConfig: (schema2, config3) => { + if (!schema2.undeclared && config3.onUndeclaredKey !== "ignore") { return { ...schema2, - undeclared: config2.onUndeclaredKey + undeclared: config3.onUndeclaredKey }; } return schema2; @@ -95581,9 +96437,9 @@ var BaseScope = class { resolved = false; nodesByHash = {}; intrinsic; - constructor(def, config2) { - this.config = mergeConfigs($ark.config, config2); - this.resolvedConfig = mergeConfigs($ark.resolvedConfig, config2); + constructor(def, config3) { + this.config = mergeConfigs($ark.config, config3); + this.resolvedConfig = mergeConfigs($ark.resolvedConfig, config3); this.name = this.resolvedConfig.name ?? `anonymousScope${Object.keys(scopesByName).length}`; if (this.name in scopesByName) throwParseError(`A Scope already named ${this.name} already exists`); @@ -95733,11 +96589,11 @@ var BaseScope = class { return $ark.ambient; } maybeResolve(name) { - const cached3 = this.resolutions[name]; - if (cached3) { - if (typeof cached3 !== "string") - return this.bindReference(cached3); - const v = nodesByRegisteredId[cached3]; + const cached4 = this.resolutions[name]; + if (cached4) { + if (typeof cached4 !== "string") + return this.bindReference(cached4); + const v = nodesByRegisteredId[cached4]; if (hasArkKind(v, "root")) return this.resolutions[name] = v; if (hasArkKind(v, "context")) { @@ -95754,7 +96610,7 @@ var BaseScope = class { nodesByRegisteredId[v.id] = node2; return this.resolutions[name] = node2; } - return throwInternalError(`Unexpected nodesById entry for ${cached3}: ${printable(v)}`); + return throwInternalError(`Unexpected nodesById entry for ${cached4}: ${printable(v)}`); } let def = this.aliases[name] ?? this.ambient?.[name]; if (!def) @@ -95902,7 +96758,7 @@ var maybeResolveSubalias = (base, name) => { } throwInternalError(`Unexpected resolution for alias '${name}': ${printable(resolution)}`); }; -var schemaScope = (aliases, config2) => new SchemaScope(aliases, config2); +var schemaScope = (aliases, config3) => new SchemaScope(aliases, config3); var rootSchemaScope = new SchemaScope({}); var resolutionsOfModule = ($, typeSet) => { const result = {}; @@ -96029,8 +96885,8 @@ var parseEnclosed = (s, enclosing) => { } else if (isKeyOf(enclosing, enclosingQuote)) s.root = s.ctx.$.node("unit", { unit: enclosed }); else { - const date2 = tryParseDate(enclosed, writeInvalidDateMessage(enclosed)); - s.root = s.ctx.$.node("unit", { meta: enclosed, unit: date2 }); + const date4 = tryParseDate(enclosed, writeInvalidDateMessage(enclosed)); + s.root = s.ctx.$.node("unit", { meta: enclosed, unit: date4 }); } }; var enclosingQuote = { @@ -97011,9 +97867,9 @@ var InternalScope = class _InternalScope extends BaseScope { if (hasArkKind(def, "module") || hasArkKind(def, "generic")) return [alias, def]; const qualifiedName = this.name === "ark" ? alias : alias === "root" ? this.name : `${this.name}.${alias}`; - const config2 = this.resolvedConfig.keywords?.[qualifiedName]; - if (config2) - def = [def, "@", config2]; + const config3 = this.resolvedConfig.keywords?.[qualifiedName]; + if (config3) + def = [def, "@", config3]; return [alias, def]; } if (alias.at(-1) !== ">") { @@ -97081,8 +97937,8 @@ var InternalScope = class _InternalScope extends BaseScope { return def; } type = new InternalTypeParser(this); - static scope = ((def, config2 = {}) => new _InternalScope(def, config2)); - static module = ((def, config2 = {}) => this.scope(def, config2).export()); + static scope = ((def, config3 = {}) => new _InternalScope(def, config3)); + static module = ((def, config3 = {}) => this.scope(def, config3).export()); }; var scope = Object.assign(InternalScope.scope, { define: (def) => def @@ -97117,7 +97973,7 @@ var arkArray = Scope.module({ }); // ../node_modules/.pnpm/arktype@2.1.25/node_modules/arktype/out/keywords/FormData.js -var value = rootSchema(["string", registry2.FileConstructor]); +var value = rootSchema(["string", registry3.FileConstructor]); var parsedFormDataValue = value.rawOr(value.array()); var parsed = rootSchema({ meta: "an object representing parsed form data", @@ -97138,7 +97994,7 @@ var arkFormData = Scope.module({ for (const [k, v] of data) { if (k in result) { const existing = result[k]; - if (typeof existing === "string" || existing instanceof registry2.FileConstructor) + if (typeof existing === "string" || existing instanceof registry3.FileConstructor) result[k] = [existing, v]; else existing.push(v); @@ -97203,13 +98059,13 @@ var epoch = rootSchema({ }, meta: "an integer representing a safe Unix timestamp" }); -var integer2 = rootSchema({ +var integer3 = rootSchema({ domain: "number", divisor: 1 }); -var number2 = Scope.module({ +var number3 = Scope.module({ root: intrinsic.number, - integer: integer2, + integer: integer3, epoch, safe: rootSchema({ domain: { @@ -97255,7 +98111,7 @@ var stringInteger = Scope.module({ name: "string.integer" }); var hex = regexStringNode(/^[\dA-Fa-f]+$/, "hex characters only"); -var base642 = Scope.module({ +var base643 = Scope.module({ root: regexStringNode(/^(?:[\d+/A-Za-z]{4})*(?:[\d+/A-Za-z]{2}==|[\d+/A-Za-z]{3}=)?$/, "base64-encoded"), url: regexStringNode(/^(?:[\w-]{4})*(?:[\w-]{2}(?:==|%3D%3D)?|[\w-]{3}(?:=|%3D)?)?$/, "base64url-encoded") }, { @@ -97313,7 +98169,7 @@ var parsableDate = rootSchema({ }).assertHasKind("intersection"); var epochRoot = stringInteger.root.internal.narrow((s, ctx) => { const n = Number.parseInt(s); - const out = number2.epoch(n); + const out = number3.epoch(n); if (out instanceof ArkErrors) { ctx.errors.merge(out); return false; @@ -97349,10 +98205,10 @@ var stringDate = Scope.module({ declaredIn: parsableDate, in: "string", morphs: (s, ctx) => { - const date2 = new Date(s); - if (Number.isNaN(date2.valueOf())) + const date4 = new Date(s); + if (Number.isNaN(date4.valueOf())) return ctx.error("a parsable date"); - return date2; + return date4; }, declaredOut: intrinsic.Date }), @@ -97361,7 +98217,7 @@ var stringDate = Scope.module({ }, { name: "string.date" }); -var email2 = regexStringNode( +var email3 = regexStringNode( // considered https://colinhacks.com/essays/reasonable-email-regex but it includes a lookahead // which breaks some integrations e.g. fast-check // regex based on: @@ -97383,10 +98239,10 @@ var ip = Scope.module({ name: "string.ip" }); var jsonStringDescription = "a JSON string"; -var writeJsonSyntaxErrorProblem = (error41) => { - if (!(error41 instanceof SyntaxError)) - throw error41; - return `must be ${jsonStringDescription} (${error41})`; +var writeJsonSyntaxErrorProblem = (error42) => { + if (!(error42 instanceof SyntaxError)) + throw error42; + return `must be ${jsonStringDescription} (${error42})`; }; var jsonRoot = rootSchema({ meta: jsonStringDescription, @@ -97584,7 +98440,7 @@ var url = Scope.module({ }, { name: "string.url" }); -var uuid2 = Scope.module({ +var uuid3 = Scope.module({ // the meta tuple expression ensures the error message does not delegate // to the individual branches, which are too detailed root: [ @@ -97606,17 +98462,17 @@ var uuid2 = Scope.module({ }, { name: "string.uuid" }); -var string2 = Scope.module({ +var string3 = Scope.module({ root: intrinsic.string, alpha: regexStringNode(/^[A-Za-z]*$/, "only letters"), alphanumeric: regexStringNode(/^[\dA-Za-z]*$/, "only letters and digits 0-9"), hex, - base64: base642, + base64: base643, capitalize: capitalize2, creditCard, date: stringDate, digits: regexStringNode(/^\d*$/, "only digits 0-9"), - email: email2, + email: email3, integer: stringInteger, ip, json, @@ -97628,7 +98484,7 @@ var string2 = Scope.module({ trim, upper, url, - uuid: uuid2 + uuid: uuid3 }, { name: "string" }); @@ -97720,8 +98576,8 @@ var ark = scope({ ...arkTsGenerics, ...arkPrototypes, ...arkBuiltins, - string: string2, - number: number2, + string: string3, + number: number3, object, unknown }, { prereducedAliases: true, name: "ark" }); @@ -97818,8 +98674,8 @@ function addHook(state, kind, name, hook2) { } if (kind === "error") { hook2 = (method, options) => { - return Promise.resolve().then(method.bind(null, options)).catch((error41) => { - return orig(error41, options); + return Promise.resolve().then(method.bind(null, options)).catch((error42) => { + return orig(error42, options); }); }; } @@ -97900,7 +98756,7 @@ function lowercaseKeys(object2) { return newObj; }, {}); } -function isPlainObject2(value2) { +function isPlainObject3(value2) { if (typeof value2 !== "object" || value2 === null) return false; if (Object.prototype.toString.call(value2) !== "[object Object]") return false; const proto = Object.getPrototypeOf(value2); @@ -97911,7 +98767,7 @@ function isPlainObject2(value2) { function mergeDeep(defaults, options) { const result = Object.assign({}, defaults); Object.keys(options).forEach((key) => { - if (isPlainObject2(options[key])) { + if (isPlainObject3(options[key])) { if (!(key in defaults)) Object.assign(result, { [key]: options[key] }); else result[key] = mergeDeep(defaults[key], options[key]); } else { @@ -98112,7 +98968,7 @@ function expand(template, context) { return template.replace(/\/$/, ""); } } -function parse3(options) { +function parse5(options) { let method = options.method.toUpperCase(); let url2 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); @@ -98176,7 +99032,7 @@ function parse3(options) { ); } function endpointWithDefaults(defaults, route, options) { - return parse3(merge2(defaults, route, options)); + return parse5(merge2(defaults, route, options)); } function withDefaults(oldDefaults, newDefaults) { const DEFAULTS2 = merge2(oldDefaults, newDefaults); @@ -98185,7 +99041,7 @@ function withDefaults(oldDefaults, newDefaults) { DEFAULTS: DEFAULTS2, defaults: withDefaults.bind(null, DEFAULTS2), merge: merge2.bind(null, DEFAULTS2), - parse: parse3 + parse: parse5 }); } var endpoint = withDefaults(null, DEFAULTS); @@ -98239,7 +99095,7 @@ var defaults_default = { "user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}` } }; -function isPlainObject3(value2) { +function isPlainObject4(value2) { if (typeof value2 !== "object" || value2 === null) return false; if (Object.prototype.toString.call(value2) !== "[object Object]") return false; const proto = Object.getPrototypeOf(value2); @@ -98256,7 +99112,7 @@ async function fetchWrapper(requestOptions) { } const log2 = requestOptions.request?.log || console; const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; - const body = isPlainObject3(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body; + const body = isPlainObject4(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body; const requestHeaders = Object.fromEntries( Object.entries(requestOptions.headers).map(([name, value2]) => [ name, @@ -98275,26 +99131,26 @@ async function fetchWrapper(requestOptions) { // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }); - } catch (error41) { + } catch (error42) { let message = "Unknown Error"; - if (error41 instanceof Error) { - if (error41.name === "AbortError") { - error41.status = 500; - throw error41; + if (error42 instanceof Error) { + if (error42.name === "AbortError") { + error42.status = 500; + throw error42; } - message = error41.message; - if (error41.name === "TypeError" && "cause" in error41) { - if (error41.cause instanceof Error) { - message = error41.cause.message; - } else if (typeof error41.cause === "string") { - message = error41.cause; + message = error42.message; + if (error42.name === "TypeError" && "cause" in error42) { + if (error42.cause instanceof Error) { + message = error42.cause.message; + } else if (typeof error42.cause === "string") { + message = error42.cause; } } } const requestError = new RequestError(message, 500, { request: requestOptions }); - requestError.cause = error41; + requestError.cause = error42; throw requestError; } const status = fetchResponse.status; @@ -98711,12 +99567,12 @@ function requestLog(octokit) { `${requestOptions.method} ${path} - ${response.status} with id ${requestId} in ${Date.now() - start}ms` ); return response; - }).catch((error41) => { - const requestId = error41.response?.headers["x-github-request-id"] || "UNKNOWN"; + }).catch((error42) => { + const requestId = error42.response?.headers["x-github-request-id"] || "UNKNOWN"; octokit.log.error( - `${requestOptions.method} ${path} - ${error41.status} with id ${requestId} in ${Date.now() - start}ms` + `${requestOptions.method} ${path} - ${error42.status} with id ${requestId} in ${Date.now() - start}ms` ); - throw error41; + throw error42; }); }); } @@ -98781,8 +99637,8 @@ function iterator(octokit, route, parameters) { } } return { value: normalizedResponse }; - } catch (error41) { - if (error41.status !== 409) throw error41; + } catch (error42) { + if (error42.status !== 409) throw error42; url2 = ""; return { value: { @@ -101400,7 +102256,7 @@ function parseRepoContext() { } // mcp/shared.ts -var getMcpContext = cached2(() => { +var getMcpContext = cached3(() => { const githubInstallationToken = process.env.GITHUB_INSTALLATION_TOKEN; if (!githubInstallationToken) { throw new Error("GITHUB_INSTALLATION_TOKEN environment variable is required"); @@ -101424,8 +102280,8 @@ var contextualize = (executor) => async (params) => { const ctx = getMcpContext(); const result = await executor(params, ctx); return handleToolSuccess(result); - } catch (error41) { - return handleToolError(error41); + } catch (error42) { + return handleToolError(error42); } }; var handleToolSuccess = (data) => { @@ -101438,8 +102294,8 @@ var handleToolSuccess = (data) => { ] }; }; -var handleToolError = (error41) => { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); +var handleToolError = (error42) => { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); return { content: [ { diff --git a/workflows.ts b/modes.ts similarity index 72% rename from workflows.ts rename to modes.ts index 954a612..028a4be 100644 --- a/workflows.ts +++ b/modes.ts @@ -1,30 +1,32 @@ // MCP name constant - matches action/mcp/config.ts const ghPullfrogMcpName = "gh-pullfrog"; -export const workflows = [ +export const modes = [ { name: "Plan", description: "Create plans, break down tasks, outline steps, analyze requirements, understand scope of work, or provide task breakdowns", prompt: `Follow these steps: -1. Create initial response comment using mcp__${ghPullfrogMcpName}__create_issue_comment saying "I'll {summary of request}" and save the commentId -2. Analyze the request and break it down into clear, actionable tasks -3. Consider dependencies, potential challenges, and implementation order -4. Create a structured plan with clear milestones -5. Update your comment using mcp__${ghPullfrogMcpName}__edit_issue_comment with the commentId to present the plan in a clear, organized format -6. Continue updating the same comment as needed (never create additional comments - always use edit_issue_comment)`, +1. Before beginning, take some time to learn about the codebase. Read the AGENTS.md file if it exists. Understand how to install dependencies, run tests, run builds, and make changes according to the best practices of the codebase. +2. Create initial response comment using mcp__${ghPullfrogMcpName}__create_issue_comment saying "I'll {summary of request}" and save the commentId +3. Analyze the request and break it down into clear, actionable tasks +4. Consider dependencies, potential challenges, and implementation order +5. Create a structured plan with clear milestones +6. Update your comment using mcp__${ghPullfrogMcpName}__edit_issue_comment with the commentId to present the plan in a clear, organized format +7. Continue updating the same comment as needed (never create additional comments - always use edit_issue_comment)`, }, { - name: "Implement", + name: "Build", description: "Implement, build, create, or develop code changes; make specific changes to files or features; execute a plan; or handle tasks with specific implementation details", prompt: `Follow these steps: -1. Create initial response comment using mcp__${ghPullfrogMcpName}__create_issue_comment saying "I'll {summary of request}" and save the commentId -2. Understand the requirements and any existing plan -3. Make the necessary code changes -4. Test your changes to ensure they work correctly -5. Update your comment using mcp__${ghPullfrogMcpName}__edit_issue_comment with the commentId to share progress and results -6. Continue updating the same comment as you make progress (never create additional comments - always use edit_issue_comment)`, +1. Before beginning, take some time to learn about the codebase. Read the AGENTS.md file if it exists. Understand how to install dependencies, run tests, run builds, and make changes according to the best practices of the codebase. +2. Create initial response comment using mcp__${ghPullfrogMcpName}__create_issue_comment saying "I'll {summary of request}" and save the commentId +3. Understand the requirements and any existing plan +4. Make the necessary code changes +5. Test your changes to ensure they work correctly +6. Update your comment using mcp__${ghPullfrogMcpName}__edit_issue_comment with the commentId to share progress and results +7. Continue updating the same comment as you make progress (never create additional comments - always use edit_issue_comment)`, }, { name: "Review", diff --git a/utils/api.ts b/utils/api.ts index 25a3196..9f2624e 100644 --- a/utils/api.ts +++ b/utils/api.ts @@ -2,17 +2,19 @@ import type { AgentName } from "../main.ts"; import { log } from "./cli.ts"; import type { RepoContext } from "./github.ts"; +export interface Mode { + id: string; + name: string; + description: string; + prompt: string; +} + export interface RepoSettings { defaultAgent: AgentName | null; webAccessLevel: "full_access" | "limited"; webAccessAllowTrusted: boolean; webAccessDomains: string; - workflows: Array<{ - id: string; - name: string; - description: string; - prompt: string; - }>; + modes: Mode[]; } export const DEFAULT_REPO_SETTINGS: RepoSettings = { @@ -20,7 +22,7 @@ export const DEFAULT_REPO_SETTINGS: RepoSettings = { webAccessLevel: "full_access", webAccessAllowTrusted: false, webAccessDomains: "", - workflows: [], + modes: [], }; /**