better-design 0.1.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,2772 @@
1
+ #!/usr/bin/env node
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __esm = (fn, res) => function __init() {
5
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
6
+ };
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+
12
+ // ../shared/src/mcp/clients.ts
13
+ var MCP_NAME, API_BASE, MCP_URL, bearer, MCP_CLIENT_SHAPES;
14
+ var init_clients = __esm({
15
+ "../shared/src/mcp/clients.ts"() {
16
+ "use strict";
17
+ MCP_NAME = "better-design";
18
+ API_BASE = process.env.NEXT_PUBLIC_APP_URL || process.env.BETTER_DESIGN_API_URL || "https://better-design.com";
19
+ MCP_URL = `${API_BASE}/api/mcp`;
20
+ bearer = (apiKey) => ({ Authorization: `Bearer ${apiKey}` });
21
+ MCP_CLIENT_SHAPES = {
22
+ "claude-code": {
23
+ kind: "command",
24
+ buildCommand: (apiKey, scope) => ({
25
+ bin: "claude",
26
+ args: [
27
+ "mcp",
28
+ "add",
29
+ "--scope",
30
+ scope === "global" ? "user" : "project",
31
+ MCP_NAME,
32
+ "--transport",
33
+ "http",
34
+ MCP_URL,
35
+ "--header",
36
+ `Authorization: Bearer ${apiKey}`
37
+ ]
38
+ }),
39
+ buildRemoveCommand: (scope) => ({
40
+ bin: "claude",
41
+ args: ["mcp", "remove", "--scope", scope === "global" ? "user" : "project", MCP_NAME]
42
+ })
43
+ },
44
+ cursor: {
45
+ kind: "json",
46
+ rootKey: "mcpServers",
47
+ buildEntry: (apiKey) => ({ url: MCP_URL, headers: bearer(apiKey) })
48
+ },
49
+ vscode: {
50
+ kind: "json",
51
+ rootKey: "servers",
52
+ buildEntry: (apiKey) => ({ type: "http", url: MCP_URL, headers: bearer(apiKey) })
53
+ },
54
+ windsurf: {
55
+ kind: "json",
56
+ rootKey: "mcpServers",
57
+ buildEntry: (apiKey) => ({ serverUrl: MCP_URL, headers: bearer(apiKey) })
58
+ },
59
+ zed: {
60
+ kind: "json",
61
+ rootKey: "context_servers",
62
+ buildEntry: (apiKey) => ({ url: MCP_URL, headers: bearer(apiKey) })
63
+ },
64
+ cline: {
65
+ kind: "json",
66
+ rootKey: "mcpServers",
67
+ buildEntry: (apiKey) => ({
68
+ type: "streamableHttp",
69
+ url: MCP_URL,
70
+ headers: bearer(apiKey),
71
+ disabled: false
72
+ })
73
+ },
74
+ "claude-desktop": {
75
+ kind: "json",
76
+ rootKey: "mcpServers",
77
+ // Claude Desktop only launches stdio processes, so a key-based remote MCP
78
+ // runs through the mcp-remote npx bridge.
79
+ buildEntry: (apiKey) => ({
80
+ command: "npx",
81
+ args: ["-y", "mcp-remote", MCP_URL, "--header", "Authorization:${AUTH_HEADER}"],
82
+ env: { AUTH_HEADER: `Bearer ${apiKey}` }
83
+ })
84
+ },
85
+ opencode: {
86
+ kind: "json",
87
+ rootKey: "mcp",
88
+ buildEntry: (apiKey) => ({
89
+ type: "remote",
90
+ url: MCP_URL,
91
+ enabled: true,
92
+ headers: bearer(apiKey)
93
+ })
94
+ },
95
+ amp: {
96
+ kind: "json",
97
+ rootKey: "amp.mcpServers",
98
+ buildEntry: (apiKey) => ({ url: MCP_URL, headers: bearer(apiKey) })
99
+ },
100
+ codex: {
101
+ kind: "toml",
102
+ blockHeader: `[mcp_servers.${MCP_NAME}]`,
103
+ buildBlock: (apiKey) => `[mcp_servers.${MCP_NAME}]
104
+ url = "${MCP_URL}"
105
+ http_headers = { Authorization = "Bearer ${apiKey}" }`
106
+ },
107
+ continue: {
108
+ kind: "file",
109
+ buildContent: (apiKey) => `name: Better Design MCP
110
+ version: 0.0.1
111
+ schema: v1
112
+ mcpServers:
113
+ - name: ${MCP_NAME}
114
+ type: streamable-http
115
+ url: ${MCP_URL}
116
+ requestOptions:
117
+ headers:
118
+ Authorization: "Bearer ${apiKey}"
119
+ `
120
+ }
121
+ };
122
+ }
123
+ });
124
+
125
+ // src/setup/clients.ts
126
+ import os from "os";
127
+ import path from "path";
128
+ import { existsSync } from "fs";
129
+ function platform() {
130
+ const p = os.platform();
131
+ if (p === "darwin" || p === "win32") return p;
132
+ return "linux";
133
+ }
134
+ function appData() {
135
+ return process.env.APPDATA ?? path.join(home, "AppData", "Roaming");
136
+ }
137
+ function configHome() {
138
+ return process.env.XDG_CONFIG_HOME ?? path.join(home, ".config");
139
+ }
140
+ function appSupport() {
141
+ switch (platform()) {
142
+ case "darwin":
143
+ return path.join(home, "Library", "Application Support");
144
+ case "win32":
145
+ return appData();
146
+ default:
147
+ return configHome();
148
+ }
149
+ }
150
+ function dirExists(...segments) {
151
+ return existsSync(path.join(...segments));
152
+ }
153
+ function onPath(bin) {
154
+ const dirs = (process.env.PATH ?? "").split(path.delimiter);
155
+ const exts = platform() === "win32" ? ["", ".exe", ".cmd", ".bat"] : [""];
156
+ return dirs.some((d) => d && exts.some((ext) => existsSync(path.join(d, bin + ext))));
157
+ }
158
+ function clientById(id) {
159
+ return CLIENTS.find((c) => c.id === id);
160
+ }
161
+ function detectInstalled() {
162
+ return CLIENTS.filter((c) => {
163
+ try {
164
+ return c.detect();
165
+ } catch {
166
+ return false;
167
+ }
168
+ });
169
+ }
170
+ var home, CLIENTS;
171
+ var init_clients2 = __esm({
172
+ "src/setup/clients.ts"() {
173
+ "use strict";
174
+ init_clients();
175
+ home = os.homedir();
176
+ CLIENTS = [
177
+ {
178
+ ...MCP_CLIENT_SHAPES["claude-code"],
179
+ id: "claude-code",
180
+ label: "Claude Code",
181
+ scopes: ["global", "project"],
182
+ detect: () => onPath("claude")
183
+ },
184
+ {
185
+ ...MCP_CLIENT_SHAPES.cursor,
186
+ id: "cursor",
187
+ label: "Cursor",
188
+ scopes: ["global", "project"],
189
+ pathFor: (scope) => scope === "global" ? path.join(home, ".cursor", "mcp.json") : path.join(process.cwd(), ".cursor", "mcp.json"),
190
+ detect: () => dirExists(home, ".cursor")
191
+ },
192
+ {
193
+ ...MCP_CLIENT_SHAPES.vscode,
194
+ id: "vscode",
195
+ label: "VS Code (Copilot)",
196
+ scopes: ["global", "project"],
197
+ pathFor: (scope) => scope === "global" ? path.join(appSupport(), "Code", "User", "mcp.json") : path.join(process.cwd(), ".vscode", "mcp.json"),
198
+ detect: () => dirExists(appSupport(), "Code") || onPath("code")
199
+ },
200
+ {
201
+ ...MCP_CLIENT_SHAPES.windsurf,
202
+ id: "windsurf",
203
+ label: "Windsurf",
204
+ scopes: ["global"],
205
+ pathFor: (scope) => scope === "global" ? path.join(home, ".codeium", "windsurf", "mcp_config.json") : null,
206
+ detect: () => dirExists(home, ".codeium", "windsurf")
207
+ },
208
+ {
209
+ ...MCP_CLIENT_SHAPES.zed,
210
+ id: "zed",
211
+ label: "Zed",
212
+ scopes: ["global"],
213
+ pathFor: (scope) => scope === "global" ? platform() === "win32" ? path.join(appData(), "Zed", "settings.json") : path.join(configHome(), "zed", "settings.json") : null,
214
+ detect: () => dirExists(configHome(), "zed") || dirExists(appSupport(), "Zed") || onPath("zed")
215
+ },
216
+ {
217
+ ...MCP_CLIENT_SHAPES.cline,
218
+ id: "cline",
219
+ label: "Cline (VS Code)",
220
+ scopes: ["global"],
221
+ pathFor: (scope) => scope === "global" ? path.join(
222
+ appSupport(),
223
+ "Code",
224
+ "User",
225
+ "globalStorage",
226
+ "saoudrizwan.claude-dev",
227
+ "settings",
228
+ "cline_mcp_settings.json"
229
+ ) : null,
230
+ detect: () => dirExists(appSupport(), "Code", "User", "globalStorage", "saoudrizwan.claude-dev")
231
+ },
232
+ {
233
+ ...MCP_CLIENT_SHAPES["claude-desktop"],
234
+ id: "claude-desktop",
235
+ label: "Claude Desktop",
236
+ scopes: ["global"],
237
+ pathFor: (scope) => scope === "global" ? platform() === "linux" ? path.join(configHome(), "Claude", "claude_desktop_config.json") : path.join(appSupport(), "Claude", "claude_desktop_config.json") : null,
238
+ detect: () => platform() === "linux" ? dirExists(configHome(), "Claude") : dirExists(appSupport(), "Claude")
239
+ },
240
+ {
241
+ ...MCP_CLIENT_SHAPES.opencode,
242
+ id: "opencode",
243
+ label: "OpenCode",
244
+ scopes: ["global", "project"],
245
+ pathFor: (scope) => scope === "global" ? path.join(configHome(), "opencode", "opencode.json") : path.join(process.cwd(), "opencode.json"),
246
+ detect: () => dirExists(configHome(), "opencode") || onPath("opencode")
247
+ },
248
+ {
249
+ ...MCP_CLIENT_SHAPES.amp,
250
+ id: "amp",
251
+ label: "Amp (Sourcegraph)",
252
+ scopes: ["global"],
253
+ pathFor: (scope) => scope === "global" ? path.join(configHome(), "amp", "settings.json") : null,
254
+ detect: () => dirExists(configHome(), "amp") || onPath("amp")
255
+ },
256
+ {
257
+ ...MCP_CLIENT_SHAPES.codex,
258
+ id: "codex",
259
+ label: "Codex CLI",
260
+ scopes: ["global"],
261
+ pathFor: (scope) => scope === "global" ? path.join(home, ".codex", "config.toml") : null,
262
+ detect: () => dirExists(home, ".codex") || onPath("codex")
263
+ },
264
+ {
265
+ ...MCP_CLIENT_SHAPES.continue,
266
+ id: "continue",
267
+ label: "Continue.dev",
268
+ scopes: ["project"],
269
+ pathFor: (scope) => scope === "project" ? path.join(process.cwd(), ".continue", "mcpServers", "better-design.yaml") : null,
270
+ detect: () => dirExists(home, ".continue") || dirExists(process.cwd(), ".continue")
271
+ }
272
+ ];
273
+ }
274
+ });
275
+
276
+ // src/setup/constants.ts
277
+ var DASHBOARD_URL, RULE_START, RULE_END, RULE_BODY, RULE_BLOCK;
278
+ var init_constants = __esm({
279
+ "src/setup/constants.ts"() {
280
+ "use strict";
281
+ init_clients();
282
+ DASHBOARD_URL = "https://better-design.com/mcp";
283
+ RULE_START = "<!-- better-design:start -->";
284
+ RULE_END = "<!-- better-design:end -->";
285
+ RULE_BODY = `## Better Design
286
+
287
+ Always use the Better Design MCP tools for any frontend, UI, UX, interaction, flow, form, navigation, dialog, error, onboarding, component, or styling work, without me having to explicitly ask. Load visual guidance with \`get-ui-principle\`, load flow/behavior guidance with \`get-ux-principle\`, and self-review against \`get-review-rules\` after. Use \`resolve-design-system\` / \`get-design-system-docs\` to install a design system and \`create-design-system\` to generate a custom one.`;
288
+ RULE_BLOCK = `${RULE_START}
289
+ ${RULE_BODY}
290
+ ${RULE_END}`;
291
+ }
292
+ });
293
+
294
+ // src/setup/fs-utils.ts
295
+ import { chmodSync, existsSync as existsSync2, mkdirSync, readFileSync, writeFileSync } from "fs";
296
+ import os2 from "os";
297
+ import path2 from "path";
298
+ function ensureDir(filePath) {
299
+ mkdirSync(path2.dirname(filePath), { recursive: true });
300
+ }
301
+ function readIfExists(filePath) {
302
+ return existsSync2(filePath) ? readFileSync(filePath, "utf8") : null;
303
+ }
304
+ function backup(filePath) {
305
+ const dest = path2.join(BACKUP_DIR, `${filePath.replace(/[/\\:]/g, "__")}.bak`);
306
+ mkdirSync(BACKUP_DIR, { recursive: true });
307
+ writeFileSync(dest, readFileSync(filePath), { mode: 384 });
308
+ chmodSync(dest, 384);
309
+ return dest;
310
+ }
311
+ var BACKUP_DIR;
312
+ var init_fs_utils = __esm({
313
+ "src/setup/fs-utils.ts"() {
314
+ "use strict";
315
+ BACKUP_DIR = path2.join(os2.homedir(), ".better-design", "backups");
316
+ }
317
+ });
318
+
319
+ // src/setup/config-writer.ts
320
+ import { chmodSync as chmodSync2, writeFileSync as writeFileSync2 } from "fs";
321
+ import { spawnSync } from "child_process";
322
+ function writeSecret(filePath, data) {
323
+ writeFileSync2(filePath, data, { encoding: "utf8", mode: 384 });
324
+ chmodSync2(filePath, 384);
325
+ }
326
+ function noPath(clientId, scope) {
327
+ return { client: clientId, action: "skipped", message: `no ${scope} config path` };
328
+ }
329
+ function isPlainObject(value) {
330
+ return typeof value === "object" && value !== null && !Array.isArray(value);
331
+ }
332
+ function applyJsonClient(client, apiKey, scope, dryRun) {
333
+ const filePath = client.pathFor(scope);
334
+ if (!filePath) return noPath(client.id, scope);
335
+ const entry = client.buildEntry(apiKey);
336
+ const existing = readIfExists(filePath);
337
+ const manual = () => ({
338
+ client: client.id,
339
+ action: "manual",
340
+ filePath,
341
+ message: manualJsonSnippet(client, entry)
342
+ });
343
+ let root = {};
344
+ if (existing && existing.trim()) {
345
+ let parsed;
346
+ try {
347
+ parsed = JSON.parse(existing);
348
+ } catch {
349
+ return manual();
350
+ }
351
+ if (!isPlainObject(parsed)) return manual();
352
+ root = parsed;
353
+ }
354
+ const rawBucket = root[client.rootKey];
355
+ if (rawBucket !== void 0 && !isPlainObject(rawBucket)) return manual();
356
+ const bucket = rawBucket ?? {};
357
+ const isUpdate = Object.prototype.hasOwnProperty.call(bucket, MCP_NAME);
358
+ bucket[MCP_NAME] = entry;
359
+ root[client.rootKey] = bucket;
360
+ if (dryRun) {
361
+ return { client: client.id, action: "would-write", filePath };
362
+ }
363
+ if (existing) backup(filePath);
364
+ ensureDir(filePath);
365
+ writeSecret(filePath, `${JSON.stringify(root, null, 2)}
366
+ `);
367
+ return { client: client.id, action: isUpdate ? "updated" : "added", filePath };
368
+ }
369
+ function manualJsonSnippet(client, entry) {
370
+ const snippet = { [client.rootKey]: { [MCP_NAME]: entry } };
371
+ return `Couldn't safely auto-edit (file has comments or invalid JSON). Add this manually:
372
+ ${JSON.stringify(snippet, null, 2)}`;
373
+ }
374
+ function applyTomlClient(client, apiKey, scope, dryRun) {
375
+ const filePath = client.pathFor(scope);
376
+ if (!filePath) return noPath(client.id, scope);
377
+ const block = client.buildBlock(apiKey);
378
+ const existing = readIfExists(filePath) ?? "";
379
+ const next = upsertTomlBlock(existing, client.blockHeader, block);
380
+ const isUpdate = existing.includes(client.blockHeader);
381
+ if (dryRun) {
382
+ return { client: client.id, action: "would-write", filePath };
383
+ }
384
+ if (existing) backup(filePath);
385
+ ensureDir(filePath);
386
+ writeSecret(filePath, next);
387
+ return { client: client.id, action: isUpdate ? "updated" : "added", filePath };
388
+ }
389
+ function upsertTomlBlock(content, header, block) {
390
+ const lines = content.split("\n");
391
+ const start = lines.findIndex((l) => l.trim() === header);
392
+ if (start === -1) {
393
+ const base = content.trimEnd();
394
+ return base ? `${base}
395
+
396
+ ${block}
397
+ ` : `${block}
398
+ `;
399
+ }
400
+ let end = start + 1;
401
+ while (end < lines.length && !lines[end].trimStart().startsWith("[")) end++;
402
+ const before = lines.slice(0, start).join("\n").trimEnd();
403
+ const after = lines.slice(end).join("\n").trimStart();
404
+ return [before, block, after].filter((s) => s.length > 0).join("\n\n").trimEnd() + "\n";
405
+ }
406
+ function applyFileClient(client, apiKey, scope, dryRun) {
407
+ const filePath = client.pathFor(scope);
408
+ if (!filePath) return noPath(client.id, scope);
409
+ const content = client.buildContent(apiKey);
410
+ const existing = readIfExists(filePath);
411
+ if (existing === content) {
412
+ return { client: client.id, action: "skipped", filePath, message: "already configured" };
413
+ }
414
+ if (dryRun) {
415
+ return { client: client.id, action: "would-write", filePath };
416
+ }
417
+ if (existing) backup(filePath);
418
+ ensureDir(filePath);
419
+ writeSecret(filePath, content);
420
+ return { client: client.id, action: existing ? "updated" : "added", filePath };
421
+ }
422
+ function applyCommandClient(client, apiKey, scope, dryRun) {
423
+ const { bin, args } = client.buildCommand(apiKey, scope);
424
+ if (dryRun) {
425
+ return { client: client.id, action: "would-write", message: `${bin} ${redactArgs(args).join(" ")}` };
426
+ }
427
+ const remove = client.buildRemoveCommand?.(scope);
428
+ if (remove) spawnSync(remove.bin, remove.args, { encoding: "utf8", timeout: COMMAND_TIMEOUT_MS });
429
+ const res = spawnSync(bin, args, { encoding: "utf8", timeout: COMMAND_TIMEOUT_MS });
430
+ if (res.error || res.status !== 0) {
431
+ const reason = res.error?.message ?? res.stderr?.trim() ?? `exit ${res.status}`;
432
+ return { client: client.id, action: "error", message: reason };
433
+ }
434
+ return { client: client.id, action: "added", message: `${bin} mcp add` };
435
+ }
436
+ function redactArgs(args) {
437
+ return args.map((a) => /^Authorization:/i.test(a) ? "Authorization: Bearer ***" : a);
438
+ }
439
+ function applyClient(client, apiKey, scope, dryRun) {
440
+ try {
441
+ switch (client.kind) {
442
+ case "json":
443
+ return applyJsonClient(client, apiKey, scope, dryRun);
444
+ case "toml":
445
+ return applyTomlClient(client, apiKey, scope, dryRun);
446
+ case "file":
447
+ return applyFileClient(client, apiKey, scope, dryRun);
448
+ case "command":
449
+ return applyCommandClient(client, apiKey, scope, dryRun);
450
+ }
451
+ } catch (err) {
452
+ return {
453
+ client: client.id,
454
+ action: "error",
455
+ message: err instanceof Error ? err.message : String(err)
456
+ };
457
+ }
458
+ }
459
+ function resolveScope(client, requested) {
460
+ return client.scopes.includes(requested) ? requested : client.scopes[0];
461
+ }
462
+ var COMMAND_TIMEOUT_MS;
463
+ var init_config_writer = __esm({
464
+ "src/setup/config-writer.ts"() {
465
+ "use strict";
466
+ init_constants();
467
+ init_fs_utils();
468
+ COMMAND_TIMEOUT_MS = 6e4;
469
+ }
470
+ });
471
+
472
+ // src/setup/rule-writer.ts
473
+ import { writeFileSync as writeFileSync3 } from "fs";
474
+ import os3 from "os";
475
+ import path3 from "path";
476
+ function ruleFileFor(clientId, scope) {
477
+ const cwd = process.cwd();
478
+ const home2 = os3.homedir();
479
+ switch (clientId) {
480
+ case "claude-code":
481
+ return scope === "global" ? path3.join(home2, ".claude", "CLAUDE.md") : path3.join(cwd, "CLAUDE.md");
482
+ case "codex":
483
+ return scope === "global" ? path3.join(home2, ".codex", "AGENTS.md") : path3.join(cwd, "AGENTS.md");
484
+ case "continue":
485
+ return scope === "project" ? path3.join(cwd, ".continue", "rules", "better-design.md") : null;
486
+ case "claude-desktop":
487
+ return null;
488
+ // desktop app, no project rule file
489
+ default:
490
+ return AGENTS_MD_CLIENTS.has(clientId) && scope === "project" ? path3.join(cwd, "AGENTS.md") : null;
491
+ }
492
+ }
493
+ function ruleTargets(selectedClientIds, scope) {
494
+ const files = /* @__PURE__ */ new Set();
495
+ const manual = [];
496
+ for (const id of selectedClientIds) {
497
+ const file = ruleFileFor(id, scope);
498
+ if (file) files.add(file);
499
+ else if (id !== "claude-desktop") manual.push(id);
500
+ }
501
+ return { files: [...files], manual };
502
+ }
503
+ function upsertBlock(content, start, end) {
504
+ const before = start === -1 ? content : content.slice(0, start);
505
+ const after = start === -1 ? "" : content.slice(end + RULE_END.length);
506
+ return [before.trim(), RULE_BLOCK, after.trim()].filter(Boolean).join("\n\n") + "\n";
507
+ }
508
+ function writeRule(filePath, dryRun) {
509
+ const existing = readIfExists(filePath) ?? "";
510
+ const start = existing.indexOf(RULE_START);
511
+ const end = start === -1 ? -1 : existing.indexOf(RULE_END, start);
512
+ if (start !== -1 && end === -1) {
513
+ return {
514
+ filePath,
515
+ action: "skipped",
516
+ message: "unterminated better-design marker; left unchanged"
517
+ };
518
+ }
519
+ if (dryRun) return { filePath, action: "would-write" };
520
+ if (existing) backup(filePath);
521
+ ensureDir(filePath);
522
+ writeFileSync3(filePath, upsertBlock(existing, start, end), "utf8");
523
+ return { filePath, action: start === -1 ? "added" : "updated" };
524
+ }
525
+ var AGENTS_MD_CLIENTS;
526
+ var init_rule_writer = __esm({
527
+ "src/setup/rule-writer.ts"() {
528
+ "use strict";
529
+ init_constants();
530
+ init_fs_utils();
531
+ AGENTS_MD_CLIENTS = /* @__PURE__ */ new Set([
532
+ "cursor",
533
+ "vscode",
534
+ "windsurf",
535
+ "zed",
536
+ "cline",
537
+ "amp",
538
+ "opencode"
539
+ ]);
540
+ }
541
+ });
542
+
543
+ // src/setup/args.ts
544
+ function parseArgs(argv2) {
545
+ const args = { dryRun: false, yes: false, noRule: false, help: false };
546
+ for (let i = 0; i < argv2.length; i++) {
547
+ const arg = argv2[i];
548
+ const takeValue = () => {
549
+ const value = argv2[i + 1];
550
+ if (value === void 0 || value.startsWith("-")) return void 0;
551
+ i++;
552
+ return value;
553
+ };
554
+ switch (arg) {
555
+ case "--dry-run":
556
+ args.dryRun = true;
557
+ break;
558
+ case "--yes":
559
+ case "-y":
560
+ args.yes = true;
561
+ break;
562
+ case "--no-rule":
563
+ args.noRule = true;
564
+ break;
565
+ case "--global":
566
+ args.scope = "global";
567
+ break;
568
+ case "--project":
569
+ args.scope = "project";
570
+ break;
571
+ case "--client":
572
+ args.clients = (takeValue() ?? "").split(",").map((s) => s.trim()).filter(Boolean);
573
+ break;
574
+ case "--api-key":
575
+ args.apiKey = takeValue();
576
+ break;
577
+ case "--help":
578
+ case "-h":
579
+ args.help = true;
580
+ break;
581
+ }
582
+ }
583
+ return args;
584
+ }
585
+ var HELP_TEXT;
586
+ var init_args = __esm({
587
+ "src/setup/args.ts"() {
588
+ "use strict";
589
+ HELP_TEXT = `better-design-mcp setup: configure Better Design in your AI clients
590
+
591
+ Usage:
592
+ npx better-design-mcp setup [options]
593
+
594
+ Options:
595
+ --client <ids> Comma-separated client ids to configure (skips detection)
596
+ e.g. claude-code,cursor,vscode
597
+ --global Install at user/global scope (default)
598
+ --project Install at project scope (current directory)
599
+ --api-key <key> API key (else $BETTER_DESIGN_API_KEY or prompt)
600
+ --no-rule Don't write the auto-invoke rule (CLAUDE.md / AGENTS.md)
601
+ --dry-run Show what would change without writing
602
+ --yes, -y Non-interactive; use detected clients and defaults
603
+ --help, -h Show this help
604
+
605
+ Get an API key at https://better-design.com/mcp`;
606
+ }
607
+ });
608
+
609
+ // src/setup/prompts.ts
610
+ import * as clack from "@clack/prompts";
611
+ function ensure(value) {
612
+ if (clack.isCancel(value)) {
613
+ clack.cancel("Setup cancelled.");
614
+ process.exit(0);
615
+ }
616
+ return value;
617
+ }
618
+ var init_prompts = __esm({
619
+ "src/setup/prompts.ts"() {
620
+ "use strict";
621
+ }
622
+ });
623
+
624
+ // src/setup/index.ts
625
+ var setup_exports = {};
626
+ __export(setup_exports, {
627
+ runSetup: () => runSetup
628
+ });
629
+ async function runSetup(argv2) {
630
+ const args = parseArgs(argv2);
631
+ if (args.help) {
632
+ console.log(HELP_TEXT);
633
+ return;
634
+ }
635
+ const interactive = Boolean(process.stdin.isTTY) && !args.yes;
636
+ clack.intro("Better Design setup");
637
+ if (args.dryRun) clack.log.info("Dry run: no files will be written.");
638
+ const apiKey = await getApiKey(args, interactive);
639
+ const clients = await pickClients(args, interactive);
640
+ if (clients.length === 0) {
641
+ clack.outro("No clients selected. Run again or pass --client <ids>.");
642
+ process.exit(interactive ? 0 : 1);
643
+ }
644
+ const scope = await pickScope(args, interactive);
645
+ const writeRuleChoice = args.noRule ? false : await confirmRule(interactive);
646
+ const results = applyAll(clients, apiKey, scope, args.dryRun);
647
+ const rulePlan = writeRuleChoice ? ruleTargets(clients.map((c) => c.id), scope) : { files: [], manual: [] };
648
+ const ruleResults = rulePlan.files.map((f) => writeRule(f, args.dryRun));
649
+ printSummary(results, ruleResults, rulePlan.manual, args);
650
+ }
651
+ async function getApiKey(args, interactive) {
652
+ const fromFlag = args.apiKey ?? process.env.BETTER_DESIGN_API_KEY;
653
+ if (fromFlag) return fromFlag.trim();
654
+ if (!interactive) {
655
+ clack.cancel(`No API key. Pass --api-key or set BETTER_DESIGN_API_KEY. Get one at ${DASHBOARD_URL}`);
656
+ process.exit(1);
657
+ }
658
+ const key = ensure(
659
+ await clack.password({
660
+ message: `Paste your Better Design API key (get one at ${DASHBOARD_URL})`,
661
+ validate: (v) => v && v.trim().length > 0 ? void 0 : "API key is required"
662
+ })
663
+ );
664
+ return key.trim();
665
+ }
666
+ async function pickClients(args, interactive) {
667
+ if (args.clients) {
668
+ return args.clients.map((id) => {
669
+ const c = clientById(id);
670
+ if (!c) {
671
+ clack.cancel(`Unknown client "${id}". Known: ${CLIENTS.map((x) => x.id).join(", ")}`);
672
+ process.exit(1);
673
+ }
674
+ return c;
675
+ });
676
+ }
677
+ const detected = detectInstalled();
678
+ if (!interactive) return detected;
679
+ const detectedIds = new Set(detected.map((c) => c.id));
680
+ const selected = ensure(
681
+ await clack.multiselect({
682
+ message: "Which clients should I configure?",
683
+ options: CLIENTS.map((c) => ({
684
+ value: c.id,
685
+ label: c.label,
686
+ hint: detectedIds.has(c.id) ? "detected" : void 0
687
+ })),
688
+ initialValues: detected.map((c) => c.id),
689
+ required: true
690
+ })
691
+ );
692
+ return selected.map((id) => clientById(id));
693
+ }
694
+ async function pickScope(args, interactive) {
695
+ if (args.scope) return args.scope;
696
+ if (!interactive) return "global";
697
+ return ensure(
698
+ await clack.select({
699
+ message: "Install scope?",
700
+ options: [
701
+ { value: "global", label: "Global", hint: "all projects" },
702
+ { value: "project", label: "Project", hint: "current directory only" }
703
+ ],
704
+ initialValue: "global"
705
+ })
706
+ );
707
+ }
708
+ async function confirmRule(interactive) {
709
+ if (!interactive) return true;
710
+ return ensure(
711
+ await clack.confirm({
712
+ message: "Add an auto-invoke rule to CLAUDE.md so agents use Better Design for UI work?",
713
+ initialValue: true
714
+ })
715
+ );
716
+ }
717
+ function applyAll(clients, apiKey, scope, dryRun) {
718
+ const spinner = clack.spinner();
719
+ spinner.start(dryRun ? "Checking clients" : "Writing client configs");
720
+ const results = clients.map((c) => {
721
+ const used = resolveScope(c, scope);
722
+ const result = applyClient(c, apiKey, used, dryRun);
723
+ if (used !== scope && !result.message) {
724
+ result.message = `installed ${used} (only scope ${c.id} supports)`;
725
+ }
726
+ return result;
727
+ });
728
+ spinner.stop(dryRun ? "Checked clients" : "Wrote client configs");
729
+ return results;
730
+ }
731
+ function printSummary(results, ruleResults, ruleManual, args) {
732
+ const lines = results.map((r) => formatLine(r.action, r.client, r.filePath, r.message));
733
+ for (const rule of ruleResults) {
734
+ lines.push(formatLine(rule.action, "rule", rule.filePath, rule.message));
735
+ }
736
+ for (const id of ruleManual) {
737
+ lines.push(formatLine("manual", `rule (${id})`, void 0, "add it in this client's settings rules"));
738
+ }
739
+ clack.note(lines.join("\n"), args.dryRun ? "Would write" : "Summary");
740
+ const failed = results.filter((r) => r.action === "error" || r.action === "manual").length + ruleResults.filter((r) => r.action === "skipped").length;
741
+ if (args.dryRun) {
742
+ clack.outro("Dry run complete. Re-run without --dry-run to apply.");
743
+ } else if (failed > 0) {
744
+ clack.outro("Done with warnings. Resolve the items above, then restart your client.");
745
+ } else {
746
+ clack.outro("Done. Restart your AI client to load the Better Design tools.");
747
+ }
748
+ }
749
+ function formatLine(action, label, filePath, message) {
750
+ let line = `${icon(action)} ${label}${filePath ? ` ${filePath}` : ""}`;
751
+ if (message) {
752
+ line += action === "manual" || action === "error" ? `
753
+ ${message}` : ` (${message})`;
754
+ }
755
+ return line;
756
+ }
757
+ function icon(action) {
758
+ switch (action) {
759
+ case "added":
760
+ case "updated":
761
+ case "would-write":
762
+ return "\u2713";
763
+ case "skipped":
764
+ return "\u2013";
765
+ default:
766
+ return "\u2717";
767
+ }
768
+ }
769
+ var init_setup = __esm({
770
+ "src/setup/index.ts"() {
771
+ "use strict";
772
+ init_clients2();
773
+ init_config_writer();
774
+ init_rule_writer();
775
+ init_args();
776
+ init_prompts();
777
+ init_constants();
778
+ }
779
+ });
780
+
781
+ // ../shared/src/mcp/instructions.ts
782
+ var INSTRUCTIONS;
783
+ var init_instructions = __esm({
784
+ "../shared/src/mcp/instructions.ts"() {
785
+ "use strict";
786
+ INSTRUCTIONS = `# Better Design
787
+
788
+ Use these tools for ANY frontend, UI, component, or styling work, without being asked.
789
+
790
+ All tools (call by exact name): resolve-design-system, get-design-system-docs, preview-design-system (SHOW a system in-chat), create-design-system, check-design-system-status (poll after create), get-ui-principle, get-ux-principle, get-review-rules, resolve-icon-library, search-icons, install-icons, detect-icon-library.
791
+
792
+ ## Modifying or building UI
793
+ 1. Before visual styling, call get-ui-principle (hierarchy, spacing, typography, color, depth, images, polish, animation), or query.
794
+ 2. Before UX behavior, call get-ux-principle (forms, navigation, notifications, errors, dialogs, search, onboarding, microcopy, cognitive laws), or query.
795
+ 3. Write code with the project's existing design tokens and components. Semantic HTML, aria labels, keyboard nav, WCAG AA contrast (4.5:1 text, 3:1 large).
796
+ 4. After writing UI, call get-review-rules and fix every critical or serious accessibility/visual issue before presenting code.
797
+
798
+ ## Starting fresh, or when the user says "use better-design"
799
+ 1. resolve-design-system(query describing industry/personality/style) -> show matches, let the user pick.
800
+ 2. get-design-system-docs({ designSystemId }) -> run BOTH returned bash lines as-is in the project root. Installs globals.css + every component into components/ui/. Read installed files afterward; use only their tokens, never invented colors/spacing/radius.
801
+ 3. Icons: first read components/icons/.library.json; if present, detect-icon-library and reuse it. Otherwise resolve-icon-library -> search-icons -> install-icons({ libraryId, names }). Never runtime @iconify/react.
802
+ 4. Then follow the "Modifying or building UI" steps above.
803
+ `.trim();
804
+ }
805
+ });
806
+
807
+ // ../shared/src/mcp/icon-installer.ts
808
+ function jsxifyAttrs(svgBody) {
809
+ let out = svgBody;
810
+ for (const [from, to] of Object.entries(KEBAB_TO_CAMEL_ATTRS)) {
811
+ out = out.replace(new RegExp(`\\b${from}=`, "g"), `${to}=`);
812
+ }
813
+ return out;
814
+ }
815
+ function toPascalCase(rawName) {
816
+ const stripped = stripPrefix(rawName);
817
+ const parts = stripped.split(/[-_]+/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1));
818
+ const joined = parts.join("");
819
+ const safe = /^[0-9]/.test(joined) ? `Icon${joined}` : `${joined}Icon`;
820
+ return safe;
821
+ }
822
+ function stripPrefix(name) {
823
+ const idx = name.indexOf(":");
824
+ return idx === -1 ? name : name.slice(idx + 1);
825
+ }
826
+ function parseSvg(rawSvg) {
827
+ const match = rawSvg.match(/<svg([^>]*)>([\s\S]*)<\/svg>/i);
828
+ if (!match) {
829
+ return { viewBox: "0 0 24 24", body: rawSvg.trim() };
830
+ }
831
+ const attrs = match[1] ?? "";
832
+ const body = (match[2] ?? "").trim();
833
+ const viewBoxMatch = attrs.match(/viewBox\s*=\s*"([^"]+)"/i);
834
+ const viewBox = viewBoxMatch?.[1] ?? "0 0 24 24";
835
+ return { viewBox, body };
836
+ }
837
+ function hasOwnStrokeOrFill(body) {
838
+ return /\b(fill|stroke)=/.test(body);
839
+ }
840
+ function buildTsxComponent(opts) {
841
+ const componentName = toPascalCase(opts.iconName);
842
+ const indentedBody = jsxifyAttrs(opts.body).split("\n").map((line) => line.length ? ` ${line}` : line).join("\n");
843
+ const useOutlineDefaults = !hasOwnStrokeOrFill(opts.body);
844
+ const svgAttrs = useOutlineDefaults ? ` fill="none"
845
+ stroke="currentColor"
846
+ strokeWidth="2"
847
+ strokeLinecap="round"
848
+ strokeLinejoin="round"
849
+ ` : "";
850
+ return `// From ${opts.libraryName} \u2014 used via Iconify (https://iconify.design)
851
+ import type { SVGProps } from "react";
852
+
853
+ export function ${componentName}(props: SVGProps<SVGSVGElement>) {
854
+ return (
855
+ <svg
856
+ xmlns="http://www.w3.org/2000/svg"
857
+ viewBox="${opts.viewBox}"
858
+ ${svgAttrs} {...props}
859
+ >
860
+ ${indentedBody}
861
+ </svg>
862
+ );
863
+ }
864
+ `;
865
+ }
866
+ function buildBarrel(entries, options = {}) {
867
+ if (entries.length === 0) return "";
868
+ const lines = entries.map((e) => `export { ${e.componentName} } from "${e.importPath}";`).join("\n");
869
+ const body = `${lines}
870
+ `;
871
+ const { libraryName, prefix } = options;
872
+ if (!libraryName || !prefix) return body;
873
+ const header = [
874
+ `// Icons from ${libraryName} (https://iconify.design/?prefix=${prefix}).`,
875
+ `// To add more: invoke the install-icons MCP tool with libraryId="${prefix}",`,
876
+ `// or run \`bun run add-icon <name>\` if scripts/add-icon.ts exists in this repo.`,
877
+ `// Do NOT mix in icons from other libraries \u2014 see .library.json for the locked choice.`,
878
+ ``,
879
+ ``
880
+ ].join("\n");
881
+ return `${header}${body}`;
882
+ }
883
+ function toFileStem(rawName) {
884
+ const stem = stripPrefix(rawName).toLowerCase().replace(/[^a-z0-9-]/g, "");
885
+ if (!stem) {
886
+ throw new Error(`Icon name "${rawName}" sanitizes to empty stem.`);
887
+ }
888
+ return stem;
889
+ }
890
+ function validateTargetDir(input) {
891
+ const dir = (input ?? "components/icons").replace(/\/+$/g, "");
892
+ if (!dir) return { ok: false, error: "targetDir cannot be empty." };
893
+ if (dir.startsWith("/") || /^[A-Za-z]:/.test(dir)) {
894
+ return { ok: false, error: "targetDir must be a relative path." };
895
+ }
896
+ if (dir.split("/").some((seg) => seg === "..")) {
897
+ return { ok: false, error: "targetDir cannot contain '..' segments." };
898
+ }
899
+ if (dir.includes("\\")) {
900
+ return { ok: false, error: "targetDir cannot contain backslashes." };
901
+ }
902
+ if (/\0/.test(dir)) {
903
+ return { ok: false, error: "targetDir contains invalid characters." };
904
+ }
905
+ return { ok: true, dir };
906
+ }
907
+ var KEBAB_TO_CAMEL_ATTRS;
908
+ var init_icon_installer = __esm({
909
+ "../shared/src/mcp/icon-installer.ts"() {
910
+ "use strict";
911
+ KEBAB_TO_CAMEL_ATTRS = {
912
+ "stroke-width": "strokeWidth",
913
+ "stroke-linecap": "strokeLinecap",
914
+ "stroke-linejoin": "strokeLinejoin",
915
+ "stroke-dasharray": "strokeDasharray",
916
+ "stroke-dashoffset": "strokeDashoffset",
917
+ "stroke-miterlimit": "strokeMiterlimit",
918
+ "stroke-opacity": "strokeOpacity",
919
+ "fill-opacity": "fillOpacity",
920
+ "fill-rule": "fillRule",
921
+ "clip-path": "clipPath",
922
+ "clip-rule": "clipRule",
923
+ "color-interpolation-filters": "colorInterpolationFilters",
924
+ "flood-color": "floodColor",
925
+ "flood-opacity": "floodOpacity",
926
+ "stop-color": "stopColor",
927
+ "stop-opacity": "stopOpacity",
928
+ "text-anchor": "textAnchor",
929
+ "vector-effect": "vectorEffect",
930
+ "paint-order": "paintOrder",
931
+ "shape-rendering": "shapeRendering"
932
+ };
933
+ }
934
+ });
935
+
936
+ // ../shared/src/mcp/guardrails.ts
937
+ var DS_RULES_MD, DS_ESLINT_CONFIG, GUARDRAILS_SETUP_MD;
938
+ var init_guardrails = __esm({
939
+ "../shared/src/mcp/guardrails.ts"() {
940
+ "use strict";
941
+ DS_RULES_MD = `# Design system rules
942
+
943
+ The files in \`components/ui/*\` ARE the design system installed by Better Design.
944
+
945
+ **Compose them. Never hand-roll a primitive the DS already ships.** Rebuilding
946
+ \`Button\` as a raw \`<button>\`, a table as a raw \`<table>\`, or faking a \u2318K palette,
947
+ account menu, or notification bell with bare \`<div>\`s is a bug even when it looks
948
+ right: it only matches because both read the same \`app/globals.css\` tokens, and the
949
+ faked interactive pieces end up dead (the search opens nothing, the menu has no
950
+ items, the bell does nothing).
951
+
952
+ Map each UI need to the installed component BEFORE writing markup:
953
+
954
+ - buttons, nav links (use \`asChild\`) -> \`button\`
955
+ - panels, cards, KPI tiles, section containers -> \`card\`
956
+ - tabular data -> \`table\` (not a raw \`<table>\`)
957
+ - status pills, tags, labels -> \`badge\`
958
+ - \u2318K / search palette -> \`command\` (\`CommandDialog\`)
959
+ - account / overflow / context menus -> \`dropdown-menu\`
960
+ - notification bell, flyouts -> \`popover\` + \`notification\`
961
+ - transient confirmations -> \`use-toast\` + \`toaster\`
962
+ - tooltips -> \`tooltip\` (wrap the app in \`TooltipProvider\`)
963
+ - modals -> \`dialog\`; tab switchers -> \`tabs\`; avatars -> \`avatar\`; dividers -> \`separator\`
964
+ - form fields -> \`input\` / \`textarea\` / \`select\` / \`checkbox\` / \`switch\` / \`radio-group\`
965
+
966
+ Read a component's source from \`components/ui/\` to learn its props/exports. Use only
967
+ the design tokens in \`app/globals.css\`; never invent colors, spacing, or radii.
968
+ `;
969
+ DS_ESLINT_CONFIG = `// Better Design \u2014 design-system guardrail (flat ESLint config fragment).
970
+ // Flags raw HTML primitives in feature code when the installed DS ships an
971
+ // equivalent in components/ui/*. Wire it into eslint.config.mjs:
972
+ //
973
+ // import dsGuardrail from "./.better-design/eslint-design-system.mjs"; // better-design-guardrail
974
+ // export default [ ...dsGuardrail, /* ...your config */ ];
975
+ //
976
+ // Scoped to app/** and components/** but NOT components/ui/** (the DS itself).
977
+ // Bump "warn" -> "error" to fail lint/CI on violations.
978
+ const banned = [
979
+ { selector: "JSXOpeningElement[name.name='button']", message: "Use <Button> from @/components/ui/button instead of a raw <button>." },
980
+ { selector: "JSXOpeningElement[name.name='table']", message: "Use <Table> from @/components/ui/table instead of a raw <table>." },
981
+ { selector: "JSXOpeningElement[name.name='input']", message: "Use <Input> from @/components/ui/input instead of a raw <input>." },
982
+ { selector: "JSXOpeningElement[name.name='select']", message: "Use <Select> from @/components/ui/select instead of a raw <select>." },
983
+ { selector: "JSXOpeningElement[name.name='textarea']", message: "Use <Textarea> from @/components/ui/textarea instead of a raw <textarea>." },
984
+ ];
985
+
986
+ export default [
987
+ {
988
+ files: ["app/**/*.{tsx,jsx}", "components/**/*.{tsx,jsx}"],
989
+ // Exclude the DS itself and co-located tests, which legitimately render raw
990
+ // <button>/<input> for queries/assertions and would otherwise emit noise.
991
+ ignores: ["components/ui/**", "**/*.{test,spec}.{tsx,jsx}", "**/__tests__/**"],
992
+ rules: { "no-restricted-syntax": ["warn", ...banned] },
993
+ },
994
+ ];
995
+ `;
996
+ GUARDRAILS_SETUP_MD = `## Set up the design-system guardrails (one-time, idempotent)
997
+
998
+ These keep feature code composing the installed components instead of re-building
999
+ primitives. Apply all three; never overwrite a user-owned file, only create-if-missing
1000
+ or append a guarded block.
1001
+
1002
+ **1. Rules doc** \u2014 write \`.better-design/rules.md\` (skip if the install already wrote it):
1003
+
1004
+ \`\`\`md
1005
+ ${DS_RULES_MD}\`\`\`
1006
+
1007
+ **2. Reference it from the agent config files** (create if missing, append if absent, never clobber):
1008
+ - \`CLAUDE.md\`: ensure it contains the line \`@.better-design/rules.md\`.
1009
+ - \`AGENTS.md\`: AGENTS.md has no import mechanic, so inline the rule in a marker block. Append if \`better-design:start\` is absent; replace between markers if present:
1010
+ \`\`\`
1011
+ <!-- better-design:start -->
1012
+ Compose the installed components/ui/* primitives; never hand-roll a <button>/<table>/<input>/<dialog> or fake a \u2318K palette / menu / notification bell. Use only app/globals.css design tokens. See .better-design/rules.md.
1013
+ <!-- better-design:end -->
1014
+ \`\`\`
1015
+
1016
+ **3. ESLint guardrail** \u2014 write \`.better-design/eslint-design-system.mjs\` (skip if the install already wrote it):
1017
+
1018
+ \`\`\`js
1019
+ ${DS_ESLINT_CONFIG}\`\`\`
1020
+
1021
+ Then wire it into the project's \`eslint.config.mjs\` (flat config), guarded so re-runs don't duplicate \u2014 skip if the marker \`// better-design-guardrail\` is already present:
1022
+
1023
+ \`\`\`js
1024
+ import dsGuardrail from "./.better-design/eslint-design-system.mjs"; // better-design-guardrail
1025
+ // spread ...dsGuardrail into the exported config array
1026
+ \`\`\`
1027
+
1028
+ After wiring, \`npm run lint\` flags raw primitives in feature code (warnings; bump to "error" to gate CI).
1029
+ `;
1030
+ }
1031
+ });
1032
+
1033
+ // ../shared/src/mcp/preview-widget-sdk.generated.ts
1034
+ var PREVIEW_WIDGET_SDK_JS;
1035
+ var init_preview_widget_sdk_generated = __esm({
1036
+ "../shared/src/mcp/preview-widget-sdk.generated.ts"() {
1037
+ "use strict";
1038
+ PREVIEW_WIDGET_SDK_JS = 'var __require=(typeof globalThis!=="undefined"&&globalThis.__require)||function(n){throw new Error("ext-apps runtime require() unavailable in browser: "+n);};\n(()=>{var ye=Object.defineProperty;var jr=(r,i)=>{for(var v in i)ye(r,v,{get:i[v],enumerable:!0,configurable:!0,set:(u)=>i[v]=()=>u})};var O=(r,i)=>()=>(r&&(i=r(r=0)),i);function e(r,i,v){function u($,b){if(!$._zod)Object.defineProperty($,"_zod",{value:{def:b,constr:o,traits:new Set},enumerable:!1});if($._zod.traits.has(r))return;$._zod.traits.add(r),i($,b);let g=o.prototype,c=Object.keys(g);for(let U=0;U<c.length;U++){let w=c[U];if(!(w in $))$[w]=g[w].bind($)}}let n=v?.Parent??Object;class t extends n{}Object.defineProperty(t,"name",{value:r});function o($){var b;let g=v?.Parent?new t:this;u(g,$),(b=g._zod).deferred??(b.deferred=[]);for(let c of g._zod.deferred)c();return g}return Object.defineProperty(o,"init",{value:u}),Object.defineProperty(o,Symbol.hasInstance,{value:($)=>{if(v?.Parent&&$ instanceof v.Parent)return!0;return $?._zod?.traits?.has(r)}}),Object.defineProperty(o,"name",{value:r}),o}function Z(r){if(r)Object.assign(fr,r);return fr}var N6,Ot,St,Lr,dr,fr;var yr=O(()=>{Ot=Object.freeze({status:"aborted"});St=Symbol("zod_brand");Lr=class Lr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};dr=class dr extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`);this.name="ZodEncodeError"}};(N6=globalThis).__zod_globalConfig??(N6.__zod_globalConfig={});fr=globalThis.__zod_globalConfig});var N={};jr(N,{unwrapMessage:()=>sn,uint8ArrayToHex:()=>m_,uint8ArrayToBase64url:()=>k_,uint8ArrayToBase64:()=>O6,stringifyPrimitive:()=>D,slugify:()=>Zu,shallowClone:()=>Cu,safeExtend:()=>e_,required:()=>U_,randomString:()=>u_,propertyKeyTypes:()=>ii,promiseAllObject:()=>v_,primitiveTypes:()=>fu,prefixIssues:()=>br,pick:()=>l_,partial:()=>I_,parsedType:()=>k,optionalKeys:()=>du,omit:()=>b_,objectClone:()=>n_,numKeys:()=>o_,nullish:()=>Hr,normalizeParams:()=>z,mergeDefs:()=>Wr,merge:()=>__,jsonStringifyReplacer:()=>mn,joinValues:()=>_,issue:()=>On,isPlainObject:()=>Er,isObject:()=>hr,hexToUint8Array:()=>N_,getSizableOrigin:()=>ti,getParsedType:()=>$_,getLengthableOrigin:()=>vi,getEnumValues:()=>ri,getElementAtPath:()=>t_,floatSafeRemainder:()=>Ru,finalizeIssue:()=>$r,extend:()=>c_,explicitlyAborted:()=>pu,escapeRegex:()=>wr,esc:()=>Pt,defineLazy:()=>G,createTransparentProxy:()=>g_,cloneDef:()=>i_,clone:()=>tr,cleanRegex:()=>ni,cleanEnum:()=>D_,captureStackTrace:()=>jt,cached:()=>zn,base64urlToUint8Array:()=>w_,base64ToUint8Array:()=>z6,assignProp:()=>Fr,assertNotEqual:()=>pe,assertNever:()=>se,assertIs:()=>ae,assertEqual:()=>he,assert:()=>r_,allowsEval:()=>Qu,aborted:()=>Tr,NUMBER_FORMAT_RANGES:()=>yu,Class:()=>S6,BIGINT_FORMAT_RANGES:()=>hu});function he(r){return r}function pe(r){return r}function ae(r){}function se(r){throw Error("Unexpected value in exhaustive check")}function r_(r){}function ri(r){let i=Object.values(r).filter((u)=>typeof u==="number");return Object.entries(r).filter(([u,n])=>i.indexOf(+u)===-1).map(([u,n])=>n)}function _(r,i="|"){return r.map((v)=>D(v)).join(i)}function mn(r,i){if(typeof i==="bigint")return i.toString();return i}function zn(r){return{get value(){{let v=r();return Object.defineProperty(this,"value",{value:v}),v}throw Error("cached value already set")}}}function Hr(r){return r===null||r===void 0}function ni(r){let i=r.startsWith("^")?1:0,v=r.endsWith("$")?r.length-1:r.length;return r.slice(i,v)}function Ru(r,i){let v=r/i,u=Math.round(v),n=Number.EPSILON*Math.max(Math.abs(v),1);if(Math.abs(v-u)<n)return 0;return v-u}function G(r,i,v){let u=void 0;Object.defineProperty(r,i,{get(){if(u===m6)return;if(u===void 0)u=m6,u=v();return u},set(n){Object.defineProperty(r,i,{value:n})},configurable:!0})}function n_(r){return Object.create(Object.getPrototypeOf(r),Object.getOwnPropertyDescriptors(r))}function Fr(r,i,v){Object.defineProperty(r,i,{value:v,writable:!0,enumerable:!0,configurable:!0})}function Wr(...r){let i={};for(let v of r){let u=Object.getOwnPropertyDescriptors(v);Object.assign(i,u)}return Object.defineProperties({},i)}function i_(r){return Wr(r._zod.def)}function t_(r,i){if(!i)return r;return i.reduce((v,u)=>v?.[u],r)}function v_(r){let i=Object.keys(r),v=i.map((u)=>r[u]);return Promise.all(v).then((u)=>{let n={};for(let t=0;t<i.length;t++)n[i[t]]=u[t];return n})}function u_(r=10){let v="";for(let u=0;u<r;u++)v+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return v}function Pt(r){return JSON.stringify(r)}function Zu(r){return r.toLowerCase().trim().replace(/[^\\w\\s-]/g,"").replace(/[\\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function hr(r){return typeof r==="object"&&r!==null&&!Array.isArray(r)}function Er(r){if(hr(r)===!1)return!1;let i=r.constructor;if(i===void 0)return!0;if(typeof i!=="function")return!0;let v=i.prototype;if(hr(v)===!1)return!1;if(Object.prototype.hasOwnProperty.call(v,"isPrototypeOf")===!1)return!1;return!0}function Cu(r){if(Er(r))return{...r};if(Array.isArray(r))return[...r];if(r instanceof Map)return new Map(r);if(r instanceof Set)return new Set(r);return r}function o_(r){let i=0;for(let v in r)if(Object.prototype.hasOwnProperty.call(r,v))i++;return i}function wr(r){return r.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}function tr(r,i,v){let u=new r._zod.constr(i??r._zod.def);if(!i||v?.parent)u._zod.parent=r;return u}function z(r){let i=r;if(!i)return{};if(typeof i==="string")return{error:()=>i};if(i?.message!==void 0){if(i?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");i.error=i.message}if(delete i.message,typeof i.error==="string")return{...i,error:()=>i.error};return i}function g_(r){let i;return new Proxy({},{get(v,u,n){return i??(i=r()),Reflect.get(i,u,n)},set(v,u,n,t){return i??(i=r()),Reflect.set(i,u,n,t)},has(v,u){return i??(i=r()),Reflect.has(i,u)},deleteProperty(v,u){return i??(i=r()),Reflect.deleteProperty(i,u)},ownKeys(v){return i??(i=r()),Reflect.ownKeys(i)},getOwnPropertyDescriptor(v,u){return i??(i=r()),Reflect.getOwnPropertyDescriptor(i,u)},defineProperty(v,u,n){return i??(i=r()),Reflect.defineProperty(i,u,n)}})}function D(r){if(typeof r==="bigint")return r.toString()+"n";if(typeof r==="string")return`"${r}"`;return`${r}`}function du(r){return Object.keys(r).filter((i)=>{return r[i]._zod.optin==="optional"&&r[i]._zod.optout==="optional"})}function l_(r,i){let v=r._zod.def,u=v.checks;if(u&&u.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let t=Wr(r._zod.def,{get shape(){let o={};for(let $ in i){if(!($ in v.shape))throw Error(`Unrecognized key: "${$}"`);if(!i[$])continue;o[$]=v.shape[$]}return Fr(this,"shape",o),o},checks:[]});return tr(r,t)}function b_(r,i){let v=r._zod.def,u=v.checks;if(u&&u.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let t=Wr(r._zod.def,{get shape(){let o={...r._zod.def.shape};for(let $ in i){if(!($ in v.shape))throw Error(`Unrecognized key: "${$}"`);if(!i[$])continue;delete o[$]}return Fr(this,"shape",o),o},checks:[]});return tr(r,t)}function c_(r,i){if(!Er(i))throw Error("Invalid input to extend: expected a plain object");let v=r._zod.def.checks;if(v&&v.length>0){let t=r._zod.def.shape;for(let o in i)if(Object.getOwnPropertyDescriptor(t,o)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=Wr(r._zod.def,{get shape(){let t={...r._zod.def.shape,...i};return Fr(this,"shape",t),t}});return tr(r,n)}function e_(r,i){if(!Er(i))throw Error("Invalid input to safeExtend: expected a plain object");let v=Wr(r._zod.def,{get shape(){let u={...r._zod.def.shape,...i};return Fr(this,"shape",u),u}});return tr(r,v)}function __(r,i){if(r._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let v=Wr(r._zod.def,{get shape(){let u={...r._zod.def.shape,...i._zod.def.shape};return Fr(this,"shape",u),u},get catchall(){return i._zod.def.catchall},checks:i._zod.def.checks??[]});return tr(r,v)}function I_(r,i,v){let n=i._zod.def.checks;if(n&&n.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let o=Wr(i._zod.def,{get shape(){let $=i._zod.def.shape,b={...$};if(v)for(let g in v){if(!(g in $))throw Error(`Unrecognized key: "${g}"`);if(!v[g])continue;b[g]=r?new r({type:"optional",innerType:$[g]}):$[g]}else for(let g in $)b[g]=r?new r({type:"optional",innerType:$[g]}):$[g];return Fr(this,"shape",b),b},checks:[]});return tr(i,o)}function U_(r,i,v){let u=Wr(i._zod.def,{get shape(){let n=i._zod.def.shape,t={...n};if(v)for(let o in v){if(!(o in t))throw Error(`Unrecognized key: "${o}"`);if(!v[o])continue;t[o]=new r({type:"nonoptional",innerType:n[o]})}else for(let o in n)t[o]=new r({type:"nonoptional",innerType:n[o]});return Fr(this,"shape",t),t}});return tr(i,u)}function Tr(r,i=0){if(r.aborted===!0)return!0;for(let v=i;v<r.issues.length;v++)if(r.issues[v]?.continue!==!0)return!0;return!1}function pu(r,i=0){if(r.aborted===!0)return!0;for(let v=i;v<r.issues.length;v++)if(r.issues[v]?.continue===!1)return!0;return!1}function br(r,i){return i.map((v)=>{var u;return(u=v).path??(u.path=[]),v.path.unshift(r),v})}function sn(r){return typeof r==="string"?r:r?.message}function $r(r,i,v){let u=r.message?r.message:sn(r.inst?._zod.def?.error?.(r))??sn(i?.error?.(r))??sn(v.customError?.(r))??sn(v.localeError?.(r))??"Invalid input",{inst:n,continue:t,input:o,...$}=r;if($.path??($.path=[]),$.message=u,i?.reportInput)$.input=o;return $}function ti(r){if(r instanceof Set)return"set";if(r instanceof Map)return"map";if(r instanceof File)return"file";return"unknown"}function vi(r){if(Array.isArray(r))return"array";if(typeof r==="string")return"string";return"unknown"}function k(r){let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"nan":"number";case"object":{if(r===null)return"null";if(Array.isArray(r))return"array";let v=r;if(v&&Object.getPrototypeOf(v)!==Object.prototype&&"constructor"in v&&v.constructor)return v.constructor.name}}return i}function On(...r){let[i,v,u]=r;if(typeof i==="string")return{message:i,code:"custom",input:v,inst:u};return{...i}}function D_(r){return Object.entries(r).filter(([i,v])=>{return Number.isNaN(Number.parseInt(i,10))}).map((i)=>i[1])}function z6(r){let i=atob(r),v=new Uint8Array(i.length);for(let u=0;u<i.length;u++)v[u]=i.charCodeAt(u);return v}function O6(r){let i="";for(let v=0;v<r.length;v++)i+=String.fromCharCode(r[v]);return btoa(i)}function w_(r){let i=r.replace(/-/g,"+").replace(/_/g,"/"),v="=".repeat((4-i.length%4)%4);return z6(i+v)}function k_(r){return O6(r).replace(/\\+/g,"-").replace(/\\//g,"_").replace(/=/g,"")}function N_(r){let i=r.replace(/^0x/,"");if(i.length%2!==0)throw Error("Invalid hex string length");let v=new Uint8Array(i.length/2);for(let u=0;u<i.length;u+=2)v[u/2]=Number.parseInt(i.slice(u,u+2),16);return v}function m_(r){return Array.from(r).map((i)=>i.toString(16).padStart(2,"0")).join("")}class S6{constructor(...r){}}var m6,jt,Qu,$_=(r)=>{let i=typeof r;switch(i){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(r)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(r))return"array";if(r===null)return"null";if(r.then&&typeof r.then==="function"&&r.catch&&typeof r.catch==="function")return"promise";if(typeof Map<"u"&&r instanceof Map)return"map";if(typeof Set<"u"&&r instanceof Set)return"set";if(typeof Date<"u"&&r instanceof Date)return"date";if(typeof File<"u"&&r instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${i}`)}},ii,fu,yu,hu;var j=O(()=>{yr();m6=Symbol("evaluating");jt="captureStackTrace"in Error?Error.captureStackTrace:(...r)=>{};Qu=zn(()=>{if(fr.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(r){return!1}});ii=new Set(["string","number","symbol"]),fu=new Set(["string","number","bigint","boolean","symbol","undefined"]);yu={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},hu={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]}});function Sn(r,i=(v)=>v.message){let v={},u=[];for(let n of r.issues)if(n.path.length>0)v[n.path[0]]=v[n.path[0]]||[],v[n.path[0]].push(i(n));else u.push(i(n));return{formErrors:u,fieldErrors:v}}function Pn(r,i=(v)=>v.message){let v={_errors:[]},u=(n,t=[])=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(($)=>u({issues:$},[...t,...o.path]));else if(o.code==="invalid_key")u({issues:o.issues},[...t,...o.path]);else if(o.code==="invalid_element")u({issues:o.issues},[...t,...o.path]);else{let $=[...t,...o.path];if($.length===0)v._errors.push(i(o));else{let b=v,g=0;while(g<$.length){let c=$[g];if(g!==$.length-1)b[c]=b[c]||{_errors:[]};else b[c]=b[c]||{_errors:[]},b[c]._errors.push(i(o));b=b[c],g++}}}};return u(r),v}function Lt(r,i=(v)=>v.message){let v={errors:[]},u=(n,t=[])=>{var o,$;for(let b of n.issues)if(b.code==="invalid_union"&&b.errors.length)b.errors.map((g)=>u({issues:g},[...t,...b.path]));else if(b.code==="invalid_key")u({issues:b.issues},[...t,...b.path]);else if(b.code==="invalid_element")u({issues:b.issues},[...t,...b.path]);else{let g=[...t,...b.path];if(g.length===0){v.errors.push(i(b));continue}let c=v,U=0;while(U<g.length){let w=g[U],m=U===g.length-1;if(typeof w==="string")c.properties??(c.properties={}),(o=c.properties)[w]??(o[w]={errors:[]}),c=c.properties[w];else c.items??(c.items=[]),($=c.items)[w]??($[w]={errors:[]}),c=c.items[w];if(m)c.errors.push(i(b));U++}}};return u(r),v}function j6(r){let i=[],v=r.map((u)=>typeof u==="object"?u.key:u);for(let u of v)if(typeof u==="number")i.push(`[${u}]`);else if(typeof u==="symbol")i.push(`[${JSON.stringify(String(u))}]`);else if(/[^\\w$]/.test(u))i.push(`[${JSON.stringify(u)}]`);else{if(i.length)i.push(".");i.push(u)}return i.join("")}function At(r){let i=[],v=[...r.issues].sort((u,n)=>(u.path??[]).length-(n.path??[]).length);for(let u of v)if(i.push(`\u2716 ${u.message}`),u.path?.length)i.push(` \u2192 at ${j6(u.path)}`);return i.join(`\n`)}var P6=(r,i)=>{r.name="$ZodError",Object.defineProperty(r,"_zod",{value:r._zod,enumerable:!1}),Object.defineProperty(r,"issues",{value:i,enumerable:!1}),r.message=JSON.stringify(i,mn,2),Object.defineProperty(r,"toString",{value:()=>r.message,enumerable:!1})},ui,cr;var au=O(()=>{yr();j();ui=e("$ZodError",P6),cr=e("$ZodError",P6,{Parent:Error})});var jn=(r)=>(i,v,u,n)=>{let t=u?{...u,async:!1}:{async:!1},o=i._zod.run({value:v,issues:[]},t);if(o instanceof Promise)throw new Lr;if(o.issues.length){let $=new(n?.Err??r)(o.issues.map((b)=>$r(b,t,Z())));throw jt($,n?.callee),$}return o.value},oi,Ln=(r)=>async(i,v,u,n)=>{let t=u?{...u,async:!0}:{async:!0},o=i._zod.run({value:v,issues:[]},t);if(o instanceof Promise)o=await o;if(o.issues.length){let $=new(n?.Err??r)(o.issues.map((b)=>$r(b,t,Z())));throw jt($,n?.callee),$}return o.value},$i,An=(r)=>(i,v,u)=>{let n=u?{...u,async:!1}:{async:!1},t=i._zod.run({value:v,issues:[]},n);if(t instanceof Promise)throw new Lr;return t.issues.length?{success:!1,error:new(r??ui)(t.issues.map((o)=>$r(o,n,Z())))}:{success:!0,data:t.value}},Jn,Wn=(r)=>async(i,v,u)=>{let n=u?{...u,async:!0}:{async:!0},t=i._zod.run({value:v,issues:[]},n);if(t instanceof Promise)t=await t;return t.issues.length?{success:!1,error:new r(t.issues.map((o)=>$r(o,n,Z())))}:{success:!0,data:t.value}},gi,Jt=(r)=>(i,v,u)=>{let n=u?{...u,direction:"backward"}:{direction:"backward"};return jn(r)(i,v,n)},L6,Wt=(r)=>(i,v,u)=>{return jn(r)(i,v,u)},A6,Vt=(r)=>async(i,v,u)=>{let n=u?{...u,direction:"backward"}:{direction:"backward"};return Ln(r)(i,v,n)},J6,Gt=(r)=>async(i,v,u)=>{return Ln(r)(i,v,u)},W6,Kt=(r)=>(i,v,u)=>{let n=u?{...u,direction:"backward"}:{direction:"backward"};return An(r)(i,v,n)},V6,Bt=(r)=>(i,v,u)=>{return An(r)(i,v,u)},G6,Ht=(r)=>async(i,v,u)=>{let n=u?{...u,direction:"backward"}:{direction:"backward"};return Wn(r)(i,v,n)},K6,Ft=(r)=>async(i,v,u)=>{return Wn(r)(i,v,u)},B6;var su=O(()=>{yr();au();j();oi=jn(cr),$i=Ln(cr),Jn=An(cr),gi=Wn(cr),L6=Jt(cr),A6=Wt(cr),J6=Vt(cr),W6=Gt(cr),V6=Kt(cr),G6=Bt(cr),K6=Ht(cr),B6=Ft(cr)});var er={};jr(er,{xid:()=>to,uuid7:()=>j_,uuid6:()=>P_,uuid4:()=>S_,uuid:()=>pr,uppercase:()=>Jo,unicodeEmail:()=>H6,undefined:()=>Lo,ulid:()=>io,time:()=>No,string:()=>zo,sha512_hex:()=>C_,sha512_base64url:()=>d_,sha512_base64:()=>f_,sha384_hex:()=>R_,sha384_base64url:()=>Q_,sha384_base64:()=>Z_,sha256_hex:()=>Y_,sha256_base64url:()=>X_,sha256_base64:()=>q_,sha1_hex:()=>T_,sha1_base64url:()=>M_,sha1_base64:()=>x_,rfc5322Email:()=>A_,number:()=>li,null:()=>jo,nanoid:()=>uo,md5_hex:()=>H_,md5_base64url:()=>E_,md5_base64:()=>F_,mac:()=>eo,lowercase:()=>Ao,ksuid:()=>vo,ipv6:()=>co,ipv4:()=>bo,integer:()=>So,idnEmail:()=>J_,httpProtocol:()=>Do,html5Email:()=>L_,hostname:()=>G_,hex:()=>B_,guid:()=>$o,extendedDuration:()=>O_,emoji:()=>lo,email:()=>go,e164:()=>wo,duration:()=>oo,domain:()=>K_,datetime:()=>mo,date:()=>ko,cuid2:()=>no,cuid:()=>ro,cidrv6:()=>Io,cidrv4:()=>_o,browserEmail:()=>W_,boolean:()=>Po,bigint:()=>Oo,base64url:()=>Et,base64:()=>Uo});function lo(){return new RegExp(V_,"u")}function E6(r){return typeof r.precision==="number"?r.precision===-1?"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d":r.precision===0?"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d":`(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\\\\.\\\\d{${r.precision}}`:"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?"}function No(r){return new RegExp(`^${E6(r)}$`)}function mo(r){let i=E6({precision:r.precision}),v=["Z"];if(r.local)v.push("");if(r.offset)v.push("([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)");let u=`${i}(?:${v.join("|")})`;return new RegExp(`^${F6}T(?:${u})$`)}function bi(r,i){return new RegExp(`^[A-Za-z0-9+/]{${r}}${i}$`)}function ci(r){return new RegExp(`^[A-Za-z0-9_-]{${r}}$`)}var ro,no,io,to,vo,uo,oo,O_,$o,pr=(r)=>{if(!r)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|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${r}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},S_,P_,j_,go,L_,A_,H6,J_,W_,V_="^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$",bo,co,eo=(r)=>{let i=wr(r??":");return new RegExp(`^(?:[0-9A-F]{2}${i}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${i}){5}[0-9a-f]{2}$`)},_o,Io,Uo,Et,G_,K_,Do,wo,F6="(?:(?:\\\\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])))",ko,zo=(r)=>{let i=r?`[\\\\s\\\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\\\s\\\\S]*";return new RegExp(`^${i}$`)},Oo,So,li,Po,jo,Lo,Ao,Jo,B_,H_,F_,E_,T_,x_,M_,Y_,q_,X_,R_,Z_,Q_,C_,f_,d_;var Tt=O(()=>{j();ro=/^[cC][0-9a-z]{6,}$/,no=/^[0-9a-z]+$/,io=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,to=/^[0-9a-vA-V]{20}$/,vo=/^[A-Za-z0-9]{27}$/,uo=/^[a-zA-Z0-9_-]{21}$/,oo=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,O_=/^[-+]?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)?)??$/,$o=/^([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})$/,S_=pr(4),P_=pr(6),j_=pr(7),go=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_\'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,L_=/^[a-zA-Z0-9.!#$%&\'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,A_=/^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,H6=/^[^\\s@"]{1,64}@[^\\s@]{1,255}$/u,J_=H6,W_=/^[a-zA-Z0-9.!#$%&\'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;bo=/^(?:(?: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])$/,co=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,_o=/^((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])\\/([0-9]|[1-2][0-9]|3[0-2])$/,Io=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Uo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Et=/^[A-Za-z0-9_-]*$/,G_=/^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/,K_=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/,Do=/^https?$/,wo=/^\\+[1-9]\\d{6,14}$/,ko=new RegExp(`^${F6}$`);Oo=/^-?\\d+n?$/,So=/^-?\\d+$/,li=/^-?\\d+(?:\\.\\d+)?$/,Po=/^(?:true|false)$/i,jo=/^null$/i,Lo=/^undefined$/i,Ao=/^[^A-Z]*$/,Jo=/^[^a-z]*$/,B_=/^[0-9a-fA-F]*$/;H_=/^[0-9a-fA-F]{32}$/,F_=bi(22,"=="),E_=ci(22),T_=/^[0-9a-fA-F]{40}$/,x_=bi(27,"="),M_=ci(27),Y_=/^[0-9a-fA-F]{64}$/,q_=bi(43,"="),X_=ci(43),R_=/^[0-9a-fA-F]{96}$/,Z_=bi(64,""),Q_=ci(64),C_=/^[0-9a-fA-F]{128}$/,f_=bi(86,"=="),d_=ci(86)});function T6(r,i,v){if(r.issues.length)i.issues.push(...br(v,r.issues))}var X,x6,xt,Mt,Wo,Vo,Go,Ko,Bo,Ho,Fo,Eo,To,Vn,xo,Mo,Yo,qo,Xo,Ro,Zo,Qo,Co;var Yt=O(()=>{yr();Tt();j();X=e("$ZodCheck",(r,i)=>{var v;r._zod??(r._zod={}),r._zod.def=i,(v=r._zod).onattach??(v.onattach=[])}),x6={number:"number",bigint:"bigint",object:"date"},xt=e("$ZodCheckLessThan",(r,i)=>{X.init(r,i);let v=x6[typeof i.value];r._zod.onattach.push((u)=>{let n=u._zod.bag,t=(i.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(i.value<t)if(i.inclusive)n.maximum=i.value;else n.exclusiveMaximum=i.value}),r._zod.check=(u)=>{if(i.inclusive?u.value<=i.value:u.value<i.value)return;u.issues.push({origin:v,code:"too_big",maximum:typeof i.value==="object"?i.value.getTime():i.value,input:u.value,inclusive:i.inclusive,inst:r,continue:!i.abort})}}),Mt=e("$ZodCheckGreaterThan",(r,i)=>{X.init(r,i);let v=x6[typeof i.value];r._zod.onattach.push((u)=>{let n=u._zod.bag,t=(i.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(i.value>t)if(i.inclusive)n.minimum=i.value;else n.exclusiveMinimum=i.value}),r._zod.check=(u)=>{if(i.inclusive?u.value>=i.value:u.value>i.value)return;u.issues.push({origin:v,code:"too_small",minimum:typeof i.value==="object"?i.value.getTime():i.value,input:u.value,inclusive:i.inclusive,inst:r,continue:!i.abort})}}),Wo=e("$ZodCheckMultipleOf",(r,i)=>{X.init(r,i),r._zod.onattach.push((v)=>{var u;(u=v._zod.bag).multipleOf??(u.multipleOf=i.value)}),r._zod.check=(v)=>{if(typeof v.value!==typeof i.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof v.value==="bigint"?v.value%i.value===BigInt(0):Ru(v.value,i.value)===0)return;v.issues.push({origin:typeof v.value,code:"not_multiple_of",divisor:i.value,input:v.value,inst:r,continue:!i.abort})}}),Vo=e("$ZodCheckNumberFormat",(r,i)=>{X.init(r,i),i.format=i.format||"float64";let v=i.format?.includes("int"),u=v?"int":"number",[n,t]=yu[i.format];r._zod.onattach.push((o)=>{let $=o._zod.bag;if($.format=i.format,$.minimum=n,$.maximum=t,v)$.pattern=So}),r._zod.check=(o)=>{let $=o.value;if(v){if(!Number.isInteger($)){o.issues.push({expected:u,format:i.format,code:"invalid_type",continue:!1,input:$,inst:r});return}if(!Number.isSafeInteger($)){if($>0)o.issues.push({input:$,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:u,inclusive:!0,continue:!i.abort});else o.issues.push({input:$,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:u,inclusive:!0,continue:!i.abort});return}}if($<n)o.issues.push({origin:"number",input:$,code:"too_small",minimum:n,inclusive:!0,inst:r,continue:!i.abort});if($>t)o.issues.push({origin:"number",input:$,code:"too_big",maximum:t,inclusive:!0,inst:r,continue:!i.abort})}}),Go=e("$ZodCheckBigIntFormat",(r,i)=>{X.init(r,i);let[v,u]=hu[i.format];r._zod.onattach.push((n)=>{let t=n._zod.bag;t.format=i.format,t.minimum=v,t.maximum=u}),r._zod.check=(n)=>{let t=n.value;if(t<v)n.issues.push({origin:"bigint",input:t,code:"too_small",minimum:v,inclusive:!0,inst:r,continue:!i.abort});if(t>u)n.issues.push({origin:"bigint",input:t,code:"too_big",maximum:u,inclusive:!0,inst:r,continue:!i.abort})}}),Ko=e("$ZodCheckMaxSize",(r,i)=>{var v;X.init(r,i),(v=r._zod.def).when??(v.when=(u)=>{let n=u.value;return!Hr(n)&&n.size!==void 0}),r._zod.onattach.push((u)=>{let n=u._zod.bag.maximum??Number.POSITIVE_INFINITY;if(i.maximum<n)u._zod.bag.maximum=i.maximum}),r._zod.check=(u)=>{let n=u.value;if(n.size<=i.maximum)return;u.issues.push({origin:ti(n),code:"too_big",maximum:i.maximum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),Bo=e("$ZodCheckMinSize",(r,i)=>{var v;X.init(r,i),(v=r._zod.def).when??(v.when=(u)=>{let n=u.value;return!Hr(n)&&n.size!==void 0}),r._zod.onattach.push((u)=>{let n=u._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(i.minimum>n)u._zod.bag.minimum=i.minimum}),r._zod.check=(u)=>{let n=u.value;if(n.size>=i.minimum)return;u.issues.push({origin:ti(n),code:"too_small",minimum:i.minimum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),Ho=e("$ZodCheckSizeEquals",(r,i)=>{var v;X.init(r,i),(v=r._zod.def).when??(v.when=(u)=>{let n=u.value;return!Hr(n)&&n.size!==void 0}),r._zod.onattach.push((u)=>{let n=u._zod.bag;n.minimum=i.size,n.maximum=i.size,n.size=i.size}),r._zod.check=(u)=>{let n=u.value,t=n.size;if(t===i.size)return;let o=t>i.size;u.issues.push({origin:ti(n),...o?{code:"too_big",maximum:i.size}:{code:"too_small",minimum:i.size},inclusive:!0,exact:!0,input:u.value,inst:r,continue:!i.abort})}}),Fo=e("$ZodCheckMaxLength",(r,i)=>{var v;X.init(r,i),(v=r._zod.def).when??(v.when=(u)=>{let n=u.value;return!Hr(n)&&n.length!==void 0}),r._zod.onattach.push((u)=>{let n=u._zod.bag.maximum??Number.POSITIVE_INFINITY;if(i.maximum<n)u._zod.bag.maximum=i.maximum}),r._zod.check=(u)=>{let n=u.value;if(n.length<=i.maximum)return;let o=vi(n);u.issues.push({origin:o,code:"too_big",maximum:i.maximum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),Eo=e("$ZodCheckMinLength",(r,i)=>{var v;X.init(r,i),(v=r._zod.def).when??(v.when=(u)=>{let n=u.value;return!Hr(n)&&n.length!==void 0}),r._zod.onattach.push((u)=>{let n=u._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(i.minimum>n)u._zod.bag.minimum=i.minimum}),r._zod.check=(u)=>{let n=u.value;if(n.length>=i.minimum)return;let o=vi(n);u.issues.push({origin:o,code:"too_small",minimum:i.minimum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),To=e("$ZodCheckLengthEquals",(r,i)=>{var v;X.init(r,i),(v=r._zod.def).when??(v.when=(u)=>{let n=u.value;return!Hr(n)&&n.length!==void 0}),r._zod.onattach.push((u)=>{let n=u._zod.bag;n.minimum=i.length,n.maximum=i.length,n.length=i.length}),r._zod.check=(u)=>{let n=u.value,t=n.length;if(t===i.length)return;let o=vi(n),$=t>i.length;u.issues.push({origin:o,...$?{code:"too_big",maximum:i.length}:{code:"too_small",minimum:i.length},inclusive:!0,exact:!0,input:u.value,inst:r,continue:!i.abort})}}),Vn=e("$ZodCheckStringFormat",(r,i)=>{var v,u;if(X.init(r,i),r._zod.onattach.push((n)=>{let t=n._zod.bag;if(t.format=i.format,i.pattern)t.patterns??(t.patterns=new Set),t.patterns.add(i.pattern)}),i.pattern)(v=r._zod).check??(v.check=(n)=>{if(i.pattern.lastIndex=0,i.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:i.format,input:n.value,...i.pattern?{pattern:i.pattern.toString()}:{},inst:r,continue:!i.abort})});else(u=r._zod).check??(u.check=()=>{})}),xo=e("$ZodCheckRegex",(r,i)=>{Vn.init(r,i),r._zod.check=(v)=>{if(i.pattern.lastIndex=0,i.pattern.test(v.value))return;v.issues.push({origin:"string",code:"invalid_format",format:"regex",input:v.value,pattern:i.pattern.toString(),inst:r,continue:!i.abort})}}),Mo=e("$ZodCheckLowerCase",(r,i)=>{i.pattern??(i.pattern=Ao),Vn.init(r,i)}),Yo=e("$ZodCheckUpperCase",(r,i)=>{i.pattern??(i.pattern=Jo),Vn.init(r,i)}),qo=e("$ZodCheckIncludes",(r,i)=>{X.init(r,i);let v=wr(i.includes),u=new RegExp(typeof i.position==="number"?`^.{${i.position}}${v}`:v);i.pattern=u,r._zod.onattach.push((n)=>{let t=n._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(u)}),r._zod.check=(n)=>{if(n.value.includes(i.includes,i.position))return;n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:i.includes,input:n.value,inst:r,continue:!i.abort})}}),Xo=e("$ZodCheckStartsWith",(r,i)=>{X.init(r,i);let v=new RegExp(`^${wr(i.prefix)}.*`);i.pattern??(i.pattern=v),r._zod.onattach.push((u)=>{let n=u._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(v)}),r._zod.check=(u)=>{if(u.value.startsWith(i.prefix))return;u.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:i.prefix,input:u.value,inst:r,continue:!i.abort})}}),Ro=e("$ZodCheckEndsWith",(r,i)=>{X.init(r,i);let v=new RegExp(`.*${wr(i.suffix)}$`);i.pattern??(i.pattern=v),r._zod.onattach.push((u)=>{let n=u._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(v)}),r._zod.check=(u)=>{if(u.value.endsWith(i.suffix))return;u.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:i.suffix,input:u.value,inst:r,continue:!i.abort})}});Zo=e("$ZodCheckProperty",(r,i)=>{X.init(r,i),r._zod.check=(v)=>{let u=i.schema._zod.run({value:v.value[i.property],issues:[]},{});if(u instanceof Promise)return u.then((n)=>T6(n,v,i.property));T6(u,v,i.property);return}}),Qo=e("$ZodCheckMimeType",(r,i)=>{X.init(r,i);let v=new Set(i.mime);r._zod.onattach.push((u)=>{u._zod.bag.mime=i.mime}),r._zod.check=(u)=>{if(v.has(u.value.type))return;u.issues.push({code:"invalid_value",values:i.mime,input:u.value.type,inst:r,continue:!i.abort})}}),Co=e("$ZodCheckOverwrite",(r,i)=>{X.init(r,i),r._zod.check=(v)=>{v.value=i.tx(v.value)}})});class qt{constructor(r=[]){if(this.content=[],this.indent=0,this)this.args=r}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r==="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let v=r.split(`\n`).filter((t)=>t),u=Math.min(...v.map((t)=>t.length-t.trimStart().length)),n=v.map((t)=>t.slice(u)).map((t)=>" ".repeat(this.indent*2)+t);for(let t of n)this.content.push(t)}compile(){let r=Function,i=this?.args,u=[...(this?.content??[""]).map((n)=>` ${n}`)];return new r(...i,u.join(`\n`))}}var fo;var yo=O(()=>{fo={major:4,minor:4,patch:3}});function w$(r){if(r==="")return!0;if(/\\s/.test(r))return!1;if(r.length%4!==0)return!1;try{return atob(r),!0}catch{return!1}}function rc(r){if(!Et.test(r))return!1;let i=r.replace(/[-_]/g,(u)=>u==="-"?"+":"/"),v=i.padEnd(Math.ceil(i.length/4)*4,"=");return w$(v)}function nc(r,i=null){try{let v=r.split(".");if(v.length!==3)return!1;let[u]=v;if(!u)return!1;let n=JSON.parse(atob(u));if("typ"in n&&n?.typ!=="JWT")return!1;if(!n.alg)return!1;if(i&&(!("alg"in n)||n.alg!==i))return!1;return!0}catch{return!1}}function Y6(r,i,v){if(r.issues.length)i.issues.push(...br(v,r.issues));i.value[v]=r.value}function Qt(r,i,v,u,n,t){let o=v in u;if(r.issues.length){if(n&&t&&!o)return;i.issues.push(...br(v,r.issues))}if(!o&&!n){if(!r.issues.length)i.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[v]});return}if(r.value===void 0){if(o)i.value[v]=void 0}else i.value[v]=r.value}function ic(r){let i=Object.keys(r.shape);for(let u of i)if(!r.shape?.[u]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${u}": expected a Zod schema`);let v=du(r.shape);return{...r,keys:i,keySet:new Set(i),numKeys:i.length,optionalKeys:new Set(v)}}function tc(r,i,v,u,n,t){let o=[],$=n.keySet,b=n.catchall._zod,g=b.def.type,c=b.optin==="optional",U=b.optout==="optional";for(let w in i){if(w==="__proto__")continue;if($.has(w))continue;if(g==="never"){o.push(w);continue}let m=b.run({value:i[w],issues:[]},u);if(m instanceof Promise)r.push(m.then((A)=>Qt(A,v,w,i,c,U)));else Qt(m,v,w,i,c,U)}if(o.length)v.issues.push({code:"unrecognized_keys",keys:o,input:i,inst:t});if(!r.length)return v;return Promise.all(r).then(()=>{return v})}function q6(r,i,v,u){for(let t of r)if(t.issues.length===0)return i.value=t.value,i;let n=r.filter((t)=>!Tr(t));if(n.length===1)return i.value=n[0].value,n[0];return i.issues.push({code:"invalid_union",input:i.value,inst:v,errors:r.map((t)=>t.issues.map((o)=>$r(o,u,Z())))}),i}function X6(r,i,v,u){let n=r.filter((t)=>t.issues.length===0);if(n.length===1)return i.value=n[0].value,i;if(n.length===0)i.issues.push({code:"invalid_union",input:i.value,inst:v,errors:r.map((t)=>t.issues.map((o)=>$r(o,u,Z())))});else i.issues.push({code:"invalid_union",input:i.value,inst:v,errors:[],inclusive:!1});return i}function ho(r,i){if(r===i)return{valid:!0,data:r};if(r instanceof Date&&i instanceof Date&&+r===+i)return{valid:!0,data:r};if(Er(r)&&Er(i)){let v=Object.keys(i),u=Object.keys(r).filter((t)=>v.indexOf(t)!==-1),n={...r,...i};for(let t of u){let o=ho(r[t],i[t]);if(!o.valid)return{valid:!1,mergeErrorPath:[t,...o.mergeErrorPath]};n[t]=o.data}return{valid:!0,data:n}}if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return{valid:!1,mergeErrorPath:[]};let v=[];for(let u=0;u<r.length;u++){let n=r[u],t=i[u],o=ho(n,t);if(!o.valid)return{valid:!1,mergeErrorPath:[u,...o.mergeErrorPath]};v.push(o.data)}return{valid:!0,data:v}}return{valid:!1,mergeErrorPath:[]}}function R6(r,i,v){let u=new Map,n;for(let $ of i.issues)if($.code==="unrecognized_keys"){n??(n=$);for(let b of $.keys){if(!u.has(b))u.set(b,{});u.get(b).l=!0}}else r.issues.push($);for(let $ of v.issues)if($.code==="unrecognized_keys")for(let b of $.keys){if(!u.has(b))u.set(b,{});u.get(b).r=!0}else r.issues.push($);let t=[...u].filter(([,$])=>$.l&&$.r).map(([$])=>$);if(t.length&&n)r.issues.push({...n,keys:t});if(Tr(r))return r;let o=ho(i.value,v.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return r.value=o.data,r}function Z6(r,i){for(let v=r.length-1;v>=0;v--)if(r[v]._zod[i]!=="optional")return v+1;return 0}function Q6(r,i,v){if(r.issues.length)i.issues.push(...br(v,r.issues));i.value[v]=r.value}function C6(r,i,v,u,n){for(let t=0;t<v.length;t++){let o=r[t],$=t<u.length;if(o.issues.length){if(!$&&t>=n){i.value.length=t;break}i.issues.push(...br(t,o.issues))}i.value[t]=o.value}for(let t=i.value.length-1;t>=u.length;t--)if(v[t]._zod.optout==="optional"&&i.value[t]===void 0)i.value.length=t;else break;return i}function f6(r,i,v,u,n,t,o){if(r.issues.length)if(ii.has(typeof u))v.issues.push(...br(u,r.issues));else v.issues.push({code:"invalid_key",origin:"map",input:n,inst:t,issues:r.issues.map(($)=>$r($,o,Z()))});if(i.issues.length)if(ii.has(typeof u))v.issues.push(...br(u,i.issues));else v.issues.push({origin:"map",code:"invalid_element",input:n,inst:t,key:u,issues:i.issues.map(($)=>$r($,o,Z()))});v.value.set(r.value,i.value)}function d6(r,i){if(r.issues.length)i.issues.push(...r.issues);i.value.add(r.value)}function y6(r,i){if(i===void 0&&(r.issues.length||r.fallback))return{issues:[],value:void 0};return r}function h6(r,i){if(r.value===void 0)r.value=i.defaultValue;return r}function p6(r,i){if(!r.issues.length&&r.value===void 0)r.issues.push({code:"invalid_type",expected:"nonoptional",input:r.value,inst:i});return r}function Xt(r,i,v){if(r.issues.length)return r.aborted=!0,r;return i._zod.run({value:r.value,issues:r.issues,fallback:r.fallback},v)}function Rt(r,i,v){if(r.issues.length)return r.aborted=!0,r;if((v.direction||"forward")==="forward"){let n=i.transform(r.value,r);if(n instanceof Promise)return n.then((t)=>Zt(r,t,i.out,v));return Zt(r,n,i.out,v)}else{let n=i.reverseTransform(r.value,r);if(n instanceof Promise)return n.then((t)=>Zt(r,t,i.in,v));return Zt(r,n,i.in,v)}}function Zt(r,i,v,u){if(r.issues.length)return r.aborted=!0,r;return v._zod.run({value:i,issues:r.issues},u)}function a6(r){return r.value=Object.freeze(r.value),r}function s6(r,i,v,u){if(!r){let n={code:"custom",input:v,inst:u,path:[...u._zod.def.path??[]],continue:!u._zod.def.abort};if(u._zod.def.params)n.params=u._zod.def.params;i.issues.push(On(n))}}var J,ar,Y,po,ao,so,r$,n$,i$,t$,v$,u$,o$,$$,g$,l$,b$,c$,e$,_$,I$,U$,D$,k$,N$,m$,z$,O$,Ct,S$,ei,ft,P$,j$,L$,A$,J$,W$,V$,G$,K$,B$,vc,H$,_i,F$,E$,T$,dt,x$,M$,Y$,q$,X$,R$,Z$,yt,Q$,C$,f$,d$,y$,h$,p$,a$,ht,Ii,s$,rg,ng,ig,tg,vg,ug;var og=O(()=>{Yt();yr();su();Tt();j();yo();j();J=e("$ZodType",(r,i)=>{var v;r??(r={}),r._zod.def=i,r._zod.bag=r._zod.bag||{},r._zod.version=fo;let u=[...r._zod.def.checks??[]];if(r._zod.traits.has("$ZodCheck"))u.unshift(r);for(let n of u)for(let t of n._zod.onattach)t(r);if(u.length===0)(v=r._zod).deferred??(v.deferred=[]),r._zod.deferred?.push(()=>{r._zod.run=r._zod.parse});else{let n=(o,$,b)=>{let g=Tr(o),c;for(let U of $){if(U._zod.def.when){if(pu(o))continue;if(!U._zod.def.when(o))continue}else if(g)continue;let w=o.issues.length,m=U._zod.check(o);if(m instanceof Promise&&b?.async===!1)throw new Lr;if(c||m instanceof Promise)c=(c??Promise.resolve()).then(async()=>{if(await m,o.issues.length===w)return;if(!g)g=Tr(o,w)});else{if(o.issues.length===w)continue;if(!g)g=Tr(o,w)}}if(c)return c.then(()=>{return o});return o},t=(o,$,b)=>{if(Tr(o))return o.aborted=!0,o;let g=n($,u,b);if(g instanceof Promise){if(b.async===!1)throw new Lr;return g.then((c)=>r._zod.parse(c,b))}return r._zod.parse(g,b)};r._zod.run=(o,$)=>{if($.skipChecks)return r._zod.parse(o,$);if($.direction==="backward"){let g=r._zod.parse({value:o.value,issues:[]},{...$,skipChecks:!0});if(g instanceof Promise)return g.then((c)=>{return t(c,o,$)});return t(g,o,$)}let b=r._zod.parse(o,$);if(b instanceof Promise){if($.async===!1)throw new Lr;return b.then((g)=>n(g,u,$))}return n(b,u,$)}}G(r,"~standard",()=>({validate:(n)=>{try{let t=Jn(r,n);return t.success?{value:t.data}:{issues:t.error?.issues}}catch(t){return gi(r,n).then((o)=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),ar=e("$ZodString",(r,i)=>{J.init(r,i),r._zod.pattern=[...r?._zod.bag?.patterns??[]].pop()??zo(r._zod.bag),r._zod.parse=(v,u)=>{if(i.coerce)try{v.value=String(v.value)}catch(n){}if(typeof v.value==="string")return v;return v.issues.push({expected:"string",code:"invalid_type",input:v.value,inst:r}),v}}),Y=e("$ZodStringFormat",(r,i)=>{Vn.init(r,i),ar.init(r,i)}),po=e("$ZodGUID",(r,i)=>{i.pattern??(i.pattern=$o),Y.init(r,i)}),ao=e("$ZodUUID",(r,i)=>{if(i.version){let u={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[i.version];if(u===void 0)throw Error(`Invalid UUID version: "${i.version}"`);i.pattern??(i.pattern=pr(u))}else i.pattern??(i.pattern=pr());Y.init(r,i)}),so=e("$ZodEmail",(r,i)=>{i.pattern??(i.pattern=go),Y.init(r,i)}),r$=e("$ZodURL",(r,i)=>{Y.init(r,i),r._zod.check=(v)=>{try{let u=v.value.trim();if(!i.normalize&&i.protocol?.source===Do.source){if(!/^https?:\\/\\//i.test(u)){v.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:v.value,inst:r,continue:!i.abort});return}}let n=new URL(u);if(i.hostname){if(i.hostname.lastIndex=0,!i.hostname.test(n.hostname))v.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:i.hostname.source,input:v.value,inst:r,continue:!i.abort})}if(i.protocol){if(i.protocol.lastIndex=0,!i.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol))v.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:i.protocol.source,input:v.value,inst:r,continue:!i.abort})}if(i.normalize)v.value=n.href;else v.value=u;return}catch(u){v.issues.push({code:"invalid_format",format:"url",input:v.value,inst:r,continue:!i.abort})}}}),n$=e("$ZodEmoji",(r,i)=>{i.pattern??(i.pattern=lo()),Y.init(r,i)}),i$=e("$ZodNanoID",(r,i)=>{i.pattern??(i.pattern=uo),Y.init(r,i)}),t$=e("$ZodCUID",(r,i)=>{i.pattern??(i.pattern=ro),Y.init(r,i)}),v$=e("$ZodCUID2",(r,i)=>{i.pattern??(i.pattern=no),Y.init(r,i)}),u$=e("$ZodULID",(r,i)=>{i.pattern??(i.pattern=io),Y.init(r,i)}),o$=e("$ZodXID",(r,i)=>{i.pattern??(i.pattern=to),Y.init(r,i)}),$$=e("$ZodKSUID",(r,i)=>{i.pattern??(i.pattern=vo),Y.init(r,i)}),g$=e("$ZodISODateTime",(r,i)=>{i.pattern??(i.pattern=mo(i)),Y.init(r,i)}),l$=e("$ZodISODate",(r,i)=>{i.pattern??(i.pattern=ko),Y.init(r,i)}),b$=e("$ZodISOTime",(r,i)=>{i.pattern??(i.pattern=No(i)),Y.init(r,i)}),c$=e("$ZodISODuration",(r,i)=>{i.pattern??(i.pattern=oo),Y.init(r,i)}),e$=e("$ZodIPv4",(r,i)=>{i.pattern??(i.pattern=bo),Y.init(r,i),r._zod.bag.format="ipv4"}),_$=e("$ZodIPv6",(r,i)=>{i.pattern??(i.pattern=co),Y.init(r,i),r._zod.bag.format="ipv6",r._zod.check=(v)=>{try{new URL(`http://[${v.value}]`)}catch{v.issues.push({code:"invalid_format",format:"ipv6",input:v.value,inst:r,continue:!i.abort})}}}),I$=e("$ZodMAC",(r,i)=>{i.pattern??(i.pattern=eo(i.delimiter)),Y.init(r,i),r._zod.bag.format="mac"}),U$=e("$ZodCIDRv4",(r,i)=>{i.pattern??(i.pattern=_o),Y.init(r,i)}),D$=e("$ZodCIDRv6",(r,i)=>{i.pattern??(i.pattern=Io),Y.init(r,i),r._zod.check=(v)=>{let u=v.value.split("/");try{if(u.length!==2)throw Error();let[n,t]=u;if(!t)throw Error();let o=Number(t);if(`${o}`!==t)throw Error();if(o<0||o>128)throw Error();new URL(`http://[${n}]`)}catch{v.issues.push({code:"invalid_format",format:"cidrv6",input:v.value,inst:r,continue:!i.abort})}}});k$=e("$ZodBase64",(r,i)=>{i.pattern??(i.pattern=Uo),Y.init(r,i),r._zod.bag.contentEncoding="base64",r._zod.check=(v)=>{if(w$(v.value))return;v.issues.push({code:"invalid_format",format:"base64",input:v.value,inst:r,continue:!i.abort})}});N$=e("$ZodBase64URL",(r,i)=>{i.pattern??(i.pattern=Et),Y.init(r,i),r._zod.bag.contentEncoding="base64url",r._zod.check=(v)=>{if(rc(v.value))return;v.issues.push({code:"invalid_format",format:"base64url",input:v.value,inst:r,continue:!i.abort})}}),m$=e("$ZodE164",(r,i)=>{i.pattern??(i.pattern=wo),Y.init(r,i)});z$=e("$ZodJWT",(r,i)=>{Y.init(r,i),r._zod.check=(v)=>{if(nc(v.value,i.alg))return;v.issues.push({code:"invalid_format",format:"jwt",input:v.value,inst:r,continue:!i.abort})}}),O$=e("$ZodCustomStringFormat",(r,i)=>{Y.init(r,i),r._zod.check=(v)=>{if(i.fn(v.value))return;v.issues.push({code:"invalid_format",format:i.format,input:v.value,inst:r,continue:!i.abort})}}),Ct=e("$ZodNumber",(r,i)=>{J.init(r,i),r._zod.pattern=r._zod.bag.pattern??li,r._zod.parse=(v,u)=>{if(i.coerce)try{v.value=Number(v.value)}catch(o){}let n=v.value;if(typeof n==="number"&&!Number.isNaN(n)&&Number.isFinite(n))return v;let t=typeof n==="number"?Number.isNaN(n)?"NaN":!Number.isFinite(n)?"Infinity":void 0:void 0;return v.issues.push({expected:"number",code:"invalid_type",input:n,inst:r,...t?{received:t}:{}}),v}}),S$=e("$ZodNumberFormat",(r,i)=>{Vo.init(r,i),Ct.init(r,i)}),ei=e("$ZodBoolean",(r,i)=>{J.init(r,i),r._zod.pattern=Po,r._zod.parse=(v,u)=>{if(i.coerce)try{v.value=Boolean(v.value)}catch(t){}let n=v.value;if(typeof n==="boolean")return v;return v.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:r}),v}}),ft=e("$ZodBigInt",(r,i)=>{J.init(r,i),r._zod.pattern=Oo,r._zod.parse=(v,u)=>{if(i.coerce)try{v.value=BigInt(v.value)}catch(n){}if(typeof v.value==="bigint")return v;return v.issues.push({expected:"bigint",code:"invalid_type",input:v.value,inst:r}),v}}),P$=e("$ZodBigIntFormat",(r,i)=>{Go.init(r,i),ft.init(r,i)}),j$=e("$ZodSymbol",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{let n=v.value;if(typeof n==="symbol")return v;return v.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:r}),v}}),L$=e("$ZodUndefined",(r,i)=>{J.init(r,i),r._zod.pattern=Lo,r._zod.values=new Set([void 0]),r._zod.parse=(v,u)=>{let n=v.value;if(typeof n>"u")return v;return v.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:r}),v}}),A$=e("$ZodNull",(r,i)=>{J.init(r,i),r._zod.pattern=jo,r._zod.values=new Set([null]),r._zod.parse=(v,u)=>{let n=v.value;if(n===null)return v;return v.issues.push({expected:"null",code:"invalid_type",input:n,inst:r}),v}}),J$=e("$ZodAny",(r,i)=>{J.init(r,i),r._zod.parse=(v)=>v}),W$=e("$ZodUnknown",(r,i)=>{J.init(r,i),r._zod.parse=(v)=>v}),V$=e("$ZodNever",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{return v.issues.push({expected:"never",code:"invalid_type",input:v.value,inst:r}),v}}),G$=e("$ZodVoid",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{let n=v.value;if(typeof n>"u")return v;return v.issues.push({expected:"void",code:"invalid_type",input:n,inst:r}),v}}),K$=e("$ZodDate",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{if(i.coerce)try{v.value=new Date(v.value)}catch($){}let n=v.value,t=n instanceof Date;if(t&&!Number.isNaN(n.getTime()))return v;return v.issues.push({expected:"date",code:"invalid_type",input:n,...t?{received:"Invalid Date"}:{},inst:r}),v}});B$=e("$ZodArray",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{let n=v.value;if(!Array.isArray(n))return v.issues.push({expected:"array",code:"invalid_type",input:n,inst:r}),v;v.value=Array(n.length);let t=[];for(let o=0;o<n.length;o++){let $=n[o],b=i.element._zod.run({value:$,issues:[]},u);if(b instanceof Promise)t.push(b.then((g)=>Y6(g,v,o)));else Y6(b,v,o)}if(t.length)return Promise.all(t).then(()=>v);return v}});vc=e("$ZodObject",(r,i)=>{if(J.init(r,i),!Object.getOwnPropertyDescriptor(i,"shape")?.get){let $=i.shape;Object.defineProperty(i,"shape",{get:()=>{let b={...$};return Object.defineProperty(i,"shape",{value:b}),b}})}let u=zn(()=>ic(i));G(r._zod,"propValues",()=>{let $=i.shape,b={};for(let g in $){let c=$[g]._zod;if(c.values){b[g]??(b[g]=new Set);for(let U of c.values)b[g].add(U)}}return b});let n=hr,t=i.catchall,o;r._zod.parse=($,b)=>{o??(o=u.value);let g=$.value;if(!n(g))return $.issues.push({expected:"object",code:"invalid_type",input:g,inst:r}),$;$.value={};let c=[],U=o.shape;for(let w of o.keys){let m=U[w],A=m._zod.optin==="optional",ir=m._zod.optout==="optional",R=m._zod.run({value:g[w],issues:[]},b);if(R instanceof Promise)c.push(R.then((f)=>Qt(f,$,w,g,A,ir)));else Qt(R,$,w,g,A,ir)}if(!t)return c.length?Promise.all(c).then(()=>$):$;return tc(c,g,$,b,u.value,r)}}),H$=e("$ZodObjectJIT",(r,i)=>{vc.init(r,i);let v=r._zod.parse,u=zn(()=>ic(i)),n=(w)=>{let m=new qt(["shape","payload","ctx"]),A=u.value,ir=(or)=>{let Q=Pt(or);return`shape[${Q}]._zod.run({ value: input[${Q}], issues: [] }, ctx)`};m.write("const input = payload.value;");let R=Object.create(null),f=0;for(let or of A.keys)R[or]=`key_${f++}`;m.write("const newResult = {};");for(let or of A.keys){let Q=R[or],a=Pt(or),w6=w[or],k6=w6?._zod?.optin==="optional",de=w6?._zod?.optout==="optional";if(m.write(`const ${Q} = ${ir(or)};`),k6&&de)m.write(`\n if (${Q}.issues.length) {\n if (${a} in input) {\n payload.issues = payload.issues.concat(${Q}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n }\n \n if (${Q}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${Q}.value;\n }\n \n `);else if(!k6)m.write(`\n const ${Q}_present = ${a} in input;\n if (${Q}.issues.length) {\n payload.issues = payload.issues.concat(${Q}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n if (!${Q}_present && !${Q}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${a}]\n });\n }\n\n if (${Q}_present) {\n if (${Q}.value === undefined) {\n newResult[${a}] = undefined;\n } else {\n newResult[${a}] = ${Q}.value;\n }\n }\n\n `);else m.write(`\n if (${Q}.issues.length) {\n payload.issues = payload.issues.concat(${Q}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n \n if (${Q}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${Q}.value;\n }\n \n `)}m.write("payload.value = newResult;"),m.write("return payload;");let Ur=m.compile();return(or,Q)=>Ur(w,or,Q)},t,o=hr,$=!fr.jitless,g=$&&Qu.value,c=i.catchall,U;r._zod.parse=(w,m)=>{U??(U=u.value);let A=w.value;if(!o(A))return w.issues.push({expected:"object",code:"invalid_type",input:A,inst:r}),w;if($&&g&&m?.async===!1&&m.jitless!==!0){if(!t)t=n(i.shape);if(w=t(w,m),!c)return w;return tc([],A,w,m,U,r)}return v(w,m)}});_i=e("$ZodUnion",(r,i)=>{J.init(r,i),G(r._zod,"optin",()=>i.options.some((u)=>u._zod.optin==="optional")?"optional":void 0),G(r._zod,"optout",()=>i.options.some((u)=>u._zod.optout==="optional")?"optional":void 0),G(r._zod,"values",()=>{if(i.options.every((u)=>u._zod.values))return new Set(i.options.flatMap((u)=>Array.from(u._zod.values)));return}),G(r._zod,"pattern",()=>{if(i.options.every((u)=>u._zod.pattern)){let u=i.options.map((n)=>n._zod.pattern);return new RegExp(`^(${u.map((n)=>ni(n.source)).join("|")})$`)}return});let v=i.options.length===1?i.options[0]._zod.run:null;r._zod.parse=(u,n)=>{if(v)return v(u,n);let t=!1,o=[];for(let $ of i.options){let b=$._zod.run({value:u.value,issues:[]},n);if(b instanceof Promise)o.push(b),t=!0;else{if(b.issues.length===0)return b;o.push(b)}}if(!t)return q6(o,u,r,n);return Promise.all(o).then(($)=>{return q6($,u,r,n)})}});F$=e("$ZodXor",(r,i)=>{_i.init(r,i),i.inclusive=!1;let v=i.options.length===1?i.options[0]._zod.run:null;r._zod.parse=(u,n)=>{if(v)return v(u,n);let t=!1,o=[];for(let $ of i.options){let b=$._zod.run({value:u.value,issues:[]},n);if(b instanceof Promise)o.push(b),t=!0;else o.push(b)}if(!t)return X6(o,u,r,n);return Promise.all(o).then(($)=>{return X6($,u,r,n)})}}),E$=e("$ZodDiscriminatedUnion",(r,i)=>{i.inclusive=!1,_i.init(r,i);let v=r._zod.parse;G(r._zod,"propValues",()=>{let n={};for(let t of i.options){let o=t._zod.propValues;if(!o||Object.keys(o).length===0)throw Error(`Invalid discriminated union option at index "${i.options.indexOf(t)}"`);for(let[$,b]of Object.entries(o)){if(!n[$])n[$]=new Set;for(let g of b)n[$].add(g)}}return n});let u=zn(()=>{let n=i.options,t=new Map;for(let o of n){let $=o._zod.propValues?.[i.discriminator];if(!$||$.size===0)throw Error(`Invalid discriminated union option at index "${i.options.indexOf(o)}"`);for(let b of $){if(t.has(b))throw Error(`Duplicate discriminator value "${String(b)}"`);t.set(b,o)}}return t});r._zod.parse=(n,t)=>{let o=n.value;if(!hr(o))return n.issues.push({code:"invalid_type",expected:"object",input:o,inst:r}),n;let $=u.value.get(o?.[i.discriminator]);if($)return $._zod.run(n,t);if(i.unionFallback||t.direction==="backward")return v(n,t);return n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:i.discriminator,options:Array.from(u.value.keys()),input:o,path:[i.discriminator],inst:r}),n}}),T$=e("$ZodIntersection",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{let n=v.value,t=i.left._zod.run({value:n,issues:[]},u),o=i.right._zod.run({value:n,issues:[]},u);if(t instanceof Promise||o instanceof Promise)return Promise.all([t,o]).then(([b,g])=>{return R6(v,b,g)});return R6(v,t,o)}});dt=e("$ZodTuple",(r,i)=>{J.init(r,i);let v=i.items;r._zod.parse=(u,n)=>{let t=u.value;if(!Array.isArray(t))return u.issues.push({input:t,inst:r,expected:"tuple",code:"invalid_type"}),u;u.value=[];let o=[],$=Z6(v,"optin"),b=Z6(v,"optout");if(!i.rest){if(t.length<$)return u.issues.push({code:"too_small",minimum:$,inclusive:!0,input:t,inst:r,origin:"array"}),u;if(t.length>v.length)u.issues.push({code:"too_big",maximum:v.length,inclusive:!0,input:t,inst:r,origin:"array"})}let g=Array(v.length);for(let c=0;c<v.length;c++){let U=v[c]._zod.run({value:t[c],issues:[]},n);if(U instanceof Promise)o.push(U.then((w)=>{g[c]=w}));else g[c]=U}if(i.rest){let c=v.length-1,U=t.slice(v.length);for(let w of U){c++;let m=i.rest._zod.run({value:w,issues:[]},n);if(m instanceof Promise)o.push(m.then((A)=>Q6(A,u,c)));else Q6(m,u,c)}}if(o.length)return Promise.all(o).then(()=>C6(g,u,v,t,b));return C6(g,u,v,t,b)}});x$=e("$ZodRecord",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{let n=v.value;if(!Er(n))return v.issues.push({expected:"record",code:"invalid_type",input:n,inst:r}),v;let t=[],o=i.keyType._zod.values;if(o){v.value={};let $=new Set;for(let g of o)if(typeof g==="string"||typeof g==="number"||typeof g==="symbol"){$.add(typeof g==="number"?g.toString():g);let c=i.keyType._zod.run({value:g,issues:[]},u);if(c instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(c.issues.length){v.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map((m)=>$r(m,u,Z())),input:g,path:[g],inst:r});continue}let U=c.value,w=i.valueType._zod.run({value:n[g],issues:[]},u);if(w instanceof Promise)t.push(w.then((m)=>{if(m.issues.length)v.issues.push(...br(g,m.issues));v.value[U]=m.value}));else{if(w.issues.length)v.issues.push(...br(g,w.issues));v.value[U]=w.value}}let b;for(let g in n)if(!$.has(g))b=b??[],b.push(g);if(b&&b.length>0)v.issues.push({code:"unrecognized_keys",input:n,inst:r,keys:b})}else{v.value={};for(let $ of Reflect.ownKeys(n)){if($==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(n,$))continue;let b=i.keyType._zod.run({value:$,issues:[]},u);if(b instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof $==="string"&&li.test($)&&b.issues.length){let U=i.keyType._zod.run({value:Number($),issues:[]},u);if(U instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(U.issues.length===0)b=U}if(b.issues.length){if(i.mode==="loose")v.value[$]=n[$];else v.issues.push({code:"invalid_key",origin:"record",issues:b.issues.map((U)=>$r(U,u,Z())),input:$,path:[$],inst:r});continue}let c=i.valueType._zod.run({value:n[$],issues:[]},u);if(c instanceof Promise)t.push(c.then((U)=>{if(U.issues.length)v.issues.push(...br($,U.issues));v.value[b.value]=U.value}));else{if(c.issues.length)v.issues.push(...br($,c.issues));v.value[b.value]=c.value}}}if(t.length)return Promise.all(t).then(()=>v);return v}}),M$=e("$ZodMap",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{let n=v.value;if(!(n instanceof Map))return v.issues.push({expected:"map",code:"invalid_type",input:n,inst:r}),v;let t=[];v.value=new Map;for(let[o,$]of n){let b=i.keyType._zod.run({value:o,issues:[]},u),g=i.valueType._zod.run({value:$,issues:[]},u);if(b instanceof Promise||g instanceof Promise)t.push(Promise.all([b,g]).then(([c,U])=>{f6(c,U,v,o,n,r,u)}));else f6(b,g,v,o,n,r,u)}if(t.length)return Promise.all(t).then(()=>v);return v}});Y$=e("$ZodSet",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{let n=v.value;if(!(n instanceof Set))return v.issues.push({input:n,inst:r,expected:"set",code:"invalid_type"}),v;let t=[];v.value=new Set;for(let o of n){let $=i.valueType._zod.run({value:o,issues:[]},u);if($ instanceof Promise)t.push($.then((b)=>d6(b,v)));else d6($,v)}if(t.length)return Promise.all(t).then(()=>v);return v}});q$=e("$ZodEnum",(r,i)=>{J.init(r,i);let v=ri(i.entries),u=new Set(v);r._zod.values=u,r._zod.pattern=new RegExp(`^(${v.filter((n)=>ii.has(typeof n)).map((n)=>typeof n==="string"?wr(n):n.toString()).join("|")})$`),r._zod.parse=(n,t)=>{let o=n.value;if(u.has(o))return n;return n.issues.push({code:"invalid_value",values:v,input:o,inst:r}),n}}),X$=e("$ZodLiteral",(r,i)=>{if(J.init(r,i),i.values.length===0)throw Error("Cannot create literal schema with no valid values");let v=new Set(i.values);r._zod.values=v,r._zod.pattern=new RegExp(`^(${i.values.map((u)=>typeof u==="string"?wr(u):u?wr(u.toString()):String(u)).join("|")})$`),r._zod.parse=(u,n)=>{let t=u.value;if(v.has(t))return u;return u.issues.push({code:"invalid_value",values:i.values,input:t,inst:r}),u}}),R$=e("$ZodFile",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{let n=v.value;if(n instanceof File)return v;return v.issues.push({expected:"file",code:"invalid_type",input:n,inst:r}),v}}),Z$=e("$ZodTransform",(r,i)=>{J.init(r,i),r._zod.optin="optional",r._zod.parse=(v,u)=>{if(u.direction==="backward")throw new dr(r.constructor.name);let n=i.transform(v.value,v);if(u.async)return(n instanceof Promise?n:Promise.resolve(n)).then((o)=>{return v.value=o,v.fallback=!0,v});if(n instanceof Promise)throw new Lr;return v.value=n,v.fallback=!0,v}});yt=e("$ZodOptional",(r,i)=>{J.init(r,i),r._zod.optin="optional",r._zod.optout="optional",G(r._zod,"values",()=>{return i.innerType._zod.values?new Set([...i.innerType._zod.values,void 0]):void 0}),G(r._zod,"pattern",()=>{let v=i.innerType._zod.pattern;return v?new RegExp(`^(${ni(v.source)})?$`):void 0}),r._zod.parse=(v,u)=>{if(i.innerType._zod.optin==="optional"){let n=v.value,t=i.innerType._zod.run(v,u);if(t instanceof Promise)return t.then((o)=>y6(o,n));return y6(t,n)}if(v.value===void 0)return v;return i.innerType._zod.run(v,u)}}),Q$=e("$ZodExactOptional",(r,i)=>{yt.init(r,i),G(r._zod,"values",()=>i.innerType._zod.values),G(r._zod,"pattern",()=>i.innerType._zod.pattern),r._zod.parse=(v,u)=>{return i.innerType._zod.run(v,u)}}),C$=e("$ZodNullable",(r,i)=>{J.init(r,i),G(r._zod,"optin",()=>i.innerType._zod.optin),G(r._zod,"optout",()=>i.innerType._zod.optout),G(r._zod,"pattern",()=>{let v=i.innerType._zod.pattern;return v?new RegExp(`^(${ni(v.source)}|null)$`):void 0}),G(r._zod,"values",()=>{return i.innerType._zod.values?new Set([...i.innerType._zod.values,null]):void 0}),r._zod.parse=(v,u)=>{if(v.value===null)return v;return i.innerType._zod.run(v,u)}}),f$=e("$ZodDefault",(r,i)=>{J.init(r,i),r._zod.optin="optional",G(r._zod,"values",()=>i.innerType._zod.values),r._zod.parse=(v,u)=>{if(u.direction==="backward")return i.innerType._zod.run(v,u);if(v.value===void 0)return v.value=i.defaultValue,v;let n=i.innerType._zod.run(v,u);if(n instanceof Promise)return n.then((t)=>h6(t,i));return h6(n,i)}});d$=e("$ZodPrefault",(r,i)=>{J.init(r,i),r._zod.optin="optional",G(r._zod,"values",()=>i.innerType._zod.values),r._zod.parse=(v,u)=>{if(u.direction==="backward")return i.innerType._zod.run(v,u);if(v.value===void 0)v.value=i.defaultValue;return i.innerType._zod.run(v,u)}}),y$=e("$ZodNonOptional",(r,i)=>{J.init(r,i),G(r._zod,"values",()=>{let v=i.innerType._zod.values;return v?new Set([...v].filter((u)=>u!==void 0)):void 0}),r._zod.parse=(v,u)=>{let n=i.innerType._zod.run(v,u);if(n instanceof Promise)return n.then((t)=>p6(t,r));return p6(n,r)}});h$=e("$ZodSuccess",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{if(u.direction==="backward")throw new dr("ZodSuccess");let n=i.innerType._zod.run(v,u);if(n instanceof Promise)return n.then((t)=>{return v.value=t.issues.length===0,v});return v.value=n.issues.length===0,v}}),p$=e("$ZodCatch",(r,i)=>{J.init(r,i),r._zod.optin="optional",G(r._zod,"optout",()=>i.innerType._zod.optout),G(r._zod,"values",()=>i.innerType._zod.values),r._zod.parse=(v,u)=>{if(u.direction==="backward")return i.innerType._zod.run(v,u);let n=i.innerType._zod.run(v,u);if(n instanceof Promise)return n.then((t)=>{if(v.value=t.value,t.issues.length)v.value=i.catchValue({...v,error:{issues:t.issues.map((o)=>$r(o,u,Z()))},input:v.value}),v.issues=[],v.fallback=!0;return v});if(v.value=n.value,n.issues.length)v.value=i.catchValue({...v,error:{issues:n.issues.map((t)=>$r(t,u,Z()))},input:v.value}),v.issues=[],v.fallback=!0;return v}}),a$=e("$ZodNaN",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{if(typeof v.value!=="number"||!Number.isNaN(v.value))return v.issues.push({input:v.value,inst:r,expected:"nan",code:"invalid_type"}),v;return v}}),ht=e("$ZodPipe",(r,i)=>{J.init(r,i),G(r._zod,"values",()=>i.in._zod.values),G(r._zod,"optin",()=>i.in._zod.optin),G(r._zod,"optout",()=>i.out._zod.optout),G(r._zod,"propValues",()=>i.in._zod.propValues),r._zod.parse=(v,u)=>{if(u.direction==="backward"){let t=i.out._zod.run(v,u);if(t instanceof Promise)return t.then((o)=>Xt(o,i.in,u));return Xt(t,i.in,u)}let n=i.in._zod.run(v,u);if(n instanceof Promise)return n.then((t)=>Xt(t,i.out,u));return Xt(n,i.out,u)}});Ii=e("$ZodCodec",(r,i)=>{J.init(r,i),G(r._zod,"values",()=>i.in._zod.values),G(r._zod,"optin",()=>i.in._zod.optin),G(r._zod,"optout",()=>i.out._zod.optout),G(r._zod,"propValues",()=>i.in._zod.propValues),r._zod.parse=(v,u)=>{if((u.direction||"forward")==="forward"){let t=i.in._zod.run(v,u);if(t instanceof Promise)return t.then((o)=>Rt(o,i,u));return Rt(t,i,u)}else{let t=i.out._zod.run(v,u);if(t instanceof Promise)return t.then((o)=>Rt(o,i,u));return Rt(t,i,u)}}});s$=e("$ZodPreprocess",(r,i)=>{ht.init(r,i)}),rg=e("$ZodReadonly",(r,i)=>{J.init(r,i),G(r._zod,"propValues",()=>i.innerType._zod.propValues),G(r._zod,"values",()=>i.innerType._zod.values),G(r._zod,"optin",()=>i.innerType?._zod?.optin),G(r._zod,"optout",()=>i.innerType?._zod?.optout),r._zod.parse=(v,u)=>{if(u.direction==="backward")return i.innerType._zod.run(v,u);let n=i.innerType._zod.run(v,u);if(n instanceof Promise)return n.then(a6);return a6(n)}});ng=e("$ZodTemplateLiteral",(r,i)=>{J.init(r,i);let v=[];for(let u of i.parts)if(typeof u==="object"&&u!==null){if(!u._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...u._zod.traits].shift()}`);let n=u._zod.pattern instanceof RegExp?u._zod.pattern.source:u._zod.pattern;if(!n)throw Error(`Invalid template literal part: ${u._zod.traits}`);let t=n.startsWith("^")?1:0,o=n.endsWith("$")?n.length-1:n.length;v.push(n.slice(t,o))}else if(u===null||fu.has(typeof u))v.push(wr(`${u}`));else throw Error(`Invalid template literal part: ${u}`);r._zod.pattern=new RegExp(`^${v.join("")}$`),r._zod.parse=(u,n)=>{if(typeof u.value!=="string")return u.issues.push({input:u.value,inst:r,expected:"string",code:"invalid_type"}),u;if(r._zod.pattern.lastIndex=0,!r._zod.pattern.test(u.value))return u.issues.push({input:u.value,inst:r,code:"invalid_format",format:i.format??"template_literal",pattern:r._zod.pattern.source}),u;return u}}),ig=e("$ZodFunction",(r,i)=>{return J.init(r,i),r._def=i,r._zod.def=i,r.implement=(v)=>{if(typeof v!=="function")throw Error("implement() must be called with a function");return function(...u){let n=r._def.input?oi(r._def.input,u):u,t=Reflect.apply(v,this,n);if(r._def.output)return oi(r._def.output,t);return t}},r.implementAsync=(v)=>{if(typeof v!=="function")throw Error("implementAsync() must be called with a function");return async function(...u){let n=r._def.input?await $i(r._def.input,u):u,t=await Reflect.apply(v,this,n);if(r._def.output)return await $i(r._def.output,t);return t}},r._zod.parse=(v,u)=>{if(typeof v.value!=="function")return v.issues.push({code:"invalid_type",expected:"function",input:v.value,inst:r}),v;if(r._def.output&&r._def.output._zod.def.type==="promise")v.value=r.implementAsync(v.value);else v.value=r.implement(v.value);return v},r.input=(...v)=>{let u=r.constructor;if(Array.isArray(v[0]))return new u({type:"function",input:new dt({type:"tuple",items:v[0],rest:v[1]}),output:r._def.output});return new u({type:"function",input:v[0],output:r._def.output})},r.output=(v)=>{return new r.constructor({type:"function",input:r._def.input,output:v})},r}),tg=e("$ZodPromise",(r,i)=>{J.init(r,i),r._zod.parse=(v,u)=>{return Promise.resolve(v.value).then((n)=>i.innerType._zod.run({value:n,issues:[]},u))}}),vg=e("$ZodLazy",(r,i)=>{J.init(r,i),G(r._zod,"innerType",()=>{let v=i;if(!v._cachedInner)v._cachedInner=i.getter();return v._cachedInner}),G(r._zod,"pattern",()=>r._zod.innerType?._zod?.pattern),G(r._zod,"propValues",()=>r._zod.innerType?._zod?.propValues),G(r._zod,"optin",()=>r._zod.innerType?._zod?.optin??void 0),G(r._zod,"optout",()=>r._zod.innerType?._zod?.optout??void 0),r._zod.parse=(v,u)=>{return r._zod.innerType._zod.run(v,u)}}),ug=e("$ZodCustom",(r,i)=>{X.init(r,i),J.init(r,i),r._zod.parse=(v,u)=>{return v},r._zod.check=(v)=>{let u=v.value,n=i.fn(u);if(n instanceof Promise)return n.then((t)=>s6(t,v,u,r));s6(n,v,u,r);return}})});function $g(){return{localeError:p_()}}var p_=()=>{let r={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function i(n){return r[n]??null}let v={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},u={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))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 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${$}`;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 ${t}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${$}`}case"invalid_value":if(n.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 ${D(n.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: ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${t} ${n.maximum.toString()} ${o.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${t} ${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${t} ${n.minimum.toString()} ${o.unit}`;return`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${t} ${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.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 "${n.prefix}"`;if(t.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 "${t.suffix}"`;if(t.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 "${t.includes}"`;if(t.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 ${t.pattern}`;return`${v[t.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${_(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.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 ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};var uc=O(()=>{j()});function gg(){return{localeError:a_()}}var a_=()=>{let r={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function i(n){return r[n]??null}let v={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"},u={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${$}`;return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${t}, daxil olan ${$}`}case"invalid_value":if(n.values.length===1)return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${D(n.values[0])}`;return`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${t}${n.maximum.toString()} ${o.unit??"element"}`;return`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${t}${n.minimum.toString()} ${o.unit}`;return`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Yanl\u0131\u015F m\u0259tn: "${t.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`;if(t.format==="ends_with")return`Yanl\u0131\u015F m\u0259tn: "${t.suffix}" il\u0259 bitm\u0259lidir`;if(t.format==="includes")return`Yanl\u0131\u015F m\u0259tn: "${t.includes}" daxil olmal\u0131d\u0131r`;if(t.format==="regex")return`Yanl\u0131\u015F m\u0259tn: ${t.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`;return`Yanl\u0131\u015F ${v[t.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${_(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};var oc=O(()=>{j()});function $c(r,i,v,u){let n=Math.abs(r),t=n%10,o=n%100;if(o>=11&&o<=19)return u;if(t===1)return i;if(t>=2&&t<=4)return v;return u}function lg(){return{localeError:s_()}}var s_=()=>{let r={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function i(n){return r[n]??null}let v={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},u={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${$}`;return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${t}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${$}`}case"invalid_value":if(n.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 ${D(n.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 ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o){let $=Number(n.maximum),b=$c($,o.unit.one,o.unit.few,o.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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${o.verb} ${t}${n.maximum.toString()} ${b}`}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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o){let $=Number(n.minimum),b=$c($,o.unit.one,o.unit.few,o.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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${o.verb} ${t}${n.minimum.toString()} ${b}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.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 "${t.prefix}"`;if(t.format==="ends_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 \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${t.suffix}"`;if(t.format==="includes")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 "${t.includes}"`;if(t.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 ${t.pattern}`;return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${v[t.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${_(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};var gc=O(()=>{j()});function bg(){return{localeError:rI()}}var rI=()=>{let r={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function i(n){return r[n]??null}let v={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},u={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${$}`;return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${t}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${$}`}case"invalid_value":if(n.values.length===1)return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${D(n.values[0])}`;return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${t}${n.maximum.toString()} ${o.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`;return`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${t}${n.minimum.toString()} ${o.unit}`;return`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${t.prefix}"`;if(t.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${t.suffix}"`;if(t.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${t.includes}"`;if(t.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${t.pattern}`;let o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";if(t.format==="emoji")o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";if(t.format==="datetime")o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";if(t.format==="date")o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430";if(t.format==="time")o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";if(t.format==="duration")o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430";return`${o} ${v[t.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${_(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};var lc=O(()=>{j()});function cg(){return{localeError:nI()}}var nI=()=>{let r={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function i(n){return r[n]??null}let v={regex:"entrada",email:"adre\xE7a electr\xF2nica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},u={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Tipus inv\xE0lid: s\'esperava instanceof ${n.expected}, s\'ha rebut ${$}`;return`Tipus inv\xE0lid: s\'esperava ${t}, s\'ha rebut ${$}`}case"invalid_value":if(n.values.length===1)return`Valor inv\xE0lid: s\'esperava ${D(n.values[0])}`;return`Opci\xF3 inv\xE0lida: s\'esperava una de ${_(n.values," o ")}`;case"too_big":{let t=n.inclusive?"com a m\xE0xim":"menys de",o=i(n.origin);if(o)return`Massa gran: s\'esperava que ${n.origin??"el valor"} contingu\xE9s ${t} ${n.maximum.toString()} ${o.unit??"elements"}`;return`Massa gran: s\'esperava que ${n.origin??"el valor"} fos ${t} ${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?"com a m\xEDnim":"m\xE9s de",o=i(n.origin);if(o)return`Massa petit: s\'esperava que ${n.origin} contingu\xE9s ${t} ${n.minimum.toString()} ${o.unit}`;return`Massa petit: s\'esperava que ${n.origin} fos ${t} ${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Format inv\xE0lid: ha de comen\xE7ar amb "${t.prefix}"`;if(t.format==="ends_with")return`Format inv\xE0lid: ha d\'acabar amb "${t.suffix}"`;if(t.format==="includes")return`Format inv\xE0lid: ha d\'incloure "${t.includes}"`;if(t.format==="regex")return`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${t.pattern}`;return`Format inv\xE0lid per a ${v[t.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};var bc=O(()=>{j()});function eg(){return{localeError:iI()}}var iI=()=>{let r={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function i(n){return r[n]??null}let v={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",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:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},u={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${$}`;return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${t}, obdr\u017Eeno ${$}`}case"invalid_value":if(n.values.length===1)return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${D(n.values[0])}`;return`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${t}${n.maximum.toString()} ${o.unit??"prvk\u016F"}`;return`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${t}${n.minimum.toString()} ${o.unit??"prvk\u016F"}`;return`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${t.prefix}"`;if(t.format==="ends_with")return`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${t.suffix}"`;if(t.format==="includes")return`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${t.includes}"`;if(t.format==="regex")return`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${t.pattern}`;return`Neplatn\xFD form\xE1t ${v[t.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${_(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};var cc=O(()=>{j()});function _g(){return{localeError:tI()}}var tI=()=>{let r={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function i(n){return r[n]??null}let v={regex:"input",email:"e-mailadresse",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 dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},u={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Ugyldigt input: forventede instanceof ${n.expected}, fik ${$}`;return`Ugyldigt input: forventede ${t}, fik ${$}`}case"invalid_value":if(n.values.length===1)return`Ugyldig v\xE6rdi: forventede ${D(n.values[0])}`;return`Ugyldigt valg: forventede en af f\xF8lgende ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin),$=u[n.origin]??n.origin;if(o)return`For stor: forventede ${$??"value"} ${o.verb} ${t} ${n.maximum.toString()} ${o.unit??"elementer"}`;return`For stor: forventede ${$??"value"} havde ${t} ${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin),$=u[n.origin]??n.origin;if(o)return`For lille: forventede ${$} ${o.verb} ${t} ${n.minimum.toString()} ${o.unit}`;return`For lille: forventede ${$} havde ${t} ${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Ugyldig streng: skal starte med "${t.prefix}"`;if(t.format==="ends_with")return`Ugyldig streng: skal ende med "${t.suffix}"`;if(t.format==="includes")return`Ugyldig streng: skal indeholde "${t.includes}"`;if(t.format==="regex")return`Ugyldig streng: skal matche m\xF8nsteret ${t.pattern}`;return`Ugyldig ${v[t.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${_(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};var ec=O(()=>{j()});function Ig(){return{localeError:vI()}}var vI=()=>{let r={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function i(n){return r[n]??null}let v={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},u={nan:"NaN",number:"Zahl",array:"Array"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${$}`;return`Ung\xFCltige Eingabe: erwartet ${t}, erhalten ${$}`}case"invalid_value":if(n.values.length===1)return`Ung\xFCltige Eingabe: erwartet ${D(n.values[0])}`;return`Ung\xFCltige Option: erwartet eine von ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${t}${n.maximum.toString()} ${o.unit??"Elemente"} hat`;return`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${t}${n.maximum.toString()} ist`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Zu klein: erwartet, dass ${n.origin} ${t}${n.minimum.toString()} ${o.unit} hat`;return`Zu klein: erwartet, dass ${n.origin} ${t}${n.minimum.toString()} ist`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Ung\xFCltiger String: muss mit "${t.prefix}" beginnen`;if(t.format==="ends_with")return`Ung\xFCltiger String: muss mit "${t.suffix}" enden`;if(t.format==="includes")return`Ung\xFCltiger String: muss "${t.includes}" enthalten`;if(t.format==="regex")return`Ung\xFCltiger String: muss dem Muster ${t.pattern} entsprechen`;return`Ung\xFCltig: ${v[t.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${_(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};var _c=O(()=>{j()});function Ug(){return{localeError:uI()}}var uI=()=>{let r={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function i(n){return r[n]??null}let v={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",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 \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},u={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(typeof n.expected==="string"&&/^[A-Z]/.test(n.expected))return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${n.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${$}`;return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${$}`}case"invalid_value":if(n.values.length===1)return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${D(n.values[0])}`;return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${t}${n.maximum.toString()} ${o.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;return`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${t}${n.minimum.toString()} ${o.unit}`;return`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${t.prefix}"`;if(t.format==="ends_with")return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${t.suffix}"`;if(t.format==="includes")return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${t.includes}"`;if(t.format==="regex")return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${t.pattern}`;return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${v[t.format]??n.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${_(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};var Ic=O(()=>{j()});function Ui(){return{localeError:oI()}}var oI=()=>{let r={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function i(n){return r[n]??null}let v={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",mac:"MAC 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"},u={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;return`Invalid input: expected ${t}, received ${$}`}case"invalid_value":if(n.values.length===1)return`Invalid input: expected ${D(n.values[0])}`;return`Invalid option: expected one of ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Too big: expected ${n.origin??"value"} to have ${t}${n.maximum.toString()} ${o.unit??"elements"}`;return`Too big: expected ${n.origin??"value"} to be ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Too small: expected ${n.origin} to have ${t}${n.minimum.toString()} ${o.unit}`;return`Too small: expected ${n.origin} to be ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Invalid string: must start with "${t.prefix}"`;if(t.format==="ends_with")return`Invalid string: must end with "${t.suffix}"`;if(t.format==="includes")return`Invalid string: must include "${t.includes}"`;if(t.format==="regex")return`Invalid string: must match pattern ${t.pattern}`;return`Invalid ${v[t.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`Invalid discriminator value. Expected ${n.options.map((o)=>`\'${o}\'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};var Dg=O(()=>{j()});function wg(){return{localeError:$I()}}var $I=()=>{let r={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function i(n){return r[n]??null}let v={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},u={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${$}`;return`Nevalida enigo: atendi\u011Dis ${t}, ricevi\u011Dis ${$}`}case"invalid_value":if(n.values.length===1)return`Nevalida enigo: atendi\u011Dis ${D(n.values[0])}`;return`Nevalida opcio: atendi\u011Dis unu el ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${t}${n.maximum.toString()} ${o.unit??"elementojn"}`;return`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${t}${n.minimum.toString()} ${o.unit}`;return`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Nevalida karaktraro: devas komenci\u011Di per "${t.prefix}"`;if(t.format==="ends_with")return`Nevalida karaktraro: devas fini\u011Di per "${t.suffix}"`;if(t.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${t.includes}"`;if(t.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`;return`Nevalida ${v[t.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${_(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};var Uc=O(()=>{j()});function kg(){return{localeError:gI()}}var gI=()=>{let r={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function i(n){return r[n]??null}let v={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},u={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${$}`;return`Entrada inv\xE1lida: se esperaba ${t}, recibido ${$}`}case"invalid_value":if(n.values.length===1)return`Entrada inv\xE1lida: se esperaba ${D(n.values[0])}`;return`Opci\xF3n inv\xE1lida: se esperaba una de ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin),$=u[n.origin]??n.origin;if(o)return`Demasiado grande: se esperaba que ${$??"valor"} tuviera ${t}${n.maximum.toString()} ${o.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${$??"valor"} fuera ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin),$=u[n.origin]??n.origin;if(o)return`Demasiado peque\xF1o: se esperaba que ${$} tuviera ${t}${n.minimum.toString()} ${o.unit}`;return`Demasiado peque\xF1o: se esperaba que ${$} fuera ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Cadena inv\xE1lida: debe comenzar con "${t.prefix}"`;if(t.format==="ends_with")return`Cadena inv\xE1lida: debe terminar en "${t.suffix}"`;if(t.format==="includes")return`Cadena inv\xE1lida: debe incluir "${t.includes}"`;if(t.format==="regex")return`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${t.pattern}`;return`Inv\xE1lido ${v[t.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${u[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${u[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};var Dc=O(()=>{j()});function Ng(){return{localeError:lI()}}var lI=()=>{let r={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function i(n){return r[n]??null}let v={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},u={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${$} \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 ${t} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${$} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":if(n.values.length===1)return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${D(n.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 ${_(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${t}${n.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`;return`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${t}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${t}${n.minimum.toString()} ${o.unit} \u0628\u0627\u0634\u062F`;return`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${t}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${t.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`;if(t.format==="ends_with")return`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${t.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`;if(t.format==="includes")return`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${t.includes}" \u0628\u0627\u0634\u062F`;if(t.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 ${t.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`;return`${v[t.format]??n.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 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${_(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.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 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};var wc=O(()=>{j()});function mg(){return{localeError:bI()}}var bI=()=>{let r={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function i(n){return r[n]??null}let v={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},u={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${$}`;return`Virheellinen tyyppi: odotettiin ${t}, oli ${$}`}case"invalid_value":if(n.values.length===1)return`Virheellinen sy\xF6te: t\xE4ytyy olla ${D(n.values[0])}`;return`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Liian suuri: ${o.subject} t\xE4ytyy olla ${t}${n.maximum.toString()} ${o.unit}`.trim();return`Liian suuri: arvon t\xE4ytyy olla ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Liian pieni: ${o.subject} t\xE4ytyy olla ${t}${n.minimum.toString()} ${o.unit}`.trim();return`Liian pieni: arvon t\xE4ytyy olla ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${t.prefix}"`;if(t.format==="ends_with")return`Virheellinen sy\xF6te: t\xE4ytyy loppua "${t.suffix}"`;if(t.format==="includes")return`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${t.includes}"`;if(t.format==="regex")return`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${t.pattern}`;return`Virheellinen ${v[t.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${_(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};var kc=O(()=>{j()});function zg(){return{localeError:cI()}}var cI=()=>{let r={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function i(n){return r[n]??null}let v={regex:"entr\xE9e",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},u={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${$} re\xE7u`;return`Entr\xE9e invalide : ${t} attendu, ${$} re\xE7u`}case"invalid_value":if(n.values.length===1)return`Entr\xE9e invalide : ${D(n.values[0])} attendu`;return`Option invalide : une valeur parmi ${_(n.values,"|")} attendue`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Trop grand : ${u[n.origin]??"valeur"} doit ${o.verb} ${t}${n.maximum.toString()} ${o.unit??"\xE9l\xE9ment(s)"}`;return`Trop grand : ${u[n.origin]??"valeur"} doit \xEAtre ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Trop petit : ${u[n.origin]??"valeur"} doit ${o.verb} ${t}${n.minimum.toString()} ${o.unit}`;return`Trop petit : ${u[n.origin]??"valeur"} doit \xEAtre ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Cha\xEEne invalide : doit commencer par "${t.prefix}"`;if(t.format==="ends_with")return`Cha\xEEne invalide : doit se terminer par "${t.suffix}"`;if(t.format==="includes")return`Cha\xEEne invalide : doit inclure "${t.includes}"`;if(t.format==="regex")return`Cha\xEEne invalide : doit correspondre au mod\xE8le ${t.pattern}`;return`${v[t.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${_(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};var Nc=O(()=>{j()});function Og(){return{localeError:eI()}}var eI=()=>{let r={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function i(n){return r[n]??null}let v={regex:"entr\xE9e",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},u={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${$}`;return`Entr\xE9e invalide : attendu ${t}, re\xE7u ${$}`}case"invalid_value":if(n.values.length===1)return`Entr\xE9e invalide : attendu ${D(n.values[0])}`;return`Option invalide : attendu l\'une des valeurs suivantes ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"\u2264":"<",o=i(n.origin);if(o)return`Trop grand : attendu que ${n.origin??"la valeur"} ait ${t}${n.maximum.toString()} ${o.unit}`;return`Trop grand : attendu que ${n.origin??"la valeur"} soit ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?"\u2265":">",o=i(n.origin);if(o)return`Trop petit : attendu que ${n.origin} ait ${t}${n.minimum.toString()} ${o.unit}`;return`Trop petit : attendu que ${n.origin} soit ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Cha\xEEne invalide : doit commencer par "${t.prefix}"`;if(t.format==="ends_with")return`Cha\xEEne invalide : doit se terminer par "${t.suffix}"`;if(t.format==="includes")return`Cha\xEEne invalide : doit inclure "${t.includes}"`;if(t.format==="regex")return`Cha\xEEne invalide : doit correspondre au motif ${t.pattern}`;return`${v[t.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${_(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};var mc=O(()=>{j()});function Sg(){return{localeError:_I()}}var _I=()=>{let r={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},i={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},v=(g)=>g?r[g]:void 0,u=(g)=>{let c=v(g);if(c)return c.label;return g??r.unknown.label},n=(g)=>`\u05D4${u(g)}`,t=(g)=>{return(v(g)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"},o=(g)=>{if(!g)return null;return i[g]??null},$={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2\'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},b={nan:"NaN"};return(g)=>{switch(g.code){case"invalid_type":{let c=g.expected,U=b[c??""]??u(c),w=k(g.input),m=b[w]??r[w]?.label??w;if(/^[A-Z]/.test(g.expected))return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${g.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`;return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${U}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(g.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${D(g.values[0])}`;let c=g.values.map((m)=>D(m));if(g.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${c[0]} \u05D0\u05D5 ${c[1]}`;let U=c[c.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${c.slice(0,-1).join(", ")} \u05D0\u05D5 ${U}`}case"too_big":{let c=o(g.origin),U=n(g.origin??"value");if(g.origin==="string")return`${c?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${U} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${g.maximum.toString()} ${c?.unit??""} ${g.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(g.origin==="number"){let A=g.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${g.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${g.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${U} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${A}`}if(g.origin==="array"||g.origin==="set"){let A=g.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",ir=g.inclusive?`${g.maximum} ${c?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${g.maximum} ${c?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${U} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${ir}`.trim()}let w=g.inclusive?"<=":"<",m=t(g.origin??"value");if(c?.unit)return`${c.longLabel} \u05DE\u05D3\u05D9: ${U} ${m} ${w}${g.maximum.toString()} ${c.unit}`;return`${c?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${U} ${m} ${w}${g.maximum.toString()}`}case"too_small":{let c=o(g.origin),U=n(g.origin??"value");if(g.origin==="string")return`${c?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${U} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${g.minimum.toString()} ${c?.unit??""} ${g.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(g.origin==="number"){let A=g.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${g.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${g.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${U} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${A}`}if(g.origin==="array"||g.origin==="set"){let A=g.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(g.minimum===1&&g.inclusive){let R=g.origin==="set"?"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3":"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3";return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${U} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${R}`}let ir=g.inclusive?`${g.minimum} ${c?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${g.minimum} ${c?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${U} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${ir}`.trim()}let w=g.inclusive?">=":">",m=t(g.origin??"value");if(c?.unit)return`${c.shortLabel} \u05DE\u05D3\u05D9: ${U} ${m} ${w}${g.minimum.toString()} ${c.unit}`;return`${c?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${U} ${m} ${w}${g.minimum.toString()}`}case"invalid_format":{let c=g;if(c.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${c.prefix}"`;if(c.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${c.suffix}"`;if(c.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${c.includes}"`;if(c.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${c.pattern}`;let U=$[c.format],w=U?.label??c.format,A=(U?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${w} \u05DC\u05D0 ${A}`}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 ${g.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${g.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${g.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${_(g.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";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${n(g.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};var zc=O(()=>{j()});function Pg(){return{localeError:II()}}var II=()=>{let r={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function i(n){return r[n]??null}let v={regex:"unos",email:"email adresa",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 datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},u={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${$}`;return`Neispravan unos: o\u010Dekuje se ${t}, a primljeno je ${$}`}case"invalid_value":if(n.values.length===1)return`Neispravna vrijednost: o\u010Dekivano ${D(n.values[0])}`;return`Neispravna opcija: o\u010Dekivano jedno od ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin),$=u[n.origin]??n.origin;if(o)return`Preveliko: o\u010Dekivano da ${$??"vrijednost"} ima ${t}${n.maximum.toString()} ${o.unit??"elemenata"}`;return`Preveliko: o\u010Dekivano da ${$??"vrijednost"} bude ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin),$=u[n.origin]??n.origin;if(o)return`Premalo: o\u010Dekivano da ${$} ima ${t}${n.minimum.toString()} ${o.unit}`;return`Premalo: o\u010Dekivano da ${$} bude ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Neispravan tekst: mora zapo\u010Dinjati s "${t.prefix}"`;if(t.format==="ends_with")return`Neispravan tekst: mora zavr\u0161avati s "${t.suffix}"`;if(t.format==="includes")return`Neispravan tekst: mora sadr\u017Eavati "${t.includes}"`;if(t.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`;return`Neispravna ${v[t.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${_(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${u[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${u[n.origin]??n.origin}`;default:return"Neispravan unos"}}};var Oc=O(()=>{j()});function jg(){return{localeError:UI()}}var UI=()=>{let r={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function i(n){return r[n]??null}let v={regex:"bemenet",email:"email c\xEDm",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 id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},u={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${$}`;return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${t}, a kapott \xE9rt\xE9k ${$}`}case"invalid_value":if(n.values.length===1)return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${D(n.values[0])}`;return`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${t}${n.maximum.toString()} ${o.unit??"elem"}`;return`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${t}${n.minimum.toString()} ${o.unit}`;return`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\xC9rv\xE9nytelen string: "${t.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`;if(t.format==="ends_with")return`\xC9rv\xE9nytelen string: "${t.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`;if(t.format==="includes")return`\xC9rv\xE9nytelen string: "${t.includes}" \xE9rt\xE9ket kell tartalmaznia`;if(t.format==="regex")return`\xC9rv\xE9nytelen string: ${t.pattern} mint\xE1nak kell megfelelnie`;return`\xC9rv\xE9nytelen ${v[t.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};var Sc=O(()=>{j()});function Pc(r,i,v){return Math.abs(r)===1?i:v}function Gn(r){if(!r)return"";let i=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],v=r[r.length-1];return r+(i.includes(v)?"\u0576":"\u0568")}function Lg(){return{localeError:DI()}}var DI=()=>{let r={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function i(n){return r[n]??null}let v={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},u={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${$}`;return`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${t}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${$}`}case"invalid_value":if(n.values.length===1)return`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${D(n.values[1])}`;return`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o){let $=Number(n.maximum),b=Pc($,o.unit.one,o.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Gn(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${t}${n.maximum.toString()} ${b}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Gn(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o){let $=Number(n.minimum),b=Pc($,o.unit.one,o.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Gn(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${t}${n.minimum.toString()} ${b}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Gn(n.origin)} \u056C\u056B\u0576\u056B ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${t.prefix}"-\u0578\u057E`;if(t.format==="ends_with")return`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${t.suffix}"-\u0578\u057E`;if(t.format==="includes")return`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${t.includes}"`;if(t.format==="regex")return`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${t.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`;return`\u054D\u056D\u0561\u056C ${v[t.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${_(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Gn(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Gn(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};var jc=O(()=>{j()});function Ag(){return{localeError:wI()}}var wI=()=>{let r={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function i(n){return r[n]??null}let v={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},u={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${$}`;return`Input tidak valid: diharapkan ${t}, diterima ${$}`}case"invalid_value":if(n.values.length===1)return`Input tidak valid: diharapkan ${D(n.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${t}${n.maximum.toString()} ${o.unit??"elemen"}`;return`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Terlalu kecil: diharapkan ${n.origin} memiliki ${t}${n.minimum.toString()} ${o.unit}`;return`Terlalu kecil: diharapkan ${n.origin} menjadi ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`String tidak valid: harus dimulai dengan "${t.prefix}"`;if(t.format==="ends_with")return`String tidak valid: harus berakhir dengan "${t.suffix}"`;if(t.format==="includes")return`String tidak valid: harus menyertakan "${t.includes}"`;if(t.format==="regex")return`String tidak valid: harus sesuai pola ${t.pattern}`;return`${v[t.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};var Lc=O(()=>{j()});function Jg(){return{localeError:kI()}}var kI=()=>{let r={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function i(n){return r[n]??null}let v={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},u={nan:"NaN",number:"n\xFAmer",array:"fylki"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Rangt gildi: \xDE\xFA sl\xF3st inn ${$} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`;return`Rangt gildi: \xDE\xFA sl\xF3st inn ${$} \xFEar sem \xE1 a\xF0 vera ${t}`}case"invalid_value":if(n.values.length===1)return`Rangt gildi: gert r\xE1\xF0 fyrir ${D(n.values[0])}`;return`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${t}${n.maximum.toString()} ${o.unit??"hluti"}`;return`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${t}${n.minimum.toString()} ${o.unit}`;return`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${t.prefix}"`;if(t.format==="ends_with")return`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${t.suffix}"`;if(t.format==="includes")return`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${t.includes}"`;if(t.format==="regex")return`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${t.pattern}`;return`Rangt ${v[t.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${_(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};var Ac=O(()=>{j()});function Wg(){return{localeError:NI()}}var NI=()=>{let r={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function i(n){return r[n]??null}let v={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},u={nan:"NaN",number:"numero",array:"vettore"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Input non valido: atteso instanceof ${n.expected}, ricevuto ${$}`;return`Input non valido: atteso ${t}, ricevuto ${$}`}case"invalid_value":if(n.values.length===1)return`Input non valido: atteso ${D(n.values[0])}`;return`Opzione non valida: atteso uno tra ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Troppo grande: ${n.origin??"valore"} deve avere ${t}${n.maximum.toString()} ${o.unit??"elementi"}`;return`Troppo grande: ${n.origin??"valore"} deve essere ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Troppo piccolo: ${n.origin} deve avere ${t}${n.minimum.toString()} ${o.unit}`;return`Troppo piccolo: ${n.origin} deve essere ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Stringa non valida: deve iniziare con "${t.prefix}"`;if(t.format==="ends_with")return`Stringa non valida: deve terminare con "${t.suffix}"`;if(t.format==="includes")return`Stringa non valida: deve includere "${t.includes}"`;if(t.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${t.pattern}`;return`Input non valido: ${v[t.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${_(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};var Jc=O(()=>{j()});function Vg(){return{localeError:mI()}}var mI=()=>{let r={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function i(n){return r[n]??null}let v={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},u={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${$}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;return`\u7121\u52B9\u306A\u5165\u529B: ${t}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${$}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":if(n.values.length===1)return`\u7121\u52B9\u306A\u5165\u529B: ${D(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`;return`\u7121\u52B9\u306A\u9078\u629E: ${_(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let t=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",o=i(n.origin);if(o)return`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o.unit??"\u8981\u7D20"}${t}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;return`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${t}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let t=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",o=i(n.origin);if(o)return`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o.unit}${t}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;return`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${t}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${t.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;if(t.format==="ends_with")return`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${t.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;if(t.format==="includes")return`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${t.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;if(t.format==="regex")return`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${t.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;return`\u7121\u52B9\u306A${v[t.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.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${n.keys.length>1?"\u7FA4":""}: ${_(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};var Wc=O(()=>{j()});function Gg(){return{localeError:zI()}}var zI=()=>{let r={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function i(n){return r[n]??null}let v={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},u={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${$}`;return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${$}`}case"invalid_value":if(n.values.length===1)return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${D(n.values[0])}`;return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${_(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${o.verb} ${t}${n.maximum.toString()} ${o.unit}`;return`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${o.verb} ${t}${n.minimum.toString()} ${o.unit}`;return`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${t.prefix}"-\u10D8\u10D7`;if(t.format==="ends_with")return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${t.suffix}"-\u10D8\u10D7`;if(t.format==="includes")return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${t.includes}"-\u10E1`;if(t.format==="regex")return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${t.pattern}`;return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${v[t.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${_(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};var Vc=O(()=>{j()});function Di(){return{localeError:OI()}}var OI=()=>{let r={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function i(n){return r[n]??null}let v={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},u={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))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 instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${$}`;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 ${t} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${$}`}case"invalid_value":if(n.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 ${D(n.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 ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${t} ${n.maximum.toString()} ${o.unit??"\u1792\u17B6\u178F\u17BB"}`;return`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${t} ${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${t} ${n.minimum.toString()} ${o.unit}`;return`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${t} ${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.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 "${t.prefix}"`;if(t.format==="ends_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\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${t.suffix}"`;if(t.format==="includes")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 "${t.includes}"`;if(t.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 ${t.pattern}`;return`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${v[t.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${_(n.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 ${n.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 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};var Kg=O(()=>{j()});function Bg(){return Di()}var Gc=O(()=>{Kg()});function Hg(){return{localeError:SI()}}var SI=()=>{let r={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function i(n){return r[n]??null}let v={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},u={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${$}\uC785\uB2C8\uB2E4`;return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${t}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${$}\uC785\uB2C8\uB2E4`}case"invalid_value":if(n.values.length===1)return`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${D(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`;return`\uC798\uBABB\uB41C \uC635\uC158: ${_(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let t=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",o=t==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",$=i(n.origin),b=$?.unit??"\uC694\uC18C";if($)return`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${b} ${t}${o}`;return`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${t}${o}`}case"too_small":{let t=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",o=t==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",$=i(n.origin),b=$?.unit??"\uC694\uC18C";if($)return`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${b} ${t}${o}`;return`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${t}${o}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${t.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`;if(t.format==="ends_with")return`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${t.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`;if(t.format==="includes")return`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${t.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`;if(t.format==="regex")return`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${t.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`;return`\uC798\uBABB\uB41C ${v[t.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${_(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};var Kc=O(()=>{j()});function Bc(r){let i=Math.abs(r),v=i%10,u=i%100;if(u>=11&&u<=19||v===0)return"many";if(v===1)return"one";return"few"}function Fg(){return{localeError:PI()}}var wi=(r)=>{return r.charAt(0).toUpperCase()+r.slice(1)},PI=()=>{let r={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function i(n,t,o,$){let b=r[n]??null;if(b===null)return b;return{unit:b.unit[t],verb:b.verb[$][o?"inclusive":"notInclusive"]}}let v={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},u={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Gautas tipas ${$}, o tik\u0117tasi - instanceof ${n.expected}`;return`Gautas tipas ${$}, o tik\u0117tasi - ${t}`}case"invalid_value":if(n.values.length===1)return`Privalo b\u016Bti ${D(n.values[0])}`;return`Privalo b\u016Bti vienas i\u0161 ${_(n.values,"|")} pasirinkim\u0173`;case"too_big":{let t=u[n.origin]??n.origin,o=i(n.origin,Bc(Number(n.maximum)),n.inclusive??!1,"smaller");if(o?.verb)return`${wi(t??n.origin??"reik\u0161m\u0117")} ${o.verb} ${n.maximum.toString()} ${o.unit??"element\u0173"}`;let $=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${wi(t??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${$} ${n.maximum.toString()} ${o?.unit}`}case"too_small":{let t=u[n.origin]??n.origin,o=i(n.origin,Bc(Number(n.minimum)),n.inclusive??!1,"bigger");if(o?.verb)return`${wi(t??n.origin??"reik\u0161m\u0117")} ${o.verb} ${n.minimum.toString()} ${o.unit??"element\u0173"}`;let $=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${wi(t??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${$} ${n.minimum.toString()} ${o?.unit}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Eilut\u0117 privalo prasid\u0117ti "${t.prefix}"`;if(t.format==="ends_with")return`Eilut\u0117 privalo pasibaigti "${t.suffix}"`;if(t.format==="includes")return`Eilut\u0117 privalo \u012Ftraukti "${t.includes}"`;if(t.format==="regex")return`Eilut\u0117 privalo atitikti ${t.pattern}`;return`Neteisingas ${v[t.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${_(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let t=u[n.origin]??n.origin;return`${wi(t??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};var Hc=O(()=>{j()});function Eg(){return{localeError:jI()}}var jI=()=>{let r={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function i(n){return r[n]??null}let v={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},u={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${$}`;return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${$}`}case"invalid_value":if(n.values.length===1)return`Invalid input: expected ${D(n.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 ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${t}${n.maximum.toString()} ${o.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${t}${n.minimum.toString()} ${o.unit}`;return`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.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 "${t.prefix}"`;if(t.format==="ends_with")return`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${t.suffix}"`;if(t.format==="includes")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 "${t.includes}"`;if(t.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 ${t.pattern}`;return`Invalid ${v[t.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`${n.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"}: ${_(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.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 ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};var Fc=O(()=>{j()});function Tg(){return{localeError:LI()}}var LI=()=>{let r={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function i(n){return r[n]??null}let v={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},u={nan:"NaN",number:"nombor"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${$}`;return`Input tidak sah: dijangka ${t}, diterima ${$}`}case"invalid_value":if(n.values.length===1)return`Input tidak sah: dijangka ${D(n.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Terlalu besar: dijangka ${n.origin??"nilai"} ${o.verb} ${t}${n.maximum.toString()} ${o.unit??"elemen"}`;return`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Terlalu kecil: dijangka ${n.origin} ${o.verb} ${t}${n.minimum.toString()} ${o.unit}`;return`Terlalu kecil: dijangka ${n.origin} adalah ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`String tidak sah: mesti bermula dengan "${t.prefix}"`;if(t.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${t.suffix}"`;if(t.format==="includes")return`String tidak sah: mesti mengandungi "${t.includes}"`;if(t.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${t.pattern}`;return`${v[t.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${_(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};var Ec=O(()=>{j()});function xg(){return{localeError:AI()}}var AI=()=>{let r={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function i(n){return r[n]??null}let v={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},u={nan:"NaN",number:"getal"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${$}`;return`Ongeldige invoer: verwacht ${t}, ontving ${$}`}case"invalid_value":if(n.values.length===1)return`Ongeldige invoer: verwacht ${D(n.values[0])}`;return`Ongeldige optie: verwacht \xE9\xE9n van ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin),$=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";if(o)return`Te ${$}: verwacht dat ${n.origin??"waarde"} ${t}${n.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`;return`Te ${$}: verwacht dat ${n.origin??"waarde"} ${t}${n.maximum.toString()} is`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin),$=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";if(o)return`Te ${$}: verwacht dat ${n.origin} ${t}${n.minimum.toString()} ${o.unit} ${o.verb}`;return`Te ${$}: verwacht dat ${n.origin} ${t}${n.minimum.toString()} is`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Ongeldige tekst: moet met "${t.prefix}" beginnen`;if(t.format==="ends_with")return`Ongeldige tekst: moet op "${t.suffix}" eindigen`;if(t.format==="includes")return`Ongeldige tekst: moet "${t.includes}" bevatten`;if(t.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`;return`Ongeldig: ${v[t.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};var Tc=O(()=>{j()});function Mg(){return{localeError:JI()}}var JI=()=>{let r={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function i(n){return r[n]??null}let v={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},u={nan:"NaN",number:"tall",array:"liste"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Ugyldig input: forventet instanceof ${n.expected}, fikk ${$}`;return`Ugyldig input: forventet ${t}, fikk ${$}`}case"invalid_value":if(n.values.length===1)return`Ugyldig verdi: forventet ${D(n.values[0])}`;return`Ugyldig valg: forventet en av ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${t}${n.maximum.toString()} ${o.unit??"elementer"}`;return`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`For lite(n): forventet ${n.origin} til \xE5 ha ${t}${n.minimum.toString()} ${o.unit}`;return`For lite(n): forventet ${n.origin} til \xE5 ha ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Ugyldig streng: m\xE5 starte med "${t.prefix}"`;if(t.format==="ends_with")return`Ugyldig streng: m\xE5 ende med "${t.suffix}"`;if(t.format==="includes")return`Ugyldig streng: m\xE5 inneholde "${t.includes}"`;if(t.format==="regex")return`Ugyldig streng: m\xE5 matche m\xF8nsteret ${t.pattern}`;return`Ugyldig ${v[t.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${_(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};var xc=O(()=>{j()});function Yg(){return{localeError:WI()}}var WI=()=>{let r={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function i(n){return r[n]??null}let v={regex:"giren",email:"epostag\xE2h",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 heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},u={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${$}`;return`F\xE2sit giren: umulan ${t}, al\u0131nan ${$}`}case"invalid_value":if(n.values.length===1)return`F\xE2sit giren: umulan ${D(n.values[0])}`;return`F\xE2sit tercih: m\xFBteberler ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${t}${n.maximum.toString()} ${o.unit??"elements"} sahip olmal\u0131yd\u0131.`;return`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${t}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${t}${n.minimum.toString()} ${o.unit} sahip olmal\u0131yd\u0131.`;return`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${t}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`F\xE2sit metin: "${t.prefix}" ile ba\u015Flamal\u0131.`;if(t.format==="ends_with")return`F\xE2sit metin: "${t.suffix}" ile bitmeli.`;if(t.format==="includes")return`F\xE2sit metin: "${t.includes}" ihtiv\xE2 etmeli.`;if(t.format==="regex")return`F\xE2sit metin: ${t.pattern} nak\u015F\u0131na uymal\u0131.`;return`F\xE2sit ${v[t.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};var Mc=O(()=>{j()});function qg(){return{localeError:VI()}}var VI=()=>{let r={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function i(n){return r[n]??null}let v={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},u={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${$} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${t} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${$} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":if(n.values.length===1)return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${D(n.values[0])} \u0648\u0627\u06CC`;return`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${_(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${t}${n.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`;return`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${t}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${t}${n.minimum.toString()} ${o.unit} \u0648\u0644\u0631\u064A`;return`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${t}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${t.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`;if(t.format==="ends_with")return`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${t.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`;if(t.format==="includes")return`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${t.includes}" \u0648\u0644\u0631\u064A`;if(t.format==="regex")return`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${t.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`;return`${v[t.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${_(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.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 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};var Yc=O(()=>{j()});function Xg(){return{localeError:GI()}}var GI=()=>{let r={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function i(n){return r[n]??null}let v={regex:"wyra\u017Cenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},u={nan:"NaN",number:"liczba",array:"tablica"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${$}`;return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${t}, otrzymano ${$}`}case"invalid_value":if(n.values.length===1)return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${D(n.values[0])}`;return`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${t}${n.maximum.toString()} ${o.unit??"element\xF3w"}`;return`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${t}${n.minimum.toString()} ${o.unit??"element\xF3w"}`;return`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${t.prefix}"`;if(t.format==="ends_with")return`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${t.suffix}"`;if(t.format==="includes")return`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${t.includes}"`;if(t.format==="regex")return`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${t.pattern}`;return`Nieprawid\u0142ow(y/a/e) ${v[t.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};var qc=O(()=>{j()});function Rg(){return{localeError:KI()}}var KI=()=>{let r={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function i(n){return r[n]??null}let v={regex:"padr\xE3o",email:"endere\xE7o de e-mail",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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},u={nan:"NaN",number:"n\xFAmero",null:"nulo"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${$}`;return`Tipo inv\xE1lido: esperado ${t}, recebido ${$}`}case"invalid_value":if(n.values.length===1)return`Entrada inv\xE1lida: esperado ${D(n.values[0])}`;return`Op\xE7\xE3o inv\xE1lida: esperada uma das ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Muito grande: esperado que ${n.origin??"valor"} tivesse ${t}${n.maximum.toString()} ${o.unit??"elementos"}`;return`Muito grande: esperado que ${n.origin??"valor"} fosse ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Muito pequeno: esperado que ${n.origin} tivesse ${t}${n.minimum.toString()} ${o.unit}`;return`Muito pequeno: esperado que ${n.origin} fosse ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Texto inv\xE1lido: deve come\xE7ar com "${t.prefix}"`;if(t.format==="ends_with")return`Texto inv\xE1lido: deve terminar com "${t.suffix}"`;if(t.format==="includes")return`Texto inv\xE1lido: deve incluir "${t.includes}"`;if(t.format==="regex")return`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${t.pattern}`;return`${v[t.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};var Xc=O(()=>{j()});function Zg(){return{localeError:BI()}}var BI=()=>{let r={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function i(n){return r[n]??null}let v={regex:"intrare",email:"adres\u0103 de email",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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},u={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;return`Intrare invalid\u0103: a\u0219teptat ${t}, primit ${$}`}case"invalid_value":if(n.values.length===1)return`Intrare invalid\u0103: a\u0219teptat ${D(n.values[0])}`;return`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${o.verb} ${t}${n.maximum.toString()} ${o.unit??"elemente"}`;return`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Prea mic: a\u0219teptat ca ${n.origin} ${o.verb} ${t}${n.minimum.toString()} ${o.unit}`;return`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${t.prefix}"`;if(t.format==="ends_with")return`\u0218ir invalid: trebuie s\u0103 se termine cu "${t.suffix}"`;if(t.format==="includes")return`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${t.includes}"`;if(t.format==="regex")return`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${t.pattern}`;return`Format invalid: ${v[t.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${_(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}};var Rc=O(()=>{j()});function Zc(r,i,v,u){let n=Math.abs(r),t=n%10,o=n%100;if(o>=11&&o<=19)return u;if(t===1)return i;if(t>=2&&t<=4)return v;return u}function Qg(){return{localeError:HI()}}var HI=()=>{let r={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function i(n){return r[n]??null}let v={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},u={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${$}`;return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${t}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${$}`}case"invalid_value":if(n.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 ${D(n.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 ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o){let $=Number(n.maximum),b=Zc($,o.unit.one,o.unit.few,o.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${t}${n.maximum.toString()} ${b}`}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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o){let $=Number(n.minimum),b=Zc($,o.unit.one,o.unit.few,o.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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${t}${n.minimum.toString()} ${b}`}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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.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 "${t.prefix}"`;if(t.format==="ends_with")return`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${t.suffix}"`;if(t.format==="includes")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 "${t.includes}"`;if(t.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 ${t.pattern}`;return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${v[t.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${_(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};var Qc=O(()=>{j()});function Cg(){return{localeError:FI()}}var FI=()=>{let r={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function i(n){return r[n]??null}let v={regex:"vnos",email:"e-po\u0161tni naslov",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 datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},u={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${$}`;return`Neveljaven vnos: pri\u010Dakovano ${t}, prejeto ${$}`}case"invalid_value":if(n.values.length===1)return`Neveljaven vnos: pri\u010Dakovano ${D(n.values[0])}`;return`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${t}${n.maximum.toString()} ${o.unit??"elementov"}`;return`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${t}${n.minimum.toString()} ${o.unit}`;return`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Neveljaven niz: mora se za\u010Deti z "${t.prefix}"`;if(t.format==="ends_with")return`Neveljaven niz: mora se kon\u010Dati z "${t.suffix}"`;if(t.format==="includes")return`Neveljaven niz: mora vsebovati "${t.includes}"`;if(t.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`;return`Neveljaven ${v[t.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${_(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};var Cc=O(()=>{j()});function fg(){return{localeError:EI()}}var EI=()=>{let r={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function i(n){return r[n]??null}let v={regex:"regulj\xE4rt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},u={nan:"NaN",number:"antal",array:"lista"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${$}`;return`Ogiltig inmatning: f\xF6rv\xE4ntat ${t}, fick ${$}`}case"invalid_value":if(n.values.length===1)return`Ogiltig inmatning: f\xF6rv\xE4ntat ${D(n.values[0])}`;return`Ogiltigt val: f\xF6rv\xE4ntade en av ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${t}${n.maximum.toString()} ${o.unit??"element"}`;return`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${t}${n.minimum.toString()} ${o.unit}`;return`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${t.prefix}"`;if(t.format==="ends_with")return`Ogiltig str\xE4ng: m\xE5ste sluta med "${t.suffix}"`;if(t.format==="includes")return`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${t.includes}"`;if(t.format==="regex")return`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${t.pattern}"`;return`Ogiltig(t) ${v[t.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${_(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};var fc=O(()=>{j()});function dg(){return{localeError:TI()}}var TI=()=>{let r={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"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function i(n){return r[n]??null}let v={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},u={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))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 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${$}`;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 ${t}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${$}`}case"invalid_value":if(n.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 ${D(n.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 ${_(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${t}${n.maximum.toString()} ${o.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${t}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)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 ${n.origin} ${t}${n.minimum.toString()} ${o.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 ${n.origin} ${t}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${t.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;if(t.format==="ends_with")return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${t.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;if(t.format==="includes")return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${t.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;if(t.format==="regex")return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${t.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 ${v[t.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.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${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${_(n.keys,", ")}`;case"invalid_key":return`${n.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`${n.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"}}};var dc=O(()=>{j()});function yg(){return{localeError:xI()}}var xI=()=>{let r={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function i(n){return r[n]??null}let v={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},u={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))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 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${$}`;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 ${t} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${$}`}case"invalid_value":if(n.values.length===1)return`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${D(n.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 ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",o=i(n.origin);if(o)return`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${t} ${n.maximum.toString()} ${o.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`;return`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${t} ${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",o=i(n.origin);if(o)return`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${t} ${n.minimum.toString()} ${o.unit}`;return`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${t} ${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.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 "${t.prefix}"`;if(t.format==="ends_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\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${t.suffix}"`;if(t.format==="includes")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 "${t.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`;if(t.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 ${t.pattern}`;return`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${v[t.format]??n.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 ${n.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: ${_(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.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 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};var yc=O(()=>{j()});function hg(){return{localeError:MI()}}var MI=()=>{let r={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function i(n){return r[n]??null}let v={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},u={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${$}`;return`Ge\xE7ersiz de\u011Fer: beklenen ${t}, al\u0131nan ${$}`}case"invalid_value":if(n.values.length===1)return`Ge\xE7ersiz de\u011Fer: beklenen ${D(n.values[0])}`;return`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${t}${n.maximum.toString()} ${o.unit??"\xF6\u011Fe"}`;return`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${t}${n.minimum.toString()} ${o.unit}`;return`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Ge\xE7ersiz metin: "${t.prefix}" ile ba\u015Flamal\u0131`;if(t.format==="ends_with")return`Ge\xE7ersiz metin: "${t.suffix}" ile bitmeli`;if(t.format==="includes")return`Ge\xE7ersiz metin: "${t.includes}" i\xE7ermeli`;if(t.format==="regex")return`Ge\xE7ersiz metin: ${t.pattern} desenine uymal\u0131`;return`Ge\xE7ersiz ${v[t.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${_(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};var hc=O(()=>{j()});function ki(){return{localeError:YI()}}var YI=()=>{let r={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function i(n){return r[n]??null}let v={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},u={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))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 instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${$}`;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 ${t}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${$}`}case"invalid_value":if(n.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 ${D(n.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 ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${o.verb} ${t}${n.maximum.toString()} ${o.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${o.verb} ${t}${n.minimum.toString()} ${o.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 ${n.origin} \u0431\u0443\u0434\u0435 ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.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 "${t.prefix}"`;if(t.format==="ends_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 \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${t.suffix}"`;if(t.format==="includes")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 "${t.includes}"`;if(t.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 ${t.pattern}`;return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${v[t.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${_(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};var pg=O(()=>{j()});function ag(){return ki()}var pc=O(()=>{pg()});function sg(){return{localeError:qI()}}var qI=()=>{let r={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function i(n){return r[n]??null}let v={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},u={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${$} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${t} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${$} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":if(n.values.length===1)return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${D(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;return`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${_(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${t}${n.maximum.toString()} ${o.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: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${t}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${t}${n.minimum.toString()} ${o.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;return`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${t}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${t.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;if(t.format==="ends_with")return`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${t.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;if(t.format==="includes")return`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${t.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;if(t.format==="regex")return`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${t.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;return`\u063A\u0644\u0637 ${v[t.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.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${n.keys.length>1?"\u0632":""}: ${_(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};var ac=O(()=>{j()});function rl(){return{localeError:XI()}}var XI=()=>{let r={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function i(n){return r[n]??null}let v={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},u={nan:"NaN",number:"raqam",array:"massiv"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${$}`;return`Noto\u2018g\u2018ri kirish: kutilgan ${t}, qabul qilingan ${$}`}case"invalid_value":if(n.values.length===1)return`Noto\u2018g\u2018ri kirish: kutilgan ${D(n.values[0])}`;return`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Juda katta: kutilgan ${n.origin??"qiymat"} ${t}${n.maximum.toString()} ${o.unit} ${o.verb}`;return`Juda katta: kutilgan ${n.origin??"qiymat"} ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Juda kichik: kutilgan ${n.origin} ${t}${n.minimum.toString()} ${o.unit} ${o.verb}`;return`Juda kichik: kutilgan ${n.origin} ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Noto\u2018g\u2018ri satr: "${t.prefix}" bilan boshlanishi kerak`;if(t.format==="ends_with")return`Noto\u2018g\u2018ri satr: "${t.suffix}" bilan tugashi kerak`;if(t.format==="includes")return`Noto\u2018g\u2018ri satr: "${t.includes}" ni o\u2018z ichiga olishi kerak`;if(t.format==="regex")return`Noto\u2018g\u2018ri satr: ${t.pattern} shabloniga mos kelishi kerak`;return`Noto\u2018g\u2018ri ${v[t.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${_(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};var sc=O(()=>{j()});function nl(){return{localeError:RI()}}var RI=()=>{let r={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function i(n){return r[n]??null}let v={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",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:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},u={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${$}`;return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${t}, nh\u1EADn \u0111\u01B0\u1EE3c ${$}`}case"invalid_value":if(n.values.length===1)return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${D(n.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 ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o.verb} ${t}${n.maximum.toString()} ${o.unit??"ph\u1EA7n t\u1EED"}`;return`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o.verb} ${t}${n.minimum.toString()} ${o.unit}`;return`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${t.prefix}"`;if(t.format==="ends_with")return`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${t.suffix}"`;if(t.format==="includes")return`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${t.includes}"`;if(t.format==="regex")return`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${t.pattern}`;return`${v[t.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${_(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.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 ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};var re=O(()=>{j()});function il(){return{localeError:ZI()}}var ZI=()=>{let r={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function i(n){return r[n]??null}let v={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},u={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${$}`;return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${t}\uFF0C\u5B9E\u9645\u63A5\u6536 ${$}`}case"invalid_value":if(n.values.length===1)return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${D(n.values[0])}`;return`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${t}${n.maximum.toString()} ${o.unit??"\u4E2A\u5143\u7D20"}`;return`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${t}${n.minimum.toString()} ${o.unit}`;return`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${t.prefix}" \u5F00\u5934`;if(t.format==="ends_with")return`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${t.suffix}" \u7ED3\u5C3E`;if(t.format==="includes")return`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${t.includes}"`;if(t.format==="regex")return`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${t.pattern}`;return`\u65E0\u6548${v[t.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${_(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};var ne=O(()=>{j()});function tl(){return{localeError:QI()}}var QI=()=>{let r={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function i(n){return r[n]??null}let v={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},u={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${$}`;return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${t}\uFF0C\u4F46\u6536\u5230 ${$}`}case"invalid_value":if(n.values.length===1)return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${D(n.values[0])}`;return`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${t}${n.maximum.toString()} ${o.unit??"\u500B\u5143\u7D20"}`;return`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${t}${n.maximum.toString()}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${t}${n.minimum.toString()} ${o.unit}`;return`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${t}${n.minimum.toString()}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${t.prefix}" \u958B\u982D`;if(t.format==="ends_with")return`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${t.suffix}" \u7D50\u5C3E`;if(t.format==="includes")return`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${t.includes}"`;if(t.format==="regex")return`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${t.pattern}`;return`\u7121\u6548\u7684 ${v[t.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${_(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};var ie=O(()=>{j()});function vl(){return{localeError:CI()}}var CI=()=>{let r={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function i(n){return r[n]??null}let v={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},u={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return(n)=>{switch(n.code){case"invalid_type":{let t=u[n.expected]??n.expected,o=k(n.input),$=u[o]??o;if(/^[A-Z]/.test(n.expected))return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${$}`;return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${t}, \xE0m\u1ECD\u0300 a r\xED ${$}`}case"invalid_value":if(n.values.length===1)return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${D(n.values[0])}`;return`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${_(n.values,"|")}`;case"too_big":{let t=n.inclusive?"<=":"<",o=i(n.origin);if(o)return`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${o.verb} ${t}${n.maximum} ${o.unit}`;return`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${t}${n.maximum}`}case"too_small":{let t=n.inclusive?">=":">",o=i(n.origin);if(o)return`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${o.verb} ${t}${n.minimum} ${o.unit}`;return`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${t}${n.minimum}`}case"invalid_format":{let t=n;if(t.format==="starts_with")return`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${t.prefix}"`;if(t.format==="ends_with")return`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${t.suffix}"`;if(t.format==="includes")return`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${t.includes}"`;if(t.format==="regex")return`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${t.pattern}`;return`A\u1E63\xEC\u1E63e: ${v[t.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${_(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};var te=O(()=>{j()});var Kn={};jr(Kn,{zhTW:()=>tl,zhCN:()=>il,yo:()=>vl,vi:()=>nl,uz:()=>rl,ur:()=>sg,uk:()=>ki,ua:()=>ag,tr:()=>hg,th:()=>yg,ta:()=>dg,sv:()=>fg,sl:()=>Cg,ru:()=>Qg,ro:()=>Zg,pt:()=>Rg,ps:()=>qg,pl:()=>Xg,ota:()=>Yg,no:()=>Mg,nl:()=>xg,ms:()=>Tg,mk:()=>Eg,lt:()=>Fg,ko:()=>Hg,km:()=>Di,kh:()=>Bg,ka:()=>Gg,ja:()=>Vg,it:()=>Wg,is:()=>Jg,id:()=>Ag,hy:()=>Lg,hu:()=>jg,hr:()=>Pg,he:()=>Sg,frCA:()=>Og,fr:()=>zg,fi:()=>mg,fa:()=>Ng,es:()=>kg,eo:()=>wg,en:()=>Ui,el:()=>Ug,de:()=>Ig,da:()=>_g,cs:()=>eg,ca:()=>cg,bg:()=>bg,be:()=>lg,az:()=>gg,ar:()=>$g});var ul=O(()=>{uc();oc();gc();lc();bc();cc();ec();_c();Ic();Dg();Uc();Dc();wc();kc();Nc();mc();zc();Oc();Sc();jc();Lc();Ac();Jc();Wc();Vc();Gc();Kg();Kc();Hc();Fc();Ec();Tc();xc();Mc();Yc();qc();Xc();Rc();Qc();Cc();fc();dc();yc();hc();pc();pg();ac();sc();re();ne();ie();te()});class ol{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...i){let v=i[0];if(this._map.set(r,v),v&&typeof v==="object"&&"id"in v)this._idmap.set(v.id,r);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){let i=this._map.get(r);if(i&&typeof i==="object"&&"id"in i)this._idmap.delete(i.id);return this._map.delete(r),this}get(r){let i=r._zod.parent;if(i){let v={...this.get(i)??{}};delete v.id;let u={...v,...this._map.get(r)};return Object.keys(u).length?u:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function Ni(){return new ol}var ve,pt,at,y;var mi=O(()=>{pt=Symbol("ZodOutput"),at=Symbol("ZodInput");(ve=globalThis).__zod_globalRegistry??(ve.__zod_globalRegistry=Ni());y=globalThis.__zod_globalRegistry});function $l(r,i){return new r({type:"string",...z(i)})}function gl(r,i){return new r({type:"string",coerce:!0,...z(i)})}function st(r,i){return new r({type:"string",format:"email",check:"string_format",abort:!1,...z(i)})}function zi(r,i){return new r({type:"string",format:"guid",check:"string_format",abort:!1,...z(i)})}function rv(r,i){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,...z(i)})}function nv(r,i){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...z(i)})}function iv(r,i){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...z(i)})}function tv(r,i){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...z(i)})}function Oi(r,i){return new r({type:"string",format:"url",check:"string_format",abort:!1,...z(i)})}function vv(r,i){return new r({type:"string",format:"emoji",check:"string_format",abort:!1,...z(i)})}function uv(r,i){return new r({type:"string",format:"nanoid",check:"string_format",abort:!1,...z(i)})}function ov(r,i){return new r({type:"string",format:"cuid",check:"string_format",abort:!1,...z(i)})}function $v(r,i){return new r({type:"string",format:"cuid2",check:"string_format",abort:!1,...z(i)})}function gv(r,i){return new r({type:"string",format:"ulid",check:"string_format",abort:!1,...z(i)})}function lv(r,i){return new r({type:"string",format:"xid",check:"string_format",abort:!1,...z(i)})}function bv(r,i){return new r({type:"string",format:"ksuid",check:"string_format",abort:!1,...z(i)})}function cv(r,i){return new r({type:"string",format:"ipv4",check:"string_format",abort:!1,...z(i)})}function ev(r,i){return new r({type:"string",format:"ipv6",check:"string_format",abort:!1,...z(i)})}function ll(r,i){return new r({type:"string",format:"mac",check:"string_format",abort:!1,...z(i)})}function _v(r,i){return new r({type:"string",format:"cidrv4",check:"string_format",abort:!1,...z(i)})}function Iv(r,i){return new r({type:"string",format:"cidrv6",check:"string_format",abort:!1,...z(i)})}function Uv(r,i){return new r({type:"string",format:"base64",check:"string_format",abort:!1,...z(i)})}function Dv(r,i){return new r({type:"string",format:"base64url",check:"string_format",abort:!1,...z(i)})}function wv(r,i){return new r({type:"string",format:"e164",check:"string_format",abort:!1,...z(i)})}function kv(r,i){return new r({type:"string",format:"jwt",check:"string_format",abort:!1,...z(i)})}function bl(r,i){return new r({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...z(i)})}function cl(r,i){return new r({type:"string",format:"date",check:"string_format",...z(i)})}function el(r,i){return new r({type:"string",format:"time",check:"string_format",precision:null,...z(i)})}function _l(r,i){return new r({type:"string",format:"duration",check:"string_format",...z(i)})}function Il(r,i){return new r({type:"number",checks:[],...z(i)})}function Ul(r,i){return new r({type:"number",coerce:!0,checks:[],...z(i)})}function Dl(r,i){return new r({type:"number",check:"number_format",abort:!1,format:"safeint",...z(i)})}function wl(r,i){return new r({type:"number",check:"number_format",abort:!1,format:"float32",...z(i)})}function kl(r,i){return new r({type:"number",check:"number_format",abort:!1,format:"float64",...z(i)})}function Nl(r,i){return new r({type:"number",check:"number_format",abort:!1,format:"int32",...z(i)})}function ml(r,i){return new r({type:"number",check:"number_format",abort:!1,format:"uint32",...z(i)})}function zl(r,i){return new r({type:"boolean",...z(i)})}function Ol(r,i){return new r({type:"boolean",coerce:!0,...z(i)})}function Sl(r,i){return new r({type:"bigint",...z(i)})}function Pl(r,i){return new r({type:"bigint",coerce:!0,...z(i)})}function jl(r,i){return new r({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...z(i)})}function Ll(r,i){return new r({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...z(i)})}function Al(r,i){return new r({type:"symbol",...z(i)})}function Jl(r,i){return new r({type:"undefined",...z(i)})}function Wl(r,i){return new r({type:"null",...z(i)})}function Vl(r){return new r({type:"any"})}function Gl(r){return new r({type:"unknown"})}function Kl(r,i){return new r({type:"never",...z(i)})}function Bl(r,i){return new r({type:"void",...z(i)})}function Hl(r,i){return new r({type:"date",...z(i)})}function Fl(r,i){return new r({type:"date",coerce:!0,...z(i)})}function El(r,i){return new r({type:"nan",...z(i)})}function zr(r,i){return new xt({check:"less_than",...z(i),value:r,inclusive:!1})}function _r(r,i){return new xt({check:"less_than",...z(i),value:r,inclusive:!0})}function Or(r,i){return new Mt({check:"greater_than",...z(i),value:r,inclusive:!1})}function vr(r,i){return new Mt({check:"greater_than",...z(i),value:r,inclusive:!0})}function Si(r){return Or(0,r)}function Pi(r){return zr(0,r)}function ji(r){return _r(0,r)}function Li(r){return vr(0,r)}function Vr(r,i){return new Wo({check:"multiple_of",...z(i),value:r})}function Gr(r,i){return new Ko({check:"max_size",...z(i),maximum:r})}function Sr(r,i){return new Bo({check:"min_size",...z(i),minimum:r})}function xr(r,i){return new Ho({check:"size_equals",...z(i),size:r})}function Mr(r,i){return new Fo({check:"max_length",...z(i),maximum:r})}function Ar(r,i){return new Eo({check:"min_length",...z(i),minimum:r})}function Yr(r,i){return new To({check:"length_equals",...z(i),length:r})}function sr(r,i){return new xo({check:"string_format",format:"regex",...z(i),pattern:r})}function rn(r){return new Mo({check:"string_format",format:"lowercase",...z(r)})}function nn(r){return new Yo({check:"string_format",format:"uppercase",...z(r)})}function tn(r,i){return new qo({check:"string_format",format:"includes",...z(i),includes:r})}function vn(r,i){return new Xo({check:"string_format",format:"starts_with",...z(i),prefix:r})}function un(r,i){return new Ro({check:"string_format",format:"ends_with",...z(i),suffix:r})}function Ai(r,i,v){return new Zo({check:"property",property:r,schema:i,...z(v)})}function on(r,i){return new Qo({check:"mime_type",mime:r,...z(i)})}function kr(r){return new Co({check:"overwrite",tx:r})}function $n(r){return kr((i)=>i.normalize(r))}function gn(){return kr((r)=>r.trim())}function ln(){return kr((r)=>r.toLowerCase())}function bn(){return kr((r)=>r.toUpperCase())}function cn(){return kr((r)=>Zu(r))}function Tl(r,i,v){return new r({type:"array",element:i,...z(v)})}function dI(r,i,v){return new r({type:"union",options:i,...z(v)})}function yI(r,i,v){return new r({type:"union",options:i,inclusive:!1,...z(v)})}function hI(r,i,v,u){return new r({type:"union",options:v,discriminator:i,...z(u)})}function pI(r,i,v){return new r({type:"intersection",left:i,right:v})}function aI(r,i,v,u){let n=v instanceof J;return new r({type:"tuple",items:i,rest:n?v:null,...z(n?u:v)})}function sI(r,i,v,u){return new r({type:"record",keyType:i,valueType:v,...z(u)})}function rU(r,i,v,u){return new r({type:"map",keyType:i,valueType:v,...z(u)})}function nU(r,i,v){return new r({type:"set",valueType:i,...z(v)})}function iU(r,i,v){let u=Array.isArray(i)?Object.fromEntries(i.map((n)=>[n,n])):i;return new r({type:"enum",entries:u,...z(v)})}function tU(r,i,v){return new r({type:"enum",entries:i,...z(v)})}function vU(r,i,v){return new r({type:"literal",values:Array.isArray(i)?i:[i],...z(v)})}function xl(r,i){return new r({type:"file",...z(i)})}function uU(r,i){return new r({type:"transform",transform:i})}function oU(r,i){return new r({type:"optional",innerType:i})}function $U(r,i){return new r({type:"nullable",innerType:i})}function gU(r,i,v){return new r({type:"default",innerType:i,get defaultValue(){return typeof v==="function"?v():Cu(v)}})}function lU(r,i,v){return new r({type:"nonoptional",innerType:i,...z(v)})}function bU(r,i){return new r({type:"success",innerType:i})}function cU(r,i,v){return new r({type:"catch",innerType:i,catchValue:typeof v==="function"?v:()=>v})}function eU(r,i,v){return new r({type:"pipe",in:i,out:v})}function _U(r,i){return new r({type:"readonly",innerType:i})}function IU(r,i,v){return new r({type:"template_literal",parts:i,...z(v)})}function UU(r,i){return new r({type:"lazy",getter:i})}function DU(r,i){return new r({type:"promise",innerType:i})}function Ml(r,i,v){let u=z(v);return u.abort??(u.abort=!0),new r({type:"custom",check:"custom",fn:i,...u})}function Yl(r,i,v){return new r({type:"custom",check:"custom",fn:i,...z(v)})}function ql(r,i){let v=ue((u)=>{return u.addIssue=(n)=>{if(typeof n==="string")u.issues.push(On(n,u.value,v._zod.def));else{let t=n;if(t.fatal)t.continue=!1;t.code??(t.code="custom"),t.input??(t.input=u.value),t.inst??(t.inst=v),t.continue??(t.continue=!v._zod.def.abort),u.issues.push(On(t))}},r(u.value,u)},i);return v}function ue(r,i){let v=new X({check:"custom",...z(i)});return v._zod.check=r,v}function Xl(r){let i=new X({check:"describe"});return i._zod.onattach=[(v)=>{let u=y.get(v)??{};y.add(v,{...u,description:r})}],i._zod.check=()=>{},i}function Rl(r){let i=new X({check:"meta"});return i._zod.onattach=[(v)=>{let u=y.get(v)??{};y.add(v,{...u,...r})}],i._zod.check=()=>{},i}function Zl(r,i){let v=z(i),u=v.truthy??["true","1","yes","on","y","enabled"],n=v.falsy??["false","0","no","off","n","disabled"];if(v.case!=="sensitive")u=u.map((m)=>typeof m==="string"?m.toLowerCase():m),n=n.map((m)=>typeof m==="string"?m.toLowerCase():m);let t=new Set(u),o=new Set(n),$=r.Codec??Ii,b=r.Boolean??ei,c=new(r.String??ar)({type:"string",error:v.error}),U=new b({type:"boolean",error:v.error}),w=new $({type:"pipe",in:c,out:U,transform:(m,A)=>{let ir=m;if(v.case!=="sensitive")ir=ir.toLowerCase();if(t.has(ir))return!0;else if(o.has(ir))return!1;else return A.issues.push({code:"invalid_value",expected:"stringbool",values:[...t,...o],input:A.value,inst:w,continue:!1}),{}},reverseTransform:(m,A)=>{if(m===!0)return u[0]||"true";else return n[0]||"false"},error:v.error});return w}function Bn(r,i,v,u={}){let n=z(u),t={...z(u),check:"string_format",type:"string",format:i,fn:typeof v==="function"?v:($)=>v.test($),...n};if(v instanceof RegExp)t.pattern=v;return new r(t)}var Nv;var oe=O(()=>{Yt();mi();og();j();Nv={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function qr(r){let i=r?.target??"draft-2020-12";if(i==="draft-4")i="draft-04";if(i==="draft-7")i="draft-07";return{processors:r.processors??{},metadataRegistry:r?.metadata??y,target:i,unrepresentable:r?.unrepresentable??"throw",override:r?.override??(()=>{}),io:r?.io??"output",counter:0,seen:new Map,cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0}}function H(r,i,v={path:[],schemaPath:[]}){var u;let n=r._zod.def,t=i.seen.get(r);if(t){if(t.count++,v.schemaPath.includes(r))t.cycle=v.path;return t.schema}let o={schema:{},count:1,cycle:void 0,path:v.path};i.seen.set(r,o);let $=r._zod.toJSONSchema?.();if($)o.schema=$;else{let c={...v,schemaPath:[...v.schemaPath,r],path:v.path};if(r._zod.processJSONSchema)r._zod.processJSONSchema(i,o.schema,c);else{let w=o.schema,m=i.processors[n.type];if(!m)throw Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);m(r,i,w,c)}let U=r._zod.parent;if(U){if(!o.ref)o.ref=U;H(U,i,c),i.seen.get(U).isParent=!0}}let b=i.metadataRegistry.get(r);if(b)Object.assign(o.schema,b);if(i.io==="input"&&gr(r))delete o.schema.examples,delete o.schema.default;if(i.io==="input"&&"_prefault"in o.schema)(u=o.schema).default??(u.default=o.schema._prefault);return delete o.schema._prefault,i.seen.get(r).schema}function Xr(r,i){let v=r.seen.get(i);if(!v)throw Error("Unprocessed schema. This is a bug in Zod.");let u=new Map;for(let o of r.seen.entries()){let $=r.metadataRegistry.get(o[0])?.id;if($){let b=u.get($);if(b&&b!==o[0])throw Error(`Duplicate schema id "${$}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);u.set($,o[0])}}let n=(o)=>{let $=r.target==="draft-2020-12"?"$defs":"definitions";if(r.external){let U=r.external.registry.get(o[0])?.id,w=r.external.uri??((A)=>A);if(U)return{ref:w(U)};let m=o[1].defId??o[1].schema.id??`schema${r.counter++}`;return o[1].defId=m,{defId:m,ref:`${w("__shared")}#/${$}/${m}`}}if(o[1]===v)return{ref:"#"};let g=`${"#"}/${$}/`,c=o[1].schema.id??`__schema${r.counter++}`;return{defId:c,ref:g+c}},t=(o)=>{if(o[1].schema.$ref)return;let $=o[1],{ref:b,defId:g}=n(o);if($.def={...$.schema},g)$.defId=g;let c=$.schema;for(let U in c)delete c[U];c.$ref=b};if(r.cycles==="throw")for(let o of r.seen.entries()){let $=o[1];if($.cycle)throw Error(`Cycle detected: #/${$.cycle?.join("/")}/<root>\n\nSet the \\`cycles\\` parameter to \\`"ref"\\` to resolve cyclical schemas with defs.`)}for(let o of r.seen.entries()){let $=o[1];if(i===o[0]){t(o);continue}if(r.external){let g=r.external.registry.get(o[0])?.id;if(i!==o[0]&&g){t(o);continue}}if(r.metadataRegistry.get(o[0])?.id){t(o);continue}if($.cycle){t(o);continue}if($.count>1){if(r.reused==="ref"){t(o);continue}}}}function Rr(r,i){let v=r.seen.get(i);if(!v)throw Error("Unprocessed schema. This is a bug in Zod.");let u=($)=>{let b=r.seen.get($);if(b.ref===null)return;let g=b.def??b.schema,c={...g},U=b.ref;if(b.ref=null,U){u(U);let m=r.seen.get(U),A=m.schema;if(A.$ref&&(r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"))g.allOf=g.allOf??[],g.allOf.push(A);else Object.assign(g,A);if(Object.assign(g,c),$._zod.parent===U)for(let R in g){if(R==="$ref"||R==="allOf")continue;if(!(R in c))delete g[R]}if(A.$ref&&m.def)for(let R in g){if(R==="$ref"||R==="allOf")continue;if(R in m.def&&JSON.stringify(g[R])===JSON.stringify(m.def[R]))delete g[R]}}let w=$._zod.parent;if(w&&w!==U){u(w);let m=r.seen.get(w);if(m?.schema.$ref){if(g.$ref=m.schema.$ref,m.def)for(let A in g){if(A==="$ref"||A==="allOf")continue;if(A in m.def&&JSON.stringify(g[A])===JSON.stringify(m.def[A]))delete g[A]}}}r.override({zodSchema:$,jsonSchema:g,path:b.path??[]})};for(let $ of[...r.seen.entries()].reverse())u($[0]);let n={};if(r.target==="draft-2020-12")n.$schema="https://json-schema.org/draft/2020-12/schema";else if(r.target==="draft-07")n.$schema="http://json-schema.org/draft-07/schema#";else if(r.target==="draft-04")n.$schema="http://json-schema.org/draft-04/schema#";else if(r.target==="openapi-3.0");if(r.external?.uri){let $=r.external.registry.get(i)?.id;if(!$)throw Error("Schema is missing an `id` property");n.$id=r.external.uri($)}Object.assign(n,v.def??v.schema);let t=r.metadataRegistry.get(i)?.id;if(t!==void 0&&n.id===t)delete n.id;let o=r.external?.defs??{};for(let $ of r.seen.entries()){let b=$[1];if(b.def&&b.defId){if(b.def.id===b.defId)delete b.def.id;o[b.defId]=b.def}}if(r.external);else if(Object.keys(o).length>0)if(r.target==="draft-2020-12")n.$defs=o;else n.definitions=o;try{let $=JSON.parse(JSON.stringify(n));return Object.defineProperty($,"~standard",{value:{...i["~standard"],jsonSchema:{input:Hn(i,"input",r.processors),output:Hn(i,"output",r.processors)}},enumerable:!1,writable:!1}),$}catch($){throw Error("Error converting schema to JSON.")}}function gr(r,i){let v=i??{seen:new Set};if(v.seen.has(r))return!1;v.seen.add(r);let u=r._zod.def;if(u.type==="transform")return!0;if(u.type==="array")return gr(u.element,v);if(u.type==="set")return gr(u.valueType,v);if(u.type==="lazy")return gr(u.getter(),v);if(u.type==="promise"||u.type==="optional"||u.type==="nonoptional"||u.type==="nullable"||u.type==="readonly"||u.type==="default"||u.type==="prefault")return gr(u.innerType,v);if(u.type==="intersection")return gr(u.left,v)||gr(u.right,v);if(u.type==="record"||u.type==="map")return gr(u.keyType,v)||gr(u.valueType,v);if(u.type==="pipe"){if(r._zod.traits.has("$ZodCodec"))return!0;return gr(u.in,v)||gr(u.out,v)}if(u.type==="object"){for(let n in u.shape)if(gr(u.shape[n],v))return!0;return!1}if(u.type==="union"){for(let n of u.options)if(gr(n,v))return!0;return!1}if(u.type==="tuple"){for(let n of u.items)if(gr(n,v))return!0;if(u.rest&&gr(u.rest,v))return!0;return!1}return!1}var Ql=(r,i={})=>(v)=>{let u=qr({...v,processors:i});return H(r,u),Xr(u,r),Rr(u,r)},Hn=(r,i,v={})=>(u)=>{let{libraryOptions:n,target:t}=u??{},o=qr({...n??{},target:t,io:i,processors:v});return H(r,o),Xr(o,r),Rr(o,r)};var Ji=O(()=>{mi()});function Wi(r,i){if("_idmap"in r){let u=r,n=qr({...i,processors:mv}),t={};for(let b of u._idmap.entries()){let[g,c]=b;H(c,n)}let o={},$={registry:u,uri:i?.uri,defs:t};n.external=$;for(let b of u._idmap.entries()){let[g,c]=b;Xr(n,c),o[g]=Rr(n,c)}if(Object.keys(t).length>0){let b=n.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[b]:t}}return{schemas:o}}let v=qr({...i,processors:mv});return H(r,v),Xr(v,r),Rr(v,r)}var wU,Cl=(r,i,v,u)=>{let n=v;n.type="string";let{minimum:t,maximum:o,format:$,patterns:b,contentEncoding:g}=r._zod.bag;if(typeof t==="number")n.minLength=t;if(typeof o==="number")n.maxLength=o;if($){if(n.format=wU[$]??$,n.format==="")delete n.format;if($==="time")delete n.format}if(g)n.contentEncoding=g;if(b&&b.size>0){let c=[...b];if(c.length===1)n.pattern=c[0].source;else if(c.length>1)n.allOf=[...c.map((U)=>({...i.target==="draft-07"||i.target==="draft-04"||i.target==="openapi-3.0"?{type:"string"}:{},pattern:U.source}))]}},fl=(r,i,v,u)=>{let n=v,{minimum:t,maximum:o,format:$,multipleOf:b,exclusiveMaximum:g,exclusiveMinimum:c}=r._zod.bag;if(typeof $==="string"&&$.includes("int"))n.type="integer";else n.type="number";let U=typeof c==="number"&&c>=(t??Number.NEGATIVE_INFINITY),w=typeof g==="number"&&g<=(o??Number.POSITIVE_INFINITY),m=i.target==="draft-04"||i.target==="openapi-3.0";if(U)if(m)n.minimum=c,n.exclusiveMinimum=!0;else n.exclusiveMinimum=c;else if(typeof t==="number")n.minimum=t;if(w)if(m)n.maximum=g,n.exclusiveMaximum=!0;else n.exclusiveMaximum=g;else if(typeof o==="number")n.maximum=o;if(typeof b==="number")n.multipleOf=b},dl=(r,i,v,u)=>{v.type="boolean"},yl=(r,i,v,u)=>{if(i.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},hl=(r,i,v,u)=>{if(i.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},pl=(r,i,v,u)=>{if(i.target==="openapi-3.0")v.type="string",v.nullable=!0,v.enum=[null];else v.type="null"},al=(r,i,v,u)=>{if(i.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},sl=(r,i,v,u)=>{if(i.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},rb=(r,i,v,u)=>{v.not={}},nb=(r,i,v,u)=>{},ib=(r,i,v,u)=>{},tb=(r,i,v,u)=>{if(i.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},vb=(r,i,v,u)=>{let n=r._zod.def,t=ri(n.entries);if(t.every((o)=>typeof o==="number"))v.type="number";if(t.every((o)=>typeof o==="string"))v.type="string";v.enum=t},ub=(r,i,v,u)=>{let n=r._zod.def,t=[];for(let o of n.values)if(o===void 0){if(i.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o==="bigint")if(i.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else t.push(Number(o));else t.push(o);if(t.length===0);else if(t.length===1){let o=t[0];if(v.type=o===null?"null":typeof o,i.target==="draft-04"||i.target==="openapi-3.0")v.enum=[o];else v.const=o}else{if(t.every((o)=>typeof o==="number"))v.type="number";if(t.every((o)=>typeof o==="string"))v.type="string";if(t.every((o)=>typeof o==="boolean"))v.type="boolean";if(t.every((o)=>o===null))v.type="null";v.enum=t}},ob=(r,i,v,u)=>{if(i.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},$b=(r,i,v,u)=>{let n=v,t=r._zod.pattern;if(!t)throw Error("Pattern not found in template literal");n.type="string",n.pattern=t.source},gb=(r,i,v,u)=>{let n=v,t={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:$,mime:b}=r._zod.bag;if(o!==void 0)t.minLength=o;if($!==void 0)t.maxLength=$;if(b)if(b.length===1)t.contentMediaType=b[0],Object.assign(n,t);else Object.assign(n,t),n.anyOf=b.map((g)=>({contentMediaType:g}));else Object.assign(n,t)},lb=(r,i,v,u)=>{v.type="boolean"},bb=(r,i,v,u)=>{if(i.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},cb=(r,i,v,u)=>{if(i.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},eb=(r,i,v,u)=>{if(i.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},_b=(r,i,v,u)=>{if(i.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},Ib=(r,i,v,u)=>{if(i.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},Ub=(r,i,v,u)=>{let n=v,t=r._zod.def,{minimum:o,maximum:$}=r._zod.bag;if(typeof o==="number")n.minItems=o;if(typeof $==="number")n.maxItems=$;n.type="array",n.items=H(t.element,i,{...u,path:[...u.path,"items"]})},Db=(r,i,v,u)=>{let n=v,t=r._zod.def;n.type="object",n.properties={};let o=t.shape;for(let g in o)n.properties[g]=H(o[g],i,{...u,path:[...u.path,"properties",g]});let $=new Set(Object.keys(o)),b=new Set([...$].filter((g)=>{let c=t.shape[g]._zod;if(i.io==="input")return c.optin===void 0;else return c.optout===void 0}));if(b.size>0)n.required=Array.from(b);if(t.catchall?._zod.def.type==="never")n.additionalProperties=!1;else if(!t.catchall){if(i.io==="output")n.additionalProperties=!1}else if(t.catchall)n.additionalProperties=H(t.catchall,i,{...u,path:[...u.path,"additionalProperties"]})},zv=(r,i,v,u)=>{let n=r._zod.def,t=n.inclusive===!1,o=n.options.map(($,b)=>H($,i,{...u,path:[...u.path,t?"oneOf":"anyOf",b]}));if(t)v.oneOf=o;else v.anyOf=o},wb=(r,i,v,u)=>{let n=r._zod.def,t=H(n.left,i,{...u,path:[...u.path,"allOf",0]}),o=H(n.right,i,{...u,path:[...u.path,"allOf",1]}),$=(g)=>("allOf"in g)&&Object.keys(g).length===1,b=[...$(t)?t.allOf:[t],...$(o)?o.allOf:[o]];v.allOf=b},kb=(r,i,v,u)=>{let n=v,t=r._zod.def;n.type="array";let o=i.target==="draft-2020-12"?"prefixItems":"items",$=i.target==="draft-2020-12"?"items":i.target==="openapi-3.0"?"items":"additionalItems",b=t.items.map((w,m)=>H(w,i,{...u,path:[...u.path,o,m]})),g=t.rest?H(t.rest,i,{...u,path:[...u.path,$,...i.target==="openapi-3.0"?[t.items.length]:[]]}):null;if(i.target==="draft-2020-12"){if(n.prefixItems=b,g)n.items=g}else if(i.target==="openapi-3.0"){if(n.items={anyOf:b},g)n.items.anyOf.push(g);if(n.minItems=b.length,!g)n.maxItems=b.length}else if(n.items=b,g)n.additionalItems=g;let{minimum:c,maximum:U}=r._zod.bag;if(typeof c==="number")n.minItems=c;if(typeof U==="number")n.maxItems=U},Nb=(r,i,v,u)=>{let n=v,t=r._zod.def;n.type="object";let o=t.keyType,b=o._zod.bag?.patterns;if(t.mode==="loose"&&b&&b.size>0){let c=H(t.valueType,i,{...u,path:[...u.path,"patternProperties","*"]});n.patternProperties={};for(let U of b)n.patternProperties[U.source]=c}else{if(i.target==="draft-07"||i.target==="draft-2020-12")n.propertyNames=H(t.keyType,i,{...u,path:[...u.path,"propertyNames"]});n.additionalProperties=H(t.valueType,i,{...u,path:[...u.path,"additionalProperties"]})}let g=o._zod.values;if(g){let c=[...g].filter((U)=>typeof U==="string"||typeof U==="number");if(c.length>0)n.required=c}},mb=(r,i,v,u)=>{let n=r._zod.def,t=H(n.innerType,i,u),o=i.seen.get(r);if(i.target==="openapi-3.0")o.ref=n.innerType,v.nullable=!0;else v.anyOf=[t,{type:"null"}]},zb=(r,i,v,u)=>{let n=r._zod.def;H(n.innerType,i,u);let t=i.seen.get(r);t.ref=n.innerType},Ob=(r,i,v,u)=>{let n=r._zod.def;H(n.innerType,i,u);let t=i.seen.get(r);t.ref=n.innerType,v.default=JSON.parse(JSON.stringify(n.defaultValue))},Sb=(r,i,v,u)=>{let n=r._zod.def;H(n.innerType,i,u);let t=i.seen.get(r);if(t.ref=n.innerType,i.io==="input")v._prefault=JSON.parse(JSON.stringify(n.defaultValue))},Pb=(r,i,v,u)=>{let n=r._zod.def;H(n.innerType,i,u);let t=i.seen.get(r);t.ref=n.innerType;let o;try{o=n.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}v.default=o},jb=(r,i,v,u)=>{let n=r._zod.def,t=n.in._zod.traits.has("$ZodTransform"),o=i.io==="input"?t?n.out:n.in:n.out;H(o,i,u);let $=i.seen.get(r);$.ref=o},Lb=(r,i,v,u)=>{let n=r._zod.def;H(n.innerType,i,u);let t=i.seen.get(r);t.ref=n.innerType,v.readOnly=!0},Ab=(r,i,v,u)=>{let n=r._zod.def;H(n.innerType,i,u);let t=i.seen.get(r);t.ref=n.innerType},Ov=(r,i,v,u)=>{let n=r._zod.def;H(n.innerType,i,u);let t=i.seen.get(r);t.ref=n.innerType},Jb=(r,i,v,u)=>{let n=r._zod.innerType;H(n,i,u);let t=i.seen.get(r);t.ref=n},mv;var Vi=O(()=>{Ji();j();wU={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},mv={string:Cl,number:fl,boolean:dl,bigint:yl,symbol:hl,null:pl,undefined:al,void:sl,never:rb,any:nb,unknown:ib,date:tb,enum:vb,literal:ub,nan:ob,template_literal:$b,file:gb,success:lb,custom:bb,function:cb,transform:eb,map:_b,set:Ib,array:Ub,object:Db,union:zv,intersection:wb,tuple:kb,record:Nb,nullable:mb,nonoptional:zb,default:Ob,prefault:Sb,catch:Pb,pipe:jb,readonly:Lb,promise:Ab,optional:Ov,lazy:Jb}});class Wb{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(r){this.ctx.counter=r}get seen(){return this.ctx.seen}constructor(r){let i=r?.target??"draft-2020-12";if(i==="draft-4")i="draft-04";if(i==="draft-7")i="draft-07";this.ctx=qr({processors:mv,target:i,...r?.metadata&&{metadata:r.metadata},...r?.unrepresentable&&{unrepresentable:r.unrepresentable},...r?.override&&{override:r.override},...r?.io&&{io:r.io}})}process(r,i={path:[],schemaPath:[]}){return H(r,this.ctx,i)}emit(r,i){if(i){if(i.cycles)this.ctx.cycles=i.cycles;if(i.reused)this.ctx.reused=i.reused;if(i.external)this.ctx.external=i.external}Xr(this.ctx,r);let v=Rr(this.ctx,r),{"~standard":u,...n}=v;return n}}var $e=O(()=>{Vi();Ji()});var ge={};var le=()=>{};var Jr={};jr(Jr,{version:()=>fo,util:()=>N,treeifyError:()=>Lt,toJSONSchema:()=>Wi,toDotPath:()=>j6,safeParseAsync:()=>gi,safeParse:()=>Jn,safeEncodeAsync:()=>K6,safeEncode:()=>V6,safeDecodeAsync:()=>B6,safeDecode:()=>G6,registry:()=>Ni,regexes:()=>er,process:()=>H,prettifyError:()=>At,parseAsync:()=>$i,parse:()=>oi,meta:()=>Rl,locales:()=>Kn,isValidJWT:()=>nc,isValidBase64URL:()=>rc,isValidBase64:()=>w$,initializeContext:()=>qr,globalRegistry:()=>y,globalConfig:()=>fr,formatError:()=>Pn,flattenError:()=>Sn,finalize:()=>Rr,extractDefs:()=>Xr,encodeAsync:()=>J6,encode:()=>L6,describe:()=>Xl,decodeAsync:()=>W6,decode:()=>A6,createToJSONSchemaMethod:()=>Ql,createStandardJSONSchemaMethod:()=>Hn,config:()=>Z,clone:()=>tr,_xor:()=>yI,_xid:()=>lv,_void:()=>Bl,_uuidv7:()=>tv,_uuidv6:()=>iv,_uuidv4:()=>nv,_uuid:()=>rv,_url:()=>Oi,_uppercase:()=>nn,_unknown:()=>Gl,_union:()=>dI,_undefined:()=>Jl,_ulid:()=>gv,_uint64:()=>Ll,_uint32:()=>ml,_tuple:()=>aI,_trim:()=>gn,_transform:()=>uU,_toUpperCase:()=>bn,_toLowerCase:()=>ln,_templateLiteral:()=>IU,_symbol:()=>Al,_superRefine:()=>ql,_success:()=>bU,_stringbool:()=>Zl,_stringFormat:()=>Bn,_string:()=>$l,_startsWith:()=>vn,_slugify:()=>cn,_size:()=>xr,_set:()=>nU,_safeParseAsync:()=>Wn,_safeParse:()=>An,_safeEncodeAsync:()=>Ht,_safeEncode:()=>Kt,_safeDecodeAsync:()=>Ft,_safeDecode:()=>Bt,_regex:()=>sr,_refine:()=>Yl,_record:()=>sI,_readonly:()=>_U,_property:()=>Ai,_promise:()=>DU,_positive:()=>Si,_pipe:()=>eU,_parseAsync:()=>Ln,_parse:()=>jn,_overwrite:()=>kr,_optional:()=>oU,_number:()=>Il,_nullable:()=>$U,_null:()=>Wl,_normalize:()=>$n,_nonpositive:()=>ji,_nonoptional:()=>lU,_nonnegative:()=>Li,_never:()=>Kl,_negative:()=>Pi,_nativeEnum:()=>tU,_nanoid:()=>uv,_nan:()=>El,_multipleOf:()=>Vr,_minSize:()=>Sr,_minLength:()=>Ar,_min:()=>vr,_mime:()=>on,_maxSize:()=>Gr,_maxLength:()=>Mr,_max:()=>_r,_map:()=>rU,_mac:()=>ll,_lte:()=>_r,_lt:()=>zr,_lowercase:()=>rn,_literal:()=>vU,_length:()=>Yr,_lazy:()=>UU,_ksuid:()=>bv,_jwt:()=>kv,_isoTime:()=>el,_isoDuration:()=>_l,_isoDateTime:()=>bl,_isoDate:()=>cl,_ipv6:()=>ev,_ipv4:()=>cv,_intersection:()=>pI,_int64:()=>jl,_int32:()=>Nl,_int:()=>Dl,_includes:()=>tn,_guid:()=>zi,_gte:()=>vr,_gt:()=>Or,_float64:()=>kl,_float32:()=>wl,_file:()=>xl,_enum:()=>iU,_endsWith:()=>un,_encodeAsync:()=>Vt,_encode:()=>Jt,_emoji:()=>vv,_email:()=>st,_e164:()=>wv,_discriminatedUnion:()=>hI,_default:()=>gU,_decodeAsync:()=>Gt,_decode:()=>Wt,_date:()=>Hl,_custom:()=>Ml,_cuid2:()=>$v,_cuid:()=>ov,_coercedString:()=>gl,_coercedNumber:()=>Ul,_coercedDate:()=>Fl,_coercedBoolean:()=>Ol,_coercedBigint:()=>Pl,_cidrv6:()=>Iv,_cidrv4:()=>_v,_check:()=>ue,_catch:()=>cU,_boolean:()=>zl,_bigint:()=>Sl,_base64url:()=>Dv,_base64:()=>Uv,_array:()=>Tl,_any:()=>Vl,TimePrecision:()=>Nv,NEVER:()=>Ot,JSONSchemaGenerator:()=>Wb,JSONSchema:()=>ge,Doc:()=>qt,$output:()=>pt,$input:()=>at,$constructor:()=>e,$brand:()=>St,$ZodXor:()=>F$,$ZodXID:()=>o$,$ZodVoid:()=>G$,$ZodUnknown:()=>W$,$ZodUnion:()=>_i,$ZodUndefined:()=>L$,$ZodUUID:()=>ao,$ZodURL:()=>r$,$ZodULID:()=>u$,$ZodType:()=>J,$ZodTuple:()=>dt,$ZodTransform:()=>Z$,$ZodTemplateLiteral:()=>ng,$ZodSymbol:()=>j$,$ZodSuccess:()=>h$,$ZodStringFormat:()=>Y,$ZodString:()=>ar,$ZodSet:()=>Y$,$ZodRegistry:()=>ol,$ZodRecord:()=>x$,$ZodRealError:()=>cr,$ZodReadonly:()=>rg,$ZodPromise:()=>tg,$ZodPreprocess:()=>s$,$ZodPrefault:()=>d$,$ZodPipe:()=>ht,$ZodOptional:()=>yt,$ZodObjectJIT:()=>H$,$ZodObject:()=>vc,$ZodNumberFormat:()=>S$,$ZodNumber:()=>Ct,$ZodNullable:()=>C$,$ZodNull:()=>A$,$ZodNonOptional:()=>y$,$ZodNever:()=>V$,$ZodNanoID:()=>i$,$ZodNaN:()=>a$,$ZodMap:()=>M$,$ZodMAC:()=>I$,$ZodLiteral:()=>X$,$ZodLazy:()=>vg,$ZodKSUID:()=>$$,$ZodJWT:()=>z$,$ZodIntersection:()=>T$,$ZodISOTime:()=>b$,$ZodISODuration:()=>c$,$ZodISODateTime:()=>g$,$ZodISODate:()=>l$,$ZodIPv6:()=>_$,$ZodIPv4:()=>e$,$ZodGUID:()=>po,$ZodFunction:()=>ig,$ZodFile:()=>R$,$ZodExactOptional:()=>Q$,$ZodError:()=>ui,$ZodEnum:()=>q$,$ZodEncodeError:()=>dr,$ZodEmoji:()=>n$,$ZodEmail:()=>so,$ZodE164:()=>m$,$ZodDiscriminatedUnion:()=>E$,$ZodDefault:()=>f$,$ZodDate:()=>K$,$ZodCustomStringFormat:()=>O$,$ZodCustom:()=>ug,$ZodCodec:()=>Ii,$ZodCheckUpperCase:()=>Yo,$ZodCheckStringFormat:()=>Vn,$ZodCheckStartsWith:()=>Xo,$ZodCheckSizeEquals:()=>Ho,$ZodCheckRegex:()=>xo,$ZodCheckProperty:()=>Zo,$ZodCheckOverwrite:()=>Co,$ZodCheckNumberFormat:()=>Vo,$ZodCheckMultipleOf:()=>Wo,$ZodCheckMinSize:()=>Bo,$ZodCheckMinLength:()=>Eo,$ZodCheckMimeType:()=>Qo,$ZodCheckMaxSize:()=>Ko,$ZodCheckMaxLength:()=>Fo,$ZodCheckLowerCase:()=>Mo,$ZodCheckLessThan:()=>xt,$ZodCheckLengthEquals:()=>To,$ZodCheckIncludes:()=>qo,$ZodCheckGreaterThan:()=>Mt,$ZodCheckEndsWith:()=>Ro,$ZodCheckBigIntFormat:()=>Go,$ZodCheck:()=>X,$ZodCatch:()=>p$,$ZodCUID2:()=>v$,$ZodCUID:()=>t$,$ZodCIDRv6:()=>D$,$ZodCIDRv4:()=>U$,$ZodBoolean:()=>ei,$ZodBigIntFormat:()=>P$,$ZodBigInt:()=>ft,$ZodBase64URL:()=>N$,$ZodBase64:()=>k$,$ZodAsyncError:()=>Lr,$ZodArray:()=>B$,$ZodAny:()=>J$});var Ir=O(()=>{j();Tt();ul();Vi();$e();le();yr();su();au();og();Yt();yo();mi();oe();Ji()});var jv={};jr(jv,{uppercase:()=>nn,trim:()=>gn,toUpperCase:()=>bn,toLowerCase:()=>ln,startsWith:()=>vn,slugify:()=>cn,size:()=>xr,regex:()=>sr,property:()=>Ai,positive:()=>Si,overwrite:()=>kr,normalize:()=>$n,nonpositive:()=>ji,nonnegative:()=>Li,negative:()=>Pi,multipleOf:()=>Vr,minSize:()=>Sr,minLength:()=>Ar,mime:()=>on,maxSize:()=>Gr,maxLength:()=>Mr,lte:()=>_r,lt:()=>zr,lowercase:()=>rn,length:()=>Yr,includes:()=>tn,gte:()=>vr,gt:()=>Or,endsWith:()=>un});var Lv=O(()=>{Ir()});var Kr={};jr(Kr,{time:()=>Kb,duration:()=>Bb,datetime:()=>Vb,date:()=>Gb,ZodISOTime:()=>Bi,ZodISODuration:()=>Hi,ZodISODateTime:()=>Gi,ZodISODate:()=>Ki});function Vb(r){return bl(Gi,r)}function Gb(r){return cl(Ki,r)}function Kb(r){return el(Bi,r)}function Bb(r){return _l(Hi,r)}var Gi,Ki,Bi,Hi;var Fi=O(()=>{Ir();Ti();Gi=e("ZodISODateTime",(r,i)=>{g$.init(r,i),T.init(r,i)});Ki=e("ZodISODate",(r,i)=>{l$.init(r,i),T.init(r,i)});Bi=e("ZodISOTime",(r,i)=>{b$.init(r,i),T.init(r,i)});Hi=e("ZodISODuration",(r,i)=>{c$.init(r,i),T.init(r,i)})});var ee=(r,i)=>{ui.init(r,i),r.name="ZodError",Object.defineProperties(r,{format:{value:(v)=>Pn(r,v)},flatten:{value:(v)=>Sn(r,v)},addIssue:{value:(v)=>{r.issues.push(v),r.message=JSON.stringify(r.issues,mn,2)}},addIssues:{value:(v)=>{r.issues.push(...v),r.message=JSON.stringify(r.issues,mn,2)}},isEmpty:{get(){return r.issues.length===0}}})},_e,lr;var Hb=O(()=>{Ir();Ir();j();_e=e("ZodError",ee),lr=e("ZodError",ee,{Parent:Error})});var Av,Jv,Wv,Vv,Gv,Kv,Bv,Hv,Fv,Ev,Tv,xv;var Fb=O(()=>{Ir();Hb();Av=jn(lr),Jv=Ln(lr),Wv=An(lr),Vv=Wn(lr),Gv=Jt(lr),Kv=Wt(lr),Bv=Vt(lr),Hv=Gt(lr),Fv=Kt(lr),Ev=Bt(lr),Tv=Ht(lr),xv=Ft(lr)});var Ei={};jr(Ei,{xor:()=>P4,xid:()=>yb,void:()=>m4,uuidv7:()=>qb,uuidv6:()=>Yb,uuidv4:()=>Mb,uuid:()=>xb,url:()=>Xb,unknown:()=>x,union:()=>M,undefined:()=>k4,ulid:()=>db,uint64:()=>D4,uint32:()=>_4,tuple:()=>av,transform:()=>ot,templateLiteral:()=>E4,symbol:()=>w4,superRefine:()=>ju,success:()=>K4,stringbool:()=>R4,stringFormat:()=>o4,string:()=>I,strictObject:()=>S4,set:()=>J4,refine:()=>Pu,record:()=>F,readonly:()=>ku,promise:()=>T4,preprocess:()=>Cn,prefault:()=>bu,pipe:()=>Mi,partialRecord:()=>j4,optional:()=>q,object:()=>P,number:()=>K,nullish:()=>G4,nullable:()=>En,null:()=>xn,nonoptional:()=>cu,never:()=>ut,nativeEnum:()=>W4,nanoid:()=>Qb,nan:()=>B4,meta:()=>q4,map:()=>A4,mac:()=>ab,looseRecord:()=>L4,looseObject:()=>h,literal:()=>L,lazy:()=>zu,ksuid:()=>hb,keyof:()=>O4,jwt:()=>u4,json:()=>Z4,ipv6:()=>sb,ipv4:()=>pb,invertCodec:()=>F4,intersection:()=>Nn,int64:()=>U4,int32:()=>e4,int:()=>xi,instanceof:()=>X4,httpUrl:()=>Rb,hostname:()=>$4,hex:()=>g4,hash:()=>l4,guid:()=>Tb,function:()=>x4,float64:()=>c4,float32:()=>b4,file:()=>V4,exactOptional:()=>uu,enum:()=>p,emoji:()=>Zb,email:()=>Eb,e164:()=>v4,discriminatedUnion:()=>Xn,describe:()=>Y4,date:()=>z4,custom:()=>lt,cuid2:()=>fb,cuid:()=>Cb,codec:()=>H4,cidrv6:()=>n4,cidrv4:()=>r4,check:()=>M4,catch:()=>Iu,boolean:()=>C,bigint:()=>I4,base64url:()=>t4,base64:()=>i4,array:()=>V,any:()=>N4,_function:()=>x4,_default:()=>gu,_ZodString:()=>qi,ZodXor:()=>dv,ZodXID:()=>di,ZodVoid:()=>Cv,ZodUnknown:()=>Zv,ZodUnion:()=>qn,ZodUndefined:()=>qv,ZodUUID:()=>Pr,ZodURL:()=>Tn,ZodULID:()=>fi,ZodType:()=>W,ZodTuple:()=>pv,ZodTransform:()=>tu,ZodTemplateLiteral:()=>Nu,ZodSymbol:()=>Yv,ZodSuccess:()=>eu,ZodStringFormat:()=>T,ZodString:()=>In,ZodSet:()=>ru,ZodRecord:()=>en,ZodReadonly:()=>wu,ZodPromise:()=>Ou,ZodPreprocess:()=>Du,ZodPrefault:()=>lu,ZodPipe:()=>Rn,ZodOptional:()=>$t,ZodObject:()=>Yn,ZodNumberFormat:()=>Zr,ZodNumber:()=>Dn,ZodNullable:()=>ou,ZodNull:()=>Xv,ZodNonOptional:()=>gt,ZodNever:()=>Qv,ZodNanoID:()=>Zi,ZodNaN:()=>Uu,ZodMap:()=>sv,ZodMAC:()=>Mv,ZodLiteral:()=>nu,ZodLazy:()=>mu,ZodKSUID:()=>yi,ZodJWT:()=>tt,ZodIntersection:()=>hv,ZodIPv6:()=>pi,ZodIPv4:()=>hi,ZodGUID:()=>Fn,ZodFunction:()=>Su,ZodFile:()=>iu,ZodExactOptional:()=>vu,ZodEnum:()=>_n,ZodEmoji:()=>Ri,ZodEmail:()=>Xi,ZodE164:()=>it,ZodDiscriminatedUnion:()=>yv,ZodDefault:()=>$u,ZodDate:()=>Mn,ZodCustomStringFormat:()=>Un,ZodCustom:()=>Qn,ZodCodec:()=>Zn,ZodCatch:()=>_u,ZodCUID2:()=>Ci,ZodCUID:()=>Qi,ZodCIDRv6:()=>si,ZodCIDRv4:()=>ai,ZodBoolean:()=>wn,ZodBigIntFormat:()=>vt,ZodBigInt:()=>kn,ZodBase64URL:()=>nt,ZodBase64:()=>rt,ZodArray:()=>fv,ZodAny:()=>Rv});function Yi(r,i,v){let u=Object.getPrototypeOf(r),n=Ie.get(u);if(!n)n=new Set,Ie.set(u,n);if(n.has(i))return;n.add(i);for(let t in v){let o=v[t];Object.defineProperty(u,t,{configurable:!0,enumerable:!1,get(){let $=o.bind(this);return Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:!0,value:$}),$},set($){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:!0,value:$})}})}}function I(r){return $l(In,r)}function Eb(r){return st(Xi,r)}function Tb(r){return zi(Fn,r)}function xb(r){return rv(Pr,r)}function Mb(r){return nv(Pr,r)}function Yb(r){return iv(Pr,r)}function qb(r){return tv(Pr,r)}function Xb(r){return Oi(Tn,r)}function Rb(r){return Oi(Tn,{protocol:er.httpProtocol,hostname:er.domain,...N.normalizeParams(r)})}function Zb(r){return vv(Ri,r)}function Qb(r){return uv(Zi,r)}function Cb(r){return ov(Qi,r)}function fb(r){return $v(Ci,r)}function db(r){return gv(fi,r)}function yb(r){return lv(di,r)}function hb(r){return bv(yi,r)}function pb(r){return cv(hi,r)}function ab(r){return ll(Mv,r)}function sb(r){return ev(pi,r)}function r4(r){return _v(ai,r)}function n4(r){return Iv(si,r)}function i4(r){return Uv(rt,r)}function t4(r){return Dv(nt,r)}function v4(r){return wv(it,r)}function u4(r){return kv(tt,r)}function o4(r,i,v={}){return Bn(Un,r,i,v)}function $4(r){return Bn(Un,"hostname",er.hostname,r)}function g4(r){return Bn(Un,"hex",er.hex,r)}function l4(r,i){let v=i?.enc??"hex",u=`${r}_${v}`,n=er[u];if(!n)throw Error(`Unrecognized hash format: ${u}`);return Bn(Un,u,n,i)}function K(r){return Il(Dn,r)}function xi(r){return Dl(Zr,r)}function b4(r){return wl(Zr,r)}function c4(r){return kl(Zr,r)}function e4(r){return Nl(Zr,r)}function _4(r){return ml(Zr,r)}function C(r){return zl(wn,r)}function I4(r){return Sl(kn,r)}function U4(r){return jl(vt,r)}function D4(r){return Ll(vt,r)}function w4(r){return Al(Yv,r)}function k4(r){return Jl(qv,r)}function xn(r){return Wl(Xv,r)}function N4(){return Vl(Rv)}function x(){return Gl(Zv)}function ut(r){return Kl(Qv,r)}function m4(r){return Bl(Cv,r)}function z4(r){return Hl(Mn,r)}function V(r,i){return Tl(fv,r,i)}function O4(r){let i=r._zod.def.shape;return p(Object.keys(i))}function P(r,i){let v={type:"object",shape:r??{},...N.normalizeParams(i)};return new Yn(v)}function S4(r,i){return new Yn({type:"object",shape:r,catchall:ut(),...N.normalizeParams(i)})}function h(r,i){return new Yn({type:"object",shape:r,catchall:x(),...N.normalizeParams(i)})}function M(r,i){return new qn({type:"union",options:r,...N.normalizeParams(i)})}function P4(r,i){return new dv({type:"union",options:r,inclusive:!1,...N.normalizeParams(i)})}function Xn(r,i,v){return new yv({type:"union",options:i,discriminator:r,...N.normalizeParams(v)})}function Nn(r,i){return new hv({type:"intersection",left:r,right:i})}function av(r,i,v){let u=i instanceof J,n=u?v:i;return new pv({type:"tuple",items:r,rest:u?i:null,...N.normalizeParams(n)})}function F(r,i,v){if(!i||!i._zod)return new en({type:"record",keyType:I(),valueType:r,...N.normalizeParams(i)});return new en({type:"record",keyType:r,valueType:i,...N.normalizeParams(v)})}function j4(r,i,v){let u=tr(r);return u._zod.values=void 0,new en({type:"record",keyType:u,valueType:i,...N.normalizeParams(v)})}function L4(r,i,v){return new en({type:"record",keyType:r,valueType:i,mode:"loose",...N.normalizeParams(v)})}function A4(r,i,v){return new sv({type:"map",keyType:r,valueType:i,...N.normalizeParams(v)})}function J4(r,i){return new ru({type:"set",valueType:r,...N.normalizeParams(i)})}function p(r,i){let v=Array.isArray(r)?Object.fromEntries(r.map((u)=>[u,u])):r;return new _n({type:"enum",entries:v,...N.normalizeParams(i)})}function W4(r,i){return new _n({type:"enum",entries:r,...N.normalizeParams(i)})}function L(r,i){return new nu({type:"literal",values:Array.isArray(r)?r:[r],...N.normalizeParams(i)})}function V4(r){return xl(iu,r)}function ot(r){return new tu({type:"transform",transform:r})}function q(r){return new $t({type:"optional",innerType:r})}function uu(r){return new vu({type:"optional",innerType:r})}function En(r){return new ou({type:"nullable",innerType:r})}function G4(r){return q(En(r))}function gu(r,i){return new $u({type:"default",innerType:r,get defaultValue(){return typeof i==="function"?i():N.shallowClone(i)}})}function bu(r,i){return new lu({type:"prefault",innerType:r,get defaultValue(){return typeof i==="function"?i():N.shallowClone(i)}})}function cu(r,i){return new gt({type:"nonoptional",innerType:r,...N.normalizeParams(i)})}function K4(r){return new eu({type:"success",innerType:r})}function Iu(r,i){return new _u({type:"catch",innerType:r,catchValue:typeof i==="function"?i:()=>i})}function B4(r){return El(Uu,r)}function Mi(r,i){return new Rn({type:"pipe",in:r,out:i})}function H4(r,i,v){return new Zn({type:"pipe",in:r,out:i,transform:v.decode,reverseTransform:v.encode})}function F4(r){let i=r._zod.def;return new Zn({type:"pipe",in:i.out,out:i.in,transform:i.reverseTransform,reverseTransform:i.transform})}function ku(r){return new wu({type:"readonly",innerType:r})}function E4(r,i){return new Nu({type:"template_literal",parts:r,...N.normalizeParams(i)})}function zu(r){return new mu({type:"lazy",getter:r})}function T4(r){return new Ou({type:"promise",innerType:r})}function x4(r){return new Su({type:"function",input:Array.isArray(r?.input)?av(r?.input):r?.input??V(x()),output:r?.output??x()})}function M4(r){let i=new X({check:"custom"});return i._zod.check=r,i}function lt(r,i){return Ml(Qn,r??(()=>!0),i)}function Pu(r,i={}){return Yl(Qn,r,i)}function ju(r,i){return ql(r,i)}function X4(r,i={}){let v=new Qn({type:"custom",check:"custom",fn:(u)=>u instanceof r,abort:!0,...N.normalizeParams(i)});return v._zod.bag.Class=r,v._zod.check=(u)=>{if(!(u.value instanceof r))u.issues.push({code:"invalid_type",expected:r.name,input:u.value,inst:v,path:[...v._zod.def.path??[]]})},v}function Z4(r){let i=zu(()=>{return M([I(r),K(),C(),xn(),V(i),F(I(),i)])});return i}function Cn(r,i){return new Du({type:"pipe",in:ot(r),out:i})}var Ie,W,qi,In,T,Xi,Fn,Pr,Tn,Ri,Zi,Qi,Ci,fi,di,yi,hi,Mv,pi,ai,si,rt,nt,it,tt,Un,Dn,Zr,wn,kn,vt,Yv,qv,Xv,Rv,Zv,Qv,Cv,Mn,fv,Yn,qn,dv,yv,hv,pv,en,sv,ru,_n,nu,iu,tu,$t,vu,ou,$u,lu,gt,eu,_u,Uu,Rn,Zn,Du,wu,Nu,mu,Ou,Su,Qn,Y4,q4,R4=(...r)=>Zl({Codec:Zn,Boolean:wn,String:In},...r);var Ti=O(()=>{Ir();Ir();Vi();Ji();Lv();Fi();Fb();Ie=new WeakMap;W=e("ZodType",(r,i)=>{return J.init(r,i),Object.assign(r["~standard"],{jsonSchema:{input:Hn(r,"input"),output:Hn(r,"output")}}),r.toJSONSchema=Ql(r,{}),r.def=i,r.type=i.type,Object.defineProperty(r,"_def",{value:i}),r.parse=(v,u)=>Av(r,v,u,{callee:r.parse}),r.safeParse=(v,u)=>Wv(r,v,u),r.parseAsync=async(v,u)=>Jv(r,v,u,{callee:r.parseAsync}),r.safeParseAsync=async(v,u)=>Vv(r,v,u),r.spa=r.safeParseAsync,r.encode=(v,u)=>Gv(r,v,u),r.decode=(v,u)=>Kv(r,v,u),r.encodeAsync=async(v,u)=>Bv(r,v,u),r.decodeAsync=async(v,u)=>Hv(r,v,u),r.safeEncode=(v,u)=>Fv(r,v,u),r.safeDecode=(v,u)=>Ev(r,v,u),r.safeEncodeAsync=async(v,u)=>Tv(r,v,u),r.safeDecodeAsync=async(v,u)=>xv(r,v,u),Yi(r,"ZodType",{check(...v){let u=this.def;return this.clone(N.mergeDefs(u,{checks:[...u.checks??[],...v.map((n)=>typeof n==="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...v){return this.check(...v)},clone(v,u){return tr(this,v,u)},brand(){return this},register(v,u){return v.add(this,u),this},refine(v,u){return this.check(Pu(v,u))},superRefine(v,u){return this.check(ju(v,u))},overwrite(v){return this.check(kr(v))},optional(){return q(this)},exactOptional(){return uu(this)},nullable(){return En(this)},nullish(){return q(En(this))},nonoptional(v){return cu(this,v)},array(){return V(this)},or(v){return M([this,v])},and(v){return Nn(this,v)},transform(v){return Mi(this,ot(v))},default(v){return gu(this,v)},prefault(v){return bu(this,v)},catch(v){return Iu(this,v)},pipe(v){return Mi(this,v)},readonly(){return ku(this)},describe(v){let u=this.clone();return y.add(u,{description:v}),u},meta(...v){if(v.length===0)return y.get(this);let u=this.clone();return y.add(u,v[0]),u},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(v){return v(this)}}),Object.defineProperty(r,"description",{get(){return y.get(r)?.description},configurable:!0}),r}),qi=e("_ZodString",(r,i)=>{ar.init(r,i),W.init(r,i),r._zod.processJSONSchema=(u,n,t)=>Cl(r,u,n,t);let v=r._zod.bag;r.format=v.format??null,r.minLength=v.minimum??null,r.maxLength=v.maximum??null,Yi(r,"_ZodString",{regex(...u){return this.check(sr(...u))},includes(...u){return this.check(tn(...u))},startsWith(...u){return this.check(vn(...u))},endsWith(...u){return this.check(un(...u))},min(...u){return this.check(Ar(...u))},max(...u){return this.check(Mr(...u))},length(...u){return this.check(Yr(...u))},nonempty(...u){return this.check(Ar(1,...u))},lowercase(u){return this.check(rn(u))},uppercase(u){return this.check(nn(u))},trim(){return this.check(gn())},normalize(...u){return this.check($n(...u))},toLowerCase(){return this.check(ln())},toUpperCase(){return this.check(bn())},slugify(){return this.check(cn())}})}),In=e("ZodString",(r,i)=>{ar.init(r,i),qi.init(r,i),r.email=(v)=>r.check(st(Xi,v)),r.url=(v)=>r.check(Oi(Tn,v)),r.jwt=(v)=>r.check(kv(tt,v)),r.emoji=(v)=>r.check(vv(Ri,v)),r.guid=(v)=>r.check(zi(Fn,v)),r.uuid=(v)=>r.check(rv(Pr,v)),r.uuidv4=(v)=>r.check(nv(Pr,v)),r.uuidv6=(v)=>r.check(iv(Pr,v)),r.uuidv7=(v)=>r.check(tv(Pr,v)),r.nanoid=(v)=>r.check(uv(Zi,v)),r.guid=(v)=>r.check(zi(Fn,v)),r.cuid=(v)=>r.check(ov(Qi,v)),r.cuid2=(v)=>r.check($v(Ci,v)),r.ulid=(v)=>r.check(gv(fi,v)),r.base64=(v)=>r.check(Uv(rt,v)),r.base64url=(v)=>r.check(Dv(nt,v)),r.xid=(v)=>r.check(lv(di,v)),r.ksuid=(v)=>r.check(bv(yi,v)),r.ipv4=(v)=>r.check(cv(hi,v)),r.ipv6=(v)=>r.check(ev(pi,v)),r.cidrv4=(v)=>r.check(_v(ai,v)),r.cidrv6=(v)=>r.check(Iv(si,v)),r.e164=(v)=>r.check(wv(it,v)),r.datetime=(v)=>r.check(Vb(v)),r.date=(v)=>r.check(Gb(v)),r.time=(v)=>r.check(Kb(v)),r.duration=(v)=>r.check(Bb(v))});T=e("ZodStringFormat",(r,i)=>{Y.init(r,i),qi.init(r,i)}),Xi=e("ZodEmail",(r,i)=>{so.init(r,i),T.init(r,i)});Fn=e("ZodGUID",(r,i)=>{po.init(r,i),T.init(r,i)});Pr=e("ZodUUID",(r,i)=>{ao.init(r,i),T.init(r,i)});Tn=e("ZodURL",(r,i)=>{r$.init(r,i),T.init(r,i)});Ri=e("ZodEmoji",(r,i)=>{n$.init(r,i),T.init(r,i)});Zi=e("ZodNanoID",(r,i)=>{i$.init(r,i),T.init(r,i)});Qi=e("ZodCUID",(r,i)=>{t$.init(r,i),T.init(r,i)});Ci=e("ZodCUID2",(r,i)=>{v$.init(r,i),T.init(r,i)});fi=e("ZodULID",(r,i)=>{u$.init(r,i),T.init(r,i)});di=e("ZodXID",(r,i)=>{o$.init(r,i),T.init(r,i)});yi=e("ZodKSUID",(r,i)=>{$$.init(r,i),T.init(r,i)});hi=e("ZodIPv4",(r,i)=>{e$.init(r,i),T.init(r,i)});Mv=e("ZodMAC",(r,i)=>{I$.init(r,i),T.init(r,i)});pi=e("ZodIPv6",(r,i)=>{_$.init(r,i),T.init(r,i)});ai=e("ZodCIDRv4",(r,i)=>{U$.init(r,i),T.init(r,i)});si=e("ZodCIDRv6",(r,i)=>{D$.init(r,i),T.init(r,i)});rt=e("ZodBase64",(r,i)=>{k$.init(r,i),T.init(r,i)});nt=e("ZodBase64URL",(r,i)=>{N$.init(r,i),T.init(r,i)});it=e("ZodE164",(r,i)=>{m$.init(r,i),T.init(r,i)});tt=e("ZodJWT",(r,i)=>{z$.init(r,i),T.init(r,i)});Un=e("ZodCustomStringFormat",(r,i)=>{O$.init(r,i),T.init(r,i)});Dn=e("ZodNumber",(r,i)=>{Ct.init(r,i),W.init(r,i),r._zod.processJSONSchema=(u,n,t)=>fl(r,u,n,t),Yi(r,"ZodNumber",{gt(u,n){return this.check(Or(u,n))},gte(u,n){return this.check(vr(u,n))},min(u,n){return this.check(vr(u,n))},lt(u,n){return this.check(zr(u,n))},lte(u,n){return this.check(_r(u,n))},max(u,n){return this.check(_r(u,n))},int(u){return this.check(xi(u))},safe(u){return this.check(xi(u))},positive(u){return this.check(Or(0,u))},nonnegative(u){return this.check(vr(0,u))},negative(u){return this.check(zr(0,u))},nonpositive(u){return this.check(_r(0,u))},multipleOf(u,n){return this.check(Vr(u,n))},step(u,n){return this.check(Vr(u,n))},finite(){return this}});let v=r._zod.bag;r.minValue=Math.max(v.minimum??Number.NEGATIVE_INFINITY,v.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,r.maxValue=Math.min(v.maximum??Number.POSITIVE_INFINITY,v.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,r.isInt=(v.format??"").includes("int")||Number.isSafeInteger(v.multipleOf??0.5),r.isFinite=!0,r.format=v.format??null});Zr=e("ZodNumberFormat",(r,i)=>{S$.init(r,i),Dn.init(r,i)});wn=e("ZodBoolean",(r,i)=>{ei.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>dl(r,v,u,n)});kn=e("ZodBigInt",(r,i)=>{ft.init(r,i),W.init(r,i),r._zod.processJSONSchema=(u,n,t)=>yl(r,u,n,t),r.gte=(u,n)=>r.check(vr(u,n)),r.min=(u,n)=>r.check(vr(u,n)),r.gt=(u,n)=>r.check(Or(u,n)),r.gte=(u,n)=>r.check(vr(u,n)),r.min=(u,n)=>r.check(vr(u,n)),r.lt=(u,n)=>r.check(zr(u,n)),r.lte=(u,n)=>r.check(_r(u,n)),r.max=(u,n)=>r.check(_r(u,n)),r.positive=(u)=>r.check(Or(BigInt(0),u)),r.negative=(u)=>r.check(zr(BigInt(0),u)),r.nonpositive=(u)=>r.check(_r(BigInt(0),u)),r.nonnegative=(u)=>r.check(vr(BigInt(0),u)),r.multipleOf=(u,n)=>r.check(Vr(u,n));let v=r._zod.bag;r.minValue=v.minimum??null,r.maxValue=v.maximum??null,r.format=v.format??null});vt=e("ZodBigIntFormat",(r,i)=>{P$.init(r,i),kn.init(r,i)});Yv=e("ZodSymbol",(r,i)=>{j$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>hl(r,v,u,n)});qv=e("ZodUndefined",(r,i)=>{L$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>al(r,v,u,n)});Xv=e("ZodNull",(r,i)=>{A$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>pl(r,v,u,n)});Rv=e("ZodAny",(r,i)=>{J$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>nb(r,v,u,n)});Zv=e("ZodUnknown",(r,i)=>{W$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>ib(r,v,u,n)});Qv=e("ZodNever",(r,i)=>{V$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>rb(r,v,u,n)});Cv=e("ZodVoid",(r,i)=>{G$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>sl(r,v,u,n)});Mn=e("ZodDate",(r,i)=>{K$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(u,n,t)=>tb(r,u,n,t),r.min=(u,n)=>r.check(vr(u,n)),r.max=(u,n)=>r.check(_r(u,n));let v=r._zod.bag;r.minDate=v.minimum?new Date(v.minimum):null,r.maxDate=v.maximum?new Date(v.maximum):null});fv=e("ZodArray",(r,i)=>{B$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>Ub(r,v,u,n),r.element=i.element,Yi(r,"ZodArray",{min(v,u){return this.check(Ar(v,u))},nonempty(v){return this.check(Ar(1,v))},max(v,u){return this.check(Mr(v,u))},length(v,u){return this.check(Yr(v,u))},unwrap(){return this.element}})});Yn=e("ZodObject",(r,i)=>{H$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>Db(r,v,u,n),N.defineLazy(r,"shape",()=>{return i.shape}),Yi(r,"ZodObject",{keyof(){return p(Object.keys(this._zod.def.shape))},catchall(v){return this.clone({...this._zod.def,catchall:v})},passthrough(){return this.clone({...this._zod.def,catchall:x()})},loose(){return this.clone({...this._zod.def,catchall:x()})},strict(){return this.clone({...this._zod.def,catchall:ut()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(v){return N.extend(this,v)},safeExtend(v){return N.safeExtend(this,v)},merge(v){return N.merge(this,v)},pick(v){return N.pick(this,v)},omit(v){return N.omit(this,v)},partial(...v){return N.partial($t,this,v[0])},required(...v){return N.required(gt,this,v[0])}})});qn=e("ZodUnion",(r,i)=>{_i.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>zv(r,v,u,n),r.options=i.options});dv=e("ZodXor",(r,i)=>{qn.init(r,i),F$.init(r,i),r._zod.processJSONSchema=(v,u,n)=>zv(r,v,u,n),r.options=i.options});yv=e("ZodDiscriminatedUnion",(r,i)=>{qn.init(r,i),E$.init(r,i)});hv=e("ZodIntersection",(r,i)=>{T$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>wb(r,v,u,n)});pv=e("ZodTuple",(r,i)=>{dt.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>kb(r,v,u,n),r.rest=(v)=>r.clone({...r._zod.def,rest:v})});en=e("ZodRecord",(r,i)=>{x$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>Nb(r,v,u,n),r.keyType=i.keyType,r.valueType=i.valueType});sv=e("ZodMap",(r,i)=>{M$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>_b(r,v,u,n),r.keyType=i.keyType,r.valueType=i.valueType,r.min=(...v)=>r.check(Sr(...v)),r.nonempty=(v)=>r.check(Sr(1,v)),r.max=(...v)=>r.check(Gr(...v)),r.size=(...v)=>r.check(xr(...v))});ru=e("ZodSet",(r,i)=>{Y$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>Ib(r,v,u,n),r.min=(...v)=>r.check(Sr(...v)),r.nonempty=(v)=>r.check(Sr(1,v)),r.max=(...v)=>r.check(Gr(...v)),r.size=(...v)=>r.check(xr(...v))});_n=e("ZodEnum",(r,i)=>{q$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(u,n,t)=>vb(r,u,n,t),r.enum=i.entries,r.options=Object.values(i.entries);let v=new Set(Object.keys(i.entries));r.extract=(u,n)=>{let t={};for(let o of u)if(v.has(o))t[o]=i.entries[o];else throw Error(`Key ${o} not found in enum`);return new _n({...i,checks:[],...N.normalizeParams(n),entries:t})},r.exclude=(u,n)=>{let t={...i.entries};for(let o of u)if(v.has(o))delete t[o];else throw Error(`Key ${o} not found in enum`);return new _n({...i,checks:[],...N.normalizeParams(n),entries:t})}});nu=e("ZodLiteral",(r,i)=>{X$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>ub(r,v,u,n),r.values=new Set(i.values),Object.defineProperty(r,"value",{get(){if(i.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return i.values[0]}})});iu=e("ZodFile",(r,i)=>{R$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>gb(r,v,u,n),r.min=(v,u)=>r.check(Sr(v,u)),r.max=(v,u)=>r.check(Gr(v,u)),r.mime=(v,u)=>r.check(on(Array.isArray(v)?v:[v],u))});tu=e("ZodTransform",(r,i)=>{Z$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>eb(r,v,u,n),r._zod.parse=(v,u)=>{if(u.direction==="backward")throw new dr(r.constructor.name);v.addIssue=(t)=>{if(typeof t==="string")v.issues.push(N.issue(t,v.value,i));else{let o=t;if(o.fatal)o.continue=!1;o.code??(o.code="custom"),o.input??(o.input=v.value),o.inst??(o.inst=r),v.issues.push(N.issue(o))}};let n=i.transform(v.value,v);if(n instanceof Promise)return n.then((t)=>{return v.value=t,v.fallback=!0,v});return v.value=n,v.fallback=!0,v}});$t=e("ZodOptional",(r,i)=>{yt.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>Ov(r,v,u,n),r.unwrap=()=>r._zod.def.innerType});vu=e("ZodExactOptional",(r,i)=>{Q$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>Ov(r,v,u,n),r.unwrap=()=>r._zod.def.innerType});ou=e("ZodNullable",(r,i)=>{C$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>mb(r,v,u,n),r.unwrap=()=>r._zod.def.innerType});$u=e("ZodDefault",(r,i)=>{f$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>Ob(r,v,u,n),r.unwrap=()=>r._zod.def.innerType,r.removeDefault=r.unwrap});lu=e("ZodPrefault",(r,i)=>{d$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>Sb(r,v,u,n),r.unwrap=()=>r._zod.def.innerType});gt=e("ZodNonOptional",(r,i)=>{y$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>zb(r,v,u,n),r.unwrap=()=>r._zod.def.innerType});eu=e("ZodSuccess",(r,i)=>{h$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>lb(r,v,u,n),r.unwrap=()=>r._zod.def.innerType});_u=e("ZodCatch",(r,i)=>{p$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>Pb(r,v,u,n),r.unwrap=()=>r._zod.def.innerType,r.removeCatch=r.unwrap});Uu=e("ZodNaN",(r,i)=>{a$.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>ob(r,v,u,n)});Rn=e("ZodPipe",(r,i)=>{ht.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>jb(r,v,u,n),r.in=i.in,r.out=i.out});Zn=e("ZodCodec",(r,i)=>{Rn.init(r,i),Ii.init(r,i)});Du=e("ZodPreprocess",(r,i)=>{Rn.init(r,i),s$.init(r,i)}),wu=e("ZodReadonly",(r,i)=>{rg.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>Lb(r,v,u,n),r.unwrap=()=>r._zod.def.innerType});Nu=e("ZodTemplateLiteral",(r,i)=>{ng.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>$b(r,v,u,n)});mu=e("ZodLazy",(r,i)=>{vg.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>Jb(r,v,u,n),r.unwrap=()=>r._zod.def.getter()});Ou=e("ZodPromise",(r,i)=>{tg.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>Ab(r,v,u,n),r.unwrap=()=>r._zod.def.innerType});Su=e("ZodFunction",(r,i)=>{ig.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>cb(r,v,u,n)});Qn=e("ZodCustom",(r,i)=>{ug.init(r,i),W.init(r,i),r._zod.processJSONSchema=(v,u,n)=>bb(r,v,u,n)});Y4=Xl,q4=Rl});function De(r){Z({customError:r})}function we(){return Z().customError}var Ue,Lu;var ke=O(()=>{Ir();Ue={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};(function(r){})(Lu||(Lu={}))});function zU(r,i){let v=r.$schema;if(v==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(v==="http://json-schema.org/draft-07/schema#")return"draft-7";if(v==="http://json-schema.org/draft-04/schema#")return"draft-4";return i??"draft-2020-12"}function OU(r,i){if(!r.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let v=r.slice(1).split("/").filter(Boolean);if(v.length===0)return i.rootSchema;let u=i.version==="draft-2020-12"?"$defs":"definitions";if(v[0]===u){let n=v[1];if(!n||!i.defs[n])throw Error(`Reference not found: ${r}`);return i.defs[n]}throw Error(`Reference not found: ${r}`)}function Ne(r,i){if(r.not!==void 0){if(typeof r.not==="object"&&Object.keys(r.not).length===0)return S.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(r.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(r.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(r.if!==void 0||r.then!==void 0||r.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(r.dependentSchemas!==void 0||r.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(r.$ref){let n=r.$ref;if(i.refs.has(n))return i.refs.get(n);if(i.processing.has(n))return S.lazy(()=>{if(!i.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return i.refs.get(n)});i.processing.add(n);let t=OU(n,i),o=ur(t,i);return i.refs.set(n,o),i.processing.delete(n),o}if(r.enum!==void 0){let n=r.enum;if(i.version==="openapi-3.0"&&r.nullable===!0&&n.length===1&&n[0]===null)return S.null();if(n.length===0)return S.never();if(n.length===1)return S.literal(n[0]);if(n.every((o)=>typeof o==="string"))return S.enum(n);let t=n.map((o)=>S.literal(o));if(t.length<2)return t[0];return S.union([t[0],t[1],...t.slice(2)])}if(r.const!==void 0)return S.literal(r.const);let v=r.type;if(Array.isArray(v)){let n=v.map((t)=>{let o={...r,type:t};return Ne(o,i)});if(n.length===0)return S.never();if(n.length===1)return n[0];return S.union(n)}if(!v)return S.any();let u;switch(v){case"string":{let n=S.string();if(r.format){let t=r.format;if(t==="email")n=n.check(S.email());else if(t==="uri"||t==="uri-reference")n=n.check(S.url());else if(t==="uuid"||t==="guid")n=n.check(S.uuid());else if(t==="date-time")n=n.check(S.iso.datetime());else if(t==="date")n=n.check(S.iso.date());else if(t==="time")n=n.check(S.iso.time());else if(t==="duration")n=n.check(S.iso.duration());else if(t==="ipv4")n=n.check(S.ipv4());else if(t==="ipv6")n=n.check(S.ipv6());else if(t==="mac")n=n.check(S.mac());else if(t==="cidr")n=n.check(S.cidrv4());else if(t==="cidr-v6")n=n.check(S.cidrv6());else if(t==="base64")n=n.check(S.base64());else if(t==="base64url")n=n.check(S.base64url());else if(t==="e164")n=n.check(S.e164());else if(t==="jwt")n=n.check(S.jwt());else if(t==="emoji")n=n.check(S.emoji());else if(t==="nanoid")n=n.check(S.nanoid());else if(t==="cuid")n=n.check(S.cuid());else if(t==="cuid2")n=n.check(S.cuid2());else if(t==="ulid")n=n.check(S.ulid());else if(t==="xid")n=n.check(S.xid());else if(t==="ksuid")n=n.check(S.ksuid())}if(typeof r.minLength==="number")n=n.min(r.minLength);if(typeof r.maxLength==="number")n=n.max(r.maxLength);if(r.pattern)n=n.regex(new RegExp(r.pattern));u=n;break}case"number":case"integer":{let n=v==="integer"?S.number().int():S.number();if(typeof r.minimum==="number")n=n.min(r.minimum);if(typeof r.maximum==="number")n=n.max(r.maximum);if(typeof r.exclusiveMinimum==="number")n=n.gt(r.exclusiveMinimum);else if(r.exclusiveMinimum===!0&&typeof r.minimum==="number")n=n.gt(r.minimum);if(typeof r.exclusiveMaximum==="number")n=n.lt(r.exclusiveMaximum);else if(r.exclusiveMaximum===!0&&typeof r.maximum==="number")n=n.lt(r.maximum);if(typeof r.multipleOf==="number")n=n.multipleOf(r.multipleOf);u=n;break}case"boolean":{u=S.boolean();break}case"null":{u=S.null();break}case"object":{let n={},t=r.properties||{},o=new Set(r.required||[]);for(let[b,g]of Object.entries(t)){let c=ur(g,i);n[b]=o.has(b)?c:c.optional()}if(r.propertyNames){let b=ur(r.propertyNames,i),g=r.additionalProperties&&typeof r.additionalProperties==="object"?ur(r.additionalProperties,i):S.any();if(Object.keys(n).length===0){u=S.record(b,g);break}let c=S.object(n).passthrough(),U=S.looseRecord(b,g);u=S.intersection(c,U);break}if(r.patternProperties){let b=r.patternProperties,g=Object.keys(b),c=[];for(let w of g){let m=ur(b[w],i),A=S.string().regex(new RegExp(w));c.push(S.looseRecord(A,m))}let U=[];if(Object.keys(n).length>0)U.push(S.object(n).passthrough());if(U.push(...c),U.length===0)u=S.object({}).passthrough();else if(U.length===1)u=U[0];else{let w=S.intersection(U[0],U[1]);for(let m=2;m<U.length;m++)w=S.intersection(w,U[m]);u=w}break}let $=S.object(n);if(r.additionalProperties===!1)u=$.strict();else if(typeof r.additionalProperties==="object")u=$.catchall(ur(r.additionalProperties,i));else u=$.passthrough();break}case"array":{let{prefixItems:n,items:t}=r;if(n&&Array.isArray(n)){let o=n.map((b)=>ur(b,i)),$=t&&typeof t==="object"&&!Array.isArray(t)?ur(t,i):void 0;if($)u=S.tuple(o).rest($);else u=S.tuple(o);if(typeof r.minItems==="number")u=u.check(S.minLength(r.minItems));if(typeof r.maxItems==="number")u=u.check(S.maxLength(r.maxItems))}else if(Array.isArray(t)){let o=t.map((b)=>ur(b,i)),$=r.additionalItems&&typeof r.additionalItems==="object"?ur(r.additionalItems,i):void 0;if($)u=S.tuple(o).rest($);else u=S.tuple(o);if(typeof r.minItems==="number")u=u.check(S.minLength(r.minItems));if(typeof r.maxItems==="number")u=u.check(S.maxLength(r.maxItems))}else if(t!==void 0){let o=ur(t,i),$=S.array(o);if(typeof r.minItems==="number")$=$.min(r.minItems);if(typeof r.maxItems==="number")$=$.max(r.maxItems);u=$}else u=S.array(S.any());break}default:throw Error(`Unsupported type: ${v}`)}return u}function ur(r,i){if(typeof r==="boolean")return r?S.any():S.never();let v=Ne(r,i),u=r.type||r.enum!==void 0||r.const!==void 0;if(r.anyOf&&Array.isArray(r.anyOf)){let $=r.anyOf.map((g)=>ur(g,i)),b=S.union($);v=u?S.intersection(v,b):b}if(r.oneOf&&Array.isArray(r.oneOf)){let $=r.oneOf.map((g)=>ur(g,i)),b=S.xor($);v=u?S.intersection(v,b):b}if(r.allOf&&Array.isArray(r.allOf))if(r.allOf.length===0)v=u?v:S.any();else{let $=u?v:ur(r.allOf[0],i),b=u?0:1;for(let g=b;g<r.allOf.length;g++)$=S.intersection($,ur(r.allOf[g],i));v=$}if(r.nullable===!0&&i.version==="openapi-3.0")v=S.nullable(v);if(r.readOnly===!0)v=S.readonly(v);if(r.default!==void 0)v=v.default(r.default);let n={},t=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let $ of t)if($ in r)n[$]=r[$];let o=["contentEncoding","contentMediaType","contentSchema"];for(let $ of o)if($ in r)n[$]=r[$];for(let $ of Object.keys(r))if(!mU.has($))n[$]=r[$];if(Object.keys(n).length>0)i.registry.add(v,n);if(r.description)v=v.describe(r.description);return v}function Q4(r,i){if(typeof r==="boolean")return r?S.any():S.never();let v;try{v=JSON.parse(JSON.stringify(r))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let u=zU(v,i?.defaultTarget),n=v.$defs||v.definitions||{},t={version:u,defs:n,refs:new Map,processing:new Set,rootSchema:v,registry:i?.registry??y};return ur(v,t)}var S,mU;var me=O(()=>{mi();Lv();Fi();Ti();S={...Ei,...jv,iso:Kr},mU=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var Au={};jr(Au,{string:()=>SU,number:()=>PU,date:()=>AU,boolean:()=>jU,bigint:()=>LU});function SU(r){return gl(In,r)}function PU(r){return Ul(Dn,r)}function jU(r){return Ol(wn,r)}function LU(r){return Pl(kn,r)}function AU(r){return Fl(Mn,r)}var ze=O(()=>{Ir();Ti()});var l={};jr(l,{xor:()=>P4,xid:()=>yb,void:()=>m4,uuidv7:()=>qb,uuidv6:()=>Yb,uuidv4:()=>Mb,uuid:()=>xb,util:()=>N,url:()=>Xb,uppercase:()=>nn,unknown:()=>x,union:()=>M,undefined:()=>k4,ulid:()=>db,uint64:()=>D4,uint32:()=>_4,tuple:()=>av,trim:()=>gn,treeifyError:()=>Lt,transform:()=>ot,toUpperCase:()=>bn,toLowerCase:()=>ln,toJSONSchema:()=>Wi,templateLiteral:()=>E4,symbol:()=>w4,superRefine:()=>ju,success:()=>K4,stringbool:()=>R4,stringFormat:()=>o4,string:()=>I,strictObject:()=>S4,startsWith:()=>vn,slugify:()=>cn,size:()=>xr,setErrorMap:()=>De,set:()=>J4,safeParseAsync:()=>Vv,safeParse:()=>Wv,safeEncodeAsync:()=>Tv,safeEncode:()=>Fv,safeDecodeAsync:()=>xv,safeDecode:()=>Ev,registry:()=>Ni,regexes:()=>er,regex:()=>sr,refine:()=>Pu,record:()=>F,readonly:()=>ku,property:()=>Ai,promise:()=>T4,prettifyError:()=>At,preprocess:()=>Cn,prefault:()=>bu,positive:()=>Si,pipe:()=>Mi,partialRecord:()=>j4,parseAsync:()=>Jv,parse:()=>Av,overwrite:()=>kr,optional:()=>q,object:()=>P,number:()=>K,nullish:()=>G4,nullable:()=>En,null:()=>xn,normalize:()=>$n,nonpositive:()=>ji,nonoptional:()=>cu,nonnegative:()=>Li,never:()=>ut,negative:()=>Pi,nativeEnum:()=>W4,nanoid:()=>Qb,nan:()=>B4,multipleOf:()=>Vr,minSize:()=>Sr,minLength:()=>Ar,mime:()=>on,meta:()=>q4,maxSize:()=>Gr,maxLength:()=>Mr,map:()=>A4,mac:()=>ab,lte:()=>_r,lt:()=>zr,lowercase:()=>rn,looseRecord:()=>L4,looseObject:()=>h,locales:()=>Kn,literal:()=>L,length:()=>Yr,lazy:()=>zu,ksuid:()=>hb,keyof:()=>O4,jwt:()=>u4,json:()=>Z4,iso:()=>Kr,ipv6:()=>sb,ipv4:()=>pb,invertCodec:()=>F4,intersection:()=>Nn,int64:()=>U4,int32:()=>e4,int:()=>xi,instanceof:()=>X4,includes:()=>tn,httpUrl:()=>Rb,hostname:()=>$4,hex:()=>g4,hash:()=>l4,guid:()=>Tb,gte:()=>vr,gt:()=>Or,globalRegistry:()=>y,getErrorMap:()=>we,function:()=>x4,fromJSONSchema:()=>Q4,formatError:()=>Pn,float64:()=>c4,float32:()=>b4,flattenError:()=>Sn,file:()=>V4,exactOptional:()=>uu,enum:()=>p,endsWith:()=>un,encodeAsync:()=>Bv,encode:()=>Gv,emoji:()=>Zb,email:()=>Eb,e164:()=>v4,discriminatedUnion:()=>Xn,describe:()=>Y4,decodeAsync:()=>Hv,decode:()=>Kv,date:()=>z4,custom:()=>lt,cuid2:()=>fb,cuid:()=>Cb,core:()=>Jr,config:()=>Z,coerce:()=>Au,codec:()=>H4,clone:()=>tr,cidrv6:()=>n4,cidrv4:()=>r4,check:()=>M4,catch:()=>Iu,boolean:()=>C,bigint:()=>I4,base64url:()=>t4,base64:()=>i4,array:()=>V,any:()=>N4,_function:()=>x4,_default:()=>gu,_ZodString:()=>qi,ZodXor:()=>dv,ZodXID:()=>di,ZodVoid:()=>Cv,ZodUnknown:()=>Zv,ZodUnion:()=>qn,ZodUndefined:()=>qv,ZodUUID:()=>Pr,ZodURL:()=>Tn,ZodULID:()=>fi,ZodType:()=>W,ZodTuple:()=>pv,ZodTransform:()=>tu,ZodTemplateLiteral:()=>Nu,ZodSymbol:()=>Yv,ZodSuccess:()=>eu,ZodStringFormat:()=>T,ZodString:()=>In,ZodSet:()=>ru,ZodRecord:()=>en,ZodRealError:()=>lr,ZodReadonly:()=>wu,ZodPromise:()=>Ou,ZodPreprocess:()=>Du,ZodPrefault:()=>lu,ZodPipe:()=>Rn,ZodOptional:()=>$t,ZodObject:()=>Yn,ZodNumberFormat:()=>Zr,ZodNumber:()=>Dn,ZodNullable:()=>ou,ZodNull:()=>Xv,ZodNonOptional:()=>gt,ZodNever:()=>Qv,ZodNanoID:()=>Zi,ZodNaN:()=>Uu,ZodMap:()=>sv,ZodMAC:()=>Mv,ZodLiteral:()=>nu,ZodLazy:()=>mu,ZodKSUID:()=>yi,ZodJWT:()=>tt,ZodIssueCode:()=>Ue,ZodIntersection:()=>hv,ZodISOTime:()=>Bi,ZodISODuration:()=>Hi,ZodISODateTime:()=>Gi,ZodISODate:()=>Ki,ZodIPv6:()=>pi,ZodIPv4:()=>hi,ZodGUID:()=>Fn,ZodFunction:()=>Su,ZodFirstPartyTypeKind:()=>Lu,ZodFile:()=>iu,ZodExactOptional:()=>vu,ZodError:()=>_e,ZodEnum:()=>_n,ZodEmoji:()=>Ri,ZodEmail:()=>Xi,ZodE164:()=>it,ZodDiscriminatedUnion:()=>yv,ZodDefault:()=>$u,ZodDate:()=>Mn,ZodCustomStringFormat:()=>Un,ZodCustom:()=>Qn,ZodCodec:()=>Zn,ZodCatch:()=>_u,ZodCUID2:()=>Ci,ZodCUID:()=>Qi,ZodCIDRv6:()=>si,ZodCIDRv4:()=>ai,ZodBoolean:()=>wn,ZodBigIntFormat:()=>vt,ZodBigInt:()=>kn,ZodBase64URL:()=>nt,ZodBase64:()=>rt,ZodArray:()=>fv,ZodAny:()=>Rv,TimePrecision:()=>Nv,NEVER:()=>Ot,$output:()=>pt,$input:()=>at,$brand:()=>St});var C4=O(()=>{Ir();Ir();Dg();Ir();Vi();me();ul();Fi();Fi();ze();Ti();Lv();Hb();Fb();ke();Z(Ui())});var Oe;var f4=O(()=>{C4();C4();Oe=l});var d4={};jr(d4,{z:()=>l,xor:()=>P4,xid:()=>yb,void:()=>m4,uuidv7:()=>qb,uuidv6:()=>Yb,uuidv4:()=>Mb,uuid:()=>xb,util:()=>N,url:()=>Xb,uppercase:()=>nn,unknown:()=>x,union:()=>M,undefined:()=>k4,ulid:()=>db,uint64:()=>D4,uint32:()=>_4,tuple:()=>av,trim:()=>gn,treeifyError:()=>Lt,transform:()=>ot,toUpperCase:()=>bn,toLowerCase:()=>ln,toJSONSchema:()=>Wi,templateLiteral:()=>E4,symbol:()=>w4,superRefine:()=>ju,success:()=>K4,stringbool:()=>R4,stringFormat:()=>o4,string:()=>I,strictObject:()=>S4,startsWith:()=>vn,slugify:()=>cn,size:()=>xr,setErrorMap:()=>De,set:()=>J4,safeParseAsync:()=>Vv,safeParse:()=>Wv,safeEncodeAsync:()=>Tv,safeEncode:()=>Fv,safeDecodeAsync:()=>xv,safeDecode:()=>Ev,registry:()=>Ni,regexes:()=>er,regex:()=>sr,refine:()=>Pu,record:()=>F,readonly:()=>ku,property:()=>Ai,promise:()=>T4,prettifyError:()=>At,preprocess:()=>Cn,prefault:()=>bu,positive:()=>Si,pipe:()=>Mi,partialRecord:()=>j4,parseAsync:()=>Jv,parse:()=>Av,overwrite:()=>kr,optional:()=>q,object:()=>P,number:()=>K,nullish:()=>G4,nullable:()=>En,null:()=>xn,normalize:()=>$n,nonpositive:()=>ji,nonoptional:()=>cu,nonnegative:()=>Li,never:()=>ut,negative:()=>Pi,nativeEnum:()=>W4,nanoid:()=>Qb,nan:()=>B4,multipleOf:()=>Vr,minSize:()=>Sr,minLength:()=>Ar,mime:()=>on,meta:()=>q4,maxSize:()=>Gr,maxLength:()=>Mr,map:()=>A4,mac:()=>ab,lte:()=>_r,lt:()=>zr,lowercase:()=>rn,looseRecord:()=>L4,looseObject:()=>h,locales:()=>Kn,literal:()=>L,length:()=>Yr,lazy:()=>zu,ksuid:()=>hb,keyof:()=>O4,jwt:()=>u4,json:()=>Z4,iso:()=>Kr,ipv6:()=>sb,ipv4:()=>pb,invertCodec:()=>F4,intersection:()=>Nn,int64:()=>U4,int32:()=>e4,int:()=>xi,instanceof:()=>X4,includes:()=>tn,httpUrl:()=>Rb,hostname:()=>$4,hex:()=>g4,hash:()=>l4,guid:()=>Tb,gte:()=>vr,gt:()=>Or,globalRegistry:()=>y,getErrorMap:()=>we,function:()=>x4,fromJSONSchema:()=>Q4,formatError:()=>Pn,float64:()=>c4,float32:()=>b4,flattenError:()=>Sn,file:()=>V4,exactOptional:()=>uu,enum:()=>p,endsWith:()=>un,encodeAsync:()=>Bv,encode:()=>Gv,emoji:()=>Zb,email:()=>Eb,e164:()=>v4,discriminatedUnion:()=>Xn,describe:()=>Y4,default:()=>JU,decodeAsync:()=>Hv,decode:()=>Kv,date:()=>z4,custom:()=>lt,cuid2:()=>fb,cuid:()=>Cb,core:()=>Jr,config:()=>Z,coerce:()=>Au,codec:()=>H4,clone:()=>tr,cidrv6:()=>n4,cidrv4:()=>r4,check:()=>M4,catch:()=>Iu,boolean:()=>C,bigint:()=>I4,base64url:()=>t4,base64:()=>i4,array:()=>V,any:()=>N4,_function:()=>x4,_default:()=>gu,_ZodString:()=>qi,ZodXor:()=>dv,ZodXID:()=>di,ZodVoid:()=>Cv,ZodUnknown:()=>Zv,ZodUnion:()=>qn,ZodUndefined:()=>qv,ZodUUID:()=>Pr,ZodURL:()=>Tn,ZodULID:()=>fi,ZodType:()=>W,ZodTuple:()=>pv,ZodTransform:()=>tu,ZodTemplateLiteral:()=>Nu,ZodSymbol:()=>Yv,ZodSuccess:()=>eu,ZodStringFormat:()=>T,ZodString:()=>In,ZodSet:()=>ru,ZodRecord:()=>en,ZodRealError:()=>lr,ZodReadonly:()=>wu,ZodPromise:()=>Ou,ZodPreprocess:()=>Du,ZodPrefault:()=>lu,ZodPipe:()=>Rn,ZodOptional:()=>$t,ZodObject:()=>Yn,ZodNumberFormat:()=>Zr,ZodNumber:()=>Dn,ZodNullable:()=>ou,ZodNull:()=>Xv,ZodNonOptional:()=>gt,ZodNever:()=>Qv,ZodNanoID:()=>Zi,ZodNaN:()=>Uu,ZodMap:()=>sv,ZodMAC:()=>Mv,ZodLiteral:()=>nu,ZodLazy:()=>mu,ZodKSUID:()=>yi,ZodJWT:()=>tt,ZodIssueCode:()=>Ue,ZodIntersection:()=>hv,ZodISOTime:()=>Bi,ZodISODuration:()=>Hi,ZodISODateTime:()=>Gi,ZodISODate:()=>Ki,ZodIPv6:()=>pi,ZodIPv4:()=>hi,ZodGUID:()=>Fn,ZodFunction:()=>Su,ZodFirstPartyTypeKind:()=>Lu,ZodFile:()=>iu,ZodExactOptional:()=>vu,ZodError:()=>_e,ZodEnum:()=>_n,ZodEmoji:()=>Ri,ZodEmail:()=>Xi,ZodE164:()=>it,ZodDiscriminatedUnion:()=>yv,ZodDefault:()=>$u,ZodDate:()=>Mn,ZodCustomStringFormat:()=>Un,ZodCustom:()=>Qn,ZodCodec:()=>Zn,ZodCatch:()=>_u,ZodCUID2:()=>Ci,ZodCUID:()=>Qi,ZodCIDRv6:()=>si,ZodCIDRv4:()=>ai,ZodBoolean:()=>wn,ZodBigIntFormat:()=>vt,ZodBigInt:()=>kn,ZodBase64URL:()=>nt,ZodBase64:()=>rt,ZodArray:()=>fv,ZodAny:()=>Rv,TimePrecision:()=>Nv,NEVER:()=>Ot,$output:()=>pt,$input:()=>at,$brand:()=>St});var JU;var bt=O(()=>{f4();f4();JU=Oe});Ir();function Sv(r){return!!r._zod}function Pv(r,i){if(Sv(r))return Jn(r,i);return r.safeParse(i)}function be(r){if(!r)return;let i;if(Sv(r))i=r._zod?.def?.shape;else i=r.shape;if(!i)return;if(typeof i==="function")try{return i()}catch{return}return i}function ce(r){if(Sv(r)){let t=r._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let v=r._def;if(v){if(v.value!==void 0)return v.value;if(Array.isArray(v.values)&&v.values.length>0)return v.values[0]}let u=r.value;if(u!==void 0)return u;return}bt();var Qr="io.modelcontextprotocol/related-task",Wu="2.0",d=lt((r)=>r!==null&&(typeof r==="object"||typeof r==="function")),Se=M([I(),K().int()]),Pe=I(),Y1=h({ttl:K().optional(),pollInterval:K().optional()}),WU=P({ttl:K().optional()}),VU=P({taskId:I()}),y4=h({progressToken:Se.optional(),[Qr]:VU.optional()}),Dr=P({_meta:y4.optional()}),ct=Dr.extend({task:WU.optional()}),je=(r)=>ct.safeParse(r).success,s=P({method:I(),params:Dr.loose().optional()}),Nr=P({_meta:y4.optional()}),mr=P({method:I(),params:Nr.loose().optional()}),rr=h({_meta:y4.optional()}),dn=M([I(),K().int()]),Le=P({jsonrpc:L(Wu),id:dn,...s.shape}).strict(),h4=(r)=>Le.safeParse(r).success,Ae=P({jsonrpc:L(Wu),...mr.shape}).strict(),Je=(r)=>Ae.safeParse(r).success,p4=P({jsonrpc:L(Wu),id:dn,result:rr}).strict(),et=(r)=>p4.safeParse(r).success;var E;(function(r){r[r.ConnectionClosed=-32000]="ConnectionClosed",r[r.RequestTimeout=-32001]="RequestTimeout",r[r.ParseError=-32700]="ParseError",r[r.InvalidRequest=-32600]="InvalidRequest",r[r.MethodNotFound=-32601]="MethodNotFound",r[r.InvalidParams=-32602]="InvalidParams",r[r.InternalError=-32603]="InternalError",r[r.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(E||(E={}));var a4=P({jsonrpc:L(Wu),id:dn.optional(),error:P({code:K().int(),message:I(),data:x().optional()})}).strict();var We=(r)=>a4.safeParse(r).success;var Ve=M([Le,Ae,p4,a4]),q1=M([p4,a4]),Vu=rr.strict(),GU=Nr.extend({requestId:dn.optional(),reason:I().optional()}),Gu=mr.extend({method:L("notifications/cancelled"),params:GU}),KU=P({src:I(),mimeType:I().optional(),sizes:V(I()).optional(),theme:p(["light","dark"]).optional()}),_t=P({icons:V(KU).optional()}),fn=P({name:I(),title:I().optional()}),It=fn.extend({...fn.shape,..._t.shape,version:I(),websiteUrl:I().optional(),description:I().optional()}),BU=Nn(P({applyDefaults:C().optional()}),F(I(),x())),HU=Cn((r)=>{if(r&&typeof r==="object"&&!Array.isArray(r)){if(Object.keys(r).length===0)return{form:{}}}return r},Nn(P({form:BU.optional(),url:d.optional()}),F(I(),x()).optional())),FU=h({list:d.optional(),cancel:d.optional(),requests:h({sampling:h({createMessage:d.optional()}).optional(),elicitation:h({create:d.optional()}).optional()}).optional()}),EU=h({list:d.optional(),cancel:d.optional(),requests:h({tools:h({call:d.optional()}).optional()}).optional()}),TU=P({experimental:F(I(),d).optional(),sampling:P({context:d.optional(),tools:d.optional()}).optional(),elicitation:HU.optional(),roots:P({listChanged:C().optional()}).optional(),tasks:FU.optional(),extensions:F(I(),d).optional()}),xU=Dr.extend({protocolVersion:I(),capabilities:TU,clientInfo:It}),MU=s.extend({method:L("initialize"),params:xU});var YU=P({experimental:F(I(),d).optional(),logging:d.optional(),completions:d.optional(),prompts:P({listChanged:C().optional()}).optional(),resources:P({subscribe:C().optional(),listChanged:C().optional()}).optional(),tools:P({listChanged:C().optional()}).optional(),tasks:EU.optional(),extensions:F(I(),d).optional()}),qU=rr.extend({protocolVersion:I(),capabilities:YU,serverInfo:It,instructions:I().optional()}),XU=mr.extend({method:L("notifications/initialized"),params:Nr.optional()});var yn=s.extend({method:L("ping"),params:Dr.optional()}),RU=P({progress:K(),total:q(K()),message:q(I())}),ZU=P({...Nr.shape,...RU.shape,progressToken:Se}),Ku=mr.extend({method:L("notifications/progress"),params:ZU}),QU=Dr.extend({cursor:Pe.optional()}),Ut=s.extend({params:QU.optional()}),Dt=rr.extend({nextCursor:Pe.optional()}),CU=p(["working","input_required","completed","failed","cancelled"]),wt=P({taskId:I(),status:CU,ttl:M([K(),xn()]),createdAt:I(),lastUpdatedAt:I(),pollInterval:q(K()),statusMessage:q(I())}),Bu=rr.extend({task:wt}),fU=Nr.merge(wt),kt=mr.extend({method:L("notifications/tasks/status"),params:fU}),Hu=s.extend({method:L("tasks/get"),params:Dr.extend({taskId:I()})}),Fu=rr.merge(wt),Eu=s.extend({method:L("tasks/result"),params:Dr.extend({taskId:I()})}),X1=rr.loose(),Tu=Ut.extend({method:L("tasks/list")}),xu=Dt.extend({tasks:V(wt)}),Mu=s.extend({method:L("tasks/cancel"),params:Dr.extend({taskId:I()})}),Ge=rr.merge(wt),Ke=P({uri:I(),mimeType:q(I()),_meta:F(I(),x()).optional()}),Be=Ke.extend({text:I()}),s4=I().refine((r)=>{try{return atob(r),!0}catch{return!1}},{message:"Invalid Base64 string"}),He=Ke.extend({blob:s4}),Nt=p(["user","assistant"]),hn=P({audience:V(Nt).optional(),priority:K().min(0).max(1).optional(),lastModified:Kr.datetime({offset:!0}).optional()}),Fe=P({...fn.shape,..._t.shape,uri:I(),description:q(I()),mimeType:q(I()),size:q(K()),annotations:hn.optional(),_meta:q(h({}))}),dU=P({...fn.shape,..._t.shape,uriTemplate:I(),description:q(I()),mimeType:q(I()),annotations:hn.optional(),_meta:q(h({}))}),yU=Ut.extend({method:L("resources/list")}),r6=Dt.extend({resources:V(Fe)}),hU=Ut.extend({method:L("resources/templates/list")}),pU=Dt.extend({resourceTemplates:V(dU)}),n6=Dr.extend({uri:I()}),aU=n6,sU=s.extend({method:L("resources/read"),params:aU}),i6=rr.extend({contents:V(M([Be,He]))}),rD=mr.extend({method:L("notifications/resources/list_changed"),params:Nr.optional()}),nD=n6,iD=s.extend({method:L("resources/subscribe"),params:nD}),tD=n6,vD=s.extend({method:L("resources/unsubscribe"),params:tD}),uD=Nr.extend({uri:I()}),oD=mr.extend({method:L("notifications/resources/updated"),params:uD}),$D=P({name:I(),description:q(I()),required:q(C())}),gD=P({...fn.shape,..._t.shape,description:q(I()),arguments:q(V($D)),_meta:q(h({}))}),lD=Ut.extend({method:L("prompts/list")}),bD=Dt.extend({prompts:V(gD)}),cD=Dr.extend({name:I(),arguments:F(I(),I()).optional()}),eD=s.extend({method:L("prompts/get"),params:cD}),t6=P({type:L("text"),text:I(),annotations:hn.optional(),_meta:F(I(),x()).optional()}),v6=P({type:L("image"),data:s4,mimeType:I(),annotations:hn.optional(),_meta:F(I(),x()).optional()}),u6=P({type:L("audio"),data:s4,mimeType:I(),annotations:hn.optional(),_meta:F(I(),x()).optional()}),_D=P({type:L("tool_use"),name:I(),id:I(),input:F(I(),x()),_meta:F(I(),x()).optional()}),o6=P({type:L("resource"),resource:M([Be,He]),annotations:hn.optional(),_meta:F(I(),x()).optional()}),$6=Fe.extend({type:L("resource_link")}),pn=M([t6,v6,u6,$6,o6]),ID=P({role:Nt,content:pn}),UD=rr.extend({description:I().optional(),messages:V(ID)}),DD=mr.extend({method:L("notifications/prompts/list_changed"),params:Nr.optional()}),wD=P({title:I().optional(),readOnlyHint:C().optional(),destructiveHint:C().optional(),idempotentHint:C().optional(),openWorldHint:C().optional()}),kD=P({taskSupport:p(["required","optional","forbidden"]).optional()}),Yu=P({...fn.shape,..._t.shape,description:I().optional(),inputSchema:P({type:L("object"),properties:F(I(),d).optional(),required:V(I()).optional()}).catchall(x()),outputSchema:P({type:L("object"),properties:F(I(),d).optional(),required:V(I()).optional()}).catchall(x()).optional(),annotations:wD.optional(),execution:kD.optional(),_meta:F(I(),x()).optional()}),g6=Ut.extend({method:L("tools/list")}),ND=Dt.extend({tools:V(Yu)}),an=rr.extend({content:V(pn).default([]),structuredContent:F(I(),x()).optional(),isError:C().optional()}),R1=an.or(rr.extend({toolResult:x()})),mD=ct.extend({name:I(),arguments:F(I(),x()).optional()}),l6=s.extend({method:L("tools/call"),params:mD}),zD=mr.extend({method:L("notifications/tools/list_changed"),params:Nr.optional()}),Z1=P({autoRefresh:C().default(!0),debounceMs:K().int().nonnegative().default(300)}),Ee=p(["debug","info","notice","warning","error","critical","alert","emergency"]),OD=Dr.extend({level:Ee}),SD=s.extend({method:L("logging/setLevel"),params:OD}),PD=Nr.extend({level:Ee,logger:I().optional(),data:x()}),jD=mr.extend({method:L("notifications/message"),params:PD}),LD=P({name:I().optional()}),AD=P({hints:V(LD).optional(),costPriority:K().min(0).max(1).optional(),speedPriority:K().min(0).max(1).optional(),intelligencePriority:K().min(0).max(1).optional()}),JD=P({mode:p(["auto","required","none"]).optional()}),WD=P({type:L("tool_result"),toolUseId:I().describe("The unique identifier for the corresponding tool call."),content:V(pn).default([]),structuredContent:P({}).loose().optional(),isError:C().optional(),_meta:F(I(),x()).optional()}),VD=Xn("type",[t6,v6,u6]),Ju=Xn("type",[t6,v6,u6,_D,WD]),GD=P({role:Nt,content:M([Ju,V(Ju)]),_meta:F(I(),x()).optional()}),KD=ct.extend({messages:V(GD),modelPreferences:AD.optional(),systemPrompt:I().optional(),includeContext:p(["none","thisServer","allServers"]).optional(),temperature:K().optional(),maxTokens:K().int(),stopSequences:V(I()).optional(),metadata:d.optional(),tools:V(Yu).optional(),toolChoice:JD.optional()}),BD=s.extend({method:L("sampling/createMessage"),params:KD}),b6=rr.extend({model:I(),stopReason:q(p(["endTurn","stopSequence","maxTokens"]).or(I())),role:Nt,content:VD}),c6=rr.extend({model:I(),stopReason:q(p(["endTurn","stopSequence","maxTokens","toolUse"]).or(I())),role:Nt,content:M([Ju,V(Ju)])}),HD=P({type:L("boolean"),title:I().optional(),description:I().optional(),default:C().optional()}),FD=P({type:L("string"),title:I().optional(),description:I().optional(),minLength:K().optional(),maxLength:K().optional(),format:p(["email","uri","date","date-time"]).optional(),default:I().optional()}),ED=P({type:p(["number","integer"]),title:I().optional(),description:I().optional(),minimum:K().optional(),maximum:K().optional(),default:K().optional()}),TD=P({type:L("string"),title:I().optional(),description:I().optional(),enum:V(I()),default:I().optional()}),xD=P({type:L("string"),title:I().optional(),description:I().optional(),oneOf:V(P({const:I(),title:I()})),default:I().optional()}),MD=P({type:L("string"),title:I().optional(),description:I().optional(),enum:V(I()),enumNames:V(I()).optional(),default:I().optional()}),YD=M([TD,xD]),qD=P({type:L("array"),title:I().optional(),description:I().optional(),minItems:K().optional(),maxItems:K().optional(),items:P({type:L("string"),enum:V(I())}),default:V(I()).optional()}),XD=P({type:L("array"),title:I().optional(),description:I().optional(),minItems:K().optional(),maxItems:K().optional(),items:P({anyOf:V(P({const:I(),title:I()}))}),default:V(I()).optional()}),RD=M([qD,XD]),ZD=M([MD,YD,RD]),QD=M([ZD,HD,FD,ED]),CD=ct.extend({mode:L("form").optional(),message:I(),requestedSchema:P({type:L("object"),properties:F(I(),QD),required:V(I()).optional()})}),fD=ct.extend({mode:L("url"),message:I(),elicitationId:I(),url:I().url()}),dD=M([CD,fD]),yD=s.extend({method:L("elicitation/create"),params:dD}),hD=Nr.extend({elicitationId:I()}),pD=mr.extend({method:L("notifications/elicitation/complete"),params:hD}),aD=rr.extend({action:p(["accept","decline","cancel"]),content:Cn((r)=>r===null?void 0:r,F(I(),M([I(),K(),C(),V(I())])).optional())}),sD=P({type:L("ref/resource"),uri:I()});var rw=P({type:L("ref/prompt"),name:I()}),nw=Dr.extend({ref:M([rw,sD]),argument:P({name:I(),value:I()}),context:P({arguments:F(I(),I()).optional()}).optional()}),iw=s.extend({method:L("completion/complete"),params:nw});var tw=rr.extend({completion:h({values:V(I()).max(100),total:q(K().int()),hasMore:q(C())})}),vw=P({uri:I().startsWith("file://"),name:I().optional(),_meta:F(I(),x()).optional()}),uw=s.extend({method:L("roots/list"),params:Dr.optional()}),ow=rr.extend({roots:V(vw)}),$w=mr.extend({method:L("notifications/roots/list_changed"),params:Nr.optional()}),Q1=M([yn,MU,iw,SD,eD,lD,yU,hU,sU,iD,vD,l6,g6,Hu,Eu,Tu,Mu]),C1=M([Gu,Ku,XU,$w,kt]),f1=M([Vu,b6,c6,aD,ow,Fu,xu,Bu]),d1=M([yn,BD,yD,uw,Hu,Eu,Tu,Mu]),y1=M([Gu,Ku,jD,oD,rD,zD,DD,kt,pD]),h1=M([Vu,qU,tw,UD,bD,r6,pU,i6,an,ND,Fu,xu,Bu]);class B extends Error{constructor(r,i,v){super(`MCP error ${r}: ${i}`);this.code=r,this.data=v,this.name="McpError"}static fromError(r,i,v){if(r===E.UrlElicitationRequired&&v){let u=v;if(u.elicitations)return new Te(u.elicitations,i)}return new B(r,i,v)}}class Te extends B{constructor(r,i=`URL elicitation${r.length>1?"s":""} required`){super(E.UrlElicitationRequired,i,{elicitations:r})}get elicitations(){return this.data?.elicitations??[]}}function Cr(r){return r==="completed"||r==="failed"||r==="cancelled"}var gw=Symbol("Let zodToJsonSchema decide on which parser to use");var Wm=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function e6(r){let v=be(r)?.method;if(!v)throw Error("Schema is missing a method literal");let u=ce(v);if(typeof u!=="string")throw Error("Schema method literal must be a string");return u}function _6(r,i){let v=Pv(r,i);if(!v.success)throw v.error;return v.data}var Iw=60000;class I6{constructor(r){if(this._options=r,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Gu,(i)=>{this._oncancel(i)}),this.setNotificationHandler(Ku,(i)=>{this._onprogress(i)}),this.setRequestHandler(yn,(i)=>({})),this._taskStore=r?.taskStore,this._taskMessageQueue=r?.taskMessageQueue,this._taskStore)this.setRequestHandler(Hu,async(i,v)=>{let u=await this._taskStore.getTask(i.params.taskId,v.sessionId);if(!u)throw new B(E.InvalidParams,"Failed to retrieve task: Task not found");return{...u}}),this.setRequestHandler(Eu,async(i,v)=>{let u=async()=>{let n=i.params.taskId;if(this._taskMessageQueue){let o;while(o=await this._taskMessageQueue.dequeue(n,v.sessionId)){if(o.type==="response"||o.type==="error"){let $=o.message,b=$.id,g=this._requestResolvers.get(b);if(g)if(this._requestResolvers.delete(b),o.type==="response")g($);else{let c=$,U=new B(c.error.code,c.error.message,c.error.data);g(U)}else{let c=o.type==="response"?"Response":"Error";this._onerror(Error(`${c} handler missing for request ${b}`))}continue}await this._transport?.send(o.message,{relatedRequestId:v.requestId})}}let t=await this._taskStore.getTask(n,v.sessionId);if(!t)throw new B(E.InvalidParams,`Task not found: ${n}`);if(!Cr(t.status))return await this._waitForTaskUpdate(n,v.signal),await u();if(Cr(t.status)){let o=await this._taskStore.getTaskResult(n,v.sessionId);return this._clearTaskQueue(n),{...o,_meta:{...o._meta,[Qr]:{taskId:n}}}}return await u()};return await u()}),this.setRequestHandler(Tu,async(i,v)=>{try{let{tasks:u,nextCursor:n}=await this._taskStore.listTasks(i.params?.cursor,v.sessionId);return{tasks:u,nextCursor:n,_meta:{}}}catch(u){throw new B(E.InvalidParams,`Failed to list tasks: ${u instanceof Error?u.message:String(u)}`)}}),this.setRequestHandler(Mu,async(i,v)=>{try{let u=await this._taskStore.getTask(i.params.taskId,v.sessionId);if(!u)throw new B(E.InvalidParams,`Task not found: ${i.params.taskId}`);if(Cr(u.status))throw new B(E.InvalidParams,`Cannot cancel task in terminal status: ${u.status}`);await this._taskStore.updateTaskStatus(i.params.taskId,"cancelled","Client cancelled task execution.",v.sessionId),this._clearTaskQueue(i.params.taskId);let n=await this._taskStore.getTask(i.params.taskId,v.sessionId);if(!n)throw new B(E.InvalidParams,`Task not found after cancellation: ${i.params.taskId}`);return{_meta:{},...n}}catch(u){if(u instanceof B)throw u;throw new B(E.InvalidRequest,`Failed to cancel task: ${u instanceof Error?u.message:String(u)}`)}})}async _oncancel(r){if(!r.params.requestId)return;this._requestHandlerAbortControllers.get(r.params.requestId)?.abort(r.params.reason)}_setupTimeout(r,i,v,u,n=!1){this._timeoutInfo.set(r,{timeoutId:setTimeout(u,i),startTime:Date.now(),timeout:i,maxTotalTimeout:v,resetTimeoutOnProgress:n,onTimeout:u})}_resetTimeout(r){let i=this._timeoutInfo.get(r);if(!i)return!1;let v=Date.now()-i.startTime;if(i.maxTotalTimeout&&v>=i.maxTotalTimeout)throw this._timeoutInfo.delete(r),B.fromError(E.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:v});return clearTimeout(i.timeoutId),i.timeoutId=setTimeout(i.onTimeout,i.timeout),!0}_cleanupTimeout(r){let i=this._timeoutInfo.get(r);if(i)clearTimeout(i.timeoutId),this._timeoutInfo.delete(r)}async connect(r){if(this._transport)throw Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=r;let i=this.transport?.onclose;this._transport.onclose=()=>{i?.(),this._onclose()};let v=this.transport?.onerror;this._transport.onerror=(n)=>{v?.(n),this._onerror(n)};let u=this._transport?.onmessage;this._transport.onmessage=(n,t)=>{if(u?.(n,t),et(n)||We(n))this._onresponse(n);else if(h4(n))this._onrequest(n,t);else if(Je(n))this._onnotification(n);else this._onerror(Error(`Unknown message type: ${JSON.stringify(n)}`))},await this._transport.start()}_onclose(){let r=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let v of this._timeoutInfo.values())clearTimeout(v.timeoutId);this._timeoutInfo.clear();for(let v of this._requestHandlerAbortControllers.values())v.abort();this._requestHandlerAbortControllers.clear();let i=B.fromError(E.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let v of r.values())v(i)}_onerror(r){this.onerror?.(r)}_onnotification(r){let i=this._notificationHandlers.get(r.method)??this.fallbackNotificationHandler;if(i===void 0)return;Promise.resolve().then(()=>i(r)).catch((v)=>this._onerror(Error(`Uncaught error in notification handler: ${v}`)))}_onrequest(r,i){let v=this._requestHandlers.get(r.method)??this.fallbackRequestHandler,u=this._transport,n=r.params?._meta?.[Qr]?.taskId;if(v===void 0){let g={jsonrpc:"2.0",id:r.id,error:{code:E.MethodNotFound,message:"Method not found"}};if(n&&this._taskMessageQueue)this._enqueueTaskMessage(n,{type:"error",message:g,timestamp:Date.now()},u?.sessionId).catch((c)=>this._onerror(Error(`Failed to enqueue error response: ${c}`)));else u?.send(g).catch((c)=>this._onerror(Error(`Failed to send an error response: ${c}`)));return}let t=new AbortController;this._requestHandlerAbortControllers.set(r.id,t);let o=je(r.params)?r.params.task:void 0,$=this._taskStore?this.requestTaskStore(r,u?.sessionId):void 0,b={signal:t.signal,sessionId:u?.sessionId,_meta:r.params?._meta,sendNotification:async(g)=>{if(t.signal.aborted)return;let c={relatedRequestId:r.id};if(n)c.relatedTask={taskId:n};await this.notification(g,c)},sendRequest:async(g,c,U)=>{if(t.signal.aborted)throw new B(E.ConnectionClosed,"Request was cancelled");let w={...U,relatedRequestId:r.id};if(n&&!w.relatedTask)w.relatedTask={taskId:n};let m=w.relatedTask?.taskId??n;if(m&&$)await $.updateTaskStatus(m,"input_required");return await this.request(g,c,w)},authInfo:i?.authInfo,requestId:r.id,requestInfo:i?.requestInfo,taskId:n,taskStore:$,taskRequestedTtl:o?.ttl,closeSSEStream:i?.closeSSEStream,closeStandaloneSSEStream:i?.closeStandaloneSSEStream};Promise.resolve().then(()=>{if(o)this.assertTaskHandlerCapability(r.method)}).then(()=>v(r,b)).then(async(g)=>{if(t.signal.aborted)return;let c={result:g,jsonrpc:"2.0",id:r.id};if(n&&this._taskMessageQueue)await this._enqueueTaskMessage(n,{type:"response",message:c,timestamp:Date.now()},u?.sessionId);else await u?.send(c)},async(g)=>{if(t.signal.aborted)return;let c={jsonrpc:"2.0",id:r.id,error:{code:Number.isSafeInteger(g.code)?g.code:E.InternalError,message:g.message??"Internal error",...g.data!==void 0&&{data:g.data}}};if(n&&this._taskMessageQueue)await this._enqueueTaskMessage(n,{type:"error",message:c,timestamp:Date.now()},u?.sessionId);else await u?.send(c)}).catch((g)=>this._onerror(Error(`Failed to send response: ${g}`))).finally(()=>{if(this._requestHandlerAbortControllers.get(r.id)===t)this._requestHandlerAbortControllers.delete(r.id)})}_onprogress(r){let{progressToken:i,...v}=r.params,u=Number(i),n=this._progressHandlers.get(u);if(!n){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(r)}`));return}let t=this._responseHandlers.get(u),o=this._timeoutInfo.get(u);if(o&&t&&o.resetTimeoutOnProgress)try{this._resetTimeout(u)}catch($){this._responseHandlers.delete(u),this._progressHandlers.delete(u),this._cleanupTimeout(u),t($);return}n(v)}_onresponse(r){let i=Number(r.id),v=this._requestResolvers.get(i);if(v){if(this._requestResolvers.delete(i),et(r))v(r);else{let t=new B(r.error.code,r.error.message,r.error.data);v(t)}return}let u=this._responseHandlers.get(i);if(u===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(r)}`));return}this._responseHandlers.delete(i),this._cleanupTimeout(i);let n=!1;if(et(r)&&r.result&&typeof r.result==="object"){let t=r.result;if(t.task&&typeof t.task==="object"){let o=t.task;if(typeof o.taskId==="string")n=!0,this._taskProgressTokens.set(o.taskId,i)}}if(!n)this._progressHandlers.delete(i);if(et(r))u(r);else{let t=B.fromError(r.error.code,r.error.message,r.error.data);u(t)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(r,i,v){let{task:u}=v??{};if(!u){try{yield{type:"result",result:await this.request(r,i,v)}}catch(t){yield{type:"error",error:t instanceof B?t:new B(E.InternalError,String(t))}}return}let n;try{let t=await this.request(r,Bu,v);if(t.task)n=t.task.taskId,yield{type:"taskCreated",task:t.task};else throw new B(E.InternalError,"Task creation did not return a task");while(!0){let o=await this.getTask({taskId:n},v);if(yield{type:"taskStatus",task:o},Cr(o.status)){if(o.status==="completed")yield{type:"result",result:await this.getTaskResult({taskId:n},i,v)};else if(o.status==="failed")yield{type:"error",error:new B(E.InternalError,`Task ${n} failed`)};else if(o.status==="cancelled")yield{type:"error",error:new B(E.InternalError,`Task ${n} was cancelled`)};return}if(o.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:n},i,v)};return}let $=o.pollInterval??this._options?.defaultTaskPollInterval??1000;await new Promise((b)=>setTimeout(b,$)),v?.signal?.throwIfAborted()}}catch(t){yield{type:"error",error:t instanceof B?t:new B(E.InternalError,String(t))}}}request(r,i,v){let{relatedRequestId:u,resumptionToken:n,onresumptiontoken:t,task:o,relatedTask:$}=v??{};return new Promise((b,g)=>{let c=(f)=>{g(f)};if(!this._transport){c(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{if(this.assertCapabilityForMethod(r.method),o)this.assertTaskCapability(r.method)}catch(f){c(f);return}v?.signal?.throwIfAborted();let U=this._requestMessageId++,w={...r,jsonrpc:"2.0",id:U};if(v?.onprogress)this._progressHandlers.set(U,v.onprogress),w.params={...r.params,_meta:{...r.params?._meta||{},progressToken:U}};if(o)w.params={...w.params,task:o};if($)w.params={...w.params,_meta:{...w.params?._meta||{},[Qr]:$}};let m=(f)=>{this._responseHandlers.delete(U),this._progressHandlers.delete(U),this._cleanupTimeout(U),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:U,reason:String(f)}},{relatedRequestId:u,resumptionToken:n,onresumptiontoken:t}).catch((or)=>this._onerror(Error(`Failed to send cancellation: ${or}`)));let Ur=f instanceof B?f:new B(E.RequestTimeout,String(f));g(Ur)};this._responseHandlers.set(U,(f)=>{if(v?.signal?.aborted)return;if(f instanceof Error)return g(f);try{let Ur=Pv(i,f.result);if(!Ur.success)g(Ur.error);else b(Ur.data)}catch(Ur){g(Ur)}}),v?.signal?.addEventListener("abort",()=>{m(v?.signal?.reason)});let A=v?.timeout??Iw,ir=()=>m(B.fromError(E.RequestTimeout,"Request timed out",{timeout:A}));this._setupTimeout(U,A,v?.maxTotalTimeout,ir,v?.resetTimeoutOnProgress??!1);let R=$?.taskId;if(R){let f=(Ur)=>{let or=this._responseHandlers.get(U);if(or)or(Ur);else this._onerror(Error(`Response handler missing for side-channeled request ${U}`))};this._requestResolvers.set(U,f),this._enqueueTaskMessage(R,{type:"request",message:w,timestamp:Date.now()}).catch((Ur)=>{this._cleanupTimeout(U),g(Ur)})}else this._transport.send(w,{relatedRequestId:u,resumptionToken:n,onresumptiontoken:t}).catch((f)=>{this._cleanupTimeout(U),g(f)})})}async getTask(r,i){return this.request({method:"tasks/get",params:r},Fu,i)}async getTaskResult(r,i,v){return this.request({method:"tasks/result",params:r},i,v)}async listTasks(r,i){return this.request({method:"tasks/list",params:r},xu,i)}async cancelTask(r,i){return this.request({method:"tasks/cancel",params:r},Ge,i)}async notification(r,i){if(!this._transport)throw Error("Not connected");this.assertNotificationCapability(r.method);let v=i?.relatedTask?.taskId;if(v){let o={...r,jsonrpc:"2.0",params:{...r.params,_meta:{...r.params?._meta||{},[Qr]:i.relatedTask}}};await this._enqueueTaskMessage(v,{type:"notification",message:o,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(r.method)&&!r.params&&!i?.relatedRequestId&&!i?.relatedTask){if(this._pendingDebouncedNotifications.has(r.method))return;this._pendingDebouncedNotifications.add(r.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(r.method),!this._transport)return;let o={...r,jsonrpc:"2.0"};if(i?.relatedTask)o={...o,params:{...o.params,_meta:{...o.params?._meta||{},[Qr]:i.relatedTask}}};this._transport?.send(o,i).catch(($)=>this._onerror($))});return}let t={...r,jsonrpc:"2.0"};if(i?.relatedTask)t={...t,params:{...t.params,_meta:{...t.params?._meta||{},[Qr]:i.relatedTask}}};await this._transport.send(t,i)}setRequestHandler(r,i){let v=e6(r);this.assertRequestHandlerCapability(v),this._requestHandlers.set(v,(u,n)=>{let t=_6(r,u);return Promise.resolve(i(t,n))})}removeRequestHandler(r){this._requestHandlers.delete(r)}assertCanSetRequestHandler(r){if(this._requestHandlers.has(r))throw Error(`A request handler for ${r} already exists, which would be overridden`)}setNotificationHandler(r,i){let v=e6(r);this._notificationHandlers.set(v,(u)=>{let n=_6(r,u);return Promise.resolve(i(n))})}removeNotificationHandler(r){this._notificationHandlers.delete(r)}_cleanupTaskProgressHandler(r){let i=this._taskProgressTokens.get(r);if(i!==void 0)this._progressHandlers.delete(i),this._taskProgressTokens.delete(r)}async _enqueueTaskMessage(r,i,v){if(!this._taskStore||!this._taskMessageQueue)throw Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let u=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(r,i,v,u)}async _clearTaskQueue(r,i){if(this._taskMessageQueue){let v=await this._taskMessageQueue.dequeueAll(r,i);for(let u of v)if(u.type==="request"&&h4(u.message)){let n=u.message.id,t=this._requestResolvers.get(n);if(t)t(new B(E.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(n);else this._onerror(Error(`Resolver missing for request ${n} during task ${r} cleanup`))}}}async _waitForTaskUpdate(r,i){let v=this._options?.defaultTaskPollInterval??1000;try{let u=await this._taskStore?.getTask(r);if(u?.pollInterval)v=u.pollInterval}catch{}return new Promise((u,n)=>{if(i.aborted){n(new B(E.InvalidRequest,"Request cancelled"));return}let t=setTimeout(u,v);i.addEventListener("abort",()=>{clearTimeout(t),n(new B(E.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(r,i){let v=this._taskStore;if(!v)throw Error("No task store configured");return{createTask:async(u)=>{if(!r)throw Error("No request provided");return await v.createTask(u,r.id,{method:r.method,params:r.params},i)},getTask:async(u)=>{let n=await v.getTask(u,i);if(!n)throw new B(E.InvalidParams,"Failed to retrieve task: Task not found");return n},storeTaskResult:async(u,n,t)=>{await v.storeTaskResult(u,n,t,i);let o=await v.getTask(u,i);if(o){let $=kt.parse({method:"notifications/tasks/status",params:o});if(await this.notification($),Cr(o.status))this._cleanupTaskProgressHandler(u)}},getTaskResult:(u)=>{return v.getTaskResult(u,i)},updateTaskStatus:async(u,n,t)=>{let o=await v.getTask(u,i);if(!o)throw new B(E.InvalidParams,`Task "${u}" not found - it may have been cleaned up`);if(Cr(o.status))throw new B(E.InvalidParams,`Cannot update task "${u}" from terminal status "${o.status}" to "${n}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await v.updateTaskStatus(u,n,t,i);let $=await v.getTask(u,i);if($){let b=kt.parse({method:"notifications/tasks/status",params:$});if(await this.notification(b),Cr($.status))this._cleanupTaskProgressHandler(u)}},listTasks:(u)=>{return v.listTasks(u,i)}}}}function xe(r){return r!==null&&typeof r==="object"&&!Array.isArray(r)}function Me(r,i){let v={...r};for(let u in i){let n=u,t=i[n];if(t===void 0)continue;let o=v[n];if(xe(o)&&xe(t))v[n]={...o,...t};else v[n]=t}return v}bt();bt();var AS=((r)=>__require)(function(r){return __require.apply(this,arguments)});class Re extends I6{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(r,i){}_ensureEventSlot(r){let i=this._eventSlots.get(r);if(!i){let v=this.eventSchemas[r];if(!v)throw Error(`Unknown event: ${String(r)}`);i={listeners:[]},this._eventSlots.set(r,i);let u=v.shape.method.value;this._registeredMethods.add(u);let n=i;super.setNotificationHandler(v,(t)=>{let o=t.params;this.onEventDispatch(r,o),n.onHandler?.(o);for(let $ of[...n.listeners])$(o)})}return i}setEventHandler(r,i){let v=this._ensureEventSlot(r);if(v.onHandler&&i)console.warn(`[MCP Apps] on${String(r)} handler replaced. Use addEventListener("${String(r)}", \u2026) to add multiple listeners without replacing.`);v.onHandler=i}getEventHandler(r){return this._eventSlots.get(r)?.onHandler}addEventListener(r,i){this._ensureEventSlot(r).listeners.push(i)}removeEventListener(r,i){let v=this._eventSlots.get(r);if(!v)return;let u=v.listeners.indexOf(i);if(u!==-1)v.listeners.splice(u,1)}setRequestHandler=(r,i)=>{this._assertMethodNotRegistered(r,"setRequestHandler"),super.setRequestHandler(r,i)};setNotificationHandler=(r,i)=>{this._assertMethodNotRegistered(r,"setNotificationHandler"),super.setNotificationHandler(r,i)};warnIfRequestHandlerReplaced(r,i,v){if(i&&v)console.warn(`[MCP Apps] ${r} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(r,i)=>{let v=r.shape.method.value;this._registeredMethods.add(v),super.setRequestHandler(r,i)};_assertMethodNotRegistered(r,i){let v=r.shape.method.value;if(this._registeredMethods.has(v))throw Error(`Handler for "${v}" already registered (via ${i}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(v)}}var Uw="2026-01-26";var Dw="ui/notifications/tool-input-partial";class Ze{eventTarget;eventSource;messageListener;constructor(r=window.parent,i){this.eventTarget=r,this.eventSource=i,this.messageListener=(v)=>{if(i&&v.source!==this.eventSource){console.debug("Ignoring message from unknown source",v);return}let u=Ve.safeParse(v.data);if(u.success)console.debug("Parsed message",u.data),this.onmessage?.(u.data);else if(v.data?.jsonrpc!=="2.0")console.debug("Ignoring non-JSON-RPC message",u.error.message,v);else console.error("Failed to parse message",u.error.message,v),this.onerror?.(Error("Invalid JSON-RPC message received: "+u.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(r,i){if(r.method!==Dw)console.debug("Sending message",r);this.eventTarget.postMessage(r,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var ww=l.union([l.literal("light"),l.literal("dark")]).describe("Color theme preference for the host environment."),zt=l.union([l.literal("inline"),l.literal("fullscreen"),l.literal("pip")]).describe("Display mode for UI presentation."),kw=l.union([l.literal("--color-background-primary"),l.literal("--color-background-secondary"),l.literal("--color-background-tertiary"),l.literal("--color-background-inverse"),l.literal("--color-background-ghost"),l.literal("--color-background-info"),l.literal("--color-background-danger"),l.literal("--color-background-success"),l.literal("--color-background-warning"),l.literal("--color-background-disabled"),l.literal("--color-text-primary"),l.literal("--color-text-secondary"),l.literal("--color-text-tertiary"),l.literal("--color-text-inverse"),l.literal("--color-text-ghost"),l.literal("--color-text-info"),l.literal("--color-text-danger"),l.literal("--color-text-success"),l.literal("--color-text-warning"),l.literal("--color-text-disabled"),l.literal("--color-border-primary"),l.literal("--color-border-secondary"),l.literal("--color-border-tertiary"),l.literal("--color-border-inverse"),l.literal("--color-border-ghost"),l.literal("--color-border-info"),l.literal("--color-border-danger"),l.literal("--color-border-success"),l.literal("--color-border-warning"),l.literal("--color-border-disabled"),l.literal("--color-ring-primary"),l.literal("--color-ring-secondary"),l.literal("--color-ring-inverse"),l.literal("--color-ring-info"),l.literal("--color-ring-danger"),l.literal("--color-ring-success"),l.literal("--color-ring-warning"),l.literal("--font-sans"),l.literal("--font-mono"),l.literal("--font-weight-normal"),l.literal("--font-weight-medium"),l.literal("--font-weight-semibold"),l.literal("--font-weight-bold"),l.literal("--font-text-xs-size"),l.literal("--font-text-sm-size"),l.literal("--font-text-md-size"),l.literal("--font-text-lg-size"),l.literal("--font-heading-xs-size"),l.literal("--font-heading-sm-size"),l.literal("--font-heading-md-size"),l.literal("--font-heading-lg-size"),l.literal("--font-heading-xl-size"),l.literal("--font-heading-2xl-size"),l.literal("--font-heading-3xl-size"),l.literal("--font-text-xs-line-height"),l.literal("--font-text-sm-line-height"),l.literal("--font-text-md-line-height"),l.literal("--font-text-lg-line-height"),l.literal("--font-heading-xs-line-height"),l.literal("--font-heading-sm-line-height"),l.literal("--font-heading-md-line-height"),l.literal("--font-heading-lg-line-height"),l.literal("--font-heading-xl-line-height"),l.literal("--font-heading-2xl-line-height"),l.literal("--font-heading-3xl-line-height"),l.literal("--border-radius-xs"),l.literal("--border-radius-sm"),l.literal("--border-radius-md"),l.literal("--border-radius-lg"),l.literal("--border-radius-xl"),l.literal("--border-radius-full"),l.literal("--border-width-regular"),l.literal("--shadow-hairline"),l.literal("--shadow-sm"),l.literal("--shadow-md"),l.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),Nw=l.record(kw.describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),l.union([l.string(),l.undefined()]).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),HS=l.object({method:l.literal("ui/open-link"),params:l.object({url:l.string().describe("URL to open in the host\'s browser")})}),mw=l.object({isError:l.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),zw=l.object({isError:l.boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),Ow=l.object({isError:l.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),FS=l.object({method:l.literal("ui/notifications/sandbox-proxy-ready"),params:l.object({})}),U6=l.object({connectDomains:l.array(l.string()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP \\`connect-src\\` directive\n- Empty or omitted \u2192 no network connections (secure default)`),resourceDomains:l.array(l.string()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\\n\\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\\n- Wildcard subdomains supported: `https://*.example.com`\\n- Empty or omitted \u2192 no network resources (secure default)"),frameDomains:l.array(l.string()).optional().describe("Origins for nested iframes.\\n\\n- Maps to CSP `frame-src` directive\\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src \'none\'`)"),baseUriDomains:l.array(l.string()).optional().describe("Allowed base URIs for the document.\\n\\n- Maps to CSP `base-uri` directive\\n- Empty or omitted \u2192 only same origin allowed (`base-uri \'self\'`)")}),D6=l.object({camera:l.object({}).optional().describe("Request camera access.\\n\\nMaps to Permission Policy `camera` feature."),microphone:l.object({}).optional().describe("Request microphone access.\\n\\nMaps to Permission Policy `microphone` feature."),geolocation:l.object({}).optional().describe("Request geolocation access.\\n\\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:l.object({}).optional().describe("Request clipboard write access.\\n\\nMaps to Permission Policy `clipboard-write` feature.")}),ES=l.object({method:l.literal("ui/notifications/size-changed"),params:l.object({width:l.number().optional().describe("New width in pixels."),height:l.number().optional().describe("New height in pixels.")})}),Sw=l.object({method:l.literal("ui/notifications/tool-input"),params:l.object({arguments:l.record(l.string(),l.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),Pw=l.object({method:l.literal("ui/notifications/tool-input-partial"),params:l.object({arguments:l.record(l.string(),l.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),jw=l.object({method:l.literal("ui/notifications/tool-cancelled"),params:l.object({reason:l.string().optional().describe(\'Optional reason for the cancellation (e.g., "user action", "timeout").\')})}),Lw=l.object({fonts:l.string().optional()}),Aw=l.object({variables:Nw.optional().describe("CSS variables for theming the app."),css:Lw.optional().describe("CSS blocks that apps can inject.")}),Jw=l.object({method:l.literal("ui/resource-teardown"),params:l.object({})}),TS=l.record(l.string(),l.unknown()),Ye=l.object({text:l.object({}).optional().describe("Host supports text content blocks."),image:l.object({}).optional().describe("Host supports image content blocks."),audio:l.object({}).optional().describe("Host supports audio content blocks."),resource:l.object({}).optional().describe("Host supports resource content blocks."),resourceLink:l.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:l.object({}).optional().describe("Host supports structured content.")}),xS=l.object({method:l.literal("ui/notifications/request-teardown"),params:l.object({}).optional()}),Ww=l.object({experimental:l.object({}).optional().describe("Experimental features (structure TBD)."),openLinks:l.object({}).optional().describe("Host supports opening external URLs."),downloadFile:l.object({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:l.object({listChanged:l.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:l.object({listChanged:l.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:l.object({}).optional().describe("Host accepts log messages."),sandbox:l.object({permissions:D6.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:U6.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Ye.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model\'s context for future turns."),message:Ye.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:l.object({tools:l.object({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Vw=l.object({experimental:l.object({}).optional().describe("Experimental features (structure TBD)."),tools:l.object({listChanged:l.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:l.array(zt).optional().describe("Display modes the app supports.")}),MS=l.object({method:l.literal("ui/notifications/initialized"),params:l.object({}).optional()}),YS=l.object({csp:U6.optional().describe("Content Security Policy configuration for UI resources."),permissions:D6.optional().describe("Sandbox permissions requested by the UI resource."),domain:l.string().optional().describe(`Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., \\`{hash}.claudemcpcontent.com\\`)\n- URL-derived subdomains (e.g., \\`www-example-com.oaiusercontent.com\\`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:l.boolean().optional().describe(`Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts\' defaults may vary.\n\n- \\`true\\`: request visible border + background\n- \\`false\\`: request no visible border + background\n- omitted: host decides border`)}),qS=l.object({method:l.literal("ui/request-display-mode"),params:l.object({mode:zt.describe("The display mode being requested.")})}),Gw=l.object({mode:zt.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),Kw=l.union([l.literal("model"),l.literal("app")]).describe("Tool visibility scope - who can access the tool."),XS=l.object({resourceUri:l.string().optional(),visibility:l.array(Kw).optional().describe(`Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only`),csp:l.never().optional(),permissions:l.never().optional()}),RS=l.object({mimeTypes:l.array(l.string()).optional().describe(\'Array of supported MIME types for UI resources.\\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.\')}),ZS=l.object({method:l.literal("ui/download-file"),params:l.object({contents:l.array(l.union([o6,$6])).describe("Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),QS=l.object({method:l.literal("ui/message"),params:l.object({role:l.literal("user").describe(\'Message role, currently only "user" is supported.\'),content:l.array(pn).describe("Message content blocks (text, image, etc.).")})}),CS=l.object({method:l.literal("ui/notifications/sandbox-resource-ready"),params:l.object({html:l.string().describe("HTML content to load into the inner iframe."),sandbox:l.string().optional().describe("Optional override for the inner iframe\'s sandbox attribute."),csp:U6.optional().describe("CSP configuration from resource metadata."),permissions:D6.optional().describe("Sandbox permissions from resource metadata.")})}),Bw=l.object({method:l.literal("ui/notifications/tool-result"),params:an.describe("Standard MCP tool execution result.")}),Qe=l.object({toolInfo:l.object({id:dn.optional().describe("JSON-RPC id of the tools/call request."),tool:Yu.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:ww.optional().describe("Current color theme preference."),styles:Aw.optional().describe("Style configuration for theming the app."),displayMode:zt.optional().describe("How the UI is currently displayed."),availableDisplayModes:l.array(zt).optional().describe("Display modes the host supports."),containerDimensions:l.union([l.object({height:l.number().describe("Fixed container height in pixels.")}),l.object({maxHeight:l.union([l.number(),l.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(l.union([l.object({width:l.number().describe("Fixed container width in pixels.")}),l.object({maxWidth:l.union([l.number(),l.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:l.string().optional().describe("User\'s language and region preference in BCP 47 format."),timeZone:l.string().optional().describe("User\'s timezone in IANA format."),userAgent:l.string().optional().describe("Host application identifier."),platform:l.union([l.literal("web"),l.literal("desktop"),l.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:l.object({touch:l.boolean().optional().describe("Whether the device supports touch input."),hover:l.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:l.object({top:l.number().describe("Top safe area inset in pixels."),right:l.number().describe("Right safe area inset in pixels."),bottom:l.number().describe("Bottom safe area inset in pixels."),left:l.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),Hw=l.object({method:l.literal("ui/notifications/host-context-changed"),params:Qe.describe("Partial context update containing only changed fields.")}),fS=l.object({method:l.literal("ui/update-model-context"),params:l.object({content:l.array(pn).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:l.record(l.string(),l.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),dS=l.object({method:l.literal("ui/initialize"),params:l.object({appInfo:It.describe("App identification (name and version)."),appCapabilities:Vw.describe("Features and capabilities this app provides."),protocolVersion:l.string().describe("Protocol version this app supports.")})}),Fw=l.object({protocolVersion:l.string().describe(\'Negotiated protocol version string (e.g., "2025-11-21").\'),hostInfo:It.describe("Host application identification and version."),hostCapabilities:Ww.describe("Features and capabilities provided by the host."),hostContext:Qe.describe("Rich context about the host environment.")}).passthrough(),Ew={target:"draft-2020-12"};async function qe(r,i){let v=r["~standard"];if(v.jsonSchema)return v.jsonSchema[i](Ew);if(v.vendor==="zod"){let{z:u}=await Promise.resolve().then(() => (bt(),d4));return u.toJSONSchema(r,{io:i})}throw Error(`Schema (vendor: ${v.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Xe(r,i,v=""){let u=await r["~standard"].validate(i);if(u.issues){let n=u.issues.map((t)=>{let o=t.path?.map(($)=>typeof $==="object"?$.key:$).join(".");return o?`${o}: ${t.message}`:t.message}).join("; ");throw Error(v+n)}return u.value}function Ce(r){let i=document.documentElement;i.setAttribute("data-theme",r),i.style.colorScheme=r}function fe(r){if(document.getElementById("__mcp-host-fonts"))return;let i=document.createElement("style");i.id="__mcp-host-fonts",i.textContent=r,document.head.appendChild(i)}class qu extends Re{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(r){if(this._initializedSent)return;let i=`[ext-apps] App.${r}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(i);console.warn(`${i}. This will throw in a future release.`)}eventSchemas={toolinput:Sw,toolinputpartial:Pw,toolresult:Bw,toolcancelled:jw,hostcontextchanged:Hw};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(r){if(!qu.ONE_SHOT_EVENTS.has(r)||this._everHadListener.has(r))return;if(this._everHadListener.add(r),!this._initializedSent)return;let i=`[ext-apps] "${String(r)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(i);console.warn(i)}setEventHandler(r,i){if(i)this._assertHandlerTiming(r);super.setEventHandler(r,i)}addEventListener(r,i){this._assertHandlerTiming(r),super.addEventListener(r,i)}onEventDispatch(r,i){if(r==="hostcontextchanged")this._hostContext={...this._hostContext,...i}}constructor(r,i={},v={autoResize:!0}){super(v);if(this._appInfo=r,this._capabilities=i,this.options=v,!v.allowUnsafeEval)l.config({jitless:!0});this.setRequestHandler(yn,(u)=>{return console.log("Received ping:",u.params),{}}),this.setEventHandler("hostcontextchanged",void 0)}registerCapabilities(r){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._capabilities=Me(this._capabilities,r)}registerTool(r,i,v){if(this._registeredTools[r])throw Error(`Tool ${r} is already registered`);let u=this,n=()=>{if(u._initializedSent&&u._capabilities.tools?.listChanged)u.sendToolListChanged()},t=i.inputSchema!==void 0,o={title:i.title,description:i.description,inputSchema:i.inputSchema,outputSchema:i.outputSchema,annotations:i.annotations,_meta:i._meta,enabled:!0,enable(){this.enabled=!0,n()},disable(){this.enabled=!1,n()},update($){Object.assign(this,$),n()},remove(){if(u._registeredTools[r]!==o)return;delete u._registeredTools[r],n()},handler:async($,b)=>{if(!o.enabled)throw Error(`Tool ${r} is disabled`);let g;if(t){let c=o.inputSchema,U=c?await Xe(c,$??{},`Invalid input for tool ${r}: `):$??{};g=await v(U,b)}else g=await v(b);if(o.outputSchema&&!g.isError)g.structuredContent=await Xe(o.outputSchema,g.structuredContent,`Invalid output for tool ${r}: `);return g}};if(this._registeredTools[r]=o,!this._capabilities.tools&&!this.transport)this.registerCapabilities({tools:{listChanged:!0}});return this.ensureToolHandlersInitialized(),n(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){if(this._toolHandlersInitialized)return;this._toolHandlersInitialized=!0,this.oncalltool=async(r,i)=>{let v=this._registeredTools[r.name];if(!v)throw Error(`Tool ${r.name} not found`);return v.handler(r.arguments,i)},this.onlisttools=async(r,i)=>{return{tools:await Promise.all(Object.entries(this._registeredTools).filter(([v,u])=>u.enabled).map(async([v,u])=>{let n={name:v,title:u.title,description:u.description,inputSchema:u.inputSchema?await qe(u.inputSchema,"input"):{type:"object",properties:{}}};if(u.outputSchema)n.outputSchema=await qe(u.outputSchema,"output");if(u.annotations)n.annotations=u.annotations;if(u._meta)n._meta=u._meta;return n}))}}}async sendToolListChanged(r={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:r})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(r){this.setEventHandler("toolinput",r)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(r){this.setEventHandler("toolinputpartial",r)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(r){this.setEventHandler("toolresult",r)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(r){this.setEventHandler("toolcancelled",r)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(r){this.setEventHandler("hostcontextchanged",r)}_onteardown;get onteardown(){return this._onteardown}set onteardown(r){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,r),this._onteardown=r,this.replaceRequestHandler(Jw,(i,v)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(i.params,v)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(r){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,r),this._oncalltool=r,this.replaceRequestHandler(l6,(i,v)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(i.params,v)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(r){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,r),this._onlisttools=r,this.replaceRequestHandler(g6,(i,v)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(i.params,v)})}assertCapabilityForMethod(r){switch(r){case"sampling/createMessage":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${r})`);break}}assertRequestHandlerCapability(r){switch(r){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${r})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${r} registered`)}}assertNotificationCapability(r){}assertTaskCapability(r){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(r){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(r,i){if(this._assertInitialized("callServerTool"),typeof r==="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${r}"). Did you mean: callServerTool({ name: "${r}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:r},an,{onprogress:()=>{},resetTimeoutOnProgress:!0,...i})}async readServerResource(r,i){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:r},i6,i)}async listServerResources(r,i){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:r},r6,i)}async createSamplingMessage(r,i){this._assertInitialized("createSamplingMessage");let v=r.tools?c6:b6;return await this.request({method:"sampling/createMessage",params:r},v,i)}sendMessage(r,i){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:r},Ow,i)}sendLog(r){return this.notification({method:"notifications/message",params:r})}updateModelContext(r,i){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:r},Vu,i)}openLink(r,i){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:r},mw,i)}sendOpenLink=this.openLink;downloadFile(r,i){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:r},zw,i)}requestTeardown(r={}){return this.notification({method:"ui/notifications/request-teardown",params:r})}requestDisplayMode(r,i){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:r},Gw,i)}sendSizeChanged(r){return this.notification({method:"ui/notifications/size-changed",params:r})}setupSizeChangedNotifications(){let r=!1,i=0,v=0,u=()=>{if(r)return;r=!0,requestAnimationFrame(()=>{r=!1;let t=document.documentElement,o=t.style.height;t.style.height="max-content";let $=Math.ceil(t.getBoundingClientRect().height);t.style.height=o;let b=Math.ceil(window.innerWidth);if(b!==i||$!==v)i=b,v=$,this.sendSizeChanged({width:b,height:$})})};u();let n=new ResizeObserver(u);return n.observe(document.documentElement),n.observe(document.body),()=>n.disconnect()}async connect(r=new Ze(window.parent,window.parent),i){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1,await super.connect(r);try{let v=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:Uw}},Fw,i);if(v===void 0)throw Error(`Server sent invalid initialize result: ${v}`);if(this._hostCapabilities=v.hostCapabilities,this._hostInfo=v.hostInfo,this._hostContext=v.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize)this.setupSizeChangedNotifications()}catch(v){throw this.close(),v}}}window.__bdMcp={App:qu,applyDocumentTheme:Ce,applyHostFonts:fe};})();\n';
1039
+ }
1040
+ });
1041
+
1042
+ // ../shared/src/mcp/preview-html.ts
1043
+ function cssFromRegistryVars(cssVars) {
1044
+ const block = (vars) => Object.entries(vars ?? {}).map(([k, v]) => ` --${k.replace(/^--/, "")}: ${v};`).join("\n");
1045
+ const root = block({ ...cssVars.theme, ...cssVars.light });
1046
+ const dark = block(cssVars.dark);
1047
+ return [`:root {
1048
+ ${root}
1049
+ }`, dark ? `.dark {
1050
+ ${dark}
1051
+ }` : ""].filter(Boolean).join("\n");
1052
+ }
1053
+ function extractFontCss(rawGlobalsCss) {
1054
+ const decls = rawGlobalsCss.match(/--font-(?:sans|serif|mono)\s*:[^;]+;/g) ?? [];
1055
+ if (!decls.length) {
1056
+ const bodyRule = rawGlobalsCss.match(/(?:^|[}\s,])body\s*(?:,[^{]*)?\{[^}]*?font-family\s*:\s*([^;}]+)/);
1057
+ const stack = bodyRule?.[1]?.trim() ?? rawGlobalsCss.match(/font-family\s*:\s*([^;}]+)/)?.[1]?.trim();
1058
+ if (stack) decls.push(`--font-sans: ${stack};`);
1059
+ }
1060
+ const families = /* @__PURE__ */ new Set();
1061
+ for (const decl of decls) {
1062
+ const value = decl.replace(/^--font-(?:sans|serif|mono)\s*:\s*/, "").replace(/;$/, "");
1063
+ for (const m of value.matchAll(/["']([^"']+)["']/g)) addFontFamily(families, m[1]);
1064
+ if (!/["']/.test(value)) addFontFamily(families, value.split(",")[0] ?? "");
1065
+ }
1066
+ const fontImport = families.size ? `@import url("https://fonts.googleapis.com/css2?${[...families].map((f) => `family=${encodeURIComponent(f).replace(/%20/g, "+")}:wght@400;500;600;700`).join("&")}&display=swap");` : "";
1067
+ const fontVars = decls.length ? `:root {
1068
+ ${decls.join("\n ")}
1069
+ }` : "";
1070
+ return { fontVars, fontImport };
1071
+ }
1072
+ function addFontFamily(families, raw) {
1073
+ const family = raw.trim().replace(/^["']|["']$/g, "");
1074
+ if (!family || family.startsWith("var(") || SYSTEM_FONT_FAMILIES.has(family.toLowerCase())) return;
1075
+ families.add(family);
1076
+ }
1077
+ function componentRadiusCss(files) {
1078
+ const radiusFor = (pattern) => {
1079
+ const file = files.find((f) => f.path && pattern.test(f.path));
1080
+ if (!file?.content) return null;
1081
+ const m = file.content.match(/rounded(?:-(?:none|sm|md|lg|xl|2xl|3xl|full))?(?=[\s"'])/);
1082
+ return m ? RADIUS_CLASS_TO_CSS[m[0]] ?? null : null;
1083
+ };
1084
+ const rules = [];
1085
+ const button = radiusFor(/(^|\/)button\.(tsx|jsx)$/);
1086
+ if (button) rules.push(`.bd-btn, .bd-view { border-radius: ${button}; }`);
1087
+ const input = radiusFor(/(^|\/)input\.(tsx|jsx)$/);
1088
+ if (input) rules.push(`.bd-input { border-radius: ${input}; }`);
1089
+ const card = radiusFor(/(^|\/)card\.(tsx|jsx)$/);
1090
+ if (card) rules.push(`.bd-card { border-radius: ${card}; }`);
1091
+ return rules.join("\n");
1092
+ }
1093
+ function extractRadiusScaleCss(rawGlobalsCss) {
1094
+ const decls = rawGlobalsCss.match(/--radius-[a-z0-9]+\s*:[^;]+;/g) ?? [];
1095
+ return decls.length ? `:root {
1096
+ ${decls.join("\n ")}
1097
+ }` : "";
1098
+ }
1099
+ function dsVignetteHtml(name, swatches) {
1100
+ const nm = escapeHtml(name);
1101
+ return `<div class="bd-app">
1102
+ <div class="bd-appbar"><span class="bd-logo">${nm}</span><span class="bd-badge">Live preview</span></div>
1103
+ <div class="bd-hero-card">
1104
+ <h3 class="bd-h">Build something in ${nm}.</h3>
1105
+ <p class="bd-p">A starter screen styled entirely with this system's tokens: type, color, radius and depth, ready to vibecode on.</p>
1106
+ <div class="bd-row"><button class="bd-btn bd-btn-primary">Get started</button><button class="bd-btn bd-btn-outline">Learn more</button></div>
1107
+ </div>
1108
+ <div class="bd-grid">
1109
+ <div class="bd-stat"><span class="bd-stat-n">2,481</span><span class="bd-stat-l">Active users</span></div>
1110
+ <div class="bd-stat"><span class="bd-stat-n">98%</span><span class="bd-stat-l">Uptime</span></div>
1111
+ <div class="bd-stat"><span class="bd-stat-n">4.9</span><span class="bd-stat-l">Rating</span></div>
1112
+ </div>
1113
+ <div class="bd-list">
1114
+ <div class="bd-li"><span class="bd-dot"></span><span class="bd-grow">New project created</span><span class="bd-pill">now</span></div>
1115
+ <div class="bd-li"><span class="bd-dot"></span><span class="bd-grow">Components installed</span><span class="bd-pill">87</span></div>
1116
+ <div class="bd-li"><span class="bd-dot"></span><span class="bd-grow">Theme applied</span><span class="bd-badge">done</span></div>
1117
+ </div>
1118
+ <div class="bd-swatches">${swatches}</div>
1119
+ </div>`;
1120
+ }
1121
+ function previewBodyHtml(d) {
1122
+ const swatches = SWATCH_TOKENS.map(
1123
+ (t) => `<div class="bd-swatch" style="background: var(--${t}, transparent)" title="--${t}"></div>`
1124
+ ).join("");
1125
+ return `
1126
+ ${dsVignetteHtml(d.name, swatches)}
1127
+ ${d.viewUrl ? `<div class="bd-foot"><div class="bd-links"></div><a class="bd-view" href="${escapeHtml(d.viewUrl)}" target="_blank" rel="noopener">View in Better Design</a></div>` : ""}`;
1128
+ }
1129
+ function sanitizeCss(css) {
1130
+ return css.replace(/<\/style/gi, "<\\/style");
1131
+ }
1132
+ function escapeHtml(s) {
1133
+ return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1134
+ }
1135
+ function buildDsPreviewDocument(d) {
1136
+ return `<!DOCTYPE html>
1137
+ <html lang="en">
1138
+ <head>
1139
+ <meta charset="utf-8">
1140
+ <meta name="viewport" content="width=device-width, initial-scale=1">
1141
+ <title>${escapeHtml(d.name)} preview</title>
1142
+ <style>
1143
+ ${sanitizeCss(d.tokensCss)}
1144
+ body { margin: 0; padding: 24px; background: var(--background, oklch(0.98 0 0)); display: flex; justify-content: center; }
1145
+ ${PREVIEW_BASE_CSS}
1146
+ </style>
1147
+ </head>
1148
+ <body>
1149
+ ${previewBodyHtml(d)}
1150
+ </body>
1151
+ </html>`;
1152
+ }
1153
+ var SYSTEM_FONT_FAMILIES, RADIUS_CLASS_TO_CSS, PREVIEW_BASE_CSS, SWATCH_TOKENS, DS_PREVIEW_WIDGET_URI, DS_PREVIEW_WIDGET_HTML;
1154
+ var init_preview_html = __esm({
1155
+ "../shared/src/mcp/preview-html.ts"() {
1156
+ "use strict";
1157
+ init_preview_widget_sdk_generated();
1158
+ SYSTEM_FONT_FAMILIES = /* @__PURE__ */ new Set([
1159
+ "arial",
1160
+ "georgia",
1161
+ "helvetica",
1162
+ "menlo",
1163
+ "monaco",
1164
+ "sans-serif",
1165
+ "serif",
1166
+ "sfmono-regular",
1167
+ "system-ui",
1168
+ "times new roman",
1169
+ "ui-monospace",
1170
+ "ui-sans-serif",
1171
+ "ui-serif"
1172
+ ]);
1173
+ RADIUS_CLASS_TO_CSS = {
1174
+ "rounded-none": "0",
1175
+ "rounded-sm": "var(--radius-sm, calc(var(--radius, 0.5rem) - 4px))",
1176
+ "rounded-md": "var(--radius-md, calc(var(--radius, 0.5rem) - 2px))",
1177
+ "rounded-lg": "var(--radius-lg, var(--radius, 0.5rem))",
1178
+ "rounded-xl": "var(--radius-xl, calc(var(--radius, 0.5rem) + 4px))",
1179
+ "rounded-2xl": "var(--radius-2xl, 1rem)",
1180
+ "rounded-3xl": "var(--radius-3xl, 1.5rem)",
1181
+ rounded: "0.25rem",
1182
+ "rounded-full": "9999px"
1183
+ };
1184
+ PREVIEW_BASE_CSS = `
1185
+ .bd-preview { background: var(--background, oklch(1 0 0)); color: var(--foreground, oklch(0.2 0 0)); font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); border: 1px solid var(--border, oklch(0.9 0 0)); border-radius: calc(var(--radius, 0.5rem) + 4px); padding: 20px; max-width: 720px; box-shadow: var(--shadow-md, var(--shadow, none)); }
1186
+ .bd-view { box-shadow: var(--shadow-sm, var(--shadow-xs, none)); }
1187
+ .bd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
1188
+ .bd-name { font-family: var(--font-serif, var(--font-sans, ui-sans-serif)); font-size: 22px; font-weight: 600; margin: 0; }
1189
+ .bd-sub { color: var(--muted-foreground, oklch(0.55 0 0)); font-size: 12px; }
1190
+ .bd-swatches { display: flex; gap: 6px; margin: 12px 0; }
1191
+ .bd-swatch { width: 34px; height: 34px; border-radius: 9999px; border: 1px solid var(--border, oklch(0.9 0 0)); }
1192
+ .bd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
1193
+ .bd-btn { font: inherit; font-size: 14px; font-weight: 500; padding: 8px 16px; border-radius: var(--radius-md, calc(var(--radius, 0.5rem) - 2px)); border: 1px solid transparent; cursor: pointer; }
1194
+ .bd-btn-primary { background: var(--primary, oklch(0.3 0 0)); color: var(--primary-foreground, oklch(1 0 0)); box-shadow: var(--shadow-sm, var(--shadow-xs, var(--shadow, none))); }
1195
+ .bd-btn-secondary { background: var(--secondary, oklch(0.95 0 0)); color: var(--secondary-foreground, oklch(0.25 0 0)); box-shadow: var(--shadow-xs, var(--shadow-2xs, none)); }
1196
+ .bd-btn-outline { background: transparent; color: var(--foreground, oklch(0.2 0 0)); border-color: var(--border, oklch(0.85 0 0)); box-shadow: var(--shadow-2xs, none); }
1197
+ .bd-input { font: inherit; font-size: 14px; padding: 8px 12px; border-radius: var(--radius-md, calc(var(--radius, 0.5rem) - 2px)); border: 1px solid var(--input, var(--border, oklch(0.85 0 0))); background: var(--background, oklch(1 0 0)); color: var(--foreground, oklch(0.2 0 0)); min-width: 180px; box-shadow: var(--shadow-2xs, none); }
1198
+ .bd-input:focus { outline: 2px solid var(--ring, var(--primary, oklch(0.3 0 0))); outline-offset: 1px; }
1199
+ .bd-card { background: var(--card, var(--background, oklch(1 0 0))); color: var(--card-foreground, var(--foreground, oklch(0.2 0 0))); border: 1px solid var(--border, oklch(0.9 0 0)); border-radius: var(--radius-xl, calc(var(--radius, 0.5rem) + 4px)); padding: 14px 16px; margin: 12px 0; box-shadow: var(--shadow-sm, var(--shadow-xs, none)); }
1200
+ .bd-card h3 { font-family: var(--font-serif, var(--font-sans, ui-sans-serif)); margin: 0 0 4px; font-size: 16px; }
1201
+ .bd-card p { margin: 0; font-size: 13px; color: var(--muted-foreground, oklch(0.55 0 0)); }
1202
+ .bd-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--accent, var(--secondary, oklch(0.95 0 0))); color: var(--accent-foreground, var(--secondary-foreground, oklch(0.25 0 0))); }
1203
+ .bd-mono { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; color: var(--muted-foreground, oklch(0.55 0 0)); }
1204
+ .bd-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; border-top: 1px solid var(--border, oklch(0.92 0 0)); padding-top: 12px; }
1205
+ .bd-view { font-size: 13px; font-weight: 600; text-decoration: none; padding: 7px 14px; border-radius: var(--radius-md, calc(var(--radius, 0.5rem) - 2px)); background: var(--primary, oklch(0.3 0 0)); color: var(--primary-foreground, oklch(1 0 0)); }
1206
+ .bd-links { font-size: 12px; display: flex; gap: 12px; }
1207
+ .bd-links a { color: var(--muted-foreground, oklch(0.5 0 0)); }
1208
+ .bd-progress { font-size: 13px; color: var(--muted-foreground, oklch(0.5 0 0)); margin: 10px 0; }
1209
+ .bd-app { display: flex; flex-direction: column; gap: 12px; }
1210
+ .bd-appbar { display: flex; align-items: center; justify-content: space-between; }
1211
+ .bd-logo { font-family: var(--font-serif, var(--font-sans, ui-sans-serif)); font-weight: 700; font-size: 16px; color: var(--foreground, oklch(0.2 0 0)); }
1212
+ .bd-hero-card { background: var(--card, var(--background, oklch(1 0 0))); color: var(--card-foreground, var(--foreground, oklch(0.2 0 0))); border: 1px solid var(--border, oklch(0.9 0 0)); border-radius: var(--radius-xl, calc(var(--radius, 0.5rem) + 4px)); padding: 16px 18px; box-shadow: var(--shadow-sm, var(--shadow-xs, none)); }
1213
+ .bd-h { font-family: var(--font-serif, var(--font-sans, ui-sans-serif)); font-size: 20px; font-weight: 600; margin: 0 0 6px; }
1214
+ .bd-p { margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: var(--muted-foreground, oklch(0.55 0 0)); max-width: 48ch; }
1215
+ .bd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
1216
+ .bd-stat { background: var(--card, var(--background, oklch(1 0 0))); border: 1px solid var(--border, oklch(0.9 0 0)); border-radius: var(--radius-lg, var(--radius, 0.5rem)); padding: 12px 14px; }
1217
+ .bd-stat-n { display: block; font-size: 20px; font-weight: 700; color: var(--foreground, oklch(0.2 0 0)); font-family: var(--font-serif, var(--font-sans, ui-sans-serif)); }
1218
+ .bd-stat-l { font-size: 11px; color: var(--muted-foreground, oklch(0.55 0 0)); }
1219
+ .bd-list { background: var(--card, var(--background, oklch(1 0 0))); border: 1px solid var(--border, oklch(0.9 0 0)); border-radius: var(--radius-lg, var(--radius, 0.5rem)); overflow: hidden; }
1220
+ .bd-li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; color: var(--foreground, oklch(0.2 0 0)); border-top: 1px solid var(--border, oklch(0.93 0 0)); }
1221
+ .bd-li:first-child { border-top: 0; }
1222
+ .bd-grow { flex: 1; }
1223
+ .bd-dot { width: 8px; height: 8px; border-radius: 9999px; background: var(--primary, oklch(0.3 0 0)); flex: none; }
1224
+ .bd-pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--secondary, oklch(0.95 0 0)); color: var(--secondary-foreground, oklch(0.25 0 0)); }
1225
+ `;
1226
+ SWATCH_TOKENS = ["background", "foreground", "primary", "secondary", "accent", "muted", "border"];
1227
+ DS_PREVIEW_WIDGET_URI = "ui://widget/ds-preview-v5.html";
1228
+ DS_PREVIEW_WIDGET_HTML = `<!DOCTYPE html>
1229
+ <html lang="en">
1230
+ <head>
1231
+ <meta charset="utf-8">
1232
+ <style>
1233
+ html, body { margin: 0; padding: 0; background: transparent; }
1234
+ ${PREVIEW_BASE_CSS}
1235
+ .bd-card-shell { background: var(--background, oklch(1 0 0)); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 3px oklch(0 0 0 / 0.08), 0 8px 24px oklch(0 0 0 / 0.06); }
1236
+ .bd-app { padding: 16px; }
1237
+ .bd-cta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--card, var(--background, oklch(1 0 0))); border-top: 1px solid var(--border, oklch(0.92 0 0)); }
1238
+ .bd-cta-name { font-weight: 600; font-size: 14px; color: var(--foreground, oklch(0.2 0 0)); font-family: var(--font-serif, var(--font-sans, ui-sans-serif)); }
1239
+ .bd-cta { font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--primary, oklch(0.45 0 0)); display: inline-flex; align-items: center; gap: 6px; }
1240
+ .bd-cta:hover { opacity: 0.7; }
1241
+ .bd-progress { padding: 6px 16px 12px; }
1242
+ </style>
1243
+ <style id="bd-tokens"></style>
1244
+ </head>
1245
+ <body>
1246
+ <div id="bd-root"></div>
1247
+ <script>${PREVIEW_WIDGET_SDK_JS.replace(/<\/script/gi, "<\\/script")}</script>
1248
+ <script>
1249
+ (function () {
1250
+ var root = document.getElementById("bd-root");
1251
+ var tokens = document.getElementById("bd-tokens");
1252
+ var SWATCHES = ${JSON.stringify(SWATCH_TOKENS)};
1253
+
1254
+ function esc(s) {
1255
+ return String(s == null ? "" : s).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1256
+ }
1257
+
1258
+ // Token-rendered app vignette (mirrors dsVignetteHtml in preview-html.ts).
1259
+ function fallbackBody(out) {
1260
+ var swatches = SWATCHES.map(function (t) {
1261
+ return '<div class="bd-swatch" style="background: var(--' + t + ', transparent)" title="--' + t + '"></div>';
1262
+ }).join("");
1263
+ var nm = esc(out.name || "Design system");
1264
+ return '<div class="bd-app">' +
1265
+ '<div class="bd-appbar"><span class="bd-logo">' + nm + '</span><span class="bd-badge">Live preview</span></div>' +
1266
+ '<div class="bd-hero-card">' +
1267
+ '<h3 class="bd-h">Build something in ' + nm + '.</h3>' +
1268
+ '<p class="bd-p">A starter screen styled entirely with this system\\'s tokens: type, color, radius and depth, ready to vibecode on.</p>' +
1269
+ '<div class="bd-row"><button class="bd-btn bd-btn-primary">Get started</button><button class="bd-btn bd-btn-outline">Learn more</button></div>' +
1270
+ '</div>' +
1271
+ '<div class="bd-grid">' +
1272
+ '<div class="bd-stat"><span class="bd-stat-n">2,481</span><span class="bd-stat-l">Active users</span></div>' +
1273
+ '<div class="bd-stat"><span class="bd-stat-n">98%</span><span class="bd-stat-l">Uptime</span></div>' +
1274
+ '<div class="bd-stat"><span class="bd-stat-n">4.9</span><span class="bd-stat-l">Rating</span></div>' +
1275
+ '</div>' +
1276
+ '<div class="bd-list">' +
1277
+ '<div class="bd-li"><span class="bd-dot"></span><span class="bd-grow">New project created</span><span class="bd-pill">now</span></div>' +
1278
+ '<div class="bd-li"><span class="bd-dot"></span><span class="bd-grow">Components installed</span><span class="bd-pill">87</span></div>' +
1279
+ '<div class="bd-li"><span class="bd-dot"></span><span class="bd-grow">Theme applied</span><span class="bd-badge">done</span></div>' +
1280
+ '</div>' +
1281
+ '<div class="bd-swatches">' + swatches + '</div>' +
1282
+ '</div>';
1283
+ }
1284
+
1285
+ function render(out) {
1286
+ if (!out) { root.innerHTML = ""; return; }
1287
+ tokens.textContent = out.tokensCss || "";
1288
+ var generating = out.status && out.status !== "completed";
1289
+ var progress = generating
1290
+ ? '<div class="bd-progress bd-mono">Generating' + (out.step ? ": " + esc(out.step) : "...") + "</div>"
1291
+ : "";
1292
+ // Hero = token-rendered mini-UI of the system (pure CSS from the DS tokens;
1293
+ // no iframe, since Claude restricts cross-origin frameDomains). CTA links to
1294
+ // the durable project page bottom-right, mirroring the requested card.
1295
+ var hero = fallbackBody(out);
1296
+ var cta = out.viewUrl
1297
+ ? '<div class="bd-cta-row"><span class="bd-cta-name">' + esc(out.name || "Design system") + '</span>' +
1298
+ '<a class="bd-cta" href="' + esc(out.viewUrl) + '" target="_blank" rel="noopener">Preview Project &rsaquo;</a></div>'
1299
+ : "";
1300
+ root.innerHTML = '<div class="bd-card-shell">' + hero + progress + cta + "</div>";
1301
+ }
1302
+
1303
+ // ChatGPT bridge (OpenAI Apps): render immediately + on globals update.
1304
+ if (window.openai) {
1305
+ render(window.openai.toolOutput);
1306
+ window.addEventListener("openai:set_globals", function (event) {
1307
+ var g = event && event.detail && event.detail.globals;
1308
+ render((g && g.toolOutput) || (window.openai && window.openai.toolOutput));
1309
+ });
1310
+ }
1311
+
1312
+ // MCP Apps bridge (Claude + any compliant host): the SDK is INLINED above as
1313
+ // window.__bdMcp (bundled IIFE), so there is no runtime CDN import for the
1314
+ // sandbox CSP to block.
1315
+ try {
1316
+ var mcp = window.__bdMcp;
1317
+ if (mcp && mcp.App) {
1318
+ var app = new mcp.App({ name: "Better Design Preview", version: "1.0.0" });
1319
+ app.ontoolresult = function (params) {
1320
+ var sc = params && (params.structuredContent || (params.result && params.result.structuredContent));
1321
+ if (sc) render(sc);
1322
+ };
1323
+ app.onhostcontextchanged = function (ctx) {
1324
+ try {
1325
+ if (ctx && ctx.theme && mcp.applyDocumentTheme) mcp.applyDocumentTheme(ctx.theme);
1326
+ if (ctx && ctx.styles && ctx.styles.css && ctx.styles.css.fonts && mcp.applyHostFonts) mcp.applyHostFonts(ctx.styles.css.fonts);
1327
+ } catch (e) {}
1328
+ };
1329
+ if (app.connect) app.connect().catch(function () {});
1330
+ }
1331
+ } catch (e) { /* host without MCP Apps support; OpenAI bridge or static text covers it */ }
1332
+ })();
1333
+ </script>
1334
+ </body>
1335
+ </html>`;
1336
+ }
1337
+ });
1338
+
1339
+ // ../shared/src/foundational-docs/topic-utils.ts
1340
+ function normalizePrincipleTopic(value) {
1341
+ return value.trim().toLowerCase().replace(/^principle-/, "").replace(/&/g, "and").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
1342
+ }
1343
+ var init_topic_utils = __esm({
1344
+ "../shared/src/foundational-docs/topic-utils.ts"() {
1345
+ "use strict";
1346
+ }
1347
+ });
1348
+
1349
+ // ../shared/src/mcp/tools.ts
1350
+ import { createHash } from "crypto";
1351
+ import { z } from "zod";
1352
+ function tokensCssFromRegistry(json) {
1353
+ const files = json.files ?? [];
1354
+ const vars = json.cssVars ? cssFromRegistryVars(json.cssVars) : "";
1355
+ const globals = files.find((f) => f.path?.endsWith("globals.css"))?.content ?? json.meta?.globalsCss ?? "";
1356
+ const { fontVars, fontImport } = extractFontCss(globals);
1357
+ return [
1358
+ fontImport,
1359
+ vars,
1360
+ fontVars,
1361
+ extractRadiusScaleCss(globals),
1362
+ componentRadiusCss(files)
1363
+ ].filter(Boolean).join("\n");
1364
+ }
1365
+ async function fetchWithTimeout(url, timeoutMs = ICONIFY_FETCH_TIMEOUT_MS) {
1366
+ const controller = new AbortController();
1367
+ const id = setTimeout(() => controller.abort(), timeoutMs);
1368
+ try {
1369
+ return await globalThis.fetch(url, { signal: controller.signal });
1370
+ } finally {
1371
+ clearTimeout(id);
1372
+ }
1373
+ }
1374
+ function truncateToTokens(text, maxTokens) {
1375
+ const maxChars = maxTokens * 4;
1376
+ if (text.length <= maxChars) return text;
1377
+ return text.slice(0, maxChars) + `
1378
+
1379
+ ...(truncated to ~${maxTokens} tokens)`;
1380
+ }
1381
+ async function fetchCatalogTokensCss(designSystemId) {
1382
+ try {
1383
+ const [globalsRes, ...componentResults] = await Promise.all([
1384
+ fetch(`${REGISTRY_BASE_URL}/${designSystemId}/globals.json`),
1385
+ ...["button", "input", "card"].map(
1386
+ (c) => fetch(`${REGISTRY_BASE_URL}/${designSystemId}/${c}.json`).catch(() => null)
1387
+ )
1388
+ ]);
1389
+ if (!globalsRes.ok) return "";
1390
+ const globals = REGISTRY_ITEM_SCHEMA.safeParse(await globalsRes.json());
1391
+ if (!globals.success) return "";
1392
+ const files = [...globals.data.files ?? []];
1393
+ for (const res of componentResults) {
1394
+ if (!res?.ok) continue;
1395
+ const item = REGISTRY_ITEM_SCHEMA.safeParse(await res.json().catch(() => null));
1396
+ if (item.success && item.data.files) files.push(...item.data.files);
1397
+ }
1398
+ return tokensCssFromRegistry({ cssVars: globals.data.cssVars, files });
1399
+ } catch {
1400
+ return "";
1401
+ }
1402
+ }
1403
+ function levenshteinDistance(a, b) {
1404
+ const previous = Array.from({ length: b.length + 1 }, (_, index) => index);
1405
+ for (let i = 1; i <= a.length; i += 1) {
1406
+ const current = [i];
1407
+ for (let j = 1; j <= b.length; j += 1) {
1408
+ current[j] = Math.min(
1409
+ current[j - 1] + 1,
1410
+ previous[j] + 1,
1411
+ previous[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1)
1412
+ );
1413
+ }
1414
+ previous.splice(0, previous.length, ...current);
1415
+ }
1416
+ return previous[b.length];
1417
+ }
1418
+ function formatPrincipleIndex(principles, toolName, label) {
1419
+ const indexText = principles.map((principle) => {
1420
+ const topic = principle.topic ?? principle.id.replace("principle-", "");
1421
+ const aliases = principle.aliases?.length ? ` (aliases: ${principle.aliases.slice(0, 5).join(", ")})` : "";
1422
+ return `- **${topic}**: ${principle.title}${aliases}`;
1423
+ }).join("\n");
1424
+ return `# Available ${label} Principles
1425
+
1426
+ Use \`${toolName}({ topic: "..." })\` to load a specific principle:
1427
+
1428
+ ${indexText}
1429
+
1430
+ Or use \`${toolName}({ query: "..." })\` to search by natural language.`;
1431
+ }
1432
+ function formatTopicNotFound(topic, principles, toolName) {
1433
+ const needle = normalizePrincipleTopic(topic);
1434
+ const suggestions = principles.map((principle) => {
1435
+ const candidates = [
1436
+ principle.topic ?? principle.id.replace("principle-", ""),
1437
+ principle.title,
1438
+ ...principle.aliases ?? []
1439
+ ];
1440
+ const distance = Math.min(
1441
+ ...candidates.map((candidate) => levenshteinDistance(needle, normalizePrincipleTopic(candidate)))
1442
+ );
1443
+ return { principle, distance };
1444
+ }).sort((a, b) => a.distance - b.distance).slice(0, 5).map(({ principle }) => principle.topic ?? principle.id.replace("principle-", ""));
1445
+ return [
1446
+ `Principle '${topic}' not found.`,
1447
+ suggestions.length ? `Closest topics: ${suggestions.map((item) => `\`${item}\``).join(", ")}.` : "",
1448
+ `Call \`${toolName}({})\` for the full index.`
1449
+ ].filter(Boolean).join("\n");
1450
+ }
1451
+ async function runPrincipleTool(provider, area, label, toolName, args) {
1452
+ const { topic, query, maxTokens } = args;
1453
+ if (topic && query) {
1454
+ return {
1455
+ content: [{
1456
+ type: "text",
1457
+ text: `Pass either 'topic' or 'query' to ${toolName}, not both.`
1458
+ }]
1459
+ };
1460
+ }
1461
+ if (topic) {
1462
+ const principle = await provider.getPrincipleByTopic(topic, area);
1463
+ if (!principle) {
1464
+ const principles2 = await provider.listPrinciples(area);
1465
+ return { content: [{ type: "text", text: formatTopicNotFound(topic, principles2, toolName) }] };
1466
+ }
1467
+ const topicLine = principle.topic ? `
1468
+
1469
+ Topic: ${principle.topic}` : "";
1470
+ const aliasesLine = principle.aliases?.length ? `
1471
+ Aliases: ${principle.aliases.join(", ")}` : "";
1472
+ let text = `# ${principle.title}${topicLine}${aliasesLine}
1473
+
1474
+ ${principle.content}`;
1475
+ if (maxTokens) text = truncateToTokens(text, maxTokens);
1476
+ return { content: [{ type: "text", text }] };
1477
+ }
1478
+ if (query) {
1479
+ const results = await provider.searchPrinciples(query, 5, area);
1480
+ if (results.length === 0) {
1481
+ return { content: [{ type: "text", text: `No matching ${label.toLowerCase()} guidelines found. Try a different query.` }] };
1482
+ }
1483
+ const formatted = results.map(
1484
+ (result) => `## ${result.title} (${result.matchScore}% match)
1485
+
1486
+ ${result.content.substring(0, 1500)}${result.content.length > 1500 ? "\n\n...(truncated)" : ""}`
1487
+ ).join("\n\n---\n\n");
1488
+ let text = `# ${label} Guidelines matching "${query}"
1489
+
1490
+ ${formatted}`;
1491
+ if (maxTokens) text = truncateToTokens(text, maxTokens);
1492
+ return { content: [{ type: "text", text }] };
1493
+ }
1494
+ const principles = await provider.listPrinciples(area);
1495
+ if (principles.length === 0) {
1496
+ return { content: [{ type: "text", text: `No ${label.toLowerCase()} principles found.` }] };
1497
+ }
1498
+ return {
1499
+ content: [{
1500
+ type: "text",
1501
+ text: formatPrincipleIndex(principles, toolName, label)
1502
+ }]
1503
+ };
1504
+ }
1505
+ function extractOutputPreview(result) {
1506
+ const content = result?.content;
1507
+ if (!Array.isArray(content)) return void 0;
1508
+ const first = content.find((c) => c?.type === "text" && typeof c.text === "string");
1509
+ const text = first?.text;
1510
+ if (typeof text !== "string" || !text) return void 0;
1511
+ return text.length > MAX_OUTPUT_PREVIEW ? text.slice(0, MAX_OUTPUT_PREVIEW) + "\u2026" : text;
1512
+ }
1513
+ function registerAllTools(server, provider, onToolUsage, authContext) {
1514
+ const track = (tool, params, outputPreview) => {
1515
+ if (!onToolUsage) return;
1516
+ try {
1517
+ const info = server.server.getClientVersion?.();
1518
+ onToolUsage(tool, params, {
1519
+ clientName: info?.name,
1520
+ clientVersion: info?.version,
1521
+ outputPreview
1522
+ });
1523
+ } catch {
1524
+ }
1525
+ };
1526
+ async function tracked(tool, args, run) {
1527
+ const result = await run();
1528
+ track(tool, args, extractOutputPreview(result));
1529
+ return result;
1530
+ }
1531
+ server.registerTool(
1532
+ "resolve-design-system",
1533
+ {
1534
+ title: "Resolve Design System",
1535
+ description: `Search for design systems matching a query using semantic search.
1536
+
1537
+ You MUST call this before 'get-design-system-docs' to obtain a valid design system ID.
1538
+
1539
+ Search by:
1540
+ - Industry (fintech, education, travel, developer tools)
1541
+ - Personality traits (professional, playful, minimal, warm)
1542
+ - Natural language descriptions of the UI you want
1543
+
1544
+ Examples:
1545
+ - "fintech startup" \u2192 Stripe design system
1546
+ - "playful education app" \u2192 Duolingo design system
1547
+ - "minimal developer tools" \u2192 Linear design system`,
1548
+ inputSchema: z.object({
1549
+ query: z.string().describe("Natural language query describing the type of UI you're building.")
1550
+ }),
1551
+ annotations: { readOnlyHint: true }
1552
+ },
1553
+ async ({ query }) => tracked("resolve-design-system", { query }, async () => {
1554
+ try {
1555
+ const results = await provider.searchDesignSystems(query, 5);
1556
+ if (results.length === 0) {
1557
+ return { content: [{ type: "text", text: "No design systems found matching your query." }] };
1558
+ }
1559
+ const formatted = results.map(
1560
+ (r) => [
1561
+ `**ID:** ${r.id}`,
1562
+ `**Title:** ${r.title}`,
1563
+ `**Description:** ${r.description}`,
1564
+ `**Personality:** ${r.personality.join(", ")}`,
1565
+ `**Industry:** ${r.industry.join(", ")}`,
1566
+ `**Components:** ${r.componentCount}`,
1567
+ `**Match Score:** ${r.matchScore}%`,
1568
+ `**Registry:** ${REGISTRY_BASE_URL}/${r.id}`
1569
+ ].join("\n")
1570
+ ).join("\n\n----------\n\n");
1571
+ return {
1572
+ content: [{
1573
+ type: "text",
1574
+ text: `# Available Design Systems
1575
+
1576
+ Each result includes an **ID** to use with get-design-system-docs.
1577
+
1578
+ ---
1579
+
1580
+ ${formatted}`
1581
+ }]
1582
+ };
1583
+ } catch (error) {
1584
+ return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }] };
1585
+ }
1586
+ })
1587
+ );
1588
+ server.registerTool(
1589
+ "get-design-system-docs",
1590
+ {
1591
+ title: "Get Design System Documentation",
1592
+ description: `Scaffolds a design system into the user's project.
1593
+
1594
+ You must call 'resolve-design-system' first to obtain the design system ID.
1595
+
1596
+ **Default behavior (recommended): install the full design system.**
1597
+ Call with only a designSystemId and this tool returns ONE shadcn command that
1598
+ installs every component (globals + all UI primitives) into components/ui/ in
1599
+ one shot. Run that command before you start writing feature code \u2014 the agent
1600
+ should always have the full component library available.
1601
+
1602
+ Pass 'component' only when the user explicitly asks to inspect or customise a
1603
+ specific component's source code. In that mode the tool returns just the
1604
+ requested components plus their source code, not an install command.`,
1605
+ inputSchema: z.object({
1606
+ designSystemId: z.string().describe("The design system ID from resolve-design-system"),
1607
+ component: z.union([z.string(), z.array(z.string())]).optional().describe('Optional. Only pass this when the user asks to inspect specific component source code. Examples: "button", ["button", "card"]. Omit to scaffold the entire design system.')
1608
+ }),
1609
+ outputSchema: PREVIEW_OUTPUT_SCHEMA,
1610
+ annotations: { readOnlyHint: true },
1611
+ // claude.ai only loads ~5 connector tools and this is one of them, while
1612
+ // the standalone preview-design-system is not. Carry the inline preview
1613
+ // widget here so "show/preview <DS>" renders a card in claude.ai too. [BD-95]
1614
+ _meta: {
1615
+ ui: { resourceUri: DS_PREVIEW_WIDGET_URI },
1616
+ "ui/resourceUri": DS_PREVIEW_WIDGET_URI,
1617
+ "openai/outputTemplate": DS_PREVIEW_WIDGET_URI
1618
+ }
1619
+ },
1620
+ async ({ designSystemId, component }) => tracked("get-design-system-docs", { designSystemId, component }, async () => {
1621
+ try {
1622
+ const system = await provider.getDesignSystemById(designSystemId);
1623
+ if (!system) {
1624
+ return { content: [{ type: "text", text: `Design system '${designSystemId}' not found.` }] };
1625
+ }
1626
+ const { metadata, components: allComponents } = system;
1627
+ const previewViewUrl = `${APP_BASE_URL}/design-systems/${metadata.id}`;
1628
+ const previewStructured = {
1629
+ status: "completed",
1630
+ name: metadata.title,
1631
+ viewUrl: previewViewUrl,
1632
+ tokensCss: await fetchCatalogTokensCss(metadata.id)
1633
+ };
1634
+ const header = [
1635
+ `# ${metadata.title}
1636
+ `,
1637
+ `**Description:** ${metadata.description}`,
1638
+ `**Personality:** ${metadata.personality.join(", ")}`,
1639
+ `**Industry:** ${metadata.industry.join(", ")}`
1640
+ ];
1641
+ if (metadata.primaryColor) header.push(`**Primary Color:** ${metadata.primaryColor}`);
1642
+ if (metadata.borderRadius) header.push(`**Border Radius:** ${metadata.borderRadius}`);
1643
+ if (metadata.font) header.push(`**Font:** ${metadata.font}`);
1644
+ header.push(`**Preview (see it live):** ${APP_BASE_URL}/design-systems/${metadata.id}`);
1645
+ if (!component) {
1646
+ const installNames = [
1647
+ "globals",
1648
+ ...allComponents.map((c) => c.name).sort()
1649
+ ];
1650
+ const installUrls = installNames.map((name) => `${REGISTRY_BASE_URL}/${metadata.id}/${name}.json`).join(" \\\n ");
1651
+ const parts2 = [
1652
+ ...header,
1653
+ "\n## Scaffold the full design system\n",
1654
+ REQUIREMENTS_MD,
1655
+ `Run these commands in the user's project root. The first **conditionally** runs \`shadcn init\` only when the project hasn't been set up yet (no \`components.json\`); the second installs **all ${installNames.length} pieces** (globals.css + ${allComponents.length} components) into \`components/ui/\` with a single shadcn invocation:`,
1656
+ "```bash",
1657
+ `# 1. Initialize shadcn if not already set up (creates components.json,`,
1658
+ `# components/ui/, lib/utils.ts, hooks up globals.css). Idempotent.`,
1659
+ `[ -f components.json ] || npx shadcn@latest init -d -y`,
1660
+ "",
1661
+ `# 2. Install Better Design's full DS into components/ui/`,
1662
+ `npx shadcn@latest add \\
1663
+ ${installUrls}`,
1664
+ "```",
1665
+ ANTI_MOCKUP_MD,
1666
+ "\nAfter the install completes, read files from `components/ui/` directly when writing feature code \u2014 do not ask this tool for component source unless the user wants to inspect or customise a specific file.",
1667
+ "\n## Included components\n",
1668
+ installNames.map((n) => `- \`${n}\``).join("\n"),
1669
+ "\n" + GUARDRAILS_SETUP_MD
1670
+ ];
1671
+ return { content: [{ type: "text", text: parts2.join("\n") }], structuredContent: previewStructured };
1672
+ }
1673
+ const componentNames = Array.isArray(component) ? component : [component];
1674
+ const components = allComponents.filter((c) => componentNames.includes(c.name));
1675
+ const scopedUrls = componentNames.map((name) => `${REGISTRY_BASE_URL}/${metadata.id}/${name}.json`).join(" \\\n ");
1676
+ const parts = [
1677
+ ...header,
1678
+ "\n## Install just these components\n",
1679
+ REQUIREMENTS_MD,
1680
+ "```bash",
1681
+ `# Init shadcn if missing (idempotent \u2014 skips when components.json exists)`,
1682
+ `[ -f components.json ] || npx shadcn@latest init -d -y`,
1683
+ "",
1684
+ `npx shadcn@latest add \\
1685
+ ${scopedUrls}`,
1686
+ "```",
1687
+ ANTI_MOCKUP_MD,
1688
+ "\n---\n"
1689
+ ];
1690
+ for (const comp of components) {
1691
+ const name = comp.name.charAt(0).toUpperCase() + comp.name.slice(1);
1692
+ parts.push(`## ${name}`);
1693
+ if (comp.description) parts.push(`**Description:** ${comp.description}`);
1694
+ parts.push("");
1695
+ parts.push("```tsx");
1696
+ parts.push(comp.code);
1697
+ parts.push("```");
1698
+ parts.push("");
1699
+ }
1700
+ return { content: [{ type: "text", text: parts.join("\n") }], structuredContent: previewStructured };
1701
+ } catch (error) {
1702
+ return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }] };
1703
+ }
1704
+ })
1705
+ );
1706
+ server.registerTool(
1707
+ "get-ui-principle",
1708
+ {
1709
+ title: "Get UI Design Principle",
1710
+ description: `Load visual UI design principles into context on-demand.
1711
+
1712
+ Use this for visual surface decisions: hierarchy, spacing/layout, typography, color, depth, images, polish, and animation. For behavior, flows, forms, navigation, notifications, errors, search, onboarding, microcopy, or psychology/cognitive laws, use get-ux-principle instead.
1713
+
1714
+ You can either:
1715
+ 1. Request a specific topic: get-ui-principle({ topic: "spacing" })
1716
+ 2. Semantic search: get-ui-principle({ query: "animation easing" })
1717
+ 3. Get index of all principles: get-ui-principle({})
1718
+
1719
+ Use maxTokens to keep responses focused (recommended: 5000\u201310000).`,
1720
+ inputSchema: z.object({
1721
+ topic: z.string().optional().describe("Specific UI topic or alias to load, e.g. spacing, hierarchy, color, depth, animation."),
1722
+ query: z.string().optional().describe("Natural language search query to find relevant principles."),
1723
+ maxTokens: z.number().min(500).max(5e4).optional().describe("Maximum tokens to return. Truncates content to fit. Recommended: 5000\u201310000.")
1724
+ }),
1725
+ annotations: { readOnlyHint: true }
1726
+ },
1727
+ async ({ topic, query, maxTokens }) => tracked("get-ui-principle", { topic, query, maxTokens }, async () => {
1728
+ try {
1729
+ return await runPrincipleTool(provider, "ui", "UI", "get-ui-principle", { topic, query, maxTokens });
1730
+ } catch (error) {
1731
+ return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }] };
1732
+ }
1733
+ })
1734
+ );
1735
+ server.registerTool(
1736
+ "get-ux-principle",
1737
+ {
1738
+ title: "Get UX Design Principle",
1739
+ description: `Load UX behavior and product-flow principles into context on-demand.
1740
+
1741
+ Use this before implementing flows or interactive behavior: forms, navigation, notifications, errors, dialogs, search, onboarding, responsive behavior, microcopy, interaction patterns, mobile patterns, sound, anti-patterns, understanding users, and cognitive laws / psychology / behavioral science.
1742
+
1743
+ You can either:
1744
+ 1. Request a specific topic: get-ux-principle({ topic: "forms" })
1745
+ 2. Use an alias: get-ux-principle({ topic: "psychology" })
1746
+ 3. Semantic search: get-ux-principle({ query: "psycho biases in pricing cards" })
1747
+ 4. Get index of all UX principles: get-ux-principle({})
1748
+
1749
+ Use maxTokens to keep responses focused (recommended: 5000\u201310000).`,
1750
+ inputSchema: z.object({
1751
+ topic: z.string().optional().describe("Specific UX topic or alias to load, e.g. forms, navigation, notifications, errors, search, onboarding, microcopy, cognitive-laws, psychology."),
1752
+ query: z.string().optional().describe("Natural language search query to find relevant UX principles."),
1753
+ maxTokens: z.number().min(500).max(5e4).optional().describe("Maximum tokens to return. Truncates content to fit. Recommended: 5000\u201310000.")
1754
+ }),
1755
+ annotations: { readOnlyHint: true }
1756
+ },
1757
+ async ({ topic, query, maxTokens }) => tracked("get-ux-principle", { topic, query, maxTokens }, async () => {
1758
+ try {
1759
+ return await runPrincipleTool(provider, "ux", "UX", "get-ux-principle", { topic, query, maxTokens });
1760
+ } catch (error) {
1761
+ return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }] };
1762
+ }
1763
+ })
1764
+ );
1765
+ server.registerTool(
1766
+ "resolve-icon-library",
1767
+ {
1768
+ title: "Resolve Icon Library",
1769
+ description: `Search for icon libraries matching a design style or personality using semantic search.
1770
+
1771
+ Use this to find an icon library that matches your design system's personality:
1772
+ - Style traits (minimal, bold, rounded, sharp, outlined, filled)
1773
+ - Mood (friendly, professional, playful, serious, warm, elegant)
1774
+ - Use case (consumer, enterprise, developer, dashboard, mobile)
1775
+
1776
+ Examples:
1777
+ - "minimal clean professional" \u2192 Iconoir, Feather Icons
1778
+ - "friendly rounded warm" \u2192 Phosphor, MingCute
1779
+ - "bold technical enterprise" \u2192 Tabler, Carbon`,
1780
+ inputSchema: z.object({
1781
+ query: z.string().describe("Style description or personality traits to match.")
1782
+ }),
1783
+ annotations: { readOnlyHint: true }
1784
+ },
1785
+ async ({ query }) => tracked("resolve-icon-library", { query }, async () => {
1786
+ try {
1787
+ const results = await provider.searchIconLibraries(query, 5);
1788
+ if (results.length === 0) {
1789
+ return { content: [{ type: "text", text: "No icon libraries found matching your query." }] };
1790
+ }
1791
+ const formatted = results.map((r) => {
1792
+ const lines = [
1793
+ `**ID:** ${r.id}`,
1794
+ `**Name:** ${r.name}`,
1795
+ `**Prefix:** ${r.prefix}`,
1796
+ `**Style:** ${r.tags.join(", ")}`
1797
+ ];
1798
+ if (r.variants?.length) {
1799
+ lines.push(`**Variants:** ${r.variants.join(", ")}`);
1800
+ lines.push(`**Default Variant:** ${r.defaultVariant || r.variants[0]}`);
1801
+ }
1802
+ lines.push(`**Match Score:** ${r.matchScore}%`);
1803
+ return lines.join("\n");
1804
+ }).join("\n\n----------\n\n");
1805
+ return {
1806
+ content: [{
1807
+ type: "text",
1808
+ text: `# Matching Icon Libraries
1809
+
1810
+ Use the prefix with Iconify: \`<Icon icon="prefix:icon-name" />\`
1811
+
1812
+ ---
1813
+
1814
+ ${formatted}`
1815
+ }]
1816
+ };
1817
+ } catch (error) {
1818
+ return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }] };
1819
+ }
1820
+ })
1821
+ );
1822
+ server.registerTool(
1823
+ "search-icons",
1824
+ {
1825
+ title: "Search Icons",
1826
+ description: `Search for specific icons within an icon library.
1827
+
1828
+ Use this after resolve-icon-library to find specific icons by name/concept.
1829
+
1830
+ Examples:
1831
+ - search-icons({ query: "home", libraryId: "phosphor" })
1832
+ - search-icons({ query: "settings gear", libraryId: "tabler" })
1833
+
1834
+ Returns icons formatted for use with Iconify React.`,
1835
+ inputSchema: z.object({
1836
+ query: z.string().describe("What icon you need (e.g., 'home', 'settings', 'user')"),
1837
+ libraryId: z.string().describe("The icon library ID from resolve-icon-library"),
1838
+ variant: z.string().optional().describe("Optional variant style (e.g., 'bold', 'outline', 'duotone').")
1839
+ }),
1840
+ annotations: { readOnlyHint: true }
1841
+ },
1842
+ async ({ query, libraryId, variant }) => tracked("search-icons", { query, libraryId, variant }, async () => {
1843
+ try {
1844
+ const library = await provider.getIconLibraryById(libraryId);
1845
+ if (!library) {
1846
+ return { content: [{ type: "text", text: `Icon library '${libraryId}' not found.` }] };
1847
+ }
1848
+ const icons = await provider.searchIconsInLibrary(query, library, variant, 15);
1849
+ if (icons.length === 0) {
1850
+ return { content: [{ type: "text", text: `No icons found in ${library.name}.` }] };
1851
+ }
1852
+ const lines = [
1853
+ `# Icons from ${library.name}`,
1854
+ "",
1855
+ '**Next step:** call `install-icons` with these names to scaffold them as SSR-clean React component files in the user\'s repo. Avoid the runtime `<Icon icon="..." />` import \u2014 it requires a CDN fetch on every page load.',
1856
+ "",
1857
+ "```ts",
1858
+ `install-icons({ libraryId: "${library.id}", names: [${icons.slice(0, 3).map((i) => `"${stripPrefix(i)}"`).join(", ")}${icons.length > 3 ? ", ..." : ""}] })`,
1859
+ "```",
1860
+ "",
1861
+ "Found icons:",
1862
+ "",
1863
+ ...icons.map((icon2) => `- \`${icon2}\``)
1864
+ ];
1865
+ return { content: [{ type: "text", text: lines.join("\n") }] };
1866
+ } catch (error) {
1867
+ return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }] };
1868
+ }
1869
+ })
1870
+ );
1871
+ server.registerTool(
1872
+ "get-review-rules",
1873
+ {
1874
+ title: "Get Code Review Rules",
1875
+ description: `Retrieves accessibility (WCAG 2.1) and visual design review rules for analyzing code.
1876
+
1877
+ You MUST call this after writing UI code to self-review your output.
1878
+
1879
+ **Accessibility (WCAG 2.1):**
1880
+ - Critical: Images without alt text, icon buttons without aria-labels, form inputs without labels
1881
+ - Serious: Focus outline removed, missing keyboard handlers, color-only information
1882
+
1883
+ **Visual Design:**
1884
+ - Layout & Spacing: Inconsistent spacing, overflow issues, z-index conflicts
1885
+ - Typography: Mixed fonts, line-height issues, missing fallbacks
1886
+ - Color & Contrast: Contrast below 4.5:1, missing hover/focus states
1887
+
1888
+ Use maxTokens to keep responses focused (recommended: 5000\u201310000).`,
1889
+ inputSchema: z.object({
1890
+ category: z.enum(["accessibility", "visual-design", "all"]).optional().describe("Filter rules by category (defaults to 'all')"),
1891
+ maxTokens: z.number().min(500).max(5e4).optional().describe("Maximum tokens to return. Truncates content to fit. Recommended: 5000\u201310000.")
1892
+ }),
1893
+ annotations: { readOnlyHint: true }
1894
+ },
1895
+ async ({ category = "all", maxTokens }) => tracked("get-review-rules", { category, maxTokens }, async () => {
1896
+ try {
1897
+ const rules = await provider.getReviewRules(category);
1898
+ if (rules.length === 0) {
1899
+ return { content: [{ type: "text", text: "No review rules found." }] };
1900
+ }
1901
+ const rulesOutput = rules.map((rule) => `# ${rule.title}
1902
+
1903
+ ${rule.content}`).join("\n\n---\n\n");
1904
+ let text = `# Code Review Rules
1905
+
1906
+ ${rulesOutput}
1907
+
1908
+ ---
1909
+
1910
+ ## Scoring System
1911
+
1912
+ - **Critical issues:** -20 points each (max -100)
1913
+ - **Serious issues:** -10 points each
1914
+ - **Moderate issues:** -5 points each
1915
+
1916
+ Start at 100. Minimum score is 0.
1917
+
1918
+ 90-100: Excellent | 75-89: Good | 60-74: Needs improvement | 0-59: Poor`;
1919
+ if (maxTokens) text = truncateToTokens(text, maxTokens);
1920
+ return { content: [{ type: "text", text }] };
1921
+ } catch (error) {
1922
+ return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }] };
1923
+ }
1924
+ })
1925
+ );
1926
+ server.registerTool(
1927
+ "install-icons",
1928
+ {
1929
+ title: "Install Icons as React Components",
1930
+ description: `Scaffold SVG icons as React component files (.tsx) into the user's repo.
1931
+
1932
+ Call this after \`search-icons\` to materialise the chosen icons as owned, SSR-clean component files \u2014 no runtime CDN fetch from \`api.iconify.design\`, no first-paint flash.
1933
+
1934
+ The tool fetches each SVG from the public Iconify API, inlines its viewBox + body into a small \`<Name>Icon\` React component, and returns a list of \`<file path="...">\`-tagged blocks for the agent to write to disk. A barrel \`index.ts\` is also returned.
1935
+
1936
+ Usage after writing the files:
1937
+ \`\`\`tsx
1938
+ import { HomeIcon } from "@/components/icons";
1939
+ <HomeIcon className="size-4" />
1940
+ \`\`\`
1941
+
1942
+ If \`components/icons/index.ts\` already exists in the project, MERGE the new exports into it rather than overwriting.`,
1943
+ inputSchema: z.object({
1944
+ libraryId: z.string().describe("Icon library ID from resolve-icon-library (e.g. 'tabler', 'phosphor')."),
1945
+ names: z.array(z.string()).min(1).describe("Icon names to install. May be bare (e.g. 'home') or prefixed (e.g. 'tabler:home')."),
1946
+ targetDir: z.string().optional().describe("Directory inside the project to write into. Defaults to 'components/icons'."),
1947
+ format: z.enum(["tsx", "svg"]).optional().describe("Output format. 'tsx' (default) generates React components; 'svg' generates raw .svg files."),
1948
+ variant: z.string().optional().describe("Optional library variant (e.g. 'outline', 'filled').")
1949
+ }),
1950
+ annotations: { readOnlyHint: true }
1951
+ },
1952
+ async ({ libraryId, names, targetDir, format, variant }) => tracked(
1953
+ "install-icons",
1954
+ { libraryId, count: names.length, format: format ?? "tsx" },
1955
+ async () => {
1956
+ try {
1957
+ const dirResult = validateTargetDir(targetDir);
1958
+ if (!dirResult.ok) {
1959
+ return { content: [{ type: "text", text: `Invalid targetDir: ${dirResult.error}` }] };
1960
+ }
1961
+ const dir = dirResult.dir;
1962
+ const library = await provider.getIconLibraryById(libraryId);
1963
+ if (!library) {
1964
+ return { content: [{ type: "text", text: `Icon library '${libraryId}' not found. Call resolve-icon-library first.` }] };
1965
+ }
1966
+ const outFormat = format ?? "tsx";
1967
+ const prefix = library.prefix;
1968
+ const generated = [];
1969
+ const skipped = [];
1970
+ const duplicates = [];
1971
+ const seenStems = /* @__PURE__ */ new Set();
1972
+ const uniqueNames = [];
1973
+ for (const rawName of names) {
1974
+ let stem;
1975
+ try {
1976
+ stem = toFileStem(rawName);
1977
+ } catch {
1978
+ uniqueNames.push(rawName);
1979
+ continue;
1980
+ }
1981
+ if (seenStems.has(stem)) {
1982
+ duplicates.push(rawName);
1983
+ continue;
1984
+ }
1985
+ seenStems.add(stem);
1986
+ uniqueNames.push(rawName);
1987
+ }
1988
+ const seenComponentNames = /* @__PURE__ */ new Set();
1989
+ for (const rawName of uniqueNames) {
1990
+ const bare = stripPrefix(rawName);
1991
+ let stem;
1992
+ try {
1993
+ stem = toFileStem(rawName);
1994
+ } catch (err) {
1995
+ skipped.push({
1996
+ name: rawName,
1997
+ reason: err instanceof Error ? err.message : "invalid name"
1998
+ });
1999
+ continue;
2000
+ }
2001
+ const url = `${ICONIFY_API_BASE}/${prefix}/${bare}.svg${variant ? `?variant=${encodeURIComponent(variant)}` : ""}`;
2002
+ let rawSvg;
2003
+ try {
2004
+ const res = await fetchWithTimeout(url);
2005
+ if (!res.ok) {
2006
+ skipped.push({ name: rawName, reason: `HTTP ${res.status}` });
2007
+ continue;
2008
+ }
2009
+ rawSvg = await res.text();
2010
+ if (rawSvg.includes('width="1"') && rawSvg.includes('height="1"') && !rawSvg.includes("<path") && !rawSvg.includes("<g")) {
2011
+ skipped.push({ name: rawName, reason: "not found in library" });
2012
+ continue;
2013
+ }
2014
+ } catch (err) {
2015
+ const isAbort = err instanceof Error && err.name === "AbortError";
2016
+ skipped.push({
2017
+ name: rawName,
2018
+ reason: isAbort ? `timeout after ${ICONIFY_FETCH_TIMEOUT_MS}ms` : err instanceof Error ? err.message : "fetch failed"
2019
+ });
2020
+ continue;
2021
+ }
2022
+ if (outFormat === "svg") {
2023
+ generated.push({
2024
+ path: `${dir}/${stem}.svg`,
2025
+ content: rawSvg.trim() + "\n",
2026
+ componentName: "",
2027
+ stem
2028
+ });
2029
+ continue;
2030
+ }
2031
+ const { viewBox, body } = parseSvg(rawSvg);
2032
+ const componentName = toPascalCase(rawName);
2033
+ if (seenComponentNames.has(componentName)) {
2034
+ duplicates.push(rawName);
2035
+ continue;
2036
+ }
2037
+ seenComponentNames.add(componentName);
2038
+ const content = buildTsxComponent({
2039
+ libraryName: library.name,
2040
+ iconName: rawName,
2041
+ viewBox,
2042
+ body
2043
+ });
2044
+ generated.push({
2045
+ path: `${dir}/${stem}.tsx`,
2046
+ content,
2047
+ componentName,
2048
+ stem
2049
+ });
2050
+ }
2051
+ const parts = [
2052
+ `# Install icons from ${library.name}`,
2053
+ "",
2054
+ "Write each file below to disk in the user's project. Then import via:",
2055
+ "",
2056
+ "```tsx",
2057
+ `import { HomeIcon } from "@/${dir}";`,
2058
+ `<HomeIcon className="size-4" />`,
2059
+ "```",
2060
+ "",
2061
+ `If \`${dir}/index.ts\` already exists, **merge** the new exports into it instead of overwriting.`,
2062
+ "",
2063
+ `If \`${dir}/.library.json\` already exists, **merge** the new \`icons\` array into the existing one (set-union, sorted) and update \`installedAt\`. Do not overwrite the file blindly.`,
2064
+ "",
2065
+ "## Files",
2066
+ ""
2067
+ ];
2068
+ for (const file of generated) {
2069
+ parts.push(`<file path="${file.path}">`);
2070
+ parts.push(file.content.trimEnd());
2071
+ parts.push(`</file>`);
2072
+ parts.push("");
2073
+ }
2074
+ if (outFormat === "tsx" && generated.length > 0) {
2075
+ const barrel = buildBarrel(
2076
+ generated.map((f) => ({
2077
+ componentName: f.componentName,
2078
+ importPath: `./${f.stem}`
2079
+ })),
2080
+ { libraryName: library.name, prefix: library.prefix }
2081
+ );
2082
+ parts.push(`<file path="${dir}/index.ts">`);
2083
+ parts.push(barrel.trimEnd());
2084
+ parts.push(`</file>`);
2085
+ parts.push("");
2086
+ }
2087
+ if (generated.length > 0) {
2088
+ const installedIcons = Array.from(
2089
+ new Set(generated.map((f) => f.stem))
2090
+ ).sort();
2091
+ const manifest = {
2092
+ library: library.id,
2093
+ prefix: library.prefix,
2094
+ source: "iconify",
2095
+ installedAt: (/* @__PURE__ */ new Date()).toISOString(),
2096
+ icons: installedIcons
2097
+ };
2098
+ parts.push(`<file path="${dir}/.library.json">`);
2099
+ parts.push(JSON.stringify(manifest, null, 2));
2100
+ parts.push(`</file>`);
2101
+ parts.push("");
2102
+ }
2103
+ if (skipped.length > 0) {
2104
+ parts.push("## Skipped (fetch failed)");
2105
+ parts.push("");
2106
+ for (const s of skipped) {
2107
+ parts.push(`- \`${s.name}\` \u2014 ${s.reason}`);
2108
+ }
2109
+ parts.push("");
2110
+ }
2111
+ if (duplicates.length > 0) {
2112
+ parts.push("## Duplicates (skipped)");
2113
+ parts.push("");
2114
+ parts.push("These names resolved to the same file stem or component name as an earlier entry:");
2115
+ parts.push("");
2116
+ for (const name of duplicates) {
2117
+ parts.push(`- \`${name}\``);
2118
+ }
2119
+ parts.push("");
2120
+ }
2121
+ if (generated.length === 0) {
2122
+ parts.push("");
2123
+ parts.push("No icons were generated. Check the icon names and try again.");
2124
+ }
2125
+ return { content: [{ type: "text", text: parts.join("\n") }] };
2126
+ } catch (error) {
2127
+ return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }] };
2128
+ }
2129
+ }
2130
+ )
2131
+ );
2132
+ server.registerTool(
2133
+ "detect-icon-library",
2134
+ {
2135
+ title: "Detect Existing Icon Library",
2136
+ description: `Check if the user's project already has an icon library installed via Better Design.
2137
+
2138
+ Reads <targetDir>/.library.json (default targetDir: "components/icons") if it exists and returns the locked library + installed icon list.
2139
+
2140
+ Call this BEFORE resolve-icon-library / install-icons. If a library is already locked, use it for any new icon work \u2014 do NOT switch libraries mid-project.
2141
+
2142
+ Returns either:
2143
+ - The locked library info + installed icon list, with a hint to call install-icons using that libraryId, OR
2144
+ - A "no library detected" response, prompting the agent to call resolve-icon-library normally.`,
2145
+ inputSchema: z.object({
2146
+ manifestContent: z.string().optional().describe("Contents of the project's components/icons/.library.json file, if it exists. The agent should attempt to read this file from disk and pass it here. If the file doesn't exist or can't be read, omit this field.")
2147
+ }),
2148
+ annotations: { readOnlyHint: true }
2149
+ },
2150
+ async ({ manifestContent }) => tracked("detect-icon-library", { hasManifest: Boolean(manifestContent) }, async () => {
2151
+ if (!manifestContent || !manifestContent.trim()) {
2152
+ return { content: [{ type: "text", text: "No `.library.json` manifest found. Proceed by calling `resolve-icon-library` to pick a library, then `install-icons` to scaffold icons. The library you pick will be locked for subsequent installs." }] };
2153
+ }
2154
+ try {
2155
+ const parsed = JSON.parse(manifestContent);
2156
+ const lines = [
2157
+ `# Locked icon library: ${parsed.library ?? "(unknown)"}`,
2158
+ "",
2159
+ `- Prefix: \`${parsed.prefix ?? "?"}\``,
2160
+ `- Source: ${parsed.source ?? "?"}`,
2161
+ `- Installed at: ${parsed.installedAt ?? "?"}`,
2162
+ `- Already-installed icons: ${Array.isArray(parsed.icons) ? parsed.icons.length : 0}`,
2163
+ "",
2164
+ '**Use this library for any new icon work.** Call `install-icons` with `libraryId: "' + (parsed.library ?? "") + '"` \u2014 do NOT pick a different library.'
2165
+ ];
2166
+ return { content: [{ type: "text", text: lines.join("\n") }] };
2167
+ } catch (err) {
2168
+ return { content: [{ type: "text", text: `Failed to parse .library.json: ${err instanceof Error ? err.message : "unknown error"}
2169
+
2170
+ Proceed by calling \`resolve-icon-library\` to pick a library.` }] };
2171
+ }
2172
+ })
2173
+ );
2174
+ server.registerTool(
2175
+ "create-design-system",
2176
+ {
2177
+ title: "Create a New Design System",
2178
+ description: `Generate a brand new design system tailored to the user's product, and return a single shadcn install command that lands the entire set of components + tokens (globals.css) into the user's Next.js project.
2179
+
2180
+ Use this when the user wants a **custom** design system instead of installing one of the existing ones via 'get-design-system-docs'.
2181
+
2182
+ How it works:
2183
+ 1. Sends the user's prompt to Better Design's generation pipeline (same flow the web chat input uses) and returns IMMEDIATELY with the project id + project URL.
2184
+ 2. Generation runs in the background and typically takes 1-3 minutes.
2185
+ 3. Call \`check-design-system-status\` with the returned project id (wait ~60 seconds first) to get the live preview URL and the final \`npx shadcn add <registry-url>\` install command once it completes.
2186
+
2187
+ Share the project URL with the user right away so they can watch the generation live.`,
2188
+ inputSchema: z.object({
2189
+ prompt: z.string().min(1).max(1e4).describe("Describe the design system the user wants. E.g. 'A warm, minimal design system for a personal finance app, soft pastels, rounded corners' or 'A brutalist developer tool aesthetic with sharp edges and monospace type'."),
2190
+ baseDesignSystemId: z.string().optional().describe("Optional. Pass a design system ID from `resolve-design-system` to bias generation toward an existing aesthetic (e.g. apply a theme tweak on top of Linear). Leave empty for a fully custom DS.")
2191
+ }),
2192
+ annotations: {
2193
+ readOnlyHint: false,
2194
+ destructiveHint: false,
2195
+ openWorldHint: false
2196
+ }
2197
+ },
2198
+ async ({ prompt, baseDesignSystemId }) => tracked("create-design-system", { hasBase: Boolean(baseDesignSystemId) }, async () => {
2199
+ const startUrl = `${APP_BASE_URL}/api/projects/anonymous`;
2200
+ let projectId;
2201
+ const requestHeaders = { "Content-Type": "application/json" };
2202
+ if (authContext) {
2203
+ const bearer2 = authContext.kind === "api-key" ? authContext.apiKey : authContext.accessToken;
2204
+ requestHeaders.Authorization = `Bearer ${bearer2}`;
2205
+ }
2206
+ try {
2207
+ const startRes = await fetch(startUrl, {
2208
+ method: "POST",
2209
+ headers: requestHeaders,
2210
+ body: JSON.stringify({
2211
+ value: prompt,
2212
+ ...baseDesignSystemId ? { designSystemId: baseDesignSystemId } : {}
2213
+ })
2214
+ });
2215
+ if (!startRes.ok) {
2216
+ const text = await startRes.text().catch(() => "");
2217
+ return { content: [{ type: "text", text: `Failed to start generation (HTTP ${startRes.status}). ${text.slice(0, 500)}` }] };
2218
+ }
2219
+ const body = await startRes.json();
2220
+ if (!body.id) {
2221
+ return { content: [{ type: "text", text: "Generation endpoint did not return a project id." }] };
2222
+ }
2223
+ projectId = body.id;
2224
+ } catch (err) {
2225
+ return { content: [{ type: "text", text: `Network error calling ${startUrl}: ${err instanceof Error ? err.message : String(err)}` }] };
2226
+ }
2227
+ const projectUrl = `${APP_BASE_URL}/projects/${projectId}`;
2228
+ const lines = [
2229
+ `# Generation started`,
2230
+ "",
2231
+ `Project id: \`${projectId}\``,
2232
+ "",
2233
+ // Only authenticated callers (OAuth / API-key) own the project; anonymous
2234
+ // stdio callers get a neutral link, not a "your account" claim they can't honor.
2235
+ ...authContext ? [`Saved to your Better Design account. Watch it generate live:`] : [`Watch it generate live:`],
2236
+ projectUrl,
2237
+ "",
2238
+ `Generation takes 1-3 minutes. Share the project link with the user now, wait ~60 seconds, then call \`check-design-system-status\` with the project id to get the live preview URL and the final install command.`
2239
+ ];
2240
+ return { content: [{ type: "text", text: lines.join("\n") }] };
2241
+ })
2242
+ );
2243
+ server.registerTool(
2244
+ "check-design-system-status",
2245
+ {
2246
+ title: "Check Design System Generation Status",
2247
+ description: `Check on a design system generation started with 'create-design-system'. Returns progress while generating, and the live preview URL + the \`npx shadcn add\` install command once complete. Generation typically takes 1-3 minutes; poll every ~30 seconds until it reports ready.`,
2248
+ inputSchema: z.object({
2249
+ projectId: z.string().min(1).describe("The project id returned by create-design-system.")
2250
+ }),
2251
+ outputSchema: PREVIEW_OUTPUT_SCHEMA,
2252
+ annotations: {
2253
+ readOnlyHint: true,
2254
+ destructiveHint: false,
2255
+ openWorldHint: false
2256
+ },
2257
+ // ChatGPT renders this tool's structuredContent as an inline preview card
2258
+ // (Apps SDK widget) instead of plain text; other clients ignore _meta and
2259
+ // read the text content. [BD-84]
2260
+ _meta: {
2261
+ ui: { resourceUri: DS_PREVIEW_WIDGET_URI },
2262
+ "ui/resourceUri": DS_PREVIEW_WIDGET_URI,
2263
+ "openai/outputTemplate": DS_PREVIEW_WIDGET_URI,
2264
+ "openai/toolInvocation/invoking": "Checking your design system...",
2265
+ "openai/toolInvocation/invoked": "Design system status ready"
2266
+ }
2267
+ },
2268
+ async ({ projectId }) => tracked("check-design-system-status", {}, async () => {
2269
+ const headers = {};
2270
+ if (authContext) {
2271
+ const bearer2 = authContext.kind === "api-key" ? authContext.apiKey : authContext.accessToken;
2272
+ headers.Authorization = `Bearer ${bearer2}`;
2273
+ }
2274
+ const statusUrl = `${APP_BASE_URL}/api/projects/${projectId}`;
2275
+ let project;
2276
+ try {
2277
+ const res = await fetch(statusUrl, { headers });
2278
+ if (!res.ok) {
2279
+ return { content: [{ type: "text", text: `Could not read project ${projectId} (HTTP ${res.status}). Check the id, or view it at ${APP_BASE_URL}/projects/${projectId}.` }] };
2280
+ }
2281
+ project = await res.json();
2282
+ } catch (err) {
2283
+ return { content: [{ type: "text", text: `Network error calling ${statusUrl}: ${err instanceof Error ? err.message : String(err)}` }] };
2284
+ }
2285
+ const projectUrl = `${APP_BASE_URL}/projects/${projectId}`;
2286
+ if (project.designSystemStatus === "COMPLETED") {
2287
+ const registryUrl = `${APP_BASE_URL}/api/projects/${projectId}/registry/all.json`;
2288
+ let body = `\`\`\`bash
2289
+ npx shadcn@latest add ${registryUrl}
2290
+ \`\`\``;
2291
+ let tokensCss = "";
2292
+ let dsName = `Project ${projectId.slice(0, 8)}`;
2293
+ try {
2294
+ const res = await fetch(registryUrl);
2295
+ if (res.ok) {
2296
+ const json = await res.json();
2297
+ if (json.meta?.installInstructions) body = json.meta.installInstructions;
2298
+ tokensCss = tokensCssFromRegistry(json);
2299
+ if (project.name) dsName = project.name;
2300
+ else if (json.name) dsName = json.name;
2301
+ }
2302
+ } catch {
2303
+ }
2304
+ const previewDoc = tokensCss ? buildDsPreviewDocument({ name: dsName, tokensCss, viewUrl: projectUrl }) : null;
2305
+ const lines = [
2306
+ `# Design system ready`,
2307
+ "",
2308
+ // Only authenticated callers (OAuth / API-key) own the project; anonymous
2309
+ // stdio callers get a neutral link, not a "your account" claim they can't honor.
2310
+ ...authContext ? [`Saved to your Better Design account. View, preview, and re-grab the install command anytime here:`] : [`View and preview your design system anytime here:`],
2311
+ projectUrl,
2312
+ "",
2313
+ // No sandbox link here: the pipeline kills the e2b sandbox in its final
2314
+ // step, so the stored URL is already dead. The project page respawns a
2315
+ // sandbox on view and is the durable live preview. [BD-86]
2316
+ `Project id: \`${projectId}\``,
2317
+ "",
2318
+ `To install it into a local project (Cursor, Claude Code, a checked-out repo):`,
2319
+ "",
2320
+ REQUIREMENTS_MD,
2321
+ body,
2322
+ ANTI_MOCKUP_MD,
2323
+ // Clients without Apps SDK widgets (Claude) can still show the system
2324
+ // visually: the doc below is self-contained HTML built from the real
2325
+ // tokens, sized for an artifact viewer.
2326
+ ...previewDoc ? [
2327
+ "",
2328
+ `IMPORTANT: if you can create artifacts (Claude) or render HTML, you MUST now create an HTML artifact from the document below so the user SEES the design system. Title it "Design system preview". Never print this code as text and never describe it instead of rendering it:`,
2329
+ "```html",
2330
+ previewDoc,
2331
+ "```"
2332
+ ] : []
2333
+ ];
2334
+ return {
2335
+ content: [{ type: "text", text: lines.join("\n") }],
2336
+ structuredContent: {
2337
+ status: "completed",
2338
+ name: dsName,
2339
+ viewUrl: projectUrl,
2340
+ installCommand: `npx shadcn@latest add ${registryUrl}`,
2341
+ tokensCss
2342
+ }
2343
+ };
2344
+ }
2345
+ if (project.designSystemStatus === "ERROR") {
2346
+ return {
2347
+ content: [{ type: "text", text: `Generation failed for project ${projectId}. Last step: ${project.currentStep ?? "(none)"}. The user can retry from ${projectUrl}.` }],
2348
+ structuredContent: { status: "error", name: `Project ${projectId.slice(0, 8)}`, viewUrl: projectUrl, tokensCss: "" }
2349
+ };
2350
+ }
2351
+ const step = project.currentStep ? project.currentStep.replace(/^[a-z]+:/, "") : void 0;
2352
+ const stepNote = step ? ` Current step: ${step}.` : "";
2353
+ return {
2354
+ content: [{ type: "text", text: `Still generating (status: ${project.designSystemStatus ?? "PENDING"}).${stepNote}
2355
+ Check again in ~30 seconds. Watch it live on the project page: ${projectUrl}` }],
2356
+ structuredContent: {
2357
+ status: (project.designSystemStatus ?? "PENDING").toLowerCase(),
2358
+ name: `Project ${projectId.slice(0, 8)}`,
2359
+ viewUrl: projectUrl,
2360
+ step,
2361
+ tokensCss: ""
2362
+ }
2363
+ };
2364
+ })
2365
+ );
2366
+ server.registerTool(
2367
+ "preview-design-system",
2368
+ {
2369
+ title: "Preview a Design System",
2370
+ description: `Show the user a visual preview of a design system from the catalog (use the id from 'resolve-design-system'). Returns a token-true HTML preview: palette, typography, buttons, card, input, badge, plus a link to the full live showcase. Use this when the user wants to SEE a design system before installing it.`,
2371
+ inputSchema: z.object({
2372
+ designSystemId: z.string().min(1).describe("Design system id from resolve-design-system, e.g. 'linear', 'editorial-warm'.")
2373
+ }),
2374
+ outputSchema: PREVIEW_OUTPUT_SCHEMA,
2375
+ annotations: {
2376
+ readOnlyHint: true,
2377
+ destructiveHint: false,
2378
+ openWorldHint: false
2379
+ },
2380
+ _meta: {
2381
+ ui: { resourceUri: DS_PREVIEW_WIDGET_URI },
2382
+ "ui/resourceUri": DS_PREVIEW_WIDGET_URI,
2383
+ "openai/outputTemplate": DS_PREVIEW_WIDGET_URI,
2384
+ "openai/toolInvocation/invoking": "Building the preview...",
2385
+ "openai/toolInvocation/invoked": "Preview ready"
2386
+ }
2387
+ },
2388
+ async ({ designSystemId }) => tracked("preview-design-system", { designSystemId }, async () => {
2389
+ const ds = await provider.getDesignSystemById(designSystemId);
2390
+ if (!ds) {
2391
+ return {
2392
+ content: [{ type: "text", text: `Design system "${designSystemId}" not found. Call resolve-design-system first to get a valid id.` }],
2393
+ structuredContent: { status: "error", name: designSystemId, tokensCss: "" }
2394
+ };
2395
+ }
2396
+ const tokensCss = await fetchCatalogTokensCss(designSystemId);
2397
+ const viewUrl = `${APP_BASE_URL}/design-systems/${designSystemId}`;
2398
+ if (!tokensCss) {
2399
+ return {
2400
+ content: [{ type: "text", text: `Could not load tokens for "${designSystemId}". The full live showcase is at ${viewUrl}.` }],
2401
+ structuredContent: { status: "error", name: ds.metadata.title, viewUrl, tokensCss: "" }
2402
+ };
2403
+ }
2404
+ const previewDoc = buildDsPreviewDocument({ name: ds.metadata.title, tokensCss, viewUrl });
2405
+ const text = [
2406
+ `# ${ds.metadata.title}`,
2407
+ "",
2408
+ ds.metadata.description,
2409
+ "",
2410
+ `Full live showcase (every component): ${viewUrl}`,
2411
+ "",
2412
+ `IMPORTANT: if you can create artifacts (Claude) or render HTML, you MUST now create an HTML artifact from the document below so the user SEES the design system. Title it "Design system preview". Never print this code as text and never describe it instead of rendering it:`,
2413
+ "```html",
2414
+ previewDoc,
2415
+ "```"
2416
+ ].join("\n");
2417
+ return {
2418
+ content: [{ type: "text", text }],
2419
+ structuredContent: {
2420
+ status: "completed",
2421
+ name: ds.metadata.title,
2422
+ viewUrl,
2423
+ tokensCss
2424
+ }
2425
+ };
2426
+ })
2427
+ );
2428
+ server.registerResource(
2429
+ "ds-preview-widget",
2430
+ DS_PREVIEW_WIDGET_URI,
2431
+ {
2432
+ mimeType: "text/html;profile=mcp-app",
2433
+ _meta: {
2434
+ ui: {
2435
+ prefersBorder: true,
2436
+ csp: { resourceDomains: WIDGET_RESOURCE_DOMAINS },
2437
+ domain: WIDGET_APP_DOMAIN
2438
+ }
2439
+ }
2440
+ },
2441
+ async () => ({
2442
+ contents: [
2443
+ {
2444
+ uri: DS_PREVIEW_WIDGET_URI,
2445
+ mimeType: "text/html;profile=mcp-app",
2446
+ text: DS_PREVIEW_WIDGET_HTML,
2447
+ // MCP Apps CSP (spec §UI Resource), set on the read result where the
2448
+ // host actually enforces it (docs/csp-cors.md). The MCP Apps SDK is now
2449
+ // INLINED in the widget (no esm.sh import) and the hero is a token-render
2450
+ // (no iframe), so the only external origins left are the Google Fonts
2451
+ // CDNs for webfont loading. `domain` gives the view a stable sandbox
2452
+ // origin Claude can allowlist (RFC 9728-style hash). [BD-92]
2453
+ _meta: {
2454
+ ui: {
2455
+ prefersBorder: true,
2456
+ csp: { resourceDomains: WIDGET_RESOURCE_DOMAINS },
2457
+ domain: WIDGET_APP_DOMAIN
2458
+ }
2459
+ }
2460
+ }
2461
+ ]
2462
+ })
2463
+ );
2464
+ }
2465
+ var ICONIFY_FETCH_TIMEOUT_MS, ICONIFY_API_BASE, REGISTRY_BASE_URL, REGISTRY_ITEM_SCHEMA, APP_BASE_URL, WIDGET_RESOURCE_DOMAINS, WIDGET_APP_DOMAIN, REQUIREMENTS_MD, ANTI_MOCKUP_MD, PREVIEW_OUTPUT_SCHEMA, MAX_OUTPUT_PREVIEW;
2466
+ var init_tools = __esm({
2467
+ "../shared/src/mcp/tools.ts"() {
2468
+ "use strict";
2469
+ init_icon_installer();
2470
+ init_guardrails();
2471
+ init_preview_html();
2472
+ init_topic_utils();
2473
+ ICONIFY_FETCH_TIMEOUT_MS = 1e4;
2474
+ ICONIFY_API_BASE = "https://api.iconify.design";
2475
+ REGISTRY_BASE_URL = process.env.BETTER_DESIGN_REGISTRY_URL ?? "https://better-design.com/registry";
2476
+ REGISTRY_ITEM_SCHEMA = z.object({
2477
+ cssVars: z.object({
2478
+ light: z.record(z.string(), z.string()).optional(),
2479
+ dark: z.record(z.string(), z.string()).optional(),
2480
+ theme: z.record(z.string(), z.string()).optional()
2481
+ }).optional(),
2482
+ files: z.array(z.object({ path: z.string().optional(), content: z.string().optional() })).optional()
2483
+ });
2484
+ APP_BASE_URL = process.env.BETTER_DESIGN_APP_URL ?? "https://better-design.com";
2485
+ WIDGET_RESOURCE_DOMAINS = [
2486
+ "https://fonts.googleapis.com",
2487
+ "https://fonts.gstatic.com"
2488
+ ];
2489
+ WIDGET_APP_DOMAIN = `${createHash("sha256").update(`${APP_BASE_URL}/api/mcp`).digest("hex").slice(0, 32)}.claudemcpcontent.com`;
2490
+ REQUIREMENTS_MD = `> **Requirements:** these components target **Tailwind v4**. The installed \`globals.css\` uses the v4 entry point (\`@import "tailwindcss"\`), so the project needs \`tailwindcss@^4\` with \`@tailwindcss/postcss\` in its PostCSS config (or the \`@tailwindcss/vite\` plugin). On a Tailwind v3 project, migrate to v4 first, otherwise the build throws the "trying to use tailwindcss directly as a PostCSS plugin" error.
2491
+ `;
2492
+ ANTI_MOCKUP_MD = `
2493
+ **Run the install. Do not substitute it.** Never hand-write these components from memory and never build a standalone HTML mockup as a stand-in: both skip the real design tokens, drift from the registry source, and cannot \`import\` from \`@/components/ui/*\`. The only correct output is running the command above in a real project, then composing the installed files.`;
2494
+ PREVIEW_OUTPUT_SCHEMA = z.object({
2495
+ status: z.string().describe("completed | error | pending | generating | selected"),
2496
+ name: z.string().describe("Display name of the design system or project."),
2497
+ viewUrl: z.string().optional().describe("Better Design page for this system/project."),
2498
+ installCommand: z.string().optional().describe("shadcn install command, when complete."),
2499
+ step: z.string().optional().describe("Current generation step, while generating."),
2500
+ tokensCss: z.string().describe("CSS custom-property stylesheet for the system's tokens.")
2501
+ });
2502
+ MAX_OUTPUT_PREVIEW = 1e3;
2503
+ }
2504
+ });
2505
+
2506
+ // ../shared/src/mcp/index.ts
2507
+ var mcp_exports = {};
2508
+ __export(mcp_exports, {
2509
+ INSTRUCTIONS: () => INSTRUCTIONS,
2510
+ createMcpServer: () => createMcpServer
2511
+ });
2512
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2513
+ function createMcpServer(options) {
2514
+ const {
2515
+ provider,
2516
+ name = "BetterDesign",
2517
+ version = "3.0.0",
2518
+ onToolUsage,
2519
+ authContext
2520
+ } = options;
2521
+ const server = new McpServer(
2522
+ { name, version },
2523
+ { instructions: INSTRUCTIONS }
2524
+ );
2525
+ registerAllTools(server, provider, onToolUsage, authContext);
2526
+ return server;
2527
+ }
2528
+ var init_mcp = __esm({
2529
+ "../shared/src/mcp/index.ts"() {
2530
+ "use strict";
2531
+ init_instructions();
2532
+ init_tools();
2533
+ init_instructions();
2534
+ }
2535
+ });
2536
+
2537
+ // src/lib/api-client.ts
2538
+ var api_client_exports = {};
2539
+ __export(api_client_exports, {
2540
+ getDesignSystem: () => getDesignSystem,
2541
+ getDesignSystemComponents: () => getDesignSystemComponents,
2542
+ getPrinciple: () => getPrinciple,
2543
+ getReviewRules: () => getReviewRules,
2544
+ listPrinciples: () => listPrinciples,
2545
+ searchDesignSystems: () => searchDesignSystems,
2546
+ searchIconLibraries: () => searchIconLibraries,
2547
+ searchIcons: () => searchIcons,
2548
+ searchPrinciples: () => searchPrinciples,
2549
+ trackMcpInstalled: () => trackMcpInstalled,
2550
+ trackToolUsage: () => trackToolUsage
2551
+ });
2552
+ import { createHash as createHash2 } from "crypto";
2553
+ async function request(path4) {
2554
+ if (!API_KEY) {
2555
+ throw new ApiError(401, "BETTER_DESIGN_API_KEY is not set. Get one at https://better-design.com/mcp");
2556
+ }
2557
+ const res = await fetch(`${API_URL}/api${path4}`, {
2558
+ headers: {
2559
+ Authorization: `Bearer ${API_KEY}`,
2560
+ "Content-Type": "application/json"
2561
+ },
2562
+ signal: AbortSignal.timeout(15e3)
2563
+ });
2564
+ if (!res.ok) {
2565
+ const body = await res.json().catch(() => ({ message: res.statusText }));
2566
+ throw new ApiError(res.status, body.message ?? `API error ${res.status}`);
2567
+ }
2568
+ return res.json();
2569
+ }
2570
+ async function searchDesignSystems(query, limit = 5) {
2571
+ return request(
2572
+ `/v1/design-systems/search?q=${encodeURIComponent(query)}&limit=${limit}`
2573
+ );
2574
+ }
2575
+ async function getDesignSystem(id) {
2576
+ return request(
2577
+ `/v1/design-systems/${encodeURIComponent(id)}`
2578
+ );
2579
+ }
2580
+ async function getDesignSystemComponents(id, names) {
2581
+ const params = names?.length ? `?names=${names.map(encodeURIComponent).join(",")}` : "";
2582
+ return request(
2583
+ `/v1/design-systems/${encodeURIComponent(id)}/components${params}`
2584
+ );
2585
+ }
2586
+ async function listPrinciples(area) {
2587
+ const params = area ? `?area=${area}` : "";
2588
+ return request(`/v1/principles${params}`);
2589
+ }
2590
+ async function getPrinciple(topic, area) {
2591
+ const params = area ? `?area=${area}` : "";
2592
+ return request(`/v1/principles/${encodeURIComponent(topic)}${params}`);
2593
+ }
2594
+ async function searchPrinciples(query, limit = 5, area) {
2595
+ const params = new URLSearchParams({ q: query, limit: String(limit) });
2596
+ if (area) params.set("area", area);
2597
+ return request(
2598
+ `/v1/principles/search?${params}`
2599
+ );
2600
+ }
2601
+ async function searchIconLibraries(query, limit = 5) {
2602
+ return request(
2603
+ `/v1/icon-libraries/search?q=${encodeURIComponent(query)}&limit=${limit}`
2604
+ );
2605
+ }
2606
+ async function searchIcons(libraryId, query, variant, limit = 15) {
2607
+ const params = new URLSearchParams({ q: query, limit: String(limit) });
2608
+ if (variant) params.set("variant", variant);
2609
+ return request(
2610
+ `/v1/icon-libraries/${encodeURIComponent(libraryId)}/icons?${params}`
2611
+ );
2612
+ }
2613
+ async function getReviewRules(category = "all") {
2614
+ const params = category !== "all" ? `?category=${encodeURIComponent(category)}` : "";
2615
+ return request(`/v1/review-rules${params}`);
2616
+ }
2617
+ function postAlert(body) {
2618
+ fetch(`${API_URL}/api/internal/alert`, {
2619
+ method: "POST",
2620
+ headers: { "Content-Type": "application/json" },
2621
+ body: JSON.stringify(body),
2622
+ signal: AbortSignal.timeout(5e3)
2623
+ }).catch(() => {
2624
+ });
2625
+ }
2626
+ function trackToolUsage(tool, params, context = {}) {
2627
+ postAlert({
2628
+ type: "mcp-usage",
2629
+ tool,
2630
+ params,
2631
+ apiKeyHash: API_KEY_HASH,
2632
+ clientName: context.clientName,
2633
+ clientVersion: context.clientVersion,
2634
+ mcpVersion: process.env.npm_package_version,
2635
+ outputPreview: context.outputPreview
2636
+ });
2637
+ }
2638
+ function trackMcpInstalled(opts) {
2639
+ postAlert({
2640
+ type: "mcp-installed",
2641
+ apiKeyHash: API_KEY_HASH,
2642
+ clientName: opts.clientName,
2643
+ clientVersion: opts.clientVersion,
2644
+ mcpVersion: process.env.npm_package_version
2645
+ });
2646
+ }
2647
+ var API_URL, API_KEY, API_KEY_HASH, ApiError;
2648
+ var init_api_client = __esm({
2649
+ "src/lib/api-client.ts"() {
2650
+ "use strict";
2651
+ API_URL = process.env.API_URL ?? "https://better-design.com";
2652
+ API_KEY = process.env.BETTER_DESIGN_API_KEY;
2653
+ API_KEY_HASH = API_KEY ? createHash2("sha256").update(API_KEY).digest("hex") : void 0;
2654
+ ApiError = class extends Error {
2655
+ constructor(status, message) {
2656
+ super(message);
2657
+ this.status = status;
2658
+ this.name = "ApiError";
2659
+ }
2660
+ status;
2661
+ };
2662
+ }
2663
+ });
2664
+
2665
+ // src/lib/http-data-provider.ts
2666
+ var http_data_provider_exports = {};
2667
+ __export(http_data_provider_exports, {
2668
+ createHttpDataProvider: () => createHttpDataProvider
2669
+ });
2670
+ function createHttpDataProvider() {
2671
+ return {
2672
+ async searchDesignSystems(query, limit = 5) {
2673
+ const { results } = await searchDesignSystems(query, limit);
2674
+ return results;
2675
+ },
2676
+ async getDesignSystemById(id) {
2677
+ const [systemRes, componentsRes] = await Promise.all([
2678
+ getDesignSystem(id),
2679
+ getDesignSystemComponents(id)
2680
+ ]);
2681
+ return {
2682
+ metadata: systemRes.metadata,
2683
+ components: componentsRes.components
2684
+ };
2685
+ },
2686
+ async listPrinciples(area) {
2687
+ const { principles } = await listPrinciples(area);
2688
+ return principles;
2689
+ },
2690
+ async getPrincipleByTopic(topic, area) {
2691
+ try {
2692
+ return await getPrinciple(topic, area);
2693
+ } catch {
2694
+ return null;
2695
+ }
2696
+ },
2697
+ async searchPrinciples(query, limit = 5, area) {
2698
+ const { results } = await searchPrinciples(query, limit, area);
2699
+ return results;
2700
+ },
2701
+ async getReviewRules(category = "all") {
2702
+ const { rules } = await getReviewRules(category);
2703
+ return rules;
2704
+ },
2705
+ async searchIconLibraries(query, limit = 5) {
2706
+ const { results } = await searchIconLibraries(query, limit);
2707
+ return results;
2708
+ },
2709
+ async getIconLibraryById(id) {
2710
+ const { results } = await searchIconLibraries(id, 1);
2711
+ const match = results.find((r) => r.id === id);
2712
+ if (!match) return null;
2713
+ return {
2714
+ id: match.id,
2715
+ name: match.name,
2716
+ prefix: match.prefix,
2717
+ variants: match.variants,
2718
+ defaultVariant: match.defaultVariant,
2719
+ variantFormat: null
2720
+ };
2721
+ },
2722
+ async searchIconsInLibrary(query, library, variant, limit = 15) {
2723
+ const { icons } = await searchIcons(library.id, query, variant, limit);
2724
+ return icons;
2725
+ }
2726
+ };
2727
+ }
2728
+ var init_http_data_provider = __esm({
2729
+ "src/lib/http-data-provider.ts"() {
2730
+ "use strict";
2731
+ init_api_client();
2732
+ }
2733
+ });
2734
+
2735
+ // src/index.ts
2736
+ var argv = process.argv.slice(2);
2737
+ var command = argv[0];
2738
+ if (command === "setup" || !command) {
2739
+ const { runSetup: runSetup2 } = await Promise.resolve().then(() => (init_setup(), setup_exports));
2740
+ runSetup2(argv.slice(1)).catch((error) => {
2741
+ console.error(error);
2742
+ process.exit(1);
2743
+ });
2744
+ } else {
2745
+ startServer().catch((error) => {
2746
+ console.error("Fatal error:", error);
2747
+ process.exit(1);
2748
+ });
2749
+ }
2750
+ async function startServer() {
2751
+ const { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
2752
+ const { createMcpServer: createMcpServer2 } = await Promise.resolve().then(() => (init_mcp(), mcp_exports));
2753
+ const { createHttpDataProvider: createHttpDataProvider2 } = await Promise.resolve().then(() => (init_http_data_provider(), http_data_provider_exports));
2754
+ const { trackToolUsage: trackToolUsage2, trackMcpInstalled: trackMcpInstalled2 } = await Promise.resolve().then(() => (init_api_client(), api_client_exports));
2755
+ const server = createMcpServer2({
2756
+ provider: createHttpDataProvider2(),
2757
+ name: "DesignSystems",
2758
+ version: "3.0.0",
2759
+ onToolUsage: trackToolUsage2
2760
+ });
2761
+ server.server.oninitialized = () => {
2762
+ try {
2763
+ const info = server.server.getClientVersion?.();
2764
+ trackMcpInstalled2({ clientName: info?.name, clientVersion: info?.version });
2765
+ } catch {
2766
+ }
2767
+ };
2768
+ const transport = new StdioServerTransport();
2769
+ await server.connect(transport);
2770
+ console.error("Better Design MCP Server v3.0 running on stdio");
2771
+ }
2772
+ //# sourceMappingURL=index.js.map