@svgt/mcp 0.0.0-stage → 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pablo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,122 @@
1
- # Temporary Holding Version
1
+ # @svgt/mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A Model Context Protocol (MCP) server that turns SVG into frontend components, so an AI agent can convert icons inside your project instead of you pasting each one into the svgt playground.
4
+
5
+ ## Installation
6
+
7
+ Clients start the server with `npx` and talk to it over standard input and output (STDIO), so it needs Node.js 22.13 or later.
8
+
9
+ ### Claude Code
10
+
11
+ ```bash
12
+ claude mcp add svgt -- npx -y @svgt/mcp
13
+ ```
14
+
15
+ On native Windows (not WSL), Claude Code can't start `npx` directly, so wrap it with `cmd /c`:
16
+
17
+ ```bash
18
+ claude mcp add svgt -- cmd /c npx -y @svgt/mcp
19
+ ```
20
+
21
+ ### OpenAI Codex
22
+
23
+ ```bash
24
+ codex mcp add svgt -- npx -y @svgt/mcp
25
+ ```
26
+
27
+ Or add it to `~/.codex/config.toml`, which the Codex CLI, IDE extension and app share:
28
+
29
+ ```toml
30
+ [mcp_servers.svgt]
31
+ command = "npx"
32
+ args = ["-y", "@svgt/mcp"]
33
+ ```
34
+
35
+ ### Cursor
36
+
37
+ Add it to `.cursor/mcp.json` in your project, or to `~/.cursor/mcp.json` for every project:
38
+
39
+ ```json
40
+ {
41
+ "mcpServers": {
42
+ "svgt": {
43
+ "command": "npx",
44
+ "args": ["-y", "@svgt/mcp"]
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ ### VS Code
51
+
52
+ Add it to `.vscode/mcp.json` in your workspace. VS Code uses `servers` instead of `mcpServers`:
53
+
54
+ ```json
55
+ {
56
+ "servers": {
57
+ "svgt": {
58
+ "type": "stdio",
59
+ "command": "npx",
60
+ "args": ["-y", "@svgt/mcp"]
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ ### Other clients
67
+
68
+ Any client that supports STDIO servers can run it with the command `npx` and the arguments `-y @svgt/mcp`.
69
+
70
+ ## Tools
71
+
72
+ ### `transform-svg`
73
+
74
+ Transforms SVG into a component and returns the code with the file name the framework expects, such as `ArrowLeft.tsx` for React or `arrow-left.component.ts` for Angular.
75
+
76
+ | Option | Type | Default |
77
+ | ------------- | ----------------------------------------------------------------------------------------------- | ----------- |
78
+ | `svg` | `string` | required |
79
+ | `framework` | `react` \| `preact` \| `solid` \| `svelte` \| `vue` \| `angular` \| `astro` \| `web-components` | required |
80
+ | `name` | `string`, converted to PascalCase | `"SvgIcon"` |
81
+ | `typescript` | `boolean`, ignored by Vue and Angular | `true` |
82
+ | `exportType` | `default` \| `directly`, only React, Preact, Solid and Web Components | `"default"` |
83
+ | `dimensions` | `boolean`, keep `width` and `height` on the root `<svg>` | `true` |
84
+ | `expandProps` | `start` \| `end` \| `none`, only React, Preact, Solid, Svelte and Astro | `"end"` |
85
+ | `svgProps` | `Record<string, string \| null>`, `null` removes the attribute | — |
86
+
87
+ ### `transform-svg-files`
88
+
89
+ Reads `.svg` files or folders from disk and writes one component per file to `outDir`, or returns the code when `outDir` is omitted.
90
+
91
+ It accepts the same options as `transform-svg` except `svg`, plus:
92
+
93
+ | Option | Type | Default |
94
+ | -------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
95
+ | `paths` | `string[]`, files or folders; folders are searched recursively, skipping `node_modules`, `dist`, `build` and hidden folders | required |
96
+ | `outDir` | `string`, created if missing; omit it to get the code back (up to 20 files) without writing anything | — |
97
+ | `name` | `string`, only with a single input file | the file name in PascalCase |
98
+ | `force` | `boolean`, overwrite components that already exist in `outDir` | `false` |
99
+
100
+ A component that already exists is skipped and listed in the result unless `force` is set. An SVG that fails to parse, or two SVGs that would write the same file, are reported without stopping the rest, and the call only fails when no file converts.
101
+
102
+ Relative paths resolve against the server's working directory, which is the folder the client started it from (in most clients, the open project), so absolute paths are the safer choice.
103
+
104
+ ### `list-frameworks`
105
+
106
+ Lists the supported frameworks, whether each accepts the `typescript` option, and the file names it uses. It takes no options.
107
+
108
+ ## Development
109
+
110
+ Built with [xmcp](https://xmcp.dev) on top of [`@svgt/core`](https://github.com/pheralb/svgt/tree/main/packages/core).
111
+
112
+ ```bash
113
+ pnpm --filter @svgt/mcp dev # watch mode
114
+ pnpm --filter @svgt/mcp build # dist/stdio.js and dist/http.js
115
+ pnpm --filter @svgt/mcp start-http # http://127.0.0.1:3001/mcp
116
+ ```
117
+
118
+ To try a local build in Claude Code:
119
+
120
+ ```bash
121
+ claude mcp add svgt-dev -- node /absolute/path/to/packages/mcp/dist/stdio.js
122
+ ```
package/dist/116.js ADDED
@@ -0,0 +1,100 @@
1
+ export const __rspack_esm_ids=[116];export const __webpack_modules__={217(e,t,r){r.d(t,{},{K:e=>({title:e,readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1}),T:e=>({title:e,readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1})})},660(e,t,r){r.d(t,{OU:()=>J,HO:()=>V,K9:()=>W,gJ:()=>G,$4:()=>H});var n=r(326),i=r(796),o=r(448);let a=["start","end",!1],s="...props",l=e=>e.name===s,u=(e,t)=>{let r=(e,n,i)=>{let o=" ".repeat(i);if("text"===e.type)return o+t.text(e.value,n);let a=e.attributes.map(r=>l(r)?t.spread??null:t.attribute(r,e)).filter(e=>null!==e),s=a.length?` ${a.join(" ")}`:"",u=o.length+e.name.length+s.length+3<=80||a.length<2?s:`
2
+ ${a.map(e=>o+" "+e).join(`
3
+ `)}
4
+ ${o}`;if(!e.children.length)return`${o}<${e.name}${u}${u.endsWith(`
5
+ `+o)?"":" "}/>`;if(e.children.every(e=>"text"===e.type)){let r=e.children.map(r=>t.text(r.value,e)).join(" ");return`${o}<${e.name}${u}>${r}</${e.name}>`}let c=e.children.map(t=>r(t,e,i+1)).join(`
6
+ `);return`${o}<${e.name}${u}>
7
+ ${c}
8
+ ${o}</${e.name}>`};return r(e,e,t.indent??0)},c=/[\w:.-]/,d=/\s/,p={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xa0"},f=e=>e.replace(/&(#x[\da-f]+|#\d+|\w+);/gi,(e,t)=>{if("#"===t[0]){let r="x"===t[1]||"X"===t[1]?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Number.isNaN(r)?e:String.fromCodePoint(r)}return p[t.toLowerCase()]??e}),h=new Set(["width","height"]),m=/^[A-Za-z_][\w:.-]*$/,g=e=>m.test(e),y={dimensions:(e,t)=>{t||(e.attributes=e.attributes.filter(({name:e})=>!h.has(e)))},svgProps:(e,t)=>{for(let[r,n]of Object.entries(t)){if(!g(r))throw Error(`[svgt] Invalid attribute name in svgProps: "${r}"`);let t=e.attributes.findIndex(e=>e.name===r);null===n?e.attributes=e.attributes.filter(e=>e.name!==r):-1===t?e.attributes.push({name:r,value:n}):e.attributes[t]={name:r,value:n}}},expandProps:(e,t)=>{if(!a.includes(t))throw Error(`[svgt] Invalid expandProps: ${JSON.stringify(t)}. Use "start", "end" or false.`);if(e.attributes=e.attributes.filter(e=>!l(e)),!1===t)return;let r={name:s,value:""};"start"===t?e.attributes.unshift(r):e.attributes.push(r)}},v=["default","directly"],_=(e,t={})=>{let{name:r="SvgIcon",exportType:n="default",expandProps:i="end",...a}=t.output??{};if(!v.includes(n))throw Error(`[svgt] Invalid exportType: ${JSON.stringify(n)}. Use "default" or "directly".`);let s=(e=>{let t=e.trim(),r=0,n=e=>{throw Error(`[svgt] ${e} (at position ${r})`)},i=()=>{for(;r<t.length&&d.test(t[r]);)r++},o=e=>{let i=t.indexOf(e,r);-1===i&&n(`Expected "${e}"`),r=i+e.length},a=()=>{let e=r;for(;r<t.length&&c.test(t[r]);)r++;return e===r&&n("Expected a tag or attribute name"),t.slice(e,r)},s=()=>{let e=[];for(;;){i();let o=t[r];if(void 0===o&&n("Unexpected end of input"),">"===o||"/"===o)return e;let s=a();i();let l="";if("="===t[r]){r++,i();let e=t[r];if('"'===e||"'"===e){let i=t.indexOf(e,r+1);-1===i&&n(`Unclosed attribute value for "${s}"`),l=t.slice(r+1,i),r=i+1}else{let e=r;for(;r<t.length&&!/[\s/>]/.test(t[r]);)r++;l=t.slice(e,r)}}e.push({name:s,value:f(l)})}},l=e=>{let u=[];for(;r<t.length;)if(t.startsWith("\x3c!--",r))o("--\x3e");else if(t.startsWith("<![CDATA[",r)){let e=r+9;o("]]>"),u.push({type:"text",value:t.slice(e,r-3)})}else if(t.startsWith("<?",r))o("?>");else if(t.startsWith("<!",r))o(">");else if(t.startsWith("</",r)){r+=2;let t=a();return e&&t===e.name||n(`Unexpected closing tag </${t}>`),i(),o(">"),u}else if("<"===t[r]){r++;let e={type:"element",name:a(),attributes:s(),children:[]};"/"===t[r]?(">"!==t[++r]&&n("Expected '>'"),r++):(r++,e.children=l(e)),u.push(e)}else{let e=t.indexOf("<",r),n=t.slice(r,-1===e?t.length:e);r=-1===e?t.length:e;let i=f(n).replace(/\s+/g," ");i.trim()&&u.push({type:"text",value:i.trim()})}return e&&n(`Unclosed tag <${e.name}>`),u},u=l(null).find(e=>"element"===e.type&&"svg"===e.name);if(!u)throw Error("[svgt] No <svg> root element found");return u})(((e,t)=>{let r;if(!t)return e;try{r=t(e)}catch(t){let e=t instanceof Error?t.message:String(t);throw Error(`[svgt] preTransform failed: ${e}`,{cause:t})}if("string"!=typeof r){let e=r instanceof Promise?"a Promise":typeof r;throw Error(`[svgt] preTransform must return a string, got ${e}`)}return r})(e,t.preTransform));return((e,t)=>{for(let r of Object.keys(y)){let n=t[r];void 0!==n&&y[r](e,n)}})(s,{...a,expandProps:i}),{root:s,name:(0,o.r)(r),typescript:t.typescript??!0,exportType:n}},b=e=>e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;"),$=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),w=e=>e.replace(/\{/g,"&#123;").replace(/\}/g,"&#125;"),z=e=>e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${"),k=({name:e,value:t},r=b)=>`${e}="${r(t)}"`,O=new Set(["style","script"]),x=e=>({attribute:e=>k(e,e=>w(b(e))),text:(e,t)=>O.has(t.name)?e:w($(e)),spread:e}),S=(e,t)=>{for(let r of(t(e),e.children))"element"===r.type&&S(r,t)},P=(e,t)=>t.attributes.some(({name:t})=>t===e)?null:e,T=(e,t)=>/["\\&\n{}]/.test(t)?`${e}={${JSON.stringify(t)}}`:`${e}="${t}"`,A=(e,t)=>O.has(t.name)?`{${JSON.stringify(e)}}`:e.replace(/[{}<>&]/g,e=>`{${JSON.stringify(e)}}`),j=({name:e,markup:t,params:r,imports:n,exportType:i})=>{let o=n.length?`${n.join(`
9
+ `)}
10
+
11
+ `:"",a=`const ${e} = (${r}) => (
12
+ ${t}
13
+ );
14
+ `;return"directly"===i?`${o}export ${a}`:`${o}${a}
15
+ export default ${e};
16
+ `},E=new Set(["tabIndex"]),Z=({name:e,value:t},r)=>{let n="xlink:href"===e?P("href",r):"xml:lang"===e?P("lang",r):/^(xlink|xml|xmlns):/.test(e)?null:e;return null===n?null:T(n,t)},I=new Set(["tabindex","aria-colcount","aria-colindex","aria-colspan","aria-level","aria-posinset","aria-rowcount","aria-rowindex","aria-rowspan","aria-setsize","aria-valuemax","aria-valuemin","aria-valuenow"]),N=({name:e,value:t},r)=>{let n="xlink:href"===e?P("href",r):"xmlns:xlink"===e?null:e;return null===n?null:I.has(n)&&/^-?\d+(\.\d+)?$/.test(t)?`${n}={${t}}`:T(n,t)},C=["width","height","fill","stroke","stroke-width"],F={react:(e,t)=>{let{root:r,name:n,typescript:i,exportType:a}=_(e,t),s=u(r,{attribute:e=>(({name:e,value:t},r)=>{let n="class"===e?"className":"tabindex"===e?"tabIndex":e.startsWith("data-")||e.startsWith("aria-")?e:(0,o.t)(e);if("style"===n){let e=`{{ ${t.split(";").map(e=>{let t=e.indexOf(":");if(-1===t)return null;let r=e.slice(0,t).trim(),n=e.slice(t+1).trim();return r&&n?`${r.startsWith("--")?JSON.stringify(r):(0,o.t)(r.toLowerCase().replace(/^-ms-/,"ms-"))}: ${JSON.stringify(n)}`:null}).filter(Boolean).join(", ")} }}`;return r&&e.includes('"--')?`style={${e.slice(1,-1)} as CSSProperties}`:`style=${e}`}return E.has(n)&&/^-?\d+$/.test(t)?`${n}={${t}}`:T(n,t)})(e,i),text:A,spread:"{...props}",indent:1}),c=r.attributes.some(l),d=[s.includes(" as CSSProperties}")&&"CSSProperties",c&&"SVGProps"].filter(Boolean);return j({name:n,markup:s,params:c?i?"props: SVGProps<SVGSVGElement>":"props":"",imports:i&&d.length?[`import type { ${d.join(", ")} } from "react";`]:[],exportType:a})},preact:(e,t)=>{let{root:r,name:n,typescript:i,exportType:o}=_(e,t),a=u(r,{attribute:N,text:A,spread:"{...props}",indent:1}),s=r.attributes.some(l);return j({name:n,markup:a,params:s?i?"props: SVGAttributes<SVGSVGElement>":"props":"",imports:i&&s?['import type { SVGAttributes } from "preact";']:[],exportType:o})},solid:(e,t)=>{let{root:r,name:n,typescript:i,exportType:o}=_(e,t),a=u(r,{attribute:Z,text:A,spread:"{...props}",indent:1}),s=r.attributes.some(l);return j({name:n,markup:a,params:s?i?'props: ComponentProps<"svg">':"props":"",imports:i&&s?['import type { ComponentProps } from "@solidjs/web";']:[],exportType:o})},svelte:(e,t)=>{let{root:r,typescript:n}=_(e,t),i=u(r,x("{...props}"));return r.attributes.some(l)?`${n?`<script lang="ts">
17
+ import type { SVGAttributes } from "svelte/elements";
18
+
19
+ let props: SVGAttributes<SVGSVGElement> = $props();
20
+ <\/script>`:`<script>
21
+ let props = $props();
22
+ <\/script>`}
23
+
24
+ ${i}
25
+ `:`${i}
26
+ `},vue:(e,t)=>{let{root:r}=_(e,t);return S(r,e=>{O.has(e.name)&&(e.attributes.unshift({name:"is",value:e.name}),e.name="component")}),`<template>
27
+ ${u(r,{...x(),indent:1})}
28
+ </template>
29
+ `},angular:(e,t)=>{let{root:r,name:n}=_(e,t),i=x(),a=u(r,{...i,text:(e,t)=>i.text(e,t).replace(/@/g,"&#64;"),indent:2}),s=(0,o.n)(n),l=n.endsWith("Component")?n:`${n}Component`;return`import { ChangeDetectionStrategy, Component } from "@angular/core";
30
+
31
+ @Component({
32
+ selector: "${s}",
33
+ changeDetection: ChangeDetectionStrategy.OnPush,
34
+ host: { style: "display: contents" },
35
+ template: \`
36
+ ${z(a)}
37
+ \`,
38
+ })
39
+ export class ${l} {}
40
+ `},astro:(e,t)=>{let{root:r,typescript:n}=_(e,t);S(r,e=>{O.has(e.name)&&e.attributes.push({name:"is:inline",value:""})});let i=x("{...props}"),o=u(r,{...i,attribute:(e,t)=>"is:inline"===e.name?"is:inline":i.attribute(e,t)});return r.attributes.some(l)?`${n?`---
41
+ import type { HTMLAttributes } from "astro/types";
42
+
43
+ type Props = HTMLAttributes<"svg">;
44
+
45
+ const props = Astro.props;
46
+ ---`:`---
47
+ const props = Astro.props;
48
+ ---`}
49
+
50
+ ${o}
51
+ `:`${o}
52
+ `},"web-components":(e,t)=>{let{root:r,name:n,typescript:i,exportType:a}=_(e,t),s="directly"===a,l=u(r,{attribute:e=>k(e),text:(e,t)=>O.has(t.name)?e:$(e),indent:1}),c=(0,o.n)(n),d=c.includes("-")?c:`svg-${c}`,p=C.map(e=>`"${e}"`).join(", "),f=e=>i?e:"",h=f(`
53
+ declare global {
54
+ interface HTMLElementTagNameMap {
55
+ "${d}": ${n};
56
+ }
57
+ }
58
+ `);return`const template = document.createElement("template");
59
+ template.innerHTML = \`
60
+ <style>:host { display: inline-flex; }</style>
61
+ ${z(l)}
62
+ \`;
63
+
64
+ ${s?"export ":""}class ${n} extends HTMLElement {
65
+ static observedAttributes = [${p}];
66
+
67
+ #svg${f(": SVGSVGElement")};
68
+
69
+ constructor() {
70
+ super();
71
+ const shadow = this.attachShadow({ mode: "open" });
72
+ shadow.append(template.content.cloneNode(true));
73
+ this.#svg = ${i?'shadow.querySelector("svg")!':'/** @type {SVGSVGElement} */ (shadow.querySelector("svg"))'};
74
+ }
75
+
76
+ attributeChangedCallback(
77
+ name${f(": string")},
78
+ _previous${f(": string | null")},
79
+ value${f(": string | null")},
80
+ ) {
81
+ if (value === null) this.#svg.removeAttribute(name);
82
+ else this.#svg.setAttribute(name, value);
83
+ }
84
+ }
85
+
86
+ if (!customElements.get("${d}")) {
87
+ customElements.define("${d}", ${n});
88
+ }
89
+ ${s?"":`
90
+ export default ${n};
91
+ `}${h}`}},D=(e,t)=>new Intl.ListFormat("en-GB",{type:t}).format(e.map(e=>i.i[e].label)),J=D(i.Gt,"disjunction"),U=D(i.Gt.filter(e=>!i.i[e].typescriptOption),"conjunction"),M=D(i.Gt.filter(e=>i.i[e].exportTypeOption),"conjunction"),R=D(i.Gt.filter(e=>i.i[e].expandPropsOption),"conjunction"),L={react:e=>e?"tsx":"jsx",preact:e=>e?"tsx":"jsx",solid:e=>e?"tsx":"jsx",svelte:()=>"svelte",vue:()=>"vue",angular:()=>"ts",astro:()=>"astro","web-components":e=>e?"ts":"js"},V={framework:n.k5n(i.Gt).describe("The framework to generate the component for."),typescript:n.zMY().optional().describe(`Generate TypeScript (true) or JavaScript (false). Defaults to true. ${U} ignore it.`),exportType:n.k5n(["default","directly"]).optional().describe(`How the component is exported: "default" or "directly" (named). Only ${M} use it.`),dimensions:n.zMY().optional().describe("Keep width and height on the root <svg>. Defaults to true."),expandProps:n.k5n(["start","end","none"]).optional().describe(`Where to spread the component props on the root <svg>: "end" (props override the SVG attributes, default), "start" (SVG attributes win) or "none". Only ${R} use it.`),svgProps:n.g1P(n.YjP(),n.YjP().nullable()).optional().describe("Attributes to add or replace on the root <svg>. A null value removes the attribute.")},W=({framework:e,typescript:t=!0,exportType:r,dimensions:n,expandProps:o,svgProps:a})=>{let{label:s,typescriptOption:l,exportTypeOption:u,expandPropsOption:c}=i.i[e],d=l&&t,p=[];r&&!u&&p.push(`exportType is ignored: ${s} has a single export style.`),o&&"end"!==o&&!c&&p.push(`expandProps is ignored: ${s} doesn't spread props.`),l||t||p.push(`typescript is ignored: ${s} output is the same either way.`);let f={dimensions:n,svgProps:a,expandProps:c?"none"!==o&&o:void 0,exportType:u?r:void 0};return{notes:p,fileName:t=>(0,i.Md)(e,t,d),fence:t=>`\`\`\`${L[e](d)}
92
+ ${t.trimEnd()}
93
+ \`\`\``,render:(r,n)=>{let i={output:{...f,name:n}};l&&(i.typescript=t);let o=F[e];if(!o)throw Error(`[svgt] Unknown framework "${e}"`);return o(r,i)}}},G=e=>e instanceof Error?e.message:String(e),H=e=>({isError:!0,content:[{type:"text",text:e}]})},475(e,t,r){r.r(t);var n=r(217),i=r(796);let o={name:"list-frameworks",description:"List the supported frameworks, their file names and whether each takes the typescript option.",annotations:(0,n.T)("List supported frameworks")};r.d(t,{},{default:function(){return i.Gt.map(e=>{let{label:t,typescriptOption:r}=i.i[e],n=r?[...new Set([(0,i.Md)(e,"Icon",!0),(0,i.Md)(e,"Icon",!1)])]:[(0,i.Md)(e,"Icon")];return`- ${e} (${t}): typescript option ${r?"yes":"no"}; file ${n.join(" / ")}`}).join("\n")},metadata:o})},806(e,t,r){r.r(t),r.d(t,{default:()=>v,metadata:()=>y,schema:()=>g});var n=r(326),i=r(455),o=r(760);let a=new Set(["node_modules","dist","build"]),s=e=>".svg"===(0,o.extname)(e).toLowerCase(),l=e=>e.startsWith(".")||a.has(e),u=async e=>{let t=[];for(let r of(await (0,i.readdir)(e,{withFileTypes:!0}))){let n=(0,o.join)(e,r.name);r.isDirectory()&&!l(r.name)?t.push(...await u(n)):r.isFile()&&s(r.name)&&t.push(n)}return t.sort()},c=e=>(0,i.readFile)(e,"utf8"),d=(e,t)=>(0,i.writeFile)(e,`${t.trimEnd()}
94
+ `),p=e=>(0,i.access)(e).then(()=>!0,()=>!1),f=e=>{let t=(0,o.relative)(process.cwd(),e);return t?t.startsWith("..")||(0,o.isAbsolute)(t)?e:t:"."};var h=r(660),m=r(217);let g={paths:n.YOg(n.YjP().min(1)).min(1).describe("SVG files or folders to convert. Folders are searched recursively, skipping node_modules, dist, build and hidden folders. Relative paths resolve against the server's working directory; prefer absolute paths."),outDir:n.YjP().optional().describe("Folder to write the components to, created if missing. Omit it to return the components without writing anything."),name:n.YjP().optional().describe("Component name for a single input file, converted to PascalCase. Defaults to the file name."),force:n.zMY().optional().describe("Overwrite components that already exist in outDir. Defaults to false, which skips them."),...h.HO},y={name:"transform-svg-files",description:`Transform .svg files on disk into components for ${h.OU}. Writes them to outDir, or returns the code if it is omitted. STDIO only.`,annotations:(0,m.K)("Transform SVG files into components")};async function v({paths:e,outDir:t,name:r,force:n=!1,...a},l){let m,g;if(l.requestInfo)return(0,h.$4)("transform-svg-files only works over STDIO: this server is running over HTTP and cannot access the user's files. Use transform-svg with the SVG markup instead.");try{m=await (async e=>{let t=new Set;for(let r of e){let e=(0,o.resolve)(r);if((await (0,i.stat)(e).catch(()=>{throw Error(`Not found: ${r}`)})).isDirectory())for(let r of(await u(e)))t.add(r);else if(s(e))t.add(e);else throw Error(`Not an .svg file: ${r}`)}return[...t]})(e)}catch(e){return(0,h.$4)((0,h.gJ)(e))}if(0===m.length)return(0,h.$4)("No .svg files found.");if(r&&m.length>1)return(0,h.$4)(`name can only be used with a single input file, got ${m.length}.`);if(!t&&m.length>20)return(0,h.$4)(`Found ${m.length} .svg files. Set outDir to write them to disk, or pass at most 20 files to get the code back.`);try{g=(0,h.K9)(a)}catch(e){return(0,h.$4)((0,h.gJ)(e))}let y=t?(0,o.resolve)(t):void 0;if(y)try{await (async e=>{await (0,i.mkdir)(e,{recursive:!0})})(y)}catch(e){return(0,h.$4)(`Could not create ${f(y)}: ${(0,h.gJ)(e)}`)}let _=[],b=[],$=new Map,w=0;for(let e of m){let t=f(e),i=r??(0,o.basename)(e),a=g.fileName(i);if(!y){try{let r=g.render(await c(e),i);b.push(`File: ${a} (from ${t})
95
+
96
+ ${g.fence(r)}`)}catch(e){b.push(`Failed ${t}: ${(0,h.gJ)(e)}`),w++}continue}let s=(0,o.join)(y,a),l=f(s),u=$.get(s);if(u){_.push(`Failed ${t}: same output file as ${u} (${l})`),w++;continue}try{let r=g.render(await c(e),i),o=await p(s);if(o&&!n){_.push(`Skipped ${l}: it already exists (set force to overwrite)`);continue}await d(s,r),$.set(s,t),_.push(`${o?"Overwrote":"Created"} ${l} (from ${t})`)}catch(e){_.push(`Failed ${t}: ${(0,h.gJ)(e)}`),w++}}let z=[[y?`${$.size} of ${m.length} components written to ${f(y)}`:`${m.length-w} of ${m.length} components generated`,...g.notes].join("\n"),...y?[_.join("\n")]:b].join("\n\n");return w===m.length?(0,h.$4)(z):z}},650(e,t,r){r.r(t);var n=r(660),i=r(326),o=r(217);let a={svg:i.YjP().min(1).describe("The SVG markup to transform."),name:i.YjP().optional().describe('Component name, converted to PascalCase. Defaults to "SvgIcon".'),...n.HO},s={name:"transform-svg",description:`Transform SVG markup into a component for ${n.OU}. For .svg files on disk, use transform-svg-files.`,annotations:(0,o.T)("Transform SVG into a component")};r.d(t,{},{default:function({svg:e,name:t="SvgIcon",...r}){try{let i=(0,n.K9)(r),o=i.render(e,t),a=[`File: ${i.fileName(t)}`,...i.notes];return`${a.join("\n")}
97
+
98
+ ${i.fence(o)}`}catch(e){return(0,n.$4)((0,n.gJ)(e))}},metadata:s,schema:a})},326(e,t,r){var n,i;let o,a,s,l,u,c,d,p,f,h;function m(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function g(e,t="|"){return e.map(e=>S(e)).join(t)}function y(e,t){return"bigint"==typeof t?t.toString():t}function v(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function _(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}r.d(t,{YOg:()=>np,zMY:()=>nc,k5n:()=>nv,g1P:()=>ng,YjP:()=>rB});let b="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function $(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function w(e){if(!1===$(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==$(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function z(e){return w(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let k=new Set(["string","number","symbol"]);function O(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function x(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function S(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}let P={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},T={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function A(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function j(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function E(e){return"string"==typeof e?e:e?.message}function Z(e){let t=[];for(let r of e??[]){let e=r._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let n=e.maximum??e.length??e.size;n>=0&&t.push([n,r])}return t}function I(e,t,r){var n;for(let i=t;i<e.length;i++)(n=e[i]).schema??(n.schema=r)}function N(e,t,r){let n=e.inst?._zod?.traits;n?.has("$ZodType")&&(n.has("$ZodCheck")?e.schema??(e.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,o=e.message?e.message:E(e.inst?._zod.def?.error?.(e))??E(i?.(e))??E(t?.error?.(e))??E(r.customError?.(e))??E(r.localeError?.(e))??"Invalid input",a={};for(let t of Object.keys(e))"inst"!==t&&"schema"!==t&&"continue"!==t&&"input"!==t&&"__proto__"!==t&&(a[t]=e[t]);return a.path??(a.path=[]),a.message=o,t?.reportInput&&(a.input=e.input),a}let C=/[\uD800-\uDBFF]/;function F(e){let t=e.length;if(!C.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(64512&e.charCodeAt(n))==55296&&(64512&e.charCodeAt(n+1))==56320&&(r--,n++);return r}function D(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function J(...e){let[t,r,n]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:n}:{...t}}function U(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}let M=!1,R={configurable:!0,get(){M=!0}};function L(e,t,r){let n=Object.getPrototypeOf(e._zod);if(t in n&&o!==e._zod){o=void 0;return}o=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,R);let e=M;M=!1;try{let n=r(this);return M?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n}),M=M||e,n}catch(r){throw delete this[t],M=M||e,r}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}let V={value:void 0,enumerable:!1},W="captureStackTrace"in Error?Error:null;function G(e,t,r,n){function i(e){this.def=e,this.constr=u,this.traits=new Set}i.prototype={};let o=r&&new WeakSet;function a(n,a){if(n._zod){if(n._zod.traits.has(e))return}else{V.value=new i(a);try{Object.defineProperty(n,"_zod",V)}finally{V.value=void 0}}if(n._zod.traits.add(e),t(n,a),o){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,i=e;for(;i&&i!==t;)i=Object.getPrototypeOf(i);let a=i??e;if(!o.has(a)){o.add(a);for(let e in r){let t=Object.getOwnPropertyDescriptor(r,e);t.get?Object.defineProperty(a,e,{...t,enumerable:!1}):function(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:U(this,t,r.bind(this))},set(e){U(this,t,e)}})}(a,e,t.value)}}}let s=u.prototype;for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&(e in n||(n[e]=s[e].bind(n)))}let s=n?.Parent??Object;class l extends s{}function u(e){let t=n?.Parent?function(e){let t=W;if(t){let r=t.stackTraceLimit;if("number"==typeof r){try{t.stackTraceLimit=0}catch{return W=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}(l):this;a(t,e);let r=t._zod.deferred;if(r){for(let e of r)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(l,"name",{value:e}),Object.defineProperty(u,"init",{value:a}),Object.defineProperty(u,Symbol.hasInstance,{value:t=>!!n?.Parent&&t instanceof n.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}class H extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class B extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(n=globalThis).__zod_globalConfig??(n.__zod_globalConfig={});let K=globalThis.__zod_globalConfig;function Y(e){return e&&Object.assign(K,e),K}class q extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}let X="~memo",Q=[];function ee(e){return null!==e&&"object"==typeof e}function et(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}let er=new WeakMap,en=[],ei={alloc(e,t,r){let n=a;if(!n)return r;a=void 0;let i={value:r,issues:null};return n.set(t.value,i),en.push(i),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,r=(e,r)=>{var n,i;let o;if("backward"!==r.direction&&(n=r,i=e.value,void 0!==(o=n[X]?.backEdges)&&ee(i)&&o.has(i)))throw new q;return t(e,r)};e._zod.parse=r,e._zod.run===t&&(e._zod.run=r)})},attach(e){var t;let r,n,i,o=!1;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,s=(l,u)=>{let c;if(void 0===r){let n=function e(t,r,n){var i,o;let a=er.get(t);if(void 0!==a)return 2*!!a;if(r.has(t))return 2;r.add(t);let s=0,l=t=>{if(2!==s&&t?._zod){let i=e(t,r,n);i>s&&(s=i)}},u=e=>{e>s&&(s=e)},c=t._zod.def;switch(c.type){case"object":{let t,i=(t=Object.getOwnPropertyDescriptor(c,"shape"),t?.get?t.get.raw:t?.value);u(i?((t,i)=>{let o=0;for(let a of Reflect.ownKeys(t)){let s=Object.getOwnPropertyDescriptor(t,a);if(i&&!s.enumerable)continue;let l=s.get?1:s.value?._zod?e(s.value,r,n):0;l>o&&(o=l)}return o})(i,!0):1),l(c.catchall);break}case"array":l(c.element);break;case"tuple":for(let e of c.items)l(e);l(c.rest);break;case"record":case"map":l(c.keyType),l(c.valueType);break;case"set":l(c.valueType);break;case"union":for(let e of c.options)l(e);break;case"intersection":l(c.left),l(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":l(c.innerType);break;case"pipe":l(c.in),l(c.out);break;case"function":l(c.input),l(c.output);break;case"lazy":{let i=c._cachedInner??(n?t._zod.innerType:void 0);u(i?e(i,r,!1):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let r=t.value;if(r&&"object"==typeof r){if(r._zod)l(r);else if(Array.isArray(r))for(let e of r)l(e)}}}return r.delete(t),i=t,1!==(o=s)&&er.set(i,2===o),o}(e,new Set,!1);if(0===n)return e._zod.parse=t,e._zod.run===s&&(e._zod.run=t),t(l,u);2===n||o?r=!0:o=!0}let d=l.value;if(!ee(d))return t(l,u);let p=u[X];if(p||(p={buckets:new WeakMap,backEdges:void 0},u[X]=p),n===u)c=i;else{var f;let t;(t=(f=p).buckets.get(e))||(t=new WeakMap,f.buckets.set(e,t)),c=t,n=u,i=c}let h=c.get(d);if(h)return l.value=h.value,h.issues?h.issues.length&&l.issues.push(...et(h.issues)):(l.memo=!0,p.backEdges??(p.backEdges=new WeakSet),p.backEdges.add(h.value)),l;a=c;let m=en.length,g=t(l,u);a=void 0;let y=en.length>m?en.pop():void 0;return g instanceof Promise?g.then(e=>(y&&(y.issues=e.issues.length?et(e.issues):Q),e)):(y&&(y.issues=g.issues.length?et(g.issues):Q),g)};e._zod.parse=s,e._zod.run===t&&(e._zod.run=s)})}},eo=/^[cC][0-9a-z]{6,}$/,ea=/^[0-9a-z]+$/,es=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,el=/^[0-9a-vA-V]{20}$/,eu=/^[A-Za-z0-9]{27}$/,ec=/^[a-zA-Z0-9_-]{21}$/,ed=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ep=/^([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})$/,ef=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,eh=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,em=/^(?:(?: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])$/,eg=/^(([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}|:))$/,ey=/^((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])$/,ev=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,e_=/^https?$/,eb=/^\+[1-9]\d{6,14}$/,e$="(?:(?:\\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])))",ew=RegExp(`^${e$}$`);function ez(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let ek=/^[\s\S]{0,}$/,eO=/^-?\d+$/,ex=/^-?\d+(?:\.\d+)?$/,eS=/^(?:true|false)$/i,eP=/^[^A-Z]*$/,eT=/^[^a-z]*$/,eA=G("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ej=e=>{let t=e.value;return null!=t&&void 0!==t.length},eE=G("$ZodCheckMaxLength",(e,t)=>{var r;eA.init(e,t),(r=e._zod.def).when??(r.when=ej),e._zod.check=r=>{let n=r.value,i=n.length;if(("string"==typeof n&&i>t.maximum?F(n):i)<=t.maximum)return;let o=D(n);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),eZ=G("$ZodCheckMinLength",(e,t)=>{var r;eA.init(e,t),(r=e._zod.def).when??(r.when=ej),e._zod.check=r=>{let n=r.value,i=n.length;if(("string"==typeof n&&i>=t.minimum&&i<2*t.minimum?F(n):i)>=t.minimum)return;let o=D(n);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),eI=G("$ZodCheckLengthEquals",(e,t)=>{var r;eA.init(e,t),(r=e._zod.def).when??(r.when=ej),e._zod.check=r=>{let n=r.value,i=n.length,o="string"==typeof n&&i>=t.length&&i<=2*t.length?F(n):i;if(o===t.length)return;let a=D(n),s=o>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),eN=G("$ZodCheckStringFormat",(e,t)=>{var r,n;eA.init(e,t),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),eC=G("$ZodCheckRegex",(e,t)=>{eN.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),eF=G("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=eP),eN.init(e,t)}),eD=G("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=eT),eN.init(e,t)}),eJ=G("$ZodCheckIncludes",(e,t)=>{eA.init(e,t);let r=O(t.includes),n=new RegExp("number"==typeof t.position?`^.{${t.position},}${r}`:r);t.pattern=n,e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),eU=G("$ZodCheckStartsWith",(e,t)=>{eA.init(e,t);let r=RegExp(`^${O(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),eM=G("$ZodCheckEndsWith",(e,t)=>{eA.init(e,t);let r=RegExp(`.*${O(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),eR=G("$ZodCheckOverwrite",(e,t)=>{eA.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),eL={major:4,minor:6,patch:7},eV=G("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=eL;let n=e._zod.def.checks,i=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(let t of i)for(let r of t._zod.onattach)r(e);if(0===i.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,r,n)=>{let i;if(t.memo)return t;let o=A(t);for(let a of r){if(a._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}(t)||!a._zod.def.when(t))continue}else if(o)continue;let r=t.issues.length,s=a._zod.check(t);if(s instanceof Promise&&n?.async===!1)throw new H;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s,t.issues.length!==r&&(I(t.issues,r,e),o||(o=A(t,r)))});else{if(t.issues.length===r)continue;I(t.issues,r,e),o||(o=A(t,r))}}return i?i.then(()=>t):t},r=(r,n,o)=>{if(A(r))return r.aborted=!0,r;let a=t(n,i,o);if(a instanceof Promise){if(!1===o.async)throw new H;return a.then(t=>e._zod.parse(t,o))}return e._zod.parse(a,o)};e._zod.run=(n,o)=>{if(o.skipChecks)return e._zod.parse(n,o);if("backward"===o.direction){let t=e._zod.parse({value:n.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,n,o)):r(t,n,o)}let a=e._zod.parse(n,o);if(a instanceof Promise){if(!1===o.async)throw new H;return a.then(e=>t(e,i,o))}return t(a,i,o)}}},{get"~standard"(){return U(this,"~standard",eG(this),!1)},set"~standard"(e){U(this,"~standard",e)}}),eW=(e,t)=>e.issues.length?{issues:e.issues.map(e=>N(e,t,Y()))}:{value:e.value};function eG(e){return{validate:t=>{let r={async:!1};try{let n=e._zod.run({value:t,issues:[]},r);if(!(n instanceof Promise))return eW(n,r)}catch(e){}return async function(e,t){let r={async:!0};return eW(await e._zod.run({value:t,issues:[]},r),r)}(e,t)},vendor:"zod",version:1}}let eH=G("$ZodString",(e,t)=>{eV.init(e,t),e._zod.pattern=t.pattern??ek,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),eB=G("$ZodStringFormat",(e,t)=>{eN.init(e,t),eH.init(e,t)}),eK=G("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ep),eB.init(e,t)}),eY=G("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ef(e))}else t.pattern??(t.pattern=ef());eB.init(e,t)}),eq=G("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=eh),eB.init(e,t)});function eX(e){try{if("u">typeof URL&&"function"==typeof URL.canParse)return URL.canParse(e);return new URL(e),!0}catch{return!1}}let eQ=/[\t\n\r]/g;function e0(e){return e.replace(eQ,"")}let e1=G("$ZodURL",(e,t)=>{eB.init(e,t),e._zod.check=r=>{try{var n,i;let o=r.value.trim(),a="normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===e_.source&&!/^https?:\/\//i.test(e))return 1;try{if("u">typeof URL){let t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(o,t):eX(o)||2;if(1===a)return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});if(2===a)return void r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});if(!0===a){r.value=e0(o);return}t.hostname&&((n=t.hostname).lastIndex=0,!n.test(a.hostname))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&((i=t.protocol).lastIndex=0,!i.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?a.href:e0(o);return}catch(n){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),e4=G("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$","u")),eB.init(e,t)}),e2=G("$ZodNanoID",(e,t)=>{var r;if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=void 0===t.length?ec:(r=t.length,RegExp(`^[a-zA-Z0-9_-]{${r}}$`))),eB.init(e,t)}),e9=G("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=eo),eB.init(e,t)}),e6=G("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ea),eB.init(e,t)}),e3=G("$ZodULID",(e,t)=>{t.pattern??(t.pattern=es),eB.init(e,t)}),e5=G("$ZodXID",(e,t)=>{t.pattern??(t.pattern=el),eB.init(e,t)}),e7=G("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=eu),eB.init(e,t)}),e8=G("$ZodISODateTime",(e,t)=>{let r,n,i;t.pattern??(r=["Z"],t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),n=`${ez({precision:t.precision,seconds:!0})}(?:${r.join("|")})`,i=t.local?`${n}|${ez({precision:t.precision})}`:n,t.pattern=RegExp(`^${e$}T(?:${i})$`)),eB.init(e,t)}),te=G("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ew),eB.init(e,t)}),tt=G("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${ez(t)}$`)),eB.init(e,t)}),tr=G("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ed),eB.init(e,t)}),tn=G("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=em),eB.init(e,t)}),ti=/^[0-9a-fA-F:.]+$/;function to(e){return!!ti.test(e)&&eX(`http://[${e}]`)}let ta=G("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=eg),eB.init(e,t),e._zod.check=r=>{to(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),ts=G("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ey),eB.init(e,t)}),tl=G("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ev),eB.init(e,t),e._zod.check=r=>{!function(e){let t=e.split("/");if(2!==t.length)return!1;let[r,n]=t;if(!n)return!1;let i=Number(n);return`${i}`===n&&!(i<0)&&!(i>128)&&to(r)}(r.value)&&r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function tu(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let tc=/^[0-9a-zA-Z+/]*={0,2}$/,td=G("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=tc),eB.init(e,t),e._zod.check=r=>{tu(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),tp=/^[A-Za-z0-9_-]*$/,tf=G("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=tp),eB.init(e,t),e._zod.check=r=>{!function(e){if(!tp.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return tu(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),th=G("$ZodE164",(e,t)=>{t.pattern??(t.pattern=eb),eB.init(e,t)}),tm=G("$ZodJWT",(e,t)=>{eB.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),tg=G("$ZodBoolean",(e,t)=>{eV.init(e,t),e._zod.pattern=eS,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let i=r.value;return"boolean"==typeof i||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),ty=e=>Array.isArray(e)?e.length:-1;function tv(e,t,r){e.issues.length&&t.issues.push(...j(r,e.issues)),t.value[r]=e.value}let t_=G("$ZodArray",(e,t)=>{eV.init(e,t);let r=K.memoizer;r?.attach(e),e._zod.parse=(n,i)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=r?r.alloc(e,n,Array(o.length),i):Array(o.length);let a=[],s=i?.abortEarly;for(let e=0;e<o.length;e++){let r=o[e],l=t.element._zod.run({value:r,issues:[]},i);if(l instanceof Promise)a.push(l.then(t=>tv(t,n,e)));else if(tv(l,n,e),s&&0!==l.issues.length&&A(l))break}return a.length?Promise.all(a).then(()=>n):n},function(e,t){let r=Z(e._zod.def.checks);if(!r.length)return;let n=Math.min(...r.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(r,o)=>{let a=t(r.value);if(a>n&&!o?.skipChecks&&o?.direction!=="backward"){for(let[t,n]of Z(e._zod.def.checks))if(a>t&&n._zod.def.when(r)){let t=r.issues.length;return n._zod.check(r),r.issues[t].continue=!1,I(r.issues,t,e),r}}return i(r,o)}}(e,ty)});function tb(e,t,r,n){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let i=e.filter(e=>!A(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>N(e,n,Y())))}),t)}let t$=G("$ZodUnion",(e,t)=>{eV.init(e,t),L(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),L(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),L(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),L(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>v(e.source)).join("|")})$`)}});let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(n,i)=>{if(r)return r(n,i);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then(t=>tb(t,n,e,i)):tb(a,n,e,i)}}),tw=G("$ZodIntersection",(e,t)=>{eV.init(e,t),e._zod.parse=(e,r)=>{let n=e.value,i=t.left._zod.run({value:n,issues:[]},r),o=t.right._zod.run({value:n,issues:[]},r);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([t,r])=>tz(e,t,r)):tz(e,i,o)}});function tz(e,t,r){let n,i=new Map,o=new Map,a=(e,t)=>{let r;if("unrecognized_keys"!==e.code||e.path?.length)if("invalid_key"!==e.code||"record"!==e.origin||e.path?.length!==1)return!1;else{let t=String(e.path[0]);o.has(t)||o.set(t,e),r=[t]}else n??(n=e),r=e.keys;for(let e of r)i.has(e)||i.set(e,{}),i.get(e)[t]=!0;return!0};for(let r of t.issues)a(r,"l")||e.issues.push(r);for(let t of r.issues)a(t,"r")||e.issues.push(t);let s=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=n?s.filter(e=>n.keys.includes(e)):[];for(let r of(t.length&&e.issues.push({...n,keys:t}),s))!t.includes(r)&&o.has(r)&&e.issues.push(o.get(r))}let l=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(w(t)&&w(r)){let n=Object.keys(r),i=Object.keys(t).filter(e=>-1!==n.indexOf(e)),o={...t,...r};for(let n of(Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__,i)){if("__proto__"===n)continue;let i=e(t[n],r[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};o[n]=i.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<t.length;i++){let o=e(t[i],r[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}(t.value,r.value);if(!l.valid){if(A(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`)}return e.value=l.data,e}let tk=G("$ZodRecord",(e,t)=>{eV.init(e,t);let r=K.memoizer;r?.attach(e),e._zod.parse=(n,i)=>{let o=n.value;if(!w(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){let l;n.value=r?r.alloc(e,n,{},i):{};let u=new Set;for(let r of s)if("string"==typeof r||"number"==typeof r||"symbol"==typeof r){if(u.add("number"==typeof r?r.toString():r),"__proto__"===r)continue;let s=t.keyType._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>N(e,i,Y())),input:r,path:[r],inst:e});continue}let l=s.value;if("__proto__"===l)continue;let c=t.valueType._zod.run({value:o[r],issues:[]},i);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...j(r,e.issues)),n.value[l]=e.value})):(c.issues.length&&n.issues.push(...j(r,c.issues)),n.value[l]=c.value)}for(let e in o)if(!u.has(e))if("loose"===t.mode){if("__proto__"===e)continue;n.value[e]=o[e]}else(l=l??[]).push(e);l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l,continue:!0})}else{let l;for(let u of(n.value=r?r.alloc(e,n,{},i):{},Reflect.ownKeys(o))){if("__proto__"===u||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let r=t.keyType._zod.run({value:u,issues:[]},i);if(r instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof u&&ex.test(u)&&r.issues.length){let e=t.keyType._zod.run({value:Number(u),issues:[]},i);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(r=e)}if(r.issues.length){"loose"===t.mode?n.value[u]=o[u]:s?(l=l??[]).push(u):n.issues.push({code:"invalid_key",origin:"record",issues:r.issues.map(e=>N(e,i,Y())),input:u,path:[u],inst:e});continue}let c=r.value;if("__proto__"===c)continue;let d=t.valueType._zod.run({value:o[u],issues:[]},i);d instanceof Promise?a.push(d.then(e=>{e.issues.length&&n.issues.push(...j(u,e.issues)),n.value[c]=e.value})):(d.issues.length&&n.issues.push(...j(u,d.issues)),n.value[c]=d.value)}l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l,continue:!0})}return a.length?Promise.all(a).then(()=>n):n}}),tO=G("$ZodEnum",(e,t)=>{eV.init(e,t);let r=m(t.entries),n=new Set(r);e._zod.values=n,L(e,"pattern",e=>{let t=m(e.def.entries).filter(e=>k.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>O(e.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(t,i)=>{let o=t.value;return n.has(o)||t.issues.push({code:"invalid_value",values:r,input:o,inst:e}),t}}),tx=G("$ZodTransform",(e,t)=>{eV.init(e,t),e._zod.optin="optional",K.memoizer?.guard(e),e._zod.parse=(r,n)=>{if("backward"===n.direction)throw new B(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(r.value=e,r));if(i instanceof Promise)throw new H;return r.value=i,r}});function tS(e,t){return e.value=t.issues.length?void 0:t.value,e}let tP=G("$ZodOptional",(e,t)=>{eV.init(e,t),L(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",L(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),L(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${v(t.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;let n=t.innerType._zod.run({value:e.value,issues:[]},r);return n instanceof Promise?n.then(t=>tS(e,t)):tS(e,n)}return t.innerType._zod.run(e,r)}}),tT=G("$ZodExactOptional",(e,t)=>{tP.init(e,t),L(e,"values",e=>e.def.innerType._zod.values),L(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),tA=G("$ZodNullable",(e,t)=>{eV.init(e,t),L(e,"optin",e=>e.def.innerType._zod.optin),L(e,"optout",e=>e.def.innerType._zod.optout),L(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${v(t.source)}|null)$`):void 0}),L(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),tj=G("$ZodDefault",(e,t)=>{eV.init(e,t),e._zod.optin="defaulted",L(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(e=>tE(e,t)):tE(n,t)}});function tE(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let tZ=G("$ZodPrefault",(e,t)=>{eV.init(e,t),e._zod.optin="defaulted",L(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),tI=G("$ZodNonOptional",(e,t)=>{eV.init(e,t),L(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(t=>tN(t,e)):tN(i,e)}});function tN(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function tC(e,t,r,n){return t.issues.length?e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>N(e,n,Y()))},input:e.value}):(e.value=t.value,t.memo&&(e.memo=!0)),e}let tF=G("$ZodCatch",(e,t)=>{eV.init(e,t),L(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),L(e,"optout",e=>e.def.innerType._zod.optout),L(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let n=t.innerType._zod.run({value:e.value,issues:[]},r);return n instanceof Promise?n.then(n=>tC(e,n,t,r)):tC(e,n,t,r)}}),tD=G("$ZodPipe",(e,t)=>{eV.init(e,t),L(e,"values",e=>e.def.in._zod.values),L(e,"optin",e=>e.def.in._zod.optin),L(e,"optout",e=>e.def.out._zod.optout),L(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let n=t.out._zod.run(e,r);return n instanceof Promise?n.then(e=>tJ(e,t.in,r)):tJ(n,t.in,r)}let n=t.in._zod.run(e,r);return n instanceof Promise?n.then(e=>tJ(e,t.out,r)):tJ(n,t.out,r)}});function tJ(e,t,r){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}let tU=G("$ZodReadonly",(e,t)=>{eV.init(e,t),L(e,"propValues",e=>e.def.innerType._zod.propValues),L(e,"values",e=>e.def.innerType._zod.values),L(e,"optin",e=>e.def.innerType?._zod?.optin),L(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(tM):tM(n)}});function tM(e){return e.memo||(e.value=Object.freeze(e.value)),e}let tR=G("$ZodCustom",(e,t)=>{eA.init(e,t),eV.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(t=>tL(t,r,n,e));tL(i,r,n,e)}});function tL(e,t,r,n){if(!e){let e={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(e.params=n._zod.def.params),t.issues.push(J(e))}}(i=globalThis).__zod_globalRegistry??(i.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let tV=globalThis.__zod_globalRegistry;function tW(e,t){return new eE({check:"max_length",...x(t),maximum:e})}function tG(e,t){return new eZ({check:"min_length",...x(t),minimum:e})}function tH(e,t){return new eI({check:"length_equals",...x(t),length:e})}function tB(e){return new eR({check:"overwrite",tx:e})}function tK(e,...t){for(let r of t)for(let t of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,t)&&_(e,t,r[t]);return e}function tY(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??tV,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function tq(e,t,r,n,i){let o="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:n.path,message:i}):t.unrepresentable;if("any"===o)return!1;if(void 0===o||"throw"===o)throw Error(i);return Object.assign(r,o),!0}function tX(e,t,r={path:[],schemaPath:[]}){var n;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let n={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,n);else{let r=a.schema,o=t.processors[i.type];if(!o)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);o(e,t,r,n)}let o=e._zod.parent;o&&(a.ref||(a.ref=o),tX(o,t,n),t.seen.get(o).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&tK(a.schema,l),"input"===t.io&&function e(t,r){let n=r??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let i=t._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return e(i.element,n);if("set"===i.type)return e(i.valueType,n);if("lazy"===i.type)return e(i.getter(),n);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type||"catch"===i.type)return e(i.innerType,n);if("intersection"===i.type)return e(i.left,n)||e(i.right,n);if("record"===i.type||"map"===i.type)return e(i.keyType,n)||e(i.valueType,n);if("pipe"===i.type)return!!t._zod.traits.has("$ZodCodec")||e(i.in,n)||e(i.out,n);if("object"===i.type){for(let t in i.shape)if(e(i.shape[t],n))return!0;return!1}if("union"===i.type){for(let t of i.options)if(e(t,n))return!0;return!1}if("tuple"===i.type){for(let t of i.items)if(e(t,n))return!0;if(i.rest&&e(i.rest,n))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function tQ(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function t0(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let n=new Map;for(let t of e.seen.entries()){let r=e.metadataRegistry.get(t[0])?.id;if(r){let e=n.get(r);if(e&&e!==t[0])throw Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(r,t[0])}}let i=t=>{if(t[1].schema.$ref)return;let n=t[1],{ref:i,defId:o}=(t=>{let n="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(r)return{ref:i(r)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${i("__shared")}#/${n}/${tQ(o)}`}}let i=`#/${n}/`;if(t[1]===r&&!t[1].schema.id)return{ref:"#"};let o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:i+tQ(o)}})(t);n.def={...n.schema},o&&(n.defId=o);let a=n.schema;for(let e in a)delete a[e];a.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
99
+
100
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let n=r[1];if(t===r[0]){i(r);continue}if(e.external){let n=e.external.registry.get(r[0])?.id;if(t!==r[0]&&n){i(r);continue}}if(e.metadataRegistry.get(r[0])?.id||n.cycle){i(r);continue}n.count>1&&"ref"===e.reused&&i(r)}e.external&&(e.sharedDefsExtractedFor=e.external)}let t1=new Set(["type","properties","required","additionalProperties"]),t4=["oneOf","anyOf"];function t2(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function t9(e){let t=[];for(let r of e){if("object"!=typeof r||"object"!==r.type)return null;for(let e in r)if(!t1.has(e))return null;t.push(r)}let r={},n=new Set;for(let e of t){for(let n in e.properties){if(Object.prototype.hasOwnProperty.call(r,n))continue;let e=[];for(let r of t){let t=r.properties?.[n]??t2(r);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}_(r,n,1===e.length?e[0]:t9(e)??{allOf:e})}for(let t of e.required??[])n.add(t)}let i={type:"object",properties:r};if(n.size&&(i.required=[...n]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{let e=[];for(let r of t){let t=t2(r);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function t6(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let n=t=>{let r=e.seen.get(t);if(null===r.ref)return;let i=r.def??r.schema,o={...i},a=r.ref;if(r.ref=null,a){n(a);let r=e.seen.get(a),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):tK(i,s),tK(i,o),t._zod.parent===a)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in o||delete i[e]);if(s.$ref&&r.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(i[e])===JSON.stringify(r.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==a){n(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:r.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())n(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let r=t.anyOf;if(!Array.isArray(r)||0===r.length||void 0!==t.type)return;let n=[];for(let t of r){if(!t||"object"!=typeof t)return;e(t);let r=Object.keys(t);if(1!==r.length||"type"!==r[0])return;let i=t.type;for(let e of Array.isArray(i)?i:[i]){if("string"!=typeof e)return;n.includes(e)||n.push(e)}}delete t.anyOf,t.type=1===n.length?n[0]:n}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let r of e.seen.values())for(let e of[r.schema,r.def]){let r=e?.allOf;if(!Array.isArray(r))continue;let n=t.get(r);n?n.push(e):t.set(r,[e])}for(let r of e.intersections)for(let e of t.get(r)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of t1)if(t in e)return;let r=t.filter(e=>t4.some(t=>Array.isArray(e[t]))),n=null;if(r.length){let e=r[0],i=t4.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let o=t.filter(t=>t!==e),a=e[i].map(e=>t9([...o,e]));if(a.some(e=>!e))return;n={[i]:a}}else n=t9(t);n&&(delete e.allOf,tK(e,n))}(e)}}let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(r)}tK(i,r.defId?r.schema:r.def??r.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,_(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let r=JSON.parse(JSON.stringify(i));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:t3(t,"input",e.processors),output:t3(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let t3=(e,t,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},a=tY({...i??{},target:o,io:t,processors:r});return tX(e,a),t0(a,e),t6(a,e)},t5=(e,t,r)=>{(void 0===e[t]||r>e[t])&&(e[t]=r)},t7=(e,t,r)=>{(void 0===e[t]||r<e[t])&&(e[t]=r)},t8=(e,t)=>{t5(e,"minimum",t),t7(e,"maximum",t)},re=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},rt=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},rr=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},rn=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},ri=(e,t)=>t5(e,"minimum",t.minimum),ro=(e,t)=>t7(e,"maximum",t.maximum),ra=e=>(t,r)=>{rn(t,r.format);let[n,i]=e[r.format];t5(t,"minimum",n),t7(t,"maximum",i)},rs={greater_than:(e,t)=>t5(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>t7(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>re(e,t.value),number_format:ra(P),bigint_format:ra(T),min_length:ri,max_length:ro,length_equals:(e,t)=>t8(e,t.length),min_size:ri,max_size:ro,size_equals:(e,t)=>t8(e,t.size),string_format:(e,t)=>{rn(e,t.format),t.pattern&&rt(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>rr(e,t.mime)};function rl(e){let t={},r=e._zod.def;for(let n of e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[])rs[n._zod.def.check]?.(t,n._zod.def);let n=e._zod.bag;for(let e of(void 0!==n.minimum&&t5(t,"minimum",n.minimum),void 0!==n.exclusiveMinimum&&t5(t,"exclusiveMinimum",n.exclusiveMinimum),void 0!==n.maximum&&t7(t,"maximum",n.maximum),void 0!==n.exclusiveMaximum&&t7(t,"exclusiveMaximum",n.exclusiveMaximum),void 0!==n.multipleOf&&re(t,n.multipleOf),void 0!==n.format&&(t.format??(t.format=n.format),n.format.includes("int")&&(t.isInt=!0)),n.mime&&rr(t,n.mime),n.patterns??[]))rt(t,e);return t}let ru={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rc=new Map([[tc,/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/],[tp,/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/]]),rd=e=>rc.get(e)??e,rp=new WeakMap,rf=Symbol();function rh(e,t,r,n,i){let o=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(o=!0,null));return o?(tq(t,r,n,i,"BigInt defaults cannot be represented in JSON Schema"),rf):JSON.parse(a)}let rm=(e,t,r,n)=>{let i=e._zod.def;tX(i.innerType,t,n),t.seen.get(e).ref=i.innerType},rg={get:function(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,y,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},ry={value:void 0,enumerable:!1},rv=new WeakSet([Object.prototype,Error.prototype]),r_=(e,t)=>{e.name="$ZodError",ry.value=t,Object.defineProperty(e,"issues",ry),ry.value=void 0,Object.defineProperty(e,"message",rg);let r=Object.getPrototypeOf(e);rv.has(r)||(rv.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},rb=G("$ZodError",r_);function r$(e,t){return{callee:t?.callee??e,Err:t?.Err}}G("$ZodError",r_,void 0,{Parent:Error});let rw=e=>{let t=(r,n,i,o)=>{let a=i?{...i,async:!1}:{async:!1},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new H;if(s.issues.length){let r=new(o?.Err??e)(s.issues.map(e=>N(e,a,Y())));throw b(r,o?.callee??t),r}return s.value};return t},rz=e=>{let t=async(r,n,i,o)=>{let a=i?{...i,async:!0}:{async:!0},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let r=new(o?.Err??e)(s.issues.map(e=>N(e,a,Y())));throw b(r,o?.callee??t),r}return s.value};return t},rk=e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new H;return o.issues.length?rO(e,o.issues,i):{success:!0,data:o.value}};function rO(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(e=>N(e,r,Y()))),t=void 0,r=void 0),n},set error(e){n=e,t=void 0,r=void 0}}}let rx=e=>async(t,r,n)=>{let i=n?{...n,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?rO(e,o.issues,i):{success:!0,data:o.value}},rS=Symbol.for("zod.compile.invalid"),rP=Symbol.for("zod.compile.fallback"),rT=new WeakSet([Object.prototype,Error.prototype]);function rA(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=r(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}let rj=G("ZodError",(e,t)=>{rb.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);rT.has(r)||(rT.add(r),rA(r,"format",e=>t=>(function(e,t=e=>e.message){let r={_errors:[]},n=(e,i=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>n({issues:e},[...i,...o.path]));else if("invalid_key"===o.code)n({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)n({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(0===e.length)r._errors.push(t(o));else{let n=r,i=0;for(;i<e.length;){let r=e[i],a=i===e.length-1;if("_errors"===r){a&&n._errors.push(t(o)),i++;continue}Object.prototype.hasOwnProperty.call(n,r)||Object.defineProperty(n,r,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=n[r];a&&s._errors.push(t(o)),n=s,i++}}}};return n(e),r})(e,t)),rA(r,"flatten",e=>t=>(function(e,t=e=>e.message){let r={},n=[];for(let a of e.issues)if(a.path.length>0){var i,o;(i=a.path[0],o=()=>[],!Object.prototype.hasOwnProperty.call(r,i)&&("__proto__"===i?Object.defineProperty(r,i,{value:o(),writable:!0,enumerable:!0,configurable:!0}):r[i]=o()),r[i]).push(t(a))}else n.push(t(a));return{formErrors:n,fieldErrors:r}})(e,t)),rA(r,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,y,2)}),rA(r,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,y,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error}),rE=rw(rj),rZ=rz(rj),rI=rk(rj),rN=rx(rj),rC=(s=rw(rj),l=(e,t,r,n)=>s(e,t,r?{...r,direction:"backward"}:{direction:"backward"},r$(l,n))),rF=(u=rw(rj),c=(e,t,r,n)=>u(e,t,r,r$(c,n))),rD=(d=rz(rj),p=async(e,t,r,n)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return await d(e,t,i,r$(p,n))}),rJ=(f=rz(rj),h=async(e,t,r,n)=>await f(e,t,r,r$(h,n))),rU=(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return rk(rj)(e,t,n)},rM=(e,t,r)=>rk(rj)(e,t,r),rR=async(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return rx(rj)(e,t,n)},rL=async(e,t,r)=>rx(rj)(e,t,r);function rV(){K.memoizer||Y({memoizer:ei})}let rW=G("ZodType",(e,t)=>(K.localeError||Y({localeError:(()=>{let e={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"}},t={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",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function n(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?r[e]??e:String(t)}return r=>{switch(r.code){case"invalid_type":{let e=n(r.expected),t=n(function(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":if(null===e)return"null";if(Array.isArray(e))return"array";if(e&&Object.getPrototypeOf(e)!==Object.prototype&&"constructor"in e&&e.constructor)return e.constructor.name}return t}(r.input),r.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${S(r.values[0])}`;return`Invalid option: expected one of ${g(r.values,"|")}`;case"too_big":{let t=r.exact?"exactly ":r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Too big: expected ${r.origin??"value"} to have ${t}${r.maximum.toString()} ${n.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${t}${r.maximum.toString()}`}case"too_small":{let t=r.exact?"exactly ":r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Too small: expected ${r.origin} to have ${t}${r.minimum.toString()} ${n.unit}`;return`Too small: expected ${r.origin} to be ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Invalid string: must start with "${r.prefix}"`;if("ends_with"===r.format)return`Invalid string: must end with "${r.suffix}"`;if("includes"===r.format)return`Invalid string: must include "${r.includes}"`;if("regex"===r.format)return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${g(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":if(r.options&&Array.isArray(r.options)&&r.options.length>0){let e=r.options.map(e=>`'${e}'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===r.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}})()}),eV.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(function(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){let r;return r=new this._zod.constr(e??this._zod.def),(!e||t?.parent)&&(r._zod.parent=this),r},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new nE({type:"custom",check:"custom",fn:e,...x(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let n,i;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(J(e,t.value,n._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=n),e.continue??(e.continue=!n._zod.def.abort),t.issues.push(J(e)))},e(t.value,t)),(i=new eA({check:"custom",...x(t)}))._zod.check=r,n=i}(e,t))},overwrite(e){return this.check(tB(e))},optional(){return n$(this)},exactOptional(){var e;return e=this,new nw({type:"optional",innerType:e})},nullable(){return nk(this)},nullish(){return n$(nk(this))},nonoptional(e){var t;return t=this,new nS({type:"nonoptional",innerType:t,...x(e)})},array(){return np(this)},or(e){return new nf({type:"union",options:[this,e],...x(void 0)})},and(e){var t;return t=this,new nh({type:"intersection",left:t,right:e})},transform(e){return nA(this,new n_({type:"transform",transform:e}))},default(e){var t,r;return t=this,r=e,new nO({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():z(r)}})},prefault(e){var t,r;return t=this,r=e,new nx({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():z(r)}})},catch(e){return function(e,t){let r;return new nP({type:"catch",innerType:e,catchValue:"function"==typeof t?t:((r=()=>t)["~constantCatch"]=!0,r)})}(this,e)},pipe(e){return nA(this,e)},readonly(){var e;return e=this,new nj({type:"readonly",innerType:e})},describe(e){let t=this.clone();return tV.add(t,{description:e}),t},meta(...e){if(0===e.length)return tV.get(this);let t=this.clone();return tV.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return U(this,"~standard",{...eG(this),jsonSchema:{input:t3(this,"input"),output:t3(this,"output")}},!1)},set"~standard"(e){U(this,"~standard",e)},parse:function e(t,r){return rE(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await rZ(this,t,r,{callee:e})},safeParse(e,t){return rI(this,e,t)},async safeParseAsync(e,t){return rN(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){U(this,"spa",e)},validate(e,t){let r=this._zod.bag.validator;if(void 0!==r){if(r(e)!==rS)return!0;if(!0===r.definite&&void 0===t)return!1}return function(e,t,r){let n,i=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;if(o?(i[rP]=!0,n=o({value:t,issues:[]},i)):n=e._zod.run({value:t,issues:[]},i),n instanceof Promise)throw new H;return 0===n.issues.length}(this,e,t)},validateAsync(e,t){return(async(e,t,r)=>{let n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},n);return i instanceof Promise&&(i=await i),0===i.issues.length})(this,e,t)},encode:function e(t,r){return rC(this,t,r,{callee:e})},decode:function e(t,r){return rF(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await rD(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await rJ(this,t,r,{callee:e})},safeEncode(e,t){return rU(this,e,t)},safeDecode(e,t){return rM(this,e,t)},async safeEncodeAsync(e,t){return rR(this,e,t)},async safeDecodeAsync(e,t){return rL(this,e,t)},toJSONSchema(e){return((e,t={})=>r=>{let n=tY({...r,processors:t});return tX(e,n),t0(n,e),t6(n,e)})(this,{})(e)},get description(){return tV.get(this)?.description},get _def(){return this._zod.def}}),rG=G("_ZodString",(e,t)=>{eH.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r)=>{r.type="string";let{minimum:n,maximum:i,format:o,patterns:a,contentEncoding:s,laxFormat:l}=rl(e);if("number"==typeof n&&(r.minLength=n),"number"==typeof i&&(r.maxLength=i),o&&(r.format=ru[o]??o,""===r.format&&delete r.format,("time"===o||l)&&delete r.format),s&&(r.contentEncoding=s),a&&a.size>0){let e=[...a].map(rd);1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,r)},function(e,t){for(let r in e){let n=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return U(this,r,n(this))},set(e){U(this,r,e)}})}return t}({format:e=>rl(e).format??null,minLength:e=>rl(e).minimum??null,maxLength:e=>rl(e).maximum??null},{regex(...e){return this.check(function(e,t){return new eC({check:"string_format",format:"regex",...x(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new eJ({check:"string_format",format:"includes",...x(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new eU({check:"string_format",format:"starts_with",...x(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new eM({check:"string_format",format:"ends_with",...x(t),suffix:e})}(...e))},min(...e){return this.check(tG(...e))},max(...e){return this.check(tW(...e))},length(...e){return this.check(tH(...e))},nonempty(...e){return this.check(tG(1,...e))},lowercase(e){return this.check(new eF({check:"string_format",format:"lowercase",...x(e)}))},uppercase(e){return this.check(new eD({check:"string_format",format:"uppercase",...x(e)}))},trim(){return this.check(tB(e=>e.trim()))},normalize(...e){return this.check(function(e){return tB(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(tB(e=>e.toLowerCase()))},toUpperCase(){return this.check(tB(e=>e.toUpperCase()))},slugify(){return this.check(tB(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})),rH=G("ZodString",(e,t)=>{eH.init(e,t),rG.init(e,t)},{email(e){return this.check(new r0({type:"string",format:"email",check:"string_format",abort:!1,...x(e)}))},url(e){return this.check(new r2({type:"string",format:"url",check:"string_format",abort:!1,...x(e)}))},jwt(e){return this.check(new nl({type:"string",format:"jwt",check:"string_format",abort:!1,...x(e)}))},emoji(e){return this.check(new r9({type:"string",format:"emoji",check:"string_format",abort:!1,...x(e)}))},guid(e){return this.check(new r1({type:"string",format:"guid",check:"string_format",abort:!1,...x(e)}))},uuid(e){return this.check(new r4({type:"string",format:"uuid",check:"string_format",abort:!1,...x(e)}))},uuidv4(e){return this.check(new r4({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...x(e)}))},uuidv6(e){return this.check(new r4({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...x(e)}))},uuidv7(e){return this.check(new r4({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...x(e)}))},nanoid(e){return this.check(new r6({type:"string",format:"nanoid",check:"string_format",abort:!1,...x(e)}))},cuid(e){return this.check(new r3({type:"string",format:"cuid",check:"string_format",abort:!1,...x(e)}))},cuid2(e){return this.check(new r5({type:"string",format:"cuid2",check:"string_format",abort:!1,...x(e)}))},ulid(e){return this.check(new r7({type:"string",format:"ulid",check:"string_format",abort:!1,...x(e)}))},base64(e){return this.check(new no({type:"string",format:"base64",check:"string_format",abort:!1,...x(e)}))},base64url(e){return this.check(new na({type:"string",format:"base64url",check:"string_format",abort:!1,...x(e)}))},xid(e){return this.check(new r8({type:"string",format:"xid",check:"string_format",abort:!1,...x(e)}))},ksuid(e){return this.check(new ne({type:"string",format:"ksuid",check:"string_format",abort:!1,...x(e)}))},ipv4(e){return this.check(new nt({type:"string",format:"ipv4",check:"string_format",abort:!1,...x(e)}))},ipv6(e){return this.check(new nr({type:"string",format:"ipv6",check:"string_format",abort:!1,...x(e)}))},cidrv4(e){return this.check(new nn({type:"string",format:"cidrv4",check:"string_format",abort:!1,...x(e)}))},cidrv6(e){return this.check(new ni({type:"string",format:"cidrv6",check:"string_format",abort:!1,...x(e)}))},e164(e){return this.check(new ns({type:"string",format:"e164",check:"string_format",abort:!1,...x(e)}))},datetime(e){return this.check(new rY({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...x(e)}))},date(e){return this.check(new rq({type:"string",format:"date",check:"string_format",...x(e)}))},time(e){return this.check(new rX({type:"string",format:"time",check:"string_format",precision:null,...x(e)}))},duration(e){return this.check(new rQ({type:"string",format:"duration",check:"string_format",...x(e)}))}});function rB(e){var t;return new rH(((t={type:"string",...x(e)}).checks&&(t.checks=[...t.checks]),t))}let rK=G("ZodStringFormat",(e,t)=>{eB.init(e,t),rG.init(e,t)}),rY=G("ZodISODateTime",(e,t)=>{e8.init(e,t),rK.init(e,t)}),rq=G("ZodISODate",(e,t)=>{te.init(e,t),rK.init(e,t)}),rX=G("ZodISOTime",(e,t)=>{tt.init(e,t),rK.init(e,t)}),rQ=G("ZodISODuration",(e,t)=>{tr.init(e,t),rK.init(e,t)}),r0=G("ZodEmail",(e,t)=>{eq.init(e,t),rK.init(e,t)}),r1=G("ZodGUID",(e,t)=>{eK.init(e,t),rK.init(e,t)}),r4=G("ZodUUID",(e,t)=>{eY.init(e,t),rK.init(e,t)}),r2=G("ZodURL",(e,t)=>{e1.init(e,t),rK.init(e,t)}),r9=G("ZodEmoji",(e,t)=>{e4.init(e,t),rK.init(e,t)}),r6=G("ZodNanoID",(e,t)=>{e2.init(e,t),rK.init(e,t)}),r3=G("ZodCUID",(e,t)=>{e9.init(e,t),rK.init(e,t)}),r5=G("ZodCUID2",(e,t)=>{e6.init(e,t),rK.init(e,t)}),r7=G("ZodULID",(e,t)=>{e3.init(e,t),rK.init(e,t)}),r8=G("ZodXID",(e,t)=>{e5.init(e,t),rK.init(e,t)}),ne=G("ZodKSUID",(e,t)=>{e7.init(e,t),rK.init(e,t)}),nt=G("ZodIPv4",(e,t)=>{tn.init(e,t),rK.init(e,t)}),nr=G("ZodIPv6",(e,t)=>{ta.init(e,t),rK.init(e,t)}),nn=G("ZodCIDRv4",(e,t)=>{ts.init(e,t),rK.init(e,t)}),ni=G("ZodCIDRv6",(e,t)=>{tl.init(e,t),rK.init(e,t)}),no=G("ZodBase64",(e,t)=>{td.init(e,t),rK.init(e,t)}),na=G("ZodBase64URL",(e,t)=>{tf.init(e,t),rK.init(e,t)}),ns=G("ZodE164",(e,t)=>{th.init(e,t),rK.init(e,t)}),nl=G("ZodJWT",(e,t)=>{tm.init(e,t),rK.init(e,t)}),nu=G("ZodBoolean",(e,t)=>{tg.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{t.type="boolean"}});function nc(e){return new nu({type:"boolean",...x(e)})}let nd=G("ZodArray",(e,t)=>{rV(),t_.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def,{minimum:o,maximum:a}=rl(e);"number"==typeof o&&(r.minItems=o),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=tX(i.element,t,{...n,path:[...n.path,"items"]})})(e,t,r,n),e.element=t.element},{min(e,t){return this.check(tG(e,t))},nonempty(e){return this.check(tG(1,e))},max(e,t){return this.check(tW(e,t))},length(e,t){return this.check(tH(e,t))},unwrap(){return this.element}});function np(e,t){return new nd({type:"array",element:e,...x(t)})}let nf=G("ZodUnion",(e,t)=>{t$.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a;o=!1===(i=e._zod.def).inclusive,a=i.options.map((e,r)=>tX(e,t,{...n,path:[...n.path,o?"oneOf":"anyOf",r]})),o?r.oneOf=a:r.anyOf=a},e.options=t.options}),nh=G("ZodIntersection",(e,t)=>{tw.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a,s,l;o=tX((i=e._zod.def).left,t,{...n,path:[...n.path,"allOf",0]}),a=tX(i.right,t,{...n,path:[...n.path,"allOf",1]}),r.allOf=l=[...(s=e=>"allOf"in e&&1===Object.keys(e).length)(o)?o.allOf:[o],...s(a)?a.allOf:[a]],t.intersections.push(l)}}),nm=G("ZodRecord",(e,t)=>{rV(),tk.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;r.type="object";let o=i.keyType,a=rl(o).patterns;if("loose"===i.mode&&a&&a.size>0){let e=tX(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});for(let t of(r.patternProperties={},a))_(r.patternProperties,rd(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){r.propertyNames=tX(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let o=rp.get(t);o||(o=[],rp.set(t,o),t.deferred.push(()=>(function(e){let t=new Map;for(let r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);let r=new Map;for(let n of rp.get(e)??[]){let i=e.seen.get(n),o=(i?.def??i?.schema)?.propertyNames;if(!o||!0===o||r.has(o))continue;let a=function e(t,r,n){if(r.$ref){if(n.has(r))return r;n.add(r);let i=t.get(r)?.def;if(!i)return r;let o=e(t,i,n);return o===i?r:o}for(let i of["anyOf","oneOf"]){let o=r[i];if(!Array.isArray(o))continue;let a=o.map(r=>e(t,r,n));a.some((e,t)=>e!==o[t])&&(r={...r,[i]:a})}let i=Array.isArray(r.type)?r.type:[r.type],o=!i.includes("string")&&i.some(e=>"number"===e||"integer"===e),a=r.enum??(void 0!==r.const?[r.const]:void 0);if(!o&&!a?.some(e=>"number"==typeof e))return r;let{minimum:s,maximum:l,exclusiveMinimum:u,exclusiveMaximum:c,multipleOf:d,format:p,id:f,...h}=r;return h.enum?h.enum=h.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof h.const&&(h.const=String(h.const)),o&&(h.type="string",a||(h.pattern=(i.includes("number")?ex:eO).source)),h}(t,o,new Set);a!==o&&r.set(o,a)}if(r.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&r.get(e.propertyNames);t&&(e.propertyNames=t)}})(t))),o.push(e)}r.additionalProperties=tX(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let s=o._zod.values,l="input"===t.io&&void 0!==function e(t){let r=t._zod.def;return"pipe"===r.type&&r.in._zod.traits.has("$ZodTransform")?e(r.out):"catch"===r.type?e(r.innerType):t._zod.optin}(i.valueType);if(s&&!i.partial&&!l){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e.map(String))}})(e,t,r,n),e.keyType=t.keyType,e.valueType=t.valueType});function ng(e,t,r){return new nm(t&&t._zod?{type:"record",keyType:e,valueType:t,...x(r)}:{type:"record",keyType:rB(),valueType:e,...x(t)})}let ny=G("ZodEnum",(e,t)=>{tO.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t)=>{let r=m(e._zod.def.entries);if(0===r.length){t.not={};return}r.every(e=>"number"==typeof e)&&(t.type="number"),r.every(e=>"string"==typeof e)&&(t.type="string"),t.enum=r})(e,r),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(e,n)=>{let i={};for(let n of e)if(r.has(n))i[n]=t.entries[n];else throw Error(`Key ${n} not found in enum`);return new ny({...t,checks:[],...x(n),entries:i})},e.exclude=(e,n)=>{let i={...t.entries};for(let t of e)if(r.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new ny({...t,checks:[],...x(n),entries:i})}});function nv(e,t){return new ny({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...x(t)})}let n_=G("ZodTransform",(e,t)=>{rV(),tx.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{tq(e,t,r,n,"Transforms cannot be represented in JSON Schema")},e._zod.parse=(r,n)=>{if("backward"===n.direction)throw new B(e.constructor.name);r.addIssue=n=>{"string"==typeof n?r.issues.push(J(n,r.value,t)):(n.fatal&&(n.continue=!1),n.code??(n.code="custom"),"input"in n||(n.input=r.value),n.inst??(n.inst=e),r.issues.push(J(n)))};let i=t.transform(r.value,r);return i instanceof Promise?i.then(e=>(r.value=e,r)):(r.value=i,r)}}),nb=G("ZodOptional",(e,t)=>{tP.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>rm(e,t,r,n),e.unwrap=()=>e._zod.def.innerType});function n$(e){return new nb({type:"optional",innerType:e})}let nw=G("ZodExactOptional",(e,t)=>{tT.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>rm(e,t,r,n),e.unwrap=()=>e._zod.def.innerType}),nz=G("ZodNullable",(e,t)=>{tA.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a;o=tX((i=e._zod.def).innerType,t,n),a=t.seen.get(e),"openapi-3.0"===t.target?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},e.unwrap=()=>e._zod.def.innerType});function nk(e){return new nz({type:"nullable",innerType:e})}let nO=G("ZodDefault",(e,t)=>{tj.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o;tX((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,(o=rh(i.defaultValue,e,t,r,n))!==rf&&(r.default=o)},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),nx=G("ZodPrefault",(e,t)=>{tZ.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;if(tX(i.innerType,t,n),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;let o=rh(i.defaultValue,e,t,r,n);o!==rf&&(r._prefault=o)})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType}),nS=G("ZodNonOptional",(e,t)=>{tI.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;tX((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType},e.unwrap=()=>e._zod.def.innerType}),nP=G("ZodCatch",(e,t)=>{tF.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i,o=e._zod.def;tX(o.innerType,t,n),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{tq(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=i})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),nT=G("ZodPipe",(e,t)=>{tD.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a;o=(i=e._zod.def).in._zod.traits.has("$ZodTransform"),tX(a="input"===t.io?o?i.out:i.in:i.out,t,n),t.seen.get(e).ref=a},e.in=t.in,e.out=t.out});function nA(e,t){return new nT({type:"pipe",in:e,out:t})}let nj=G("ZodReadonly",(e,t)=>{tU.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;tX((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,r.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),nE=G("ZodCustom",(e,t)=>{tR.init(e,t),rW.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{tq(e,t,r,n,"Custom types cannot be represented in JSON Schema")}})},448(e,t,r){r.d(t,{},{n:e=>e.replace(/([a-z\d])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase(),r:e=>{let t=e.replace(/\.svg$/i,"").split(/[^a-zA-Z0-9]+/).filter(Boolean).map(e=>e[0].toUpperCase()+e.slice(1)).join("");return t?/^\d/.test(t)?`Svg${t}`:t:"SvgIcon"},t:e=>e.replace(/[-:]([a-z])/g,(e,t)=>t.toUpperCase())})},796(e,t,r){var n=r(448);let i={react:{label:"React",typescriptOption:!0,exportTypeOption:!0,expandPropsOption:!0,fileName:(e,t)=>`${e}.${t?"tsx":"jsx"}`},preact:{label:"Preact",typescriptOption:!0,exportTypeOption:!0,expandPropsOption:!0,fileName:(e,t)=>`${e}.${t?"tsx":"jsx"}`},solid:{label:"Solid",typescriptOption:!0,exportTypeOption:!0,expandPropsOption:!0,fileName:(e,t)=>`${e}.${t?"tsx":"jsx"}`},svelte:{label:"Svelte",typescriptOption:!0,exportTypeOption:!1,expandPropsOption:!0,fileName:e=>`${e}.svelte`},vue:{label:"Vue",typescriptOption:!1,exportTypeOption:!1,expandPropsOption:!1,fileName:e=>`${e}.vue`},angular:{label:"Angular",typescriptOption:!1,exportTypeOption:!1,expandPropsOption:!1,fileName:e=>`${(0,n.n)(e)}.component.ts`},astro:{label:"Astro",typescriptOption:!0,exportTypeOption:!1,expandPropsOption:!0,fileName:e=>`${e}.astro`},"web-components":{label:"Web Components",typescriptOption:!0,exportTypeOption:!0,expandPropsOption:!1,fileName:(e,t)=>`${(0,n.n)(e)}.${t?"ts":"js"}`}},o=Object.keys(i);r.d(t,{},{Gt:o,Md:(e,t,r=!0)=>i[e].fileName((0,n.r)(t),r),i:i})}};