Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
chore: rebuild mcp card bundle with bun 1.4.4
Richie McIlroyb1199a5c4892
diff --git a/apps/web/lib/mcp-card-html.json b/apps/web/lib/mcp-card-html.jsonindex 30b83d7dc..6d0c7f4ce 100644--- a/apps/web/lib/mcp-card-html.json+++ b/apps/web/lib/mcp-card-html.json@@ -1,3 +1,3 @@{- "html": "<!doctype html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><style>\n:root{color-scheme:light dark;font:14px -apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif}body{margin:0;background:Canvas;color:CanvasText}.card{padding:20px;max-width:680px}.brand{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#4f67d9}h1{font-size:21px;line-height:1.3;margin:8px 0 12px}h2{font-size:13px;margin:24px 0 10px}p{line-height:1.55}button{font:inherit;cursor:pointer}.open{background:#4f67d9;color:white;border:0;border-radius:8px;padding:9px 13px}.cue{display:flex;gap:14px;width:100%;padding:11px 0;text-align:left;color:inherit;background:transparent;border:0;border-top:1px solid #8885}.cue strong{min-width:42px;color:#4f67d9}.cue span{line-height:1.4}.more{font-size:12px;opacity:.7}\n</style></head><body><main class=\"card\"><div class=\"brand\">Cap</div><h1 id=\"title\">Recording</h1><p id=\"summary\">Loading recording context…</p><button class=\"open\" id=\"open\" type=\"button\">Open in Cap</button><h2 id=\"status\">Transcript</h2><div id=\"cues\"></div></main><script>(()=>{var Z0=Object.defineProperty;var A0=(e)=>e;function U0(e,t){this[e]=A0.bind(null,t)}var tt=(e,t)=>{for(var n in t)Z0(e,n,{get:t[n],enumerable:!0,configurable:!0,set:U0.bind(t,n)})};var{create:M0,defineProperty:Iu,getOwnPropertyDescriptor:D0,getOwnPropertyNames:L0,getPrototypeOf:q0}=Object,F0=Object.prototype.hasOwnProperty,cy=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),uy=(e,t)=>{let n={};for(var o in e)Iu(n,o,{get:e[o],enumerable:!0});if(t)Iu(n,Symbol.toStringTag,{value:\"Module\"});return n},V0=(e,t,n,o)=>{if(t&&typeof t===\"object\"||typeof t===\"function\"){for(var r=L0(t),i=0,s=r.length,a;i<s;i++)if(a=r[i],!F0.call(e,a)&&a!==n)Iu(e,a,{get:((c)=>t[c]).bind(null,a),enumerable:!(o=D0(t,a))||o.enumerable})}return e},ly=(e,t,n)=>(n=e!=null?M0(q0(e)):{},V0(t||!e||!e.__esModule?Iu(n,\"default\",{value:e,enumerable:!0}):n,e));var J0=new Set([\"https://json-schema.org/draft/2019-09/schema\",\"http://json-schema.org/draft/2019-09/schema\"]);function dy(e){return typeof e===\"string\"&&J0.has(e.replace(/#$/,\"\"))}var py,Tp=Object.freeze({status:\"aborted\"});function S(e,t,n){function o(a,c){if(!a._zod)Object.defineProperty(a,\"_zod\",{value:{def:c,constr:s,traits:new Set},enumerable:!1});if(a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=s.prototype,l=Object.keys(u);for(let m=0;m<l.length;m++){let f=l[m];if(!(f in a))a[f]=u[f].bind(a)}}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,\"name\",{value:e});function s(a){var c;let u=n?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,\"init\",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:(a)=>{if(n?.Parent&&a instanceof n.Parent)return!0;return a?._zod?.traits?.has(e)}}),Object.defineProperty(s,\"name\",{value:e}),s}var B0=Symbol(\"zod_brand\");class Lt extends Error{constructor(){super(\"Encountered Promise during synchronous parse. Use .parseAsync() instead.\")}}class os extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name=\"ZodEncodeError\"}}(py=globalThis).__zod_globalConfig??(py.__zod_globalConfig={});var Jn=globalThis.__zod_globalConfig;function rt(e){if(e)Object.assign(Jn,e);return Jn}var ee={};tt(ee,{BIGINT_FORMAT_RANGES:()=>gy,Class:()=>Sy,NUMBER_FORMAT_RANGES:()=>Ap,aborted:()=>fr,allowsEval:()=>Np,assert:()=>Y0,assertEqual:()=>H0,assertIs:()=>W0,assertNever:()=>K0,assertNotEqual:()=>G0,assignProp:()=>pr,base64ToUint8Array:()=>vy,base64urlToUint8Array:()=>fO,cached:()=>Hn,captureStackTrace:()=>Ou,cleanEnum:()=>mO,cleanRegex:()=>cs,clone:()=>_t,cloneDef:()=>Q0,createTransparentProxy:()=>iO,defineLazy:()=>Q,esc:()=>Eu,escapeRegex:()=>Ft,explicitlyAborted:()=>Up,extend:()=>cO,finalizeIssue:()=>vt,floatSafeRemainder:()=>Op,getElementAtPath:()=>eO,getEnumValues:()=>ss,getLengthableOrigin:()=>us,getParsedType:()=>oO,getSizableOrigin:()=>_y,hexToUint8Array:()=>gO,isObject:()=>Yr,isPlainObject:()=>mr,issue:()=>Gn,joinValues:()=>Tu,jsonStringifyReplacer:()=>Bn,merge:()=>lO,mergeDefs:()=>qt,normalizeParams:()=>M,nullish:()=>as,numKeys:()=>nO,objectClone:()=>X0,omit:()=>aO,optionalKeys:()=>Zp,parsedType:()=>Mp,partial:()=>dO,pick:()=>sO,prefixIssues:()=>Vt,primitiveTypes:()=>hy,promiseAllObject:()=>tO,propertyKeyTypes:()=>Cp,randomString:()=>rO,required:()=>pO,safeExtend:()=>uO,shallowClone:()=>fy,slugify:()=>jp,stringifyPrimitive:()=>ju,uint8ArrayToBase64:()=>by,uint8ArrayToBase64url:()=>hO,uint8ArrayToHex:()=>_O,unwrapMessage:()=>is});function H0(e){return e}function G0(e){return e}function W0(e){}function K0(e){throw Error(\"Unexpected value in exhaustive check\")}function Y0(e){}function ss(e){let t=Object.values(e).filter((o)=>typeof o===\"number\");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function Tu(e,t=\"|\"){return e.map((n)=>ju(n)).join(t)}function Bn(e,t){if(typeof t===\"bigint\")return t.toString();return t}function Hn(e){return{get value(){{let n=e();return Object.defineProperty(this,\"value\",{value:n}),n}throw Error(\"cached value already set\")}}}function as(e){return e===null||e===void 0}function cs(e){let t=e.startsWith(\"^\")?1:0,n=e.endsWith(\"$\")?e.length-1:e.length;return e.slice(t,n)}function Op(e,t){let n=e/t,o=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);if(Math.abs(n-o)<r)return 0;return n-o}var my=Symbol(\"evaluating\");function Q(e,t,n){let o=void 0;Object.defineProperty(e,t,{get(){if(o===my)return;if(o===void 0)o=my,o=n();return o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function X0(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function pr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function qt(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function Q0(e){return qt(e._zod.def)}function eO(e,t){if(!t)return e;return t.reduce((n,o)=>n?.[o],e)}function tO(e){let t=Object.keys(e),n=t.map((o)=>e[o]);return Promise.all(n).then((o)=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function rO(e=10){let n=\"\";for(let o=0;o<e;o++)n+=\"abcdefghijklmnopqrstuvwxyz\"[Math.floor(Math.random()*26)];return n}function Eu(e){return JSON.stringify(e)}function jp(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,\"\").replace(/[\\s_-]+/g,\"-\").replace(/^-+|-+$/g,\"\")}var Ou=\"captureStackTrace\"in Error?Error.captureStackTrace:(...e)=>{};function Yr(e){return typeof e===\"object\"&&e!==null&&!Array.isArray(e)}var Np=Hn(()=>{if(Jn.jitless)return!1;if(typeof navigator<\"u\"&&navigator?.userAgent?.includes(\"Cloudflare\"))return!1;try{return new Function(\"\"),!0}catch(e){return!1}});function mr(e){if(Yr(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!==\"function\")return!0;let n=t.prototype;if(Yr(n)===!1)return!1;if(Object.prototype.hasOwnProperty.call(n,\"isPrototypeOf\")===!1)return!1;return!0}function fy(e){if(mr(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}function nO(e){let t=0;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n))t++;return t}var oO=(e)=>{let t=typeof e;switch(t){case\"undefined\":return\"undefined\";case\"string\":return\"string\";case\"number\":return Number.isNaN(e)?\"nan\":\"number\";case\"boolean\":return\"boolean\";case\"function\":return\"function\";case\"bigint\":return\"bigint\";case\"symbol\":return\"symbol\";case\"object\":if(Array.isArray(e))return\"array\";if(e===null)return\"null\";if(e.then&&typeof e.then===\"function\"&&e.catch&&typeof e.catch===\"function\")return\"promise\";if(typeof Map<\"u\"&&e instanceof Map)return\"map\";if(typeof Set<\"u\"&&e instanceof Set)return\"set\";if(typeof Date<\"u\"&&e instanceof Date)return\"date\";if(typeof File<\"u\"&&e instanceof File)return\"file\";return\"object\";default:throw Error(`Unknown data type: ${t}`)}},Cp=new Set([\"string\",\"number\",\"symbol\"]),hy=new Set([\"string\",\"number\",\"bigint\",\"boolean\",\"symbol\",\"undefined\"]);function Ft(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function _t(e,t,n){let o=new e._zod.constr(t??e._zod.def);if(!t||n?.parent)o._zod.parent=e;return o}function M(e){let t=e;if(!t)return{};if(typeof t===\"string\")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error(\"Cannot specify both `message` and `error` params\");t.error=t.message}if(delete t.message,typeof t.error===\"string\")return{...t,error:()=>t.error};return t}function iO(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function ju(e){if(typeof e===\"bigint\")return e.toString()+\"n\";if(typeof e===\"string\")return`\"${e}\"`;return`${e}`}function Zp(e){return Object.keys(e).filter((t)=>e[t]._zod.optin===\"optional\"&&e[t]._zod.optout===\"optional\")}var Ap={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},gy={int64:[BigInt(\"-9223372036854775808\"),BigInt(\"9223372036854775807\")],uint64:[BigInt(0),BigInt(\"18446744073709551615\")]};function sO(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw Error(\".pick() cannot be used on object schemas containing refinements\");let i=qt(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in n.shape))throw Error(`Unrecognized key: \"${a}\"`);if(!t[a])continue;s[a]=n.shape[a]}return pr(this,\"shape\",s),s},checks:[]});return _t(e,i)}function aO(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw Error(\".omit() cannot be used on object schemas containing refinements\");let i=qt(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in n.shape))throw Error(`Unrecognized key: \"${a}\"`);if(!t[a])continue;delete s[a]}return pr(this,\"shape\",s),s},checks:[]});return _t(e,i)}function cO(e,t){if(!mr(t))throw Error(\"Invalid input to extend: expected a plain object\");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\")}let r=qt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return pr(this,\"shape\",i),i}});return _t(e,r)}function uO(e,t){if(!mr(t))throw Error(\"Invalid input to safeExtend: expected a plain object\");let n=qt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return pr(this,\"shape\",o),o}});return _t(e,n)}function lO(e,t){if(e._zod.def.checks?.length)throw Error(\".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.\");let n=qt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return pr(this,\"shape\",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return _t(e,n)}function dO(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(\".partial() cannot be used on object schemas containing refinements\");let s=qt(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(n)for(let u in n){if(!(u in a))throw Error(`Unrecognized key: \"${u}\"`);if(!n[u])continue;c[u]=e?new e({type:\"optional\",innerType:a[u]}):a[u]}else for(let u in a)c[u]=e?new e({type:\"optional\",innerType:a[u]}):a[u];return pr(this,\"shape\",c),c},checks:[]});return _t(t,s)}function pO(e,t,n){let o=qt(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let s in n){if(!(s in i))throw Error(`Unrecognized key: \"${s}\"`);if(!n[s])continue;i[s]=new e({type:\"nonoptional\",innerType:r[s]})}else for(let s in r)i[s]=new e({type:\"nonoptional\",innerType:r[s]});return pr(this,\"shape\",i),i}});return _t(t,o)}function fr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Up(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Vt(e,t){return t.map((n)=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function is(e){return typeof e===\"string\"?e:e?.message}function vt(e,t,n){let o=e.message?e.message:is(e.inst?._zod.def?.error?.(e))??is(t?.error?.(e))??is(n.customError?.(e))??is(n.localeError?.(e))??\"Invalid input\",{inst:r,continue:i,input:s,...a}=e;if(a.path??(a.path=[]),a.message=o,t?.reportInput)a.input=s;return a}function _y(e){if(e instanceof Set)return\"set\";if(e instanceof Map)return\"map\";if(e instanceof File)return\"file\";return\"unknown\"}function us(e){if(Array.isArray(e))return\"array\";if(typeof e===\"string\")return\"string\";return\"unknown\"}function Mp(e){let t=typeof e;switch(t){case\"number\":return Number.isNaN(e)?\"nan\":\"number\";case\"object\":{if(e===null)return\"null\";if(Array.isArray(e))return\"array\";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&\"constructor\"in n&&n.constructor)return n.constructor.name}}return t}function Gn(...e){let[t,n,o]=e;if(typeof t===\"string\")return{message:t,code:\"custom\",input:n,inst:o};return{...t}}function mO(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map((t)=>t[1])}function vy(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function by(e){let t=\"\";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function fO(e){let t=e.replace(/-/g,\"+\").replace(/_/g,\"/\"),n=\"=\".repeat((4-t.length%4)%4);return vy(t+n)}function hO(e){return by(e).replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=/g,\"\")}function gO(e){let t=e.replace(/^0x/,\"\");if(t.length%2!==0)throw Error(\"Invalid hex string length\");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function _O(e){return Array.from(e).map((t)=>t.toString(16).padStart(2,\"0\")).join(\"\")}class Sy{constructor(...e){}}var yy=(e,t)=>{e.name=\"$ZodError\",Object.defineProperty(e,\"_zod\",{value:e._zod,enumerable:!1}),Object.defineProperty(e,\"issues\",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Bn,2),Object.defineProperty(e,\"toString\",{value:()=>e.message,enumerable:!1})},Nu=S(\"$ZodError\",yy),Dp=S(\"$ZodError\",yy,{Parent:Error});function Lp(e,t=(n)=>n.message){let n={},o=[];for(let r of e.issues)if(r.path.length>0)n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r));else o.push(t(r));return{formErrors:o,fieldErrors:n}}function qp(e,t=(n)=>n.message){let n={_errors:[]},o=(r,i=[])=>{for(let s of r.issues)if(s.code===\"invalid_union\"&&s.errors.length)s.errors.map((a)=>o({issues:a},[...i,...s.path]));else if(s.code===\"invalid_key\")o({issues:s.issues},[...i,...s.path]);else if(s.code===\"invalid_element\")o({issues:s.issues},[...i,...s.path]);else{let a=[...i,...s.path];if(a.length===0)n._errors.push(t(s));else{let c=n,u=0;while(u<a.length){let l=a[u];if(u!==a.length-1)c[l]=c[l]||{_errors:[]};else c[l]=c[l]||{_errors:[]},c[l]._errors.push(t(s));c=c[l],u++}}}};return o(e),n}var Cu=(e)=>(t,n,o,r)=>{let i=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Lt;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map((c)=>vt(c,i,rt())));throw Ou(a,r?.callee),a}return s.value};var Zu=(e)=>async(t,n,o,r)=>{let i=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)s=await s;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map((c)=>vt(c,i,rt())));throw Ou(a,r?.callee),a}return s.value};var ls=(e)=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Lt;return i.issues.length?{success:!1,error:new(e??Nu)(i.issues.map((s)=>vt(s,r,rt())))}:{success:!0,data:i.value}},zy=ls(Dp),ds=(e)=>async(t,n,o)=>{let r=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)i=await i;return i.issues.length?{success:!1,error:new e(i.issues.map((s)=>vt(s,r,rt())))}:{success:!0,data:i.value}},$y=ds(Dp),xy=(e)=>(t,n,o)=>{let r=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return Cu(e)(t,n,r)};var wy=(e)=>(t,n,o)=>Cu(e)(t,n,o);var ky=(e)=>async(t,n,o)=>{let r=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return Zu(e)(t,n,r)};var Py=(e)=>async(t,n,o)=>Zu(e)(t,n,o);var Ry=(e)=>(t,n,o)=>{let r=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return ls(e)(t,n,r)};var Iy=(e)=>(t,n,o)=>ls(e)(t,n,o);var Ty=(e)=>async(t,n,o)=>{let r=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return ds(e)(t,n,r)};var Ey=(e)=>async(t,n,o)=>ds(e)(t,n,o);var Oy=/^[cC][0-9a-z]{6,}$/,jy=/^[0-9a-z]+$/,Ny=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Cy=/^[0-9a-vA-V]{20}$/,Zy=/^[A-Za-z0-9]{27}$/,Ay=/^[a-zA-Z0-9_-]{21}$/,Uy=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;var My=/^([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})$/,Fp=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var Dy=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;var bO=\"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\";function Ly(){return new RegExp(bO,\"u\")}var qy=/^(?:(?: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])$/,Fy=/^(([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}|:))$/;var Vy=/^((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])$/,Jy=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,By=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Vp=/^[A-Za-z0-9_-]*$/;var Hy=/^https?$/,Gy=/^\\+[1-9]\\d{6,14}$/,Wy=\"(?:(?:\\\\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])))\",Ky=new RegExp(`^${Wy}$`);function Yy(e){return typeof e.precision===\"number\"?e.precision===-1?\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d\":e.precision===0?\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\":`(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?\"}function Xy(e){return new RegExp(`^${Yy(e)}$`)}function Qy(e){let t=Yy({precision:e.precision}),n=[\"Z\"];if(e.local)n.push(\"\");if(e.offset)n.push(\"([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)\");let o=`${t}(?:${n.join(\"|\")})`;return new RegExp(`^${Wy}T(?:${o})$`)}var ez=(e)=>{let t=e?`[\\\\s\\\\S]{${e?.minimum??0},${e?.maximum??\"\"}}`:\"[\\\\s\\\\S]*\";return new RegExp(`^${t}$`)},tz=/^-?\\d+n?$/,rz=/^-?\\d+$/,Au=/^-?\\d+(?:\\.\\d+)?$/,nz=/^(?:true|false)$/i,oz=/^null$/i;var iz=/^[^A-Z]*$/,sz=/^[^a-z]*$/;var Ze=S(\"$ZodCheck\",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),az={number:\"number\",bigint:\"bigint\",object:\"date\"},Jp=S(\"$ZodCheckLessThan\",(e,t)=>{Ze.init(e,t);let n=az[typeof t.value];e._zod.onattach.push((o)=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<i)if(t.inclusive)r.maximum=t.value;else r.exclusiveMaximum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value<=t.value:o.value<t.value)return;o.issues.push({origin:n,code:\"too_big\",maximum:typeof t.value===\"object\"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Bp=S(\"$ZodCheckGreaterThan\",(e,t)=>{Ze.init(e,t);let n=az[typeof t.value];e._zod.onattach.push((o)=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>i)if(t.inclusive)r.minimum=t.value;else r.exclusiveMinimum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value>=t.value:o.value>t.value)return;o.issues.push({origin:n,code:\"too_small\",minimum:typeof t.value===\"object\"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),cz=S(\"$ZodCheckMultipleOf\",(e,t)=>{Ze.init(e,t),e._zod.onattach.push((n)=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=(n)=>{if(typeof n.value!==typeof t.value)throw Error(\"Cannot mix number and bigint in multiple_of check.\");if(typeof n.value===\"bigint\"?n.value%t.value===BigInt(0):Op(n.value,t.value)===0)return;n.issues.push({origin:typeof n.value,code:\"not_multiple_of\",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),uz=S(\"$ZodCheckNumberFormat\",(e,t)=>{Ze.init(e,t),t.format=t.format||\"float64\";let n=t.format?.includes(\"int\"),o=n?\"int\":\"number\",[r,i]=Ap[t.format];e._zod.onattach.push((s)=>{let a=s._zod.bag;if(a.format=t.format,a.minimum=r,a.maximum=i,n)a.pattern=rz}),e._zod.check=(s)=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:\"invalid_type\",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)s.issues.push({input:a,code:\"too_big\",maximum:Number.MAX_SAFE_INTEGER,note:\"Integers must be within the safe integer range.\",inst:e,origin:o,inclusive:!0,continue:!t.abort});else s.issues.push({input:a,code:\"too_small\",minimum:Number.MIN_SAFE_INTEGER,note:\"Integers must be within the safe integer range.\",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}if(a<r)s.issues.push({origin:\"number\",input:a,code:\"too_small\",minimum:r,inclusive:!0,inst:e,continue:!t.abort});if(a>i)s.issues.push({origin:\"number\",input:a,code:\"too_big\",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}});var lz=S(\"$ZodCheckMaxLength\",(e,t)=>{var n;Ze.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!as(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<r)o._zod.bag.maximum=t.maximum}),e._zod.check=(o)=>{let r=o.value;if(r.length<=t.maximum)return;let s=us(r);o.issues.push({origin:s,code:\"too_big\",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),dz=S(\"$ZodCheckMinLength\",(e,t)=>{var n;Ze.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!as(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>r)o._zod.bag.minimum=t.minimum}),e._zod.check=(o)=>{let r=o.value;if(r.length>=t.minimum)return;let s=us(r);o.issues.push({origin:s,code:\"too_small\",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),pz=S(\"$ZodCheckLengthEquals\",(e,t)=>{var n;Ze.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!as(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=(o)=>{let r=o.value,i=r.length;if(i===t.length)return;let s=us(r),a=i>t.length;o.issues.push({origin:s,...a?{code:\"too_big\",maximum:t.length}:{code:\"too_small\",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),ms=S(\"$ZodCheckStringFormat\",(e,t)=>{var n,o;if(Ze.init(e,t),e._zod.onattach.push((r)=>{let i=r._zod.bag;if(i.format=t.format,t.pattern)i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern)}),t.pattern)(n=e._zod).check??(n.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;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})});else(o=e._zod).check??(o.check=()=>{})}),mz=S(\"$ZodCheckRegex\",(e,t)=>{ms.init(e,t),e._zod.check=(n)=>{if(t.pattern.lastIndex=0,t.pattern.test(n.value))return;n.issues.push({origin:\"string\",code:\"invalid_format\",format:\"regex\",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),fz=S(\"$ZodCheckLowerCase\",(e,t)=>{t.pattern??(t.pattern=iz),ms.init(e,t)}),hz=S(\"$ZodCheckUpperCase\",(e,t)=>{t.pattern??(t.pattern=sz),ms.init(e,t)}),gz=S(\"$ZodCheckIncludes\",(e,t)=>{Ze.init(e,t);let n=Ft(t.includes),o=new RegExp(typeof t.position===\"number\"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push((r)=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=(r)=>{if(r.value.includes(t.includes,t.position))return;r.issues.push({origin:\"string\",code:\"invalid_format\",format:\"includes\",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),_z=S(\"$ZodCheckStartsWith\",(e,t)=>{Ze.init(e,t);let n=new RegExp(`^${Ft(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.startsWith(t.prefix))return;o.issues.push({origin:\"string\",code:\"invalid_format\",format:\"starts_with\",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),vz=S(\"$ZodCheckEndsWith\",(e,t)=>{Ze.init(e,t);let n=new RegExp(`.*${Ft(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.endsWith(t.suffix))return;o.issues.push({origin:\"string\",code:\"invalid_format\",format:\"ends_with\",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});var bz=S(\"$ZodCheckOverwrite\",(e,t)=>{Ze.init(e,t),e._zod.check=(n)=>{n.value=t.tx(n.value)}});class Hp{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e===\"function\"){e(this,{execution:\"sync\"}),e(this,{execution:\"async\"});return}let n=e.split(`\n`).filter((i)=>i),o=Math.min(...n.map((i)=>i.length-i.trimStart().length)),r=n.map((i)=>i.slice(o)).map((i)=>\" \".repeat(this.indent*2)+i);for(let i of r)this.content.push(i)}compile(){let e=Function,t=this?.args,o=[...(this?.content??[\"\"]).map((r)=>` ${r}`)];return new e(...t,o.join(`\n`))}}var yz={major:4,minor:4,patch:3};var ce=S(\"$ZodType\",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=yz;let o=[...e._zod.def.checks??[]];if(e._zod.traits.has(\"$ZodCheck\"))o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(s,a,c)=>{let u=fr(s),l;for(let m of a){if(m._zod.def.when){if(Up(s))continue;if(!m._zod.def.when(s))continue}else if(u)continue;let f=s.issues.length,h=m._zod.check(s);if(h instanceof Promise&&c?.async===!1)throw new Lt;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{if(await h,s.issues.length===f)return;if(!u)u=fr(s,f)});else{if(s.issues.length===f)continue;if(!u)u=fr(s,f)}}if(l)return l.then(()=>s);return s},i=(s,a,c)=>{if(fr(s))return s.aborted=!0,s;let u=r(a,o,c);if(u instanceof Promise){if(c.async===!1)throw new Lt;return u.then((l)=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction===\"backward\"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});if(u instanceof Promise)return u.then((l)=>i(l,s,a));return i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new Lt;return c.then((u)=>r(u,o,a))}return r(c,o,a)}}Q(e,\"~standard\",()=>({validate:(r)=>{try{let i=zy(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch(i){return $y(e,r).then((s)=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:\"zod\",version:1}))}),Du=S(\"$ZodString\",(e,t)=>{ce.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ez(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}if(typeof n.value===\"string\")return n;return n.issues.push({expected:\"string\",code:\"invalid_type\",input:n.value,inst:e}),n}}),_e=S(\"$ZodStringFormat\",(e,t)=>{ms.init(e,t),Du.init(e,t)}),Tz=S(\"$ZodGUID\",(e,t)=>{t.pattern??(t.pattern=My),_e.init(e,t)}),Ez=S(\"$ZodUUID\",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw Error(`Invalid UUID version: \"${t.version}\"`);t.pattern??(t.pattern=Fp(o))}else t.pattern??(t.pattern=Fp());_e.init(e,t)}),Oz=S(\"$ZodEmail\",(e,t)=>{t.pattern??(t.pattern=Dy),_e.init(e,t)}),jz=S(\"$ZodURL\",(e,t)=>{_e.init(e,t),e._zod.check=(n)=>{try{let o=n.value.trim();if(!t.normalize&&t.protocol?.source===Hy.source){if(!/^https?:\\/\\//i.test(o)){n.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid URL format\",input:n.value,inst:e,continue:!t.abort});return}}let r=new URL(o);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(r.hostname))n.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid hostname\",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(r.protocol.endsWith(\":\")?r.protocol.slice(0,-1):r.protocol))n.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid protocol\",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})}if(t.normalize)n.value=r.href;else n.value=o;return}catch(o){n.issues.push({code:\"invalid_format\",format:\"url\",input:n.value,inst:e,continue:!t.abort})}}}),Nz=S(\"$ZodEmoji\",(e,t)=>{t.pattern??(t.pattern=Ly()),_e.init(e,t)}),Cz=S(\"$ZodNanoID\",(e,t)=>{t.pattern??(t.pattern=Ay),_e.init(e,t)}),Zz=S(\"$ZodCUID\",(e,t)=>{t.pattern??(t.pattern=Oy),_e.init(e,t)}),Az=S(\"$ZodCUID2\",(e,t)=>{t.pattern??(t.pattern=jy),_e.init(e,t)}),Uz=S(\"$ZodULID\",(e,t)=>{t.pattern??(t.pattern=Ny),_e.init(e,t)}),Mz=S(\"$ZodXID\",(e,t)=>{t.pattern??(t.pattern=Cy),_e.init(e,t)}),Dz=S(\"$ZodKSUID\",(e,t)=>{t.pattern??(t.pattern=Zy),_e.init(e,t)}),Lz=S(\"$ZodISODateTime\",(e,t)=>{t.pattern??(t.pattern=Qy(t)),_e.init(e,t)}),qz=S(\"$ZodISODate\",(e,t)=>{t.pattern??(t.pattern=Ky),_e.init(e,t)}),Fz=S(\"$ZodISOTime\",(e,t)=>{t.pattern??(t.pattern=Xy(t)),_e.init(e,t)}),Vz=S(\"$ZodISODuration\",(e,t)=>{t.pattern??(t.pattern=Uy),_e.init(e,t)}),Jz=S(\"$ZodIPv4\",(e,t)=>{t.pattern??(t.pattern=qy),_e.init(e,t),e._zod.bag.format=\"ipv4\"}),Bz=S(\"$ZodIPv6\",(e,t)=>{t.pattern??(t.pattern=Fy),_e.init(e,t),e._zod.bag.format=\"ipv6\",e._zod.check=(n)=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:\"invalid_format\",format:\"ipv6\",input:n.value,inst:e,continue:!t.abort})}}});var Hz=S(\"$ZodCIDRv4\",(e,t)=>{t.pattern??(t.pattern=Vy),_e.init(e,t)}),Gz=S(\"$ZodCIDRv6\",(e,t)=>{t.pattern??(t.pattern=Jy),_e.init(e,t),e._zod.check=(n)=>{let o=n.value.split(\"/\");try{if(o.length!==2)throw Error();let[r,i]=o;if(!i)throw Error();let s=Number(i);if(`${s}`!==i)throw Error();if(s<0||s>128)throw Error();new URL(`http://[${r}]`)}catch{n.issues.push({code:\"invalid_format\",format:\"cidrv6\",input:n.value,inst:e,continue:!t.abort})}}});function Wz(e){if(e===\"\")return!0;if(/\\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Kz=S(\"$ZodBase64\",(e,t)=>{t.pattern??(t.pattern=By),_e.init(e,t),e._zod.bag.contentEncoding=\"base64\",e._zod.check=(n)=>{if(Wz(n.value))return;n.issues.push({code:\"invalid_format\",format:\"base64\",input:n.value,inst:e,continue:!t.abort})}});function SO(e){if(!Vp.test(e))return!1;let t=e.replace(/[-_]/g,(o)=>o===\"-\"?\"+\":\"/\"),n=t.padEnd(Math.ceil(t.length/4)*4,\"=\");return Wz(n)}var Yz=S(\"$ZodBase64URL\",(e,t)=>{t.pattern??(t.pattern=Vp),_e.init(e,t),e._zod.bag.contentEncoding=\"base64url\",e._zod.check=(n)=>{if(SO(n.value))return;n.issues.push({code:\"invalid_format\",format:\"base64url\",input:n.value,inst:e,continue:!t.abort})}}),Xz=S(\"$ZodE164\",(e,t)=>{t.pattern??(t.pattern=Gy),_e.init(e,t)});function yO(e,t=null){try{let n=e.split(\".\");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));if(\"typ\"in r&&r?.typ!==\"JWT\")return!1;if(!r.alg)return!1;if(t&&(!(\"alg\"in r)||r.alg!==t))return!1;return!0}catch{return!1}}var Qz=S(\"$ZodJWT\",(e,t)=>{_e.init(e,t),e._zod.check=(n)=>{if(yO(n.value,t.alg))return;n.issues.push({code:\"invalid_format\",format:\"jwt\",input:n.value,inst:e,continue:!t.abort})}});var Wp=S(\"$ZodNumber\",(e,t)=>{ce.init(e,t),e._zod.pattern=e._zod.bag.pattern??Au,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch(s){}let r=n.value;if(typeof r===\"number\"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r===\"number\"?Number.isNaN(r)?\"NaN\":!Number.isFinite(r)?\"Infinity\":void 0:void 0;return n.issues.push({expected:\"number\",code:\"invalid_type\",input:r,inst:e,...i?{received:i}:{}}),n}}),e$=S(\"$ZodNumberFormat\",(e,t)=>{uz.init(e,t),Wp.init(e,t)}),t$=S(\"$ZodBoolean\",(e,t)=>{ce.init(e,t),e._zod.pattern=nz,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(i){}let r=n.value;if(typeof r===\"boolean\")return n;return n.issues.push({expected:\"boolean\",code:\"invalid_type\",input:r,inst:e}),n}}),r$=S(\"$ZodBigInt\",(e,t)=>{ce.init(e,t),e._zod.pattern=tz,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(r){}if(typeof n.value===\"bigint\")return n;return n.issues.push({expected:\"bigint\",code:\"invalid_type\",input:n.value,inst:e}),n}});var n$=S(\"$ZodNull\",(e,t)=>{ce.init(e,t),e._zod.pattern=oz,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;if(r===null)return n;return n.issues.push({expected:\"null\",code:\"invalid_type\",input:r,inst:e}),n}}),o$=S(\"$ZodAny\",(e,t)=>{ce.init(e,t),e._zod.parse=(n)=>n}),i$=S(\"$ZodUnknown\",(e,t)=>{ce.init(e,t),e._zod.parse=(n)=>n}),s$=S(\"$ZodNever\",(e,t)=>{ce.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:\"never\",code:\"invalid_type\",input:n.value,inst:e}),n)});var a$=S(\"$ZodDate\",(e,t)=>{ce.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(a){}let r=n.value,i=r instanceof Date;if(i&&!Number.isNaN(r.getTime()))return n;return n.issues.push({expected:\"date\",code:\"invalid_type\",input:r,...i?{received:\"Invalid Date\"}:{},inst:e}),n}});function zz(e,t,n){if(e.issues.length)t.issues.push(...Vt(n,e.issues));t.value[n]=e.value}var c$=S(\"$ZodArray\",(e,t)=>{ce.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:\"array\",code:\"invalid_type\",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let s=0;s<r.length;s++){let a=r[s],c=t.element._zod.run({value:a,issues:[]},o);if(c instanceof Promise)i.push(c.then((u)=>zz(u,n,s)));else zz(c,n,s)}if(i.length)return Promise.all(i).then(()=>n);return n}});function Mu(e,t,n,o,r,i){let s=n in o;if(e.issues.length){if(r&&i&&!s)return;t.issues.push(...Vt(n,e.issues))}if(!s&&!r){if(!e.issues.length)t.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:void 0,path:[n]});return}if(e.value===void 0){if(s)t.value[n]=void 0}else t.value[n]=e.value}function u$(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has(\"$ZodType\"))throw Error(`Invalid element at key \"${o}\": expected a Zod schema`);let n=Zp(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function l$(e,t,n,o,r,i){let s=[],a=r.keySet,c=r.catchall._zod,u=c.def.type,l=c.optin===\"optional\",m=c.optout===\"optional\";for(let f in t){if(f===\"__proto__\")continue;if(a.has(f))continue;if(u===\"never\"){s.push(f);continue}let h=c.run({value:t[f],issues:[]},o);if(h instanceof Promise)e.push(h.then((z)=>Mu(z,n,f,t,l,m)));else Mu(h,n,f,t,l,m)}if(s.length)n.issues.push({code:\"unrecognized_keys\",keys:s,input:t,inst:i});if(!e.length)return n;return Promise.all(e).then(()=>n)}var zO=S(\"$ZodObject\",(e,t)=>{if(ce.init(e,t),!Object.getOwnPropertyDescriptor(t,\"shape\")?.get){let a=t.shape;Object.defineProperty(t,\"shape\",{get:()=>{let c={...a};return Object.defineProperty(t,\"shape\",{value:c}),c}})}let o=Hn(()=>u$(t));Q(e._zod,\"propValues\",()=>{let a=t.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let m of l.values)c[u].add(m)}}return c});let r=Yr,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!r(u))return a.issues.push({expected:\"object\",code:\"invalid_type\",input:u,inst:e}),a;a.value={};let l=[],m=s.shape;for(let f of s.keys){let h=m[f],z=h._zod.optin===\"optional\",C=h._zod.optout===\"optional\",I=h._zod.run({value:u[f],issues:[]},c);if(I instanceof Promise)l.push(I.then((X)=>Mu(X,a,f,u,z,C)));else Mu(I,a,f,u,z,C)}if(!i)return l.length?Promise.all(l).then(()=>a):a;return l$(l,u,a,c,o.value,e)}}),d$=S(\"$ZodObjectJIT\",(e,t)=>{zO.init(e,t);let n=e._zod.parse,o=Hn(()=>u$(t)),r=(f)=>{let h=new Hp([\"shape\",\"payload\",\"ctx\"]),z=o.value,C=(q)=>{let E=Eu(q);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};h.write(\"const input = payload.value;\");let I=Object.create(null),X=0;for(let q of z.keys)I[q]=`key_${X++}`;h.write(\"const newResult = {};\");for(let q of z.keys){let E=I[q],U=Eu(q),ie=f[q],Se=ie?._zod?.optin===\"optional\",at=ie?._zod?.optout===\"optional\";if(h.write(`const ${E} = ${C(q)};`),Se&&at)h.write(`\n if (${E}.issues.length) {\n if (${U} in input) {\n payload.issues = payload.issues.concat(${E}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${U}, ...iss.path] : [${U}]\n })));\n }\n }\n \n if (${E}.value === undefined) {\n if (${U} in input) {\n newResult[${U}] = undefined;\n }\n } else {\n newResult[${U}] = ${E}.value;\n }\n \n `);else if(!Se)h.write(`\n const ${E}_present = ${U} in input;\n if (${E}.issues.length) {\n payload.issues = payload.issues.concat(${E}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${U}, ...iss.path] : [${U}]\n })));\n }\n if (!${E}_present && !${E}.issues.length) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [${U}]\n });\n }\n\n if (${E}_present) {\n if (${E}.value === undefined) {\n newResult[${U}] = undefined;\n } else {\n newResult[${U}] = ${E}.value;\n }\n }\n\n `);else h.write(`\n if (${E}.issues.length) {\n payload.issues = payload.issues.concat(${E}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${U}, ...iss.path] : [${U}]\n })));\n }\n \n if (${E}.value === undefined) {\n if (${U} in input) {\n newResult[${U}] = undefined;\n }\n } else {\n newResult[${U}] = ${E}.value;\n }\n \n `)}h.write(\"payload.value = newResult;\"),h.write(\"return payload;\");let fe=h.compile();return(q,E)=>fe(f,q,E)},i,s=Yr,a=!Jn.jitless,u=a&&Np.value,l=t.catchall,m;e._zod.parse=(f,h)=>{m??(m=o.value);let z=f.value;if(!s(z))return f.issues.push({expected:\"object\",code:\"invalid_type\",input:z,inst:e}),f;if(a&&u&&h?.async===!1&&h.jitless!==!0){if(!i)i=r(t.shape);if(f=i(f,h),!l)return f;return l$([],z,f,h,m,e)}return n(f,h)}});function $z(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter((i)=>!fr(i));if(r.length===1)return t.value=r[0].value,r[0];return t.issues.push({code:\"invalid_union\",input:t.value,inst:n,errors:e.map((i)=>i.issues.map((s)=>vt(s,o,rt())))}),t}var Kp=S(\"$ZodUnion\",(e,t)=>{ce.init(e,t),Q(e._zod,\"optin\",()=>t.options.some((o)=>o._zod.optin===\"optional\")?\"optional\":void 0),Q(e._zod,\"optout\",()=>t.options.some((o)=>o._zod.optout===\"optional\")?\"optional\":void 0),Q(e._zod,\"values\",()=>{if(t.options.every((o)=>o._zod.values))return new Set(t.options.flatMap((o)=>Array.from(o._zod.values)));return}),Q(e._zod,\"pattern\",()=>{if(t.options.every((o)=>o._zod.pattern)){let o=t.options.map((r)=>r._zod.pattern);return new RegExp(`^(${o.map((r)=>cs(r.source)).join(\"|\")})$`)}return});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},r);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}if(!i)return $z(s,o,e,r);return Promise.all(s).then((a)=>$z(a,o,e,r))}});var p$=S(\"$ZodDiscriminatedUnion\",(e,t)=>{t.inclusive=!1,Kp.init(e,t);let n=e._zod.parse;Q(e._zod,\"propValues\",()=>{let r={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw Error(`Invalid discriminated union option at index \"${t.options.indexOf(i)}\"`);for(let[a,c]of Object.entries(s)){if(!r[a])r[a]=new Set;for(let u of c)r[a].add(u)}}return r});let o=Hn(()=>{let r=t.options,i=new Map;for(let s of r){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw Error(`Invalid discriminated union option at index \"${t.options.indexOf(s)}\"`);for(let c of a){if(i.has(c))throw Error(`Duplicate discriminator value \"${String(c)}\"`);i.set(c,s)}}return i});e._zod.parse=(r,i)=>{let s=r.value;if(!Yr(s))return r.issues.push({code:\"invalid_type\",expected:\"object\",input:s,inst:e}),r;let a=o.value.get(s?.[t.discriminator]);if(a)return a._zod.run(r,i);if(t.unionFallback||i.direction===\"backward\")return n(r,i);return r.issues.push({code:\"invalid_union\",errors:[],note:\"No matching discriminator\",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),r}}),m$=S(\"$ZodIntersection\",(e,t)=>{ce.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),s=t.right._zod.run({value:r,issues:[]},o);if(i instanceof Promise||s instanceof Promise)return Promise.all([i,s]).then(([c,u])=>xz(n,c,u));return xz(n,i,s)}});function Gp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(mr(e)&&mr(t)){let n=Object.keys(t),o=Object.keys(e).filter((i)=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let s=Gp(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r[i]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],s=Gp(r,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function xz(e,t,n){let o=new Map,r;for(let a of t.issues)if(a.code===\"unrecognized_keys\"){r??(r=a);for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).l=!0}}else e.issues.push(a);for(let a of n.issues)if(a.code===\"unrecognized_keys\")for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).r=!0}else e.issues.push(a);let i=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&r)e.issues.push({...r,keys:i});if(fr(e))return e;let s=Gp(t.value,n.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var f$=S(\"$ZodRecord\",(e,t)=>{ce.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!mr(r))return n.issues.push({expected:\"record\",code:\"invalid_type\",input:r,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let a=new Set;for(let u of s)if(typeof u===\"string\"||typeof u===\"number\"||typeof u===\"symbol\"){a.add(typeof u===\"number\"?u.toString():u);let l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(l.issues.length){n.issues.push({code:\"invalid_key\",origin:\"record\",issues:l.issues.map((h)=>vt(h,o,rt())),input:u,path:[u],inst:e});continue}let m=l.value,f=t.valueType._zod.run({value:r[u],issues:[]},o);if(f instanceof Promise)i.push(f.then((h)=>{if(h.issues.length)n.issues.push(...Vt(u,h.issues));n.value[m]=h.value}));else{if(f.issues.length)n.issues.push(...Vt(u,f.issues));n.value[m]=f.value}}let c;for(let u in r)if(!a.has(u))c=c??[],c.push(u);if(c&&c.length>0)n.issues.push({code:\"unrecognized_keys\",input:r,inst:e,keys:c})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a===\"__proto__\")continue;if(!Object.prototype.propertyIsEnumerable.call(r,a))continue;let c=t.keyType._zod.run({value:a,issues:[]},o);if(c instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(typeof a===\"string\"&&Au.test(a)&&c.issues.length){let m=t.keyType._zod.run({value:Number(a),issues:[]},o);if(m instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(m.issues.length===0)c=m}if(c.issues.length){if(t.mode===\"loose\")n.value[a]=r[a];else n.issues.push({code:\"invalid_key\",origin:\"record\",issues:c.issues.map((m)=>vt(m,o,rt())),input:a,path:[a],inst:e});continue}let l=t.valueType._zod.run({value:r[a],issues:[]},o);if(l instanceof Promise)i.push(l.then((m)=>{if(m.issues.length)n.issues.push(...Vt(a,m.issues));n.value[c.value]=m.value}));else{if(l.issues.length)n.issues.push(...Vt(a,l.issues));n.value[c.value]=l.value}}}if(i.length)return Promise.all(i).then(()=>n);return n}});var h$=S(\"$ZodEnum\",(e,t)=>{ce.init(e,t);let n=ss(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter((r)=>Cp.has(typeof r)).map((r)=>typeof r===\"string\"?Ft(r):r.toString()).join(\"|\")})$`),e._zod.parse=(r,i)=>{let s=r.value;if(o.has(s))return r;return r.issues.push({code:\"invalid_value\",values:n,input:s,inst:e}),r}}),g$=S(\"$ZodLiteral\",(e,t)=>{if(ce.init(e,t),t.values.length===0)throw Error(\"Cannot create literal schema with no valid values\");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map((o)=>typeof o===\"string\"?Ft(o):o?Ft(o.toString()):String(o)).join(\"|\")})$`),e._zod.parse=(o,r)=>{let i=o.value;if(n.has(i))return o;return o.issues.push({code:\"invalid_value\",values:t.values,input:i,inst:e}),o}});var _$=S(\"$ZodTransform\",(e,t)=>{ce.init(e,t),e._zod.optin=\"optional\",e._zod.parse=(n,o)=>{if(o.direction===\"backward\")throw new os(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then((s)=>(n.value=s,n.fallback=!0,n));if(r instanceof Promise)throw new Lt;return n.value=r,n.fallback=!0,n}});function wz(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var Yp=S(\"$ZodOptional\",(e,t)=>{ce.init(e,t),e._zod.optin=\"optional\",e._zod.optout=\"optional\",Q(e._zod,\"values\",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Q(e._zod,\"pattern\",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${cs(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin===\"optional\"){let r=n.value,i=t.innerType._zod.run(n,o);if(i instanceof Promise)return i.then((s)=>wz(s,r));return wz(i,r)}if(n.value===void 0)return n;return t.innerType._zod.run(n,o)}}),v$=S(\"$ZodExactOptional\",(e,t)=>{Yp.init(e,t),Q(e._zod,\"values\",()=>t.innerType._zod.values),Q(e._zod,\"pattern\",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),b$=S(\"$ZodNullable\",(e,t)=>{ce.init(e,t),Q(e._zod,\"optin\",()=>t.innerType._zod.optin),Q(e._zod,\"optout\",()=>t.innerType._zod.optout),Q(e._zod,\"pattern\",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${cs(n.source)}|null)$`):void 0}),Q(e._zod,\"values\",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>{if(n.value===null)return n;return t.innerType._zod.run(n,o)}}),S$=S(\"$ZodDefault\",(e,t)=>{ce.init(e,t),e._zod.optin=\"optional\",Q(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>kz(i,t));return kz(r,t)}});function kz(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var y$=S(\"$ZodPrefault\",(e,t)=>{ce.init(e,t),e._zod.optin=\"optional\",Q(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(n,o);if(n.value===void 0)n.value=t.defaultValue;return t.innerType._zod.run(n,o)}}),z$=S(\"$ZodNonOptional\",(e,t)=>{ce.init(e,t),Q(e._zod,\"values\",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter((o)=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>Pz(i,e));return Pz(r,e)}});function Pz(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:e.value,inst:t});return e}var $$=S(\"$ZodCatch\",(e,t)=>{ce.init(e,t),e._zod.optin=\"optional\",Q(e._zod,\"optout\",()=>t.innerType._zod.optout),Q(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>{if(n.value=i.value,i.issues.length)n.value=t.catchValue({...n,error:{issues:i.issues.map((s)=>vt(s,o,rt()))},input:n.value}),n.issues=[],n.fallback=!0;return n});if(n.value=r.value,r.issues.length)n.value=t.catchValue({...n,error:{issues:r.issues.map((i)=>vt(i,o,rt()))},input:n.value}),n.issues=[],n.fallback=!0;return n}});var Xp=S(\"$ZodPipe\",(e,t)=>{ce.init(e,t),Q(e._zod,\"values\",()=>t.in._zod.values),Q(e._zod,\"optin\",()=>t.in._zod.optin),Q(e._zod,\"optout\",()=>t.out._zod.optout),Q(e._zod,\"propValues\",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction===\"backward\"){let i=t.out._zod.run(n,o);if(i instanceof Promise)return i.then((s)=>Uu(s,t.in,o));return Uu(i,t.in,o)}let r=t.in._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>Uu(i,t.out,o));return Uu(r,t.out,o)}});function Uu(e,t,n){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var x$=S(\"$ZodPreprocess\",(e,t)=>{Xp.init(e,t)}),w$=S(\"$ZodReadonly\",(e,t)=>{ce.init(e,t),Q(e._zod,\"propValues\",()=>t.innerType._zod.propValues),Q(e._zod,\"values\",()=>t.innerType._zod.values),Q(e._zod,\"optin\",()=>t.innerType?._zod?.optin),Q(e._zod,\"optout\",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then(Rz);return Rz(r)}});function Rz(e){return e.value=Object.freeze(e.value),e}var k$=S(\"$ZodLazy\",(e,t)=>{ce.init(e,t),Q(e._zod,\"innerType\",()=>{let n=t;if(!n._cachedInner)n._cachedInner=t.getter();return n._cachedInner}),Q(e._zod,\"pattern\",()=>e._zod.innerType?._zod?.pattern),Q(e._zod,\"propValues\",()=>e._zod.innerType?._zod?.propValues),Q(e._zod,\"optin\",()=>e._zod.innerType?._zod?.optin??void 0),Q(e._zod,\"optout\",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),P$=S(\"$ZodCustom\",(e,t)=>{Ze.init(e,t),ce.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=(n)=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then((i)=>Iz(i,n,o,e));Iz(r,n,o,e);return}});function Iz(e,t,n,o){if(!e){let r={code:\"custom\",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};if(o._zod.def.params)r.params=o._zod.def.params;t.issues.push(Gn(r))}}var $O=()=>{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\"}};function t(r){return e[r]??null}let n={regex:\"input\",email:\"email address\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO datetime\",date:\"ISO date\",time:\"ISO time\",duration:\"ISO duration\",ipv4:\"IPv4 address\",ipv6:\"IPv6 address\",mac:\"MAC address\",cidrv4:\"IPv4 range\",cidrv6:\"IPv6 range\",base64:\"base64-encoded string\",base64url:\"base64url-encoded string\",json_string:\"JSON string\",e164:\"E.164 number\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=Mp(r.input),a=o[s]??s;return`Invalid input: expected ${i}, received ${a}`}case\"invalid_value\":if(r.values.length===1)return`Invalid input: expected ${ju(r.values[0])}`;return`Invalid option: expected one of ${Tu(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Too big: expected ${r.origin??\"value\"} to have ${i}${r.maximum.toString()} ${s.unit??\"elements\"}`;return`Too big: expected ${r.origin??\"value\"} to be ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${s.unit}`;return`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Invalid string: must start with \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Invalid string: must end with \"${i.suffix}\"`;if(i.format===\"includes\")return`Invalid string: must include \"${i.includes}\"`;if(i.format===\"regex\")return`Invalid string: must match pattern ${i.pattern}`;return`Invalid ${n[i.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\":\"\"}: ${Tu(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)return`Invalid discriminator value. Expected ${r.options.map((s)=>`'${s}'`).join(\" | \")}`;return\"Invalid input\";case\"invalid_element\":return`Invalid value in ${r.origin}`;default:return\"Invalid input\"}}};function Qp(){return{localeError:$O()}}var R$,xO=Symbol(\"ZodOutput\"),wO=Symbol(\"ZodInput\");class I${constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n===\"object\"&&\"id\"in n)this._idmap.set(n.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t===\"object\"&&\"id\"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function T$(){return new I$}(R$=globalThis).__zod_globalRegistry??(R$.__zod_globalRegistry=T$());var hr=globalThis.__zod_globalRegistry;function E$(e,t){return new e({type:\"string\",...M(t)})}function O$(e,t){return new e({type:\"string\",coerce:!0,...M(t)})}function j$(e,t){return new e({type:\"string\",format:\"email\",check:\"string_format\",abort:!1,...M(t)})}function em(e,t){return new e({type:\"string\",format:\"guid\",check:\"string_format\",abort:!1,...M(t)})}function N$(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,...M(t)})}function C$(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v4\",...M(t)})}function Z$(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v6\",...M(t)})}function A$(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v7\",...M(t)})}function tm(e,t){return new e({type:\"string\",format:\"url\",check:\"string_format\",abort:!1,...M(t)})}function U$(e,t){return new e({type:\"string\",format:\"emoji\",check:\"string_format\",abort:!1,...M(t)})}function M$(e,t){return new e({type:\"string\",format:\"nanoid\",check:\"string_format\",abort:!1,...M(t)})}function D$(e,t){return new e({type:\"string\",format:\"cuid\",check:\"string_format\",abort:!1,...M(t)})}function L$(e,t){return new e({type:\"string\",format:\"cuid2\",check:\"string_format\",abort:!1,...M(t)})}function q$(e,t){return new e({type:\"string\",format:\"ulid\",check:\"string_format\",abort:!1,...M(t)})}function F$(e,t){return new e({type:\"string\",format:\"xid\",check:\"string_format\",abort:!1,...M(t)})}function V$(e,t){return new e({type:\"string\",format:\"ksuid\",check:\"string_format\",abort:!1,...M(t)})}function J$(e,t){return new e({type:\"string\",format:\"ipv4\",check:\"string_format\",abort:!1,...M(t)})}function B$(e,t){return new e({type:\"string\",format:\"ipv6\",check:\"string_format\",abort:!1,...M(t)})}function H$(e,t){return new e({type:\"string\",format:\"cidrv4\",check:\"string_format\",abort:!1,...M(t)})}function G$(e,t){return new e({type:\"string\",format:\"cidrv6\",check:\"string_format\",abort:!1,...M(t)})}function W$(e,t){return new e({type:\"string\",format:\"base64\",check:\"string_format\",abort:!1,...M(t)})}function K$(e,t){return new e({type:\"string\",format:\"base64url\",check:\"string_format\",abort:!1,...M(t)})}function Y$(e,t){return new e({type:\"string\",format:\"e164\",check:\"string_format\",abort:!1,...M(t)})}function X$(e,t){return new e({type:\"string\",format:\"jwt\",check:\"string_format\",abort:!1,...M(t)})}function Q$(e,t){return new e({type:\"string\",format:\"datetime\",check:\"string_format\",offset:!1,local:!1,precision:null,...M(t)})}function ex(e,t){return new e({type:\"string\",format:\"date\",check:\"string_format\",...M(t)})}function tx(e,t){return new e({type:\"string\",format:\"time\",check:\"string_format\",precision:null,...M(t)})}function rx(e,t){return new e({type:\"string\",format:\"duration\",check:\"string_format\",...M(t)})}function nx(e,t){return new e({type:\"number\",checks:[],...M(t)})}function ox(e,t){return new e({type:\"number\",coerce:!0,checks:[],...M(t)})}function ix(e,t){return new e({type:\"number\",check:\"number_format\",abort:!1,format:\"safeint\",...M(t)})}function sx(e,t){return new e({type:\"boolean\",...M(t)})}function ax(e,t){return new e({type:\"boolean\",coerce:!0,...M(t)})}function cx(e,t){return new e({type:\"bigint\",coerce:!0,...M(t)})}function ux(e,t){return new e({type:\"null\",...M(t)})}function lx(e){return new e({type:\"any\"})}function dx(e){return new e({type:\"unknown\"})}function px(e,t){return new e({type:\"never\",...M(t)})}function mx(e,t){return new e({type:\"date\",coerce:!0,...M(t)})}function Wn(e,t){return new Jp({check:\"less_than\",...M(t),value:e,inclusive:!1})}function Jt(e,t){return new Jp({check:\"less_than\",...M(t),value:e,inclusive:!0})}function Kn(e,t){return new Bp({check:\"greater_than\",...M(t),value:e,inclusive:!1})}function $t(e,t){return new Bp({check:\"greater_than\",...M(t),value:e,inclusive:!0})}function fs(e,t){return new cz({check:\"multiple_of\",...M(t),value:e})}function Lu(e,t){return new lz({check:\"max_length\",...M(t),maximum:e})}function Yn(e,t){return new dz({check:\"min_length\",...M(t),minimum:e})}function qu(e,t){return new pz({check:\"length_equals\",...M(t),length:e})}function rm(e,t){return new mz({check:\"string_format\",format:\"regex\",...M(t),pattern:e})}function nm(e){return new fz({check:\"string_format\",format:\"lowercase\",...M(e)})}function om(e){return new hz({check:\"string_format\",format:\"uppercase\",...M(e)})}function im(e,t){return new gz({check:\"string_format\",format:\"includes\",...M(t),includes:e})}function sm(e,t){return new _z({check:\"string_format\",format:\"starts_with\",...M(t),prefix:e})}function am(e,t){return new vz({check:\"string_format\",format:\"ends_with\",...M(t),suffix:e})}function gr(e){return new bz({check:\"overwrite\",tx:e})}function cm(e){return gr((t)=>t.normalize(e))}function um(){return gr((e)=>e.trim())}function lm(){return gr((e)=>e.toLowerCase())}function dm(){return gr((e)=>e.toUpperCase())}function pm(){return gr((e)=>jp(e))}function fx(e,t,n){return new e({type:\"array\",element:t,...M(n)})}function hx(e,t,n){return new e({type:\"custom\",check:\"custom\",fn:t,...M(n)})}function gx(e,t){let n=kO((o)=>(o.addIssue=(r)=>{if(typeof r===\"string\")o.issues.push(Gn(r,o.value,n._zod.def));else{let i=r;if(i.fatal)i.continue=!1;i.code??(i.code=\"custom\"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(Gn(i))}},e(o.value,o)),t);return n}function kO(e,t){let n=new Ze({check:\"custom\",...M(t)});return n._zod.check=e,n}function mm(e){let t=e?.target??\"draft-2020-12\";if(t===\"draft-4\")t=\"draft-04\";if(t===\"draft-7\")t=\"draft-07\";return{processors:e.processors??{},metadataRegistry:e?.metadata??hr,target:t,unrepresentable:e?.unrepresentable??\"throw\",override:e?.override??(()=>{}),io:e?.io??\"output\",counter:0,seen:new Map,cycles:e?.cycles??\"ref\",reused:e?.reused??\"inline\",external:e?.external??void 0}}function Ie(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i){if(i.count++,n.schemaPath.includes(e))i.cycle=n.path;return i.schema}let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let l={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else{let f=s.schema,h=t.processors[r.type];if(!h)throw Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);h(e,t,f,l)}let m=e._zod.parent;if(m){if(!s.ref)s.ref=m;Ie(m,t,l),t.seen.get(m).isParent=!0}}let c=t.metadataRegistry.get(e);if(c)Object.assign(s.schema,c);if(t.io===\"input\"&&He(e))delete s.schema.examples,delete s.schema.default;if(t.io===\"input\"&&\"_prefault\"in s.schema)(o=s.schema).default??(o.default=s.schema._prefault);return delete s.schema._prefault,t.seen.get(e).schema}function fm(e,t){let n=e.seen.get(t);if(!n)throw Error(\"Unprocessed schema. This is a bug in Zod.\");let o=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=o.get(a);if(c&&c!==s[0])throw Error(`Duplicate schema id \"${a}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,s[0])}}let r=(s)=>{let a=e.target===\"draft-2020-12\"?\"$defs\":\"definitions\";if(e.external){let m=e.external.registry.get(s[0])?.id,f=e.external.uri??((z)=>z);if(m)return{ref:f(m)};let h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${f(\"__shared\")}#/${a}/${h}`}}if(s[1]===n)return{ref:\"#\"};let u=`${\"#\"}/${a}/`,l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},i=(s)=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:u}=r(s);if(a.def={...a.schema},u)a.defId=u;let l=a.schema;for(let m in l)delete l[m];l.$ref=c};if(e.cycles===\"throw\")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join(\"/\")}/<root>\n\nSet the \\`cycles\\` parameter to \\`\"ref\"\\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){i(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1){if(e.reused===\"ref\"){i(s);continue}}}}function hm(e,t){let n=e.seen.get(t);if(!n)throw Error(\"Unprocessed schema. This is a bug in Zod.\");let o=(a)=>{let c=e.seen.get(a);if(c.ref===null)return;let u=c.def??c.schema,l={...u},m=c.ref;if(c.ref=null,m){o(m);let h=e.seen.get(m),z=h.schema;if(z.$ref&&(e.target===\"draft-07\"||e.target===\"draft-04\"||e.target===\"openapi-3.0\"))u.allOf=u.allOf??[],u.allOf.push(z);else Object.assign(u,z);if(Object.assign(u,l),a._zod.parent===m)for(let I in u){if(I===\"$ref\"||I===\"allOf\")continue;if(!(I in l))delete u[I]}if(z.$ref&&h.def)for(let I in u){if(I===\"$ref\"||I===\"allOf\")continue;if(I in h.def&&JSON.stringify(u[I])===JSON.stringify(h.def[I]))delete u[I]}}let f=a._zod.parent;if(f&&f!==m){o(f);let h=e.seen.get(f);if(h?.schema.$ref){if(u.$ref=h.schema.$ref,h.def)for(let z in u){if(z===\"$ref\"||z===\"allOf\")continue;if(z in h.def&&JSON.stringify(u[z])===JSON.stringify(h.def[z]))delete u[z]}}}e.override({zodSchema:a,jsonSchema:u,path:c.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);let r={};if(e.target===\"draft-2020-12\")r.$schema=\"https://json-schema.org/draft/2020-12/schema\";else if(e.target===\"draft-07\")r.$schema=\"http://json-schema.org/draft-07/schema#\";else if(e.target===\"draft-04\")r.$schema=\"http://json-schema.org/draft-04/schema#\";else if(e.target===\"openapi-3.0\");if(e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw Error(\"Schema is missing an `id` property\");r.$id=e.external.uri(a)}Object.assign(r,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;if(i!==void 0&&r.id===i)delete r.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let c=a[1];if(c.def&&c.defId){if(c.def.id===c.defId)delete c.def.id;s[c.defId]=c.def}}if(e.external);else if(Object.keys(s).length>0)if(e.target===\"draft-2020-12\")r.$defs=s;else r.definitions=s;try{let a=JSON.parse(JSON.stringify(r));return Object.defineProperty(a,\"~standard\",{value:{...t[\"~standard\"],jsonSchema:{input:hs(t,\"input\",e.processors),output:hs(t,\"output\",e.processors)}},enumerable:!1,writable:!1}),a}catch(a){throw Error(\"Error converting schema to JSON.\")}}function He(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type===\"transform\")return!0;if(o.type===\"array\")return He(o.element,n);if(o.type===\"set\")return He(o.valueType,n);if(o.type===\"lazy\")return He(o.getter(),n);if(o.type===\"promise\"||o.type===\"optional\"||o.type===\"nonoptional\"||o.type===\"nullable\"||o.type===\"readonly\"||o.type===\"default\"||o.type===\"prefault\")return He(o.innerType,n);if(o.type===\"intersection\")return He(o.left,n)||He(o.right,n);if(o.type===\"record\"||o.type===\"map\")return He(o.keyType,n)||He(o.valueType,n);if(o.type===\"pipe\"){if(e._zod.traits.has(\"$ZodCodec\"))return!0;return He(o.in,n)||He(o.out,n)}if(o.type===\"object\"){for(let r in o.shape)if(He(o.shape[r],n))return!0;return!1}if(o.type===\"union\"){for(let r of o.options)if(He(r,n))return!0;return!1}if(o.type===\"tuple\"){for(let r of o.items)if(He(r,n))return!0;if(o.rest&&He(o.rest,n))return!0;return!1}return!1}var _x=(e,t={})=>(n)=>{let o=mm({...n,processors:t});return Ie(e,o),fm(o,e),hm(o,e)},hs=(e,t,n={})=>(o)=>{let{libraryOptions:r,target:i}=o??{},s=mm({...r??{},target:i,io:t,processors:n});return Ie(e,s),fm(s,e),hm(s,e)};var PO={guid:\"uuid\",url:\"uri\",datetime:\"date-time\",json_string:\"json-string\",regex:\"\"},vx=(e,t,n,o)=>{let r=n;r.type=\"string\";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i===\"number\")r.minLength=i;if(typeof s===\"number\")r.maxLength=s;if(a){if(r.format=PO[a]??a,r.format===\"\")delete r.format;if(a===\"time\")delete r.format}if(u)r.contentEncoding=u;if(c&&c.size>0){let l=[...c];if(l.length===1)r.pattern=l[0].source;else if(l.length>1)r.allOf=[...l.map((m)=>({...t.target===\"draft-07\"||t.target===\"draft-04\"||t.target===\"openapi-3.0\"?{type:\"string\"}:{},pattern:m.source}))]}},bx=(e,t,n,o)=>{let r=n,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;if(typeof a===\"string\"&&a.includes(\"int\"))r.type=\"integer\";else r.type=\"number\";let m=typeof l===\"number\"&&l>=(i??Number.NEGATIVE_INFINITY),f=typeof u===\"number\"&&u<=(s??Number.POSITIVE_INFINITY),h=t.target===\"draft-04\"||t.target===\"openapi-3.0\";if(m)if(h)r.minimum=l,r.exclusiveMinimum=!0;else r.exclusiveMinimum=l;else if(typeof i===\"number\")r.minimum=i;if(f)if(h)r.maximum=u,r.exclusiveMaximum=!0;else r.exclusiveMaximum=u;else if(typeof s===\"number\")r.maximum=s;if(typeof c===\"number\")r.multipleOf=c},Sx=(e,t,n,o)=>{n.type=\"boolean\"},yx=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"BigInt cannot be represented in JSON Schema\")};var zx=(e,t,n,o)=>{if(t.target===\"openapi-3.0\")n.type=\"string\",n.nullable=!0,n.enum=[null];else n.type=\"null\"};var $x=(e,t,n,o)=>{n.not={}},xx=(e,t,n,o)=>{},wx=(e,t,n,o)=>{},kx=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Date cannot be represented in JSON Schema\")},Px=(e,t,n,o)=>{let r=e._zod.def,i=ss(r.entries);if(i.every((s)=>typeof s===\"number\"))n.type=\"number\";if(i.every((s)=>typeof s===\"string\"))n.type=\"string\";n.enum=i},Rx=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable===\"throw\")throw Error(\"Literal `undefined` cannot be represented in JSON Schema\")}else if(typeof s===\"bigint\")if(t.unrepresentable===\"throw\")throw Error(\"BigInt literals cannot be represented in JSON Schema\");else i.push(Number(s));else i.push(s);if(i.length===0);else if(i.length===1){let s=i[0];if(n.type=s===null?\"null\":typeof s,t.target===\"draft-04\"||t.target===\"openapi-3.0\")n.enum=[s];else n.const=s}else{if(i.every((s)=>typeof s===\"number\"))n.type=\"number\";if(i.every((s)=>typeof s===\"string\"))n.type=\"string\";if(i.every((s)=>typeof s===\"boolean\"))n.type=\"boolean\";if(i.every((s)=>s===null))n.type=\"null\";n.enum=i}};var Ix=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Custom types cannot be represented in JSON Schema\")};var Tx=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Transforms cannot be represented in JSON Schema\")};var Ex=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;if(typeof s===\"number\")r.minItems=s;if(typeof a===\"number\")r.maxItems=a;r.type=\"array\",r.items=Ie(i.element,t,{...o,path:[...o.path,\"items\"]})},Ox=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type=\"object\",r.properties={};let s=i.shape;for(let u in s)r.properties[u]=Ie(s[u],t,{...o,path:[...o.path,\"properties\",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter((u)=>{let l=i.shape[u]._zod;if(t.io===\"input\")return l.optin===void 0;else return l.optout===void 0}));if(c.size>0)r.required=Array.from(c);if(i.catchall?._zod.def.type===\"never\")r.additionalProperties=!1;else if(!i.catchall){if(t.io===\"output\")r.additionalProperties=!1}else if(i.catchall)r.additionalProperties=Ie(i.catchall,t,{...o,path:[...o.path,\"additionalProperties\"]})},jx=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,s=r.options.map((a,c)=>Ie(a,t,{...o,path:[...o.path,i?\"oneOf\":\"anyOf\",c]}));if(i)n.oneOf=s;else n.anyOf=s},Nx=(e,t,n,o)=>{let r=e._zod.def,i=Ie(r.left,t,{...o,path:[...o.path,\"allOf\",0]}),s=Ie(r.right,t,{...o,path:[...o.path,\"allOf\",1]}),a=(u)=>(\"allOf\"in u)&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=c};var Cx=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type=\"object\";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode===\"loose\"&&c&&c.size>0){let l=Ie(i.valueType,t,{...o,path:[...o.path,\"patternProperties\",\"*\"]});r.patternProperties={};for(let m of c)r.patternProperties[m.source]=l}else{if(t.target===\"draft-07\"||t.target===\"draft-2020-12\")r.propertyNames=Ie(i.keyType,t,{...o,path:[...o.path,\"propertyNames\"]});r.additionalProperties=Ie(i.valueType,t,{...o,path:[...o.path,\"additionalProperties\"]})}let u=s._zod.values;if(u){let l=[...u].filter((m)=>typeof m===\"string\"||typeof m===\"number\");if(l.length>0)r.required=l}},Zx=(e,t,n,o)=>{let r=e._zod.def,i=Ie(r.innerType,t,o),s=t.seen.get(e);if(t.target===\"openapi-3.0\")s.ref=r.innerType,n.nullable=!0;else n.anyOf=[i,{type:\"null\"}]},Ax=(e,t,n,o)=>{let r=e._zod.def;Ie(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Ux=(e,t,n,o)=>{let r=e._zod.def;Ie(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Mx=(e,t,n,o)=>{let r=e._zod.def;Ie(r.innerType,t,o);let i=t.seen.get(e);if(i.ref=r.innerType,t.io===\"input\")n._prefault=JSON.parse(JSON.stringify(r.defaultValue))},Dx=(e,t,n,o)=>{let r=e._zod.def;Ie(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw Error(\"Dynamic catch values are not supported in JSON Schema\")}n.default=s},Lx=(e,t,n,o)=>{let r=e._zod.def,i=r.in._zod.traits.has(\"$ZodTransform\"),s=t.io===\"input\"?i?r.out:r.in:r.out;Ie(s,t,o);let a=t.seen.get(e);a.ref=s},qx=(e,t,n,o)=>{let r=e._zod.def;Ie(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0};var gm=(e,t,n,o)=>{let r=e._zod.def;Ie(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Fx=(e,t,n,o)=>{let r=e._zod.innerType;Ie(r,t,o);let i=t.seen.get(e);i.ref=r};var gs={};tt(gs,{ZodISODate:()=>Jx,ZodISODateTime:()=>Vx,ZodISODuration:()=>Hx,ZodISOTime:()=>Bx,date:()=>vm,datetime:()=>_m,duration:()=>Sm,time:()=>bm});var Vx=S(\"ZodISODateTime\",(e,t)=>{Lz.init(e,t),ye.init(e,t)});function _m(e){return Q$(Vx,e)}var Jx=S(\"ZodISODate\",(e,t)=>{qz.init(e,t),ye.init(e,t)});function vm(e){return ex(Jx,e)}var Bx=S(\"ZodISOTime\",(e,t)=>{Fz.init(e,t),ye.init(e,t)});function bm(e){return tx(Bx,e)}var Hx=S(\"ZodISODuration\",(e,t)=>{Vz.init(e,t),ye.init(e,t)});function Sm(e){return rx(Hx,e)}var CO=(e,t)=>{Nu.init(e,t),e.name=\"ZodError\",Object.defineProperties(e,{format:{value:(n)=>qp(e,n)},flatten:{value:(n)=>Lp(e,n)},addIssue:{value:(n)=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Bn,2)}},addIssues:{value:(n)=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Bn,2)}},isEmpty:{get(){return e.issues.length===0}}})};var lt=S(\"ZodError\",CO,{Parent:Error});var Wx=Cu(lt),Kx=Zu(lt),Yx=ls(lt),Xx=ds(lt),Qx=xy(lt),ew=wy(lt),tw=ky(lt),rw=Py(lt),nw=Ry(lt),ow=Iy(lt),iw=Ty(lt),sw=Ey(lt);var aw=new WeakMap;function _s(e,t,n){let o=Object.getPrototypeOf(e),r=aw.get(o);if(!r)r=new Set,aw.set(o,r);if(r.has(t))return;r.add(t);for(let i in n){let s=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}var ue=S(\"ZodType\",(e,t)=>(ce.init(e,t),Object.assign(e[\"~standard\"],{jsonSchema:{input:hs(e,\"input\"),output:hs(e,\"output\")}}),e.toJSONSchema=_x(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,\"_def\",{value:t}),e.parse=(n,o)=>Wx(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Yx(e,n,o),e.parseAsync=async(n,o)=>Kx(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Xx(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Qx(e,n,o),e.decode=(n,o)=>ew(e,n,o),e.encodeAsync=async(n,o)=>tw(e,n,o),e.decodeAsync=async(n,o)=>rw(e,n,o),e.safeEncode=(n,o)=>nw(e,n,o),e.safeDecode=(n,o)=>ow(e,n,o),e.safeEncodeAsync=async(n,o)=>iw(e,n,o),e.safeDecodeAsync=async(n,o)=>sw(e,n,o),_s(e,\"ZodType\",{check(...n){let o=this.def;return this.clone(ee.mergeDefs(o,{checks:[...o.checks??[],...n.map((r)=>typeof r===\"function\"?{_zod:{check:r,def:{check:\"custom\"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return _t(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(wj(n,o))},superRefine(n,o){return this.check(kj(n,o))},overwrite(n){return this.check(gr(n))},optional(){return ze(this)},exactOptional(){return dj(this)},nullable(){return dw(this)},nullish(){return ze(dw(this))},nonoptional(n){return _j(this,n)},array(){return T(this)},or(n){return he([this,n])},and(n){return Ju(this,n)},transform(n){return pw(this,yw(n))},default(n){return fj(this,n)},prefault(n){return gj(this,n)},catch(n){return bj(this,n)},pipe(n){return pw(this,n)},readonly(){return zj(this)},describe(n){let o=this.clone();return hr.add(o,{description:n}),o},meta(...n){if(n.length===0)return hr.get(this);let o=this.clone();return hr.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,\"description\",{get(){return hr.get(e)?.description},configurable:!0}),e)),mw=S(\"_ZodString\",(e,t)=>{Du.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,i)=>vx(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,_s(e,\"_ZodString\",{regex(...o){return this.check(rm(...o))},includes(...o){return this.check(im(...o))},startsWith(...o){return this.check(sm(...o))},endsWith(...o){return this.check(am(...o))},min(...o){return this.check(Yn(...o))},max(...o){return this.check(Lu(...o))},length(...o){return this.check(qu(...o))},nonempty(...o){return this.check(Yn(1,...o))},lowercase(o){return this.check(nm(o))},uppercase(o){return this.check(om(o))},trim(){return this.check(um())},normalize(...o){return this.check(cm(...o))},toLowerCase(){return this.check(lm())},toUpperCase(){return this.check(dm())},slugify(){return this.check(pm())}})}),zm=S(\"ZodString\",(e,t)=>{Du.init(e,t),mw.init(e,t),e.email=(n)=>e.check(j$(AO,n)),e.url=(n)=>e.check(tm(fw,n)),e.jwt=(n)=>e.check(X$(XO,n)),e.emoji=(n)=>e.check(U$(UO,n)),e.guid=(n)=>e.check(em(cw,n)),e.uuid=(n)=>e.check(N$(Fu,n)),e.uuidv4=(n)=>e.check(C$(Fu,n)),e.uuidv6=(n)=>e.check(Z$(Fu,n)),e.uuidv7=(n)=>e.check(A$(Fu,n)),e.nanoid=(n)=>e.check(M$(MO,n)),e.guid=(n)=>e.check(em(cw,n)),e.cuid=(n)=>e.check(D$(DO,n)),e.cuid2=(n)=>e.check(L$(LO,n)),e.ulid=(n)=>e.check(q$(qO,n)),e.base64=(n)=>e.check(W$(WO,n)),e.base64url=(n)=>e.check(K$(KO,n)),e.xid=(n)=>e.check(F$(FO,n)),e.ksuid=(n)=>e.check(V$(VO,n)),e.ipv4=(n)=>e.check(J$(JO,n)),e.ipv6=(n)=>e.check(B$(BO,n)),e.cidrv4=(n)=>e.check(H$(HO,n)),e.cidrv6=(n)=>e.check(G$(GO,n)),e.e164=(n)=>e.check(Y$(YO,n)),e.datetime=(n)=>e.check(_m(n)),e.date=(n)=>e.check(vm(n)),e.time=(n)=>e.check(bm(n)),e.duration=(n)=>e.check(Sm(n))});function g(e){return E$(zm,e)}var ye=S(\"ZodStringFormat\",(e,t)=>{_e.init(e,t),mw.init(e,t)}),AO=S(\"ZodEmail\",(e,t)=>{Oz.init(e,t),ye.init(e,t)});var cw=S(\"ZodGUID\",(e,t)=>{Tz.init(e,t),ye.init(e,t)});var Fu=S(\"ZodUUID\",(e,t)=>{Ez.init(e,t),ye.init(e,t)});var fw=S(\"ZodURL\",(e,t)=>{jz.init(e,t),ye.init(e,t)});function hw(e){return tm(fw,e)}var UO=S(\"ZodEmoji\",(e,t)=>{Nz.init(e,t),ye.init(e,t)});var MO=S(\"ZodNanoID\",(e,t)=>{Cz.init(e,t),ye.init(e,t)});var DO=S(\"ZodCUID\",(e,t)=>{Zz.init(e,t),ye.init(e,t)});var LO=S(\"ZodCUID2\",(e,t)=>{Az.init(e,t),ye.init(e,t)});var qO=S(\"ZodULID\",(e,t)=>{Uz.init(e,t),ye.init(e,t)});var FO=S(\"ZodXID\",(e,t)=>{Mz.init(e,t),ye.init(e,t)});var VO=S(\"ZodKSUID\",(e,t)=>{Dz.init(e,t),ye.init(e,t)});var JO=S(\"ZodIPv4\",(e,t)=>{Jz.init(e,t),ye.init(e,t)});var BO=S(\"ZodIPv6\",(e,t)=>{Bz.init(e,t),ye.init(e,t)});var HO=S(\"ZodCIDRv4\",(e,t)=>{Hz.init(e,t),ye.init(e,t)});var GO=S(\"ZodCIDRv6\",(e,t)=>{Gz.init(e,t),ye.init(e,t)});var WO=S(\"ZodBase64\",(e,t)=>{Kz.init(e,t),ye.init(e,t)});var KO=S(\"ZodBase64URL\",(e,t)=>{Yz.init(e,t),ye.init(e,t)});var YO=S(\"ZodE164\",(e,t)=>{Xz.init(e,t),ye.init(e,t)});var XO=S(\"ZodJWT\",(e,t)=>{Qz.init(e,t),ye.init(e,t)});var Vu=S(\"ZodNumber\",(e,t)=>{Wp.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,i)=>bx(e,o,r,i),_s(e,\"ZodNumber\",{gt(o,r){return this.check(Kn(o,r))},gte(o,r){return this.check($t(o,r))},min(o,r){return this.check($t(o,r))},lt(o,r){return this.check(Wn(o,r))},lte(o,r){return this.check(Jt(o,r))},max(o,r){return this.check(Jt(o,r))},int(o){return this.check(uw(o))},safe(o){return this.check(uw(o))},positive(o){return this.check(Kn(0,o))},nonnegative(o){return this.check($t(0,o))},negative(o){return this.check(Wn(0,o))},nonpositive(o){return this.check(Jt(0,o))},multipleOf(o,r){return this.check(fs(o,r))},step(o,r){return this.check(fs(o,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??\"\").includes(\"int\")||Number.isSafeInteger(n.multipleOf??0.5),e.isFinite=!0,e.format=n.format??null});function ne(e){return nx(Vu,e)}var QO=S(\"ZodNumberFormat\",(e,t)=>{e$.init(e,t),Vu.init(e,t)});function uw(e){return ix(QO,e)}var $m=S(\"ZodBoolean\",(e,t)=>{t$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sx(e,n,o,r)});function se(e){return sx($m,e)}var gw=S(\"ZodBigInt\",(e,t)=>{r$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,i)=>yx(e,o,r,i),e.gte=(o,r)=>e.check($t(o,r)),e.min=(o,r)=>e.check($t(o,r)),e.gt=(o,r)=>e.check(Kn(o,r)),e.gte=(o,r)=>e.check($t(o,r)),e.min=(o,r)=>e.check($t(o,r)),e.lt=(o,r)=>e.check(Wn(o,r)),e.lte=(o,r)=>e.check(Jt(o,r)),e.max=(o,r)=>e.check(Jt(o,r)),e.positive=(o)=>e.check(Kn(BigInt(0),o)),e.negative=(o)=>e.check(Wn(BigInt(0),o)),e.nonpositive=(o)=>e.check(Jt(BigInt(0),o)),e.nonnegative=(o)=>e.check($t(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(fs(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});var ej=S(\"ZodNull\",(e,t)=>{n$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>zx(e,n,o,r)});function xm(e){return ux(ej,e)}var tj=S(\"ZodAny\",(e,t)=>{o$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xx(e,n,o,r)});function _w(){return lx(tj)}var rj=S(\"ZodUnknown\",(e,t)=>{i$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>wx(e,n,o,r)});function we(){return dx(rj)}var nj=S(\"ZodNever\",(e,t)=>{s$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>$x(e,n,o,r)});function oj(e){return px(nj,e)}var vw=S(\"ZodDate\",(e,t)=>{a$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,i)=>kx(e,o,r,i),e.min=(o,r)=>e.check($t(o,r)),e.max=(o,r)=>e.check(Jt(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});var ij=S(\"ZodArray\",(e,t)=>{c$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ex(e,n,o,r),e.element=t.element,_s(e,\"ZodArray\",{min(n,o){return this.check(Yn(n,o))},nonempty(n){return this.check(Yn(1,n))},max(n,o){return this.check(Lu(n,o))},length(n,o){return this.check(qu(n,o))},unwrap(){return this.element}})});function T(e,t){return fx(ij,e,t)}var bw=S(\"ZodObject\",(e,t)=>{d$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ox(e,n,o,r),ee.defineLazy(e,\"shape\",()=>t.shape),_s(e,\"ZodObject\",{keyof(){return nt(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:we()})},loose(){return this.clone({...this._zod.def,catchall:we()})},strict(){return this.clone({...this._zod.def,catchall:oj()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return ee.extend(this,n)},safeExtend(n){return ee.safeExtend(this,n)},merge(n){return ee.merge(this,n)},pick(n){return ee.pick(this,n)},omit(n){return ee.omit(this,n)},partial(...n){return ee.partial(zw,this,n[0])},required(...n){return ee.required($w,this,n[0])}})});function j(e,t){let n={type:\"object\",shape:e??{},...ee.normalizeParams(t)};return new bw(n)}function Oe(e,t){return new bw({type:\"object\",shape:e,catchall:we(),...ee.normalizeParams(t)})}var Sw=S(\"ZodUnion\",(e,t)=>{Kp.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>jx(e,n,o,r),e.options=t.options});function he(e,t){return new Sw({type:\"union\",options:e,...ee.normalizeParams(t)})}var sj=S(\"ZodDiscriminatedUnion\",(e,t)=>{Sw.init(e,t),p$.init(e,t)});function wm(e,t,n){return new sj({type:\"union\",options:t,discriminator:e,...ee.normalizeParams(n)})}var aj=S(\"ZodIntersection\",(e,t)=>{m$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Nx(e,n,o,r)});function Ju(e,t){return new aj({type:\"intersection\",left:e,right:t})}var lw=S(\"ZodRecord\",(e,t)=>{f$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Cx(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function $e(e,t,n){if(!t||!t._zod)return new lw({type:\"record\",keyType:g(),valueType:e,...ee.normalizeParams(t)});return new lw({type:\"record\",keyType:e,valueType:t,...ee.normalizeParams(n)})}var ym=S(\"ZodEnum\",(e,t)=>{h$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Px(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let s of o)if(n.has(s))i[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new ym({...t,checks:[],...ee.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let s of o)if(n.has(s))delete i[s];else throw Error(`Key ${s} not found in enum`);return new ym({...t,checks:[],...ee.normalizeParams(r),entries:i})}});function nt(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map((o)=>[o,o])):e;return new ym({type:\"enum\",entries:n,...ee.normalizeParams(t)})}var cj=S(\"ZodLiteral\",(e,t)=>{g$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rx(e,n,o,r),e.values=new Set(t.values),Object.defineProperty(e,\"value\",{get(){if(t.values.length>1)throw Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");return t.values[0]}})});function A(e,t){return new cj({type:\"literal\",values:Array.isArray(e)?e:[e],...ee.normalizeParams(t)})}var uj=S(\"ZodTransform\",(e,t)=>{_$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Tx(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")throw new os(e.constructor.name);n.addIssue=(i)=>{if(typeof i===\"string\")n.issues.push(ee.issue(i,n.value,t));else{let s=i;if(s.fatal)s.continue=!1;s.code??(s.code=\"custom\"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(ee.issue(s))}};let r=t.transform(n.value,n);if(r instanceof Promise)return r.then((i)=>(n.value=i,n.fallback=!0,n));return n.value=r,n.fallback=!0,n}});function yw(e){return new uj({type:\"transform\",transform:e})}var zw=S(\"ZodOptional\",(e,t)=>{Yp.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gm(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function ze(e){return new zw({type:\"optional\",innerType:e})}var lj=S(\"ZodExactOptional\",(e,t)=>{v$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gm(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function dj(e){return new lj({type:\"optional\",innerType:e})}var pj=S(\"ZodNullable\",(e,t)=>{b$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Zx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function dw(e){return new pj({type:\"nullable\",innerType:e})}var mj=S(\"ZodDefault\",(e,t)=>{S$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ux(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function fj(e,t){return new mj({type:\"default\",innerType:e,get defaultValue(){return typeof t===\"function\"?t():ee.shallowClone(t)}})}var hj=S(\"ZodPrefault\",(e,t)=>{y$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Mx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function gj(e,t){return new hj({type:\"prefault\",innerType:e,get defaultValue(){return typeof t===\"function\"?t():ee.shallowClone(t)}})}var $w=S(\"ZodNonOptional\",(e,t)=>{z$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ax(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function _j(e,t){return new $w({type:\"nonoptional\",innerType:e,...ee.normalizeParams(t)})}var vj=S(\"ZodCatch\",(e,t)=>{$$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Dx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bj(e,t){return new vj({type:\"catch\",innerType:e,catchValue:typeof t===\"function\"?t:()=>t})}var xw=S(\"ZodPipe\",(e,t)=>{Xp.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Lx(e,n,o,r),e.in=t.in,e.out=t.out});function pw(e,t){return new xw({type:\"pipe\",in:e,out:t})}var Sj=S(\"ZodPreprocess\",(e,t)=>{xw.init(e,t),x$.init(e,t)}),yj=S(\"ZodReadonly\",(e,t)=>{w$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>qx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function zj(e){return new yj({type:\"readonly\",innerType:e})}var $j=S(\"ZodLazy\",(e,t)=>{k$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Fx(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function ww(e){return new $j({type:\"lazy\",getter:e})}var xj=S(\"ZodCustom\",(e,t)=>{P$.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ix(e,n,o,r)});function wj(e,t={}){return hx(xj,e,t)}function kj(e,t){return gx(e,t)}function km(e,t){return new Sj({type:\"pipe\",in:yw(e),out:t})}var Pw={invalid_type:\"invalid_type\",too_big:\"too_big\",too_small:\"too_small\",invalid_format:\"invalid_format\",not_multiple_of:\"not_multiple_of\",unrecognized_keys:\"unrecognized_keys\",invalid_union:\"invalid_union\",invalid_key:\"invalid_key\",invalid_element:\"invalid_element\",invalid_value:\"invalid_value\",custom:\"custom\"};var kw;(function(e){})(kw||(kw={}));var Bu={};tt(Bu,{bigint:()=>Tj,boolean:()=>Ij,date:()=>Ej,number:()=>Rj,string:()=>Pj});function Pj(e){return O$(zm,e)}function Rj(e){return ox(Vu,e)}function Ij(e){return ax($m,e)}function Tj(e){return cx(gw,e)}function Ej(e){return mx(vw,e)}rt(Qp());var Hu=\"2025-11-25\";var Gu=[Hu,\"2025-06-18\",\"2025-03-26\",\"2024-11-05\",\"2024-10-07\"],Wu=\"io.modelcontextprotocol/related-task\",Xr=\"io.modelcontextprotocol/protocolVersion\",Qn=\"io.modelcontextprotocol/clientInfo\",vr=\"io.modelcontextprotocol/serverInfo\",Qr=\"io.modelcontextprotocol/clientCapabilities\",Ku=\"io.modelcontextprotocol/subscriptionId\",eo=\"io.modelcontextprotocol/logLevel\";var en=\"2.0\";var Bt=ww(()=>he([g(),ne(),se(),xm(),$e(g(),Bt),T(Bt)])),ke=$e(g(),Bt),Yu=T(Bt),to=he([g(),ne().int()]),ro=g(),vs=j({ttl:ne().optional()}),bs=j({taskId:g()}),no=Oe({progressToken:to.optional(),[Wu]:bs.optional()}),Ce=j({_meta:no.optional()}),br=Ce.extend({task:vs.optional()}),Pe=j({method:g(),params:Ce.loose().optional()}),Ve=j({_meta:no.optional()}),Ae=j({method:g(),params:Ve.loose().optional()}),oo=Oe({get[vr](){return Tt.optional().catch(void 0)}}),Re=Oe({_meta:oo.optional()}),xt=he([g(),ne().int()]),io=j({jsonrpc:A(en),id:xt,...Pe.shape}).strict(),so=j({jsonrpc:A(en),...Ae.shape}).strict(),tn=j({jsonrpc:A(en),id:xt,result:Re}).strict(),rn=j({jsonrpc:A(en),id:xt.optional(),error:j({code:ne().int(),message:g(),data:we().optional()})}).strict(),nn=he([io,so,tn,rn]),Xu=he([tn,rn]),Sr=Re.strict(),Ss=Ve.extend({requestId:xt.optional(),reason:g().optional()}),ao=Ae.extend({method:A(\"notifications/cancelled\"),params:Ss}),ys=j({src:g(),mimeType:g().optional(),sizes:T(g()).optional(),theme:nt([\"light\",\"dark\"]).optional()}),Ht=j({icons:T(ys).optional()}),It=j({name:g(),title:g().optional()}),Tt=It.extend({...It.shape,...Ht.shape,version:g(),websiteUrl:g().optional(),description:g().optional()}),Oj=Ju(j({applyDefaults:se().optional()}),ke),jj=km((e)=>{if(e&&typeof e===\"object\"&&!Array.isArray(e)&&Object.keys(e).length===0)return{form:{}};return e},Ju(j({form:Oj.optional(),url:ke.optional()}),ke.optional())),Qu=Oe({list:ke.optional(),cancel:ke.optional(),requests:Oe({sampling:Oe({createMessage:ke.optional()}).optional(),elicitation:Oe({create:ke.optional()}).optional()}).optional()}),el=Oe({list:ke.optional(),cancel:ke.optional(),requests:Oe({tools:Oe({call:ke.optional()}).optional()}).optional()}),zs=j({experimental:$e(g(),ke).optional(),sampling:j({context:ke.optional(),tools:ke.optional()}).optional(),elicitation:jj.optional(),roots:j({listChanged:se().optional()}).optional(),tasks:Qu.optional(),extensions:$e(g(),ke).optional()}),$s=Ce.extend({protocolVersion:g(),capabilities:zs,clientInfo:Tt}),xs=Pe.extend({method:A(\"initialize\"),params:$s}),co=j({experimental:$e(g(),ke).optional(),logging:ke.optional(),completions:ke.optional(),prompts:j({listChanged:se().optional()}).optional(),resources:j({subscribe:se().optional(),listChanged:se().optional()}).optional(),tools:j({listChanged:se().optional()}).optional(),tasks:el.optional(),extensions:$e(g(),ke).optional()}),ws=Re.extend({protocolVersion:g(),capabilities:co,serverInfo:Tt,instructions:g().optional()}),ks=Ae.extend({method:A(\"notifications/initialized\"),params:Ve.optional()}),Ps=Pe.extend({method:A(\"server/discover\"),params:Ce.optional()}),uo=Re.extend({supportedVersions:T(g()),capabilities:co,instructions:g().optional()}),lo=Pe.extend({method:A(\"ping\"),params:Ce.optional()}),Rs=j({progress:ne(),total:ze(ne()),message:ze(g())}),Is=j({...Ve.shape,...Rs.shape,progressToken:to}),po=Ae.extend({method:A(\"notifications/progress\"),params:Is}),Ts=Ce.extend({cursor:ro.optional()}),Gt=Pe.extend({params:Ts.optional()}),Wt=Re.extend({nextCursor:ro.optional()}),mo=j({uri:g(),mimeType:ze(g()),_meta:$e(g(),we()).optional()}),fo=mo.extend({text:g()}),Rm=g().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:\"Invalid Base64 string\"}),ho=mo.extend({blob:Rm}),Kt=nt([\"user\",\"assistant\"]),Et=j({audience:T(Kt).optional(),priority:ne().min(0).max(1).optional(),lastModified:gs.datetime({offset:!0}).optional()}),go=j({...It.shape,...Ht.shape,uri:g(),description:ze(g()),mimeType:ze(g()),size:ze(ne()),annotations:Et.optional(),_meta:ze(Oe({}))}),Es=j({...It.shape,...Ht.shape,uriTemplate:g(),description:ze(g()),mimeType:ze(g()),annotations:Et.optional(),_meta:ze(Oe({}))}),Os=Gt.extend({method:A(\"resources/list\")}),js=Wt.extend({resources:T(go)}),Ns=Gt.extend({method:A(\"resources/templates/list\")}),Cs=Wt.extend({resourceTemplates:T(Es)}),on=Ce.extend({uri:g()}),Zs=on,As=Pe.extend({method:A(\"resources/read\"),params:Zs}),Us=Re.extend({contents:T(he([fo,ho]))}),Ms=Ae.extend({method:A(\"notifications/resources/list_changed\"),params:Ve.optional()}),Ds=on,Ls=Pe.extend({method:A(\"resources/subscribe\"),params:Ds}),qs=on,Fs=Pe.extend({method:A(\"resources/unsubscribe\"),params:qs}),_o=j({toolsListChanged:se().optional(),promptsListChanged:se().optional(),resourcesListChanged:se().optional(),resourceSubscriptions:T(g()).optional()}),Vs=Ce.extend({notifications:_o}),Js=Pe.extend({method:A(\"subscriptions/listen\"),params:Vs}),Bs=Ve.extend({notifications:_o}),Hs=Ae.extend({method:A(\"notifications/subscriptions/acknowledged\"),params:Bs}),Gs=oo.extend({[Ku]:xt}),Ws=Re.extend({_meta:Gs}),Ks=Ve.extend({uri:g()}),Ys=Ae.extend({method:A(\"notifications/resources/updated\"),params:Ks}),Xs=j({name:g(),description:ze(g()),required:ze(se())}),Qs=j({...It.shape,...Ht.shape,description:ze(g()),arguments:ze(T(Xs)),_meta:ze(Oe({}))}),ea=Gt.extend({method:A(\"prompts/list\")}),ta=Wt.extend({prompts:T(Qs)}),ra=Ce.extend({name:g(),arguments:$e(g(),g()).optional()}),na=Pe.extend({method:A(\"prompts/get\"),params:ra}),sn=j({type:A(\"text\"),text:g(),annotations:Et.optional(),_meta:$e(g(),we()).optional()}),an=j({type:A(\"image\"),data:Rm,mimeType:g(),annotations:Et.optional(),_meta:$e(g(),we()).optional()}),cn=j({type:A(\"audio\"),data:Rm,mimeType:g(),annotations:Et.optional(),_meta:$e(g(),we()).optional()}),oa=j({type:A(\"tool_use\"),name:g(),id:g(),input:$e(g(),we()),_meta:$e(g(),we()).optional()}),un=j({type:A(\"resource\"),resource:he([fo,ho]),annotations:Et.optional(),_meta:$e(g(),we()).optional()}),ln=go.extend({type:A(\"resource_link\")}),Ot=he([sn,an,cn,ln,un]),ia=j({role:Kt,content:Ot}),sa=Re.extend({description:g().optional(),messages:T(ia)}),aa=Ae.extend({method:A(\"notifications/prompts/list_changed\"),params:Ve.optional()}),ca=j({title:g().optional(),readOnlyHint:se().optional(),destructiveHint:se().optional(),idempotentHint:se().optional(),openWorldHint:se().optional()}),ua=j({taskSupport:nt([\"required\",\"optional\",\"forbidden\"]).optional()}),yr=j({...It.shape,...Ht.shape,description:g().optional(),inputSchema:j({type:A(\"object\"),properties:$e(g(),Bt).optional(),required:T(g()).optional()}).catchall(we()),outputSchema:Oe({$schema:g().optional()}).optional(),annotations:ca.optional(),execution:ua.optional(),_meta:$e(g(),we()).optional()}),la=Gt.extend({method:A(\"tools/list\")}),da=Wt.extend({tools:T(yr)}),zr=Re.extend({content:T(Ot).default([]),structuredContent:we().optional(),isError:se().optional()}),tl=zr.or(Re.extend({toolResult:we()})),pa=br.extend({name:g(),arguments:$e(g(),we()).optional()}),ma=Pe.extend({method:A(\"tools/call\"),params:pa}),fa=Ae.extend({method:A(\"notifications/tools/list_changed\"),params:Ve.optional()}),rl=j({autoRefresh:se().default(!0),debounceMs:ne().int().nonnegative().default(300)}),vo=nt([\"debug\",\"info\",\"notice\",\"warning\",\"error\",\"critical\",\"alert\",\"emergency\"]),ha=Ce.extend({level:vo}),ga=Pe.extend({method:A(\"logging/setLevel\"),params:ha}),_a=Ve.extend({level:vo,logger:g().optional(),data:we()}),va=Ae.extend({method:A(\"notifications/message\"),params:_a}),ba=j({name:g().optional()}),Sa=j({hints:T(ba).optional(),costPriority:ne().min(0).max(1).optional(),speedPriority:ne().min(0).max(1).optional(),intelligencePriority:ne().min(0).max(1).optional()}),ya=j({mode:nt([\"auto\",\"required\",\"none\"]).optional()}),za=j({type:A(\"tool_result\"),toolUseId:g().describe(\"The unique identifier for the corresponding tool call.\"),content:T(Ot),structuredContent:we().optional(),isError:se().optional(),_meta:$e(g(),we()).optional()}),$a=wm(\"type\",[sn,an,cn]),_r=wm(\"type\",[sn,an,cn,oa,za]),xa=j({role:Kt,content:he([_r,T(_r)]),_meta:$e(g(),we()).optional()}),wa=br.extend({messages:T(xa),modelPreferences:Sa.optional(),systemPrompt:g().optional(),includeContext:nt([\"none\",\"thisServer\",\"allServers\"]).optional(),temperature:ne().optional(),maxTokens:ne().int(),stopSequences:T(g()).optional(),metadata:ke.optional(),tools:T(yr).optional(),toolChoice:ya.optional()}),ka=Pe.extend({method:A(\"sampling/createMessage\"),params:wa}),Pa=Re.extend({model:g(),stopReason:ze(nt([\"endTurn\",\"stopSequence\",\"maxTokens\"]).or(g())),role:Kt,content:$a}),Ra=Re.extend({model:g(),stopReason:ze(nt([\"endTurn\",\"stopSequence\",\"maxTokens\",\"toolUse\"]).or(g())),role:Kt,content:he([_r,T(_r)])}),bo=j({type:A(\"boolean\"),title:g().optional(),description:g().optional(),default:se().optional()}),dn=j({type:A(\"string\"),title:g().optional(),description:g().optional(),minLength:ne().optional(),maxLength:ne().optional(),format:nt([\"email\",\"uri\",\"date\",\"date-time\"]).optional(),default:g().optional()}),pn=j({type:nt([\"number\",\"integer\"]),title:g().optional(),description:g().optional(),minimum:ne().optional(),maximum:ne().optional(),default:ne().optional()}),So=j({type:A(\"string\"),title:g().optional(),description:g().optional(),enum:T(g()),default:g().optional()}),yo=j({type:A(\"string\"),title:g().optional(),description:g().optional(),oneOf:T(j({const:g(),title:g()})),default:g().optional()}),zo=j({type:A(\"string\"),title:g().optional(),description:g().optional(),enum:T(g()),enumNames:T(g()).optional(),default:g().optional()}),Ia=he([So,yo]),$o=j({type:A(\"array\"),title:g().optional(),description:g().optional(),minItems:ne().optional(),maxItems:ne().optional(),items:j({type:A(\"string\"),enum:T(g())}),default:T(g()).optional()}),xo=j({type:A(\"array\"),title:g().optional(),description:g().optional(),minItems:ne().optional(),maxItems:ne().optional(),items:j({anyOf:T(j({const:g(),title:g()}))}),default:T(g()).optional()}),Ta=he([$o,xo]),Ea=he([zo,Ia,Ta]),wo=he([Ea,bo,dn,pn]),mn=br.extend({mode:A(\"form\").optional(),message:g(),requestedSchema:j({type:A(\"object\"),properties:$e(g(),wo),required:T(g()).optional()}).catchall(we())}),Oa=br.extend({mode:A(\"url\"),message:g(),elicitationId:g(),url:g().url()}),ja=he([mn,Oa]),Na=Pe.extend({method:A(\"elicitation/create\"),params:ja}),Ca=Ve.extend({elicitationId:g()}),Za=Ae.extend({method:A(\"notifications/elicitation/complete\"),params:Ca}),Aa=Re.extend({action:nt([\"accept\",\"decline\",\"cancel\"]),content:km((e)=>e===null?void 0:e,$e(g(),he([g(),ne(),se(),T(g())])).optional())}),Ua=j({type:A(\"ref/resource\"),uri:g()}),Ma=j({type:A(\"ref/prompt\"),name:g()}),Da=Ce.extend({ref:he([Ma,Ua]),argument:j({name:g(),value:g()}),context:j({arguments:$e(g(),g()).optional()}).optional()}),La=Pe.extend({method:A(\"completion/complete\"),params:Da}),qa=Re.extend({completion:Oe({values:T(g()).max(100),total:ze(ne().int()),hasMore:ze(se())})}),Fa=j({uri:g().startsWith(\"file://\"),name:g().optional(),_meta:$e(g(),we()).optional()}),Va=Pe.extend({method:A(\"roots/list\"),params:Ce.optional()}),Ja=Re.extend({roots:T(Fa)}),Ba=Ae.extend({method:A(\"notifications/roots/list_changed\"),params:Ve.optional()}),nl=Oe({ttl:ne().optional(),pollInterval:ne().optional()}),Ha=nt([\"working\",\"input_required\",\"completed\",\"failed\",\"cancelled\"]),Yt=j({taskId:g(),status:Ha,ttl:he([ne(),xm()]),createdAt:g(),lastUpdatedAt:g(),pollInterval:ze(ne()),statusMessage:ze(g())}),ol=Re.extend({task:Yt}),Ga=Ve.merge(Yt),il=Ae.extend({method:A(\"notifications/tasks/status\"),params:Ga}),sl=Pe.extend({method:A(\"tasks/get\"),params:Ce.extend({taskId:g()})}),al=Re.merge(Yt),cl=Pe.extend({method:A(\"tasks/result\"),params:Ce.extend({taskId:g()})}),ul=Re.loose(),ll=Gt.extend({method:A(\"tasks/list\")}),dl=Wt.extend({tasks:T(Yt)}),pl=Pe.extend({method:A(\"tasks/cancel\"),params:Ce.extend({taskId:g()})}),ml=Re.merge(Yt),fl=he([lo,xs,Ps,La,ga,na,ea,Os,Ns,As,Ls,Fs,Js,ma,la]),hl=he([ao,po,ks,Ba]),gl=he([Sr,Pa,Ra,Aa,Ja]),_l=he([lo,ka,Na,Va]),vl=he([ao,po,va,Ys,Ms,fa,aa,Hs,Za]),bl=he([Sr,ws,uo,qa,sa,ta,js,Cs,Us,zr,da,Ws]),Ne=hw().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Pw.custom,message:\"URL must be parseable\",fatal:!0}),Tp}).refine((e)=>{let t=new URL(e);return t.protocol!==\"javascript:\"&&t.protocol!==\"data:\"&&t.protocol!==\"vbscript:\"},{message:\"URL cannot use javascript:, data:, or vbscript: scheme\"}),Wa=Oe({resource:g().url(),authorization_servers:T(Ne).optional(),jwks_uri:g().url().optional(),scopes_supported:T(g()).optional(),bearer_methods_supported:T(g()).optional(),resource_signing_alg_values_supported:T(g()).optional(),resource_name:g().optional(),resource_documentation:g().optional(),resource_policy_uri:g().url().optional(),resource_tos_uri:g().url().optional(),tls_client_certificate_bound_access_tokens:se().optional(),authorization_details_types_supported:T(g()).optional(),dpop_signing_alg_values_supported:T(g()).optional(),dpop_bound_access_tokens_required:se().optional()}),ko=Oe({issuer:g(),authorization_endpoint:Ne,token_endpoint:Ne,registration_endpoint:Ne.optional(),scopes_supported:T(g()).optional(),response_types_supported:T(g()),response_modes_supported:T(g()).optional(),grant_types_supported:T(g()).optional(),token_endpoint_auth_methods_supported:T(g()).optional(),token_endpoint_auth_signing_alg_values_supported:T(g()).optional(),service_documentation:Ne.optional(),revocation_endpoint:Ne.optional(),revocation_endpoint_auth_methods_supported:T(g()).optional(),revocation_endpoint_auth_signing_alg_values_supported:T(g()).optional(),introspection_endpoint:g().optional(),introspection_endpoint_auth_methods_supported:T(g()).optional(),introspection_endpoint_auth_signing_alg_values_supported:T(g()).optional(),code_challenge_methods_supported:T(g()).optional(),client_id_metadata_document_supported:se().optional(),authorization_response_iss_parameter_supported:se().optional().catch(void 0)}),Ka=Oe({issuer:g(),authorization_endpoint:Ne,token_endpoint:Ne,userinfo_endpoint:Ne.optional(),jwks_uri:Ne,registration_endpoint:Ne.optional(),scopes_supported:T(g()).optional(),response_types_supported:T(g()),response_modes_supported:T(g()).optional(),grant_types_supported:T(g()).optional(),acr_values_supported:T(g()).optional(),subject_types_supported:T(g()),id_token_signing_alg_values_supported:T(g()),id_token_encryption_alg_values_supported:T(g()).optional(),id_token_encryption_enc_values_supported:T(g()).optional(),userinfo_signing_alg_values_supported:T(g()).optional(),userinfo_encryption_alg_values_supported:T(g()).optional(),userinfo_encryption_enc_values_supported:T(g()).optional(),request_object_signing_alg_values_supported:T(g()).optional(),request_object_encryption_alg_values_supported:T(g()).optional(),request_object_encryption_enc_values_supported:T(g()).optional(),token_endpoint_auth_methods_supported:T(g()).optional(),token_endpoint_auth_signing_alg_values_supported:T(g()).optional(),display_values_supported:T(g()).optional(),claim_types_supported:T(g()).optional(),claims_supported:T(g()).optional(),service_documentation:g().optional(),claims_locales_supported:T(g()).optional(),ui_locales_supported:T(g()).optional(),claims_parameter_supported:se().optional(),request_parameter_supported:se().optional(),request_uri_parameter_supported:se().optional(),require_request_uri_registration:se().optional(),op_policy_uri:Ne.optional(),op_tos_uri:Ne.optional(),client_id_metadata_document_supported:se().optional(),authorization_response_iss_parameter_supported:se().optional().catch(void 0)}),Ya=j({...Ka.shape,...ko.pick({code_challenge_methods_supported:!0}).shape}),Xa=j({access_token:g(),id_token:g().optional(),token_type:g(),expires_in:Bu.number().optional(),scope:g().optional(),refresh_token:g().optional()}).strip(),Qa=j({issued_token_type:A(\"urn:ietf:params:oauth:token-type:id-jag\"),access_token:g(),token_type:g().optional(),expires_in:ne().optional(),scope:g().optional()}).strip(),ec=j({error:g(),error_description:g().optional(),error_uri:g().optional()}),Pm=Ne.optional().or(A(\"\").transform(()=>{return})),tc=j({redirect_uris:T(Ne),token_endpoint_auth_method:g().optional(),grant_types:T(g()).optional(),response_types:T(g()).optional(),application_type:g().optional(),client_name:g().optional(),client_uri:Ne.optional(),logo_uri:Pm,scope:g().optional(),contacts:T(g()).optional(),tos_uri:Pm,policy_uri:g().optional(),jwks_uri:Ne.optional(),jwks:_w().optional(),software_id:g().optional(),software_version:g().optional(),software_statement:g().optional()}).strip(),rc=j({client_id:g(),client_secret:g().optional(),client_id_issued_at:ne().optional(),client_secret_expires_at:ne().optional()}).strip(),nc=tc.merge(rc),Sl=j({error:g(),error_description:g().optional()}).strip(),yl=j({token:g(),token_type_hint:g().optional()}).strip();var Aw;function y(e,t,n){function o(a,c){if(!a._zod)Object.defineProperty(a,\"_zod\",{value:{def:c,constr:s,traits:new Set},enumerable:!1});if(a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=s.prototype,l=Object.keys(u);for(let m=0;m<l.length;m++){let f=l[m];if(!(f in a))a[f]=u[f].bind(a)}}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,\"name\",{value:e});function s(a){var c;let u=n?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,\"init\",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:(a)=>{if(n?.Parent&&a instanceof n.Parent)return!0;return a?._zod?.traits?.has(e)}}),Object.defineProperty(s,\"name\",{value:e}),s}var $D=Symbol(\"zod_brand\");class Xt extends Error{constructor(){super(\"Encountered Promise during synchronous parse. Use .parseAsync() instead.\")}}class oc extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name=\"ZodEncodeError\"}}(Aw=globalThis).__zod_globalConfig??(Aw.__zod_globalConfig={});var Po=globalThis.__zod_globalConfig;function dt(e){if(e)Object.assign(Po,e);return Po}var oe={};tt(oe,{BIGINT_FORMAT_RANGES:()=>Lw,Class:()=>Jw,NUMBER_FORMAT_RANGES:()=>Cm,aborted:()=>wr,allowsEval:()=>Om,assert:()=>Uj,assertEqual:()=>Nj,assertIs:()=>Zj,assertNever:()=>Aj,assertNotEqual:()=>Cj,assignProp:()=>$r,base64ToUint8Array:()=>Fw,base64urlToUint8Array:()=>tN,cached:()=>Io,captureStackTrace:()=>xl,cleanEnum:()=>eN,cleanRegex:()=>cc,clone:()=>wt,cloneDef:()=>Dj,createTransparentProxy:()=>Bj,defineLazy:()=>te,esc:()=>$l,escapeRegex:()=>er,explicitlyAborted:()=>Zm,extend:()=>Wj,finalizeIssue:()=>bt,floatSafeRemainder:()=>Tm,getElementAtPath:()=>Lj,getEnumValues:()=>sc,getLengthableOrigin:()=>uc,getParsedType:()=>Jj,getSizableOrigin:()=>qw,hexToUint8Array:()=>nN,isObject:()=>fn,isPlainObject:()=>xr,issue:()=>To,joinValues:()=>zl,jsonStringifyReplacer:()=>Ro,merge:()=>Yj,mergeDefs:()=>Qt,normalizeParams:()=>L,nullish:()=>ac,numKeys:()=>Vj,objectClone:()=>Mj,omit:()=>Gj,optionalKeys:()=>Nm,parsedType:()=>Am,partial:()=>Xj,pick:()=>Hj,prefixIssues:()=>tr,primitiveTypes:()=>Dw,promiseAllObject:()=>qj,propertyKeyTypes:()=>jm,randomString:()=>Fj,required:()=>Qj,safeExtend:()=>Kj,shallowClone:()=>Mw,slugify:()=>Em,stringifyPrimitive:()=>wl,uint8ArrayToBase64:()=>Vw,uint8ArrayToBase64url:()=>rN,uint8ArrayToHex:()=>oN,unwrapMessage:()=>ic});function Nj(e){return e}function Cj(e){return e}function Zj(e){}function Aj(e){throw Error(\"Unexpected value in exhaustive check\")}function Uj(e){}function sc(e){let t=Object.values(e).filter((o)=>typeof o===\"number\");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function zl(e,t=\"|\"){return e.map((n)=>wl(n)).join(t)}function Ro(e,t){if(typeof t===\"bigint\")return t.toString();return t}function Io(e){return{get value(){{let n=e();return Object.defineProperty(this,\"value\",{value:n}),n}throw Error(\"cached value already set\")}}}function ac(e){return e===null||e===void 0}function cc(e){let t=e.startsWith(\"^\")?1:0,n=e.endsWith(\"$\")?e.length-1:e.length;return e.slice(t,n)}function Tm(e,t){let n=e/t,o=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);if(Math.abs(n-o)<r)return 0;return n-o}var Uw=Symbol(\"evaluating\");function te(e,t,n){let o=void 0;Object.defineProperty(e,t,{get(){if(o===Uw)return;if(o===void 0)o=Uw,o=n();return o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Mj(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function $r(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Qt(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function Dj(e){return Qt(e._zod.def)}function Lj(e,t){if(!t)return e;return t.reduce((n,o)=>n?.[o],e)}function qj(e){let t=Object.keys(e),n=t.map((o)=>e[o]);return Promise.all(n).then((o)=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function Fj(e=10){let n=\"\";for(let o=0;o<e;o++)n+=\"abcdefghijklmnopqrstuvwxyz\"[Math.floor(Math.random()*26)];return n}function $l(e){return JSON.stringify(e)}function Em(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,\"\").replace(/[\\s_-]+/g,\"-\").replace(/^-+|-+$/g,\"\")}var xl=\"captureStackTrace\"in Error?Error.captureStackTrace:(...e)=>{};function fn(e){return typeof e===\"object\"&&e!==null&&!Array.isArray(e)}var Om=Io(()=>{if(Po.jitless)return!1;if(typeof navigator<\"u\"&&navigator?.userAgent?.includes(\"Cloudflare\"))return!1;try{return new Function(\"\"),!0}catch(e){return!1}});function xr(e){if(fn(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!==\"function\")return!0;let n=t.prototype;if(fn(n)===!1)return!1;if(Object.prototype.hasOwnProperty.call(n,\"isPrototypeOf\")===!1)return!1;return!0}function Mw(e){if(xr(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}function Vj(e){let t=0;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n))t++;return t}var Jj=(e)=>{let t=typeof e;switch(t){case\"undefined\":return\"undefined\";case\"string\":return\"string\";case\"number\":return Number.isNaN(e)?\"nan\":\"number\";case\"boolean\":return\"boolean\";case\"function\":return\"function\";case\"bigint\":return\"bigint\";case\"symbol\":return\"symbol\";case\"object\":if(Array.isArray(e))return\"array\";if(e===null)return\"null\";if(e.then&&typeof e.then===\"function\"&&e.catch&&typeof e.catch===\"function\")return\"promise\";if(typeof Map<\"u\"&&e instanceof Map)return\"map\";if(typeof Set<\"u\"&&e instanceof Set)return\"set\";if(typeof Date<\"u\"&&e instanceof Date)return\"date\";if(typeof File<\"u\"&&e instanceof File)return\"file\";return\"object\";default:throw Error(`Unknown data type: ${t}`)}},jm=new Set([\"string\",\"number\",\"symbol\"]),Dw=new Set([\"string\",\"number\",\"bigint\",\"boolean\",\"symbol\",\"undefined\"]);function er(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function wt(e,t,n){let o=new e._zod.constr(t??e._zod.def);if(!t||n?.parent)o._zod.parent=e;return o}function L(e){let t=e;if(!t)return{};if(typeof t===\"string\")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error(\"Cannot specify both `message` and `error` params\");t.error=t.message}if(delete t.message,typeof t.error===\"string\")return{...t,error:()=>t.error};return t}function Bj(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function wl(e){if(typeof e===\"bigint\")return e.toString()+\"n\";if(typeof e===\"string\")return`\"${e}\"`;return`${e}`}function Nm(e){return Object.keys(e).filter((t)=>e[t]._zod.optin===\"optional\"&&e[t]._zod.optout===\"optional\")}var Cm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Lw={int64:[BigInt(\"-9223372036854775808\"),BigInt(\"9223372036854775807\")],uint64:[BigInt(0),BigInt(\"18446744073709551615\")]};function Hj(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw Error(\".pick() cannot be used on object schemas containing refinements\");let i=Qt(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in n.shape))throw Error(`Unrecognized key: \"${a}\"`);if(!t[a])continue;s[a]=n.shape[a]}return $r(this,\"shape\",s),s},checks:[]});return wt(e,i)}function Gj(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw Error(\".omit() cannot be used on object schemas containing refinements\");let i=Qt(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in n.shape))throw Error(`Unrecognized key: \"${a}\"`);if(!t[a])continue;delete s[a]}return $r(this,\"shape\",s),s},checks:[]});return wt(e,i)}function Wj(e,t){if(!xr(t))throw Error(\"Invalid input to extend: expected a plain object\");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\")}let r=Qt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return $r(this,\"shape\",i),i}});return wt(e,r)}function Kj(e,t){if(!xr(t))throw Error(\"Invalid input to safeExtend: expected a plain object\");let n=Qt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return $r(this,\"shape\",o),o}});return wt(e,n)}function Yj(e,t){if(e._zod.def.checks?.length)throw Error(\".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.\");let n=Qt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return $r(this,\"shape\",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return wt(e,n)}function Xj(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(\".partial() cannot be used on object schemas containing refinements\");let s=Qt(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(n)for(let u in n){if(!(u in a))throw Error(`Unrecognized key: \"${u}\"`);if(!n[u])continue;c[u]=e?new e({type:\"optional\",innerType:a[u]}):a[u]}else for(let u in a)c[u]=e?new e({type:\"optional\",innerType:a[u]}):a[u];return $r(this,\"shape\",c),c},checks:[]});return wt(t,s)}function Qj(e,t,n){let o=Qt(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let s in n){if(!(s in i))throw Error(`Unrecognized key: \"${s}\"`);if(!n[s])continue;i[s]=new e({type:\"nonoptional\",innerType:r[s]})}else for(let s in r)i[s]=new e({type:\"nonoptional\",innerType:r[s]});return $r(this,\"shape\",i),i}});return wt(t,o)}function wr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Zm(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function tr(e,t){return t.map((n)=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function ic(e){return typeof e===\"string\"?e:e?.message}function bt(e,t,n){let o=e.message?e.message:ic(e.inst?._zod.def?.error?.(e))??ic(t?.error?.(e))??ic(n.customError?.(e))??ic(n.localeError?.(e))??\"Invalid input\",{inst:r,continue:i,input:s,...a}=e;if(a.path??(a.path=[]),a.message=o,t?.reportInput)a.input=s;return a}function qw(e){if(e instanceof Set)return\"set\";if(e instanceof Map)return\"map\";if(e instanceof File)return\"file\";return\"unknown\"}function uc(e){if(Array.isArray(e))return\"array\";if(typeof e===\"string\")return\"string\";return\"unknown\"}function Am(e){let t=typeof e;switch(t){case\"number\":return Number.isNaN(e)?\"nan\":\"number\";case\"object\":{if(e===null)return\"null\";if(Array.isArray(e))return\"array\";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&\"constructor\"in n&&n.constructor)return n.constructor.name}}return t}function To(...e){let[t,n,o]=e;if(typeof t===\"string\")return{message:t,code:\"custom\",input:n,inst:o};return{...t}}function eN(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map((t)=>t[1])}function Fw(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function Vw(e){let t=\"\";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function tN(e){let t=e.replace(/-/g,\"+\").replace(/_/g,\"/\"),n=\"=\".repeat((4-t.length%4)%4);return Fw(t+n)}function rN(e){return Vw(e).replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=/g,\"\")}function nN(e){let t=e.replace(/^0x/,\"\");if(t.length%2!==0)throw Error(\"Invalid hex string length\");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function oN(e){return Array.from(e).map((t)=>t.toString(16).padStart(2,\"0\")).join(\"\")}class Jw{constructor(...e){}}var Bw=(e,t)=>{e.name=\"$ZodError\",Object.defineProperty(e,\"_zod\",{value:e._zod,enumerable:!1}),Object.defineProperty(e,\"issues\",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ro,2),Object.defineProperty(e,\"toString\",{value:()=>e.message,enumerable:!1})},kl=y(\"$ZodError\",Bw),Um=y(\"$ZodError\",Bw,{Parent:Error});function Hw(e,t=(n)=>n.message){let n={},o=[];for(let r of e.issues)if(r.path.length>0)n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r));else o.push(t(r));return{formErrors:o,fieldErrors:n}}function Gw(e,t=(n)=>n.message){let n={_errors:[]},o=(r,i=[])=>{for(let s of r.issues)if(s.code===\"invalid_union\"&&s.errors.length)s.errors.map((a)=>o({issues:a},[...i,...s.path]));else if(s.code===\"invalid_key\")o({issues:s.issues},[...i,...s.path]);else if(s.code===\"invalid_element\")o({issues:s.issues},[...i,...s.path]);else{let a=[...i,...s.path];if(a.length===0)n._errors.push(t(s));else{let c=n,u=0;while(u<a.length){let l=a[u];if(u!==a.length-1)c[l]=c[l]||{_errors:[]};else c[l]=c[l]||{_errors:[]},c[l]._errors.push(t(s));c=c[l],u++}}}};return o(e),n}var Pl=(e)=>(t,n,o,r)=>{let i=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Xt;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map((c)=>bt(c,i,dt())));throw xl(a,r?.callee),a}return s.value};var Rl=(e)=>async(t,n,o,r)=>{let i=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)s=await s;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map((c)=>bt(c,i,dt())));throw xl(a,r?.callee),a}return s.value};var lc=(e)=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Xt;return i.issues.length?{success:!1,error:new(e??kl)(i.issues.map((s)=>bt(s,r,dt())))}:{success:!0,data:i.value}},Ww=lc(Um),dc=(e)=>async(t,n,o)=>{let r=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)i=await i;return i.issues.length?{success:!1,error:new e(i.issues.map((s)=>bt(s,r,dt())))}:{success:!0,data:i.value}},Kw=dc(Um),Yw=(e)=>(t,n,o)=>{let r=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return Pl(e)(t,n,r)};var Xw=(e)=>(t,n,o)=>Pl(e)(t,n,o);var Qw=(e)=>async(t,n,o)=>{let r=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return Rl(e)(t,n,r)};var ek=(e)=>async(t,n,o)=>Rl(e)(t,n,o);var tk=(e)=>(t,n,o)=>{let r=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return lc(e)(t,n,r)};var rk=(e)=>(t,n,o)=>lc(e)(t,n,o);var nk=(e)=>async(t,n,o)=>{let r=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return dc(e)(t,n,r)};var ok=(e)=>async(t,n,o)=>dc(e)(t,n,o);var ik=/^[cC][0-9a-z]{6,}$/,sk=/^[0-9a-z]+$/,ak=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ck=/^[0-9a-vA-V]{20}$/,uk=/^[A-Za-z0-9]{27}$/,lk=/^[a-zA-Z0-9_-]{21}$/,dk=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;var pk=/^([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})$/,Mm=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var mk=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;var sN=\"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\";function fk(){return new RegExp(sN,\"u\")}var hk=/^(?:(?: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])$/,gk=/^(([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}|:))$/;var _k=/^((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])$/,vk=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bk=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dm=/^[A-Za-z0-9_-]*$/;var Sk=/^https?$/,yk=/^\\+[1-9]\\d{6,14}$/,zk=\"(?:(?:\\\\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])))\",$k=new RegExp(`^${zk}$`);function xk(e){return typeof e.precision===\"number\"?e.precision===-1?\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d\":e.precision===0?\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\":`(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?\"}function wk(e){return new RegExp(`^${xk(e)}$`)}function kk(e){let t=xk({precision:e.precision}),n=[\"Z\"];if(e.local)n.push(\"\");if(e.offset)n.push(\"([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)\");let o=`${t}(?:${n.join(\"|\")})`;return new RegExp(`^${zk}T(?:${o})$`)}var Pk=(e)=>{let t=e?`[\\\\s\\\\S]{${e?.minimum??0},${e?.maximum??\"\"}}`:\"[\\\\s\\\\S]*\";return new RegExp(`^${t}$`)};var Rk=/^-?\\d+$/,Il=/^-?\\d+(?:\\.\\d+)?$/,Ik=/^(?:true|false)$/i,Tk=/^null$/i;var Ek=/^[^A-Z]*$/,Ok=/^[^a-z]*$/;var Ue=y(\"$ZodCheck\",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),jk={number:\"number\",bigint:\"bigint\",object:\"date\"},Lm=y(\"$ZodCheckLessThan\",(e,t)=>{Ue.init(e,t);let n=jk[typeof t.value];e._zod.onattach.push((o)=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<i)if(t.inclusive)r.maximum=t.value;else r.exclusiveMaximum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value<=t.value:o.value<t.value)return;o.issues.push({origin:n,code:\"too_big\",maximum:typeof t.value===\"object\"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qm=y(\"$ZodCheckGreaterThan\",(e,t)=>{Ue.init(e,t);let n=jk[typeof t.value];e._zod.onattach.push((o)=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>i)if(t.inclusive)r.minimum=t.value;else r.exclusiveMinimum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value>=t.value:o.value>t.value)return;o.issues.push({origin:n,code:\"too_small\",minimum:typeof t.value===\"object\"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Nk=y(\"$ZodCheckMultipleOf\",(e,t)=>{Ue.init(e,t),e._zod.onattach.push((n)=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=(n)=>{if(typeof n.value!==typeof t.value)throw Error(\"Cannot mix number and bigint in multiple_of check.\");if(typeof n.value===\"bigint\"?n.value%t.value===BigInt(0):Tm(n.value,t.value)===0)return;n.issues.push({origin:typeof n.value,code:\"not_multiple_of\",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ck=y(\"$ZodCheckNumberFormat\",(e,t)=>{Ue.init(e,t),t.format=t.format||\"float64\";let n=t.format?.includes(\"int\"),o=n?\"int\":\"number\",[r,i]=Cm[t.format];e._zod.onattach.push((s)=>{let a=s._zod.bag;if(a.format=t.format,a.minimum=r,a.maximum=i,n)a.pattern=Rk}),e._zod.check=(s)=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:\"invalid_type\",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)s.issues.push({input:a,code:\"too_big\",maximum:Number.MAX_SAFE_INTEGER,note:\"Integers must be within the safe integer range.\",inst:e,origin:o,inclusive:!0,continue:!t.abort});else s.issues.push({input:a,code:\"too_small\",minimum:Number.MIN_SAFE_INTEGER,note:\"Integers must be within the safe integer range.\",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}if(a<r)s.issues.push({origin:\"number\",input:a,code:\"too_small\",minimum:r,inclusive:!0,inst:e,continue:!t.abort});if(a>i)s.issues.push({origin:\"number\",input:a,code:\"too_big\",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}});var Zk=y(\"$ZodCheckMaxLength\",(e,t)=>{var n;Ue.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!ac(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<r)o._zod.bag.maximum=t.maximum}),e._zod.check=(o)=>{let r=o.value;if(r.length<=t.maximum)return;let s=uc(r);o.issues.push({origin:s,code:\"too_big\",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ak=y(\"$ZodCheckMinLength\",(e,t)=>{var n;Ue.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!ac(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>r)o._zod.bag.minimum=t.minimum}),e._zod.check=(o)=>{let r=o.value;if(r.length>=t.minimum)return;let s=uc(r);o.issues.push({origin:s,code:\"too_small\",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Uk=y(\"$ZodCheckLengthEquals\",(e,t)=>{var n;Ue.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!ac(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=(o)=>{let r=o.value,i=r.length;if(i===t.length)return;let s=uc(r),a=i>t.length;o.issues.push({origin:s,...a?{code:\"too_big\",maximum:t.length}:{code:\"too_small\",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),pc=y(\"$ZodCheckStringFormat\",(e,t)=>{var n,o;if(Ue.init(e,t),e._zod.onattach.push((r)=>{let i=r._zod.bag;if(i.format=t.format,t.pattern)i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern)}),t.pattern)(n=e._zod).check??(n.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;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})});else(o=e._zod).check??(o.check=()=>{})}),Mk=y(\"$ZodCheckRegex\",(e,t)=>{pc.init(e,t),e._zod.check=(n)=>{if(t.pattern.lastIndex=0,t.pattern.test(n.value))return;n.issues.push({origin:\"string\",code:\"invalid_format\",format:\"regex\",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Dk=y(\"$ZodCheckLowerCase\",(e,t)=>{t.pattern??(t.pattern=Ek),pc.init(e,t)}),Lk=y(\"$ZodCheckUpperCase\",(e,t)=>{t.pattern??(t.pattern=Ok),pc.init(e,t)}),qk=y(\"$ZodCheckIncludes\",(e,t)=>{Ue.init(e,t);let n=er(t.includes),o=new RegExp(typeof t.position===\"number\"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push((r)=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=(r)=>{if(r.value.includes(t.includes,t.position))return;r.issues.push({origin:\"string\",code:\"invalid_format\",format:\"includes\",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Fk=y(\"$ZodCheckStartsWith\",(e,t)=>{Ue.init(e,t);let n=new RegExp(`^${er(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.startsWith(t.prefix))return;o.issues.push({origin:\"string\",code:\"invalid_format\",format:\"starts_with\",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Vk=y(\"$ZodCheckEndsWith\",(e,t)=>{Ue.init(e,t);let n=new RegExp(`.*${er(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.endsWith(t.suffix))return;o.issues.push({origin:\"string\",code:\"invalid_format\",format:\"ends_with\",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});var Jk=y(\"$ZodCheckOverwrite\",(e,t)=>{Ue.init(e,t),e._zod.check=(n)=>{n.value=t.tx(n.value)}});class Fm{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e===\"function\"){e(this,{execution:\"sync\"}),e(this,{execution:\"async\"});return}let n=e.split(`\n`).filter((i)=>i),o=Math.min(...n.map((i)=>i.length-i.trimStart().length)),r=n.map((i)=>i.slice(o)).map((i)=>\" \".repeat(this.indent*2)+i);for(let i of r)this.content.push(i)}compile(){let e=Function,t=this?.args,o=[...(this?.content??[\"\"]).map((r)=>` ${r}`)];return new e(...t,o.join(`\n`))}}var Hk={major:4,minor:4,patch:3};var ge=y(\"$ZodType\",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Hk;let o=[...e._zod.def.checks??[]];if(e._zod.traits.has(\"$ZodCheck\"))o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(s,a,c)=>{let u=wr(s),l;for(let m of a){if(m._zod.def.when){if(Zm(s))continue;if(!m._zod.def.when(s))continue}else if(u)continue;let f=s.issues.length,h=m._zod.check(s);if(h instanceof Promise&&c?.async===!1)throw new Xt;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{if(await h,s.issues.length===f)return;if(!u)u=wr(s,f)});else{if(s.issues.length===f)continue;if(!u)u=wr(s,f)}}if(l)return l.then(()=>s);return s},i=(s,a,c)=>{if(wr(s))return s.aborted=!0,s;let u=r(a,o,c);if(u instanceof Promise){if(c.async===!1)throw new Xt;return u.then((l)=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction===\"backward\"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});if(u instanceof Promise)return u.then((l)=>i(l,s,a));return i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new Xt;return c.then((u)=>r(u,o,a))}return r(c,o,a)}}te(e,\"~standard\",()=>({validate:(r)=>{try{let i=Ww(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch(i){return Kw(e,r).then((s)=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:\"zod\",version:1}))}),jl=y(\"$ZodString\",(e,t)=>{ge.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Pk(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}if(typeof n.value===\"string\")return n;return n.issues.push({expected:\"string\",code:\"invalid_type\",input:n.value,inst:e}),n}}),ve=y(\"$ZodStringFormat\",(e,t)=>{pc.init(e,t),jl.init(e,t)}),rP=y(\"$ZodGUID\",(e,t)=>{t.pattern??(t.pattern=pk),ve.init(e,t)}),nP=y(\"$ZodUUID\",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw Error(`Invalid UUID version: \"${t.version}\"`);t.pattern??(t.pattern=Mm(o))}else t.pattern??(t.pattern=Mm());ve.init(e,t)}),oP=y(\"$ZodEmail\",(e,t)=>{t.pattern??(t.pattern=mk),ve.init(e,t)}),iP=y(\"$ZodURL\",(e,t)=>{ve.init(e,t),e._zod.check=(n)=>{try{let o=n.value.trim();if(!t.normalize&&t.protocol?.source===Sk.source){if(!/^https?:\\/\\//i.test(o)){n.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid URL format\",input:n.value,inst:e,continue:!t.abort});return}}let r=new URL(o);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(r.hostname))n.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid hostname\",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(r.protocol.endsWith(\":\")?r.protocol.slice(0,-1):r.protocol))n.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid protocol\",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})}if(t.normalize)n.value=r.href;else n.value=o;return}catch(o){n.issues.push({code:\"invalid_format\",format:\"url\",input:n.value,inst:e,continue:!t.abort})}}}),sP=y(\"$ZodEmoji\",(e,t)=>{t.pattern??(t.pattern=fk()),ve.init(e,t)}),aP=y(\"$ZodNanoID\",(e,t)=>{t.pattern??(t.pattern=lk),ve.init(e,t)}),cP=y(\"$ZodCUID\",(e,t)=>{t.pattern??(t.pattern=ik),ve.init(e,t)}),uP=y(\"$ZodCUID2\",(e,t)=>{t.pattern??(t.pattern=sk),ve.init(e,t)}),lP=y(\"$ZodULID\",(e,t)=>{t.pattern??(t.pattern=ak),ve.init(e,t)}),dP=y(\"$ZodXID\",(e,t)=>{t.pattern??(t.pattern=ck),ve.init(e,t)}),pP=y(\"$ZodKSUID\",(e,t)=>{t.pattern??(t.pattern=uk),ve.init(e,t)}),mP=y(\"$ZodISODateTime\",(e,t)=>{t.pattern??(t.pattern=kk(t)),ve.init(e,t)}),fP=y(\"$ZodISODate\",(e,t)=>{t.pattern??(t.pattern=$k),ve.init(e,t)}),hP=y(\"$ZodISOTime\",(e,t)=>{t.pattern??(t.pattern=wk(t)),ve.init(e,t)}),gP=y(\"$ZodISODuration\",(e,t)=>{t.pattern??(t.pattern=dk),ve.init(e,t)}),_P=y(\"$ZodIPv4\",(e,t)=>{t.pattern??(t.pattern=hk),ve.init(e,t),e._zod.bag.format=\"ipv4\"}),vP=y(\"$ZodIPv6\",(e,t)=>{t.pattern??(t.pattern=gk),ve.init(e,t),e._zod.bag.format=\"ipv6\",e._zod.check=(n)=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:\"invalid_format\",format:\"ipv6\",input:n.value,inst:e,continue:!t.abort})}}});var bP=y(\"$ZodCIDRv4\",(e,t)=>{t.pattern??(t.pattern=_k),ve.init(e,t)}),SP=y(\"$ZodCIDRv6\",(e,t)=>{t.pattern??(t.pattern=vk),ve.init(e,t),e._zod.check=(n)=>{let o=n.value.split(\"/\");try{if(o.length!==2)throw Error();let[r,i]=o;if(!i)throw Error();let s=Number(i);if(`${s}`!==i)throw Error();if(s<0||s>128)throw Error();new URL(`http://[${r}]`)}catch{n.issues.push({code:\"invalid_format\",format:\"cidrv6\",input:n.value,inst:e,continue:!t.abort})}}});function yP(e){if(e===\"\")return!0;if(/\\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var zP=y(\"$ZodBase64\",(e,t)=>{t.pattern??(t.pattern=bk),ve.init(e,t),e._zod.bag.contentEncoding=\"base64\",e._zod.check=(n)=>{if(yP(n.value))return;n.issues.push({code:\"invalid_format\",format:\"base64\",input:n.value,inst:e,continue:!t.abort})}});function aN(e){if(!Dm.test(e))return!1;let t=e.replace(/[-_]/g,(o)=>o===\"-\"?\"+\":\"/\"),n=t.padEnd(Math.ceil(t.length/4)*4,\"=\");return yP(n)}var $P=y(\"$ZodBase64URL\",(e,t)=>{t.pattern??(t.pattern=Dm),ve.init(e,t),e._zod.bag.contentEncoding=\"base64url\",e._zod.check=(n)=>{if(aN(n.value))return;n.issues.push({code:\"invalid_format\",format:\"base64url\",input:n.value,inst:e,continue:!t.abort})}}),xP=y(\"$ZodE164\",(e,t)=>{t.pattern??(t.pattern=yk),ve.init(e,t)});function cN(e,t=null){try{let n=e.split(\".\");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));if(\"typ\"in r&&r?.typ!==\"JWT\")return!1;if(!r.alg)return!1;if(t&&(!(\"alg\"in r)||r.alg!==t))return!1;return!0}catch{return!1}}var wP=y(\"$ZodJWT\",(e,t)=>{ve.init(e,t),e._zod.check=(n)=>{if(cN(n.value,t.alg))return;n.issues.push({code:\"invalid_format\",format:\"jwt\",input:n.value,inst:e,continue:!t.abort})}});var Jm=y(\"$ZodNumber\",(e,t)=>{ge.init(e,t),e._zod.pattern=e._zod.bag.pattern??Il,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch(s){}let r=n.value;if(typeof r===\"number\"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r===\"number\"?Number.isNaN(r)?\"NaN\":!Number.isFinite(r)?\"Infinity\":void 0:void 0;return n.issues.push({expected:\"number\",code:\"invalid_type\",input:r,inst:e,...i?{received:i}:{}}),n}}),kP=y(\"$ZodNumberFormat\",(e,t)=>{Ck.init(e,t),Jm.init(e,t)}),PP=y(\"$ZodBoolean\",(e,t)=>{ge.init(e,t),e._zod.pattern=Ik,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(i){}let r=n.value;if(typeof r===\"boolean\")return n;return n.issues.push({expected:\"boolean\",code:\"invalid_type\",input:r,inst:e}),n}});var RP=y(\"$ZodNull\",(e,t)=>{ge.init(e,t),e._zod.pattern=Tk,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;if(r===null)return n;return n.issues.push({expected:\"null\",code:\"invalid_type\",input:r,inst:e}),n}});var IP=y(\"$ZodUnknown\",(e,t)=>{ge.init(e,t),e._zod.parse=(n)=>n}),TP=y(\"$ZodNever\",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:\"never\",code:\"invalid_type\",input:n.value,inst:e}),n)});function Gk(e,t,n){if(e.issues.length)t.issues.push(...tr(n,e.issues));t.value[n]=e.value}var EP=y(\"$ZodArray\",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:\"array\",code:\"invalid_type\",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let s=0;s<r.length;s++){let a=r[s],c=t.element._zod.run({value:a,issues:[]},o);if(c instanceof Promise)i.push(c.then((u)=>Gk(u,n,s)));else Gk(c,n,s)}if(i.length)return Promise.all(i).then(()=>n);return n}});function Ol(e,t,n,o,r,i){let s=n in o;if(e.issues.length){if(r&&i&&!s)return;t.issues.push(...tr(n,e.issues))}if(!s&&!r){if(!e.issues.length)t.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:void 0,path:[n]});return}if(e.value===void 0){if(s)t.value[n]=void 0}else t.value[n]=e.value}function OP(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has(\"$ZodType\"))throw Error(`Invalid element at key \"${o}\": expected a Zod schema`);let n=Nm(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function jP(e,t,n,o,r,i){let s=[],a=r.keySet,c=r.catchall._zod,u=c.def.type,l=c.optin===\"optional\",m=c.optout===\"optional\";for(let f in t){if(f===\"__proto__\")continue;if(a.has(f))continue;if(u===\"never\"){s.push(f);continue}let h=c.run({value:t[f],issues:[]},o);if(h instanceof Promise)e.push(h.then((z)=>Ol(z,n,f,t,l,m)));else Ol(h,n,f,t,l,m)}if(s.length)n.issues.push({code:\"unrecognized_keys\",keys:s,input:t,inst:i});if(!e.length)return n;return Promise.all(e).then(()=>n)}var uN=y(\"$ZodObject\",(e,t)=>{if(ge.init(e,t),!Object.getOwnPropertyDescriptor(t,\"shape\")?.get){let a=t.shape;Object.defineProperty(t,\"shape\",{get:()=>{let c={...a};return Object.defineProperty(t,\"shape\",{value:c}),c}})}let o=Io(()=>OP(t));te(e._zod,\"propValues\",()=>{let a=t.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let m of l.values)c[u].add(m)}}return c});let r=fn,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!r(u))return a.issues.push({expected:\"object\",code:\"invalid_type\",input:u,inst:e}),a;a.value={};let l=[],m=s.shape;for(let f of s.keys){let h=m[f],z=h._zod.optin===\"optional\",C=h._zod.optout===\"optional\",I=h._zod.run({value:u[f],issues:[]},c);if(I instanceof Promise)l.push(I.then((X)=>Ol(X,a,f,u,z,C)));else Ol(I,a,f,u,z,C)}if(!i)return l.length?Promise.all(l).then(()=>a):a;return jP(l,u,a,c,o.value,e)}}),NP=y(\"$ZodObjectJIT\",(e,t)=>{uN.init(e,t);let n=e._zod.parse,o=Io(()=>OP(t)),r=(f)=>{let h=new Fm([\"shape\",\"payload\",\"ctx\"]),z=o.value,C=(q)=>{let E=$l(q);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};h.write(\"const input = payload.value;\");let I=Object.create(null),X=0;for(let q of z.keys)I[q]=`key_${X++}`;h.write(\"const newResult = {};\");for(let q of z.keys){let E=I[q],U=$l(q),ie=f[q],Se=ie?._zod?.optin===\"optional\",at=ie?._zod?.optout===\"optional\";if(h.write(`const ${E} = ${C(q)};`),Se&&at)h.write(`\n if (${E}.issues.length) {\n if (${U} in input) {\n payload.issues = payload.issues.concat(${E}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${U}, ...iss.path] : [${U}]\n })));\n }\n }\n \n if (${E}.value === undefined) {\n if (${U} in input) {\n newResult[${U}] = undefined;\n }\n } else {\n newResult[${U}] = ${E}.value;\n }\n \n `);else if(!Se)h.write(`\n const ${E}_present = ${U} in input;\n if (${E}.issues.length) {\n payload.issues = payload.issues.concat(${E}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${U}, ...iss.path] : [${U}]\n })));\n }\n if (!${E}_present && !${E}.issues.length) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [${U}]\n });\n }\n\n if (${E}_present) {\n if (${E}.value === undefined) {\n newResult[${U}] = undefined;\n } else {\n newResult[${U}] = ${E}.value;\n }\n }\n\n `);else h.write(`\n if (${E}.issues.length) {\n payload.issues = payload.issues.concat(${E}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${U}, ...iss.path] : [${U}]\n })));\n }\n \n if (${E}.value === undefined) {\n if (${U} in input) {\n newResult[${U}] = undefined;\n }\n } else {\n newResult[${U}] = ${E}.value;\n }\n \n `)}h.write(\"payload.value = newResult;\"),h.write(\"return payload;\");let fe=h.compile();return(q,E)=>fe(f,q,E)},i,s=fn,a=!Po.jitless,u=a&&Om.value,l=t.catchall,m;e._zod.parse=(f,h)=>{m??(m=o.value);let z=f.value;if(!s(z))return f.issues.push({expected:\"object\",code:\"invalid_type\",input:z,inst:e}),f;if(a&&u&&h?.async===!1&&h.jitless!==!0){if(!i)i=r(t.shape);if(f=i(f,h),!l)return f;return jP([],z,f,h,m,e)}return n(f,h)}});function Wk(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter((i)=>!wr(i));if(r.length===1)return t.value=r[0].value,r[0];return t.issues.push({code:\"invalid_union\",input:t.value,inst:n,errors:e.map((i)=>i.issues.map((s)=>bt(s,o,dt())))}),t}var Bm=y(\"$ZodUnion\",(e,t)=>{ge.init(e,t),te(e._zod,\"optin\",()=>t.options.some((o)=>o._zod.optin===\"optional\")?\"optional\":void 0),te(e._zod,\"optout\",()=>t.options.some((o)=>o._zod.optout===\"optional\")?\"optional\":void 0),te(e._zod,\"values\",()=>{if(t.options.every((o)=>o._zod.values))return new Set(t.options.flatMap((o)=>Array.from(o._zod.values)));return}),te(e._zod,\"pattern\",()=>{if(t.options.every((o)=>o._zod.pattern)){let o=t.options.map((r)=>r._zod.pattern);return new RegExp(`^(${o.map((r)=>cc(r.source)).join(\"|\")})$`)}return});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},r);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}if(!i)return Wk(s,o,e,r);return Promise.all(s).then((a)=>Wk(a,o,e,r))}});var CP=y(\"$ZodDiscriminatedUnion\",(e,t)=>{t.inclusive=!1,Bm.init(e,t);let n=e._zod.parse;te(e._zod,\"propValues\",()=>{let r={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw Error(`Invalid discriminated union option at index \"${t.options.indexOf(i)}\"`);for(let[a,c]of Object.entries(s)){if(!r[a])r[a]=new Set;for(let u of c)r[a].add(u)}}return r});let o=Io(()=>{let r=t.options,i=new Map;for(let s of r){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw Error(`Invalid discriminated union option at index \"${t.options.indexOf(s)}\"`);for(let c of a){if(i.has(c))throw Error(`Duplicate discriminator value \"${String(c)}\"`);i.set(c,s)}}return i});e._zod.parse=(r,i)=>{let s=r.value;if(!fn(s))return r.issues.push({code:\"invalid_type\",expected:\"object\",input:s,inst:e}),r;let a=o.value.get(s?.[t.discriminator]);if(a)return a._zod.run(r,i);if(t.unionFallback||i.direction===\"backward\")return n(r,i);return r.issues.push({code:\"invalid_union\",errors:[],note:\"No matching discriminator\",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),r}}),ZP=y(\"$ZodIntersection\",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),s=t.right._zod.run({value:r,issues:[]},o);if(i instanceof Promise||s instanceof Promise)return Promise.all([i,s]).then(([c,u])=>Kk(n,c,u));return Kk(n,i,s)}});function Vm(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(xr(e)&&xr(t)){let n=Object.keys(t),o=Object.keys(e).filter((i)=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let s=Vm(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r[i]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],s=Vm(r,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Kk(e,t,n){let o=new Map,r;for(let a of t.issues)if(a.code===\"unrecognized_keys\"){r??(r=a);for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).l=!0}}else e.issues.push(a);for(let a of n.issues)if(a.code===\"unrecognized_keys\")for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).r=!0}else e.issues.push(a);let i=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&r)e.issues.push({...r,keys:i});if(wr(e))return e;let s=Vm(t.value,n.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var AP=y(\"$ZodRecord\",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!xr(r))return n.issues.push({expected:\"record\",code:\"invalid_type\",input:r,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let a=new Set;for(let u of s)if(typeof u===\"string\"||typeof u===\"number\"||typeof u===\"symbol\"){a.add(typeof u===\"number\"?u.toString():u);let l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(l.issues.length){n.issues.push({code:\"invalid_key\",origin:\"record\",issues:l.issues.map((h)=>bt(h,o,dt())),input:u,path:[u],inst:e});continue}let m=l.value,f=t.valueType._zod.run({value:r[u],issues:[]},o);if(f instanceof Promise)i.push(f.then((h)=>{if(h.issues.length)n.issues.push(...tr(u,h.issues));n.value[m]=h.value}));else{if(f.issues.length)n.issues.push(...tr(u,f.issues));n.value[m]=f.value}}let c;for(let u in r)if(!a.has(u))c=c??[],c.push(u);if(c&&c.length>0)n.issues.push({code:\"unrecognized_keys\",input:r,inst:e,keys:c})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a===\"__proto__\")continue;if(!Object.prototype.propertyIsEnumerable.call(r,a))continue;let c=t.keyType._zod.run({value:a,issues:[]},o);if(c instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(typeof a===\"string\"&&Il.test(a)&&c.issues.length){let m=t.keyType._zod.run({value:Number(a),issues:[]},o);if(m instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(m.issues.length===0)c=m}if(c.issues.length){if(t.mode===\"loose\")n.value[a]=r[a];else n.issues.push({code:\"invalid_key\",origin:\"record\",issues:c.issues.map((m)=>bt(m,o,dt())),input:a,path:[a],inst:e});continue}let l=t.valueType._zod.run({value:r[a],issues:[]},o);if(l instanceof Promise)i.push(l.then((m)=>{if(m.issues.length)n.issues.push(...tr(a,m.issues));n.value[c.value]=m.value}));else{if(l.issues.length)n.issues.push(...tr(a,l.issues));n.value[c.value]=l.value}}}if(i.length)return Promise.all(i).then(()=>n);return n}});var UP=y(\"$ZodEnum\",(e,t)=>{ge.init(e,t);let n=sc(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter((r)=>jm.has(typeof r)).map((r)=>typeof r===\"string\"?er(r):r.toString()).join(\"|\")})$`),e._zod.parse=(r,i)=>{let s=r.value;if(o.has(s))return r;return r.issues.push({code:\"invalid_value\",values:n,input:s,inst:e}),r}}),MP=y(\"$ZodLiteral\",(e,t)=>{if(ge.init(e,t),t.values.length===0)throw Error(\"Cannot create literal schema with no valid values\");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map((o)=>typeof o===\"string\"?er(o):o?er(o.toString()):String(o)).join(\"|\")})$`),e._zod.parse=(o,r)=>{let i=o.value;if(n.has(i))return o;return o.issues.push({code:\"invalid_value\",values:t.values,input:i,inst:e}),o}});var DP=y(\"$ZodTransform\",(e,t)=>{ge.init(e,t),e._zod.optin=\"optional\",e._zod.parse=(n,o)=>{if(o.direction===\"backward\")throw new oc(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then((s)=>(n.value=s,n.fallback=!0,n));if(r instanceof Promise)throw new Xt;return n.value=r,n.fallback=!0,n}});function Yk(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var Hm=y(\"$ZodOptional\",(e,t)=>{ge.init(e,t),e._zod.optin=\"optional\",e._zod.optout=\"optional\",te(e._zod,\"values\",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),te(e._zod,\"pattern\",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${cc(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin===\"optional\"){let r=n.value,i=t.innerType._zod.run(n,o);if(i instanceof Promise)return i.then((s)=>Yk(s,r));return Yk(i,r)}if(n.value===void 0)return n;return t.innerType._zod.run(n,o)}}),LP=y(\"$ZodExactOptional\",(e,t)=>{Hm.init(e,t),te(e._zod,\"values\",()=>t.innerType._zod.values),te(e._zod,\"pattern\",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),qP=y(\"$ZodNullable\",(e,t)=>{ge.init(e,t),te(e._zod,\"optin\",()=>t.innerType._zod.optin),te(e._zod,\"optout\",()=>t.innerType._zod.optout),te(e._zod,\"pattern\",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${cc(n.source)}|null)$`):void 0}),te(e._zod,\"values\",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>{if(n.value===null)return n;return t.innerType._zod.run(n,o)}}),FP=y(\"$ZodDefault\",(e,t)=>{ge.init(e,t),e._zod.optin=\"optional\",te(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>Xk(i,t));return Xk(r,t)}});function Xk(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var VP=y(\"$ZodPrefault\",(e,t)=>{ge.init(e,t),e._zod.optin=\"optional\",te(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(n,o);if(n.value===void 0)n.value=t.defaultValue;return t.innerType._zod.run(n,o)}}),JP=y(\"$ZodNonOptional\",(e,t)=>{ge.init(e,t),te(e._zod,\"values\",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter((o)=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>Qk(i,e));return Qk(r,e)}});function Qk(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:e.value,inst:t});return e}var BP=y(\"$ZodCatch\",(e,t)=>{ge.init(e,t),e._zod.optin=\"optional\",te(e._zod,\"optout\",()=>t.innerType._zod.optout),te(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>{if(n.value=i.value,i.issues.length)n.value=t.catchValue({...n,error:{issues:i.issues.map((s)=>bt(s,o,dt()))},input:n.value}),n.issues=[],n.fallback=!0;return n});if(n.value=r.value,r.issues.length)n.value=t.catchValue({...n,error:{issues:r.issues.map((i)=>bt(i,o,dt()))},input:n.value}),n.issues=[],n.fallback=!0;return n}});var Gm=y(\"$ZodPipe\",(e,t)=>{ge.init(e,t),te(e._zod,\"values\",()=>t.in._zod.values),te(e._zod,\"optin\",()=>t.in._zod.optin),te(e._zod,\"optout\",()=>t.out._zod.optout),te(e._zod,\"propValues\",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction===\"backward\"){let i=t.out._zod.run(n,o);if(i instanceof Promise)return i.then((s)=>El(s,t.in,o));return El(i,t.in,o)}let r=t.in._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>El(i,t.out,o));return El(r,t.out,o)}});function El(e,t,n){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var HP=y(\"$ZodPreprocess\",(e,t)=>{Gm.init(e,t)}),GP=y(\"$ZodReadonly\",(e,t)=>{ge.init(e,t),te(e._zod,\"propValues\",()=>t.innerType._zod.propValues),te(e._zod,\"values\",()=>t.innerType._zod.values),te(e._zod,\"optin\",()=>t.innerType?._zod?.optin),te(e._zod,\"optout\",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then(eP);return eP(r)}});function eP(e){return e.value=Object.freeze(e.value),e}var WP=y(\"$ZodLazy\",(e,t)=>{ge.init(e,t),te(e._zod,\"innerType\",()=>{let n=t;if(!n._cachedInner)n._cachedInner=t.getter();return n._cachedInner}),te(e._zod,\"pattern\",()=>e._zod.innerType?._zod?.pattern),te(e._zod,\"propValues\",()=>e._zod.innerType?._zod?.propValues),te(e._zod,\"optin\",()=>e._zod.innerType?._zod?.optin??void 0),te(e._zod,\"optout\",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),KP=y(\"$ZodCustom\",(e,t)=>{Ue.init(e,t),ge.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=(n)=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then((i)=>tP(i,n,o,e));tP(r,n,o,e);return}});function tP(e,t,n,o){if(!e){let r={code:\"custom\",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};if(o._zod.def.params)r.params=o._zod.def.params;t.issues.push(To(r))}}var lN=()=>{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\"}};function t(r){return e[r]??null}let n={regex:\"input\",email:\"email address\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO datetime\",date:\"ISO date\",time:\"ISO time\",duration:\"ISO duration\",ipv4:\"IPv4 address\",ipv6:\"IPv6 address\",mac:\"MAC address\",cidrv4:\"IPv4 range\",cidrv6:\"IPv6 range\",base64:\"base64-encoded string\",base64url:\"base64url-encoded string\",json_string:\"JSON string\",e164:\"E.164 number\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=Am(r.input),a=o[s]??s;return`Invalid input: expected ${i}, received ${a}`}case\"invalid_value\":if(r.values.length===1)return`Invalid input: expected ${wl(r.values[0])}`;return`Invalid option: expected one of ${zl(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Too big: expected ${r.origin??\"value\"} to have ${i}${r.maximum.toString()} ${s.unit??\"elements\"}`;return`Too big: expected ${r.origin??\"value\"} to be ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${s.unit}`;return`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Invalid string: must start with \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Invalid string: must end with \"${i.suffix}\"`;if(i.format===\"includes\")return`Invalid string: must include \"${i.includes}\"`;if(i.format===\"regex\")return`Invalid string: must match pattern ${i.pattern}`;return`Invalid ${n[i.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\":\"\"}: ${zl(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)return`Invalid discriminator value. Expected ${r.options.map((s)=>`'${s}'`).join(\" | \")}`;return\"Invalid input\";case\"invalid_element\":return`Invalid value in ${r.origin}`;default:return\"Invalid input\"}}};function Wm(){return{localeError:lN()}}var YP,LD=Symbol(\"ZodOutput\"),qD=Symbol(\"ZodInput\");class XP{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n===\"object\"&&\"id\"in n)this._idmap.set(n.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t===\"object\"&&\"id\"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function dN(){return new XP}(YP=globalThis).__zod_globalRegistry??(YP.__zod_globalRegistry=dN());var hn=globalThis.__zod_globalRegistry;function QP(e,t){return new e({type:\"string\",...L(t)})}function Km(e,t){return new e({type:\"string\",format:\"email\",check:\"string_format\",abort:!1,...L(t)})}function Ym(e,t){return new e({type:\"string\",format:\"guid\",check:\"string_format\",abort:!1,...L(t)})}function eR(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,...L(t)})}function tR(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v4\",...L(t)})}function rR(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v6\",...L(t)})}function nR(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v7\",...L(t)})}function Xm(e,t){return new e({type:\"string\",format:\"url\",check:\"string_format\",abort:!1,...L(t)})}function oR(e,t){return new e({type:\"string\",format:\"emoji\",check:\"string_format\",abort:!1,...L(t)})}function iR(e,t){return new e({type:\"string\",format:\"nanoid\",check:\"string_format\",abort:!1,...L(t)})}function sR(e,t){return new e({type:\"string\",format:\"cuid\",check:\"string_format\",abort:!1,...L(t)})}function aR(e,t){return new e({type:\"string\",format:\"cuid2\",check:\"string_format\",abort:!1,...L(t)})}function cR(e,t){return new e({type:\"string\",format:\"ulid\",check:\"string_format\",abort:!1,...L(t)})}function uR(e,t){return new e({type:\"string\",format:\"xid\",check:\"string_format\",abort:!1,...L(t)})}function lR(e,t){return new e({type:\"string\",format:\"ksuid\",check:\"string_format\",abort:!1,...L(t)})}function dR(e,t){return new e({type:\"string\",format:\"ipv4\",check:\"string_format\",abort:!1,...L(t)})}function pR(e,t){return new e({type:\"string\",format:\"ipv6\",check:\"string_format\",abort:!1,...L(t)})}function mR(e,t){return new e({type:\"string\",format:\"cidrv4\",check:\"string_format\",abort:!1,...L(t)})}function fR(e,t){return new e({type:\"string\",format:\"cidrv6\",check:\"string_format\",abort:!1,...L(t)})}function hR(e,t){return new e({type:\"string\",format:\"base64\",check:\"string_format\",abort:!1,...L(t)})}function gR(e,t){return new e({type:\"string\",format:\"base64url\",check:\"string_format\",abort:!1,...L(t)})}function _R(e,t){return new e({type:\"string\",format:\"e164\",check:\"string_format\",abort:!1,...L(t)})}function vR(e,t){return new e({type:\"string\",format:\"jwt\",check:\"string_format\",abort:!1,...L(t)})}function bR(e,t){return new e({type:\"string\",format:\"datetime\",check:\"string_format\",offset:!1,local:!1,precision:null,...L(t)})}function SR(e,t){return new e({type:\"string\",format:\"date\",check:\"string_format\",...L(t)})}function yR(e,t){return new e({type:\"string\",format:\"time\",check:\"string_format\",precision:null,...L(t)})}function zR(e,t){return new e({type:\"string\",format:\"duration\",check:\"string_format\",...L(t)})}function $R(e,t){return new e({type:\"number\",checks:[],...L(t)})}function xR(e,t){return new e({type:\"number\",check:\"number_format\",abort:!1,format:\"safeint\",...L(t)})}function wR(e,t){return new e({type:\"boolean\",...L(t)})}function kR(e,t){return new e({type:\"null\",...L(t)})}function PR(e){return new e({type:\"unknown\"})}function RR(e,t){return new e({type:\"never\",...L(t)})}function Nl(e,t){return new Lm({check:\"less_than\",...L(t),value:e,inclusive:!1})}function mc(e,t){return new Lm({check:\"less_than\",...L(t),value:e,inclusive:!0})}function Cl(e,t){return new qm({check:\"greater_than\",...L(t),value:e,inclusive:!1})}function fc(e,t){return new qm({check:\"greater_than\",...L(t),value:e,inclusive:!0})}function Zl(e,t){return new Nk({check:\"multiple_of\",...L(t),value:e})}function Al(e,t){return new Zk({check:\"max_length\",...L(t),maximum:e})}function Eo(e,t){return new Ak({check:\"min_length\",...L(t),minimum:e})}function Ul(e,t){return new Uk({check:\"length_equals\",...L(t),length:e})}function Qm(e,t){return new Mk({check:\"string_format\",format:\"regex\",...L(t),pattern:e})}function ef(e){return new Dk({check:\"string_format\",format:\"lowercase\",...L(e)})}function tf(e){return new Lk({check:\"string_format\",format:\"uppercase\",...L(e)})}function rf(e,t){return new qk({check:\"string_format\",format:\"includes\",...L(t),includes:e})}function nf(e,t){return new Fk({check:\"string_format\",format:\"starts_with\",...L(t),prefix:e})}function of(e,t){return new Vk({check:\"string_format\",format:\"ends_with\",...L(t),suffix:e})}function kr(e){return new Jk({check:\"overwrite\",tx:e})}function sf(e){return kr((t)=>t.normalize(e))}function af(){return kr((e)=>e.trim())}function cf(){return kr((e)=>e.toLowerCase())}function uf(){return kr((e)=>e.toUpperCase())}function lf(){return kr((e)=>Em(e))}function IR(e,t,n){return new e({type:\"array\",element:t,...L(n)})}function TR(e,t,n){return new e({type:\"custom\",check:\"custom\",fn:t,...L(n)})}function ER(e,t){let n=pN((o)=>(o.addIssue=(r)=>{if(typeof r===\"string\")o.issues.push(To(r,o.value,n._zod.def));else{let i=r;if(i.fatal)i.continue=!1;i.code??(i.code=\"custom\"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(To(i))}},e(o.value,o)),t);return n}function pN(e,t){let n=new Ue({check:\"custom\",...L(t)});return n._zod.check=e,n}function gc(e){let t=e?.target??\"draft-2020-12\";if(t===\"draft-4\")t=\"draft-04\";if(t===\"draft-7\")t=\"draft-07\";return{processors:e.processors??{},metadataRegistry:e?.metadata??hn,target:t,unrepresentable:e?.unrepresentable??\"throw\",override:e?.override??(()=>{}),io:e?.io??\"output\",counter:0,seen:new Map,cycles:e?.cycles??\"ref\",reused:e?.reused??\"inline\",external:e?.external??void 0}}function pe(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i){if(i.count++,n.schemaPath.includes(e))i.cycle=n.path;return i.schema}let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let l={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else{let f=s.schema,h=t.processors[r.type];if(!h)throw Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);h(e,t,f,l)}let m=e._zod.parent;if(m){if(!s.ref)s.ref=m;pe(m,t,l),t.seen.get(m).isParent=!0}}let c=t.metadataRegistry.get(e);if(c)Object.assign(s.schema,c);if(t.io===\"input\"&&Ge(e))delete s.schema.examples,delete s.schema.default;if(t.io===\"input\"&&\"_prefault\"in s.schema)(o=s.schema).default??(o.default=s.schema._prefault);return delete s.schema._prefault,t.seen.get(e).schema}function _c(e,t){let n=e.seen.get(t);if(!n)throw Error(\"Unprocessed schema. This is a bug in Zod.\");let o=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=o.get(a);if(c&&c!==s[0])throw Error(`Duplicate schema id \"${a}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,s[0])}}let r=(s)=>{let a=e.target===\"draft-2020-12\"?\"$defs\":\"definitions\";if(e.external){let m=e.external.registry.get(s[0])?.id,f=e.external.uri??((z)=>z);if(m)return{ref:f(m)};let h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${f(\"__shared\")}#/${a}/${h}`}}if(s[1]===n)return{ref:\"#\"};let u=`${\"#\"}/${a}/`,l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},i=(s)=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:u}=r(s);if(a.def={...a.schema},u)a.defId=u;let l=a.schema;for(let m in l)delete l[m];l.$ref=c};if(e.cycles===\"throw\")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join(\"/\")}/<root>\n\nSet the \\`cycles\\` parameter to \\`\"ref\"\\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){i(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1){if(e.reused===\"ref\"){i(s);continue}}}}function vc(e,t){let n=e.seen.get(t);if(!n)throw Error(\"Unprocessed schema. This is a bug in Zod.\");let o=(a)=>{let c=e.seen.get(a);if(c.ref===null)return;let u=c.def??c.schema,l={...u},m=c.ref;if(c.ref=null,m){o(m);let h=e.seen.get(m),z=h.schema;if(z.$ref&&(e.target===\"draft-07\"||e.target===\"draft-04\"||e.target===\"openapi-3.0\"))u.allOf=u.allOf??[],u.allOf.push(z);else Object.assign(u,z);if(Object.assign(u,l),a._zod.parent===m)for(let I in u){if(I===\"$ref\"||I===\"allOf\")continue;if(!(I in l))delete u[I]}if(z.$ref&&h.def)for(let I in u){if(I===\"$ref\"||I===\"allOf\")continue;if(I in h.def&&JSON.stringify(u[I])===JSON.stringify(h.def[I]))delete u[I]}}let f=a._zod.parent;if(f&&f!==m){o(f);let h=e.seen.get(f);if(h?.schema.$ref){if(u.$ref=h.schema.$ref,h.def)for(let z in u){if(z===\"$ref\"||z===\"allOf\")continue;if(z in h.def&&JSON.stringify(u[z])===JSON.stringify(h.def[z]))delete u[z]}}}e.override({zodSchema:a,jsonSchema:u,path:c.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);let r={};if(e.target===\"draft-2020-12\")r.$schema=\"https://json-schema.org/draft/2020-12/schema\";else if(e.target===\"draft-07\")r.$schema=\"http://json-schema.org/draft-07/schema#\";else if(e.target===\"draft-04\")r.$schema=\"http://json-schema.org/draft-04/schema#\";else if(e.target===\"openapi-3.0\");if(e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw Error(\"Schema is missing an `id` property\");r.$id=e.external.uri(a)}Object.assign(r,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;if(i!==void 0&&r.id===i)delete r.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let c=a[1];if(c.def&&c.defId){if(c.def.id===c.defId)delete c.def.id;s[c.defId]=c.def}}if(e.external);else if(Object.keys(s).length>0)if(e.target===\"draft-2020-12\")r.$defs=s;else r.definitions=s;try{let a=JSON.parse(JSON.stringify(r));return Object.defineProperty(a,\"~standard\",{value:{...t[\"~standard\"],jsonSchema:{input:hc(t,\"input\",e.processors),output:hc(t,\"output\",e.processors)}},enumerable:!1,writable:!1}),a}catch(a){throw Error(\"Error converting schema to JSON.\")}}function Ge(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type===\"transform\")return!0;if(o.type===\"array\")return Ge(o.element,n);if(o.type===\"set\")return Ge(o.valueType,n);if(o.type===\"lazy\")return Ge(o.getter(),n);if(o.type===\"promise\"||o.type===\"optional\"||o.type===\"nonoptional\"||o.type===\"nullable\"||o.type===\"readonly\"||o.type===\"default\"||o.type===\"prefault\")return Ge(o.innerType,n);if(o.type===\"intersection\")return Ge(o.left,n)||Ge(o.right,n);if(o.type===\"record\"||o.type===\"map\")return Ge(o.keyType,n)||Ge(o.valueType,n);if(o.type===\"pipe\"){if(e._zod.traits.has(\"$ZodCodec\"))return!0;return Ge(o.in,n)||Ge(o.out,n)}if(o.type===\"object\"){for(let r in o.shape)if(Ge(o.shape[r],n))return!0;return!1}if(o.type===\"union\"){for(let r of o.options)if(Ge(r,n))return!0;return!1}if(o.type===\"tuple\"){for(let r of o.items)if(Ge(r,n))return!0;if(o.rest&&Ge(o.rest,n))return!0;return!1}return!1}var OR=(e,t={})=>(n)=>{let o=gc({...n,processors:t});return pe(e,o),_c(o,e),vc(o,e)},hc=(e,t,n={})=>(o)=>{let{libraryOptions:r,target:i}=o??{},s=gc({...r??{},target:i,io:t,processors:n});return pe(e,s),_c(s,e),vc(s,e)};var mN={guid:\"uuid\",url:\"uri\",datetime:\"date-time\",json_string:\"json-string\",regex:\"\"},df=(e,t,n,o)=>{let r=n;r.type=\"string\";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i===\"number\")r.minLength=i;if(typeof s===\"number\")r.maxLength=s;if(a){if(r.format=mN[a]??a,r.format===\"\")delete r.format;if(a===\"time\")delete r.format}if(u)r.contentEncoding=u;if(c&&c.size>0){let l=[...c];if(l.length===1)r.pattern=l[0].source;else if(l.length>1)r.allOf=[...l.map((m)=>({...t.target===\"draft-07\"||t.target===\"draft-04\"||t.target===\"openapi-3.0\"?{type:\"string\"}:{},pattern:m.source}))]}},pf=(e,t,n,o)=>{let r=n,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;if(typeof a===\"string\"&&a.includes(\"int\"))r.type=\"integer\";else r.type=\"number\";let m=typeof l===\"number\"&&l>=(i??Number.NEGATIVE_INFINITY),f=typeof u===\"number\"&&u<=(s??Number.POSITIVE_INFINITY),h=t.target===\"draft-04\"||t.target===\"openapi-3.0\";if(m)if(h)r.minimum=l,r.exclusiveMinimum=!0;else r.exclusiveMinimum=l;else if(typeof i===\"number\")r.minimum=i;if(f)if(h)r.maximum=u,r.exclusiveMaximum=!0;else r.exclusiveMaximum=u;else if(typeof s===\"number\")r.maximum=s;if(typeof c===\"number\")r.multipleOf=c},mf=(e,t,n,o)=>{n.type=\"boolean\"},NR=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"BigInt cannot be represented in JSON Schema\")},CR=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Symbols cannot be represented in JSON Schema\")},ff=(e,t,n,o)=>{if(t.target===\"openapi-3.0\")n.type=\"string\",n.nullable=!0,n.enum=[null];else n.type=\"null\"},ZR=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Undefined cannot be represented in JSON Schema\")},AR=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Void cannot be represented in JSON Schema\")},hf=(e,t,n,o)=>{n.not={}},UR=(e,t,n,o)=>{},gf=(e,t,n,o)=>{},MR=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Date cannot be represented in JSON Schema\")},_f=(e,t,n,o)=>{let r=e._zod.def,i=sc(r.entries);if(i.every((s)=>typeof s===\"number\"))n.type=\"number\";if(i.every((s)=>typeof s===\"string\"))n.type=\"string\";n.enum=i},vf=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable===\"throw\")throw Error(\"Literal `undefined` cannot be represented in JSON Schema\")}else if(typeof s===\"bigint\")if(t.unrepresentable===\"throw\")throw Error(\"BigInt literals cannot be represented in JSON Schema\");else i.push(Number(s));else i.push(s);if(i.length===0);else if(i.length===1){let s=i[0];if(n.type=s===null?\"null\":typeof s,t.target===\"draft-04\"||t.target===\"openapi-3.0\")n.enum=[s];else n.const=s}else{if(i.every((s)=>typeof s===\"number\"))n.type=\"number\";if(i.every((s)=>typeof s===\"string\"))n.type=\"string\";if(i.every((s)=>typeof s===\"boolean\"))n.type=\"boolean\";if(i.every((s)=>s===null))n.type=\"null\";n.enum=i}},DR=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"NaN cannot be represented in JSON Schema\")},LR=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw Error(\"Pattern not found in template literal\");r.type=\"string\",r.pattern=i.source},qR=(e,t,n,o)=>{let r=n,i={type:\"string\",format:\"binary\",contentEncoding:\"binary\"},{minimum:s,maximum:a,mime:c}=e._zod.bag;if(s!==void 0)i.minLength=s;if(a!==void 0)i.maxLength=a;if(c)if(c.length===1)i.contentMediaType=c[0],Object.assign(r,i);else Object.assign(r,i),r.anyOf=c.map((u)=>({contentMediaType:u}));else Object.assign(r,i)},FR=(e,t,n,o)=>{n.type=\"boolean\"},bf=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Custom types cannot be represented in JSON Schema\")},VR=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Function types cannot be represented in JSON Schema\")},Sf=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Transforms cannot be represented in JSON Schema\")},JR=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Map cannot be represented in JSON Schema\")},BR=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Set cannot be represented in JSON Schema\")},yf=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;if(typeof s===\"number\")r.minItems=s;if(typeof a===\"number\")r.maxItems=a;r.type=\"array\",r.items=pe(i.element,t,{...o,path:[...o.path,\"items\"]})},zf=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type=\"object\",r.properties={};let s=i.shape;for(let u in s)r.properties[u]=pe(s[u],t,{...o,path:[...o.path,\"properties\",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter((u)=>{let l=i.shape[u]._zod;if(t.io===\"input\")return l.optin===void 0;else return l.optout===void 0}));if(c.size>0)r.required=Array.from(c);if(i.catchall?._zod.def.type===\"never\")r.additionalProperties=!1;else if(!i.catchall){if(t.io===\"output\")r.additionalProperties=!1}else if(i.catchall)r.additionalProperties=pe(i.catchall,t,{...o,path:[...o.path,\"additionalProperties\"]})},$f=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,s=r.options.map((a,c)=>pe(a,t,{...o,path:[...o.path,i?\"oneOf\":\"anyOf\",c]}));if(i)n.oneOf=s;else n.anyOf=s},xf=(e,t,n,o)=>{let r=e._zod.def,i=pe(r.left,t,{...o,path:[...o.path,\"allOf\",0]}),s=pe(r.right,t,{...o,path:[...o.path,\"allOf\",1]}),a=(u)=>(\"allOf\"in u)&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=c},HR=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type=\"array\";let s=t.target===\"draft-2020-12\"?\"prefixItems\":\"items\",a=t.target===\"draft-2020-12\"?\"items\":t.target===\"openapi-3.0\"?\"items\":\"additionalItems\",c=i.items.map((f,h)=>pe(f,t,{...o,path:[...o.path,s,h]})),u=i.rest?pe(i.rest,t,{...o,path:[...o.path,a,...t.target===\"openapi-3.0\"?[i.items.length]:[]]}):null;if(t.target===\"draft-2020-12\"){if(r.prefixItems=c,u)r.items=u}else if(t.target===\"openapi-3.0\"){if(r.items={anyOf:c},u)r.items.anyOf.push(u);if(r.minItems=c.length,!u)r.maxItems=c.length}else if(r.items=c,u)r.additionalItems=u;let{minimum:l,maximum:m}=e._zod.bag;if(typeof l===\"number\")r.minItems=l;if(typeof m===\"number\")r.maxItems=m},wf=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type=\"object\";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode===\"loose\"&&c&&c.size>0){let l=pe(i.valueType,t,{...o,path:[...o.path,\"patternProperties\",\"*\"]});r.patternProperties={};for(let m of c)r.patternProperties[m.source]=l}else{if(t.target===\"draft-07\"||t.target===\"draft-2020-12\")r.propertyNames=pe(i.keyType,t,{...o,path:[...o.path,\"propertyNames\"]});r.additionalProperties=pe(i.valueType,t,{...o,path:[...o.path,\"additionalProperties\"]})}let u=s._zod.values;if(u){let l=[...u].filter((m)=>typeof m===\"string\"||typeof m===\"number\");if(l.length>0)r.required=l}},kf=(e,t,n,o)=>{let r=e._zod.def,i=pe(r.innerType,t,o),s=t.seen.get(e);if(t.target===\"openapi-3.0\")s.ref=r.innerType,n.nullable=!0;else n.anyOf=[i,{type:\"null\"}]},Pf=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Rf=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},If=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);if(i.ref=r.innerType,t.io===\"input\")n._prefault=JSON.parse(JSON.stringify(r.defaultValue))},Tf=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw Error(\"Dynamic catch values are not supported in JSON Schema\")}n.default=s},Ef=(e,t,n,o)=>{let r=e._zod.def,i=r.in._zod.traits.has(\"$ZodTransform\"),s=t.io===\"input\"?i?r.out:r.in:r.out;pe(s,t,o);let a=t.seen.get(e);a.ref=s},Of=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},GR=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Ml=(e,t,n,o)=>{let r=e._zod.def;pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},jf=(e,t,n,o)=>{let r=e._zod.innerType;pe(r,t,o);let i=t.seen.get(e);i.ref=r},jR={string:df,number:pf,boolean:mf,bigint:NR,symbol:CR,null:ff,undefined:ZR,void:AR,never:hf,any:UR,unknown:gf,date:MR,enum:_f,literal:vf,nan:DR,template_literal:LR,file:qR,success:FR,custom:bf,function:VR,transform:Sf,map:JR,set:BR,array:yf,object:zf,union:$f,intersection:xf,tuple:HR,record:wf,nullable:kf,nonoptional:Pf,default:Rf,prefault:If,catch:Tf,pipe:Ef,readonly:Of,promise:GR,optional:Ml,lazy:jf};function Dl(e,t){if(\"_idmap\"in e){let o=e,r=gc({...t,processors:jR}),i={};for(let c of o._idmap.entries()){let[u,l]=c;pe(l,r)}let s={},a={registry:o,uri:t?.uri,defs:i};r.external=a;for(let c of o._idmap.entries()){let[u,l]=c;_c(r,l),s[u]=vc(r,l)}if(Object.keys(i).length>0){let c=r.target===\"draft-2020-12\"?\"$defs\":\"definitions\";s.__shared={[c]:i}}return{schemas:s}}let n=gc({...t,processors:jR});return pe(e,n),_c(n,e),vc(n,e)}var Pr={};tt(Pr,{ZodISODate:()=>KR,ZodISODateTime:()=>WR,ZodISODuration:()=>XR,ZodISOTime:()=>YR,date:()=>Cf,datetime:()=>Nf,duration:()=>Af,time:()=>Zf});var WR=y(\"ZodISODateTime\",(e,t)=>{mP.init(e,t),xe.init(e,t)});function Nf(e){return bR(WR,e)}var KR=y(\"ZodISODate\",(e,t)=>{fP.init(e,t),xe.init(e,t)});function Cf(e){return SR(KR,e)}var YR=y(\"ZodISOTime\",(e,t)=>{hP.init(e,t),xe.init(e,t)});function Zf(e){return yR(YR,e)}var XR=y(\"ZodISODuration\",(e,t)=>{gP.init(e,t),xe.init(e,t)});function Af(e){return zR(XR,e)}var zN=(e,t)=>{kl.init(e,t),e.name=\"ZodError\",Object.defineProperties(e,{format:{value:(n)=>Gw(e,n)},flatten:{value:(n)=>Hw(e,n)},addIssue:{value:(n)=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ro,2)}},addIssues:{value:(n)=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ro,2)}},isEmpty:{get(){return e.issues.length===0}}})};var pt=y(\"ZodError\",zN,{Parent:Error});var QR=Pl(pt),eI=Rl(pt),Ll=lc(pt),tI=dc(pt),rI=Yw(pt),nI=Xw(pt),oI=Qw(pt),iI=ek(pt),sI=tk(pt),aI=rk(pt),cI=nk(pt),uI=ok(pt);var lI=new WeakMap;function Sc(e,t,n){let o=Object.getPrototypeOf(e),r=lI.get(o);if(!r)r=new Set,lI.set(o,r);if(r.has(t))return;r.add(t);for(let i in n){let s=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}var be=y(\"ZodType\",(e,t)=>(ge.init(e,t),Object.assign(e[\"~standard\"],{jsonSchema:{input:hc(e,\"input\"),output:hc(e,\"output\")}}),e.toJSONSchema=OR(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,\"_def\",{value:t}),e.parse=(n,o)=>QR(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Ll(e,n,o),e.parseAsync=async(n,o)=>eI(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>tI(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>rI(e,n,o),e.decode=(n,o)=>nI(e,n,o),e.encodeAsync=async(n,o)=>oI(e,n,o),e.decodeAsync=async(n,o)=>iI(e,n,o),e.safeEncode=(n,o)=>sI(e,n,o),e.safeDecode=(n,o)=>aI(e,n,o),e.safeEncodeAsync=async(n,o)=>cI(e,n,o),e.safeDecodeAsync=async(n,o)=>uI(e,n,o),Sc(e,\"ZodType\",{check(...n){let o=this.def;return this.clone(oe.mergeDefs(o,{checks:[...o.checks??[],...n.map((r)=>typeof r===\"function\"?{_zod:{check:r,def:{check:\"custom\"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return wt(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(pC(n,o))},superRefine(n,o){return this.check(mC(n,o))},overwrite(n){return this.check(kr(n))},optional(){return G(this)},exactOptional(){return XN(this)},nullable(){return fI(this)},nullish(){return G(fI(this))},nonoptional(n){return oC(this,n)},array(){return O(this)},or(n){return F([this,n])},and(n){return Oo(this,n)},transform(n){return hI(this,xI(n))},default(n){return tC(this,n)},prefault(n){return nC(this,n)},catch(n){return sC(this,n)},pipe(n){return hI(this,n)},readonly(){return uC(this)},describe(n){let o=this.clone();return hn.add(o,{description:n}),o},meta(...n){if(n.length===0)return hn.get(this);let o=this.clone();return hn.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,\"description\",{get(){return hn.get(e)?.description},configurable:!0}),e)),gI=y(\"_ZodString\",(e,t)=>{jl.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>df(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Sc(e,\"_ZodString\",{regex(...o){return this.check(Qm(...o))},includes(...o){return this.check(rf(...o))},startsWith(...o){return this.check(nf(...o))},endsWith(...o){return this.check(of(...o))},min(...o){return this.check(Eo(...o))},max(...o){return this.check(Al(...o))},length(...o){return this.check(Ul(...o))},nonempty(...o){return this.check(Eo(1,...o))},lowercase(o){return this.check(ef(o))},uppercase(o){return this.check(tf(o))},trim(){return this.check(af())},normalize(...o){return this.check(sf(...o))},toLowerCase(){return this.check(cf())},toUpperCase(){return this.check(uf())},slugify(){return this.check(lf())}})}),xN=y(\"ZodString\",(e,t)=>{jl.init(e,t),gI.init(e,t),e.email=(n)=>e.check(Km(_I,n)),e.url=(n)=>e.check(Xm(bI,n)),e.jwt=(n)=>e.check(vR(MN,n)),e.emoji=(n)=>e.check(oR(wN,n)),e.guid=(n)=>e.check(Ym(dI,n)),e.uuid=(n)=>e.check(eR(ql,n)),e.uuidv4=(n)=>e.check(tR(ql,n)),e.uuidv6=(n)=>e.check(rR(ql,n)),e.uuidv7=(n)=>e.check(nR(ql,n)),e.nanoid=(n)=>e.check(iR(kN,n)),e.guid=(n)=>e.check(Ym(dI,n)),e.cuid=(n)=>e.check(sR(PN,n)),e.cuid2=(n)=>e.check(aR(RN,n)),e.ulid=(n)=>e.check(cR(IN,n)),e.base64=(n)=>e.check(hR(ZN,n)),e.base64url=(n)=>e.check(gR(AN,n)),e.xid=(n)=>e.check(uR(TN,n)),e.ksuid=(n)=>e.check(lR(EN,n)),e.ipv4=(n)=>e.check(dR(ON,n)),e.ipv6=(n)=>e.check(pR(jN,n)),e.cidrv4=(n)=>e.check(mR(NN,n)),e.cidrv6=(n)=>e.check(fR(CN,n)),e.e164=(n)=>e.check(_R(UN,n)),e.datetime=(n)=>e.check(Nf(n)),e.date=(n)=>e.check(Cf(n)),e.time=(n)=>e.check(Zf(n)),e.duration=(n)=>e.check(Af(n))});function d(e){return QP(xN,e)}var xe=y(\"ZodStringFormat\",(e,t)=>{ve.init(e,t),gI.init(e,t)}),_I=y(\"ZodEmail\",(e,t)=>{oP.init(e,t),xe.init(e,t)});function vI(e){return Km(_I,e)}var dI=y(\"ZodGUID\",(e,t)=>{rP.init(e,t),xe.init(e,t)});var ql=y(\"ZodUUID\",(e,t)=>{nP.init(e,t),xe.init(e,t)});var bI=y(\"ZodURL\",(e,t)=>{iP.init(e,t),xe.init(e,t)});function SI(e){return Xm(bI,e)}var wN=y(\"ZodEmoji\",(e,t)=>{sP.init(e,t),xe.init(e,t)});var kN=y(\"ZodNanoID\",(e,t)=>{aP.init(e,t),xe.init(e,t)});var PN=y(\"ZodCUID\",(e,t)=>{cP.init(e,t),xe.init(e,t)});var RN=y(\"ZodCUID2\",(e,t)=>{uP.init(e,t),xe.init(e,t)});var IN=y(\"ZodULID\",(e,t)=>{lP.init(e,t),xe.init(e,t)});var TN=y(\"ZodXID\",(e,t)=>{dP.init(e,t),xe.init(e,t)});var EN=y(\"ZodKSUID\",(e,t)=>{pP.init(e,t),xe.init(e,t)});var ON=y(\"ZodIPv4\",(e,t)=>{_P.init(e,t),xe.init(e,t)});var jN=y(\"ZodIPv6\",(e,t)=>{vP.init(e,t),xe.init(e,t)});var NN=y(\"ZodCIDRv4\",(e,t)=>{bP.init(e,t),xe.init(e,t)});var CN=y(\"ZodCIDRv6\",(e,t)=>{SP.init(e,t),xe.init(e,t)});var ZN=y(\"ZodBase64\",(e,t)=>{zP.init(e,t),xe.init(e,t)});var AN=y(\"ZodBase64URL\",(e,t)=>{$P.init(e,t),xe.init(e,t)});var UN=y(\"ZodE164\",(e,t)=>{xP.init(e,t),xe.init(e,t)});var MN=y(\"ZodJWT\",(e,t)=>{wP.init(e,t),xe.init(e,t)});var yI=y(\"ZodNumber\",(e,t)=>{Jm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>pf(e,o,r,i),Sc(e,\"ZodNumber\",{gt(o,r){return this.check(Cl(o,r))},gte(o,r){return this.check(fc(o,r))},min(o,r){return this.check(fc(o,r))},lt(o,r){return this.check(Nl(o,r))},lte(o,r){return this.check(mc(o,r))},max(o,r){return this.check(mc(o,r))},int(o){return this.check(pI(o))},safe(o){return this.check(pI(o))},positive(o){return this.check(Cl(0,o))},nonnegative(o){return this.check(fc(0,o))},negative(o){return this.check(Nl(0,o))},nonpositive(o){return this.check(mc(0,o))},multipleOf(o,r){return this.check(Zl(o,r))},step(o,r){return this.check(Zl(o,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??\"\").includes(\"int\")||Number.isSafeInteger(n.multipleOf??0.5),e.isFinite=!0,e.format=n.format??null});function Z(e){return $R(yI,e)}var DN=y(\"ZodNumberFormat\",(e,t)=>{kP.init(e,t),yI.init(e,t)});function pI(e){return xR(DN,e)}var LN=y(\"ZodBoolean\",(e,t)=>{PP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mf(e,n,o,r)});function H(e){return wR(LN,e)}var qN=y(\"ZodNull\",(e,t)=>{RP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ff(e,n,o,r)});function Fl(e){return kR(qN,e)}var FN=y(\"ZodUnknown\",(e,t)=>{IP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gf(e,n,o,r)});function B(){return PR(FN)}var VN=y(\"ZodNever\",(e,t)=>{TP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hf(e,n,o,r)});function JN(e){return RR(VN,e)}var BN=y(\"ZodArray\",(e,t)=>{EP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yf(e,n,o,r),e.element=t.element,Sc(e,\"ZodArray\",{min(n,o){return this.check(Eo(n,o))},nonempty(n){return this.check(Eo(1,n))},max(n,o){return this.check(Al(n,o))},length(n,o){return this.check(Ul(n,o))},unwrap(){return this.element}})});function O(e,t){return IR(BN,e,t)}var zI=y(\"ZodObject\",(e,t)=>{NP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>zf(e,n,o,r),oe.defineLazy(e,\"shape\",()=>t.shape),Sc(e,\"ZodObject\",{keyof(){return re(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:B()})},loose(){return this.clone({...this._zod.def,catchall:B()})},strict(){return this.clone({...this._zod.def,catchall:JN()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return oe.extend(this,n)},safeExtend(n){return oe.safeExtend(this,n)},merge(n){return oe.merge(this,n)},pick(n){return oe.pick(this,n)},omit(n){return oe.omit(this,n)},partial(...n){return oe.partial(wI,this,n[0])},required(...n){return oe.required(kI,this,n[0])}})});function b(e,t){let n={type:\"object\",shape:e??{},...oe.normalizeParams(t)};return new zI(n)}function Y(e,t){return new zI({type:\"object\",shape:e,catchall:B(),...oe.normalizeParams(t)})}var $I=y(\"ZodUnion\",(e,t)=>{Bm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>$f(e,n,o,r),e.options=t.options});function F(e,t){return new $I({type:\"union\",options:e,...oe.normalizeParams(t)})}var HN=y(\"ZodDiscriminatedUnion\",(e,t)=>{$I.init(e,t),CP.init(e,t)});function Mf(e,t,n){return new HN({type:\"union\",options:t,discriminator:e,...oe.normalizeParams(n)})}var GN=y(\"ZodIntersection\",(e,t)=>{ZP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xf(e,n,o,r)});function Oo(e,t){return new GN({type:\"intersection\",left:e,right:t})}var mI=y(\"ZodRecord\",(e,t)=>{AP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>wf(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function D(e,t,n){if(!t||!t._zod)return new mI({type:\"record\",keyType:d(),valueType:e,...oe.normalizeParams(t)});return new mI({type:\"record\",keyType:e,valueType:t,...oe.normalizeParams(n)})}var Uf=y(\"ZodEnum\",(e,t)=>{UP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>_f(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let s of o)if(n.has(s))i[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new Uf({...t,checks:[],...oe.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let s of o)if(n.has(s))delete i[s];else throw Error(`Key ${s} not found in enum`);return new Uf({...t,checks:[],...oe.normalizeParams(r),entries:i})}});function re(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map((o)=>[o,o])):e;return new Uf({type:\"enum\",entries:n,...oe.normalizeParams(t)})}var WN=y(\"ZodLiteral\",(e,t)=>{MP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vf(e,n,o,r),e.values=new Set(t.values),Object.defineProperty(e,\"value\",{get(){if(t.values.length>1)throw Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");return t.values[0]}})});function P(e,t){return new WN({type:\"literal\",values:Array.isArray(e)?e:[e],...oe.normalizeParams(t)})}var KN=y(\"ZodTransform\",(e,t)=>{DP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sf(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")throw new oc(e.constructor.name);n.addIssue=(i)=>{if(typeof i===\"string\")n.issues.push(oe.issue(i,n.value,t));else{let s=i;if(s.fatal)s.continue=!1;s.code??(s.code=\"custom\"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(oe.issue(s))}};let r=t.transform(n.value,n);if(r instanceof Promise)return r.then((i)=>(n.value=i,n.fallback=!0,n));return n.value=r,n.fallback=!0,n}});function xI(e){return new KN({type:\"transform\",transform:e})}var wI=y(\"ZodOptional\",(e,t)=>{Hm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ml(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function G(e){return new wI({type:\"optional\",innerType:e})}var YN=y(\"ZodExactOptional\",(e,t)=>{LP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ml(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function XN(e){return new YN({type:\"optional\",innerType:e})}var QN=y(\"ZodNullable\",(e,t)=>{qP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>kf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function fI(e){return new QN({type:\"nullable\",innerType:e})}var eC=y(\"ZodDefault\",(e,t)=>{FP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function tC(e,t){return new eC({type:\"default\",innerType:e,get defaultValue(){return typeof t===\"function\"?t():oe.shallowClone(t)}})}var rC=y(\"ZodPrefault\",(e,t)=>{VP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>If(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function nC(e,t){return new rC({type:\"prefault\",innerType:e,get defaultValue(){return typeof t===\"function\"?t():oe.shallowClone(t)}})}var kI=y(\"ZodNonOptional\",(e,t)=>{JP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Pf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function oC(e,t){return new kI({type:\"nonoptional\",innerType:e,...oe.normalizeParams(t)})}var iC=y(\"ZodCatch\",(e,t)=>{BP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Tf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function sC(e,t){return new iC({type:\"catch\",innerType:e,catchValue:typeof t===\"function\"?t:()=>t})}var PI=y(\"ZodPipe\",(e,t)=>{Gm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ef(e,n,o,r),e.in=t.in,e.out=t.out});function hI(e,t){return new PI({type:\"pipe\",in:e,out:t})}var aC=y(\"ZodPreprocess\",(e,t)=>{PI.init(e,t),HP.init(e,t)}),cC=y(\"ZodReadonly\",(e,t)=>{GP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Of(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function uC(e){return new cC({type:\"readonly\",innerType:e})}var lC=y(\"ZodLazy\",(e,t)=>{WP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>jf(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function Df(e){return new lC({type:\"lazy\",getter:e})}var dC=y(\"ZodCustom\",(e,t)=>{KP.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bf(e,n,o,r)});function pC(e,t={}){return TR(dC,e,t)}function mC(e,t){return ER(e,t)}function Vl(e,t){return new aC({type:\"pipe\",in:xI(e),out:t})}dt(Wm());var Bf=Symbol.for(\"mcp.sdk.errorBrands\");function _n(e,t){let n=new Set,o=t;while(typeof o===\"function\"){let r=o.mcpBrand;if(Object.prototype.hasOwnProperty.call(o,\"mcpBrand\")&&typeof r===\"string\")n.add(r);o=Object.getPrototypeOf(o)}if(n.size===0)return;Object.defineProperty(e,Bf,{value:n,enumerable:!1,configurable:!0})}function mt(e,t){try{if(typeof t===\"object\"&&t!==null&&Object.prototype.hasOwnProperty.call(e,\"mcpBrand\")&&typeof e.mcpBrand===\"string\"&&Object.prototype.hasOwnProperty.call(t,Bf)){let n=t[Bf];if(n&&typeof n.has===\"function\"&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var fC=class e extends Error{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.OAuthError\"})}static[Symbol.hasInstance](t){return mt(this,t)}static isInstance(t){if(typeof this!==\"function\")throw TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");return mt(this,t)}constructor(t,n,o){super(n);this.code=t,this.errorUri=o,this.name=\"OAuthError\",_n(this,new.target)}toResponseObject(){let t={error:this.code,error_description:this.message};if(this.errorUri)t.error_uri=this.errorUri;return t}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},Me=function(e){return e.NotConnected=\"NOT_CONNECTED\",e.AlreadyConnected=\"ALREADY_CONNECTED\",e.NotInitialized=\"NOT_INITIALIZED\",e.CapabilityNotSupported=\"CAPABILITY_NOT_SUPPORTED\",e.RequestTimeout=\"REQUEST_TIMEOUT\",e.ConnectionClosed=\"CONNECTION_CLOSED\",e.SendFailed=\"SEND_FAILED\",e.InvalidResult=\"INVALID_RESULT\",e.UnsupportedResultType=\"UNSUPPORTED_RESULT_TYPE\",e.InputRequiredRoundsExceeded=\"INPUT_REQUIRED_ROUNDS_EXCEEDED\",e.ListPaginationExceeded=\"LIST_PAGINATION_EXCEEDED\",e.MethodNotSupportedByProtocolVersion=\"METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION\",e.EraNegotiationFailed=\"ERA_NEGOTIATION_FAILED\",e.ClientHttpNotImplemented=\"CLIENT_HTTP_NOT_IMPLEMENTED\",e.ClientHttpAuthentication=\"CLIENT_HTTP_AUTHENTICATION\",e.ClientHttpForbidden=\"CLIENT_HTTP_FORBIDDEN\",e.ClientHttpUnexpectedContent=\"CLIENT_HTTP_UNEXPECTED_CONTENT\",e.ClientHttpFailedToOpenStream=\"CLIENT_HTTP_FAILED_TO_OPEN_STREAM\",e.ClientHttpFailedToTerminateSession=\"CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION\",e}({}),je=class extends Error{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.SdkError\"})}static[Symbol.hasInstance](e){return mt(this,e)}static isInstance(e){if(typeof this!==\"function\")throw TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");return mt(this,e)}constructor(e,t,n){super(t);this.code=e,this.data=n,this.name=\"SdkError\",_n(this,new.target)}},hC=class extends je{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.SdkHttpError\"})}constructor(e,t,n){super(e,t,n);this.name=\"SdkHttpError\"}get status(){return this.data.status}get statusText(){return this.data.statusText}};var gC=\"2026-07-28\";function UI(e){return e>=gC}function MI(e){let t=e.structuredContent;if(t===void 0)return e;if(!(typeof t!==\"object\"||t===null||Array.isArray(t)))return e;if(e.content?.some((n)=>n.type===\"text\")??!1)return e;return{...e,content:[...e.content??[],{type:\"text\",text:JSON.stringify(t)}]}}var DI=[\"task\",\"inputRequests\",\"requestState\"];function _C(e){if(e===null||typeof e!==\"object\"||Array.isArray(e)||e.content!==void 0||DI.some((t)=>(t in e)))return e;return{...e,content:[]}}function vC(){let e=Df(()=>F([d(),Z(),H(),Fl(),D(d(),e),O(e)])),t=D(d(),e),n=F([d(),Z().int()]),o=d(),r=b({ttl:Z().optional()}),i=b({taskId:d()}),s=Y({progressToken:n.optional(),\"io.modelcontextprotocol/related-task\":i.optional()}),a=b({_meta:s.optional()}),c=a.extend({task:r.optional()}),u=b({method:d(),params:a.loose().optional()}),l=b({_meta:s.optional()}),m=b({method:d(),params:l.loose().optional()}),f=Y({_meta:s.optional()}),h=F([d(),Z().int()]),z=f.strict(),C=l.extend({requestId:h.optional(),reason:d().optional()}),I=m.extend({method:P(\"notifications/cancelled\"),params:C}),X=b({src:d(),mimeType:d().optional(),sizes:O(d()).optional(),theme:re([\"light\",\"dark\"]).optional()}),fe=b({icons:O(X).optional()}),q=b({name:d(),title:d().optional()}),E=q.extend({...q.shape,...fe.shape,version:d(),websiteUrl:d().optional(),description:d().optional()}),U=Oo(b({applyDefaults:H().optional()}),t),ie=Vl((Fe)=>{if(Fe&&typeof Fe===\"object\"&&!Array.isArray(Fe)&&Object.keys(Fe).length===0)return{form:{}};return Fe},Oo(b({form:U.optional(),url:t.optional()}),t.optional())),Se=Y({list:t.optional(),cancel:t.optional(),requests:Y({sampling:Y({createMessage:t.optional()}).optional(),elicitation:Y({create:t.optional()}).optional()}).optional()}),at=Y({list:t.optional(),cancel:t.optional(),requests:Y({tools:Y({call:t.optional()}).optional()}).optional()}),Be=b({experimental:D(d(),t).optional(),sampling:b({context:t.optional(),tools:t.optional()}).optional(),elicitation:ie.optional(),roots:b({listChanged:H().optional()}).optional(),tasks:Se.optional(),extensions:D(d(),t).optional()}),ir=a.extend({protocolVersion:d(),capabilities:Be,clientInfo:E}),Ar=u.extend({method:P(\"initialize\"),params:ir}),li=b({experimental:D(d(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:b({listChanged:H().optional()}).optional(),resources:b({subscribe:H().optional(),listChanged:H().optional()}).optional(),tools:b({listChanged:H().optional()}).optional(),tasks:at.optional(),extensions:D(d(),t).optional()}),di=f.extend({protocolVersion:d(),capabilities:li,serverInfo:E,instructions:d().optional()}),Rn=m.extend({method:P(\"notifications/initialized\"),params:l.optional()}),sr=u.extend({method:P(\"ping\"),params:a.optional()}),Ur=b({progress:Z(),total:G(Z()),message:G(d())}),Pt=b({...l.shape,...Ur.shape,progressToken:n}),ar=m.extend({method:P(\"notifications/progress\"),params:Pt}),In=a.extend({cursor:o.optional()}),Mt=u.extend({params:In.optional()}),Dt=f.extend({nextCursor:o.optional()}),Tn=b({uri:d(),mimeType:G(d()),_meta:D(d(),B()).optional()}),En=Tn.extend({text:d()}),Mr=d().refine((Fe)=>{try{return atob(Fe),!0}catch{return!1}},{message:\"Invalid Base64 string\"}),On=Tn.extend({blob:Mr}),Rt=re([\"user\",\"assistant\"]),yt=b({audience:O(Rt).optional(),priority:Z().min(0).max(1).optional(),lastModified:Pr.datetime({offset:!0}).optional()}),Dr=b({...q.shape,...fe.shape,uri:d(),description:G(d()),mimeType:G(d()),size:G(Z()),annotations:yt.optional(),_meta:G(Y({}))}),pi=b({...q.shape,...fe.shape,uriTemplate:d(),description:G(d()),mimeType:G(d()),annotations:yt.optional(),_meta:G(Y({}))}),mi=Mt.extend({method:P(\"resources/list\")}),fi=Dt.extend({resources:O(Dr)}),cr=Mt.extend({method:P(\"resources/templates/list\")}),jn=Dt.extend({resourceTemplates:O(pi)}),Lr=a.extend({uri:d()}),hi=Lr,gi=u.extend({method:P(\"resources/read\"),params:hi}),_i=f.extend({contents:O(F([En,On]))}),vi=m.extend({method:P(\"notifications/resources/list_changed\"),params:l.optional()}),bi=Lr,Si=u.extend({method:P(\"resources/subscribe\"),params:bi}),yi=Lr,zi=u.extend({method:P(\"resources/unsubscribe\"),params:yi}),$i=l.extend({uri:d()}),xi=m.extend({method:P(\"notifications/resources/updated\"),params:$i}),wi=b({name:d(),description:G(d()),required:G(H())}),ki=b({...q.shape,...fe.shape,description:G(d()),arguments:G(O(wi)),_meta:G(Y({}))}),Pi=Mt.extend({method:P(\"prompts/list\")}),Ri=Dt.extend({prompts:O(ki)}),Ii=a.extend({name:d(),arguments:D(d(),d()).optional()}),Ti=u.extend({method:P(\"prompts/get\"),params:Ii}),qr=b({type:P(\"text\"),text:d(),annotations:yt.optional(),_meta:D(d(),B()).optional()}),Fr=b({type:P(\"image\"),data:Mr,mimeType:d(),annotations:yt.optional(),_meta:D(d(),B()).optional()}),Vr=b({type:P(\"audio\"),data:Mr,mimeType:d(),annotations:yt.optional(),_meta:D(d(),B()).optional()}),Ei=b({type:P(\"tool_use\"),name:d(),id:d(),input:D(d(),B()),_meta:D(d(),B()).optional()}),ur=b({type:P(\"resource\"),resource:F([En,On]),annotations:yt.optional(),_meta:D(d(),B()).optional()}),Oi=Dr.extend({type:P(\"resource_link\")}),gt=F([qr,Fr,Vr,Oi,ur]),Nn=b({role:Rt,content:gt}),Cn=f.extend({description:d().optional(),messages:O(Nn)}),Jr=m.extend({method:P(\"notifications/prompts/list_changed\"),params:l.optional()}),ji=b({title:d().optional(),readOnlyHint:H().optional(),destructiveHint:H().optional(),idempotentHint:H().optional(),openWorldHint:H().optional()}),Zn=b({taskSupport:re([\"required\",\"optional\",\"forbidden\"]).optional()}),Br=b({...q.shape,...fe.shape,description:d().optional(),inputSchema:b({type:P(\"object\"),properties:D(d(),e).optional(),required:O(d()).optional()}).catchall(B()),outputSchema:b({type:P(\"object\"),properties:D(d(),e).optional(),required:O(d()).optional()}).catchall(B()).optional(),annotations:ji.optional(),execution:Zn.optional(),_meta:D(d(),B()).optional()}),An=Mt.extend({method:P(\"tools/list\")}),Un=Dt.extend({tools:O(Br)}),Mn=f.extend({content:O(gt),structuredContent:D(d(),B()).optional(),isError:H().optional()}),qe=c.extend({name:d(),arguments:D(d(),B()).optional()}),Ni=u.extend({method:P(\"tools/call\"),params:qe}),pu=m.extend({method:P(\"notifications/tools/list_changed\"),params:l.optional()}),Dn=re([\"debug\",\"info\",\"notice\",\"warning\",\"error\",\"critical\",\"alert\",\"emergency\"]),Ci=a.extend({level:Dn}),Zi=u.extend({method:P(\"logging/setLevel\"),params:Ci}),Ai=l.extend({level:Dn,logger:d().optional(),data:B()}),Ui=m.extend({method:P(\"notifications/message\"),params:Ai}),Mi=b({name:d().optional()}),Di=b({hints:O(Mi).optional(),costPriority:Z().min(0).max(1).optional(),speedPriority:Z().min(0).max(1).optional(),intelligencePriority:Z().min(0).max(1).optional()}),Li=b({mode:re([\"auto\",\"required\",\"none\"]).optional()}),mu=b({type:P(\"tool_result\"),toolUseId:d().describe(\"The unique identifier for the corresponding tool call.\"),content:O(gt),structuredContent:b({}).loose().optional(),isError:H().optional(),_meta:D(d(),B()).optional()}),qi=Mf(\"type\",[qr,Fr,Vr]),lr=Mf(\"type\",[qr,Fr,Vr,Ei,mu]),Fi=b({role:Rt,content:F([lr,O(lr)]),_meta:D(d(),B()).optional()}),Vi=c.extend({messages:O(Fi),modelPreferences:Di.optional(),systemPrompt:d().optional(),includeContext:re([\"none\",\"thisServer\",\"allServers\"]).optional(),temperature:Z().optional(),maxTokens:Z().int(),stopSequences:O(d()).optional(),metadata:t.optional(),tools:O(Br).optional(),toolChoice:Li.optional()}),Ji=u.extend({method:P(\"sampling/createMessage\"),params:Vi}),Bi=f.extend({model:d(),stopReason:G(re([\"endTurn\",\"stopSequence\",\"maxTokens\"]).or(d())),role:Rt,content:qi}),Hi=f.extend({model:d(),stopReason:G(re([\"endTurn\",\"stopSequence\",\"maxTokens\",\"toolUse\"]).or(d())),role:Rt,content:F([lr,O(lr)])}),Gi=b({type:P(\"boolean\"),title:d().optional(),description:d().optional(),default:H().optional()}),Wi=b({type:P(\"string\"),title:d().optional(),description:d().optional(),minLength:Z().optional(),maxLength:Z().optional(),format:re([\"email\",\"uri\",\"date\",\"date-time\"]).optional(),default:d().optional()}),Ki=b({type:re([\"number\",\"integer\"]),title:d().optional(),description:d().optional(),minimum:Z().optional(),maximum:Z().optional(),default:Z().optional()}),Yi=b({type:P(\"string\"),title:d().optional(),description:d().optional(),enum:O(d()),default:d().optional()}),Xi=b({type:P(\"string\"),title:d().optional(),description:d().optional(),oneOf:O(b({const:d(),title:d()})),default:d().optional()}),Qi=b({type:P(\"string\"),title:d().optional(),description:d().optional(),enum:O(d()),enumNames:O(d()).optional(),default:d().optional()}),es=F([Yi,Xi]),Hr=b({type:P(\"array\"),title:d().optional(),description:d().optional(),minItems:Z().optional(),maxItems:Z().optional(),items:b({type:P(\"string\"),enum:O(d())}),default:O(d()).optional()}),Gr=b({type:P(\"array\"),title:d().optional(),description:d().optional(),minItems:Z().optional(),maxItems:Z().optional(),items:b({anyOf:O(b({const:d(),title:d()}))}),default:O(d()).optional()}),fu=F([Hr,Gr]),hu=F([Qi,es,fu]),ct=F([hu,Gi,Wi,Ki]),ut=c.extend({mode:P(\"form\").optional(),message:d(),requestedSchema:b({type:P(\"object\"),properties:D(d(),ct),required:O(d()).optional()}).catchall(B())}),ts=c.extend({mode:P(\"url\"),message:d(),elicitationId:d(),url:d().url()}),zt=F([ut,ts]),gu=u.extend({method:P(\"elicitation/create\"),params:zt}),_u=l.extend({elicitationId:d()}),vu=m.extend({method:P(\"notifications/elicitation/complete\"),params:_u}),bu=f.extend({action:re([\"accept\",\"decline\",\"cancel\"]),content:Vl((Fe)=>Fe===null?void 0:Fe,D(d(),F([d(),Z(),H(),O(d())])).optional())}),Su=b({type:P(\"ref/resource\"),uri:d()}),yu=b({type:P(\"ref/prompt\"),name:d()}),zu=a.extend({ref:F([yu,Su]),argument:b({name:d(),value:d()}),context:b({arguments:D(d(),d()).optional()}).optional()}),rs=u.extend({method:P(\"completion/complete\"),params:zu}),$u=f.extend({completion:Y({values:O(d()).max(100),total:G(Z().int()),hasMore:G(H())})}),xu=b({uri:d().startsWith(\"file://\"),name:d().optional(),_meta:D(d(),B()).optional()}),Ln=u.extend({method:P(\"roots/list\"),params:a.optional()}),ns=f.extend({roots:O(xu)}),wu=m.extend({method:P(\"notifications/roots/list_changed\"),params:l.optional()}),ku=Y({ttl:Z().optional(),pollInterval:Z().optional()}),Pu=re([\"working\",\"input_required\",\"completed\",\"failed\",\"cancelled\"]),dr=b({taskId:d(),status:Pu,ttl:F([Z(),Fl()]),createdAt:d(),lastUpdatedAt:d(),pollInterval:G(Z()),statusMessage:G(d())}),Qe=f.extend({task:dr}),Ru=l.merge(dr),Wr=m.extend({method:P(\"notifications/tasks/status\"),params:Ru}),qn=u.extend({method:P(\"tasks/get\"),params:a.extend({taskId:d()})}),Fn=f.merge(dr),Vn=u.extend({method:P(\"tasks/result\"),params:a.extend({taskId:d()})}),Ip=f.loose(),et=Mt.extend({method:P(\"tasks/list\")}),Ee=Dt.extend({tasks:O(dr)}),Kr=u.extend({method:P(\"tasks/cancel\"),params:a.extend({taskId:d()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,TaskMetadataSchema:r,RelatedTaskMetadataSchema:i,RequestMetaSchema:s,BaseRequestParamsSchema:a,TaskAugmentedRequestParamsSchema:c,RequestSchema:u,NotificationsParamsSchema:l,NotificationSchema:m,ResultSchema:f,RequestIdSchema:h,EmptyResultSchema:z,CancelledNotificationParamsSchema:C,CancelledNotificationSchema:I,IconSchema:X,IconsSchema:fe,BaseMetadataSchema:q,ImplementationSchema:E,ClientTasksCapabilitySchema:Se,ServerTasksCapabilitySchema:at,ClientCapabilitiesSchema:Be,InitializeRequestParamsSchema:ir,InitializeRequestSchema:Ar,ServerCapabilitiesSchema:li,InitializeResultSchema:di,InitializedNotificationSchema:Rn,PingRequestSchema:sr,ProgressSchema:Ur,ProgressNotificationParamsSchema:Pt,ProgressNotificationSchema:ar,PaginatedRequestParamsSchema:In,PaginatedRequestSchema:Mt,PaginatedResultSchema:Dt,ResourceContentsSchema:Tn,TextResourceContentsSchema:En,BlobResourceContentsSchema:On,RoleSchema:Rt,AnnotationsSchema:yt,ResourceSchema:Dr,ResourceTemplateSchema:pi,ListResourcesRequestSchema:mi,ListResourcesResultSchema:fi,ListResourceTemplatesRequestSchema:cr,ListResourceTemplatesResultSchema:jn,ResourceRequestParamsSchema:Lr,ReadResourceRequestParamsSchema:hi,ReadResourceRequestSchema:gi,ReadResourceResultSchema:_i,ResourceListChangedNotificationSchema:vi,SubscribeRequestParamsSchema:bi,SubscribeRequestSchema:Si,UnsubscribeRequestParamsSchema:yi,UnsubscribeRequestSchema:zi,ResourceUpdatedNotificationParamsSchema:$i,ResourceUpdatedNotificationSchema:xi,PromptArgumentSchema:wi,PromptSchema:ki,ListPromptsRequestSchema:Pi,ListPromptsResultSchema:Ri,GetPromptRequestParamsSchema:Ii,GetPromptRequestSchema:Ti,TextContentSchema:qr,ImageContentSchema:Fr,AudioContentSchema:Vr,ToolUseContentSchema:Ei,EmbeddedResourceSchema:ur,ResourceLinkSchema:Oi,ContentBlockSchema:gt,PromptMessageSchema:Nn,GetPromptResultSchema:Cn,PromptListChangedNotificationSchema:Jr,ToolAnnotationsSchema:ji,ToolExecutionSchema:Zn,ToolSchema:Br,ListToolsRequestSchema:An,ListToolsResultSchema:Un,CallToolResultSchema:Mn,CallToolRequestParamsSchema:qe,CallToolRequestSchema:Ni,ToolListChangedNotificationSchema:pu,LoggingLevelSchema:Dn,SetLevelRequestParamsSchema:Ci,SetLevelRequestSchema:Zi,LoggingMessageNotificationParamsSchema:Ai,LoggingMessageNotificationSchema:Ui,ModelHintSchema:Mi,ModelPreferencesSchema:Di,ToolChoiceSchema:Li,ToolResultContentSchema:mu,SamplingContentSchema:qi,SamplingMessageContentBlockSchema:lr,SamplingMessageSchema:Fi,CreateMessageRequestParamsSchema:Vi,CreateMessageRequestSchema:Ji,CreateMessageResultSchema:Bi,CreateMessageResultWithToolsSchema:Hi,BooleanSchemaSchema:Gi,StringSchemaSchema:Wi,NumberSchemaSchema:Ki,UntitledSingleSelectEnumSchemaSchema:Yi,TitledSingleSelectEnumSchemaSchema:Xi,LegacyTitledEnumSchemaSchema:Qi,SingleSelectEnumSchemaSchema:es,UntitledMultiSelectEnumSchemaSchema:Hr,TitledMultiSelectEnumSchemaSchema:Gr,MultiSelectEnumSchemaSchema:fu,EnumSchemaSchema:hu,PrimitiveSchemaDefinitionSchema:ct,ElicitRequestFormParamsSchema:ut,ElicitRequestURLParamsSchema:ts,ElicitRequestParamsSchema:zt,ElicitRequestSchema:gu,ElicitationCompleteNotificationParamsSchema:_u,ElicitationCompleteNotificationSchema:vu,ElicitResultSchema:bu,ResourceTemplateReferenceSchema:Su,PromptReferenceSchema:yu,CompleteRequestParamsSchema:zu,CompleteRequestSchema:rs,CompleteResultSchema:$u,RootSchema:xu,ListRootsRequestSchema:Ln,ListRootsResultSchema:ns,RootsListChangedNotificationSchema:wu,TaskCreationParamsSchema:ku,TaskStatusSchema:Pu,TaskSchema:dr,CreateTaskResultSchema:Qe,TaskStatusNotificationParamsSchema:Ru,TaskStatusNotificationSchema:Wr,GetTaskRequestSchema:qn,GetTaskResultSchema:Fn,GetTaskPayloadRequestSchema:Vn,GetTaskPayloadResultSchema:Ip,ListTasksRequestSchema:et,ListTasksResultSchema:Ee,CancelTaskRequestSchema:Kr,CancelTaskResultSchema:f.merge(dr),ClientRequestSchema:F([sr,Ar,rs,Zi,Ti,Pi,mi,cr,gi,Si,zi,Ni,An,qn,Vn,et,Kr]),ClientNotificationSchema:F([I,ar,Rn,wu,Wr]),ClientResultSchema:F([z,Bi,Hi,bu,ns,Fn,Ee,Qe]),ServerRequestSchema:F([sr,Ji,gu,Ln,qn,Vn,et,Kr]),ServerNotificationSchema:F([I,ar,Ui,xi,vi,pu,Jr,Wr,vu]),ServerResultSchema:F([z,di,$u,Cn,Ri,fi,jn,_i,Mn,Un,Fn,Ee,Qe]),CallToolResultWireSchema:B().superRefine((Fe,C0)=>{if(typeof Fe!==\"object\"||Fe===null||Array.isArray(Fe)||Fe.content!==void 0)return;for(let ay of DI)if(ay in Fe){C0.addIssue({code:\"custom\",message:`content is required when the body carries '${ay}' — another result family cannot default into an empty tools/call success`});return}}).transform(_C).pipe(Mn)}}var bC;function LI(){return bC??=vC()}function qI(e){return e.type!==\"object\"}var SC=new Set([\"const\",\"enum\",\"default\",\"examples\"]),yC=new Set([\"properties\",\"patternProperties\",\"$defs\",\"definitions\",\"dependentSchemas\",\"dependencies\"]);function RI(e){return e!==void 0&&!(typeof e===\"string\"&&e.startsWith(\"#\"))}function zC(e){let t=typeof e.$schema===\"string\"?e.$schema:void 0;if(RI(e.$id))return{...t!==void 0&&{$schema:t},type:\"object\",properties:{result:e},required:[\"result\"]};let n=dy(e.$schema)&&e.$recursiveAnchor!==!0,o=(r,i)=>{if(Array.isArray(r))return r.map((c)=>o(c,!1));if(r===null||typeof r!==\"object\")return r;if(!i&&RI(r.$id))return r;let s={},a=!1;for(let[c,u]of Object.entries(r))if(i)s[c]=o(u,!1);else if((c===\"$ref\"||c===\"$dynamicRef\")&&typeof u===\"string\")s[c]=u===\"#\"?\"#/properties/result\":u.startsWith(\"#/\")?`#/properties/result${u.slice(1)}`:u;else if(c===\"$recursiveRef\"&&u===\"#\"&&n)a=!0;else if(SC.has(c))s[c]=u;else if(yC.has(c))s[c]=o(u,!0);else s[c]=o(u,!1);if(a)if(\"$ref\"in s)s.allOf=[...Array.isArray(s.allOf)?s.allOf:[],{$ref:\"#/properties/result\"}];else s.$ref=\"#/properties/result\";return s};return{...t!==void 0&&{$schema:t},type:\"object\",properties:{result:o(e,!1)},required:[\"result\"]}}var FI={ping:null,initialize:null,\"completion/complete\":null,\"logging/setLevel\":null,\"prompts/get\":null,\"prompts/list\":null,\"resources/list\":null,\"resources/templates/list\":null,\"resources/read\":null,\"resources/subscribe\":null,\"resources/unsubscribe\":null,\"tools/call\":null,\"tools/list\":null,\"tasks/get\":null,\"tasks/result\":null,\"tasks/list\":null,\"tasks/cancel\":null,\"sampling/createMessage\":null,\"elicitation/create\":null,\"roots/list\":null},VI={\"notifications/cancelled\":null,\"notifications/progress\":null,\"notifications/initialized\":null,\"notifications/roots/list_changed\":null,\"notifications/tasks/status\":null,\"notifications/message\":null,\"notifications/resources/updated\":null,\"notifications/resources/list_changed\":null,\"notifications/tools/list_changed\":null,\"notifications/prompts/list_changed\":null,\"notifications/elicitation/complete\":null},$C={ping:null,initialize:null,\"completion/complete\":null,\"logging/setLevel\":null,\"prompts/get\":null,\"prompts/list\":null,\"resources/list\":null,\"resources/templates/list\":null,\"resources/read\":null,\"resources/subscribe\":null,\"resources/unsubscribe\":null,\"tools/call\":null,\"tools/list\":null,\"sampling/createMessage\":null,\"elicitation/create\":null,\"roots/list\":null},Jl;function Xf(){if(Jl)return Jl;let e=LI();return Jl={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,\"completion/complete\":e.CompleteRequestSchema,\"logging/setLevel\":e.SetLevelRequestSchema,\"prompts/get\":e.GetPromptRequestSchema,\"prompts/list\":e.ListPromptsRequestSchema,\"resources/list\":e.ListResourcesRequestSchema,\"resources/templates/list\":e.ListResourceTemplatesRequestSchema,\"resources/read\":e.ReadResourceRequestSchema,\"resources/subscribe\":e.SubscribeRequestSchema,\"resources/unsubscribe\":e.UnsubscribeRequestSchema,\"tools/call\":e.CallToolRequestSchema,\"tools/list\":e.ListToolsRequestSchema,\"tasks/get\":e.GetTaskRequestSchema,\"tasks/result\":e.GetTaskPayloadRequestSchema,\"tasks/list\":e.ListTasksRequestSchema,\"tasks/cancel\":e.CancelTaskRequestSchema,\"sampling/createMessage\":e.CreateMessageRequestSchema,\"elicitation/create\":e.ElicitRequestSchema,\"roots/list\":e.ListRootsRequestSchema},notificationSchemas:{\"notifications/cancelled\":e.CancelledNotificationSchema,\"notifications/progress\":e.ProgressNotificationSchema,\"notifications/initialized\":e.InitializedNotificationSchema,\"notifications/roots/list_changed\":e.RootsListChangedNotificationSchema,\"notifications/tasks/status\":e.TaskStatusNotificationSchema,\"notifications/message\":e.LoggingMessageNotificationSchema,\"notifications/resources/updated\":e.ResourceUpdatedNotificationSchema,\"notifications/resources/list_changed\":e.ResourceListChangedNotificationSchema,\"notifications/tools/list_changed\":e.ToolListChangedNotificationSchema,\"notifications/prompts/list_changed\":e.PromptListChangedNotificationSchema,\"notifications/elicitation/complete\":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,\"completion/complete\":e.CompleteResultSchema,\"logging/setLevel\":e.EmptyResultSchema,\"prompts/get\":e.GetPromptResultSchema,\"prompts/list\":e.ListPromptsResultSchema,\"resources/list\":e.ListResourcesResultSchema,\"resources/templates/list\":e.ListResourceTemplatesResultSchema,\"resources/read\":e.ReadResourceResultSchema,\"resources/subscribe\":e.EmptyResultSchema,\"resources/unsubscribe\":e.EmptyResultSchema,\"tools/call\":e.CallToolResultWireSchema,\"tools/list\":e.ListToolsResultSchema,\"sampling/createMessage\":e.CreateMessageResultWithToolsSchema,\"elicitation/create\":e.ElicitResultSchema,\"roots/list\":e.ListRootsResultSchema}},Jl}function JI(e){return Object.prototype.hasOwnProperty.call(FI,e)}function BI(e){return Object.prototype.hasOwnProperty.call(VI,e)}function xC(e){return Object.prototype.hasOwnProperty.call($C,e)}function wC(e){return xC(e)?Xf().resultSchemas[e]:void 0}function kC(e){return JI(e)?Xf().requestSchemas[e]:void 0}function PC(e){return BI(e)?Xf().notificationSchemas[e]:void 0}var zL=Object.keys(FI),$L=Object.keys(VI);function Hf(e){return e!==null&&typeof e===\"object\"&&!Array.isArray(e)}function Bl(e,t){if(e===void 0)return{ok:!1,reason:\"not-in-era\"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:\"invalid\",message:String(n.error)}}var II={ok:!1,reason:\"not-in-era\"};function TI(e){return Hf(e)&&Hf(e.outputSchema)&&qI(e.outputSchema)}function EI(e){return e}var Qf={era:\"2025-11-25\",hasRequestMethod:JI,hasNotificationMethod:BI,validateRequest:(e,t)=>Bl(kC(e),t),validateResult:(e,t)=>Bl(wC(e),t),validateNotification:(e,t)=>Bl(PC(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>II,validateInputResponse:()=>II,samplingResultVariant:(e,t)=>{let n=LI();return Bl(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)},outboundEnvelope:(e)=>{return},validateEnvelopeMeta:(e)=>[],projectCallToolResult(e,t){let n=MI(e),o=n.structuredContent;if(o===void 0)return n;let r=typeof o!==\"object\"||o===null||Array.isArray(o),i=t!==void 0&&qI(t);if(!r&&!i)return n;return{...n,structuredContent:{result:o}}},decodeResult(e,t){if(Hf(t)&&\"resultType\"in t){let n={...t};return delete n.resultType,{kind:\"complete\",result:EI(n)}}return{kind:\"complete\",result:EI(t)}},encodeResult(e,t){if(e!==\"tools/list\")return t;let n=t.tools;if(!Array.isArray(n)||!n.some((o)=>TI(o)))return t;return{...t,tools:n.map((o)=>TI(o)?{...o,outputSchema:zC(o.outputSchema)}:o)}},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope:(e)=>{return}};function RC(){let e=Df(()=>F([d(),Z(),H(),Fl(),D(d(),e),O(e)])),t=D(d(),e),n=F([d(),Z().int()]),o=d(),r=F([d(),Z().int()]),i=re([\"user\",\"assistant\"]),s=re([\"debug\",\"info\",\"notice\",\"warning\",\"error\",\"critical\",\"alert\",\"emergency\"]),a=d().refine((Ee)=>{try{return atob(Ee),!0}catch{return!1}},{message:\"Invalid Base64 string\"}),c=b({ttl:Z().optional()}),u=b({taskId:d()}),l=Y({progressToken:n.optional(),\"io.modelcontextprotocol/related-task\":u.optional()}),m=b({_meta:l.optional()}),f=m.extend({task:c.optional()}),h=b({_meta:l.optional()}),z=b({method:d(),params:h.loose().optional()}),C=b({src:d(),mimeType:d().optional(),sizes:O(d()).optional(),theme:re([\"light\",\"dark\"]).optional()}),I=b({icons:O(C).optional()}),X=b({name:d(),title:d().optional()}),fe=X.extend({...X.shape,...I.shape,version:d(),websiteUrl:d().optional(),description:d().optional()}),q=Oo(b({applyDefaults:H().optional()}),t),E=Vl((Ee)=>{if(Ee&&typeof Ee===\"object\"&&!Array.isArray(Ee)&&Object.keys(Ee).length===0)return{form:{}};return Ee},Oo(b({form:q.optional(),url:t.optional()}),t.optional())),U=Y({list:t.optional(),cancel:t.optional(),requests:Y({sampling:Y({createMessage:t.optional()}).optional(),elicitation:Y({create:t.optional()}).optional()}).optional()}),ie=Y({list:t.optional(),cancel:t.optional(),requests:Y({tools:Y({call:t.optional()}).optional()}).optional()}),Se=b({experimental:D(d(),t).optional(),sampling:b({context:t.optional(),tools:t.optional()}).optional(),elicitation:E.optional(),roots:b({listChanged:H().optional()}).optional(),tasks:U.optional(),extensions:D(d(),t).optional()}),at=b({experimental:D(d(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:b({listChanged:H().optional()}).optional(),resources:b({subscribe:H().optional(),listChanged:H().optional()}).optional(),tools:b({listChanged:H().optional()}).optional(),tasks:ie.optional(),extensions:D(d(),t).optional()}),Be=b({progress:Z(),total:G(Z()),message:G(d())}),ir=b({...h.shape,...Be.shape,progressToken:n}),Ar=z.extend({method:P(\"notifications/progress\"),params:ir}),li=h.extend({level:s,logger:d().optional(),data:B()}),di=z.extend({method:P(\"notifications/message\"),params:li}),Rn=b({uri:d(),mimeType:G(d()),_meta:D(d(),B()).optional()}),sr=Rn.extend({text:d()}),Ur=Rn.extend({blob:a}),Pt=b({audience:O(i).optional(),priority:Z().min(0).max(1).optional(),lastModified:Pr.datetime({offset:!0}).optional()}),ar=b({...X.shape,...I.shape,uri:d(),description:G(d()),mimeType:G(d()),size:G(Z()),annotations:Pt.optional(),_meta:G(Y({}))}),In=b({...X.shape,...I.shape,uriTemplate:d(),description:G(d()),mimeType:G(d()),annotations:Pt.optional(),_meta:G(Y({}))}),Mt=z.extend({method:P(\"notifications/resources/list_changed\"),params:h.optional()}),Dt=h.extend({uri:d()}),Tn=z.extend({method:P(\"notifications/resources/updated\"),params:Dt}),En=b({name:d(),description:G(d()),required:G(H())}),Mr=b({...X.shape,...I.shape,description:G(d()),arguments:G(O(En)),_meta:G(Y({}))}),On=z.extend({method:P(\"notifications/prompts/list_changed\"),params:h.optional()}),Rt=b({type:P(\"text\"),text:d(),annotations:Pt.optional(),_meta:D(d(),B()).optional()}),yt=b({type:P(\"image\"),data:a,mimeType:d(),annotations:Pt.optional(),_meta:D(d(),B()).optional()}),Dr=b({type:P(\"audio\"),data:a,mimeType:d(),annotations:Pt.optional(),_meta:D(d(),B()).optional()}),pi=b({type:P(\"tool_use\"),name:d(),id:d(),input:D(d(),B()),_meta:D(d(),B()).optional()}),mi=b({type:P(\"resource\"),resource:F([sr,Ur]),annotations:Pt.optional(),_meta:D(d(),B()).optional()}),fi=ar.extend({type:P(\"resource_link\")}),cr=F([Rt,yt,Dr,fi,mi]),jn=b({role:i,content:cr}),Lr=b({title:d().optional(),readOnlyHint:H().optional(),destructiveHint:H().optional(),idempotentHint:H().optional(),openWorldHint:H().optional()}),hi=z.extend({method:P(\"notifications/tools/list_changed\"),params:h.optional()}),gi=b({name:d().optional()}),_i=b({hints:O(gi).optional(),costPriority:Z().min(0).max(1).optional(),speedPriority:Z().min(0).max(1).optional(),intelligencePriority:Z().min(0).max(1).optional()}),vi=b({mode:re([\"auto\",\"required\",\"none\"]).optional()}),bi=b({type:P(\"boolean\"),title:d().optional(),description:d().optional(),default:H().optional()}),Si=b({type:P(\"string\"),title:d().optional(),description:d().optional(),minLength:Z().optional(),maxLength:Z().optional(),format:re([\"email\",\"uri\",\"date\",\"date-time\"]).optional(),default:d().optional()}),yi=b({type:re([\"number\",\"integer\"]),title:d().optional(),description:d().optional(),minimum:Z().optional(),maximum:Z().optional(),default:Z().optional()}),zi=b({type:P(\"string\"),title:d().optional(),description:d().optional(),enum:O(d()),default:d().optional()}),$i=b({type:P(\"string\"),title:d().optional(),description:d().optional(),oneOf:O(b({const:d(),title:d()})),default:d().optional()}),xi=b({type:P(\"string\"),title:d().optional(),description:d().optional(),enum:O(d()),enumNames:O(d()).optional(),default:d().optional()}),wi=F([zi,$i]),ki=b({type:P(\"array\"),title:d().optional(),description:d().optional(),minItems:Z().optional(),maxItems:Z().optional(),items:b({type:P(\"string\"),enum:O(d())}),default:O(d()).optional()}),Pi=b({type:P(\"array\"),title:d().optional(),description:d().optional(),minItems:Z().optional(),maxItems:Z().optional(),items:b({anyOf:O(b({const:d(),title:d()}))}),default:O(d()).optional()}),Ri=F([ki,Pi]),Ii=F([xi,wi,Ri]),Ti=F([Ii,bi,Si,yi]),qr=f.extend({mode:P(\"form\").optional(),message:d(),requestedSchema:b({type:P(\"object\"),properties:D(d(),Ti),required:O(d()).optional()}).catchall(B())}),Fr=b({type:P(\"ref/resource\"),uri:d()}),Vr=b({type:P(\"ref/prompt\"),name:d()}),Ei=b({uri:d().startsWith(\"file://\"),name:d().optional(),_meta:D(d(),B()).optional()}),ur=Se.shape,Oi=b({experimental:ur.experimental,sampling:ur.sampling,elicitation:ur.elicitation,roots:ur.roots,extensions:ur.extensions}),gt=at.shape,Nn=b({experimental:gt.experimental,logging:gt.logging,completions:gt.completions,prompts:gt.prompts,resources:gt.resources,tools:gt.tools,extensions:gt.extensions}),Cn=Y({progressToken:n.optional(),[Xr]:d(),[Qn]:fe.optional(),[Qr]:Oi,[eo]:s.optional()}),Jr=b({...X.shape,...I.shape,description:d().optional(),inputSchema:Y({$schema:d().optional(),type:P(\"object\")}),outputSchema:Y({$schema:d().optional()}).optional(),annotations:Lr.optional(),_meta:D(d(),B()).optional()}),ji=b({type:P(\"tool_result\"),toolUseId:d(),content:O(cr),structuredContent:B().optional(),isError:H().optional(),_meta:D(d(),B()).optional()}),Zn=F([Rt,yt,Dr,pi,ji]),Br=b({role:i,content:F([Zn,O(Zn)]),_meta:D(d(),B()).optional()}),An=d(),Un=Y({[vr]:fe.optional().catch(void 0)}),Mn=Un.optional();function qe(Ee){return Y({_meta:Mn,resultType:An.default(\"complete\"),...Ee})}let Ni=qe({}),pu=qe({nextCursor:o.optional()}),Dn=qe({content:O(cr),structuredContent:B().optional(),isError:H().optional()}),Ci=qe({ttlMs:Z().int().min(0),cacheScope:re([\"public\",\"private\"]),tools:O(Jr),nextCursor:o.optional()}),Zi=qe({ttlMs:Z().int().min(0),cacheScope:re([\"public\",\"private\"]),prompts:O(Mr),nextCursor:o.optional()}),Ai=qe({description:d().optional(),messages:O(jn)}),Ui=qe({ttlMs:Z().int().min(0),cacheScope:re([\"public\",\"private\"]),resources:O(ar),nextCursor:o.optional()}),Mi=qe({ttlMs:Z().int().min(0),cacheScope:re([\"public\",\"private\"]),resourceTemplates:O(In),nextCursor:o.optional()}),Di=qe({ttlMs:Z().int().min(0),cacheScope:re([\"public\",\"private\"]),contents:O(F([sr,Ur]))}),Li=qe({completion:b({values:O(d()).max(100),total:Z().int().optional(),hasMore:H().optional()}).loose()}),mu=qe({ttlMs:Z().int().min(0),cacheScope:re([\"public\",\"private\"])}),qi=qe({ttlMs:Z().int().min(0).catch(0),cacheScope:re([\"public\",\"private\"]).catch(\"private\"),supportedVersions:O(d()),capabilities:Nn,instructions:d().optional()}),lr=b({messages:O(Br),modelPreferences:_i.optional(),systemPrompt:d().optional(),includeContext:re([\"none\",\"thisServer\",\"allServers\"]).optional(),temperature:Z().optional(),maxTokens:Z().int(),stopSequences:O(d()).optional(),metadata:t.optional(),tools:O(Jr).optional(),toolChoice:vi.optional()}),Fi=b({method:P(\"sampling/createMessage\"),params:lr}),Vi=b({method:P(\"roots/list\"),params:b({_meta:D(d(),B()).optional()}).optional()}),Ji=b({...Br.shape,model:d(),stopReason:d().optional()}),Bi=b({roots:O(Ei)}),Hi=b({action:re([\"accept\",\"decline\",\"cancel\"]),content:D(d(),F([d(),Z(),H(),O(d())])).optional()}),Gi=b({mode:P(\"url\"),message:d(),url:d().url()}),Wi=F([qr,Gi]),Ki=b({method:P(\"elicitation/create\"),params:Wi}),Yi=F([Fi,Vi,Ki]),Xi=F([Ji,Bi,Hi]),Qi=D(d(),Yi),es=D(d(),Xi),Hr=qe({inputRequests:Qi.optional(),requestState:d().optional()}),Gr={inputResponses:es.optional(),requestState:d().optional()},fu=b({_meta:Cn,...Gr}),hu=Y({progressToken:n.optional()});function ct(Ee,Kr){return b({method:P(Ee),params:b({_meta:Cn,...Kr})})}function ut(Ee,Kr){return b({method:P(Ee),params:b({_meta:hu.optional(),...Kr}).optional()})}let ts={name:d(),arguments:D(d(),B()).optional(),...Gr},zt={cursor:o.optional()},gu=ct(\"tools/call\",ts),_u=ct(\"tools/list\",zt),vu=ct(\"prompts/list\",zt),bu=ct(\"prompts/get\",{name:d(),arguments:D(d(),d()).optional(),...Gr}),Su=ct(\"resources/list\",zt),yu=ct(\"resources/templates/list\",zt),zu=ct(\"resources/read\",{uri:d(),...Gr}),rs={ref:F([Vr,Fr]),argument:b({name:d(),value:d()}),context:b({arguments:D(d(),d()).optional()}).optional()},$u=ct(\"completion/complete\",rs),xu=ct(\"server/discover\",{}),Ln=b({toolsListChanged:H().optional(),promptsListChanged:H().optional(),resourcesListChanged:H().optional(),resourceSubscriptions:O(d()).optional()}),ns={notifications:Ln},wu=ct(\"subscriptions/listen\",ns),ku=Un.extend({\"io.modelcontextprotocol/subscriptionId\":r}),Pu=Y({_meta:ku,resultType:An.default(\"complete\")}),dr={\"tools/call\":ut(\"tools/call\",ts),\"tools/list\":ut(\"tools/list\",zt),\"prompts/get\":ut(\"prompts/get\",{name:d(),arguments:D(d(),d()).optional()}),\"prompts/list\":ut(\"prompts/list\",zt),\"resources/list\":ut(\"resources/list\",zt),\"resources/templates/list\":ut(\"resources/templates/list\",zt),\"resources/read\":ut(\"resources/read\",{uri:d()}),\"completion/complete\":ut(\"completion/complete\",rs),\"server/discover\":ut(\"server/discover\",{}),\"subscriptions/listen\":ut(\"subscriptions/listen\",ns)};function Qe(Ee){return Y({_meta:Mn,...Ee})}let Ru={\"tools/call\":Qe({content:O(cr),structuredContent:B().optional(),isError:H().optional()}),\"tools/list\":Qe({ttlMs:Z().int().min(0),cacheScope:re([\"public\",\"private\"]),tools:O(Jr),nextCursor:o.optional()}),\"prompts/get\":Qe({description:d().optional(),messages:O(jn)}),\"prompts/list\":Qe({ttlMs:Z().int().min(0),cacheScope:re([\"public\",\"private\"]),prompts:O(Mr),nextCursor:o.optional()}),\"resources/list\":Qe({ttlMs:Z().int().min(0),cacheScope:re([\"public\",\"private\"]),resources:O(ar),nextCursor:o.optional()}),\"resources/templates/list\":Qe({ttlMs:Z().int().min(0),cacheScope:re([\"public\",\"private\"]),resourceTemplates:O(In),nextCursor:o.optional()}),\"resources/read\":Qe({ttlMs:Z().int().min(0),cacheScope:re([\"public\",\"private\"]),contents:O(F([sr,Ur]))}),\"completion/complete\":Qe({completion:b({values:O(d()).max(100),total:Z().int().optional(),hasMore:H().optional()}).loose()}),\"server/discover\":Qe({ttlMs:Z().int().min(0).catch(0),cacheScope:re([\"public\",\"private\"]).catch(\"private\"),supportedVersions:O(d()),capabilities:Nn,instructions:d().optional()}),\"subscriptions/listen\":Qe({})},Wr=Y({\"io.modelcontextprotocol/subscriptionId\":r.optional()}),qn=b({method:P(\"notifications/subscriptions/acknowledged\"),params:b({_meta:Wr.optional(),notifications:Ln})}),Fn=b({_meta:Wr.optional(),requestId:r,reason:d().optional()}),Vn=b({method:P(\"notifications/cancelled\"),params:Fn}),Ip={\"notifications/cancelled\":Vn,\"notifications/progress\":Ar,\"notifications/message\":di,\"notifications/resources/updated\":Tn,\"notifications/resources/list_changed\":Mt,\"notifications/tools/list_changed\":hi,\"notifications/prompts/list_changed\":On,\"notifications/subscriptions/acknowledged\":qn},et=(Ee)=>b({jsonrpc:P(\"2.0\"),id:F([d(),Z().int()]),result:Ee}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,RequestIdSchema:r,RoleSchema:i,LoggingLevelSchema:s,TaskMetadataSchema:c,RelatedTaskMetadataSchema:u,RequestMetaSchema:l,BaseRequestParamsSchema:m,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:h,NotificationSchema:z,IconSchema:C,IconsSchema:I,BaseMetadataSchema:X,ImplementationSchema:fe,ClientTasksCapabilitySchema:U,ServerTasksCapabilitySchema:ie,ClientCapabilitiesSchema:Se,ServerCapabilitiesSchema:at,ProgressSchema:Be,ProgressNotificationParamsSchema:ir,ProgressNotificationSchema:Ar,LoggingMessageNotificationParamsSchema:li,LoggingMessageNotificationSchema:di,ResourceContentsSchema:Rn,TextResourceContentsSchema:sr,BlobResourceContentsSchema:Ur,AnnotationsSchema:Pt,ResourceSchema:ar,ResourceTemplateSchema:In,ResourceListChangedNotificationSchema:Mt,ResourceUpdatedNotificationParamsSchema:Dt,ResourceUpdatedNotificationSchema:Tn,PromptArgumentSchema:En,PromptSchema:Mr,PromptListChangedNotificationSchema:On,TextContentSchema:Rt,ImageContentSchema:yt,AudioContentSchema:Dr,ToolUseContentSchema:pi,EmbeddedResourceSchema:mi,ResourceLinkSchema:fi,ContentBlockSchema:cr,PromptMessageSchema:jn,ToolAnnotationsSchema:Lr,ToolListChangedNotificationSchema:hi,ModelHintSchema:gi,ModelPreferencesSchema:_i,ToolChoiceSchema:vi,BooleanSchemaSchema:bi,StringSchemaSchema:Si,NumberSchemaSchema:yi,UntitledSingleSelectEnumSchemaSchema:zi,TitledSingleSelectEnumSchemaSchema:$i,LegacyTitledEnumSchemaSchema:xi,SingleSelectEnumSchemaSchema:wi,UntitledMultiSelectEnumSchemaSchema:ki,TitledMultiSelectEnumSchemaSchema:Pi,MultiSelectEnumSchemaSchema:Ri,EnumSchemaSchema:Ii,PrimitiveSchemaDefinitionSchema:Ti,ElicitRequestFormParamsSchema:qr,ResourceTemplateReferenceSchema:Fr,PromptReferenceSchema:Vr,RootSchema:Ei,ClientCapabilities2026Schema:Oi,ServerCapabilities2026Schema:Nn,RequestMetaEnvelopeSchema:Cn,ToolSchema:Jr,ToolResultContentSchema:ji,SamplingMessageContentBlockSchema:Zn,SamplingMessageSchema:Br,ResultTypeSchema:An,ResultMetaSchema:Un,ResultSchema:Ni,PaginatedResultSchema:pu,CallToolResultSchema:Dn,ListToolsResultSchema:Ci,ListPromptsResultSchema:Zi,GetPromptResultSchema:Ai,ListResourcesResultSchema:Ui,ListResourceTemplatesResultSchema:Mi,ReadResourceResultSchema:Di,CompleteResultSchema:Li,CacheableResultSchema:mu,DiscoverResultSchema:qi,CreateMessageRequestParamsSchema:lr,CreateMessageRequestSchema:Fi,ListRootsRequestSchema:Vi,CreateMessageResultSchema:Ji,ListRootsResultSchema:Bi,ElicitResultSchema:Hi,ElicitRequestURLParamsSchema:Gi,ElicitRequestParamsSchema:Wi,ElicitRequestSchema:Ki,InputRequestSchema:Yi,InputResponseSchema:Xi,InputRequestsSchema:Qi,InputResponsesSchema:es,InputRequiredResultSchema:Hr,InputResponseRequestParamsSchema:fu,CallToolRequestSchema:gu,ListToolsRequestSchema:_u,ListPromptsRequestSchema:vu,GetPromptRequestSchema:bu,ListResourcesRequestSchema:Su,ListResourceTemplatesRequestSchema:yu,ReadResourceRequestSchema:zu,CompleteRequestSchema:$u,DiscoverRequestSchema:xu,SubscriptionFilterSchema:Ln,SubscriptionsListenRequestSchema:wu,SubscriptionsListenResultMetaSchema:ku,SubscriptionsListenResultSchema:Pu,dispatchRequestSchemas:dr,dispatchResultSchemas:Ru,NotificationMetaSchema:Wr,SubscriptionsAcknowledgedNotificationSchema:qn,CancelledNotificationParamsSchema:Fn,CancelledNotificationSchema:Vn,notificationSchemas2026:Ip,JSONRPCResultResponseSchema:et(Ni),CallToolResultResponseSchema:et(F([Dn,Hr])),ListToolsResultResponseSchema:et(Ci),ListPromptsResultResponseSchema:et(Zi),GetPromptResultResponseSchema:et(F([Ai,Hr])),ListResourcesResultResponseSchema:et(Ui),ListResourceTemplatesResultResponseSchema:et(Mi),ReadResourceResultResponseSchema:et(F([Di,Hr])),CompleteResultResponseSchema:et(Li),DiscoverResultResponseSchema:et(qi)}}var IC;function gn(){return IC??=RC()}var TC=[\"tools/list\",\"prompts/list\",\"resources/list\",\"resources/templates/list\",\"resources/read\",\"server/discover\"];function EC(e){return TC.includes(e)}var eh=Symbol(\"modelcontextprotocol.resultCacheHintFallback\");function OC(e){return e[eh]}function HI(e){return typeof e===\"number\"&&Number.isSafeInteger(e)&&e>=0}function GI(e){return e===\"public\"||e===\"private\"}var K=function(e){return e[e.ParseError=-32700]=\"ParseError\",e[e.InvalidRequest=-32600]=\"InvalidRequest\",e[e.MethodNotFound=-32601]=\"MethodNotFound\",e[e.InvalidParams=-32602]=\"InvalidParams\",e[e.InternalError=-32603]=\"InternalError\",e[e.ResourceNotFound=-32002]=\"ResourceNotFound\",e[e.MissingRequiredClientCapability=-32021]=\"MissingRequiredClientCapability\",e[e.UnsupportedProtocolVersion=-32022]=\"UnsupportedProtocolVersion\",e[e.UrlElicitationRequired=-32042]=\"UrlElicitationRequired\",e}({}),De=class e extends Error{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.ProtocolError\"})}static[Symbol.hasInstance](t){return mt(this,t)}static isInstance(t){if(typeof this!==\"function\")throw TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");return mt(this,t)}constructor(t,n,o){super(n);this.code=t,this.data=o,this.name=\"ProtocolError\",_n(this,new.target)}static fromError(t,n,o){if(t===K.UrlElicitationRequired&&o){let r=o;if(r.elicitations)return new KI(r.elicitations,n)}if(t===K.UnsupportedProtocolVersion&&o){let r=o;if(Array.isArray(r.supported)&&typeof r.requested===\"string\")return new YI({supported:r.supported,requested:r.requested},n)}if(t===K.InvalidParams||t===K.ResourceNotFound){let r=o;if(typeof r?.uri===\"string\"&&(t===K.ResourceNotFound||Object.keys(r).length===1))return new WI(r.uri,n)}if(t===K.MissingRequiredClientCapability&&o){let r=o;if(r.requiredCapabilities!==null&&typeof r.requiredCapabilities===\"object\"&&!Array.isArray(r.requiredCapabilities))return new XI({requiredCapabilities:r.requiredCapabilities},n)}return new e(t,n,o)}},WI=class extends De{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.ResourceNotFoundError\"})}constructor(e,t=`Resource not found: ${e}`){super(K.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},KI=class extends De{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.UrlElicitationRequiredError\"})}constructor(e,t=`URL elicitation${e.length>1?\"s\":\"\"} required`){super(K.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},YI=class extends De{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.UnsupportedProtocolVersionError\"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(K.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},XI=class extends De{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.MissingRequiredClientCapabilityError\"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(\", \")}`){super(K.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},jC=0,NC=\"private\",CC=[\"tools/call\",\"prompts/get\",\"resources/read\"];function ZC(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:\"complete\"};if(n===\"complete\")return t;if(CC.includes(e))return t;throw new De(K.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function AC(e,t){let n=OC(t);if(t.resultType!==\"complete\"||!EC(e))return n===void 0?t:qC(t);let o=t,r=HI(o.ttlMs)?o.ttlMs:DC(n),i=GI(o.cacheScope)?o.cacheScope:LC(n),s={...o,ttlMs:r,cacheScope:i};return delete s[eh],s}function UC(e){return e!==null&&typeof e===\"object\"&&!Array.isArray(e)}function MC(e,t){if(t===void 0)return e;let n=e._meta;if(n===void 0)return{...e,_meta:{[vr]:t}};if(!UC(n))return e;if(n[vr]!==void 0)return e;return{...e,_meta:{...n,[vr]:t}}}function DC(e){return e!==void 0&&HI(e.ttlMs)?e.ttlMs:jC}function LC(e){return e!==void 0&&GI(e.cacheScope)?e.cacheScope:NC}function qC(e){let t={...e};return delete t[eh],t}var FC=[\"elicitation/create\",\"sampling/createMessage\",\"roots/list\"],Hl;function QI(){if(Hl)return Hl;let e=gn();return Hl={request:{\"elicitation/create\":b({method:P(\"elicitation/create\"),params:e.ElicitRequestParamsSchema}),\"sampling/createMessage\":b({method:P(\"sampling/createMessage\"),params:e.CreateMessageRequestParamsSchema}),\"roots/list\":b({method:P(\"roots/list\"),params:Y({}).optional()})},response:{\"elicitation/create\":e.ElicitResultSchema,\"sampling/createMessage\":e.CreateMessageResultSchema,\"roots/list\":e.ListRootsResultSchema}},Hl}function eT(e){return FC.includes(e)}function Lf(e){return eT(e)?QI().request[e]:void 0}function VC(e){return eT(e)?QI().response[e]:void 0}var th={\"tools/call\":null,\"tools/list\":null,\"prompts/get\":null,\"prompts/list\":null,\"resources/list\":null,\"resources/templates/list\":null,\"resources/read\":null,\"completion/complete\":null,\"server/discover\":null,\"subscriptions/listen\":null},tT={\"notifications/cancelled\":null,\"notifications/progress\":null,\"notifications/message\":null,\"notifications/resources/updated\":null,\"notifications/resources/list_changed\":null,\"notifications/tools/list_changed\":null,\"notifications/prompts/list_changed\":null,\"notifications/subscriptions/acknowledged\":null};function rT(e){return Object.prototype.hasOwnProperty.call(th,e)}function nT(e){return Object.prototype.hasOwnProperty.call(tT,e)}function JC(e){return Object.prototype.hasOwnProperty.call(th,e)}function BC(e){return rT(e)?gn().dispatchRequestSchemas[e]:void 0}function HC(e){return JC(e)?gn().dispatchResultSchemas[e]:void 0}function GC(e){return nT(e)?gn().notificationSchemas2026[e]:void 0}var xL=Object.keys(th),wL=Object.keys(tT);function $c(e){return e!==null&&typeof e===\"object\"&&!Array.isArray(e)}function yc(e,t){if(e===void 0)return{ok:!1,reason:\"not-in-era\"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:\"invalid\",message:String(n.error)}}var WC={ok:!1,reason:\"not-in-era\"},KC=[Xr,Qr];function YC(e,t){let n=t,o=!1,r=()=>{if(!o)n={...n},o=!0;return n},i=t.tools;if(e===\"tools/list\"&&Array.isArray(i)&&i.some((a)=>$c(a)&&(\"execution\"in a)))r().tools=i.map((a)=>{if(!$c(a)||!(\"execution\"in a))return a;let c={...a};return delete c.execution,c});let s=t.capabilities;if($c(s)&&\"tasks\"in s){let a={...s};delete a.tasks,r().capabilities=a}return n}var rh={era:\"2026-07-28\",hasRequestMethod:rT,hasNotificationMethod:nT,hasInputRequestMethod:(e)=>Lf(e)!==void 0,validateRequest:(e,t)=>yc(BC(e),t),validateResult:(e,t)=>yc(HC(e),t),validateNotification:(e,t)=>yc(GC(e),t),validateInputRequest:(e,t)=>yc(Lf(e),t),validateInputResponse:(e,t)=>yc(VC(e),t),samplingResultVariant:()=>WC,outboundEnvelope(e){return{[Xr]:e.protocolVersion,[Qn]:e.clientInfo,[Qr]:e.clientCapabilities,...e.logLevel!==void 0&&{[eo]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let o of KC)if(!(o in e))t.push({key:o,problem:\"missing\"});let n=gn().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let o of n.error.issues){let r=o.path.map(String),i=r.length>0?r.join(\".\"):\"_meta\";if(r.length===1&&t.some((s)=>s.key===i&&s.problem===\"missing\"))continue;t.push({key:i,problem:o.message})}return t},projectCallToolResult:(e)=>MI(e),inputRequestSchema:Lf,decodeResult(e,t){if(!$c(t))return{kind:\"invalid\",error:new je(Me.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:\"invalid\",error:new je(Me.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:\"missing-resultType\"})};if(typeof n!==\"string\")return{kind:\"invalid\",error:new je(Me.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===\"input_required\"){let s=t.inputRequests,a=$c(s)?s:{},c=t.requestState;if(Object.keys(a).length===0&&typeof c!==\"string\")return{kind:\"invalid\",error:new je(Me.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:\"input-required-missing-both\"})};return{kind:\"input_required\",inputRequests:a,...typeof c===\"string\"&&{requestState:c}}}if(n!==\"complete\")return{kind:\"invalid\",error:new je(Me.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let o=XC(),r=Object.hasOwn(o,e)?o[e]:void 0;if(r!==void 0){let s=r.safeParse(t);if(!s.success)return{kind:\"invalid\",error:new je(Me.InvalidResult,`Invalid result for ${e}: ${s.error}`,{method:e})}}let i={...t};return delete i.resultType,{kind:\"complete\",result:i}},encodeResult(e,t,n){return MC(AC(e,ZC(e,YC(e,t))),n)},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return\"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)\";let t=gn().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map((n)=>n.message).join(\"; \")}`}},Gl;function XC(){if(Gl)return Gl;let e=gn();return Gl={\"tools/call\":e.CallToolResultSchema,\"tools/list\":e.ListToolsResultSchema,\"prompts/get\":e.GetPromptResultSchema,\"prompts/list\":e.ListPromptsResultSchema,\"resources/list\":e.ListResourcesResultSchema,\"resources/templates/list\":e.ListResourceTemplatesResultSchema,\"resources/read\":e.ReadResourceResultSchema,\"completion/complete\":e.CompleteResultSchema,\"server/discover\":e.DiscoverResultSchema},Gl}var nh=\"2026-07-28\";function wc(e){return e!==void 0&&UI(e)?rh:Qf}function OI(e){if(e.revision!==void 0)return wc(e.revision).era;return e.era===\"modern\"?rh.era:Qf.era}function qf(e){return oT.some((t)=>t.hasRequestMethod(e))}function Ff(e){return oT.some((t)=>t.hasNotificationMethod(e))}var oT=[Qf,rh],QC=uy({AnnotationsSchema:()=>Et,AudioContentSchema:()=>cn,BaseMetadataSchema:()=>It,BaseRequestParamsSchema:()=>Ce,BlobResourceContentsSchema:()=>ho,BooleanSchemaSchema:()=>bo,CallToolRequestParamsSchema:()=>pa,CallToolRequestSchema:()=>ma,CallToolResultSchema:()=>zr,CancelTaskRequestSchema:()=>pl,CancelTaskResultSchema:()=>ml,CancelledNotificationParamsSchema:()=>Ss,CancelledNotificationSchema:()=>ao,ClientCapabilitiesSchema:()=>zs,ClientNotificationSchema:()=>hl,ClientRequestSchema:()=>fl,ClientResultSchema:()=>gl,ClientTasksCapabilitySchema:()=>Qu,CompatibilityCallToolResultSchema:()=>tl,CompleteRequestParamsSchema:()=>Da,CompleteRequestSchema:()=>La,CompleteResultSchema:()=>qa,ContentBlockSchema:()=>Ot,CreateMessageRequestParamsSchema:()=>wa,CreateMessageRequestSchema:()=>ka,CreateMessageResultSchema:()=>Pa,CreateMessageResultWithToolsSchema:()=>Ra,CreateTaskResultSchema:()=>ol,CursorSchema:()=>ro,DiscoverRequestSchema:()=>Ps,DiscoverResultSchema:()=>uo,ElicitRequestFormParamsSchema:()=>mn,ElicitRequestParamsSchema:()=>ja,ElicitRequestSchema:()=>Na,ElicitRequestURLParamsSchema:()=>Oa,ElicitResultSchema:()=>Aa,ElicitationCompleteNotificationParamsSchema:()=>Ca,ElicitationCompleteNotificationSchema:()=>Za,EmbeddedResourceSchema:()=>un,EmptyResultSchema:()=>Sr,EnumSchemaSchema:()=>Ea,GetPromptRequestParamsSchema:()=>ra,GetPromptRequestSchema:()=>na,GetPromptResultSchema:()=>sa,GetTaskPayloadRequestSchema:()=>cl,GetTaskPayloadResultSchema:()=>ul,GetTaskRequestSchema:()=>sl,GetTaskResultSchema:()=>al,IconSchema:()=>ys,IconsSchema:()=>Ht,ImageContentSchema:()=>an,ImplementationSchema:()=>Tt,InitializeRequestParamsSchema:()=>$s,InitializeRequestSchema:()=>xs,InitializeResultSchema:()=>ws,InitializedNotificationSchema:()=>ks,JSONArraySchema:()=>Yu,JSONObjectSchema:()=>ke,JSONRPCErrorResponseSchema:()=>rn,JSONRPCMessageSchema:()=>nn,JSONRPCNotificationSchema:()=>so,JSONRPCRequestSchema:()=>io,JSONRPCResponseSchema:()=>Xu,JSONRPCResultResponseSchema:()=>tn,JSONValueSchema:()=>Bt,LegacyTitledEnumSchemaSchema:()=>zo,ListChangedOptionsBaseSchema:()=>rl,ListPromptsRequestSchema:()=>ea,ListPromptsResultSchema:()=>ta,ListResourceTemplatesRequestSchema:()=>Ns,ListResourceTemplatesResultSchema:()=>Cs,ListResourcesRequestSchema:()=>Os,ListResourcesResultSchema:()=>js,ListRootsRequestSchema:()=>Va,ListRootsResultSchema:()=>Ja,ListTasksRequestSchema:()=>ll,ListTasksResultSchema:()=>dl,ListToolsRequestSchema:()=>la,ListToolsResultSchema:()=>da,LoggingLevelSchema:()=>vo,LoggingMessageNotificationParamsSchema:()=>_a,LoggingMessageNotificationSchema:()=>va,ModelHintSchema:()=>ba,ModelPreferencesSchema:()=>Sa,MultiSelectEnumSchemaSchema:()=>Ta,NotificationSchema:()=>Ae,NotificationsParamsSchema:()=>Ve,NumberSchemaSchema:()=>pn,PaginatedRequestParamsSchema:()=>Ts,PaginatedRequestSchema:()=>Gt,PaginatedResultSchema:()=>Wt,PingRequestSchema:()=>lo,PrimitiveSchemaDefinitionSchema:()=>wo,ProgressNotificationParamsSchema:()=>Is,ProgressNotificationSchema:()=>po,ProgressSchema:()=>Rs,ProgressTokenSchema:()=>to,PromptArgumentSchema:()=>Xs,PromptListChangedNotificationSchema:()=>aa,PromptMessageSchema:()=>ia,PromptReferenceSchema:()=>Ma,PromptSchema:()=>Qs,ReadResourceRequestParamsSchema:()=>Zs,ReadResourceRequestSchema:()=>As,ReadResourceResultSchema:()=>Us,RelatedTaskMetadataSchema:()=>bs,RequestIdSchema:()=>xt,RequestMetaSchema:()=>no,RequestSchema:()=>Pe,ResourceContentsSchema:()=>mo,ResourceLinkSchema:()=>ln,ResourceListChangedNotificationSchema:()=>Ms,ResourceRequestParamsSchema:()=>on,ResourceSchema:()=>go,ResourceTemplateReferenceSchema:()=>Ua,ResourceTemplateSchema:()=>Es,ResourceUpdatedNotificationParamsSchema:()=>Ks,ResourceUpdatedNotificationSchema:()=>Ys,ResultMetaObjectSchema:()=>oo,ResultSchema:()=>Re,RoleSchema:()=>Kt,RootSchema:()=>Fa,RootsListChangedNotificationSchema:()=>Ba,SamplingContentSchema:()=>$a,SamplingMessageContentBlockSchema:()=>_r,SamplingMessageSchema:()=>xa,ServerCapabilitiesSchema:()=>co,ServerNotificationSchema:()=>vl,ServerRequestSchema:()=>_l,ServerResultSchema:()=>bl,ServerTasksCapabilitySchema:()=>el,SetLevelRequestParamsSchema:()=>ha,SetLevelRequestSchema:()=>ga,SingleSelectEnumSchemaSchema:()=>Ia,StringSchemaSchema:()=>dn,SubscribeRequestParamsSchema:()=>Ds,SubscribeRequestSchema:()=>Ls,SubscriptionFilterSchema:()=>_o,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Bs,SubscriptionsAcknowledgedNotificationSchema:()=>Hs,SubscriptionsListenRequestParamsSchema:()=>Vs,SubscriptionsListenRequestSchema:()=>Js,SubscriptionsListenResultMetaSchema:()=>Gs,SubscriptionsListenResultSchema:()=>Ws,TaskAugmentedRequestParamsSchema:()=>br,TaskCreationParamsSchema:()=>nl,TaskMetadataSchema:()=>vs,TaskSchema:()=>Yt,TaskStatusNotificationParamsSchema:()=>Ga,TaskStatusNotificationSchema:()=>il,TaskStatusSchema:()=>Ha,TextContentSchema:()=>sn,TextResourceContentsSchema:()=>fo,TitledMultiSelectEnumSchemaSchema:()=>xo,TitledSingleSelectEnumSchemaSchema:()=>yo,ToolAnnotationsSchema:()=>ca,ToolChoiceSchema:()=>ya,ToolExecutionSchema:()=>ua,ToolListChangedNotificationSchema:()=>fa,ToolResultContentSchema:()=>za,ToolSchema:()=>yr,ToolUseContentSchema:()=>oa,UnsubscribeRequestParamsSchema:()=>qs,UnsubscribeRequestSchema:()=>Fs,UntitledMultiSelectEnumSchemaSchema:()=>$o,UntitledSingleSelectEnumSchemaSchema:()=>So});var iT=(e)=>io.safeParse(e).success,sT=(e)=>so.safeParse(e).success,Gf=(e)=>tn.safeParse(e).success,aT=(e)=>rn.safeParse(e).success;var xc=-32020,kL=[{rung:\"http-method\",order:1,evaluatedAt:\"edge\",codes:[-32000],conformance:[],rationale:\"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read.\"},{rung:\"jsonrpc-shape\",order:2,evaluatedAt:\"edge\",codes:[K.InvalidRequest],conformance:[\"server-stateless\"],rationale:\"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic.\"},{rung:\"era-classification\",order:3,evaluatedAt:\"edge\",codes:[xc,K.UnsupportedProtocolVersion],conformance:[\"server-stateless\",\"http-header-validation\",\"http-custom-header-server-validation\"],rationale:\"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions.\"},{rung:\"envelope\",order:4,evaluatedAt:\"edge\",codes:[K.InvalidParams],conformance:[\"server-stateless\"],rationale:\"A present envelope claim with a malformed envelope — and a missing envelope on a request whose protocol-version header names a modern revision — is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400.\"},{rung:\"method-registry\",order:5,evaluatedAt:\"dispatch\",codes:[K.MethodNotFound],conformance:[\"server-stateless\"],rationale:\"Method existence outranks parameter validity: a method absent from the negotiated revision’s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at.\"},{rung:\"request-params\",order:6,evaluatedAt:\"dispatch\",codes:[K.InvalidParams],conformance:[],rationale:\"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table.\"},{rung:\"standard-header-validation\",order:7,evaluatedAt:\"pre-dispatch\",codes:[xc],conformance:[\"http-header-validation\"],rationale:\"SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers — presence, sentinel decoding, and `Mcp-Name` ↔ body cross-check — are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The classifier’s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5–6) are consulted.\"},{rung:\"client-capabilities\",order:8,evaluatedAt:\"pre-dispatch\",codes:[K.MissingRequiredClientCapability],conformance:[\"server-stateless\"],rationale:\"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced — pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable.\"},{rung:\"param-header-validation\",order:9,evaluatedAt:\"pre-dispatch\",codes:[xc],conformance:[\"http-custom-header-server-validation\"],rationale:\"SEP-2243 `Mcp-Param-*` headers are validated against the named tool’s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung.\"}],PL={[K.ParseError]:400,[K.InvalidRequest]:400,[K.MethodNotFound]:404,[K.UnsupportedProtocolVersion]:400,[K.MissingRequiredClientCapability]:400,[xc]:400};function oh(e,t){return Ll(e,t)}function zc(e){return new Set(e.flatMap((t)=>Object.keys(t.shape)))}function Wf(e){if(e==null)return!1;let t=typeof e;if(t!==\"object\"&&t!==\"function\")return!1;if(!(\"~standard\"in e))return!1;return typeof e[\"~standard\"]?.validate===\"function\"}var jI=!1,Kf=\"draft-2020-12\";function eZ(e,t=\"input\"){let n=e[\"~standard\"],o;if(n.jsonSchema)o=n.jsonSchema[t]({target:Kf});else if(n.vendor===\"zod\"){if(!(\"_zod\"in e))throw Error(\"Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().\");if(!jI)jI=!0,console.warn(\"[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.\");o=Dl(e,{target:Kf,io:t})}else throw Error(`Schema library \"${n.vendor}\" does not implement StandardJSONSchemaV1 (\\`~standard.jsonSchema\\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===\"output\"){if(o.type!==void 0)return o;return cT(o)?{type:\"object\",...o}:o}if(o.type!==void 0&&o.type!==\"object\")throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(o.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:\"object\",...o}}function cT(e){if(\"properties\"in e||\"patternProperties\"in e||\"additionalProperties\"in e||\"required\"in e)return!0;for(let t of[\"oneOf\",\"anyOf\",\"allOf\"]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every((o)=>o!==null&&typeof o===\"object\"&&(o.type===\"object\"||cT(o)))}return!1}function tZ(e){if(!e.path?.length)return e.message;return`${e.path.map((t)=>String(typeof t===\"object\"?t.key:t)).join(\".\")}: ${e.message}`}async function Vf(e,t){let n=await e[\"~standard\"].validate(t);if(n.issues&&n.issues.length>0)return{success:!1,error:n.issues.map((o)=>tZ(o)).join(\", \")};return{success:!0,data:n.value}}function rZ(e){let t=Dl(e,{target:Kf,io:\"input\"});return typeof t.pattern===\"string\"?t.pattern:void 0}var nZ=/\\\\\\.\\\\d\\{(\\d+)\\}/;function oZ(e){let t=nZ.exec(e),n=[void 0,-1,0];if(t)n.push(Number(t[1]));return[!1,!0].flatMap((o)=>[!1,!0].flatMap((r)=>n.map((i)=>Pr.datetime({local:o,offset:r,precision:i}))))}function iZ(e,t){let n;switch(e){case\"email\":n=[vI()];break;case\"uri\":n=[SI()];break;case\"date\":n=[Pr.date()];break;case\"date-time\":n=oZ(t);break}return new Set(n.map((o)=>rZ(o)).filter((o)=>o!==void 0))}function sZ(e,t,n){if(n!==\"zod\")return!0;return iZ(e,t).has(t)}function kc(e){return typeof e===\"object\"&&e!==null&&!Array.isArray(e)}function aZ(e){try{return eZ(e,\"input\")}catch(t){let n=t instanceof Error?t.message:String(t);throw new De(K.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${n}`)}}var cZ=new Set([\"$comment\",\"deprecated\",\"description\",\"examples\",\"readOnly\",\"title\",\"writeOnly\"]);function ih(e){return cZ.has(e)||e.startsWith(\"x-\")}var uZ=new Set([\"$schema\",...Object.keys(mn.shape.requestedSchema.shape)]),NI={string:zc([dn,So,yo,zo]),number:zc([pn]),integer:zc([pn]),boolean:zc([bo]),array:zc([$o,xo])},lZ=new Set(dn.shape.format.unwrap().options);function dZ(e,t,n,o){if(!kc(e))return e;let r=typeof e.type===\"string\"&&Object.hasOwn(NI,e.type)?NI[e.type]:void 0;if(r===void 0)return e;let i={};for(let[s,a]of Object.entries(e))if(r.has(s)||ih(s))i[s]=a;else if(s===\"pattern\"&&e.type===\"string\"&&typeof e.format===\"string\"){if(!lZ.has(e.format))i[s]=a;else if(typeof a!==\"string\"||!sZ(e.format,a,n))o.push(`${t}.${s}`)}else o.push(`${t}.${s}`);return i}function pZ(e,t){let n={},o=[];for(let[r,i]of Object.entries(e))if(r===\"properties\"&&kc(i))n[r]=Object.fromEntries(Object.entries(i).map(([s,a])=>[s,dZ(a,`properties.${s}`,t,o)]));else if(uZ.has(r))n[r]=i;else if(!ih(r))o.push(r);if(o.length>0)throw new De(K.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${o.join(\", \")}`);return n}function mZ(e,t){if(!kc(e.properties))return t;let n=Object.entries(e.properties).filter(([,o])=>!oh(wo,o).success).map(([o])=>`properties.${o}`);return n.length>0?n.join(\", \"):t}function Yf(e,t,n=\"\"){if(Array.isArray(e)&&Array.isArray(t))return e.flatMap((o,r)=>Yf(o,t[r],`${n}[${r}]`));if(!kc(e)||!kc(t))return[];return Object.entries(e).flatMap(([o,r])=>{let i=n?`${n}.${o}`:o;if(!Object.prototype.hasOwnProperty.call(t,o))return ih(o)?[]:[i];return Yf(r,t[o],i)})}function fZ(e){if(!Wf(e.requestedSchema))return{...e,mode:\"form\",requestedSchema:e.requestedSchema};let t=e.requestedSchema[\"~standard\"].vendor,n=pZ(aZ(e.requestedSchema),t),o=oh(mn.shape.requestedSchema,n);if(!o.success)throw new De(K.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${mZ(n,o.error.message)}`);let r=Yf(n,o.data);if(r.length>0)throw new De(K.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(\", \")}`);let i=(o.data.required??[]).filter((s)=>!Object.prototype.hasOwnProperty.call(o.data.properties,s));if(i.length>0)throw new De(K.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${i.join(\", \")}`);return{...e,mode:\"form\",requestedSchema:o.data}}function hZ(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState===\"string\";if(!t&&!n)throw TypeError(\"inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)\");return{resultType:\"input_required\",...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}var RL=Object.assign(hZ,{elicit(e){try{return{method:\"elicitation/create\",params:fZ(e)}}catch(t){throw t instanceof De?TypeError(t.message,{cause:t}):t}},elicitUrl(e){return{method:\"elicitation/create\",params:{...e,mode:\"url\"}}},createMessage(e){return{method:\"sampling/createMessage\",params:e}},listRoots(){return{method:\"roots/list\"}}});var gZ=[\"AnnotationsSchema\",\"AudioContentSchema\",\"BaseMetadataSchema\",\"BlobResourceContentsSchema\",\"BooleanSchemaSchema\",\"CallToolRequestSchema\",\"CallToolRequestParamsSchema\",\"CallToolResultSchema\",\"CancelledNotificationSchema\",\"CancelledNotificationParamsSchema\",\"CancelTaskRequestSchema\",\"CancelTaskResultSchema\",\"ClientCapabilitiesSchema\",\"ClientNotificationSchema\",\"ClientRequestSchema\",\"ClientResultSchema\",\"CompatibilityCallToolResultSchema\",\"CompleteRequestSchema\",\"CompleteRequestParamsSchema\",\"CompleteResultSchema\",\"ContentBlockSchema\",\"CreateMessageRequestSchema\",\"CreateMessageRequestParamsSchema\",\"CreateMessageResultSchema\",\"CreateMessageResultWithToolsSchema\",\"CreateTaskResultSchema\",\"CursorSchema\",\"DiscoverRequestSchema\",\"DiscoverResultSchema\",\"ElicitationCompleteNotificationSchema\",\"ElicitationCompleteNotificationParamsSchema\",\"ElicitRequestSchema\",\"ElicitRequestFormParamsSchema\",\"ElicitRequestParamsSchema\",\"ElicitRequestURLParamsSchema\",\"ElicitResultSchema\",\"EmbeddedResourceSchema\",\"EmptyResultSchema\",\"EnumSchemaSchema\",\"GetPromptRequestSchema\",\"GetPromptRequestParamsSchema\",\"GetPromptResultSchema\",\"GetTaskPayloadRequestSchema\",\"GetTaskPayloadResultSchema\",\"GetTaskRequestSchema\",\"GetTaskResultSchema\",\"IconSchema\",\"IconsSchema\",\"ImageContentSchema\",\"ImplementationSchema\",\"InitializedNotificationSchema\",\"InitializeRequestSchema\",\"InitializeRequestParamsSchema\",\"InitializeResultSchema\",\"JSONArraySchema\",\"JSONObjectSchema\",\"JSONRPCErrorResponseSchema\",\"JSONRPCMessageSchema\",\"JSONRPCNotificationSchema\",\"JSONRPCRequestSchema\",\"JSONRPCResponseSchema\",\"JSONRPCResultResponseSchema\",\"JSONValueSchema\",\"LegacyTitledEnumSchemaSchema\",\"ListPromptsRequestSchema\",\"ListPromptsResultSchema\",\"ListResourcesRequestSchema\",\"ListResourcesResultSchema\",\"ListResourceTemplatesRequestSchema\",\"ListResourceTemplatesResultSchema\",\"ListRootsRequestSchema\",\"ListRootsResultSchema\",\"ListTasksRequestSchema\",\"ListTasksResultSchema\",\"ListToolsRequestSchema\",\"ListToolsResultSchema\",\"LoggingLevelSchema\",\"LoggingMessageNotificationSchema\",\"LoggingMessageNotificationParamsSchema\",\"ModelHintSchema\",\"ModelPreferencesSchema\",\"MultiSelectEnumSchemaSchema\",\"NotificationSchema\",\"NumberSchemaSchema\",\"PaginatedRequestSchema\",\"PaginatedRequestParamsSchema\",\"PaginatedResultSchema\",\"PingRequestSchema\",\"PrimitiveSchemaDefinitionSchema\",\"ProgressSchema\",\"ProgressNotificationSchema\",\"ProgressNotificationParamsSchema\",\"ProgressTokenSchema\",\"PromptSchema\",\"PromptArgumentSchema\",\"PromptListChangedNotificationSchema\",\"PromptMessageSchema\",\"PromptReferenceSchema\",\"ReadResourceRequestSchema\",\"ReadResourceRequestParamsSchema\",\"ReadResourceResultSchema\",\"RelatedTaskMetadataSchema\",\"RequestSchema\",\"RequestIdSchema\",\"RequestMetaSchema\",\"ResourceSchema\",\"ResourceContentsSchema\",\"ResourceLinkSchema\",\"ResourceListChangedNotificationSchema\",\"ResourceRequestParamsSchema\",\"ResourceTemplateSchema\",\"ResourceTemplateReferenceSchema\",\"ResourceUpdatedNotificationSchema\",\"ResourceUpdatedNotificationParamsSchema\",\"ResultMetaObjectSchema\",\"ResultSchema\",\"RoleSchema\",\"RootSchema\",\"RootsListChangedNotificationSchema\",\"SamplingContentSchema\",\"SamplingMessageSchema\",\"SamplingMessageContentBlockSchema\",\"ServerCapabilitiesSchema\",\"ServerNotificationSchema\",\"ServerRequestSchema\",\"ServerResultSchema\",\"SetLevelRequestSchema\",\"SetLevelRequestParamsSchema\",\"SingleSelectEnumSchemaSchema\",\"StringSchemaSchema\",\"SubscribeRequestSchema\",\"SubscribeRequestParamsSchema\",\"SubscriptionFilterSchema\",\"SubscriptionsAcknowledgedNotificationSchema\",\"SubscriptionsAcknowledgedNotificationParamsSchema\",\"SubscriptionsListenRequestSchema\",\"SubscriptionsListenRequestParamsSchema\",\"SubscriptionsListenResultSchema\",\"SubscriptionsListenResultMetaSchema\",\"TaskAugmentedRequestParamsSchema\",\"TaskCreationParamsSchema\",\"TaskMetadataSchema\",\"TaskSchema\",\"TaskStatusSchema\",\"TaskStatusNotificationSchema\",\"TaskStatusNotificationParamsSchema\",\"TextContentSchema\",\"TextResourceContentsSchema\",\"TitledMultiSelectEnumSchemaSchema\",\"TitledSingleSelectEnumSchemaSchema\",\"ToolSchema\",\"ToolAnnotationsSchema\",\"ToolChoiceSchema\",\"ToolExecutionSchema\",\"ToolListChangedNotificationSchema\",\"ToolResultContentSchema\",\"ToolUseContentSchema\",\"UnsubscribeRequestSchema\",\"UnsubscribeRequestParamsSchema\",\"UntitledMultiSelectEnumSchemaSchema\",\"UntitledSingleSelectEnumSchemaSchema\"],_Z={IdJagTokenExchangeResponseSchema:Qa,OAuthClientInformationFullSchema:nc,OAuthClientInformationSchema:rc,OAuthClientMetadataSchema:tc,OAuthClientRegistrationErrorSchema:Sl,OAuthErrorResponseSchema:ec,OAuthMetadataSchema:ko,OAuthProtectedResourceMetadataSchema:Wa,OAuthTokenRevocationRequestSchema:yl,OAuthTokensSchema:Xa,OpenIdProviderDiscoveryMetadataSchema:Ya,OpenIdProviderMetadataSchema:Ka},uT={},lT={};function dT(e,t){let n=e.slice(0,-6);uT[n]=t,lT[n]=(o)=>t.safeParse(o).success}for(let e of gZ)dT(e,QC[e]);for(let[e,t]of Object.entries(_Z))dT(e,t);var vZ=Object.freeze(uT),bZ=Object.freeze(lT);function SZ(e){switch(e){case\"initialize\":case\"notifications/initialized\":return wc(void 0);case\"server/discover\":return wc(nh);default:return}}var pT=60000,yZ=[Xr,Qn,Qr,eo],zZ=[\"inputResponses\",\"requestState\"];function CI(e,t){let n=e.params;if(!Jf(n))return{message:e,lifted:{}};let o=n._meta,r=Jf(o)?yZ.filter((c)=>(c in o)):[],i=t===\"request\"?zZ.filter((c)=>(c in n)):[];if(r.length===0&&i.length===0)return{message:e,lifted:{}};let s={},a={...n};if(r.length>0&&Jf(o)){let c={},u={...o};for(let l of r)c[l]=o[l],delete u[l];if(s.envelope=c,Object.keys(u).length>0)a._meta=u;else delete a._meta}for(let c of i){if(c===\"inputResponses\")s.inputResponses=a[c];if(c===\"requestState\")s.requestState=a[c];delete a[c]}return{message:{...e,params:a},lifted:s}}function ZI(e,t){let n=e.validateResult(t,void 0);if(!n.ok&&n.reason===\"not-in-era\")return;return{\"~standard\":{version:1,vendor:\"mcp-wire-codec\",validate(o){let r=e.validateResult(t,o);if(r.ok)return{value:r.value};return{issues:[{message:r.reason===\"invalid\"?r.message:`not-in-era: ${t}`}]}}}}}function mT(e){return()=>e}var $Z=mT(void 0),xZ,sh=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{xZ=(e,t)=>{e._negotiatedProtocolVersion=t}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??Gu,this.setNotificationHandler(\"notifications/cancelled\",(t)=>{this._oncancel(t)}),this.setNotificationHandler(\"notifications/progress\",(t)=>{this._onprogress(t)}),this.setRequestHandler(\"ping\",(t)=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new je(Me.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,o,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:o})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new je(Me.RequestTimeout,\"Maximum total timeout exceeded\",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);if(t)clearTimeout(t.timeoutId),this._timeoutInfo.delete(e)}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=(r)=>{n?.(r),this._onerror(r)};let o=this._transport?.onmessage;this._transport.onmessage=(r,i)=>{if(o?.(r,i),Gf(r)||aT(r))this._onresponse(r);else if(iT(r))this._onrequest(r,i);else if(sT(r))this._onnotification(r,i);else this._onerror(Error(`Unknown message type: ${JSON.stringify(r)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new je(Me.ConnectionClosed,\"Connection closed\");this._transport=void 0;try{this.onclose?.()}finally{for(let o of e.values())o(n);for(let o of t.values())o.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=CI(e,\"notification\"),o=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===\"drop\")return;if(t?.classification!==void 0){let s=OI(t.classification);if(s!==o.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${s} but this instance serves ${o.era}`));return}}if(Ff(n.method)&&!o.hasNotificationMethod(n.method))return;let r=this._notificationHandlers.get(n.method),i=this.fallbackNotificationHandler;if(r===void 0&&i===void 0)return;Promise.resolve().then(()=>r===void 0?i(n):r(n,o)).catch((s)=>this._onerror(Error(`Uncaught error in notification handler: ${s}`)))}_onrequest(e,t){let{message:n,lifted:o}=CI(e,\"request\"),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===\"drop\"){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let i=this._transport,s=(C,I,X)=>{let fe={jsonrpc:\"2.0\",id:n.id,error:{code:C,message:I,...X!==void 0&&{data:X}}};i?.send(fe).catch((q)=>this._onerror(Error(`Failed to send an error response: ${q}`)))};if(t?.classification!==void 0){let C=OI(t.classification);if(C!==r.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${C} but this instance serves ${r.era}`));let I=t.classification.revision??C;s(K.UnsupportedProtocolVersion,`Unsupported protocol version: ${I}`,{supported:this._supportedProtocolVersions,requested:I});return}}if(qf(n.method)&&!r.hasRequestMethod(n.method)){s(K.MethodNotFound,\"Method not found\");return}let a=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(a===void 0){s(K.MethodNotFound,\"Method not found\");return}let c=r.checkInboundEnvelope(o);if(c!==void 0){s(K.InvalidParams,c);return}let u=(C,I)=>this._notificationViaCodec(this._resolveOutboundCodec(C.method),C,{...I,relatedRequestId:n.id}),l=(C,I,X)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(C.method),C,I,{...X,relatedRequestId:n.id}),m=new AbortController;this._requestHandlerAbortControllers.set(n.id,m);let f=o.inputResponses===void 0?void 0:wZ(o.inputResponses),h={sessionId:i?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...o.envelope!==void 0&&{envelope:o.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:o.requestState===void 0?$Z:mT(o.requestState),signal:m.signal,send:(C,I,X)=>{let fe=this._resolveOutboundCodec(C.method);if(this._assertOutboundRequestInEra(fe,C.method),Wf(I))return l(C,I,X);let q=ZI(fe,C.method);if(q===void 0)throw TypeError(`'${C.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return l(C,q,I)},notify:u},http:t?.authInfo?{authInfo:t.authInfo}:void 0},z=this.buildContext(h,t);Promise.resolve().then(()=>a(n,z)).then(async(C)=>{if(m.signal.aborted)return;let I;try{I=r.encodeResult(n.method,C,this._outboundServerInfo())}catch(fe){this._onerror(Error(`Failed to encode result for ${n.method}: ${fe}`)),s(K.InternalError,\"Internal error\");return}let X={result:I,jsonrpc:\"2.0\",id:n.id};await i?.send(X)},async(C)=>{if(m.signal.aborted)return;let I=Number.isSafeInteger(C.code)?C.code:K.InternalError,X={jsonrpc:\"2.0\",id:n.id,error:{code:r.encodeErrorCode(I),message:C.message??\"Internal error\",...C.data!==void 0&&{data:C.data}}};await i?.send(X)}).catch((C)=>this._onerror(Error(`Failed to send response: ${C}`))).finally(()=>{if(this._requestHandlerAbortControllers.get(n.id)===m)this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,o=Number(t),r=this._progressHandlers.get(o);if(!r){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let i=this._responseHandlers.get(o),s=this._timeoutInfo.get(o);if(s&&i&&s.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(a){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),i(a);return}r(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Gf(e))n(e);else n(De.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let o=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(o,e.method),Wf(t))return this._requestWithSchemaViaCodec(o,e,t,n);let r=ZI(o,e.method);if(r===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(o,e,r,t)}_negotiatedWireCodec(){return wc(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=SZ(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(qf(t)&&!e.hasRequestMethod(t))throw new je(Me.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let o=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(o,e.method),this._requestWithSchemaViaCodec(o,e,t,n)}_requestWithSchemaViaCodec(e,t,n,o){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:s,headers:a}=o??{},c=Date.now(),u,l;return new Promise((m,f)=>{let h=(ie)=>{f(ie)};if(!this._transport){h(Error(\"Not connected\"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(ie){h(ie);return}if(o?.signal?.aborted){let ie=o.signal.reason;throw ie instanceof je?ie:new je(Me.RequestTimeout,String(ie))}let z=e.era===nh&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,C=this._requestMessageId++;l=C;let I={...t,jsonrpc:\"2.0\",id:C};if(o?.onprogress)this._progressHandlers.set(C,o.onprogress),I.params={...t.params,_meta:{...t.params?._meta,progressToken:C}};let X=this._envelopeOutbound(I),fe=!1,q=(ie)=>{if(fe)return;if(this._progressHandlers.delete(C),z===void 0)this._transport?.send(this._envelopeOutbound({jsonrpc:\"2.0\",method:\"notifications/cancelled\",params:{requestId:C,reason:String(ie)}}),{relatedRequestId:r,resumptionToken:i,onresumptiontoken:s}).catch((Se)=>this._onerror(Error(`Failed to send cancellation: ${Se}`)));else z.abort();f(ie instanceof je?ie:new je(Me.RequestTimeout,String(ie)))};this._responseHandlers.set(C,(ie)=>{if(o?.signal?.aborted)return;if(fe=!0,ie instanceof Error)return f(ie);let Se;try{Se=e.decodeResult(t.method,ie.result)}catch(Be){return f(Be instanceof Error?Be:Error(String(Be)))}if(Se.kind===\"invalid\")return f(Se.error);if(Se.kind===\"input_required\"){if(o?.allowInputRequired===!0)return m(kZ(Se));let Be={codec:e,request:t,resultSchema:n,options:o,flowStartedAt:c,retry:(ir,Ar)=>this._requestWithSchemaViaCodec(e,ir===void 0?{method:t.method}:{method:t.method,params:ir},n,Ar)};return m(this._resolveNonCompleteResult(Se,Be))}let at=Se.result;Vf(n,at).then((Be)=>{if(Be.success)m(Be.data);else f(new je(Me.InvalidResult,`Invalid result for ${t.method}: ${Be.error}`))},f)}),u=()=>q(o?.signal?.reason),o?.signal?.addEventListener(\"abort\",u,{once:!0});let E=o?.timeout??pT,U=()=>q(new je(Me.RequestTimeout,\"Request timed out\",{timeout:E}));this._setupTimeout(C,E,o?.maxTotalTimeout,U,o?.resetTimeoutOnProgress??!1),this._transport.send(X,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:s,headers:a,requestSignal:z?.signal}).catch((ie)=>{this._progressHandlers.delete(C),f(ie)})}).finally(()=>{if(u)o?.signal?.removeEventListener(\"abort\",u);if(l!==void 0)this._responseHandlers.delete(l),this._cleanupTimeout(l)})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new je(Me.NotConnected,\"Not connected\");if(Ff(t.method)&&!e.hasNotificationMethod(t.method))throw new je(Me.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let o=this._envelopeOutbound({jsonrpc:\"2.0\",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;this._transport?.send(o,n).catch((r)=>this._onerror(r))});return}await this._transport.send(o,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let o;if(typeof t===\"function\"){if(!qf(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);o=(r,i)=>{let s=this._negotiatedWireCodec(),a=s.validateRequest(e,r);if(!a.ok&&a.reason===\"not-in-era\")a=s.validateInputRequest(e,r);if(!a.ok){if(a.reason===\"not-in-era\")throw new De(K.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(a.message)}return Promise.resolve(t(a.value,i))}}else if(n)o=async(r,i)=>{let s=await Vf(t.params,{...r.params});if(!s.success)throw new De(K.InvalidParams,`Invalid params for ${e}: ${s.error}`);return n(s.data,i)};else throw TypeError(\"setRequestHandler: handler is required\");this._requestHandlers.set(e,this._wrapHandler(e,o))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t===\"function\"){if(!Ff(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(o,r)=>{let i=r.validateNotification(e,o);if(!i.ok){if(i.reason===\"not-in-era\")throw new De(K.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(i.message)}return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(\"setNotificationHandler: handler is required\");this._notificationHandlers.set(e,async(o)=>{let r=await Vf(t.params,{...o.params});if(!r.success)throw new De(K.InvalidParams,`Invalid params for notification ${e}: ${r.error}`);await n(r.data,o)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Jf(e){return e!==null&&typeof e===\"object\"&&!Array.isArray(e)}function AI(e){return typeof e===\"object\"&&e!==null&&!Array.isArray(e)}function wZ(e){let t={},n=[];if(!AI(e))return{accepted:t,droppedKeys:n};for(let[o,r]of Object.entries(e)){if(!AI(r)||\"method\"in r||\"result\"in r){n.push(o);continue}t[o]=r}return{accepted:t,droppedKeys:n}}function kZ(e){return{resultType:\"input_required\",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}/*!\n* content-type\n* Copyright(c) 2015 Douglas Christopher Wilson\n* MIT Licensed\n*/var PZ=cy((e)=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *(\"(?:[\\u000b\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\u000b\\u0020-\\u00ff])*\"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\\\([\\u000b\\u0020-\\u00ff])/g,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=r;function r(a){if(!a)throw TypeError(\"argument string is required\");var c=typeof a===\"object\"?i(a):a;if(typeof c!==\"string\")throw TypeError(\"argument string is required to be a string\");var u=c.indexOf(\";\"),l=u!==-1?c.slice(0,u).trim():c.trim();if(!o.test(l))throw TypeError(\"invalid media type\");var m=new s(l.toLowerCase());if(u!==-1){var f,h,z;t.lastIndex=u;while(h=t.exec(c)){if(h.index!==u)throw TypeError(\"invalid parameter format\");if(u+=h[0].length,f=h[1].toLowerCase(),z=h[2],z.charCodeAt(0)===34){if(z=z.slice(1,-1),z.indexOf(\"\\\\\")!==-1)z=z.replace(n,\"$1\")}m.parameters[f]=z}if(u!==c.length)throw TypeError(\"invalid parameter format\")}return m}function i(a){var c;if(typeof a.getHeader===\"function\")c=a.getHeader(\"content-type\");else if(typeof a.headers===\"object\")c=a.headers&&a.headers[\"content-type\"];if(typeof c!==\"string\")throw TypeError(\"content-type header is missing from object\");return c}function s(a){this.parameters=Object.create(null),this.type=a}}),IL=ly(PZ(),1);var DL=typeof self<\"u\"&&self.location&&self.location.origin!==\"null\"?new URL(self.location.origin+self.location.pathname+location.search):new URL(\"https://github.com/cfworker\");var RZ=/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/,IZ=[0,31,28,31,30,31,30,31,31,30,31,30,31],TZ=/^(\\d\\d):(\\d\\d):(\\d\\d)(\\.\\d+)?(z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,EZ=/^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i,OZ=/^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'\"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,jZ=/^(?:(?:[^\\x00-\\x20\"'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,NZ=/^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,CZ=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,ZZ=/^(?:\\/(?:[^~/]|~0|~1)*)*$/,AZ=/^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,UZ=/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,MZ=(e)=>{if(e[0]==='\"')return!1;let[t,n,...o]=e.split(\"@\");if(!t||!n||o.length!==0||t.length>64||n.length>253)return!1;if(t[0]===\".\"||t.endsWith(\".\")||t.includes(\"..\"))return!1;if(!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t))return!1;return n.split(\".\").every((r)=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(r))},DZ=/^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,LZ=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,qZ=(e)=>e.length>1&&e.length<80&&(/^P\\d+([.,]\\d+)?W$/.test(e)||/^P[\\dYMDTHS]*(\\d[.,]\\d+)?[YMDHS]$/.test(e)&&/^P([.,\\d]+Y)?([.,\\d]+M)?([.,\\d]+D)?(T([.,\\d]+H)?([.,\\d]+M)?([.,\\d]+S)?)?$/.test(e));function jt(e){return e.test.bind(e)}var LL={date:fT,time:hT.bind(void 0,!1),\"date-time\":JZ,duration:qZ,uri:GZ,\"uri-reference\":jt(OZ),\"uri-template\":jt(jZ),url:jt(NZ),email:MZ,hostname:jt(EZ),ipv4:jt(DZ),ipv6:jt(LZ),regex:KZ,uuid:jt(CZ),\"json-pointer\":jt(ZZ),\"json-pointer-uri-fragment\":jt(AZ),\"relative-json-pointer\":jt(UZ)};function FZ(e){return e%4===0&&(e%100!==0||e%400===0)}function fT(e){let t=e.match(RZ);if(!t)return!1;let n=+t[1],o=+t[2],r=+t[3];return o>=1&&o<=12&&r>=1&&r<=(o==2&&FZ(n)?29:IZ[o])}function hT(e,t){let n=t.match(TZ);if(!n)return!1;let o=+n[1],r=+n[2],i=+n[3],s=!!n[5];return(o<=23&&r<=59&&i<=59||o==23&&r==59&&i==60)&&(!e||s)}var VZ=/t|\\s/i;function JZ(e){let t=e.split(VZ);return t.length==2&&fT(t[0])&&hT(!0,t[1])}var BZ=/\\/|:/,HZ=/^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function GZ(e){return BZ.test(e)&&HZ.test(e)}var WZ=/[^\\\\]\\\\Z/;function KZ(e){if(WZ.test(e))return!1;try{return new RegExp(e,\"u\"),!0}catch(t){return!1}}var XZ;XZ=globalThis.crypto;var Pc=class extends Error{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.OAuthClientFlowError\"})}static[Symbol.hasInstance](e){return mt(this,e)}static isInstance(e){if(typeof this!==\"function\")throw TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");return mt(this,e)}constructor(e){super(e);this.name=new.target.name,_n(this,new.target)}},Oq=class extends Pc{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.IssuerMismatchError\"})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===\"metadata\"?\"authorization server metadata (RFC 8414 §3.3)\":\"authorization response (RFC 9207)\"}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`);this.kind=e,this.expected=t,this.received=n}},jq=class extends Pc{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.RegistrationRejectedError\"})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`);this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},Nq=class extends Pc{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.InsecureTokenEndpointError\"})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / 127.0.0.1 / ::1 are exempt).`);this.tokenEndpoint=e}},Cq=class extends Pc{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.AuthorizationServerMismatchError\"})}constructor(e,t){super(`Authorization server changed between redirect and callback (redirected to ${JSON.stringify(e)}, callback resolved ${JSON.stringify(t)}); refusing to send authorization_code/code_verifier to a different token endpoint`);this.recordedIssuer=e,this.currentIssuer=t}},Zq=class extends Pc{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.InsufficientScopeError\"})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required \"${e.requiredScope}\"`:\"\"}`);this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var Aq=class extends Error{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.UnauthorizedError\"})}static[Symbol.hasInstance](e){return mt(this,e)}static isInstance(e){if(typeof this!==\"function\")throw TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");return mt(this,e)}constructor(e){super(e??\"Unauthorized\");this.name=\"UnauthorizedError\",_n(this,new.target)}};var Uq=class extends Error{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.SseError\"})}static[Symbol.hasInstance](e){return mt(this,e)}static isInstance(e){if(typeof this!==\"function\")throw TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");return mt(this,e)}constructor(e,t,n){super(`SSE error: ${t}`);this.code=e,this.event=n,_n(this,new.target)}};var p={};tt(p,{$brand:()=>ch,$input:()=>$v,$output:()=>zv,NEVER:()=>ah,TimePrecision:()=>Rv,ZodAny:()=>vS,ZodArray:()=>zS,ZodBase64:()=>gp,ZodBase64URL:()=>_p,ZodBigInt:()=>ui,ZodBigIntFormat:()=>Sp,ZodBoolean:()=>ci,ZodCIDRv4:()=>fp,ZodCIDRv6:()=>hp,ZodCUID:()=>ap,ZodCUID2:()=>cp,ZodCatch:()=>VS,ZodCodec:()=>cu,ZodCustom:()=>uu,ZodCustomStringFormat:()=>si,ZodDate:()=>nu,ZodDefault:()=>US,ZodDiscriminatedUnion:()=>xS,ZodE164:()=>vp,ZodEmail:()=>op,ZodEmoji:()=>ip,ZodEnum:()=>oi,ZodError:()=>I4,ZodExactOptional:()=>CS,ZodFile:()=>jS,ZodFirstPartyTypeKind:()=>ny,ZodFunction:()=>ey,ZodGUID:()=>Xc,ZodIPv4:()=>pp,ZodIPv6:()=>mp,ZodISODate:()=>Xd,ZodISODateTime:()=>Yd,ZodISODuration:()=>ep,ZodISOTime:()=>Qd,ZodIntersection:()=>wS,ZodIssueCode:()=>E4,ZodJWT:()=>bp,ZodKSUID:()=>dp,ZodLazy:()=>YS,ZodLiteral:()=>OS,ZodMAC:()=>dS,ZodMap:()=>TS,ZodNaN:()=>BS,ZodNanoID:()=>sp,ZodNever:()=>SS,ZodNonOptional:()=>kp,ZodNull:()=>gS,ZodNullable:()=>AS,ZodNumber:()=>ai,ZodNumberFormat:()=>Pn,ZodObject:()=>iu,ZodOptional:()=>wp,ZodPipe:()=>au,ZodPrefault:()=>DS,ZodPreprocess:()=>HS,ZodPromise:()=>QS,ZodReadonly:()=>GS,ZodRealError:()=>st,ZodRecord:()=>ni,ZodSet:()=>ES,ZodString:()=>ii,ZodStringFormat:()=>de,ZodSuccess:()=>FS,ZodSymbol:()=>fS,ZodTemplateLiteral:()=>KS,ZodTransform:()=>NS,ZodTuple:()=>PS,ZodType:()=>J,ZodULID:()=>up,ZodURL:()=>ru,ZodUUID:()=>Ut,ZodUndefined:()=>hS,ZodUnion:()=>su,ZodUnknown:()=>bS,ZodVoid:()=>yS,ZodXID:()=>lp,ZodXor:()=>$S,_ZodString:()=>np,_default:()=>MS,_function:()=>u0,any:()=>DE,array:()=>ou,base64:()=>$E,base64url:()=>xE,bigint:()=>CE,boolean:()=>mS,catch:()=>JS,check:()=>l0,cidrv4:()=>yE,cidrv6:()=>zE,clone:()=>We,codec:()=>i0,coerce:()=>oy,config:()=>Te,core:()=>or,cuid:()=>mE,cuid2:()=>fE,custom:()=>d0,date:()=>qE,decode:()=>oS,decodeAsync:()=>sS,describe:()=>p0,discriminatedUnion:()=>GE,e164:()=>wE,email:()=>nE,emoji:()=>dE,encode:()=>nS,encodeAsync:()=>iS,endsWith:()=>Ho,enum:()=>$p,exactOptional:()=>ZS,file:()=>t0,flattenError:()=>Cc,float32:()=>EE,float64:()=>OE,formatError:()=>Zc,fromJSONSchema:()=>b0,function:()=>u0,getErrorMap:()=>j4,globalRegistry:()=>Le,gt:()=>Zt,gte:()=>Ye,guid:()=>oE,hash:()=>TE,hex:()=>IE,hostname:()=>RE,httpUrl:()=>lE,includes:()=>Jo,instanceof:()=>f0,int:()=>tp,int32:()=>jE,int64:()=>ZE,intersection:()=>kS,invertCodec:()=>s0,ipv4:()=>vE,ipv6:()=>SE,iso:()=>ri,json:()=>g0,jwt:()=>kE,keyof:()=>FE,ksuid:()=>_E,lazy:()=>XS,length:()=>wn,literal:()=>e0,locales:()=>Hc,looseObject:()=>BE,looseRecord:()=>KE,lowercase:()=>Fo,lt:()=>Ct,lte:()=>ht,mac:()=>bE,map:()=>YE,maxLength:()=>xn,maxSize:()=>jr,meta:()=>m0,mime:()=>Go,minLength:()=>nr,minSize:()=>At,multipleOf:()=>Or,nan:()=>o0,nanoid:()=>pE,nativeEnum:()=>QE,negative:()=>qd,never:()=>yp,nonnegative:()=>Vd,nonoptional:()=>qS,nonpositive:()=>Fd,normalize:()=>Wo,null:()=>_S,nullable:()=>eu,nullish:()=>r0,number:()=>pS,object:()=>VE,optional:()=>Qc,overwrite:()=>kt,parse:()=>Qb,parseAsync:()=>eS,partialRecord:()=>WE,pipe:()=>rp,positive:()=>Ld,prefault:()=>LS,preprocess:()=>_0,prettifyError:()=>Sh,promise:()=>c0,property:()=>Jd,readonly:()=>WS,record:()=>IS,refine:()=>ty,regex:()=>qo,regexes:()=>ft,registry:()=>Sd,safeDecode:()=>cS,safeDecodeAsync:()=>lS,safeEncode:()=>aS,safeEncodeAsync:()=>uS,safeParse:()=>tS,safeParseAsync:()=>rS,set:()=>XE,setErrorMap:()=>O4,size:()=>$n,slugify:()=>Qo,startsWith:()=>Bo,strictObject:()=>JE,string:()=>Yc,stringFormat:()=>PE,stringbool:()=>h0,success:()=>n0,superRefine:()=>ry,symbol:()=>UE,templateLiteral:()=>a0,toJSONSchema:()=>Wd,toLowerCase:()=>Yo,toUpperCase:()=>Xo,transform:()=>xp,treeifyError:()=>bh,trim:()=>Ko,tuple:()=>RS,uint32:()=>NE,uint64:()=>AE,ulid:()=>hE,undefined:()=>ME,union:()=>zp,unknown:()=>kn,uppercase:()=>Vo,url:()=>uE,util:()=>k,uuid:()=>iE,uuidv4:()=>sE,uuidv6:()=>aE,uuidv7:()=>cE,void:()=>LE,xid:()=>gE,xor:()=>HE});var or={};tt(or,{$ZodAny:()=>Wg,$ZodArray:()=>e_,$ZodAsyncError:()=>Nt,$ZodBase64:()=>Mg,$ZodBase64URL:()=>Dg,$ZodBigInt:()=>gd,$ZodBigIntFormat:()=>Jg,$ZodBoolean:()=>Dc,$ZodCIDRv4:()=>Zg,$ZodCIDRv6:()=>Ag,$ZodCUID:()=>xg,$ZodCUID2:()=>wg,$ZodCatch:()=>v_,$ZodCheck:()=>me,$ZodCheckBigIntFormat:()=>eg,$ZodCheckEndsWith:()=>pg,$ZodCheckGreaterThan:()=>ud,$ZodCheckIncludes:()=>lg,$ZodCheckLengthEquals:()=>sg,$ZodCheckLessThan:()=>cd,$ZodCheckLowerCase:()=>cg,$ZodCheckMaxLength:()=>og,$ZodCheckMaxSize:()=>tg,$ZodCheckMimeType:()=>fg,$ZodCheckMinLength:()=>ig,$ZodCheckMinSize:()=>rg,$ZodCheckMultipleOf:()=>Xh,$ZodCheckNumberFormat:()=>Qh,$ZodCheckOverwrite:()=>hg,$ZodCheckProperty:()=>mg,$ZodCheckRegex:()=>ag,$ZodCheckSizeEquals:()=>ng,$ZodCheckStartsWith:()=>dg,$ZodCheckStringFormat:()=>Do,$ZodCheckUpperCase:()=>ug,$ZodCodec:()=>qc,$ZodCustom:()=>k_,$ZodCustomStringFormat:()=>Fg,$ZodDate:()=>Qg,$ZodDefault:()=>f_,$ZodDiscriminatedUnion:()=>n_,$ZodE164:()=>Lg,$ZodEmail:()=>Sg,$ZodEmoji:()=>zg,$ZodEncodeError:()=>bn,$ZodEnum:()=>c_,$ZodError:()=>Nc,$ZodExactOptional:()=>p_,$ZodFile:()=>l_,$ZodFunction:()=>$_,$ZodGUID:()=>vg,$ZodIPv4:()=>jg,$ZodIPv6:()=>Ng,$ZodISODate:()=>Tg,$ZodISODateTime:()=>Ig,$ZodISODuration:()=>Og,$ZodISOTime:()=>Eg,$ZodIntersection:()=>o_,$ZodJWT:()=>qg,$ZodKSUID:()=>Rg,$ZodLazy:()=>w_,$ZodLiteral:()=>u_,$ZodMAC:()=>Cg,$ZodMap:()=>s_,$ZodNaN:()=>b_,$ZodNanoID:()=>$g,$ZodNever:()=>Yg,$ZodNonOptional:()=>g_,$ZodNull:()=>Gg,$ZodNullable:()=>m_,$ZodNumber:()=>hd,$ZodNumberFormat:()=>Vg,$ZodObject:()=>HT,$ZodObjectJIT:()=>t_,$ZodOptional:()=>vd,$ZodPipe:()=>bd,$ZodPrefault:()=>h_,$ZodPreprocess:()=>S_,$ZodPromise:()=>x_,$ZodReadonly:()=>y_,$ZodRealError:()=>it,$ZodRecord:()=>i_,$ZodRegistry:()=>xv,$ZodSet:()=>a_,$ZodString:()=>zn,$ZodStringFormat:()=>le,$ZodSuccess:()=>__,$ZodSymbol:()=>Bg,$ZodTemplateLiteral:()=>z_,$ZodTransform:()=>d_,$ZodTuple:()=>_d,$ZodType:()=>V,$ZodULID:()=>kg,$ZodURL:()=>yg,$ZodUUID:()=>bg,$ZodUndefined:()=>Hg,$ZodUnion:()=>Lc,$ZodUnknown:()=>Kg,$ZodVoid:()=>Xg,$ZodXID:()=>Pg,$ZodXor:()=>r_,$brand:()=>ch,$constructor:()=>_,$input:()=>$v,$output:()=>zv,Doc:()=>ld,JSONSchema:()=>eE,JSONSchemaGenerator:()=>Gb,NEVER:()=>ah,TimePrecision:()=>Rv,_any:()=>Wv,_array:()=>rb,_base64:()=>Ad,_base64url:()=>Ud,_bigint:()=>qv,_boolean:()=>Dv,_catch:()=>y4,_check:()=>QT,_cidrv4:()=>Cd,_cidrv6:()=>Zd,_coercedBigint:()=>Fv,_coercedBoolean:()=>Lv,_coercedDate:()=>eb,_coercedNumber:()=>Nv,_coercedString:()=>kv,_cuid:()=>Rd,_cuid2:()=>Id,_custom:()=>ob,_date:()=>Qv,_decode:()=>ed,_decodeAsync:()=>rd,_default:()=>v4,_discriminatedUnion:()=>s4,_e164:()=>Md,_email:()=>yd,_emoji:()=>kd,_encode:()=>Ql,_encodeAsync:()=>td,_endsWith:()=>Ho,_enum:()=>p4,_file:()=>nb,_float32:()=>Zv,_float64:()=>Av,_gt:()=>Zt,_gte:()=>Ye,_guid:()=>Gc,_includes:()=>Jo,_int:()=>Cv,_int32:()=>Uv,_int64:()=>Vv,_intersection:()=>a4,_ipv4:()=>jd,_ipv6:()=>Nd,_isoDate:()=>Tv,_isoDateTime:()=>Iv,_isoDuration:()=>Ov,_isoTime:()=>Ev,_jwt:()=>Dd,_ksuid:()=>Od,_lazy:()=>w4,_length:()=>wn,_literal:()=>f4,_lowercase:()=>Fo,_lt:()=>Ct,_lte:()=>ht,_mac:()=>Pv,_map:()=>l4,_max:()=>ht,_maxLength:()=>xn,_maxSize:()=>jr,_mime:()=>Go,_min:()=>Ye,_minLength:()=>nr,_minSize:()=>At,_multipleOf:()=>Or,_nan:()=>tb,_nanoid:()=>Pd,_nativeEnum:()=>m4,_negative:()=>qd,_never:()=>Yv,_nonnegative:()=>Vd,_nonoptional:()=>b4,_nonpositive:()=>Fd,_normalize:()=>Wo,_null:()=>Gv,_nullable:()=>_4,_number:()=>jv,_optional:()=>g4,_overwrite:()=>kt,_parse:()=>Zo,_parseAsync:()=>Ao,_pipe:()=>z4,_positive:()=>Ld,_promise:()=>k4,_property:()=>Jd,_readonly:()=>$4,_record:()=>u4,_refine:()=>ib,_regex:()=>qo,_safeDecode:()=>od,_safeDecodeAsync:()=>sd,_safeEncode:()=>nd,_safeEncodeAsync:()=>id,_safeParse:()=>Uo,_safeParseAsync:()=>Mo,_set:()=>d4,_size:()=>$n,_slugify:()=>Qo,_startsWith:()=>Bo,_string:()=>wv,_stringFormat:()=>ei,_stringbool:()=>ub,_success:()=>S4,_superRefine:()=>sb,_symbol:()=>Bv,_templateLiteral:()=>x4,_toLowerCase:()=>Yo,_toUpperCase:()=>Xo,_transform:()=>h4,_trim:()=>Ko,_tuple:()=>c4,_uint32:()=>Mv,_uint64:()=>Jv,_ulid:()=>Td,_undefined:()=>Hv,_union:()=>o4,_unknown:()=>Kv,_uppercase:()=>Vo,_url:()=>Wc,_uuid:()=>zd,_uuidv4:()=>$d,_uuidv6:()=>xd,_uuidv7:()=>wd,_void:()=>Xv,_xid:()=>Ed,_xor:()=>i4,clone:()=>We,config:()=>Te,createStandardJSONSchemaMethod:()=>ti,createToJSONSchemaMethod:()=>lb,decode:()=>kA,decodeAsync:()=>RA,describe:()=>ab,encode:()=>wA,encodeAsync:()=>PA,extractDefs:()=>Cr,finalize:()=>Zr,flattenError:()=>Cc,formatError:()=>Zc,globalConfig:()=>vn,globalRegistry:()=>Le,initializeContext:()=>Nr,isValidBase64:()=>Ug,isValidBase64URL:()=>FT,isValidJWT:()=>VT,locales:()=>Hc,meta:()=>cb,parse:()=>Yl,parseAsync:()=>Xl,prettifyError:()=>Sh,process:()=>ae,regexes:()=>ft,registry:()=>Sd,safeDecode:()=>TA,safeDecodeAsync:()=>OA,safeEncode:()=>IA,safeEncodeAsync:()=>EA,safeParse:()=>yh,safeParseAsync:()=>zh,toDotPath:()=>zT,toJSONSchema:()=>Wd,treeifyError:()=>bh,util:()=>k,version:()=>gg});var gT,ah=Object.freeze({status:\"aborted\"});function _(e,t,n){function o(a,c){if(!a._zod)Object.defineProperty(a,\"_zod\",{value:{def:c,constr:s,traits:new Set},enumerable:!1});if(a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=s.prototype,l=Object.keys(u);for(let m=0;m<l.length;m++){let f=l[m];if(!(f in a))a[f]=u[f].bind(a)}}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,\"name\",{value:e});function s(a){var c;let u=n?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,\"init\",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:(a)=>{if(n?.Parent&&a instanceof n.Parent)return!0;return a?._zod?.traits?.has(e)}}),Object.defineProperty(s,\"name\",{value:e}),s}var ch=Symbol(\"zod_brand\");class Nt extends Error{constructor(){super(\"Encountered Promise during synchronous parse. Use .parseAsync() instead.\")}}class bn extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name=\"ZodEncodeError\"}}(gT=globalThis).__zod_globalConfig??(gT.__zod_globalConfig={});var vn=globalThis.__zod_globalConfig;function Te(e){if(e)Object.assign(vn,e);return vn}var k={};tt(k,{BIGINT_FORMAT_RANGES:()=>_h,Class:()=>ST,NUMBER_FORMAT_RANGES:()=>gh,aborted:()=>Er,allowsEval:()=>ph,assert:()=>nA,assertEqual:()=>QZ,assertIs:()=>tA,assertNever:()=>rA,assertNotEqual:()=>eA,assignProp:()=>Ir,base64ToUint8Array:()=>vT,base64urlToUint8Array:()=>SA,cached:()=>No,captureStackTrace:()=>Kl,cleanEnum:()=>bA,cleanRegex:()=>Tc,clone:()=>We,cloneDef:()=>iA,createTransparentProxy:()=>dA,defineLazy:()=>W,esc:()=>Wl,escapeRegex:()=>St,explicitlyAborted:()=>vh,extend:()=>fA,finalizeIssue:()=>Ke,floatSafeRemainder:()=>lh,getElementAtPath:()=>sA,getEnumValues:()=>Ic,getLengthableOrigin:()=>jc,getParsedType:()=>lA,getSizableOrigin:()=>Oc,hexToUint8Array:()=>zA,isObject:()=>Sn,isPlainObject:()=>Tr,issue:()=>Co,joinValues:()=>v,jsonStringifyReplacer:()=>jo,merge:()=>gA,mergeDefs:()=>rr,normalizeParams:()=>R,nullish:()=>Rr,numKeys:()=>uA,objectClone:()=>oA,omit:()=>mA,optionalKeys:()=>hh,parsedType:()=>w,partial:()=>_A,pick:()=>pA,prefixIssues:()=>ot,primitiveTypes:()=>fh,promiseAllObject:()=>aA,propertyKeyTypes:()=>Ec,randomString:()=>cA,required:()=>vA,safeExtend:()=>hA,shallowClone:()=>mh,slugify:()=>dh,stringifyPrimitive:()=>x,uint8ArrayToBase64:()=>bT,uint8ArrayToBase64url:()=>yA,uint8ArrayToHex:()=>$A,unwrapMessage:()=>Rc});function QZ(e){return e}function eA(e){return e}function tA(e){}function rA(e){throw Error(\"Unexpected value in exhaustive check\")}function nA(e){}function Ic(e){let t=Object.values(e).filter((o)=>typeof o===\"number\");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function v(e,t=\"|\"){return e.map((n)=>x(n)).join(t)}function jo(e,t){if(typeof t===\"bigint\")return t.toString();return t}function No(e){return{get value(){{let n=e();return Object.defineProperty(this,\"value\",{value:n}),n}throw Error(\"cached value already set\")}}}function Rr(e){return e===null||e===void 0}function Tc(e){let t=e.startsWith(\"^\")?1:0,n=e.endsWith(\"$\")?e.length-1:e.length;return e.slice(t,n)}function lh(e,t){let n=e/t,o=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);if(Math.abs(n-o)<r)return 0;return n-o}var _T=Symbol(\"evaluating\");function W(e,t,n){let o=void 0;Object.defineProperty(e,t,{get(){if(o===_T)return;if(o===void 0)o=_T,o=n();return o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function oA(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ir(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function rr(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function iA(e){return rr(e._zod.def)}function sA(e,t){if(!t)return e;return t.reduce((n,o)=>n?.[o],e)}function aA(e){let t=Object.keys(e),n=t.map((o)=>e[o]);return Promise.all(n).then((o)=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function cA(e=10){let n=\"\";for(let o=0;o<e;o++)n+=\"abcdefghijklmnopqrstuvwxyz\"[Math.floor(Math.random()*26)];return n}function Wl(e){return JSON.stringify(e)}function dh(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,\"\").replace(/[\\s_-]+/g,\"-\").replace(/^-+|-+$/g,\"\")}var Kl=\"captureStackTrace\"in Error?Error.captureStackTrace:(...e)=>{};function Sn(e){return typeof e===\"object\"&&e!==null&&!Array.isArray(e)}var ph=No(()=>{if(vn.jitless)return!1;if(typeof navigator<\"u\"&&navigator?.userAgent?.includes(\"Cloudflare\"))return!1;try{return new Function(\"\"),!0}catch(e){return!1}});function Tr(e){if(Sn(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!==\"function\")return!0;let n=t.prototype;if(Sn(n)===!1)return!1;if(Object.prototype.hasOwnProperty.call(n,\"isPrototypeOf\")===!1)return!1;return!0}function mh(e){if(Tr(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}function uA(e){let t=0;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n))t++;return t}var lA=(e)=>{let t=typeof e;switch(t){case\"undefined\":return\"undefined\";case\"string\":return\"string\";case\"number\":return Number.isNaN(e)?\"nan\":\"number\";case\"boolean\":return\"boolean\";case\"function\":return\"function\";case\"bigint\":return\"bigint\";case\"symbol\":return\"symbol\";case\"object\":if(Array.isArray(e))return\"array\";if(e===null)return\"null\";if(e.then&&typeof e.then===\"function\"&&e.catch&&typeof e.catch===\"function\")return\"promise\";if(typeof Map<\"u\"&&e instanceof Map)return\"map\";if(typeof Set<\"u\"&&e instanceof Set)return\"set\";if(typeof Date<\"u\"&&e instanceof Date)return\"date\";if(typeof File<\"u\"&&e instanceof File)return\"file\";return\"object\";default:throw Error(`Unknown data type: ${t}`)}},Ec=new Set([\"string\",\"number\",\"symbol\"]),fh=new Set([\"string\",\"number\",\"bigint\",\"boolean\",\"symbol\",\"undefined\"]);function St(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function We(e,t,n){let o=new e._zod.constr(t??e._zod.def);if(!t||n?.parent)o._zod.parent=e;return o}function R(e){let t=e;if(!t)return{};if(typeof t===\"string\")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error(\"Cannot specify both `message` and `error` params\");t.error=t.message}if(delete t.message,typeof t.error===\"string\")return{...t,error:()=>t.error};return t}function dA(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function x(e){if(typeof e===\"bigint\")return e.toString()+\"n\";if(typeof e===\"string\")return`\"${e}\"`;return`${e}`}function hh(e){return Object.keys(e).filter((t)=>e[t]._zod.optin===\"optional\"&&e[t]._zod.optout===\"optional\")}var gh={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},_h={int64:[BigInt(\"-9223372036854775808\"),BigInt(\"9223372036854775807\")],uint64:[BigInt(0),BigInt(\"18446744073709551615\")]};function pA(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw Error(\".pick() cannot be used on object schemas containing refinements\");let i=rr(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in n.shape))throw Error(`Unrecognized key: \"${a}\"`);if(!t[a])continue;s[a]=n.shape[a]}return Ir(this,\"shape\",s),s},checks:[]});return We(e,i)}function mA(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw Error(\".omit() cannot be used on object schemas containing refinements\");let i=rr(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in n.shape))throw Error(`Unrecognized key: \"${a}\"`);if(!t[a])continue;delete s[a]}return Ir(this,\"shape\",s),s},checks:[]});return We(e,i)}function fA(e,t){if(!Tr(t))throw Error(\"Invalid input to extend: expected a plain object\");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\")}let r=rr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ir(this,\"shape\",i),i}});return We(e,r)}function hA(e,t){if(!Tr(t))throw Error(\"Invalid input to safeExtend: expected a plain object\");let n=rr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Ir(this,\"shape\",o),o}});return We(e,n)}function gA(e,t){if(e._zod.def.checks?.length)throw Error(\".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.\");let n=rr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Ir(this,\"shape\",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return We(e,n)}function _A(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(\".partial() cannot be used on object schemas containing refinements\");let s=rr(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(n)for(let u in n){if(!(u in a))throw Error(`Unrecognized key: \"${u}\"`);if(!n[u])continue;c[u]=e?new e({type:\"optional\",innerType:a[u]}):a[u]}else for(let u in a)c[u]=e?new e({type:\"optional\",innerType:a[u]}):a[u];return Ir(this,\"shape\",c),c},checks:[]});return We(t,s)}function vA(e,t,n){let o=rr(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let s in n){if(!(s in i))throw Error(`Unrecognized key: \"${s}\"`);if(!n[s])continue;i[s]=new e({type:\"nonoptional\",innerType:r[s]})}else for(let s in r)i[s]=new e({type:\"nonoptional\",innerType:r[s]});return Ir(this,\"shape\",i),i}});return We(t,o)}function Er(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function vh(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ot(e,t){return t.map((n)=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Rc(e){return typeof e===\"string\"?e:e?.message}function Ke(e,t,n){let o=e.message?e.message:Rc(e.inst?._zod.def?.error?.(e))??Rc(t?.error?.(e))??Rc(n.customError?.(e))??Rc(n.localeError?.(e))??\"Invalid input\",{inst:r,continue:i,input:s,...a}=e;if(a.path??(a.path=[]),a.message=o,t?.reportInput)a.input=s;return a}function Oc(e){if(e instanceof Set)return\"set\";if(e instanceof Map)return\"map\";if(e instanceof File)return\"file\";return\"unknown\"}function jc(e){if(Array.isArray(e))return\"array\";if(typeof e===\"string\")return\"string\";return\"unknown\"}function w(e){let t=typeof e;switch(t){case\"number\":return Number.isNaN(e)?\"nan\":\"number\";case\"object\":{if(e===null)return\"null\";if(Array.isArray(e))return\"array\";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&\"constructor\"in n&&n.constructor)return n.constructor.name}}return t}function Co(...e){let[t,n,o]=e;if(typeof t===\"string\")return{message:t,code:\"custom\",input:n,inst:o};return{...t}}function bA(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map((t)=>t[1])}function vT(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function bT(e){let t=\"\";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function SA(e){let t=e.replace(/-/g,\"+\").replace(/_/g,\"/\"),n=\"=\".repeat((4-t.length%4)%4);return vT(t+n)}function yA(e){return bT(e).replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=/g,\"\")}function zA(e){let t=e.replace(/^0x/,\"\");if(t.length%2!==0)throw Error(\"Invalid hex string length\");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function $A(e){return Array.from(e).map((t)=>t.toString(16).padStart(2,\"0\")).join(\"\")}class ST{constructor(...e){}}var yT=(e,t)=>{e.name=\"$ZodError\",Object.defineProperty(e,\"_zod\",{value:e._zod,enumerable:!1}),Object.defineProperty(e,\"issues\",{value:t,enumerable:!1}),e.message=JSON.stringify(t,jo,2),Object.defineProperty(e,\"toString\",{value:()=>e.message,enumerable:!1})},Nc=_(\"$ZodError\",yT),it=_(\"$ZodError\",yT,{Parent:Error});function Cc(e,t=(n)=>n.message){let n={},o=[];for(let r of e.issues)if(r.path.length>0)n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r));else o.push(t(r));return{formErrors:o,fieldErrors:n}}function Zc(e,t=(n)=>n.message){let n={_errors:[]},o=(r,i=[])=>{for(let s of r.issues)if(s.code===\"invalid_union\"&&s.errors.length)s.errors.map((a)=>o({issues:a},[...i,...s.path]));else if(s.code===\"invalid_key\")o({issues:s.issues},[...i,...s.path]);else if(s.code===\"invalid_element\")o({issues:s.issues},[...i,...s.path]);else{let a=[...i,...s.path];if(a.length===0)n._errors.push(t(s));else{let c=n,u=0;while(u<a.length){let l=a[u];if(u!==a.length-1)c[l]=c[l]||{_errors:[]};else c[l]=c[l]||{_errors:[]},c[l]._errors.push(t(s));c=c[l],u++}}}};return o(e),n}function bh(e,t=(n)=>n.message){let n={errors:[]},o=(r,i=[])=>{var s,a;for(let c of r.issues)if(c.code===\"invalid_union\"&&c.errors.length)c.errors.map((u)=>o({issues:u},[...i,...c.path]));else if(c.code===\"invalid_key\")o({issues:c.issues},[...i,...c.path]);else if(c.code===\"invalid_element\")o({issues:c.issues},[...i,...c.path]);else{let u=[...i,...c.path];if(u.length===0){n.errors.push(t(c));continue}let l=n,m=0;while(m<u.length){let f=u[m],h=m===u.length-1;if(typeof f===\"string\")l.properties??(l.properties={}),(s=l.properties)[f]??(s[f]={errors:[]}),l=l.properties[f];else l.items??(l.items=[]),(a=l.items)[f]??(a[f]={errors:[]}),l=l.items[f];if(h)l.errors.push(t(c));m++}}};return o(e),n}function zT(e){let t=[],n=e.map((o)=>typeof o===\"object\"?o.key:o);for(let o of n)if(typeof o===\"number\")t.push(`[${o}]`);else if(typeof o===\"symbol\")t.push(`[${JSON.stringify(String(o))}]`);else if(/[^\\w$]/.test(o))t.push(`[${JSON.stringify(o)}]`);else{if(t.length)t.push(\".\");t.push(o)}return t.join(\"\")}function Sh(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)if(t.push(`✖ ${o.message}`),o.path?.length)t.push(` → at ${zT(o.path)}`);return t.join(`\n`)}var Zo=(e)=>(t,n,o,r)=>{let i=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Nt;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map((c)=>Ke(c,i,Te())));throw Kl(a,r?.callee),a}return s.value},Yl=Zo(it),Ao=(e)=>async(t,n,o,r)=>{let i=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)s=await s;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map((c)=>Ke(c,i,Te())));throw Kl(a,r?.callee),a}return s.value},Xl=Ao(it),Uo=(e)=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Nt;return i.issues.length?{success:!1,error:new(e??Nc)(i.issues.map((s)=>Ke(s,r,Te())))}:{success:!0,data:i.value}},yh=Uo(it),Mo=(e)=>async(t,n,o)=>{let r=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)i=await i;return i.issues.length?{success:!1,error:new e(i.issues.map((s)=>Ke(s,r,Te())))}:{success:!0,data:i.value}},zh=Mo(it),Ql=(e)=>(t,n,o)=>{let r=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return Zo(e)(t,n,r)},wA=Ql(it),ed=(e)=>(t,n,o)=>Zo(e)(t,n,o),kA=ed(it),td=(e)=>async(t,n,o)=>{let r=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return Ao(e)(t,n,r)},PA=td(it),rd=(e)=>async(t,n,o)=>Ao(e)(t,n,o),RA=rd(it),nd=(e)=>(t,n,o)=>{let r=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return Uo(e)(t,n,r)},IA=nd(it),od=(e)=>(t,n,o)=>Uo(e)(t,n,o),TA=od(it),id=(e)=>async(t,n,o)=>{let r=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return Mo(e)(t,n,r)},EA=id(it),sd=(e)=>async(t,n,o)=>Mo(e)(t,n,o),OA=sd(it);var ft={};tt(ft,{base64:()=>Uh,base64url:()=>ad,bigint:()=>Jh,boolean:()=>Hh,browserEmail:()=>DA,cidrv4:()=>Zh,cidrv6:()=>Ah,cuid:()=>$h,cuid2:()=>xh,date:()=>Lh,datetime:()=>Fh,domain:()=>FA,duration:()=>Ih,e164:()=>Dh,email:()=>Eh,emoji:()=>Oh,extendedDuration:()=>jA,guid:()=>Th,hex:()=>VA,hostname:()=>qA,html5Email:()=>AA,httpProtocol:()=>Mh,idnEmail:()=>MA,integer:()=>Bh,ipv4:()=>jh,ipv6:()=>Nh,ksuid:()=>Ph,lowercase:()=>Kh,mac:()=>Ch,md5_base64:()=>BA,md5_base64url:()=>HA,md5_hex:()=>JA,nanoid:()=>Rh,null:()=>Gh,number:()=>Ac,rfc5322Email:()=>UA,sha1_base64:()=>WA,sha1_base64url:()=>KA,sha1_hex:()=>GA,sha256_base64:()=>XA,sha256_base64url:()=>QA,sha256_hex:()=>YA,sha384_base64:()=>tU,sha384_base64url:()=>rU,sha384_hex:()=>eU,sha512_base64:()=>oU,sha512_base64url:()=>iU,sha512_hex:()=>nU,string:()=>Vh,time:()=>qh,ulid:()=>wh,undefined:()=>Wh,unicodeEmail:()=>$T,uppercase:()=>Yh,uuid:()=>yn,uuid4:()=>NA,uuid6:()=>CA,uuid7:()=>ZA,xid:()=>kh});var $h=/^[cC][0-9a-z]{6,}$/,xh=/^[0-9a-z]+$/,wh=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kh=/^[0-9a-vA-V]{20}$/,Ph=/^[A-Za-z0-9]{27}$/,Rh=/^[a-zA-Z0-9_-]{21}$/,Ih=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,jA=/^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/,Th=/^([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})$/,yn=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},NA=yn(4),CA=yn(6),ZA=yn(7),Eh=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,AA=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,UA=/^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,$T=/^[^\\s@\"]{1,64}@[^\\s@]{1,255}$/u,MA=$T,DA=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,LA=\"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\";function Oh(){return new RegExp(LA,\"u\")}var jh=/^(?:(?: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])$/,Nh=/^(([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}|:))$/,Ch=(e)=>{let t=St(e??\":\");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Zh=/^((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])$/,Ah=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Uh=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ad=/^[A-Za-z0-9_-]*$/,qA=/^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/,FA=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/,Mh=/^https?$/,Dh=/^\\+[1-9]\\d{6,14}$/,xT=\"(?:(?:\\\\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])))\",Lh=new RegExp(`^${xT}$`);function wT(e){return typeof e.precision===\"number\"?e.precision===-1?\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d\":e.precision===0?\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\":`(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?\"}function qh(e){return new RegExp(`^${wT(e)}$`)}function Fh(e){let t=wT({precision:e.precision}),n=[\"Z\"];if(e.local)n.push(\"\");if(e.offset)n.push(\"([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)\");let o=`${t}(?:${n.join(\"|\")})`;return new RegExp(`^${xT}T(?:${o})$`)}var Vh=(e)=>{let t=e?`[\\\\s\\\\S]{${e?.minimum??0},${e?.maximum??\"\"}}`:\"[\\\\s\\\\S]*\";return new RegExp(`^${t}$`)},Jh=/^-?\\d+n?$/,Bh=/^-?\\d+$/,Ac=/^-?\\d+(?:\\.\\d+)?$/,Hh=/^(?:true|false)$/i,Gh=/^null$/i;var Wh=/^undefined$/i;var Kh=/^[^A-Z]*$/,Yh=/^[^a-z]*$/,VA=/^[0-9a-fA-F]*$/;function Uc(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Mc(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var JA=/^[0-9a-fA-F]{32}$/,BA=Uc(22,\"==\"),HA=Mc(22),GA=/^[0-9a-fA-F]{40}$/,WA=Uc(27,\"=\"),KA=Mc(27),YA=/^[0-9a-fA-F]{64}$/,XA=Uc(43,\"=\"),QA=Mc(43),eU=/^[0-9a-fA-F]{96}$/,tU=Uc(64,\"\"),rU=Mc(64),nU=/^[0-9a-fA-F]{128}$/,oU=Uc(86,\"==\"),iU=Mc(86);var me=_(\"$ZodCheck\",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),PT={number:\"number\",bigint:\"bigint\",object:\"date\"},cd=_(\"$ZodCheckLessThan\",(e,t)=>{me.init(e,t);let n=PT[typeof t.value];e._zod.onattach.push((o)=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<i)if(t.inclusive)r.maximum=t.value;else r.exclusiveMaximum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value<=t.value:o.value<t.value)return;o.issues.push({origin:n,code:\"too_big\",maximum:typeof t.value===\"object\"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ud=_(\"$ZodCheckGreaterThan\",(e,t)=>{me.init(e,t);let n=PT[typeof t.value];e._zod.onattach.push((o)=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>i)if(t.inclusive)r.minimum=t.value;else r.exclusiveMinimum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value>=t.value:o.value>t.value)return;o.issues.push({origin:n,code:\"too_small\",minimum:typeof t.value===\"object\"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xh=_(\"$ZodCheckMultipleOf\",(e,t)=>{me.init(e,t),e._zod.onattach.push((n)=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=(n)=>{if(typeof n.value!==typeof t.value)throw Error(\"Cannot mix number and bigint in multiple_of check.\");if(typeof n.value===\"bigint\"?n.value%t.value===BigInt(0):lh(n.value,t.value)===0)return;n.issues.push({origin:typeof n.value,code:\"not_multiple_of\",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Qh=_(\"$ZodCheckNumberFormat\",(e,t)=>{me.init(e,t),t.format=t.format||\"float64\";let n=t.format?.includes(\"int\"),o=n?\"int\":\"number\",[r,i]=gh[t.format];e._zod.onattach.push((s)=>{let a=s._zod.bag;if(a.format=t.format,a.minimum=r,a.maximum=i,n)a.pattern=Bh}),e._zod.check=(s)=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:\"invalid_type\",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)s.issues.push({input:a,code:\"too_big\",maximum:Number.MAX_SAFE_INTEGER,note:\"Integers must be within the safe integer range.\",inst:e,origin:o,inclusive:!0,continue:!t.abort});else s.issues.push({input:a,code:\"too_small\",minimum:Number.MIN_SAFE_INTEGER,note:\"Integers must be within the safe integer range.\",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}if(a<r)s.issues.push({origin:\"number\",input:a,code:\"too_small\",minimum:r,inclusive:!0,inst:e,continue:!t.abort});if(a>i)s.issues.push({origin:\"number\",input:a,code:\"too_big\",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),eg=_(\"$ZodCheckBigIntFormat\",(e,t)=>{me.init(e,t);let[n,o]=_h[t.format];e._zod.onattach.push((r)=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o}),e._zod.check=(r)=>{let i=r.value;if(i<n)r.issues.push({origin:\"bigint\",input:i,code:\"too_small\",minimum:n,inclusive:!0,inst:e,continue:!t.abort});if(i>o)r.issues.push({origin:\"bigint\",input:i,code:\"too_big\",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),tg=_(\"$ZodCheckMaxSize\",(e,t)=>{var n;me.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!Rr(r)&&r.size!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<r)o._zod.bag.maximum=t.maximum}),e._zod.check=(o)=>{let r=o.value;if(r.size<=t.maximum)return;o.issues.push({origin:Oc(r),code:\"too_big\",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),rg=_(\"$ZodCheckMinSize\",(e,t)=>{var n;me.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!Rr(r)&&r.size!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>r)o._zod.bag.minimum=t.minimum}),e._zod.check=(o)=>{let r=o.value;if(r.size>=t.minimum)return;o.issues.push({origin:Oc(r),code:\"too_small\",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ng=_(\"$ZodCheckSizeEquals\",(e,t)=>{var n;me.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!Rr(r)&&r.size!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=(o)=>{let r=o.value,i=r.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Oc(r),...s?{code:\"too_big\",maximum:t.size}:{code:\"too_small\",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),og=_(\"$ZodCheckMaxLength\",(e,t)=>{var n;me.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!Rr(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<r)o._zod.bag.maximum=t.maximum}),e._zod.check=(o)=>{let r=o.value;if(r.length<=t.maximum)return;let s=jc(r);o.issues.push({origin:s,code:\"too_big\",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ig=_(\"$ZodCheckMinLength\",(e,t)=>{var n;me.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!Rr(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>r)o._zod.bag.minimum=t.minimum}),e._zod.check=(o)=>{let r=o.value;if(r.length>=t.minimum)return;let s=jc(r);o.issues.push({origin:s,code:\"too_small\",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),sg=_(\"$ZodCheckLengthEquals\",(e,t)=>{var n;me.init(e,t),(n=e._zod.def).when??(n.when=(o)=>{let r=o.value;return!Rr(r)&&r.length!==void 0}),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=(o)=>{let r=o.value,i=r.length;if(i===t.length)return;let s=jc(r),a=i>t.length;o.issues.push({origin:s,...a?{code:\"too_big\",maximum:t.length}:{code:\"too_small\",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Do=_(\"$ZodCheckStringFormat\",(e,t)=>{var n,o;if(me.init(e,t),e._zod.onattach.push((r)=>{let i=r._zod.bag;if(i.format=t.format,t.pattern)i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern)}),t.pattern)(n=e._zod).check??(n.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;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})});else(o=e._zod).check??(o.check=()=>{})}),ag=_(\"$ZodCheckRegex\",(e,t)=>{Do.init(e,t),e._zod.check=(n)=>{if(t.pattern.lastIndex=0,t.pattern.test(n.value))return;n.issues.push({origin:\"string\",code:\"invalid_format\",format:\"regex\",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),cg=_(\"$ZodCheckLowerCase\",(e,t)=>{t.pattern??(t.pattern=Kh),Do.init(e,t)}),ug=_(\"$ZodCheckUpperCase\",(e,t)=>{t.pattern??(t.pattern=Yh),Do.init(e,t)}),lg=_(\"$ZodCheckIncludes\",(e,t)=>{me.init(e,t);let n=St(t.includes),o=new RegExp(typeof t.position===\"number\"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push((r)=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=(r)=>{if(r.value.includes(t.includes,t.position))return;r.issues.push({origin:\"string\",code:\"invalid_format\",format:\"includes\",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),dg=_(\"$ZodCheckStartsWith\",(e,t)=>{me.init(e,t);let n=new RegExp(`^${St(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.startsWith(t.prefix))return;o.issues.push({origin:\"string\",code:\"invalid_format\",format:\"starts_with\",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),pg=_(\"$ZodCheckEndsWith\",(e,t)=>{me.init(e,t);let n=new RegExp(`.*${St(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push((o)=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.endsWith(t.suffix))return;o.issues.push({origin:\"string\",code:\"invalid_format\",format:\"ends_with\",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function kT(e,t,n){if(e.issues.length)t.issues.push(...ot(n,e.issues))}var mg=_(\"$ZodCheckProperty\",(e,t)=>{me.init(e,t),e._zod.check=(n)=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then((r)=>kT(r,n,t.property));kT(o,n,t.property);return}}),fg=_(\"$ZodCheckMimeType\",(e,t)=>{me.init(e,t);let n=new Set(t.mime);e._zod.onattach.push((o)=>{o._zod.bag.mime=t.mime}),e._zod.check=(o)=>{if(n.has(o.value.type))return;o.issues.push({code:\"invalid_value\",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),hg=_(\"$ZodCheckOverwrite\",(e,t)=>{me.init(e,t),e._zod.check=(n)=>{n.value=t.tx(n.value)}});class ld{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e===\"function\"){e(this,{execution:\"sync\"}),e(this,{execution:\"async\"});return}let n=e.split(`\n`).filter((i)=>i),o=Math.min(...n.map((i)=>i.length-i.trimStart().length)),r=n.map((i)=>i.slice(o)).map((i)=>\" \".repeat(this.indent*2)+i);for(let i of r)this.content.push(i)}compile(){let e=Function,t=this?.args,o=[...(this?.content??[\"\"]).map((r)=>` ${r}`)];return new e(...t,o.join(`\n`))}}var gg={major:4,minor:4,patch:3};var V=_(\"$ZodType\",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=gg;let o=[...e._zod.def.checks??[]];if(e._zod.traits.has(\"$ZodCheck\"))o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(s,a,c)=>{let u=Er(s),l;for(let m of a){if(m._zod.def.when){if(vh(s))continue;if(!m._zod.def.when(s))continue}else if(u)continue;let f=s.issues.length,h=m._zod.check(s);if(h instanceof Promise&&c?.async===!1)throw new Nt;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{if(await h,s.issues.length===f)return;if(!u)u=Er(s,f)});else{if(s.issues.length===f)continue;if(!u)u=Er(s,f)}}if(l)return l.then(()=>s);return s},i=(s,a,c)=>{if(Er(s))return s.aborted=!0,s;let u=r(a,o,c);if(u instanceof Promise){if(c.async===!1)throw new Nt;return u.then((l)=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction===\"backward\"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});if(u instanceof Promise)return u.then((l)=>i(l,s,a));return i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new Nt;return c.then((u)=>r(u,o,a))}return r(c,o,a)}}W(e,\"~standard\",()=>({validate:(r)=>{try{let i=yh(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch(i){return zh(e,r).then((s)=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:\"zod\",version:1}))}),zn=_(\"$ZodString\",(e,t)=>{V.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Vh(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}if(typeof n.value===\"string\")return n;return n.issues.push({expected:\"string\",code:\"invalid_type\",input:n.value,inst:e}),n}}),le=_(\"$ZodStringFormat\",(e,t)=>{Do.init(e,t),zn.init(e,t)}),vg=_(\"$ZodGUID\",(e,t)=>{t.pattern??(t.pattern=Th),le.init(e,t)}),bg=_(\"$ZodUUID\",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw Error(`Invalid UUID version: \"${t.version}\"`);t.pattern??(t.pattern=yn(o))}else t.pattern??(t.pattern=yn());le.init(e,t)}),Sg=_(\"$ZodEmail\",(e,t)=>{t.pattern??(t.pattern=Eh),le.init(e,t)}),yg=_(\"$ZodURL\",(e,t)=>{le.init(e,t),e._zod.check=(n)=>{try{let o=n.value.trim();if(!t.normalize&&t.protocol?.source===Mh.source){if(!/^https?:\\/\\//i.test(o)){n.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid URL format\",input:n.value,inst:e,continue:!t.abort});return}}let r=new URL(o);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(r.hostname))n.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid hostname\",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(r.protocol.endsWith(\":\")?r.protocol.slice(0,-1):r.protocol))n.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid protocol\",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})}if(t.normalize)n.value=r.href;else n.value=o;return}catch(o){n.issues.push({code:\"invalid_format\",format:\"url\",input:n.value,inst:e,continue:!t.abort})}}}),zg=_(\"$ZodEmoji\",(e,t)=>{t.pattern??(t.pattern=Oh()),le.init(e,t)}),$g=_(\"$ZodNanoID\",(e,t)=>{t.pattern??(t.pattern=Rh),le.init(e,t)}),xg=_(\"$ZodCUID\",(e,t)=>{t.pattern??(t.pattern=$h),le.init(e,t)}),wg=_(\"$ZodCUID2\",(e,t)=>{t.pattern??(t.pattern=xh),le.init(e,t)}),kg=_(\"$ZodULID\",(e,t)=>{t.pattern??(t.pattern=wh),le.init(e,t)}),Pg=_(\"$ZodXID\",(e,t)=>{t.pattern??(t.pattern=kh),le.init(e,t)}),Rg=_(\"$ZodKSUID\",(e,t)=>{t.pattern??(t.pattern=Ph),le.init(e,t)}),Ig=_(\"$ZodISODateTime\",(e,t)=>{t.pattern??(t.pattern=Fh(t)),le.init(e,t)}),Tg=_(\"$ZodISODate\",(e,t)=>{t.pattern??(t.pattern=Lh),le.init(e,t)}),Eg=_(\"$ZodISOTime\",(e,t)=>{t.pattern??(t.pattern=qh(t)),le.init(e,t)}),Og=_(\"$ZodISODuration\",(e,t)=>{t.pattern??(t.pattern=Ih),le.init(e,t)}),jg=_(\"$ZodIPv4\",(e,t)=>{t.pattern??(t.pattern=jh),le.init(e,t),e._zod.bag.format=\"ipv4\"}),Ng=_(\"$ZodIPv6\",(e,t)=>{t.pattern??(t.pattern=Nh),le.init(e,t),e._zod.bag.format=\"ipv6\",e._zod.check=(n)=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:\"invalid_format\",format:\"ipv6\",input:n.value,inst:e,continue:!t.abort})}}}),Cg=_(\"$ZodMAC\",(e,t)=>{t.pattern??(t.pattern=Ch(t.delimiter)),le.init(e,t),e._zod.bag.format=\"mac\"}),Zg=_(\"$ZodCIDRv4\",(e,t)=>{t.pattern??(t.pattern=Zh),le.init(e,t)}),Ag=_(\"$ZodCIDRv6\",(e,t)=>{t.pattern??(t.pattern=Ah),le.init(e,t),e._zod.check=(n)=>{let o=n.value.split(\"/\");try{if(o.length!==2)throw Error();let[r,i]=o;if(!i)throw Error();let s=Number(i);if(`${s}`!==i)throw Error();if(s<0||s>128)throw Error();new URL(`http://[${r}]`)}catch{n.issues.push({code:\"invalid_format\",format:\"cidrv6\",input:n.value,inst:e,continue:!t.abort})}}});function Ug(e){if(e===\"\")return!0;if(/\\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Mg=_(\"$ZodBase64\",(e,t)=>{t.pattern??(t.pattern=Uh),le.init(e,t),e._zod.bag.contentEncoding=\"base64\",e._zod.check=(n)=>{if(Ug(n.value))return;n.issues.push({code:\"invalid_format\",format:\"base64\",input:n.value,inst:e,continue:!t.abort})}});function FT(e){if(!ad.test(e))return!1;let t=e.replace(/[-_]/g,(o)=>o===\"-\"?\"+\":\"/\"),n=t.padEnd(Math.ceil(t.length/4)*4,\"=\");return Ug(n)}var Dg=_(\"$ZodBase64URL\",(e,t)=>{t.pattern??(t.pattern=ad),le.init(e,t),e._zod.bag.contentEncoding=\"base64url\",e._zod.check=(n)=>{if(FT(n.value))return;n.issues.push({code:\"invalid_format\",format:\"base64url\",input:n.value,inst:e,continue:!t.abort})}}),Lg=_(\"$ZodE164\",(e,t)=>{t.pattern??(t.pattern=Dh),le.init(e,t)});function VT(e,t=null){try{let n=e.split(\".\");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));if(\"typ\"in r&&r?.typ!==\"JWT\")return!1;if(!r.alg)return!1;if(t&&(!(\"alg\"in r)||r.alg!==t))return!1;return!0}catch{return!1}}var qg=_(\"$ZodJWT\",(e,t)=>{le.init(e,t),e._zod.check=(n)=>{if(VT(n.value,t.alg))return;n.issues.push({code:\"invalid_format\",format:\"jwt\",input:n.value,inst:e,continue:!t.abort})}}),Fg=_(\"$ZodCustomStringFormat\",(e,t)=>{le.init(e,t),e._zod.check=(n)=>{if(t.fn(n.value))return;n.issues.push({code:\"invalid_format\",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),hd=_(\"$ZodNumber\",(e,t)=>{V.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ac,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch(s){}let r=n.value;if(typeof r===\"number\"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r===\"number\"?Number.isNaN(r)?\"NaN\":!Number.isFinite(r)?\"Infinity\":void 0:void 0;return n.issues.push({expected:\"number\",code:\"invalid_type\",input:r,inst:e,...i?{received:i}:{}}),n}}),Vg=_(\"$ZodNumberFormat\",(e,t)=>{Qh.init(e,t),hd.init(e,t)}),Dc=_(\"$ZodBoolean\",(e,t)=>{V.init(e,t),e._zod.pattern=Hh,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(i){}let r=n.value;if(typeof r===\"boolean\")return n;return n.issues.push({expected:\"boolean\",code:\"invalid_type\",input:r,inst:e}),n}}),gd=_(\"$ZodBigInt\",(e,t)=>{V.init(e,t),e._zod.pattern=Jh,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(r){}if(typeof n.value===\"bigint\")return n;return n.issues.push({expected:\"bigint\",code:\"invalid_type\",input:n.value,inst:e}),n}}),Jg=_(\"$ZodBigIntFormat\",(e,t)=>{eg.init(e,t),gd.init(e,t)}),Bg=_(\"$ZodSymbol\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(typeof r===\"symbol\")return n;return n.issues.push({expected:\"symbol\",code:\"invalid_type\",input:r,inst:e}),n}}),Hg=_(\"$ZodUndefined\",(e,t)=>{V.init(e,t),e._zod.pattern=Wh,e._zod.values=new Set([void 0]),e._zod.parse=(n,o)=>{let r=n.value;if(typeof r>\"u\")return n;return n.issues.push({expected:\"undefined\",code:\"invalid_type\",input:r,inst:e}),n}}),Gg=_(\"$ZodNull\",(e,t)=>{V.init(e,t),e._zod.pattern=Gh,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;if(r===null)return n;return n.issues.push({expected:\"null\",code:\"invalid_type\",input:r,inst:e}),n}}),Wg=_(\"$ZodAny\",(e,t)=>{V.init(e,t),e._zod.parse=(n)=>n}),Kg=_(\"$ZodUnknown\",(e,t)=>{V.init(e,t),e._zod.parse=(n)=>n}),Yg=_(\"$ZodNever\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:\"never\",code:\"invalid_type\",input:n.value,inst:e}),n)}),Xg=_(\"$ZodVoid\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(typeof r>\"u\")return n;return n.issues.push({expected:\"void\",code:\"invalid_type\",input:r,inst:e}),n}}),Qg=_(\"$ZodDate\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(a){}let r=n.value,i=r instanceof Date;if(i&&!Number.isNaN(r.getTime()))return n;return n.issues.push({expected:\"date\",code:\"invalid_type\",input:r,...i?{received:\"Invalid Date\"}:{},inst:e}),n}});function IT(e,t,n){if(e.issues.length)t.issues.push(...ot(n,e.issues));t.value[n]=e.value}var e_=_(\"$ZodArray\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:\"array\",code:\"invalid_type\",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let s=0;s<r.length;s++){let a=r[s],c=t.element._zod.run({value:a,issues:[]},o);if(c instanceof Promise)i.push(c.then((u)=>IT(u,n,s)));else IT(c,n,s)}if(i.length)return Promise.all(i).then(()=>n);return n}});function fd(e,t,n,o,r,i){let s=n in o;if(e.issues.length){if(r&&i&&!s)return;t.issues.push(...ot(n,e.issues))}if(!s&&!r){if(!e.issues.length)t.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:void 0,path:[n]});return}if(e.value===void 0){if(s)t.value[n]=void 0}else t.value[n]=e.value}function JT(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has(\"$ZodType\"))throw Error(`Invalid element at key \"${o}\": expected a Zod schema`);let n=hh(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function BT(e,t,n,o,r,i){let s=[],a=r.keySet,c=r.catchall._zod,u=c.def.type,l=c.optin===\"optional\",m=c.optout===\"optional\";for(let f in t){if(f===\"__proto__\")continue;if(a.has(f))continue;if(u===\"never\"){s.push(f);continue}let h=c.run({value:t[f],issues:[]},o);if(h instanceof Promise)e.push(h.then((z)=>fd(z,n,f,t,l,m)));else fd(h,n,f,t,l,m)}if(s.length)n.issues.push({code:\"unrecognized_keys\",keys:s,input:t,inst:i});if(!e.length)return n;return Promise.all(e).then(()=>n)}var HT=_(\"$ZodObject\",(e,t)=>{if(V.init(e,t),!Object.getOwnPropertyDescriptor(t,\"shape\")?.get){let a=t.shape;Object.defineProperty(t,\"shape\",{get:()=>{let c={...a};return Object.defineProperty(t,\"shape\",{value:c}),c}})}let o=No(()=>JT(t));W(e._zod,\"propValues\",()=>{let a=t.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let m of l.values)c[u].add(m)}}return c});let r=Sn,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!r(u))return a.issues.push({expected:\"object\",code:\"invalid_type\",input:u,inst:e}),a;a.value={};let l=[],m=s.shape;for(let f of s.keys){let h=m[f],z=h._zod.optin===\"optional\",C=h._zod.optout===\"optional\",I=h._zod.run({value:u[f],issues:[]},c);if(I instanceof Promise)l.push(I.then((X)=>fd(X,a,f,u,z,C)));else fd(I,a,f,u,z,C)}if(!i)return l.length?Promise.all(l).then(()=>a):a;return BT(l,u,a,c,o.value,e)}}),t_=_(\"$ZodObjectJIT\",(e,t)=>{HT.init(e,t);let n=e._zod.parse,o=No(()=>JT(t)),r=(f)=>{let h=new ld([\"shape\",\"payload\",\"ctx\"]),z=o.value,C=(q)=>{let E=Wl(q);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};h.write(\"const input = payload.value;\");let I=Object.create(null),X=0;for(let q of z.keys)I[q]=`key_${X++}`;h.write(\"const newResult = {};\");for(let q of z.keys){let E=I[q],U=Wl(q),ie=f[q],Se=ie?._zod?.optin===\"optional\",at=ie?._zod?.optout===\"optional\";if(h.write(`const ${E} = ${C(q)};`),Se&&at)h.write(`\n if (${E}.issues.length) {\n if (${U} in input) {\n payload.issues = payload.issues.concat(${E}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${U}, ...iss.path] : [${U}]\n })));\n }\n }\n \n if (${E}.value === undefined) {\n if (${U} in input) {\n newResult[${U}] = undefined;\n }\n } else {\n newResult[${U}] = ${E}.value;\n }\n \n `);else if(!Se)h.write(`\n const ${E}_present = ${U} in input;\n if (${E}.issues.length) {\n payload.issues = payload.issues.concat(${E}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${U}, ...iss.path] : [${U}]\n })));\n }\n if (!${E}_present && !${E}.issues.length) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [${U}]\n });\n }\n\n if (${E}_present) {\n if (${E}.value === undefined) {\n newResult[${U}] = undefined;\n } else {\n newResult[${U}] = ${E}.value;\n }\n }\n\n `);else h.write(`\n if (${E}.issues.length) {\n payload.issues = payload.issues.concat(${E}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${U}, ...iss.path] : [${U}]\n })));\n }\n \n if (${E}.value === undefined) {\n if (${U} in input) {\n newResult[${U}] = undefined;\n }\n } else {\n newResult[${U}] = ${E}.value;\n }\n \n `)}h.write(\"payload.value = newResult;\"),h.write(\"return payload;\");let fe=h.compile();return(q,E)=>fe(f,q,E)},i,s=Sn,a=!vn.jitless,u=a&&ph.value,l=t.catchall,m;e._zod.parse=(f,h)=>{m??(m=o.value);let z=f.value;if(!s(z))return f.issues.push({expected:\"object\",code:\"invalid_type\",input:z,inst:e}),f;if(a&&u&&h?.async===!1&&h.jitless!==!0){if(!i)i=r(t.shape);if(f=i(f,h),!l)return f;return BT([],z,f,h,m,e)}return n(f,h)}});function TT(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter((i)=>!Er(i));if(r.length===1)return t.value=r[0].value,r[0];return t.issues.push({code:\"invalid_union\",input:t.value,inst:n,errors:e.map((i)=>i.issues.map((s)=>Ke(s,o,Te())))}),t}var Lc=_(\"$ZodUnion\",(e,t)=>{V.init(e,t),W(e._zod,\"optin\",()=>t.options.some((o)=>o._zod.optin===\"optional\")?\"optional\":void 0),W(e._zod,\"optout\",()=>t.options.some((o)=>o._zod.optout===\"optional\")?\"optional\":void 0),W(e._zod,\"values\",()=>{if(t.options.every((o)=>o._zod.values))return new Set(t.options.flatMap((o)=>Array.from(o._zod.values)));return}),W(e._zod,\"pattern\",()=>{if(t.options.every((o)=>o._zod.pattern)){let o=t.options.map((r)=>r._zod.pattern);return new RegExp(`^(${o.map((r)=>Tc(r.source)).join(\"|\")})$`)}return});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},r);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}if(!i)return TT(s,o,e,r);return Promise.all(s).then((a)=>TT(a,o,e,r))}});function ET(e,t,n,o){let r=e.filter((i)=>i.issues.length===0);if(r.length===1)return t.value=r[0].value,t;if(r.length===0)t.issues.push({code:\"invalid_union\",input:t.value,inst:n,errors:e.map((i)=>i.issues.map((s)=>Ke(s,o,Te())))});else t.issues.push({code:\"invalid_union\",input:t.value,inst:n,errors:[],inclusive:!1});return t}var r_=_(\"$ZodXor\",(e,t)=>{Lc.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},r);if(c instanceof Promise)s.push(c),i=!0;else s.push(c)}if(!i)return ET(s,o,e,r);return Promise.all(s).then((a)=>ET(a,o,e,r))}}),n_=_(\"$ZodDiscriminatedUnion\",(e,t)=>{t.inclusive=!1,Lc.init(e,t);let n=e._zod.parse;W(e._zod,\"propValues\",()=>{let r={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw Error(`Invalid discriminated union option at index \"${t.options.indexOf(i)}\"`);for(let[a,c]of Object.entries(s)){if(!r[a])r[a]=new Set;for(let u of c)r[a].add(u)}}return r});let o=No(()=>{let r=t.options,i=new Map;for(let s of r){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw Error(`Invalid discriminated union option at index \"${t.options.indexOf(s)}\"`);for(let c of a){if(i.has(c))throw Error(`Duplicate discriminator value \"${String(c)}\"`);i.set(c,s)}}return i});e._zod.parse=(r,i)=>{let s=r.value;if(!Sn(s))return r.issues.push({code:\"invalid_type\",expected:\"object\",input:s,inst:e}),r;let a=o.value.get(s?.[t.discriminator]);if(a)return a._zod.run(r,i);if(t.unionFallback||i.direction===\"backward\")return n(r,i);return r.issues.push({code:\"invalid_union\",errors:[],note:\"No matching discriminator\",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),r}}),o_=_(\"$ZodIntersection\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),s=t.right._zod.run({value:r,issues:[]},o);if(i instanceof Promise||s instanceof Promise)return Promise.all([i,s]).then(([c,u])=>OT(n,c,u));return OT(n,i,s)}});function _g(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Tr(e)&&Tr(t)){let n=Object.keys(t),o=Object.keys(e).filter((i)=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let s=_g(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r[i]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],s=_g(r,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function OT(e,t,n){let o=new Map,r;for(let a of t.issues)if(a.code===\"unrecognized_keys\"){r??(r=a);for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).l=!0}}else e.issues.push(a);for(let a of n.issues)if(a.code===\"unrecognized_keys\")for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).r=!0}else e.issues.push(a);let i=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&r)e.issues.push({...r,keys:i});if(Er(e))return e;let s=_g(t.value,n.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var _d=_(\"$ZodTuple\",(e,t)=>{V.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:\"tuple\",code:\"invalid_type\"}),o;o.value=[];let s=[],a=jT(n,\"optin\"),c=jT(n,\"optout\");if(!t.rest){if(i.length<a)return o.issues.push({code:\"too_small\",minimum:a,inclusive:!0,input:i,inst:e,origin:\"array\"}),o;if(i.length>n.length)o.issues.push({code:\"too_big\",maximum:n.length,inclusive:!0,input:i,inst:e,origin:\"array\"})}let u=Array(n.length);for(let l=0;l<n.length;l++){let m=n[l]._zod.run({value:i[l],issues:[]},r);if(m instanceof Promise)s.push(m.then((f)=>{u[l]=f}));else u[l]=m}if(t.rest){let l=n.length-1,m=i.slice(n.length);for(let f of m){l++;let h=t.rest._zod.run({value:f,issues:[]},r);if(h instanceof Promise)s.push(h.then((z)=>NT(z,o,l)));else NT(h,o,l)}}if(s.length)return Promise.all(s).then(()=>CT(u,o,n,i,c));return CT(u,o,n,i,c)}});function jT(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!==\"optional\")return n+1;return 0}function NT(e,t,n){if(e.issues.length)t.issues.push(...ot(n,e.issues));t.value[n]=e.value}function CT(e,t,n,o,r){for(let i=0;i<n.length;i++){let s=e[i],a=i<o.length;if(s.issues.length){if(!a&&i>=r){t.value.length=i;break}t.issues.push(...ot(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=o.length;i--)if(n[i]._zod.optout===\"optional\"&&t.value[i]===void 0)t.value.length=i;else break;return t}var i_=_(\"$ZodRecord\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Tr(r))return n.issues.push({expected:\"record\",code:\"invalid_type\",input:r,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let a=new Set;for(let u of s)if(typeof u===\"string\"||typeof u===\"number\"||typeof u===\"symbol\"){a.add(typeof u===\"number\"?u.toString():u);let l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(l.issues.length){n.issues.push({code:\"invalid_key\",origin:\"record\",issues:l.issues.map((h)=>Ke(h,o,Te())),input:u,path:[u],inst:e});continue}let m=l.value,f=t.valueType._zod.run({value:r[u],issues:[]},o);if(f instanceof Promise)i.push(f.then((h)=>{if(h.issues.length)n.issues.push(...ot(u,h.issues));n.value[m]=h.value}));else{if(f.issues.length)n.issues.push(...ot(u,f.issues));n.value[m]=f.value}}let c;for(let u in r)if(!a.has(u))c=c??[],c.push(u);if(c&&c.length>0)n.issues.push({code:\"unrecognized_keys\",input:r,inst:e,keys:c})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a===\"__proto__\")continue;if(!Object.prototype.propertyIsEnumerable.call(r,a))continue;let c=t.keyType._zod.run({value:a,issues:[]},o);if(c instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(typeof a===\"string\"&&Ac.test(a)&&c.issues.length){let m=t.keyType._zod.run({value:Number(a),issues:[]},o);if(m instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(m.issues.length===0)c=m}if(c.issues.length){if(t.mode===\"loose\")n.value[a]=r[a];else n.issues.push({code:\"invalid_key\",origin:\"record\",issues:c.issues.map((m)=>Ke(m,o,Te())),input:a,path:[a],inst:e});continue}let l=t.valueType._zod.run({value:r[a],issues:[]},o);if(l instanceof Promise)i.push(l.then((m)=>{if(m.issues.length)n.issues.push(...ot(a,m.issues));n.value[c.value]=m.value}));else{if(l.issues.length)n.issues.push(...ot(a,l.issues));n.value[c.value]=l.value}}}if(i.length)return Promise.all(i).then(()=>n);return n}}),s_=_(\"$ZodMap\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:\"map\",code:\"invalid_type\",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[s,a]of r){let c=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:a,issues:[]},o);if(c instanceof Promise||u instanceof Promise)i.push(Promise.all([c,u]).then(([l,m])=>{ZT(l,m,n,s,r,e,o)}));else ZT(c,u,n,s,r,e,o)}if(i.length)return Promise.all(i).then(()=>n);return n}});function ZT(e,t,n,o,r,i,s){if(e.issues.length)if(Ec.has(typeof o))n.issues.push(...ot(o,e.issues));else n.issues.push({code:\"invalid_key\",origin:\"map\",input:r,inst:i,issues:e.issues.map((a)=>Ke(a,s,Te()))});if(t.issues.length)if(Ec.has(typeof o))n.issues.push(...ot(o,t.issues));else n.issues.push({origin:\"map\",code:\"invalid_element\",input:r,inst:i,key:o,issues:t.issues.map((a)=>Ke(a,s,Te()))});n.value.set(e.value,t.value)}var a_=_(\"$ZodSet\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:\"set\",code:\"invalid_type\"}),n;let i=[];n.value=new Set;for(let s of r){let a=t.valueType._zod.run({value:s,issues:[]},o);if(a instanceof Promise)i.push(a.then((c)=>AT(c,n)));else AT(a,n)}if(i.length)return Promise.all(i).then(()=>n);return n}});function AT(e,t){if(e.issues.length)t.issues.push(...e.issues);t.value.add(e.value)}var c_=_(\"$ZodEnum\",(e,t)=>{V.init(e,t);let n=Ic(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter((r)=>Ec.has(typeof r)).map((r)=>typeof r===\"string\"?St(r):r.toString()).join(\"|\")})$`),e._zod.parse=(r,i)=>{let s=r.value;if(o.has(s))return r;return r.issues.push({code:\"invalid_value\",values:n,input:s,inst:e}),r}}),u_=_(\"$ZodLiteral\",(e,t)=>{if(V.init(e,t),t.values.length===0)throw Error(\"Cannot create literal schema with no valid values\");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map((o)=>typeof o===\"string\"?St(o):o?St(o.toString()):String(o)).join(\"|\")})$`),e._zod.parse=(o,r)=>{let i=o.value;if(n.has(i))return o;return o.issues.push({code:\"invalid_value\",values:t.values,input:i,inst:e}),o}}),l_=_(\"$ZodFile\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(r instanceof File)return n;return n.issues.push({expected:\"file\",code:\"invalid_type\",input:r,inst:e}),n}}),d_=_(\"$ZodTransform\",(e,t)=>{V.init(e,t),e._zod.optin=\"optional\",e._zod.parse=(n,o)=>{if(o.direction===\"backward\")throw new bn(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then((s)=>(n.value=s,n.fallback=!0,n));if(r instanceof Promise)throw new Nt;return n.value=r,n.fallback=!0,n}});function UT(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var vd=_(\"$ZodOptional\",(e,t)=>{V.init(e,t),e._zod.optin=\"optional\",e._zod.optout=\"optional\",W(e._zod,\"values\",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),W(e._zod,\"pattern\",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Tc(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin===\"optional\"){let r=n.value,i=t.innerType._zod.run(n,o);if(i instanceof Promise)return i.then((s)=>UT(s,r));return UT(i,r)}if(n.value===void 0)return n;return t.innerType._zod.run(n,o)}}),p_=_(\"$ZodExactOptional\",(e,t)=>{vd.init(e,t),W(e._zod,\"values\",()=>t.innerType._zod.values),W(e._zod,\"pattern\",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),m_=_(\"$ZodNullable\",(e,t)=>{V.init(e,t),W(e._zod,\"optin\",()=>t.innerType._zod.optin),W(e._zod,\"optout\",()=>t.innerType._zod.optout),W(e._zod,\"pattern\",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Tc(n.source)}|null)$`):void 0}),W(e._zod,\"values\",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>{if(n.value===null)return n;return t.innerType._zod.run(n,o)}}),f_=_(\"$ZodDefault\",(e,t)=>{V.init(e,t),e._zod.optin=\"optional\",W(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>MT(i,t));return MT(r,t)}});function MT(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var h_=_(\"$ZodPrefault\",(e,t)=>{V.init(e,t),e._zod.optin=\"optional\",W(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(n,o);if(n.value===void 0)n.value=t.defaultValue;return t.innerType._zod.run(n,o)}}),g_=_(\"$ZodNonOptional\",(e,t)=>{V.init(e,t),W(e._zod,\"values\",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter((o)=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>DT(i,e));return DT(r,e)}});function DT(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:e.value,inst:t});return e}var __=_(\"$ZodSuccess\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")throw new bn(\"ZodSuccess\");let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>(n.value=i.issues.length===0,n));return n.value=r.issues.length===0,n}}),v_=_(\"$ZodCatch\",(e,t)=>{V.init(e,t),e._zod.optin=\"optional\",W(e._zod,\"optout\",()=>t.innerType._zod.optout),W(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>{if(n.value=i.value,i.issues.length)n.value=t.catchValue({...n,error:{issues:i.issues.map((s)=>Ke(s,o,Te()))},input:n.value}),n.issues=[],n.fallback=!0;return n});if(n.value=r.value,r.issues.length)n.value=t.catchValue({...n,error:{issues:r.issues.map((i)=>Ke(i,o,Te()))},input:n.value}),n.issues=[],n.fallback=!0;return n}}),b_=_(\"$ZodNaN\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>{if(typeof n.value!==\"number\"||!Number.isNaN(n.value))return n.issues.push({input:n.value,inst:e,expected:\"nan\",code:\"invalid_type\"}),n;return n}}),bd=_(\"$ZodPipe\",(e,t)=>{V.init(e,t),W(e._zod,\"values\",()=>t.in._zod.values),W(e._zod,\"optin\",()=>t.in._zod.optin),W(e._zod,\"optout\",()=>t.out._zod.optout),W(e._zod,\"propValues\",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction===\"backward\"){let i=t.out._zod.run(n,o);if(i instanceof Promise)return i.then((s)=>dd(s,t.in,o));return dd(i,t.in,o)}let r=t.in._zod.run(n,o);if(r instanceof Promise)return r.then((i)=>dd(i,t.out,o));return dd(r,t.out,o)}});function dd(e,t,n){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var qc=_(\"$ZodCodec\",(e,t)=>{V.init(e,t),W(e._zod,\"values\",()=>t.in._zod.values),W(e._zod,\"optin\",()=>t.in._zod.optin),W(e._zod,\"optout\",()=>t.out._zod.optout),W(e._zod,\"propValues\",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||\"forward\")===\"forward\"){let i=t.in._zod.run(n,o);if(i instanceof Promise)return i.then((s)=>pd(s,t,o));return pd(i,t,o)}else{let i=t.out._zod.run(n,o);if(i instanceof Promise)return i.then((s)=>pd(s,t,o));return pd(i,t,o)}}});function pd(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||\"forward\")===\"forward\"){let r=t.transform(e.value,e);if(r instanceof Promise)return r.then((i)=>md(e,i,t.out,n));return md(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);if(r instanceof Promise)return r.then((i)=>md(e,i,t.in,n));return md(e,r,t.in,n)}}function md(e,t,n,o){if(e.issues.length)return e.aborted=!0,e;return n._zod.run({value:t,issues:e.issues},o)}var S_=_(\"$ZodPreprocess\",(e,t)=>{bd.init(e,t)}),y_=_(\"$ZodReadonly\",(e,t)=>{V.init(e,t),W(e._zod,\"propValues\",()=>t.innerType._zod.propValues),W(e._zod,\"values\",()=>t.innerType._zod.values),W(e._zod,\"optin\",()=>t.innerType?._zod?.optin),W(e._zod,\"optout\",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);if(r instanceof Promise)return r.then(LT);return LT(r)}});function LT(e){return e.value=Object.freeze(e.value),e}var z_=_(\"$ZodTemplateLiteral\",(e,t)=>{V.init(e,t);let n=[];for(let o of t.parts)if(typeof o===\"object\"&&o!==null){if(!o._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith(\"^\")?1:0,s=r.endsWith(\"$\")?r.length-1:r.length;n.push(r.slice(i,s))}else if(o===null||fh.has(typeof o))n.push(St(`${o}`));else throw Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join(\"\")}$`),e._zod.parse=(o,r)=>{if(typeof o.value!==\"string\")return o.issues.push({input:o.value,inst:e,expected:\"string\",code:\"invalid_type\"}),o;if(e._zod.pattern.lastIndex=0,!e._zod.pattern.test(o.value))return o.issues.push({input:o.value,inst:e,code:\"invalid_format\",format:t.format??\"template_literal\",pattern:e._zod.pattern.source}),o;return o}}),$_=_(\"$ZodFunction\",(e,t)=>(V.init(e,t),e._def=t,e._zod.def=t,e.implement=(n)=>{if(typeof n!==\"function\")throw Error(\"implement() must be called with a function\");return function(...o){let r=e._def.input?Yl(e._def.input,o):o,i=Reflect.apply(n,this,r);if(e._def.output)return Yl(e._def.output,i);return i}},e.implementAsync=(n)=>{if(typeof n!==\"function\")throw Error(\"implementAsync() must be called with a function\");return async function(...o){let r=e._def.input?await Xl(e._def.input,o):o,i=await Reflect.apply(n,this,r);if(e._def.output)return await Xl(e._def.output,i);return i}},e._zod.parse=(n,o)=>{if(typeof n.value!==\"function\")return n.issues.push({code:\"invalid_type\",expected:\"function\",input:n.value,inst:e}),n;if(e._def.output&&e._def.output._zod.def.type===\"promise\")n.value=e.implementAsync(n.value);else n.value=e.implement(n.value);return n},e.input=(...n)=>{let o=e.constructor;if(Array.isArray(n[0]))return new o({type:\"function\",input:new _d({type:\"tuple\",items:n[0],rest:n[1]}),output:e._def.output});return new o({type:\"function\",input:n[0],output:e._def.output})},e.output=(n)=>new e.constructor({type:\"function\",input:e._def.input,output:n}),e)),x_=_(\"$ZodPromise\",(e,t)=>{V.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then((r)=>t.innerType._zod.run({value:r,issues:[]},o))}),w_=_(\"$ZodLazy\",(e,t)=>{V.init(e,t),W(e._zod,\"innerType\",()=>{let n=t;if(!n._cachedInner)n._cachedInner=t.getter();return n._cachedInner}),W(e._zod,\"pattern\",()=>e._zod.innerType?._zod?.pattern),W(e._zod,\"propValues\",()=>e._zod.innerType?._zod?.propValues),W(e._zod,\"optin\",()=>e._zod.innerType?._zod?.optin??void 0),W(e._zod,\"optout\",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),k_=_(\"$ZodCustom\",(e,t)=>{me.init(e,t),V.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=(n)=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then((i)=>qT(i,n,o,e));qT(r,n,o,e);return}});function qT(e,t,n,o){if(!e){let r={code:\"custom\",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};if(o._zod.def.params)r.params=o._zod.def.params;t.issues.push(Co(r))}}var Hc={};tt(Hc,{ar:()=>P_,az:()=>R_,be:()=>I_,bg:()=>T_,ca:()=>E_,cs:()=>O_,da:()=>j_,de:()=>N_,el:()=>C_,en:()=>Fc,eo:()=>Z_,es:()=>A_,fa:()=>U_,fi:()=>M_,fr:()=>D_,frCA:()=>L_,he:()=>q_,hr:()=>F_,hu:()=>V_,hy:()=>J_,id:()=>B_,is:()=>H_,it:()=>G_,ja:()=>W_,ka:()=>K_,kh:()=>Y_,km:()=>Vc,ko:()=>X_,lt:()=>Q_,mk:()=>ev,ms:()=>tv,nl:()=>rv,no:()=>nv,ota:()=>ov,pl:()=>sv,ps:()=>iv,pt:()=>av,ro:()=>cv,ru:()=>uv,sl:()=>lv,sv:()=>dv,ta:()=>pv,th:()=>mv,tr:()=>fv,ua:()=>hv,uk:()=>Bc,ur:()=>gv,uz:()=>_v,vi:()=>vv,yo:()=>yv,zhCN:()=>bv,zhTW:()=>Sv});var aU=()=>{let e={string:{unit:\"حرف\",verb:\"أن يحوي\"},file:{unit:\"بايت\",verb:\"أن يحوي\"},array:{unit:\"عنصر\",verb:\"أن يحوي\"},set:{unit:\"عنصر\",verb:\"أن يحوي\"}};function t(r){return e[r]??null}let n={regex:\"مدخل\",email:\"بريد إلكتروني\",url:\"رابط\",emoji:\"إيموجي\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"تاريخ ووقت بمعيار ISO\",date:\"تاريخ بمعيار ISO\",time:\"وقت بمعيار ISO\",duration:\"مدة بمعيار ISO\",ipv4:\"عنوان IPv4\",ipv6:\"عنوان IPv6\",cidrv4:\"مدى عناوين بصيغة IPv4\",cidrv6:\"مدى عناوين بصيغة IPv6\",base64:\"نَص بترميز base64-encoded\",base64url:\"نَص بترميز base64url-encoded\",json_string:\"نَص على هيئة JSON\",e164:\"رقم هاتف بمعيار E.164\",jwt:\"JWT\",template_literal:\"مدخل\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${r.expected}، ولكن تم إدخال ${a}`;return`مدخلات غير مقبولة: يفترض إدخال ${i}، ولكن تم إدخال ${a}`}case\"invalid_value\":if(r.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${x(r.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return` أكبر من اللازم: يفترض أن تكون ${r.origin??\"القيمة\"} ${i} ${r.maximum.toString()} ${s.unit??\"عنصر\"}`;return`أكبر من اللازم: يفترض أن تكون ${r.origin??\"القيمة\"} ${i} ${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${i} ${r.minimum.toString()} ${s.unit}`;return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${i} ${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`نَص غير مقبول: يجب أن يبدأ بـ \"${r.prefix}\"`;if(i.format===\"ends_with\")return`نَص غير مقبول: يجب أن ينتهي بـ \"${i.suffix}\"`;if(i.format===\"includes\")return`نَص غير مقبول: يجب أن يتضمَّن \"${i.includes}\"`;if(i.format===\"regex\")return`نَص غير مقبول: يجب أن يطابق النمط ${i.pattern}`;return`${n[i.format]??r.format} غير مقبول`}case\"not_multiple_of\":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${r.divisor}`;case\"unrecognized_keys\":return`معرف${r.keys.length>1?\"ات\":\"\"} غريب${r.keys.length>1?\"ة\":\"\"}: ${v(r.keys,\"، \")}`;case\"invalid_key\":return`معرف غير مقبول في ${r.origin}`;case\"invalid_union\":return\"مدخل غير مقبول\";case\"invalid_element\":return`مدخل غير مقبول في ${r.origin}`;default:return\"مدخل غير مقبول\"}}};function P_(){return{localeError:aU()}}var cU=()=>{let e={string:{unit:\"simvol\",verb:\"olmalıdır\"},file:{unit:\"bayt\",verb:\"olmalıdır\"},array:{unit:\"element\",verb:\"olmalıdır\"},set:{unit:\"element\",verb:\"olmalıdır\"}};function t(r){return e[r]??null}let n={regex:\"input\",email:\"email address\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO datetime\",date:\"ISO date\",time:\"ISO time\",duration:\"ISO duration\",ipv4:\"IPv4 address\",ipv6:\"IPv6 address\",cidrv4:\"IPv4 range\",cidrv6:\"IPv6 range\",base64:\"base64-encoded string\",base64url:\"base64url-encoded string\",json_string:\"JSON string\",e164:\"E.164 number\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Yanlış dəyər: gözlənilən instanceof ${r.expected}, daxil olan ${a}`;return`Yanlış dəyər: gözlənilən ${i}, daxil olan ${a}`}case\"invalid_value\":if(r.values.length===1)return`Yanlış dəyər: gözlənilən ${x(r.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Çox böyük: gözlənilən ${r.origin??\"dəyər\"} ${i}${r.maximum.toString()} ${s.unit??\"element\"}`;return`Çox böyük: gözlənilən ${r.origin??\"dəyər\"} ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Çox kiçik: gözlənilən ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`;return`Çox kiçik: gözlənilən ${r.origin} ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Yanlış mətn: \"${i.prefix}\" ilə başlamalıdır`;if(i.format===\"ends_with\")return`Yanlış mətn: \"${i.suffix}\" ilə bitməlidir`;if(i.format===\"includes\")return`Yanlış mətn: \"${i.includes}\" daxil olmalıdır`;if(i.format===\"regex\")return`Yanlış mətn: ${i.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Yanlış ədəd: ${r.divisor} ilə bölünə bilən olmalıdır`;case\"unrecognized_keys\":return`Tanınmayan açar${r.keys.length>1?\"lar\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`${r.origin} daxilində yanlış açar`;case\"invalid_union\":return\"Yanlış dəyər\";case\"invalid_element\":return`${r.origin} daxilində yanlış dəyər`;default:return\"Yanlış dəyər\"}}};function R_(){return{localeError:cU()}}function GT(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;if(s>=11&&s<=19)return o;if(i===1)return t;if(i>=2&&i<=4)return n;return o}var uU=()=>{let e={string:{unit:{one:\"сімвал\",few:\"сімвалы\",many:\"сімвалаў\"},verb:\"мець\"},array:{unit:{one:\"элемент\",few:\"элементы\",many:\"элементаў\"},verb:\"мець\"},set:{unit:{one:\"элемент\",few:\"элементы\",many:\"элементаў\"},verb:\"мець\"},file:{unit:{one:\"байт\",few:\"байты\",many:\"байтаў\"},verb:\"мець\"}};function t(r){return e[r]??null}let n={regex:\"увод\",email:\"email адрас\",url:\"URL\",emoji:\"эмодзі\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO дата і час\",date:\"ISO дата\",time:\"ISO час\",duration:\"ISO працягласць\",ipv4:\"IPv4 адрас\",ipv6:\"IPv6 адрас\",cidrv4:\"IPv4 дыяпазон\",cidrv6:\"IPv6 дыяпазон\",base64:\"радок у фармаце base64\",base64url:\"радок у фармаце base64url\",json_string:\"JSON радок\",e164:\"нумар E.164\",jwt:\"JWT\",template_literal:\"увод\"},o={nan:\"NaN\",number:\"лік\",array:\"масіў\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Няправільны ўвод: чакаўся instanceof ${r.expected}, атрымана ${a}`;return`Няправільны ўвод: чакаўся ${i}, атрымана ${a}`}case\"invalid_value\":if(r.values.length===1)return`Няправільны ўвод: чакалася ${x(r.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s){let a=Number(r.maximum),c=GT(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${r.origin??\"значэнне\"} павінна ${s.verb} ${i}${r.maximum.toString()} ${c}`}return`Занадта вялікі: чакалася, што ${r.origin??\"значэнне\"} павінна быць ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s){let a=Number(r.minimum),c=GT(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${r.origin} павінна ${s.verb} ${i}${r.minimum.toString()} ${c}`}return`Занадта малы: чакалася, што ${r.origin} павінна быць ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Няправільны радок: павінен пачынацца з \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Няправільны радок: павінен заканчвацца на \"${i.suffix}\"`;if(i.format===\"includes\")return`Няправільны радок: павінен змяшчаць \"${i.includes}\"`;if(i.format===\"regex\")return`Няправільны радок: павінен адпавядаць шаблону ${i.pattern}`;return`Няправільны ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Няправільны лік: павінен быць кратным ${r.divisor}`;case\"unrecognized_keys\":return`Нераспазнаны ${r.keys.length>1?\"ключы\":\"ключ\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Няправільны ключ у ${r.origin}`;case\"invalid_union\":return\"Няправільны ўвод\";case\"invalid_element\":return`Няправільнае значэнне ў ${r.origin}`;default:return\"Няправільны ўвод\"}}};function I_(){return{localeError:uU()}}var lU=()=>{let e={string:{unit:\"символа\",verb:\"да съдържа\"},file:{unit:\"байта\",verb:\"да съдържа\"},array:{unit:\"елемента\",verb:\"да съдържа\"},set:{unit:\"елемента\",verb:\"да съдържа\"}};function t(r){return e[r]??null}let n={regex:\"вход\",email:\"имейл адрес\",url:\"URL\",emoji:\"емоджи\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO време\",date:\"ISO дата\",time:\"ISO време\",duration:\"ISO продължителност\",ipv4:\"IPv4 адрес\",ipv6:\"IPv6 адрес\",cidrv4:\"IPv4 диапазон\",cidrv6:\"IPv6 диапазон\",base64:\"base64-кодиран низ\",base64url:\"base64url-кодиран низ\",json_string:\"JSON низ\",e164:\"E.164 номер\",jwt:\"JWT\",template_literal:\"вход\"},o={nan:\"NaN\",number:\"число\",array:\"масив\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Невалиден вход: очакван instanceof ${r.expected}, получен ${a}`;return`Невалиден вход: очакван ${i}, получен ${a}`}case\"invalid_value\":if(r.values.length===1)return`Невалиден вход: очакван ${x(r.values[0])}`;return`Невалидна опция: очаквано едно от ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Твърде голямо: очаква се ${r.origin??\"стойност\"} да съдържа ${i}${r.maximum.toString()} ${s.unit??\"елемента\"}`;return`Твърде голямо: очаква се ${r.origin??\"стойност\"} да бъде ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Твърде малко: очаква се ${r.origin} да съдържа ${i}${r.minimum.toString()} ${s.unit}`;return`Твърде малко: очаква се ${r.origin} да бъде ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Невалиден низ: трябва да започва с \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Невалиден низ: трябва да завършва с \"${i.suffix}\"`;if(i.format===\"includes\")return`Невалиден низ: трябва да включва \"${i.includes}\"`;if(i.format===\"regex\")return`Невалиден низ: трябва да съвпада с ${i.pattern}`;let s=\"Невалиден\";if(i.format===\"emoji\")s=\"Невалидно\";if(i.format===\"datetime\")s=\"Невалидно\";if(i.format===\"date\")s=\"Невалидна\";if(i.format===\"time\")s=\"Невалидно\";if(i.format===\"duration\")s=\"Невалидна\";return`${s} ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Невалидно число: трябва да бъде кратно на ${r.divisor}`;case\"unrecognized_keys\":return`Неразпознат${r.keys.length>1?\"и\":\"\"} ключ${r.keys.length>1?\"ове\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Невалиден ключ в ${r.origin}`;case\"invalid_union\":return\"Невалиден вход\";case\"invalid_element\":return`Невалидна стойност в ${r.origin}`;default:return\"Невалиден вход\"}}};function T_(){return{localeError:lU()}}var dU=()=>{let e={string:{unit:\"caràcters\",verb:\"contenir\"},file:{unit:\"bytes\",verb:\"contenir\"},array:{unit:\"elements\",verb:\"contenir\"},set:{unit:\"elements\",verb:\"contenir\"}};function t(r){return e[r]??null}let n={regex:\"entrada\",email:\"adreça electrònica\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"data i hora ISO\",date:\"data ISO\",time:\"hora ISO\",duration:\"durada ISO\",ipv4:\"adreça IPv4\",ipv6:\"adreça IPv6\",cidrv4:\"rang IPv4\",cidrv6:\"rang IPv6\",base64:\"cadena codificada en base64\",base64url:\"cadena codificada en base64url\",json_string:\"cadena JSON\",e164:\"número E.164\",jwt:\"JWT\",template_literal:\"entrada\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Tipus invàlid: s'esperava instanceof ${r.expected}, s'ha rebut ${a}`;return`Tipus invàlid: s'esperava ${i}, s'ha rebut ${a}`}case\"invalid_value\":if(r.values.length===1)return`Valor invàlid: s'esperava ${x(r.values[0])}`;return`Opció invàlida: s'esperava una de ${v(r.values,\" o \")}`;case\"too_big\":{let i=r.inclusive?\"com a màxim\":\"menys de\",s=t(r.origin);if(s)return`Massa gran: s'esperava que ${r.origin??\"el valor\"} contingués ${i} ${r.maximum.toString()} ${s.unit??\"elements\"}`;return`Massa gran: s'esperava que ${r.origin??\"el valor\"} fos ${i} ${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\"com a mínim\":\"més de\",s=t(r.origin);if(s)return`Massa petit: s'esperava que ${r.origin} contingués ${i} ${r.minimum.toString()} ${s.unit}`;return`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Format invàlid: ha de començar amb \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Format invàlid: ha d'acabar amb \"${i.suffix}\"`;if(i.format===\"includes\")return`Format invàlid: ha d'incloure \"${i.includes}\"`;if(i.format===\"regex\")return`Format invàlid: ha de coincidir amb el patró ${i.pattern}`;return`Format invàlid per a ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Número invàlid: ha de ser múltiple de ${r.divisor}`;case\"unrecognized_keys\":return`Clau${r.keys.length>1?\"s\":\"\"} no reconeguda${r.keys.length>1?\"s\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Clau invàlida a ${r.origin}`;case\"invalid_union\":return\"Entrada invàlida\";case\"invalid_element\":return`Element invàlid a ${r.origin}`;default:return\"Entrada invàlida\"}}};function E_(){return{localeError:dU()}}var pU=()=>{let e={string:{unit:\"znaků\",verb:\"mít\"},file:{unit:\"bajtů\",verb:\"mít\"},array:{unit:\"prvků\",verb:\"mít\"},set:{unit:\"prvků\",verb:\"mít\"}};function t(r){return e[r]??null}let n={regex:\"regulární výraz\",email:\"e-mailová adresa\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"datum a čas ve formátu ISO\",date:\"datum ve formátu ISO\",time:\"čas ve formátu ISO\",duration:\"doba trvání ISO\",ipv4:\"IPv4 adresa\",ipv6:\"IPv6 adresa\",cidrv4:\"rozsah IPv4\",cidrv6:\"rozsah IPv6\",base64:\"řetězec zakódovaný ve formátu base64\",base64url:\"řetězec zakódovaný ve formátu base64url\",json_string:\"řetězec ve formátu JSON\",e164:\"číslo E.164\",jwt:\"JWT\",template_literal:\"vstup\"},o={nan:\"NaN\",number:\"číslo\",string:\"řetězec\",function:\"funkce\",array:\"pole\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Neplatný vstup: očekáváno instanceof ${r.expected}, obdrženo ${a}`;return`Neplatný vstup: očekáváno ${i}, obdrženo ${a}`}case\"invalid_value\":if(r.values.length===1)return`Neplatný vstup: očekáváno ${x(r.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Hodnota je příliš velká: ${r.origin??\"hodnota\"} musí mít ${i}${r.maximum.toString()} ${s.unit??\"prvků\"}`;return`Hodnota je příliš velká: ${r.origin??\"hodnota\"} musí být ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Hodnota je příliš malá: ${r.origin??\"hodnota\"} musí mít ${i}${r.minimum.toString()} ${s.unit??\"prvků\"}`;return`Hodnota je příliš malá: ${r.origin??\"hodnota\"} musí být ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Neplatný řetězec: musí začínat na \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Neplatný řetězec: musí končit na \"${i.suffix}\"`;if(i.format===\"includes\")return`Neplatný řetězec: musí obsahovat \"${i.includes}\"`;if(i.format===\"regex\")return`Neplatný řetězec: musí odpovídat vzoru ${i.pattern}`;return`Neplatný formát ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Neplatné číslo: musí být násobkem ${r.divisor}`;case\"unrecognized_keys\":return`Neznámé klíče: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Neplatný klíč v ${r.origin}`;case\"invalid_union\":return\"Neplatný vstup\";case\"invalid_element\":return`Neplatná hodnota v ${r.origin}`;default:return\"Neplatný vstup\"}}};function O_(){return{localeError:pU()}}var mU=()=>{let e={string:{unit:\"tegn\",verb:\"havde\"},file:{unit:\"bytes\",verb:\"havde\"},array:{unit:\"elementer\",verb:\"indeholdt\"},set:{unit:\"elementer\",verb:\"indeholdt\"}};function t(r){return e[r]??null}let n={regex:\"input\",email:\"e-mailadresse\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO dato- og klokkeslæt\",date:\"ISO-dato\",time:\"ISO-klokkeslæt\",duration:\"ISO-varighed\",ipv4:\"IPv4-område\",ipv6:\"IPv6-område\",cidrv4:\"IPv4-spektrum\",cidrv6:\"IPv6-spektrum\",base64:\"base64-kodet streng\",base64url:\"base64url-kodet streng\",json_string:\"JSON-streng\",e164:\"E.164-nummer\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\",string:\"streng\",number:\"tal\",boolean:\"boolean\",array:\"liste\",object:\"objekt\",set:\"sæt\",file:\"fil\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Ugyldigt input: forventede instanceof ${r.expected}, fik ${a}`;return`Ugyldigt input: forventede ${i}, fik ${a}`}case\"invalid_value\":if(r.values.length===1)return`Ugyldig værdi: forventede ${x(r.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin),a=o[r.origin]??r.origin;if(s)return`For stor: forventede ${a??\"value\"} ${s.verb} ${i} ${r.maximum.toString()} ${s.unit??\"elementer\"}`;return`For stor: forventede ${a??\"value\"} havde ${i} ${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin),a=o[r.origin]??r.origin;if(s)return`For lille: forventede ${a} ${s.verb} ${i} ${r.minimum.toString()} ${s.unit}`;return`For lille: forventede ${a} havde ${i} ${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Ugyldig streng: skal starte med \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Ugyldig streng: skal ende med \"${i.suffix}\"`;if(i.format===\"includes\")return`Ugyldig streng: skal indeholde \"${i.includes}\"`;if(i.format===\"regex\")return`Ugyldig streng: skal matche mønsteret ${i.pattern}`;return`Ugyldig ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Ugyldigt tal: skal være deleligt med ${r.divisor}`;case\"unrecognized_keys\":return`${r.keys.length>1?\"Ukendte nøgler\":\"Ukendt nøgle\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Ugyldig nøgle i ${r.origin}`;case\"invalid_union\":return\"Ugyldigt input: matcher ingen af de tilladte typer\";case\"invalid_element\":return`Ugyldig værdi i ${r.origin}`;default:return\"Ugyldigt input\"}}};function j_(){return{localeError:mU()}}var fU=()=>{let e={string:{unit:\"Zeichen\",verb:\"zu haben\"},file:{unit:\"Bytes\",verb:\"zu haben\"},array:{unit:\"Elemente\",verb:\"zu haben\"},set:{unit:\"Elemente\",verb:\"zu haben\"}};function t(r){return e[r]??null}let n={regex:\"Eingabe\",email:\"E-Mail-Adresse\",url:\"URL\",emoji:\"Emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO-Datum und -Uhrzeit\",date:\"ISO-Datum\",time:\"ISO-Uhrzeit\",duration:\"ISO-Dauer\",ipv4:\"IPv4-Adresse\",ipv6:\"IPv6-Adresse\",cidrv4:\"IPv4-Bereich\",cidrv6:\"IPv6-Bereich\",base64:\"Base64-codierter String\",base64url:\"Base64-URL-codierter String\",json_string:\"JSON-String\",e164:\"E.164-Nummer\",jwt:\"JWT\",template_literal:\"Eingabe\"},o={nan:\"NaN\",number:\"Zahl\",array:\"Array\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Ungültige Eingabe: erwartet instanceof ${r.expected}, erhalten ${a}`;return`Ungültige Eingabe: erwartet ${i}, erhalten ${a}`}case\"invalid_value\":if(r.values.length===1)return`Ungültige Eingabe: erwartet ${x(r.values[0])}`;return`Ungültige Option: erwartet eine von ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Zu groß: erwartet, dass ${r.origin??\"Wert\"} ${i}${r.maximum.toString()} ${s.unit??\"Elemente\"} hat`;return`Zu groß: erwartet, dass ${r.origin??\"Wert\"} ${i}${r.maximum.toString()} ist`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${s.unit} hat`;return`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Ungültiger String: muss mit \"${i.prefix}\" beginnen`;if(i.format===\"ends_with\")return`Ungültiger String: muss mit \"${i.suffix}\" enden`;if(i.format===\"includes\")return`Ungültiger String: muss \"${i.includes}\" enthalten`;if(i.format===\"regex\")return`Ungültiger String: muss dem Muster ${i.pattern} entsprechen`;return`Ungültig: ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Ungültige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case\"unrecognized_keys\":return`${r.keys.length>1?\"Unbekannte Schlüssel\":\"Unbekannter Schlüssel\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Ungültiger Schlüssel in ${r.origin}`;case\"invalid_union\":return\"Ungültige Eingabe\";case\"invalid_element\":return`Ungültiger Wert in ${r.origin}`;default:return\"Ungültige Eingabe\"}}};function N_(){return{localeError:fU()}}var hU=()=>{let e={string:{unit:\"χαρακτήρες\",verb:\"να έχει\"},file:{unit:\"bytes\",verb:\"να έχει\"},array:{unit:\"στοιχεία\",verb:\"να έχει\"},set:{unit:\"στοιχεία\",verb:\"να έχει\"},map:{unit:\"καταχωρήσεις\",verb:\"να έχει\"}};function t(r){return e[r]??null}let n={regex:\"είσοδος\",email:\"διεύθυνση email\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO ημερομηνία και ώρα\",date:\"ISO ημερομηνία\",time:\"ISO ώρα\",duration:\"ISO διάρκεια\",ipv4:\"διεύθυνση IPv4\",ipv6:\"διεύθυνση IPv6\",mac:\"διεύθυνση MAC\",cidrv4:\"εύρος IPv4\",cidrv6:\"εύρος IPv6\",base64:\"συμβολοσειρά κωδικοποιημένη σε base64\",base64url:\"συμβολοσειρά κωδικοποιημένη σε base64url\",json_string:\"συμβολοσειρά JSON\",e164:\"αριθμός E.164\",jwt:\"JWT\",template_literal:\"είσοδος\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(typeof r.expected===\"string\"&&/^[A-Z]/.test(r.expected))return`Μη έγκυρη είσοδος: αναμενόταν instanceof ${r.expected}, λήφθηκε ${a}`;return`Μη έγκυρη είσοδος: αναμενόταν ${i}, λήφθηκε ${a}`}case\"invalid_value\":if(r.values.length===1)return`Μη έγκυρη είσοδος: αναμενόταν ${x(r.values[0])}`;return`Μη έγκυρη επιλογή: αναμενόταν ένα από ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Πολύ μεγάλο: αναμενόταν ${r.origin??\"τιμή\"} να έχει ${i}${r.maximum.toString()} ${s.unit??\"στοιχεία\"}`;return`Πολύ μεγάλο: αναμενόταν ${r.origin??\"τιμή\"} να είναι ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Πολύ μικρό: αναμενόταν ${r.origin} να έχει ${i}${r.minimum.toString()} ${s.unit}`;return`Πολύ μικρό: αναμενόταν ${r.origin} να είναι ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με \"${i.suffix}\"`;if(i.format===\"includes\")return`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει \"${i.includes}\"`;if(i.format===\"regex\")return`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${i.pattern}`;return`Μη έγκυρο: ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${r.divisor}`;case\"unrecognized_keys\":return`Άγνωστ${r.keys.length>1?\"α\":\"ο\"} κλειδ${r.keys.length>1?\"ιά\":\"ί\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Μη έγκυρο κλειδί στο ${r.origin}`;case\"invalid_union\":return\"Μη έγκυρη είσοδος\";case\"invalid_element\":return`Μη έγκυρη τιμή στο ${r.origin}`;default:return\"Μη έγκυρη είσοδος\"}}};function C_(){return{localeError:hU()}}var gU=()=>{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\"}};function t(r){return e[r]??null}let n={regex:\"input\",email:\"email address\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO datetime\",date:\"ISO date\",time:\"ISO time\",duration:\"ISO duration\",ipv4:\"IPv4 address\",ipv6:\"IPv6 address\",mac:\"MAC address\",cidrv4:\"IPv4 range\",cidrv6:\"IPv6 range\",base64:\"base64-encoded string\",base64url:\"base64url-encoded string\",json_string:\"JSON string\",e164:\"E.164 number\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;return`Invalid input: expected ${i}, received ${a}`}case\"invalid_value\":if(r.values.length===1)return`Invalid input: expected ${x(r.values[0])}`;return`Invalid option: expected one of ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Too big: expected ${r.origin??\"value\"} to have ${i}${r.maximum.toString()} ${s.unit??\"elements\"}`;return`Too big: expected ${r.origin??\"value\"} to be ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${s.unit}`;return`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Invalid string: must start with \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Invalid string: must end with \"${i.suffix}\"`;if(i.format===\"includes\")return`Invalid string: must include \"${i.includes}\"`;if(i.format===\"regex\")return`Invalid string: must match pattern ${i.pattern}`;return`Invalid ${n[i.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\":\"\"}: ${v(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)return`Invalid discriminator value. Expected ${r.options.map((s)=>`'${s}'`).join(\" | \")}`;return\"Invalid input\";case\"invalid_element\":return`Invalid value in ${r.origin}`;default:return\"Invalid input\"}}};function Fc(){return{localeError:gU()}}var _U=()=>{let e={string:{unit:\"karaktrojn\",verb:\"havi\"},file:{unit:\"bajtojn\",verb:\"havi\"},array:{unit:\"elementojn\",verb:\"havi\"},set:{unit:\"elementojn\",verb:\"havi\"}};function t(r){return e[r]??null}let n={regex:\"enigo\",email:\"retadreso\",url:\"URL\",emoji:\"emoĝio\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO-datotempo\",date:\"ISO-dato\",time:\"ISO-tempo\",duration:\"ISO-daŭro\",ipv4:\"IPv4-adreso\",ipv6:\"IPv6-adreso\",cidrv4:\"IPv4-rango\",cidrv6:\"IPv6-rango\",base64:\"64-ume kodita karaktraro\",base64url:\"URL-64-ume kodita karaktraro\",json_string:\"JSON-karaktraro\",e164:\"E.164-nombro\",jwt:\"JWT\",template_literal:\"enigo\"},o={nan:\"NaN\",number:\"nombro\",array:\"tabelo\",null:\"senvalora\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Nevalida enigo: atendiĝis instanceof ${r.expected}, riceviĝis ${a}`;return`Nevalida enigo: atendiĝis ${i}, riceviĝis ${a}`}case\"invalid_value\":if(r.values.length===1)return`Nevalida enigo: atendiĝis ${x(r.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Tro granda: atendiĝis ke ${r.origin??\"valoro\"} havu ${i}${r.maximum.toString()} ${s.unit??\"elementojn\"}`;return`Tro granda: atendiĝis ke ${r.origin??\"valoro\"} havu ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Tro malgranda: atendiĝis ke ${r.origin} havu ${i}${r.minimum.toString()} ${s.unit}`;return`Tro malgranda: atendiĝis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Nevalida karaktraro: devas komenciĝi per \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Nevalida karaktraro: devas finiĝi per \"${i.suffix}\"`;if(i.format===\"includes\")return`Nevalida karaktraro: devas inkluzivi \"${i.includes}\"`;if(i.format===\"regex\")return`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`;return`Nevalida ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case\"unrecognized_keys\":return`Nekonata${r.keys.length>1?\"j\":\"\"} ŝlosilo${r.keys.length>1?\"j\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Nevalida ŝlosilo en ${r.origin}`;case\"invalid_union\":return\"Nevalida enigo\";case\"invalid_element\":return`Nevalida valoro en ${r.origin}`;default:return\"Nevalida enigo\"}}};function Z_(){return{localeError:_U()}}var vU=()=>{let e={string:{unit:\"caracteres\",verb:\"tener\"},file:{unit:\"bytes\",verb:\"tener\"},array:{unit:\"elementos\",verb:\"tener\"},set:{unit:\"elementos\",verb:\"tener\"}};function t(r){return e[r]??null}let n={regex:\"entrada\",email:\"dirección de correo electrónico\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"fecha y hora ISO\",date:\"fecha ISO\",time:\"hora ISO\",duration:\"duración ISO\",ipv4:\"dirección IPv4\",ipv6:\"dirección IPv6\",cidrv4:\"rango IPv4\",cidrv6:\"rango IPv6\",base64:\"cadena codificada en base64\",base64url:\"URL codificada en base64\",json_string:\"cadena JSON\",e164:\"número E.164\",jwt:\"JWT\",template_literal:\"entrada\"},o={nan:\"NaN\",string:\"texto\",number:\"número\",boolean:\"booleano\",array:\"arreglo\",object:\"objeto\",set:\"conjunto\",file:\"archivo\",date:\"fecha\",bigint:\"número grande\",symbol:\"símbolo\",undefined:\"indefinido\",null:\"nulo\",function:\"función\",map:\"mapa\",record:\"registro\",tuple:\"tupla\",enum:\"enumeración\",union:\"unión\",literal:\"literal\",promise:\"promesa\",void:\"vacío\",never:\"nunca\",unknown:\"desconocido\",any:\"cualquiera\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Entrada inválida: se esperaba instanceof ${r.expected}, recibido ${a}`;return`Entrada inválida: se esperaba ${i}, recibido ${a}`}case\"invalid_value\":if(r.values.length===1)return`Entrada inválida: se esperaba ${x(r.values[0])}`;return`Opción inválida: se esperaba una de ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin),a=o[r.origin]??r.origin;if(s)return`Demasiado grande: se esperaba que ${a??\"valor\"} tuviera ${i}${r.maximum.toString()} ${s.unit??\"elementos\"}`;return`Demasiado grande: se esperaba que ${a??\"valor\"} fuera ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin),a=o[r.origin]??r.origin;if(s)return`Demasiado pequeño: se esperaba que ${a} tuviera ${i}${r.minimum.toString()} ${s.unit}`;return`Demasiado pequeño: se esperaba que ${a} fuera ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Cadena inválida: debe comenzar con \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Cadena inválida: debe terminar en \"${i.suffix}\"`;if(i.format===\"includes\")return`Cadena inválida: debe incluir \"${i.includes}\"`;if(i.format===\"regex\")return`Cadena inválida: debe coincidir con el patrón ${i.pattern}`;return`Inválido ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Número inválido: debe ser múltiplo de ${r.divisor}`;case\"unrecognized_keys\":return`Llave${r.keys.length>1?\"s\":\"\"} desconocida${r.keys.length>1?\"s\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Llave inválida en ${o[r.origin]??r.origin}`;case\"invalid_union\":return\"Entrada inválida\";case\"invalid_element\":return`Valor inválido en ${o[r.origin]??r.origin}`;default:return\"Entrada inválida\"}}};function A_(){return{localeError:vU()}}var bU=()=>{let e={string:{unit:\"کاراکتر\",verb:\"داشته باشد\"},file:{unit:\"بایت\",verb:\"داشته باشد\"},array:{unit:\"آیتم\",verb:\"داشته باشد\"},set:{unit:\"آیتم\",verb:\"داشته باشد\"}};function t(r){return e[r]??null}let n={regex:\"ورودی\",email:\"آدرس ایمیل\",url:\"URL\",emoji:\"ایموجی\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"تاریخ و زمان ایزو\",date:\"تاریخ ایزو\",time:\"زمان ایزو\",duration:\"مدت زمان ایزو\",ipv4:\"IPv4 آدرس\",ipv6:\"IPv6 آدرس\",cidrv4:\"IPv4 دامنه\",cidrv6:\"IPv6 دامنه\",base64:\"base64-encoded رشته\",base64url:\"base64url-encoded رشته\",json_string:\"JSON رشته\",e164:\"E.164 عدد\",jwt:\"JWT\",template_literal:\"ورودی\"},o={nan:\"NaN\",number:\"عدد\",array:\"آرایه\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`ورودی نامعتبر: میبایست instanceof ${r.expected} میبود، ${a} دریافت شد`;return`ورودی نامعتبر: میبایست ${i} میبود، ${a} دریافت شد`}case\"invalid_value\":if(r.values.length===1)return`ورودی نامعتبر: میبایست ${x(r.values[0])} میبود`;return`گزینه نامعتبر: میبایست یکی از ${v(r.values,\"|\")} میبود`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`خیلی بزرگ: ${r.origin??\"مقدار\"} باید ${i}${r.maximum.toString()} ${s.unit??\"عنصر\"} باشد`;return`خیلی بزرگ: ${r.origin??\"مقدار\"} باید ${i}${r.maximum.toString()} باشد`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`خیلی کوچک: ${r.origin} باید ${i}${r.minimum.toString()} ${s.unit} باشد`;return`خیلی کوچک: ${r.origin} باید ${i}${r.minimum.toString()} باشد`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`رشته نامعتبر: باید با \"${i.prefix}\" شروع شود`;if(i.format===\"ends_with\")return`رشته نامعتبر: باید با \"${i.suffix}\" تمام شود`;if(i.format===\"includes\")return`رشته نامعتبر: باید شامل \"${i.includes}\" باشد`;if(i.format===\"regex\")return`رشته نامعتبر: باید با الگوی ${i.pattern} مطابقت داشته باشد`;return`${n[i.format]??r.format} نامعتبر`}case\"not_multiple_of\":return`عدد نامعتبر: باید مضرب ${r.divisor} باشد`;case\"unrecognized_keys\":return`کلید${r.keys.length>1?\"های\":\"\"} ناشناس: ${v(r.keys,\", \")}`;case\"invalid_key\":return`کلید ناشناس در ${r.origin}`;case\"invalid_union\":return\"ورودی نامعتبر\";case\"invalid_element\":return`مقدار نامعتبر در ${r.origin}`;default:return\"ورودی نامعتبر\"}}};function U_(){return{localeError:bU()}}var SU=()=>{let e={string:{unit:\"merkkiä\",subject:\"merkkijonon\"},file:{unit:\"tavua\",subject:\"tiedoston\"},array:{unit:\"alkiota\",subject:\"listan\"},set:{unit:\"alkiota\",subject:\"joukon\"},number:{unit:\"\",subject:\"luvun\"},bigint:{unit:\"\",subject:\"suuren kokonaisluvun\"},int:{unit:\"\",subject:\"kokonaisluvun\"},date:{unit:\"\",subject:\"päivämäärän\"}};function t(r){return e[r]??null}let n={regex:\"säännöllinen lauseke\",email:\"sähköpostiosoite\",url:\"URL-osoite\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO-aikaleima\",date:\"ISO-päivämäärä\",time:\"ISO-aika\",duration:\"ISO-kesto\",ipv4:\"IPv4-osoite\",ipv6:\"IPv6-osoite\",cidrv4:\"IPv4-alue\",cidrv6:\"IPv6-alue\",base64:\"base64-koodattu merkkijono\",base64url:\"base64url-koodattu merkkijono\",json_string:\"JSON-merkkijono\",e164:\"E.164-luku\",jwt:\"JWT\",template_literal:\"templaattimerkkijono\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${a}`;return`Virheellinen tyyppi: odotettiin ${i}, oli ${a}`}case\"invalid_value\":if(r.values.length===1)return`Virheellinen syöte: täytyy olla ${x(r.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Liian suuri: ${s.subject} täytyy olla ${i}${r.maximum.toString()} ${s.unit}`.trim();return`Liian suuri: arvon täytyy olla ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Liian pieni: ${s.subject} täytyy olla ${i}${r.minimum.toString()} ${s.unit}`.trim();return`Liian pieni: arvon täytyy olla ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Virheellinen syöte: täytyy alkaa \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Virheellinen syöte: täytyy loppua \"${i.suffix}\"`;if(i.format===\"includes\")return`Virheellinen syöte: täytyy sisältää \"${i.includes}\"`;if(i.format===\"regex\")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${i.pattern}`;return`Virheellinen ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Virheellinen luku: täytyy olla luvun ${r.divisor} monikerta`;case\"unrecognized_keys\":return`${r.keys.length>1?\"Tuntemattomat avaimet\":\"Tuntematon avain\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return\"Virheellinen avain tietueessa\";case\"invalid_union\":return\"Virheellinen unioni\";case\"invalid_element\":return\"Virheellinen arvo joukossa\";default:return\"Virheellinen syöte\"}}};function M_(){return{localeError:SU()}}var yU=()=>{let e={string:{unit:\"caractères\",verb:\"avoir\"},file:{unit:\"octets\",verb:\"avoir\"},array:{unit:\"éléments\",verb:\"avoir\"},set:{unit:\"éléments\",verb:\"avoir\"}};function t(r){return e[r]??null}let n={regex:\"entrée\",email:\"adresse e-mail\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"date et heure ISO\",date:\"date ISO\",time:\"heure ISO\",duration:\"durée ISO\",ipv4:\"adresse IPv4\",ipv6:\"adresse IPv6\",cidrv4:\"plage IPv4\",cidrv6:\"plage IPv6\",base64:\"chaîne encodée en base64\",base64url:\"chaîne encodée en base64url\",json_string:\"chaîne JSON\",e164:\"numéro E.164\",jwt:\"JWT\",template_literal:\"entrée\"},o={string:\"chaîne\",number:\"nombre\",int:\"entier\",boolean:\"booléen\",bigint:\"grand entier\",symbol:\"symbole\",undefined:\"indéfini\",null:\"null\",never:\"jamais\",void:\"vide\",date:\"date\",array:\"tableau\",object:\"objet\",tuple:\"tuple\",record:\"enregistrement\",map:\"carte\",set:\"ensemble\",file:\"fichier\",nonoptional:\"non-optionnel\",nan:\"NaN\",function:\"fonction\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Entrée invalide : instanceof ${r.expected} attendu, ${a} reçu`;return`Entrée invalide : ${i} attendu, ${a} reçu`}case\"invalid_value\":if(r.values.length===1)return`Entrée invalide : ${x(r.values[0])} attendu`;return`Option invalide : une valeur parmi ${v(r.values,\"|\")} attendue`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Trop grand : ${o[r.origin]??\"valeur\"} doit ${s.verb} ${i}${r.maximum.toString()} ${s.unit??\"élément(s)\"}`;return`Trop grand : ${o[r.origin]??\"valeur\"} doit être ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Trop petit : ${o[r.origin]??\"valeur\"} doit ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`;return`Trop petit : ${o[r.origin]??\"valeur\"} doit être ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Chaîne invalide : doit commencer par \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Chaîne invalide : doit se terminer par \"${i.suffix}\"`;if(i.format===\"includes\")return`Chaîne invalide : doit inclure \"${i.includes}\"`;if(i.format===\"regex\")return`Chaîne invalide : doit correspondre au modèle ${i.pattern}`;return`${n[i.format]??r.format} invalide`}case\"not_multiple_of\":return`Nombre invalide : doit être un multiple de ${r.divisor}`;case\"unrecognized_keys\":return`Clé${r.keys.length>1?\"s\":\"\"} non reconnue${r.keys.length>1?\"s\":\"\"} : ${v(r.keys,\", \")}`;case\"invalid_key\":return`Clé invalide dans ${r.origin}`;case\"invalid_union\":return\"Entrée invalide\";case\"invalid_element\":return`Valeur invalide dans ${r.origin}`;default:return\"Entrée invalide\"}}};function D_(){return{localeError:yU()}}var zU=()=>{let e={string:{unit:\"caractères\",verb:\"avoir\"},file:{unit:\"octets\",verb:\"avoir\"},array:{unit:\"éléments\",verb:\"avoir\"},set:{unit:\"éléments\",verb:\"avoir\"}};function t(r){return e[r]??null}let n={regex:\"entrée\",email:\"adresse courriel\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"date-heure ISO\",date:\"date ISO\",time:\"heure ISO\",duration:\"durée ISO\",ipv4:\"adresse IPv4\",ipv6:\"adresse IPv6\",cidrv4:\"plage IPv4\",cidrv6:\"plage IPv6\",base64:\"chaîne encodée en base64\",base64url:\"chaîne encodée en base64url\",json_string:\"chaîne JSON\",e164:\"numéro E.164\",jwt:\"JWT\",template_literal:\"entrée\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Entrée invalide : attendu instanceof ${r.expected}, reçu ${a}`;return`Entrée invalide : attendu ${i}, reçu ${a}`}case\"invalid_value\":if(r.values.length===1)return`Entrée invalide : attendu ${x(r.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"≤\":\"<\",s=t(r.origin);if(s)return`Trop grand : attendu que ${r.origin??\"la valeur\"} ait ${i}${r.maximum.toString()} ${s.unit}`;return`Trop grand : attendu que ${r.origin??\"la valeur\"} soit ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\"≥\":\">\",s=t(r.origin);if(s)return`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${s.unit}`;return`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Chaîne invalide : doit commencer par \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Chaîne invalide : doit se terminer par \"${i.suffix}\"`;if(i.format===\"includes\")return`Chaîne invalide : doit inclure \"${i.includes}\"`;if(i.format===\"regex\")return`Chaîne invalide : doit correspondre au motif ${i.pattern}`;return`${n[i.format]??r.format} invalide`}case\"not_multiple_of\":return`Nombre invalide : doit être un multiple de ${r.divisor}`;case\"unrecognized_keys\":return`Clé${r.keys.length>1?\"s\":\"\"} non reconnue${r.keys.length>1?\"s\":\"\"} : ${v(r.keys,\", \")}`;case\"invalid_key\":return`Clé invalide dans ${r.origin}`;case\"invalid_union\":return\"Entrée invalide\";case\"invalid_element\":return`Valeur invalide dans ${r.origin}`;default:return\"Entrée invalide\"}}};function L_(){return{localeError:zU()}}var $U=()=>{let e={string:{label:\"מחרוזת\",gender:\"f\"},number:{label:\"מספר\",gender:\"m\"},boolean:{label:\"ערך בוליאני\",gender:\"m\"},bigint:{label:\"BigInt\",gender:\"m\"},date:{label:\"תאריך\",gender:\"m\"},array:{label:\"מערך\",gender:\"m\"},object:{label:\"אובייקט\",gender:\"m\"},null:{label:\"ערך ריק (null)\",gender:\"m\"},undefined:{label:\"ערך לא מוגדר (undefined)\",gender:\"m\"},symbol:{label:\"סימבול (Symbol)\",gender:\"m\"},function:{label:\"פונקציה\",gender:\"f\"},map:{label:\"מפה (Map)\",gender:\"f\"},set:{label:\"קבוצה (Set)\",gender:\"f\"},file:{label:\"קובץ\",gender:\"m\"},promise:{label:\"Promise\",gender:\"m\"},NaN:{label:\"NaN\",gender:\"m\"},unknown:{label:\"ערך לא ידוע\",gender:\"m\"},value:{label:\"ערך\",gender:\"m\"}},t={string:{unit:\"תווים\",shortLabel:\"קצר\",longLabel:\"ארוך\"},file:{unit:\"בייטים\",shortLabel:\"קטן\",longLabel:\"גדול\"},array:{unit:\"פריטים\",shortLabel:\"קטן\",longLabel:\"גדול\"},set:{unit:\"פריטים\",shortLabel:\"קטן\",longLabel:\"גדול\"},number:{unit:\"\",shortLabel:\"קטן\",longLabel:\"גדול\"}},n=(u)=>u?e[u]:void 0,o=(u)=>{let l=n(u);if(l)return l.label;return u??e.unknown.label},r=(u)=>`ה${o(u)}`,i=(u)=>(n(u)?.gender??\"m\")===\"f\"?\"צריכה להיות\":\"צריך להיות\",s=(u)=>{if(!u)return null;return t[u]??null},a={regex:{label:\"קלט\",gender:\"m\"},email:{label:\"כתובת אימייל\",gender:\"f\"},url:{label:\"כתובת רשת\",gender:\"f\"},emoji:{label:\"אימוג'י\",gender:\"m\"},uuid:{label:\"UUID\",gender:\"m\"},nanoid:{label:\"nanoid\",gender:\"m\"},guid:{label:\"GUID\",gender:\"m\"},cuid:{label:\"cuid\",gender:\"m\"},cuid2:{label:\"cuid2\",gender:\"m\"},ulid:{label:\"ULID\",gender:\"m\"},xid:{label:\"XID\",gender:\"m\"},ksuid:{label:\"KSUID\",gender:\"m\"},datetime:{label:\"תאריך וזמן ISO\",gender:\"m\"},date:{label:\"תאריך ISO\",gender:\"m\"},time:{label:\"זמן ISO\",gender:\"m\"},duration:{label:\"משך זמן ISO\",gender:\"m\"},ipv4:{label:\"כתובת IPv4\",gender:\"f\"},ipv6:{label:\"כתובת IPv6\",gender:\"f\"},cidrv4:{label:\"טווח IPv4\",gender:\"m\"},cidrv6:{label:\"טווח IPv6\",gender:\"m\"},base64:{label:\"מחרוזת בבסיס 64\",gender:\"f\"},base64url:{label:\"מחרוזת בבסיס 64 לכתובות רשת\",gender:\"f\"},json_string:{label:\"מחרוזת JSON\",gender:\"f\"},e164:{label:\"מספר E.164\",gender:\"m\"},jwt:{label:\"JWT\",gender:\"m\"},ends_with:{label:\"קלט\",gender:\"m\"},includes:{label:\"קלט\",gender:\"m\"},lowercase:{label:\"קלט\",gender:\"m\"},starts_with:{label:\"קלט\",gender:\"m\"},uppercase:{label:\"קלט\",gender:\"m\"}},c={nan:\"NaN\"};return(u)=>{switch(u.code){case\"invalid_type\":{let l=u.expected,m=c[l??\"\"]??o(l),f=w(u.input),h=c[f]??e[f]?.label??f;if(/^[A-Z]/.test(u.expected))return`קלט לא תקין: צריך להיות instanceof ${u.expected}, התקבל ${h}`;return`קלט לא תקין: צריך להיות ${m}, התקבל ${h}`}case\"invalid_value\":{if(u.values.length===1)return`ערך לא תקין: הערך חייב להיות ${x(u.values[0])}`;let l=u.values.map((h)=>x(h));if(u.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${l[0]} או ${l[1]}`;let m=l[l.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${l.slice(0,-1).join(\", \")} או ${m}`}case\"too_big\":{let l=s(u.origin),m=r(u.origin??\"value\");if(u.origin===\"string\")return`${l?.longLabel??\"ארוך\"} מדי: ${m} צריכה להכיל ${u.maximum.toString()} ${l?.unit??\"\"} ${u.inclusive?\"או פחות\":\"לכל היותר\"}`.trim();if(u.origin===\"number\"){let z=u.inclusive?`קטן או שווה ל-${u.maximum}`:`קטן מ-${u.maximum}`;return`גדול מדי: ${m} צריך להיות ${z}`}if(u.origin===\"array\"||u.origin===\"set\"){let z=u.origin===\"set\"?\"צריכה\":\"צריך\",C=u.inclusive?`${u.maximum} ${l?.unit??\"\"} או פחות`:`פחות מ-${u.maximum} ${l?.unit??\"\"}`;return`גדול מדי: ${m} ${z} להכיל ${C}`.trim()}let f=u.inclusive?\"<=\":\"<\",h=i(u.origin??\"value\");if(l?.unit)return`${l.longLabel} מדי: ${m} ${h} ${f}${u.maximum.toString()} ${l.unit}`;return`${l?.longLabel??\"גדול\"} מדי: ${m} ${h} ${f}${u.maximum.toString()}`}case\"too_small\":{let l=s(u.origin),m=r(u.origin??\"value\");if(u.origin===\"string\")return`${l?.shortLabel??\"קצר\"} מדי: ${m} צריכה להכיל ${u.minimum.toString()} ${l?.unit??\"\"} ${u.inclusive?\"או יותר\":\"לפחות\"}`.trim();if(u.origin===\"number\"){let z=u.inclusive?`גדול או שווה ל-${u.minimum}`:`גדול מ-${u.minimum}`;return`קטן מדי: ${m} צריך להיות ${z}`}if(u.origin===\"array\"||u.origin===\"set\"){let z=u.origin===\"set\"?\"צריכה\":\"צריך\";if(u.minimum===1&&u.inclusive){let I=u.origin===\"set\"?\"לפחות פריט אחד\":\"לפחות פריט אחד\";return`קטן מדי: ${m} ${z} להכיל ${I}`}let C=u.inclusive?`${u.minimum} ${l?.unit??\"\"} או יותר`:`יותר מ-${u.minimum} ${l?.unit??\"\"}`;return`קטן מדי: ${m} ${z} להכיל ${C}`.trim()}let f=u.inclusive?\">=\":\">\",h=i(u.origin??\"value\");if(l?.unit)return`${l.shortLabel} מדי: ${m} ${h} ${f}${u.minimum.toString()} ${l.unit}`;return`${l?.shortLabel??\"קטן\"} מדי: ${m} ${h} ${f}${u.minimum.toString()}`}case\"invalid_format\":{let l=u;if(l.format===\"starts_with\")return`המחרוזת חייבת להתחיל ב \"${l.prefix}\"`;if(l.format===\"ends_with\")return`המחרוזת חייבת להסתיים ב \"${l.suffix}\"`;if(l.format===\"includes\")return`המחרוזת חייבת לכלול \"${l.includes}\"`;if(l.format===\"regex\")return`המחרוזת חייבת להתאים לתבנית ${l.pattern}`;let m=a[l.format],f=m?.label??l.format,z=(m?.gender??\"m\")===\"f\"?\"תקינה\":\"תקין\";return`${f} לא ${z}`}case\"not_multiple_of\":return`מספר לא תקין: חייב להיות מכפלה של ${u.divisor}`;case\"unrecognized_keys\":return`מפתח${u.keys.length>1?\"ות\":\"\"} לא מזוה${u.keys.length>1?\"ים\":\"ה\"}: ${v(u.keys,\", \")}`;case\"invalid_key\":return\"שדה לא תקין באובייקט\";case\"invalid_union\":return\"קלט לא תקין\";case\"invalid_element\":return`ערך לא תקין ב${r(u.origin??\"array\")}`;default:return\"קלט לא תקין\"}}};function q_(){return{localeError:$U()}}var xU=()=>{let e={string:{unit:\"znakova\",verb:\"imati\"},file:{unit:\"bajtova\",verb:\"imati\"},array:{unit:\"stavki\",verb:\"imati\"},set:{unit:\"stavki\",verb:\"imati\"}};function t(r){return e[r]??null}let n={regex:\"unos\",email:\"email adresa\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO datum i vrijeme\",date:\"ISO datum\",time:\"ISO vrijeme\",duration:\"ISO trajanje\",ipv4:\"IPv4 adresa\",ipv6:\"IPv6 adresa\",cidrv4:\"IPv4 raspon\",cidrv6:\"IPv6 raspon\",base64:\"base64 kodirani tekst\",base64url:\"base64url kodirani tekst\",json_string:\"JSON tekst\",e164:\"E.164 broj\",jwt:\"JWT\",template_literal:\"unos\"},o={nan:\"NaN\",string:\"tekst\",number:\"broj\",boolean:\"boolean\",array:\"niz\",object:\"objekt\",set:\"skup\",file:\"datoteka\",date:\"datum\",bigint:\"bigint\",symbol:\"simbol\",undefined:\"undefined\",null:\"null\",function:\"funkcija\",map:\"mapa\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Neispravan unos: očekuje se instanceof ${r.expected}, a primljeno je ${a}`;return`Neispravan unos: očekuje se ${i}, a primljeno je ${a}`}case\"invalid_value\":if(r.values.length===1)return`Neispravna vrijednost: očekivano ${x(r.values[0])}`;return`Neispravna opcija: očekivano jedno od ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin),a=o[r.origin]??r.origin;if(s)return`Preveliko: očekivano da ${a??\"vrijednost\"} ima ${i}${r.maximum.toString()} ${s.unit??\"elemenata\"}`;return`Preveliko: očekivano da ${a??\"vrijednost\"} bude ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin),a=o[r.origin]??r.origin;if(s)return`Premalo: očekivano da ${a} ima ${i}${r.minimum.toString()} ${s.unit}`;return`Premalo: očekivano da ${a} bude ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Neispravan tekst: mora započinjati s \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Neispravan tekst: mora završavati s \"${i.suffix}\"`;if(i.format===\"includes\")return`Neispravan tekst: mora sadržavati \"${i.includes}\"`;if(i.format===\"regex\")return`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`;return`Neispravna ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Neispravan broj: mora biti višekratnik od ${r.divisor}`;case\"unrecognized_keys\":return`Neprepoznat${r.keys.length>1?\"i ključevi\":\" ključ\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Neispravan ključ u ${o[r.origin]??r.origin}`;case\"invalid_union\":return\"Neispravan unos\";case\"invalid_element\":return`Neispravna vrijednost u ${o[r.origin]??r.origin}`;default:return\"Neispravan unos\"}}};function F_(){return{localeError:xU()}}var wU=()=>{let e={string:{unit:\"karakter\",verb:\"legyen\"},file:{unit:\"byte\",verb:\"legyen\"},array:{unit:\"elem\",verb:\"legyen\"},set:{unit:\"elem\",verb:\"legyen\"}};function t(r){return e[r]??null}let n={regex:\"bemenet\",email:\"email cím\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO időbélyeg\",date:\"ISO dátum\",time:\"ISO idő\",duration:\"ISO időintervallum\",ipv4:\"IPv4 cím\",ipv6:\"IPv6 cím\",cidrv4:\"IPv4 tartomány\",cidrv6:\"IPv6 tartomány\",base64:\"base64-kódolt string\",base64url:\"base64url-kódolt string\",json_string:\"JSON string\",e164:\"E.164 szám\",jwt:\"JWT\",template_literal:\"bemenet\"},o={nan:\"NaN\",number:\"szám\",array:\"tömb\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Érvénytelen bemenet: a várt érték instanceof ${r.expected}, a kapott érték ${a}`;return`Érvénytelen bemenet: a várt érték ${i}, a kapott érték ${a}`}case\"invalid_value\":if(r.values.length===1)return`Érvénytelen bemenet: a várt érték ${x(r.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Túl nagy: ${r.origin??\"érték\"} mérete túl nagy ${i}${r.maximum.toString()} ${s.unit??\"elem\"}`;return`Túl nagy: a bemeneti érték ${r.origin??\"érték\"} túl nagy: ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Túl kicsi: a bemeneti érték ${r.origin} mérete túl kicsi ${i}${r.minimum.toString()} ${s.unit}`;return`Túl kicsi: a bemeneti érték ${r.origin} túl kicsi ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Érvénytelen string: \"${i.prefix}\" értékkel kell kezdődnie`;if(i.format===\"ends_with\")return`Érvénytelen string: \"${i.suffix}\" értékkel kell végződnie`;if(i.format===\"includes\")return`Érvénytelen string: \"${i.includes}\" értéket kell tartalmaznia`;if(i.format===\"regex\")return`Érvénytelen string: ${i.pattern} mintának kell megfelelnie`;return`Érvénytelen ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Érvénytelen szám: ${r.divisor} többszörösének kell lennie`;case\"unrecognized_keys\":return`Ismeretlen kulcs${r.keys.length>1?\"s\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Érvénytelen kulcs ${r.origin}`;case\"invalid_union\":return\"Érvénytelen bemenet\";case\"invalid_element\":return`Érvénytelen érték: ${r.origin}`;default:return\"Érvénytelen bemenet\"}}};function V_(){return{localeError:wU()}}function WT(e,t,n){return Math.abs(e)===1?t:n}function Lo(e){if(!e)return\"\";let t=[\"ա\",\"ե\",\"ը\",\"ի\",\"ո\",\"ու\",\"օ\"],n=e[e.length-1];return e+(t.includes(n)?\"ն\":\"ը\")}var kU=()=>{let e={string:{unit:{one:\"նշան\",many:\"նշաններ\"},verb:\"ունենալ\"},file:{unit:{one:\"բայթ\",many:\"բայթեր\"},verb:\"ունենալ\"},array:{unit:{one:\"տարր\",many:\"տարրեր\"},verb:\"ունենալ\"},set:{unit:{one:\"տարր\",many:\"տարրեր\"},verb:\"ունենալ\"}};function t(r){return e[r]??null}let n={regex:\"մուտք\",email:\"էլ. հասցե\",url:\"URL\",emoji:\"էմոջի\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO ամսաթիվ և ժամ\",date:\"ISO ամսաթիվ\",time:\"ISO ժամ\",duration:\"ISO տևողություն\",ipv4:\"IPv4 հասցե\",ipv6:\"IPv6 հասցե\",cidrv4:\"IPv4 միջակայք\",cidrv6:\"IPv6 միջակայք\",base64:\"base64 ձևաչափով տող\",base64url:\"base64url ձևաչափով տող\",json_string:\"JSON տող\",e164:\"E.164 համար\",jwt:\"JWT\",template_literal:\"մուտք\"},o={nan:\"NaN\",number:\"թիվ\",array:\"զանգված\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${r.expected}, ստացվել է ${a}`;return`Սխալ մուտքագրում․ սպասվում էր ${i}, ստացվել է ${a}`}case\"invalid_value\":if(r.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${x(r.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s){let a=Number(r.maximum),c=WT(a,s.unit.one,s.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Lo(r.origin??\"արժեք\")} կունենա ${i}${r.maximum.toString()} ${c}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Lo(r.origin??\"արժեք\")} լինի ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s){let a=Number(r.minimum),c=WT(a,s.unit.one,s.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Lo(r.origin)} կունենա ${i}${r.minimum.toString()} ${c}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Lo(r.origin)} լինի ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Սխալ տող․ պետք է սկսվի \"${i.prefix}\"-ով`;if(i.format===\"ends_with\")return`Սխալ տող․ պետք է ավարտվի \"${i.suffix}\"-ով`;if(i.format===\"includes\")return`Սխալ տող․ պետք է պարունակի \"${i.includes}\"`;if(i.format===\"regex\")return`Սխալ տող․ պետք է համապատասխանի ${i.pattern} ձևաչափին`;return`Սխալ ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${r.divisor}-ի`;case\"unrecognized_keys\":return`Չճանաչված բանալի${r.keys.length>1?\"ներ\":\"\"}. ${v(r.keys,\", \")}`;case\"invalid_key\":return`Սխալ բանալի ${Lo(r.origin)}-ում`;case\"invalid_union\":return\"Սխալ մուտքագրում\";case\"invalid_element\":return`Սխալ արժեք ${Lo(r.origin)}-ում`;default:return\"Սխալ մուտքագրում\"}}};function J_(){return{localeError:kU()}}var PU=()=>{let e={string:{unit:\"karakter\",verb:\"memiliki\"},file:{unit:\"byte\",verb:\"memiliki\"},array:{unit:\"item\",verb:\"memiliki\"},set:{unit:\"item\",verb:\"memiliki\"}};function t(r){return e[r]??null}let n={regex:\"input\",email:\"alamat email\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"tanggal dan waktu format ISO\",date:\"tanggal format ISO\",time:\"jam format ISO\",duration:\"durasi format ISO\",ipv4:\"alamat IPv4\",ipv6:\"alamat IPv6\",cidrv4:\"rentang alamat IPv4\",cidrv6:\"rentang alamat IPv6\",base64:\"string dengan enkode base64\",base64url:\"string dengan enkode base64url\",json_string:\"string JSON\",e164:\"angka E.164\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${a}`;return`Input tidak valid: diharapkan ${i}, diterima ${a}`}case\"invalid_value\":if(r.values.length===1)return`Input tidak valid: diharapkan ${x(r.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Terlalu besar: diharapkan ${r.origin??\"value\"} memiliki ${i}${r.maximum.toString()} ${s.unit??\"elemen\"}`;return`Terlalu besar: diharapkan ${r.origin??\"value\"} menjadi ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${s.unit}`;return`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`String tidak valid: harus dimulai dengan \"${i.prefix}\"`;if(i.format===\"ends_with\")return`String tidak valid: harus berakhir dengan \"${i.suffix}\"`;if(i.format===\"includes\")return`String tidak valid: harus menyertakan \"${i.includes}\"`;if(i.format===\"regex\")return`String tidak valid: harus sesuai pola ${i.pattern}`;return`${n[i.format]??r.format} tidak valid`}case\"not_multiple_of\":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case\"unrecognized_keys\":return`Kunci tidak dikenali ${r.keys.length>1?\"s\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Kunci tidak valid di ${r.origin}`;case\"invalid_union\":return\"Input tidak valid\";case\"invalid_element\":return`Nilai tidak valid di ${r.origin}`;default:return\"Input tidak valid\"}}};function B_(){return{localeError:PU()}}var RU=()=>{let e={string:{unit:\"stafi\",verb:\"að hafa\"},file:{unit:\"bæti\",verb:\"að hafa\"},array:{unit:\"hluti\",verb:\"að hafa\"},set:{unit:\"hluti\",verb:\"að hafa\"}};function t(r){return e[r]??null}let n={regex:\"gildi\",email:\"netfang\",url:\"vefslóð\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO dagsetning og tími\",date:\"ISO dagsetning\",time:\"ISO tími\",duration:\"ISO tímalengd\",ipv4:\"IPv4 address\",ipv6:\"IPv6 address\",cidrv4:\"IPv4 range\",cidrv6:\"IPv6 range\",base64:\"base64-encoded strengur\",base64url:\"base64url-encoded strengur\",json_string:\"JSON strengur\",e164:\"E.164 tölugildi\",jwt:\"JWT\",template_literal:\"gildi\"},o={nan:\"NaN\",number:\"númer\",array:\"fylki\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Rangt gildi: Þú slóst inn ${a} þar sem á að vera instanceof ${r.expected}`;return`Rangt gildi: Þú slóst inn ${a} þar sem á að vera ${i}`}case\"invalid_value\":if(r.values.length===1)return`Rangt gildi: gert ráð fyrir ${x(r.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Of stórt: gert er ráð fyrir að ${r.origin??\"gildi\"} hafi ${i}${r.maximum.toString()} ${s.unit??\"hluti\"}`;return`Of stórt: gert er ráð fyrir að ${r.origin??\"gildi\"} sé ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Of lítið: gert er ráð fyrir að ${r.origin} hafi ${i}${r.minimum.toString()} ${s.unit}`;return`Of lítið: gert er ráð fyrir að ${r.origin} sé ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Ógildur strengur: verður að byrja á \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Ógildur strengur: verður að enda á \"${i.suffix}\"`;if(i.format===\"includes\")return`Ógildur strengur: verður að innihalda \"${i.includes}\"`;if(i.format===\"regex\")return`Ógildur strengur: verður að fylgja mynstri ${i.pattern}`;return`Rangt ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Röng tala: verður að vera margfeldi af ${r.divisor}`;case\"unrecognized_keys\":return`Óþekkt ${r.keys.length>1?\"ir lyklar\":\"ur lykill\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Rangur lykill í ${r.origin}`;case\"invalid_union\":return\"Rangt gildi\";case\"invalid_element\":return`Rangt gildi í ${r.origin}`;default:return\"Rangt gildi\"}}};function H_(){return{localeError:RU()}}var IU=()=>{let e={string:{unit:\"caratteri\",verb:\"avere\"},file:{unit:\"byte\",verb:\"avere\"},array:{unit:\"elementi\",verb:\"avere\"},set:{unit:\"elementi\",verb:\"avere\"}};function t(r){return e[r]??null}let n={regex:\"input\",email:\"indirizzo email\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"data e ora ISO\",date:\"data ISO\",time:\"ora ISO\",duration:\"durata ISO\",ipv4:\"indirizzo IPv4\",ipv6:\"indirizzo IPv6\",cidrv4:\"intervallo IPv4\",cidrv6:\"intervallo IPv6\",base64:\"stringa codificata in base64\",base64url:\"URL codificata in base64\",json_string:\"stringa JSON\",e164:\"numero E.164\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\",number:\"numero\",array:\"vettore\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Input non valido: atteso instanceof ${r.expected}, ricevuto ${a}`;return`Input non valido: atteso ${i}, ricevuto ${a}`}case\"invalid_value\":if(r.values.length===1)return`Input non valido: atteso ${x(r.values[0])}`;return`Opzione non valida: atteso uno tra ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Troppo grande: ${r.origin??\"valore\"} deve avere ${i}${r.maximum.toString()} ${s.unit??\"elementi\"}`;return`Troppo grande: ${r.origin??\"valore\"} deve essere ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${s.unit}`;return`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Stringa non valida: deve iniziare con \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Stringa non valida: deve terminare con \"${i.suffix}\"`;if(i.format===\"includes\")return`Stringa non valida: deve includere \"${i.includes}\"`;if(i.format===\"regex\")return`Stringa non valida: deve corrispondere al pattern ${i.pattern}`;return`Input non valido: ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case\"unrecognized_keys\":return`Chiav${r.keys.length>1?\"i\":\"e\"} non riconosciut${r.keys.length>1?\"e\":\"a\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Chiave non valida in ${r.origin}`;case\"invalid_union\":return\"Input non valido\";case\"invalid_element\":return`Valore non valido in ${r.origin}`;default:return\"Input non valido\"}}};function G_(){return{localeError:IU()}}var TU=()=>{let e={string:{unit:\"文字\",verb:\"である\"},file:{unit:\"バイト\",verb:\"である\"},array:{unit:\"要素\",verb:\"である\"},set:{unit:\"要素\",verb:\"である\"}};function t(r){return e[r]??null}let n={regex:\"入力値\",email:\"メールアドレス\",url:\"URL\",emoji:\"絵文字\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO日時\",date:\"ISO日付\",time:\"ISO時刻\",duration:\"ISO期間\",ipv4:\"IPv4アドレス\",ipv6:\"IPv6アドレス\",cidrv4:\"IPv4範囲\",cidrv6:\"IPv6範囲\",base64:\"base64エンコード文字列\",base64url:\"base64urlエンコード文字列\",json_string:\"JSON文字列\",e164:\"E.164番号\",jwt:\"JWT\",template_literal:\"入力値\"},o={nan:\"NaN\",number:\"数値\",array:\"配列\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`無効な入力: instanceof ${r.expected}が期待されましたが、${a}が入力されました`;return`無効な入力: ${i}が期待されましたが、${a}が入力されました`}case\"invalid_value\":if(r.values.length===1)return`無効な入力: ${x(r.values[0])}が期待されました`;return`無効な選択: ${v(r.values,\"、\")}のいずれかである必要があります`;case\"too_big\":{let i=r.inclusive?\"以下である\":\"より小さい\",s=t(r.origin);if(s)return`大きすぎる値: ${r.origin??\"値\"}は${r.maximum.toString()}${s.unit??\"要素\"}${i}必要があります`;return`大きすぎる値: ${r.origin??\"値\"}は${r.maximum.toString()}${i}必要があります`}case\"too_small\":{let i=r.inclusive?\"以上である\":\"より大きい\",s=t(r.origin);if(s)return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${s.unit}${i}必要があります`;return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${i}必要があります`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`無効な文字列: \"${i.prefix}\"で始まる必要があります`;if(i.format===\"ends_with\")return`無効な文字列: \"${i.suffix}\"で終わる必要があります`;if(i.format===\"includes\")return`無効な文字列: \"${i.includes}\"を含む必要があります`;if(i.format===\"regex\")return`無効な文字列: パターン${i.pattern}に一致する必要があります`;return`無効な${n[i.format]??r.format}`}case\"not_multiple_of\":return`無効な数値: ${r.divisor}の倍数である必要があります`;case\"unrecognized_keys\":return`認識されていないキー${r.keys.length>1?\"群\":\"\"}: ${v(r.keys,\"、\")}`;case\"invalid_key\":return`${r.origin}内の無効なキー`;case\"invalid_union\":return\"無効な入力\";case\"invalid_element\":return`${r.origin}内の無効な値`;default:return\"無効な入力\"}}};function W_(){return{localeError:TU()}}var EU=()=>{let e={string:{unit:\"სიმბოლო\",verb:\"უნდა შეიცავდეს\"},file:{unit:\"ბაიტი\",verb:\"უნდა შეიცავდეს\"},array:{unit:\"ელემენტი\",verb:\"უნდა შეიცავდეს\"},set:{unit:\"ელემენტი\",verb:\"უნდა შეიცავდეს\"}};function t(r){return e[r]??null}let n={regex:\"შეყვანა\",email:\"ელ-ფოსტის მისამართი\",url:\"URL\",emoji:\"ემოჯი\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"თარიღი-დრო\",date:\"თარიღი\",time:\"დრო\",duration:\"ხანგრძლივობა\",ipv4:\"IPv4 მისამართი\",ipv6:\"IPv6 მისამართი\",cidrv4:\"IPv4 დიაპაზონი\",cidrv6:\"IPv6 დიაპაზონი\",base64:\"base64-კოდირებული ველი\",base64url:\"base64url-კოდირებული ველი\",json_string:\"JSON ველი\",e164:\"E.164 ნომერი\",jwt:\"JWT\",template_literal:\"შეყვანა\"},o={nan:\"NaN\",number:\"რიცხვი\",string:\"ველი\",boolean:\"ბულეანი\",function:\"ფუნქცია\",array:\"მასივი\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${r.expected}, მიღებული ${a}`;return`არასწორი შეყვანა: მოსალოდნელი ${i}, მიღებული ${a}`}case\"invalid_value\":if(r.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${x(r.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${v(r.values,\"|\")}-დან`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`ზედმეტად დიდი: მოსალოდნელი ${r.origin??\"მნიშვნელობა\"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${r.origin??\"მნიშვნელობა\"} იყოს ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`ზედმეტად პატარა: მოსალოდნელი ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${r.origin} იყოს ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`არასწორი ველი: უნდა იწყებოდეს \"${i.prefix}\"-ით`;if(i.format===\"ends_with\")return`არასწორი ველი: უნდა მთავრდებოდეს \"${i.suffix}\"-ით`;if(i.format===\"includes\")return`არასწორი ველი: უნდა შეიცავდეს \"${i.includes}\"-ს`;if(i.format===\"regex\")return`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${i.pattern}`;return`არასწორი ${n[i.format]??r.format}`}case\"not_multiple_of\":return`არასწორი რიცხვი: უნდა იყოს ${r.divisor}-ის ჯერადი`;case\"unrecognized_keys\":return`უცნობი გასაღებ${r.keys.length>1?\"ები\":\"ი\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`არასწორი გასაღები ${r.origin}-ში`;case\"invalid_union\":return\"არასწორი შეყვანა\";case\"invalid_element\":return`არასწორი მნიშვნელობა ${r.origin}-ში`;default:return\"არასწორი შეყვანა\"}}};function K_(){return{localeError:EU()}}var OU=()=>{let e={string:{unit:\"តួអក្សរ\",verb:\"គួរមាន\"},file:{unit:\"បៃ\",verb:\"គួរមាន\"},array:{unit:\"ធាតុ\",verb:\"គួរមាន\"},set:{unit:\"ធាតុ\",verb:\"គួរមាន\"}};function t(r){return e[r]??null}let n={regex:\"ទិន្នន័យបញ្ចូល\",email:\"អាសយដ្ឋានអ៊ីមែល\",url:\"URL\",emoji:\"សញ្ញាអារម្មណ៍\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"កាលបរិច្ឆេទ និងម៉ោង ISO\",date:\"កាលបរិច្ឆេទ ISO\",time:\"ម៉ោង ISO\",duration:\"រយៈពេល ISO\",ipv4:\"អាសយដ្ឋាន IPv4\",ipv6:\"អាសយដ្ឋាន IPv6\",cidrv4:\"ដែនអាសយដ្ឋាន IPv4\",cidrv6:\"ដែនអាសយដ្ឋាន IPv6\",base64:\"ខ្សែអក្សរអ៊ិកូដ base64\",base64url:\"ខ្សែអក្សរអ៊ិកូដ base64url\",json_string:\"ខ្សែអក្សរ JSON\",e164:\"លេខ E.164\",jwt:\"JWT\",template_literal:\"ទិន្នន័យបញ្ចូល\"},o={nan:\"NaN\",number:\"លេខ\",array:\"អារេ (Array)\",null:\"គ្មានតម្លៃ (null)\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${r.expected} ប៉ុន្តែទទួលបាន ${a}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${i} ប៉ុន្តែទទួលបាន ${a}`}case\"invalid_value\":if(r.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${x(r.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`ធំពេក៖ ត្រូវការ ${r.origin??\"តម្លៃ\"} ${i} ${r.maximum.toString()} ${s.unit??\"ធាតុ\"}`;return`ធំពេក៖ ត្រូវការ ${r.origin??\"តម្លៃ\"} ${i} ${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`តូចពេក៖ ត្រូវការ ${r.origin} ${i} ${r.minimum.toString()} ${s.unit}`;return`តូចពេក៖ ត្រូវការ ${r.origin} ${i} ${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ \"${i.prefix}\"`;if(i.format===\"ends_with\")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ \"${i.suffix}\"`;if(i.format===\"includes\")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន \"${i.includes}\"`;if(i.format===\"regex\")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${i.pattern}`;return`មិនត្រឹមត្រូវ៖ ${n[i.format]??r.format}`}case\"not_multiple_of\":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${r.divisor}`;case\"unrecognized_keys\":return`រកឃើញសោមិនស្គាល់៖ ${v(r.keys,\", \")}`;case\"invalid_key\":return`សោមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`;case\"invalid_union\":return\"ទិន្នន័យមិនត្រឹមត្រូវ\";case\"invalid_element\":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`;default:return\"ទិន្នន័យមិនត្រឹមត្រូវ\"}}};function Vc(){return{localeError:OU()}}function Y_(){return Vc()}var jU=()=>{let e={string:{unit:\"문자\",verb:\"to have\"},file:{unit:\"바이트\",verb:\"to have\"},array:{unit:\"개\",verb:\"to have\"},set:{unit:\"개\",verb:\"to have\"}};function t(r){return e[r]??null}let n={regex:\"입력\",email:\"이메일 주소\",url:\"URL\",emoji:\"이모지\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO 날짜시간\",date:\"ISO 날짜\",time:\"ISO 시간\",duration:\"ISO 기간\",ipv4:\"IPv4 주소\",ipv6:\"IPv6 주소\",cidrv4:\"IPv4 범위\",cidrv6:\"IPv6 범위\",base64:\"base64 인코딩 문자열\",base64url:\"base64url 인코딩 문자열\",json_string:\"JSON 문자열\",e164:\"E.164 번호\",jwt:\"JWT\",template_literal:\"입력\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`잘못된 입력: 예상 타입은 instanceof ${r.expected}, 받은 타입은 ${a}입니다`;return`잘못된 입력: 예상 타입은 ${i}, 받은 타입은 ${a}입니다`}case\"invalid_value\":if(r.values.length===1)return`잘못된 입력: 값은 ${x(r.values[0])} 이어야 합니다`;return`잘못된 옵션: ${v(r.values,\"또는 \")} 중 하나여야 합니다`;case\"too_big\":{let i=r.inclusive?\"이하\":\"미만\",s=i===\"미만\"?\"이어야 합니다\":\"여야 합니다\",a=t(r.origin),c=a?.unit??\"요소\";if(a)return`${r.origin??\"값\"}이 너무 큽니다: ${r.maximum.toString()}${c} ${i}${s}`;return`${r.origin??\"값\"}이 너무 큽니다: ${r.maximum.toString()} ${i}${s}`}case\"too_small\":{let i=r.inclusive?\"이상\":\"초과\",s=i===\"이상\"?\"이어야 합니다\":\"여야 합니다\",a=t(r.origin),c=a?.unit??\"요소\";if(a)return`${r.origin??\"값\"}이 너무 작습니다: ${r.minimum.toString()}${c} ${i}${s}`;return`${r.origin??\"값\"}이 너무 작습니다: ${r.minimum.toString()} ${i}${s}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`잘못된 문자열: \"${i.prefix}\"(으)로 시작해야 합니다`;if(i.format===\"ends_with\")return`잘못된 문자열: \"${i.suffix}\"(으)로 끝나야 합니다`;if(i.format===\"includes\")return`잘못된 문자열: \"${i.includes}\"을(를) 포함해야 합니다`;if(i.format===\"regex\")return`잘못된 문자열: 정규식 ${i.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${n[i.format]??r.format}`}case\"not_multiple_of\":return`잘못된 숫자: ${r.divisor}의 배수여야 합니다`;case\"unrecognized_keys\":return`인식할 수 없는 키: ${v(r.keys,\", \")}`;case\"invalid_key\":return`잘못된 키: ${r.origin}`;case\"invalid_union\":return\"잘못된 입력\";case\"invalid_element\":return`잘못된 값: ${r.origin}`;default:return\"잘못된 입력\"}}};function X_(){return{localeError:jU()}}var Jc=(e)=>e.charAt(0).toUpperCase()+e.slice(1);function KT(e){let t=Math.abs(e),n=t%10,o=t%100;if(o>=11&&o<=19||n===0)return\"many\";if(n===1)return\"one\";return\"few\"}var NU=()=>{let e={string:{unit:{one:\"simbolis\",few:\"simboliai\",many:\"simbolių\"},verb:{smaller:{inclusive:\"turi būti ne ilgesnė kaip\",notInclusive:\"turi būti trumpesnė kaip\"},bigger:{inclusive:\"turi būti ne trumpesnė kaip\",notInclusive:\"turi būti ilgesnė kaip\"}}},file:{unit:{one:\"baitas\",few:\"baitai\",many:\"baitų\"},verb:{smaller:{inclusive:\"turi būti ne didesnis kaip\",notInclusive:\"turi būti mažesnis kaip\"},bigger:{inclusive:\"turi būti ne mažesnis kaip\",notInclusive:\"turi būti didesnis kaip\"}}},array:{unit:{one:\"elementą\",few:\"elementus\",many:\"elementų\"},verb:{smaller:{inclusive:\"turi turėti ne daugiau kaip\",notInclusive:\"turi turėti mažiau kaip\"},bigger:{inclusive:\"turi turėti ne mažiau kaip\",notInclusive:\"turi turėti daugiau kaip\"}}},set:{unit:{one:\"elementą\",few:\"elementus\",many:\"elementų\"},verb:{smaller:{inclusive:\"turi turėti ne daugiau kaip\",notInclusive:\"turi turėti mažiau kaip\"},bigger:{inclusive:\"turi turėti ne mažiau kaip\",notInclusive:\"turi turėti daugiau kaip\"}}}};function t(r,i,s,a){let c=e[r]??null;if(c===null)return c;return{unit:c.unit[i],verb:c.verb[a][s?\"inclusive\":\"notInclusive\"]}}let n={regex:\"įvestis\",email:\"el. pašto adresas\",url:\"URL\",emoji:\"jaustukas\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO data ir laikas\",date:\"ISO data\",time:\"ISO laikas\",duration:\"ISO trukmė\",ipv4:\"IPv4 adresas\",ipv6:\"IPv6 adresas\",cidrv4:\"IPv4 tinklo prefiksas (CIDR)\",cidrv6:\"IPv6 tinklo prefiksas (CIDR)\",base64:\"base64 užkoduota eilutė\",base64url:\"base64url užkoduota eilutė\",json_string:\"JSON eilutė\",e164:\"E.164 numeris\",jwt:\"JWT\",template_literal:\"įvestis\"},o={nan:\"NaN\",number:\"skaičius\",bigint:\"sveikasis skaičius\",string:\"eilutė\",boolean:\"loginė reikšmė\",undefined:\"neapibrėžta reikšmė\",function:\"funkcija\",symbol:\"simbolis\",array:\"masyvas\",object:\"objektas\",null:\"nulinė reikšmė\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Gautas tipas ${a}, o tikėtasi - instanceof ${r.expected}`;return`Gautas tipas ${a}, o tikėtasi - ${i}`}case\"invalid_value\":if(r.values.length===1)return`Privalo būti ${x(r.values[0])}`;return`Privalo būti vienas iš ${v(r.values,\"|\")} pasirinkimų`;case\"too_big\":{let i=o[r.origin]??r.origin,s=t(r.origin,KT(Number(r.maximum)),r.inclusive??!1,\"smaller\");if(s?.verb)return`${Jc(i??r.origin??\"reikšmė\")} ${s.verb} ${r.maximum.toString()} ${s.unit??\"elementų\"}`;let a=r.inclusive?\"ne didesnis kaip\":\"mažesnis kaip\";return`${Jc(i??r.origin??\"reikšmė\")} turi būti ${a} ${r.maximum.toString()} ${s?.unit}`}case\"too_small\":{let i=o[r.origin]??r.origin,s=t(r.origin,KT(Number(r.minimum)),r.inclusive??!1,\"bigger\");if(s?.verb)return`${Jc(i??r.origin??\"reikšmė\")} ${s.verb} ${r.minimum.toString()} ${s.unit??\"elementų\"}`;let a=r.inclusive?\"ne mažesnis kaip\":\"didesnis kaip\";return`${Jc(i??r.origin??\"reikšmė\")} turi būti ${a} ${r.minimum.toString()} ${s?.unit}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Eilutė privalo prasidėti \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Eilutė privalo pasibaigti \"${i.suffix}\"`;if(i.format===\"includes\")return`Eilutė privalo įtraukti \"${i.includes}\"`;if(i.format===\"regex\")return`Eilutė privalo atitikti ${i.pattern}`;return`Neteisingas ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Skaičius privalo būti ${r.divisor} kartotinis.`;case\"unrecognized_keys\":return`Neatpažint${r.keys.length>1?\"i\":\"as\"} rakt${r.keys.length>1?\"ai\":\"as\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return\"Rastas klaidingas raktas\";case\"invalid_union\":return\"Klaidinga įvestis\";case\"invalid_element\":{let i=o[r.origin]??r.origin;return`${Jc(i??r.origin??\"reikšmė\")} turi klaidingą įvestį`}default:return\"Klaidinga įvestis\"}}};function Q_(){return{localeError:NU()}}var CU=()=>{let e={string:{unit:\"знаци\",verb:\"да имаат\"},file:{unit:\"бајти\",verb:\"да имаат\"},array:{unit:\"ставки\",verb:\"да имаат\"},set:{unit:\"ставки\",verb:\"да имаат\"}};function t(r){return e[r]??null}let n={regex:\"внес\",email:\"адреса на е-пошта\",url:\"URL\",emoji:\"емоџи\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO датум и време\",date:\"ISO датум\",time:\"ISO време\",duration:\"ISO времетраење\",ipv4:\"IPv4 адреса\",ipv6:\"IPv6 адреса\",cidrv4:\"IPv4 опсег\",cidrv6:\"IPv6 опсег\",base64:\"base64-енкодирана низа\",base64url:\"base64url-енкодирана низа\",json_string:\"JSON низа\",e164:\"E.164 број\",jwt:\"JWT\",template_literal:\"внес\"},o={nan:\"NaN\",number:\"број\",array:\"низа\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Грешен внес: се очекува instanceof ${r.expected}, примено ${a}`;return`Грешен внес: се очекува ${i}, примено ${a}`}case\"invalid_value\":if(r.values.length===1)return`Invalid input: expected ${x(r.values[0])}`;return`Грешана опција: се очекува една ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Премногу голем: се очекува ${r.origin??\"вредноста\"} да има ${i}${r.maximum.toString()} ${s.unit??\"елементи\"}`;return`Премногу голем: се очекува ${r.origin??\"вредноста\"} да биде ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Премногу мал: се очекува ${r.origin} да има ${i}${r.minimum.toString()} ${s.unit}`;return`Премногу мал: се очекува ${r.origin} да биде ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Неважечка низа: мора да започнува со \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Неважечка низа: мора да завршува со \"${i.suffix}\"`;if(i.format===\"includes\")return`Неважечка низа: мора да вклучува \"${i.includes}\"`;if(i.format===\"regex\")return`Неважечка низа: мора да одгоара на патернот ${i.pattern}`;return`Invalid ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Грешен број: мора да биде делив со ${r.divisor}`;case\"unrecognized_keys\":return`${r.keys.length>1?\"Непрепознаени клучеви\":\"Непрепознаен клуч\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Грешен клуч во ${r.origin}`;case\"invalid_union\":return\"Грешен внес\";case\"invalid_element\":return`Грешна вредност во ${r.origin}`;default:return\"Грешен внес\"}}};function ev(){return{localeError:CU()}}var ZU=()=>{let e={string:{unit:\"aksara\",verb:\"mempunyai\"},file:{unit:\"bait\",verb:\"mempunyai\"},array:{unit:\"elemen\",verb:\"mempunyai\"},set:{unit:\"elemen\",verb:\"mempunyai\"}};function t(r){return e[r]??null}let n={regex:\"input\",email:\"alamat e-mel\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"tarikh masa ISO\",date:\"tarikh ISO\",time:\"masa ISO\",duration:\"tempoh ISO\",ipv4:\"alamat IPv4\",ipv6:\"alamat IPv6\",cidrv4:\"julat IPv4\",cidrv6:\"julat IPv6\",base64:\"string dikodkan base64\",base64url:\"string dikodkan base64url\",json_string:\"string JSON\",e164:\"nombor E.164\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\",number:\"nombor\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${a}`;return`Input tidak sah: dijangka ${i}, diterima ${a}`}case\"invalid_value\":if(r.values.length===1)return`Input tidak sah: dijangka ${x(r.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Terlalu besar: dijangka ${r.origin??\"nilai\"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??\"elemen\"}`;return`Terlalu besar: dijangka ${r.origin??\"nilai\"} adalah ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Terlalu kecil: dijangka ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`;return`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`String tidak sah: mesti bermula dengan \"${i.prefix}\"`;if(i.format===\"ends_with\")return`String tidak sah: mesti berakhir dengan \"${i.suffix}\"`;if(i.format===\"includes\")return`String tidak sah: mesti mengandungi \"${i.includes}\"`;if(i.format===\"regex\")return`String tidak sah: mesti sepadan dengan corak ${i.pattern}`;return`${n[i.format]??r.format} tidak sah`}case\"not_multiple_of\":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case\"unrecognized_keys\":return`Kunci tidak dikenali: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Kunci tidak sah dalam ${r.origin}`;case\"invalid_union\":return\"Input tidak sah\";case\"invalid_element\":return`Nilai tidak sah dalam ${r.origin}`;default:return\"Input tidak sah\"}}};function tv(){return{localeError:ZU()}}var AU=()=>{let e={string:{unit:\"tekens\",verb:\"heeft\"},file:{unit:\"bytes\",verb:\"heeft\"},array:{unit:\"elementen\",verb:\"heeft\"},set:{unit:\"elementen\",verb:\"heeft\"}};function t(r){return e[r]??null}let n={regex:\"invoer\",email:\"emailadres\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO datum en tijd\",date:\"ISO datum\",time:\"ISO tijd\",duration:\"ISO duur\",ipv4:\"IPv4-adres\",ipv6:\"IPv6-adres\",cidrv4:\"IPv4-bereik\",cidrv6:\"IPv6-bereik\",base64:\"base64-gecodeerde tekst\",base64url:\"base64 URL-gecodeerde tekst\",json_string:\"JSON string\",e164:\"E.164-nummer\",jwt:\"JWT\",template_literal:\"invoer\"},o={nan:\"NaN\",number:\"getal\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${a}`;return`Ongeldige invoer: verwacht ${i}, ontving ${a}`}case\"invalid_value\":if(r.values.length===1)return`Ongeldige invoer: verwacht ${x(r.values[0])}`;return`Ongeldige optie: verwacht één van ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin),a=r.origin===\"date\"?\"laat\":r.origin===\"string\"?\"lang\":\"groot\";if(s)return`Te ${a}: verwacht dat ${r.origin??\"waarde\"} ${i}${r.maximum.toString()} ${s.unit??\"elementen\"} ${s.verb}`;return`Te ${a}: verwacht dat ${r.origin??\"waarde\"} ${i}${r.maximum.toString()} is`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin),a=r.origin===\"date\"?\"vroeg\":r.origin===\"string\"?\"kort\":\"klein\";if(s)return`Te ${a}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`;return`Te ${a}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Ongeldige tekst: moet met \"${i.prefix}\" beginnen`;if(i.format===\"ends_with\")return`Ongeldige tekst: moet op \"${i.suffix}\" eindigen`;if(i.format===\"includes\")return`Ongeldige tekst: moet \"${i.includes}\" bevatten`;if(i.format===\"regex\")return`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`;return`Ongeldig: ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case\"unrecognized_keys\":return`Onbekende key${r.keys.length>1?\"s\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Ongeldige key in ${r.origin}`;case\"invalid_union\":return\"Ongeldige invoer\";case\"invalid_element\":return`Ongeldige waarde in ${r.origin}`;default:return\"Ongeldige invoer\"}}};function rv(){return{localeError:AU()}}var UU=()=>{let e={string:{unit:\"tegn\",verb:\"å ha\"},file:{unit:\"bytes\",verb:\"å ha\"},array:{unit:\"elementer\",verb:\"å inneholde\"},set:{unit:\"elementer\",verb:\"å inneholde\"}};function t(r){return e[r]??null}let n={regex:\"input\",email:\"e-postadresse\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO dato- og klokkeslett\",date:\"ISO-dato\",time:\"ISO-klokkeslett\",duration:\"ISO-varighet\",ipv4:\"IPv4-område\",ipv6:\"IPv6-område\",cidrv4:\"IPv4-spekter\",cidrv6:\"IPv6-spekter\",base64:\"base64-enkodet streng\",base64url:\"base64url-enkodet streng\",json_string:\"JSON-streng\",e164:\"E.164-nummer\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\",number:\"tall\",array:\"liste\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Ugyldig input: forventet instanceof ${r.expected}, fikk ${a}`;return`Ugyldig input: forventet ${i}, fikk ${a}`}case\"invalid_value\":if(r.values.length===1)return`Ugyldig verdi: forventet ${x(r.values[0])}`;return`Ugyldig valg: forventet en av ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`For stor(t): forventet ${r.origin??\"value\"} til å ha ${i}${r.maximum.toString()} ${s.unit??\"elementer\"}`;return`For stor(t): forventet ${r.origin??\"value\"} til å ha ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`For lite(n): forventet ${r.origin} til å ha ${i}${r.minimum.toString()} ${s.unit}`;return`For lite(n): forventet ${r.origin} til å ha ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Ugyldig streng: må starte med \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Ugyldig streng: må ende med \"${i.suffix}\"`;if(i.format===\"includes\")return`Ugyldig streng: må inneholde \"${i.includes}\"`;if(i.format===\"regex\")return`Ugyldig streng: må matche mønsteret ${i.pattern}`;return`Ugyldig ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Ugyldig tall: må være et multiplum av ${r.divisor}`;case\"unrecognized_keys\":return`${r.keys.length>1?\"Ukjente nøkler\":\"Ukjent nøkkel\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Ugyldig nøkkel i ${r.origin}`;case\"invalid_union\":return\"Ugyldig input\";case\"invalid_element\":return`Ugyldig verdi i ${r.origin}`;default:return\"Ugyldig input\"}}};function nv(){return{localeError:UU()}}var MU=()=>{let e={string:{unit:\"harf\",verb:\"olmalıdır\"},file:{unit:\"bayt\",verb:\"olmalıdır\"},array:{unit:\"unsur\",verb:\"olmalıdır\"},set:{unit:\"unsur\",verb:\"olmalıdır\"}};function t(r){return e[r]??null}let n={regex:\"giren\",email:\"epostagâh\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO hengâmı\",date:\"ISO tarihi\",time:\"ISO zamanı\",duration:\"ISO müddeti\",ipv4:\"IPv4 nişânı\",ipv6:\"IPv6 nişânı\",cidrv4:\"IPv4 menzili\",cidrv6:\"IPv6 menzili\",base64:\"base64-şifreli metin\",base64url:\"base64url-şifreli metin\",json_string:\"JSON metin\",e164:\"E.164 sayısı\",jwt:\"JWT\",template_literal:\"giren\"},o={nan:\"NaN\",number:\"numara\",array:\"saf\",null:\"gayb\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Fâsit giren: umulan instanceof ${r.expected}, alınan ${a}`;return`Fâsit giren: umulan ${i}, alınan ${a}`}case\"invalid_value\":if(r.values.length===1)return`Fâsit giren: umulan ${x(r.values[0])}`;return`Fâsit tercih: mûteberler ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Fazla büyük: ${r.origin??\"value\"}, ${i}${r.maximum.toString()} ${s.unit??\"elements\"} sahip olmalıydı.`;return`Fazla büyük: ${r.origin??\"value\"}, ${i}${r.maximum.toString()} olmalıydı.`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Fazla küçük: ${r.origin}, ${i}${r.minimum.toString()} ${s.unit} sahip olmalıydı.`;return`Fazla küçük: ${r.origin}, ${i}${r.minimum.toString()} olmalıydı.`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Fâsit metin: \"${i.prefix}\" ile başlamalı.`;if(i.format===\"ends_with\")return`Fâsit metin: \"${i.suffix}\" ile bitmeli.`;if(i.format===\"includes\")return`Fâsit metin: \"${i.includes}\" ihtivâ etmeli.`;if(i.format===\"regex\")return`Fâsit metin: ${i.pattern} nakşına uymalı.`;return`Fâsit ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Fâsit sayı: ${r.divisor} katı olmalıydı.`;case\"unrecognized_keys\":return`Tanınmayan anahtar ${r.keys.length>1?\"s\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`${r.origin} için tanınmayan anahtar var.`;case\"invalid_union\":return\"Giren tanınamadı.\";case\"invalid_element\":return`${r.origin} için tanınmayan kıymet var.`;default:return\"Kıymet tanınamadı.\"}}};function ov(){return{localeError:MU()}}var DU=()=>{let e={string:{unit:\"توکي\",verb:\"ولري\"},file:{unit:\"بایټس\",verb:\"ولري\"},array:{unit:\"توکي\",verb:\"ولري\"},set:{unit:\"توکي\",verb:\"ولري\"}};function t(r){return e[r]??null}let n={regex:\"ورودي\",email:\"بریښنالیک\",url:\"یو آر ال\",emoji:\"ایموجي\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"نیټه او وخت\",date:\"نېټه\",time:\"وخت\",duration:\"موده\",ipv4:\"د IPv4 پته\",ipv6:\"د IPv6 پته\",cidrv4:\"د IPv4 ساحه\",cidrv6:\"د IPv6 ساحه\",base64:\"base64-encoded متن\",base64url:\"base64url-encoded متن\",json_string:\"JSON متن\",e164:\"د E.164 شمېره\",jwt:\"JWT\",template_literal:\"ورودي\"},o={nan:\"NaN\",number:\"عدد\",array:\"ارې\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`ناسم ورودي: باید instanceof ${r.expected} وای, مګر ${a} ترلاسه شو`;return`ناسم ورودي: باید ${i} وای, مګر ${a} ترلاسه شو`}case\"invalid_value\":if(r.values.length===1)return`ناسم ورودي: باید ${x(r.values[0])} وای`;return`ناسم انتخاب: باید یو له ${v(r.values,\"|\")} څخه وای`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`ډیر لوی: ${r.origin??\"ارزښت\"} باید ${i}${r.maximum.toString()} ${s.unit??\"عنصرونه\"} ولري`;return`ډیر لوی: ${r.origin??\"ارزښت\"} باید ${i}${r.maximum.toString()} وي`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`ډیر کوچنی: ${r.origin} باید ${i}${r.minimum.toString()} ${s.unit} ولري`;return`ډیر کوچنی: ${r.origin} باید ${i}${r.minimum.toString()} وي`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`ناسم متن: باید د \"${i.prefix}\" سره پیل شي`;if(i.format===\"ends_with\")return`ناسم متن: باید د \"${i.suffix}\" سره پای ته ورسيږي`;if(i.format===\"includes\")return`ناسم متن: باید \"${i.includes}\" ولري`;if(i.format===\"regex\")return`ناسم متن: باید د ${i.pattern} سره مطابقت ولري`;return`${n[i.format]??r.format} ناسم دی`}case\"not_multiple_of\":return`ناسم عدد: باید د ${r.divisor} مضرب وي`;case\"unrecognized_keys\":return`ناسم ${r.keys.length>1?\"کلیډونه\":\"کلیډ\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`ناسم کلیډ په ${r.origin} کې`;case\"invalid_union\":return\"ناسمه ورودي\";case\"invalid_element\":return`ناسم عنصر په ${r.origin} کې`;default:return\"ناسمه ورودي\"}}};function iv(){return{localeError:DU()}}var LU=()=>{let e={string:{unit:\"znaków\",verb:\"mieć\"},file:{unit:\"bajtów\",verb:\"mieć\"},array:{unit:\"elementów\",verb:\"mieć\"},set:{unit:\"elementów\",verb:\"mieć\"}};function t(r){return e[r]??null}let n={regex:\"wyrażenie\",email:\"adres email\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"data i godzina w formacie ISO\",date:\"data w formacie ISO\",time:\"godzina w formacie ISO\",duration:\"czas trwania ISO\",ipv4:\"adres IPv4\",ipv6:\"adres IPv6\",cidrv4:\"zakres IPv4\",cidrv6:\"zakres IPv6\",base64:\"ciąg znaków zakodowany w formacie base64\",base64url:\"ciąg znaków zakodowany w formacie base64url\",json_string:\"ciąg znaków w formacie JSON\",e164:\"liczba E.164\",jwt:\"JWT\",template_literal:\"wejście\"},o={nan:\"NaN\",number:\"liczba\",array:\"tablica\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${r.expected}, otrzymano ${a}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${i}, otrzymano ${a}`}case\"invalid_value\":if(r.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${x(r.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Za duża wartość: oczekiwano, że ${r.origin??\"wartość\"} będzie mieć ${i}${r.maximum.toString()} ${s.unit??\"elementów\"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${r.origin??\"wartość\"} będzie wynosić ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Za mała wartość: oczekiwano, że ${r.origin??\"wartość\"} będzie mieć ${i}${r.minimum.toString()} ${s.unit??\"elementów\"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${r.origin??\"wartość\"} będzie wynosić ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Nieprawidłowy ciąg znaków: musi zaczynać się od \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Nieprawidłowy ciąg znaków: musi kończyć się na \"${i.suffix}\"`;if(i.format===\"includes\")return`Nieprawidłowy ciąg znaków: musi zawierać \"${i.includes}\"`;if(i.format===\"regex\")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${i.pattern}`;return`Nieprawidłow(y/a/e) ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Nieprawidłowa liczba: musi być wielokrotnością ${r.divisor}`;case\"unrecognized_keys\":return`Nierozpoznane klucze${r.keys.length>1?\"s\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Nieprawidłowy klucz w ${r.origin}`;case\"invalid_union\":return\"Nieprawidłowe dane wejściowe\";case\"invalid_element\":return`Nieprawidłowa wartość w ${r.origin}`;default:return\"Nieprawidłowe dane wejściowe\"}}};function sv(){return{localeError:LU()}}var qU=()=>{let e={string:{unit:\"caracteres\",verb:\"ter\"},file:{unit:\"bytes\",verb:\"ter\"},array:{unit:\"itens\",verb:\"ter\"},set:{unit:\"itens\",verb:\"ter\"}};function t(r){return e[r]??null}let n={regex:\"padrão\",email:\"endereço de e-mail\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"data e hora ISO\",date:\"data ISO\",time:\"hora ISO\",duration:\"duração ISO\",ipv4:\"endereço IPv4\",ipv6:\"endereço IPv6\",cidrv4:\"faixa de IPv4\",cidrv6:\"faixa de IPv6\",base64:\"texto codificado em base64\",base64url:\"URL codificada em base64\",json_string:\"texto JSON\",e164:\"número E.164\",jwt:\"JWT\",template_literal:\"entrada\"},o={nan:\"NaN\",number:\"número\",null:\"nulo\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Tipo inválido: esperado instanceof ${r.expected}, recebido ${a}`;return`Tipo inválido: esperado ${i}, recebido ${a}`}case\"invalid_value\":if(r.values.length===1)return`Entrada inválida: esperado ${x(r.values[0])}`;return`Opção inválida: esperada uma das ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Muito grande: esperado que ${r.origin??\"valor\"} tivesse ${i}${r.maximum.toString()} ${s.unit??\"elementos\"}`;return`Muito grande: esperado que ${r.origin??\"valor\"} fosse ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${s.unit}`;return`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Texto inválido: deve começar com \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Texto inválido: deve terminar com \"${i.suffix}\"`;if(i.format===\"includes\")return`Texto inválido: deve incluir \"${i.includes}\"`;if(i.format===\"regex\")return`Texto inválido: deve corresponder ao padrão ${i.pattern}`;return`${n[i.format]??r.format} inválido`}case\"not_multiple_of\":return`Número inválido: deve ser múltiplo de ${r.divisor}`;case\"unrecognized_keys\":return`Chave${r.keys.length>1?\"s\":\"\"} desconhecida${r.keys.length>1?\"s\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Chave inválida em ${r.origin}`;case\"invalid_union\":return\"Entrada inválida\";case\"invalid_element\":return`Valor inválido em ${r.origin}`;default:return\"Campo inválido\"}}};function av(){return{localeError:qU()}}var FU=()=>{let e={string:{unit:\"caractere\",verb:\"să aibă\"},file:{unit:\"octeți\",verb:\"să aibă\"},array:{unit:\"elemente\",verb:\"să aibă\"},set:{unit:\"elemente\",verb:\"să aibă\"},map:{unit:\"intrări\",verb:\"să aibă\"}};function t(r){return e[r]??null}let n={regex:\"intrare\",email:\"adresă de email\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"dată și oră ISO\",date:\"dată ISO\",time:\"oră ISO\",duration:\"durată ISO\",ipv4:\"adresă IPv4\",ipv6:\"adresă IPv6\",mac:\"adresă MAC\",cidrv4:\"interval IPv4\",cidrv6:\"interval IPv6\",base64:\"șir codat base64\",base64url:\"șir codat base64url\",json_string:\"șir JSON\",e164:\"număr E.164\",jwt:\"JWT\",template_literal:\"intrare\"},o={nan:\"NaN\",string:\"șir\",number:\"număr\",boolean:\"boolean\",function:\"funcție\",array:\"matrice\",object:\"obiect\",undefined:\"nedefinit\",symbol:\"simbol\",bigint:\"număr mare\",void:\"void\",never:\"never\",map:\"hartă\",set:\"set\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;return`Intrare invalidă: așteptat ${i}, primit ${a}`}case\"invalid_value\":if(r.values.length===1)return`Intrare invalidă: așteptat ${x(r.values[0])}`;return`Opțiune invalidă: așteptat una dintre ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Prea mare: așteptat ca ${r.origin??\"valoarea\"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??\"elemente\"}`;return`Prea mare: așteptat ca ${r.origin??\"valoarea\"} să fie ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Prea mic: așteptat ca ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`;return`Prea mic: așteptat ca ${r.origin} să fie ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Șir invalid: trebuie să înceapă cu \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Șir invalid: trebuie să se termine cu \"${i.suffix}\"`;if(i.format===\"includes\")return`Șir invalid: trebuie să includă \"${i.includes}\"`;if(i.format===\"regex\")return`Șir invalid: trebuie să se potrivească cu modelul ${i.pattern}`;return`Format invalid: ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Număr invalid: trebuie să fie multiplu de ${r.divisor}`;case\"unrecognized_keys\":return`Chei nerecunoscute: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Cheie invalidă în ${r.origin}`;case\"invalid_union\":return\"Intrare invalidă\";case\"invalid_element\":return`Valoare invalidă în ${r.origin}`;default:return\"Intrare invalidă\"}}};function cv(){return{localeError:FU()}}function YT(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;if(s>=11&&s<=19)return o;if(i===1)return t;if(i>=2&&i<=4)return n;return o}var VU=()=>{let e={string:{unit:{one:\"символ\",few:\"символа\",many:\"символов\"},verb:\"иметь\"},file:{unit:{one:\"байт\",few:\"байта\",many:\"байт\"},verb:\"иметь\"},array:{unit:{one:\"элемент\",few:\"элемента\",many:\"элементов\"},verb:\"иметь\"},set:{unit:{one:\"элемент\",few:\"элемента\",many:\"элементов\"},verb:\"иметь\"}};function t(r){return e[r]??null}let n={regex:\"ввод\",email:\"email адрес\",url:\"URL\",emoji:\"эмодзи\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO дата и время\",date:\"ISO дата\",time:\"ISO время\",duration:\"ISO длительность\",ipv4:\"IPv4 адрес\",ipv6:\"IPv6 адрес\",cidrv4:\"IPv4 диапазон\",cidrv6:\"IPv6 диапазон\",base64:\"строка в формате base64\",base64url:\"строка в формате base64url\",json_string:\"JSON строка\",e164:\"номер E.164\",jwt:\"JWT\",template_literal:\"ввод\"},o={nan:\"NaN\",number:\"число\",array:\"массив\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Неверный ввод: ожидалось instanceof ${r.expected}, получено ${a}`;return`Неверный ввод: ожидалось ${i}, получено ${a}`}case\"invalid_value\":if(r.values.length===1)return`Неверный ввод: ожидалось ${x(r.values[0])}`;return`Неверный вариант: ожидалось одно из ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s){let a=Number(r.maximum),c=YT(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${r.origin??\"значение\"} будет иметь ${i}${r.maximum.toString()} ${c}`}return`Слишком большое значение: ожидалось, что ${r.origin??\"значение\"} будет ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s){let a=Number(r.minimum),c=YT(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${r.origin} будет иметь ${i}${r.minimum.toString()} ${c}`}return`Слишком маленькое значение: ожидалось, что ${r.origin} будет ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Неверная строка: должна начинаться с \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Неверная строка: должна заканчиваться на \"${i.suffix}\"`;if(i.format===\"includes\")return`Неверная строка: должна содержать \"${i.includes}\"`;if(i.format===\"regex\")return`Неверная строка: должна соответствовать шаблону ${i.pattern}`;return`Неверный ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Неверное число: должно быть кратным ${r.divisor}`;case\"unrecognized_keys\":return`Нераспознанн${r.keys.length>1?\"ые\":\"ый\"} ключ${r.keys.length>1?\"и\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Неверный ключ в ${r.origin}`;case\"invalid_union\":return\"Неверные входные данные\";case\"invalid_element\":return`Неверное значение в ${r.origin}`;default:return\"Неверные входные данные\"}}};function uv(){return{localeError:VU()}}var JU=()=>{let e={string:{unit:\"znakov\",verb:\"imeti\"},file:{unit:\"bajtov\",verb:\"imeti\"},array:{unit:\"elementov\",verb:\"imeti\"},set:{unit:\"elementov\",verb:\"imeti\"}};function t(r){return e[r]??null}let n={regex:\"vnos\",email:\"e-poštni naslov\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO datum in čas\",date:\"ISO datum\",time:\"ISO čas\",duration:\"ISO trajanje\",ipv4:\"IPv4 naslov\",ipv6:\"IPv6 naslov\",cidrv4:\"obseg IPv4\",cidrv6:\"obseg IPv6\",base64:\"base64 kodiran niz\",base64url:\"base64url kodiran niz\",json_string:\"JSON niz\",e164:\"E.164 številka\",jwt:\"JWT\",template_literal:\"vnos\"},o={nan:\"NaN\",number:\"število\",array:\"tabela\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Neveljaven vnos: pričakovano instanceof ${r.expected}, prejeto ${a}`;return`Neveljaven vnos: pričakovano ${i}, prejeto ${a}`}case\"invalid_value\":if(r.values.length===1)return`Neveljaven vnos: pričakovano ${x(r.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Preveliko: pričakovano, da bo ${r.origin??\"vrednost\"} imelo ${i}${r.maximum.toString()} ${s.unit??\"elementov\"}`;return`Preveliko: pričakovano, da bo ${r.origin??\"vrednost\"} ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Premajhno: pričakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${s.unit}`;return`Premajhno: pričakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Neveljaven niz: mora se začeti z \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Neveljaven niz: mora se končati z \"${i.suffix}\"`;if(i.format===\"includes\")return`Neveljaven niz: mora vsebovati \"${i.includes}\"`;if(i.format===\"regex\")return`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`;return`Neveljaven ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Neveljavno število: mora biti večkratnik ${r.divisor}`;case\"unrecognized_keys\":return`Neprepoznan${r.keys.length>1?\"i ključi\":\" ključ\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Neveljaven ključ v ${r.origin}`;case\"invalid_union\":return\"Neveljaven vnos\";case\"invalid_element\":return`Neveljavna vrednost v ${r.origin}`;default:return\"Neveljaven vnos\"}}};function lv(){return{localeError:JU()}}var BU=()=>{let e={string:{unit:\"tecken\",verb:\"att ha\"},file:{unit:\"bytes\",verb:\"att ha\"},array:{unit:\"objekt\",verb:\"att innehålla\"},set:{unit:\"objekt\",verb:\"att innehålla\"}};function t(r){return e[r]??null}let n={regex:\"reguljärt uttryck\",email:\"e-postadress\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO-datum och tid\",date:\"ISO-datum\",time:\"ISO-tid\",duration:\"ISO-varaktighet\",ipv4:\"IPv4-intervall\",ipv6:\"IPv6-intervall\",cidrv4:\"IPv4-spektrum\",cidrv6:\"IPv6-spektrum\",base64:\"base64-kodad sträng\",base64url:\"base64url-kodad sträng\",json_string:\"JSON-sträng\",e164:\"E.164-nummer\",jwt:\"JWT\",template_literal:\"mall-literal\"},o={nan:\"NaN\",number:\"antal\",array:\"lista\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Ogiltig inmatning: förväntat instanceof ${r.expected}, fick ${a}`;return`Ogiltig inmatning: förväntat ${i}, fick ${a}`}case\"invalid_value\":if(r.values.length===1)return`Ogiltig inmatning: förväntat ${x(r.values[0])}`;return`Ogiltigt val: förväntade en av ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`För stor(t): förväntade ${r.origin??\"värdet\"} att ha ${i}${r.maximum.toString()} ${s.unit??\"element\"}`;return`För stor(t): förväntat ${r.origin??\"värdet\"} att ha ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`För lite(t): förväntade ${r.origin??\"värdet\"} att ha ${i}${r.minimum.toString()} ${s.unit}`;return`För lite(t): förväntade ${r.origin??\"värdet\"} att ha ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Ogiltig sträng: måste börja med \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Ogiltig sträng: måste sluta med \"${i.suffix}\"`;if(i.format===\"includes\")return`Ogiltig sträng: måste innehålla \"${i.includes}\"`;if(i.format===\"regex\")return`Ogiltig sträng: måste matcha mönstret \"${i.pattern}\"`;return`Ogiltig(t) ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Ogiltigt tal: måste vara en multipel av ${r.divisor}`;case\"unrecognized_keys\":return`${r.keys.length>1?\"Okända nycklar\":\"Okänd nyckel\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Ogiltig nyckel i ${r.origin??\"värdet\"}`;case\"invalid_union\":return\"Ogiltig input\";case\"invalid_element\":return`Ogiltigt värde i ${r.origin??\"värdet\"}`;default:return\"Ogiltig input\"}}};function dv(){return{localeError:BU()}}var HU=()=>{let e={string:{unit:\"எழுத்துக்கள்\",verb:\"கொண்டிருக்க வேண்டும்\"},file:{unit:\"பைட்டுகள்\",verb:\"கொண்டிருக்க வேண்டும்\"},array:{unit:\"உறுப்புகள்\",verb:\"கொண்டிருக்க வேண்டும்\"},set:{unit:\"உறுப்புகள்\",verb:\"கொண்டிருக்க வேண்டும்\"}};function t(r){return e[r]??null}let n={regex:\"உள்ளீடு\",email:\"மின்னஞ்சல் முகவரி\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO தேதி நேரம்\",date:\"ISO தேதி\",time:\"ISO நேரம்\",duration:\"ISO கால அளவு\",ipv4:\"IPv4 முகவரி\",ipv6:\"IPv6 முகவரி\",cidrv4:\"IPv4 வரம்பு\",cidrv6:\"IPv6 வரம்பு\",base64:\"base64-encoded சரம்\",base64url:\"base64url-encoded சரம்\",json_string:\"JSON சரம்\",e164:\"E.164 எண்\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\",number:\"எண்\",array:\"அணி\",null:\"வெறுமை\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${r.expected}, பெறப்பட்டது ${a}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${i}, பெறப்பட்டது ${a}`}case\"invalid_value\":if(r.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${x(r.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${v(r.values,\"|\")} இல் ஒன்று`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??\"மதிப்பு\"} ${i}${r.maximum.toString()} ${s.unit??\"உறுப்புகள்\"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??\"மதிப்பு\"} ${i}${r.maximum.toString()} ஆக இருக்க வேண்டும்`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${i}${r.minimum.toString()} ஆக இருக்க வேண்டும்`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`தவறான சரம்: \"${i.prefix}\" இல் தொடங்க வேண்டும்`;if(i.format===\"ends_with\")return`தவறான சரம்: \"${i.suffix}\" இல் முடிவடைய வேண்டும்`;if(i.format===\"includes\")return`தவறான சரம்: \"${i.includes}\" ஐ உள்ளடக்க வேண்டும்`;if(i.format===\"regex\")return`தவறான சரம்: ${i.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${n[i.format]??r.format}`}case\"not_multiple_of\":return`தவறான எண்: ${r.divisor} இன் பலமாக இருக்க வேண்டும்`;case\"unrecognized_keys\":return`அடையாளம் தெரியாத விசை${r.keys.length>1?\"கள்\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`${r.origin} இல் தவறான விசை`;case\"invalid_union\":return\"தவறான உள்ளீடு\";case\"invalid_element\":return`${r.origin} இல் தவறான மதிப்பு`;default:return\"தவறான உள்ளீடு\"}}};function pv(){return{localeError:HU()}}var GU=()=>{let e={string:{unit:\"ตัวอักษร\",verb:\"ควรมี\"},file:{unit:\"ไบต์\",verb:\"ควรมี\"},array:{unit:\"รายการ\",verb:\"ควรมี\"},set:{unit:\"รายการ\",verb:\"ควรมี\"}};function t(r){return e[r]??null}let n={regex:\"ข้อมูลที่ป้อน\",email:\"ที่อยู่อีเมล\",url:\"URL\",emoji:\"อิโมจิ\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"วันที่เวลาแบบ ISO\",date:\"วันที่แบบ ISO\",time:\"เวลาแบบ ISO\",duration:\"ช่วงเวลาแบบ ISO\",ipv4:\"ที่อยู่ IPv4\",ipv6:\"ที่อยู่ IPv6\",cidrv4:\"ช่วง IP แบบ IPv4\",cidrv6:\"ช่วง IP แบบ IPv6\",base64:\"ข้อความแบบ Base64\",base64url:\"ข้อความแบบ Base64 สำหรับ URL\",json_string:\"ข้อความแบบ JSON\",e164:\"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)\",jwt:\"โทเคน JWT\",template_literal:\"ข้อมูลที่ป้อน\"},o={nan:\"NaN\",number:\"ตัวเลข\",array:\"อาร์เรย์ (Array)\",null:\"ไม่มีค่า (null)\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${r.expected} แต่ได้รับ ${a}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${i} แต่ได้รับ ${a}`}case\"invalid_value\":if(r.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${x(r.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"ไม่เกิน\":\"น้อยกว่า\",s=t(r.origin);if(s)return`เกินกำหนด: ${r.origin??\"ค่า\"} ควรมี${i} ${r.maximum.toString()} ${s.unit??\"รายการ\"}`;return`เกินกำหนด: ${r.origin??\"ค่า\"} ควรมี${i} ${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\"อย่างน้อย\":\"มากกว่า\",s=t(r.origin);if(s)return`น้อยกว่ากำหนด: ${r.origin} ควรมี${i} ${r.minimum.toString()} ${s.unit}`;return`น้อยกว่ากำหนด: ${r.origin} ควรมี${i} ${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย \"${i.prefix}\"`;if(i.format===\"ends_with\")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย \"${i.suffix}\"`;if(i.format===\"includes\")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี \"${i.includes}\" อยู่ในข้อความ`;if(i.format===\"regex\")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${i.pattern}`;return`รูปแบบไม่ถูกต้อง: ${n[i.format]??r.format}`}case\"not_multiple_of\":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${r.divisor} ได้ลงตัว`;case\"unrecognized_keys\":return`พบคีย์ที่ไม่รู้จัก: ${v(r.keys,\", \")}`;case\"invalid_key\":return`คีย์ไม่ถูกต้องใน ${r.origin}`;case\"invalid_union\":return\"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้\";case\"invalid_element\":return`ข้อมูลไม่ถูกต้องใน ${r.origin}`;default:return\"ข้อมูลไม่ถูกต้อง\"}}};function mv(){return{localeError:GU()}}var WU=()=>{let e={string:{unit:\"karakter\",verb:\"olmalı\"},file:{unit:\"bayt\",verb:\"olmalı\"},array:{unit:\"öğe\",verb:\"olmalı\"},set:{unit:\"öğe\",verb:\"olmalı\"}};function t(r){return e[r]??null}let n={regex:\"girdi\",email:\"e-posta adresi\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO tarih ve saat\",date:\"ISO tarih\",time:\"ISO saat\",duration:\"ISO süre\",ipv4:\"IPv4 adresi\",ipv6:\"IPv6 adresi\",cidrv4:\"IPv4 aralığı\",cidrv6:\"IPv6 aralığı\",base64:\"base64 ile şifrelenmiş metin\",base64url:\"base64url ile şifrelenmiş metin\",json_string:\"JSON dizesi\",e164:\"E.164 sayısı\",jwt:\"JWT\",template_literal:\"Şablon dizesi\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Geçersiz değer: beklenen instanceof ${r.expected}, alınan ${a}`;return`Geçersiz değer: beklenen ${i}, alınan ${a}`}case\"invalid_value\":if(r.values.length===1)return`Geçersiz değer: beklenen ${x(r.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Çok büyük: beklenen ${r.origin??\"değer\"} ${i}${r.maximum.toString()} ${s.unit??\"öğe\"}`;return`Çok büyük: beklenen ${r.origin??\"değer\"} ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Çok küçük: beklenen ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`;return`Çok küçük: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Geçersiz metin: \"${i.prefix}\" ile başlamalı`;if(i.format===\"ends_with\")return`Geçersiz metin: \"${i.suffix}\" ile bitmeli`;if(i.format===\"includes\")return`Geçersiz metin: \"${i.includes}\" içermeli`;if(i.format===\"regex\")return`Geçersiz metin: ${i.pattern} desenine uymalı`;return`Geçersiz ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Geçersiz sayı: ${r.divisor} ile tam bölünebilmeli`;case\"unrecognized_keys\":return`Tanınmayan anahtar${r.keys.length>1?\"lar\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`${r.origin} içinde geçersiz anahtar`;case\"invalid_union\":return\"Geçersiz değer\";case\"invalid_element\":return`${r.origin} içinde geçersiz değer`;default:return\"Geçersiz değer\"}}};function fv(){return{localeError:WU()}}var KU=()=>{let e={string:{unit:\"символів\",verb:\"матиме\"},file:{unit:\"байтів\",verb:\"матиме\"},array:{unit:\"елементів\",verb:\"матиме\"},set:{unit:\"елементів\",verb:\"матиме\"}};function t(r){return e[r]??null}let n={regex:\"вхідні дані\",email:\"адреса електронної пошти\",url:\"URL\",emoji:\"емодзі\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"дата та час ISO\",date:\"дата ISO\",time:\"час ISO\",duration:\"тривалість ISO\",ipv4:\"адреса IPv4\",ipv6:\"адреса IPv6\",cidrv4:\"діапазон IPv4\",cidrv6:\"діапазон IPv6\",base64:\"рядок у кодуванні base64\",base64url:\"рядок у кодуванні base64url\",json_string:\"рядок JSON\",e164:\"номер E.164\",jwt:\"JWT\",template_literal:\"вхідні дані\"},o={nan:\"NaN\",number:\"число\",array:\"масив\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Неправильні вхідні дані: очікується instanceof ${r.expected}, отримано ${a}`;return`Неправильні вхідні дані: очікується ${i}, отримано ${a}`}case\"invalid_value\":if(r.values.length===1)return`Неправильні вхідні дані: очікується ${x(r.values[0])}`;return`Неправильна опція: очікується одне з ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Занадто велике: очікується, що ${r.origin??\"значення\"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??\"елементів\"}`;return`Занадто велике: очікується, що ${r.origin??\"значення\"} буде ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Занадто мале: очікується, що ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`;return`Занадто мале: очікується, що ${r.origin} буде ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Неправильний рядок: повинен починатися з \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Неправильний рядок: повинен закінчуватися на \"${i.suffix}\"`;if(i.format===\"includes\")return`Неправильний рядок: повинен містити \"${i.includes}\"`;if(i.format===\"regex\")return`Неправильний рядок: повинен відповідати шаблону ${i.pattern}`;return`Неправильний ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Неправильне число: повинно бути кратним ${r.divisor}`;case\"unrecognized_keys\":return`Нерозпізнаний ключ${r.keys.length>1?\"і\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Неправильний ключ у ${r.origin}`;case\"invalid_union\":return\"Неправильні вхідні дані\";case\"invalid_element\":return`Неправильне значення у ${r.origin}`;default:return\"Неправильні вхідні дані\"}}};function Bc(){return{localeError:KU()}}function hv(){return Bc()}var YU=()=>{let e={string:{unit:\"حروف\",verb:\"ہونا\"},file:{unit:\"بائٹس\",verb:\"ہونا\"},array:{unit:\"آئٹمز\",verb:\"ہونا\"},set:{unit:\"آئٹمز\",verb:\"ہونا\"}};function t(r){return e[r]??null}let n={regex:\"ان پٹ\",email:\"ای میل ایڈریس\",url:\"یو آر ایل\",emoji:\"ایموجی\",uuid:\"یو یو آئی ڈی\",uuidv4:\"یو یو آئی ڈی وی 4\",uuidv6:\"یو یو آئی ڈی وی 6\",nanoid:\"نینو آئی ڈی\",guid:\"جی یو آئی ڈی\",cuid:\"سی یو آئی ڈی\",cuid2:\"سی یو آئی ڈی 2\",ulid:\"یو ایل آئی ڈی\",xid:\"ایکس آئی ڈی\",ksuid:\"کے ایس یو آئی ڈی\",datetime:\"آئی ایس او ڈیٹ ٹائم\",date:\"آئی ایس او تاریخ\",time:\"آئی ایس او وقت\",duration:\"آئی ایس او مدت\",ipv4:\"آئی پی وی 4 ایڈریس\",ipv6:\"آئی پی وی 6 ایڈریس\",cidrv4:\"آئی پی وی 4 رینج\",cidrv6:\"آئی پی وی 6 رینج\",base64:\"بیس 64 ان کوڈڈ سٹرنگ\",base64url:\"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ\",json_string:\"جے ایس او این سٹرنگ\",e164:\"ای 164 نمبر\",jwt:\"جے ڈبلیو ٹی\",template_literal:\"ان پٹ\"},o={nan:\"NaN\",number:\"نمبر\",array:\"آرے\",null:\"نل\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`غلط ان پٹ: instanceof ${r.expected} متوقع تھا، ${a} موصول ہوا`;return`غلط ان پٹ: ${i} متوقع تھا، ${a} موصول ہوا`}case\"invalid_value\":if(r.values.length===1)return`غلط ان پٹ: ${x(r.values[0])} متوقع تھا`;return`غلط آپشن: ${v(r.values,\"|\")} میں سے ایک متوقع تھا`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`بہت بڑا: ${r.origin??\"ویلیو\"} کے ${i}${r.maximum.toString()} ${s.unit??\"عناصر\"} ہونے متوقع تھے`;return`بہت بڑا: ${r.origin??\"ویلیو\"} کا ${i}${r.maximum.toString()} ہونا متوقع تھا`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`بہت چھوٹا: ${r.origin} کے ${i}${r.minimum.toString()} ${s.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${r.origin} کا ${i}${r.minimum.toString()} ہونا متوقع تھا`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`غلط سٹرنگ: \"${i.prefix}\" سے شروع ہونا چاہیے`;if(i.format===\"ends_with\")return`غلط سٹرنگ: \"${i.suffix}\" پر ختم ہونا چاہیے`;if(i.format===\"includes\")return`غلط سٹرنگ: \"${i.includes}\" شامل ہونا چاہیے`;if(i.format===\"regex\")return`غلط سٹرنگ: پیٹرن ${i.pattern} سے میچ ہونا چاہیے`;return`غلط ${n[i.format]??r.format}`}case\"not_multiple_of\":return`غلط نمبر: ${r.divisor} کا مضاعف ہونا چاہیے`;case\"unrecognized_keys\":return`غیر تسلیم شدہ کی${r.keys.length>1?\"ز\":\"\"}: ${v(r.keys,\"، \")}`;case\"invalid_key\":return`${r.origin} میں غلط کی`;case\"invalid_union\":return\"غلط ان پٹ\";case\"invalid_element\":return`${r.origin} میں غلط ویلیو`;default:return\"غلط ان پٹ\"}}};function gv(){return{localeError:YU()}}var XU=()=>{let e={string:{unit:\"belgi\",verb:\"bo‘lishi kerak\"},file:{unit:\"bayt\",verb:\"bo‘lishi kerak\"},array:{unit:\"element\",verb:\"bo‘lishi kerak\"},set:{unit:\"element\",verb:\"bo‘lishi kerak\"},map:{unit:\"yozuv\",verb:\"bo‘lishi kerak\"}};function t(r){return e[r]??null}let n={regex:\"kirish\",email:\"elektron pochta manzili\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO sana va vaqti\",date:\"ISO sana\",time:\"ISO vaqt\",duration:\"ISO davomiylik\",ipv4:\"IPv4 manzil\",ipv6:\"IPv6 manzil\",mac:\"MAC manzil\",cidrv4:\"IPv4 diapazon\",cidrv6:\"IPv6 diapazon\",base64:\"base64 kodlangan satr\",base64url:\"base64url kodlangan satr\",json_string:\"JSON satr\",e164:\"E.164 raqam\",jwt:\"JWT\",template_literal:\"kirish\"},o={nan:\"NaN\",number:\"raqam\",array:\"massiv\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${a}`;return`Noto‘g‘ri kirish: kutilgan ${i}, qabul qilingan ${a}`}case\"invalid_value\":if(r.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${x(r.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Juda katta: kutilgan ${r.origin??\"qiymat\"} ${i}${r.maximum.toString()} ${s.unit} ${s.verb}`;return`Juda katta: kutilgan ${r.origin??\"qiymat\"} ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`;return`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Noto‘g‘ri satr: \"${i.prefix}\" bilan boshlanishi kerak`;if(i.format===\"ends_with\")return`Noto‘g‘ri satr: \"${i.suffix}\" bilan tugashi kerak`;if(i.format===\"includes\")return`Noto‘g‘ri satr: \"${i.includes}\" ni o‘z ichiga olishi kerak`;if(i.format===\"regex\")return`Noto‘g‘ri satr: ${i.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Noto‘g‘ri raqam: ${r.divisor} ning karralisi bo‘lishi kerak`;case\"unrecognized_keys\":return`Noma’lum kalit${r.keys.length>1?\"lar\":\"\"}: ${v(r.keys,\", \")}`;case\"invalid_key\":return`${r.origin} dagi kalit noto‘g‘ri`;case\"invalid_union\":return\"Noto‘g‘ri kirish\";case\"invalid_element\":return`${r.origin} da noto‘g‘ri qiymat`;default:return\"Noto‘g‘ri kirish\"}}};function _v(){return{localeError:XU()}}var QU=()=>{let e={string:{unit:\"ký tự\",verb:\"có\"},file:{unit:\"byte\",verb:\"có\"},array:{unit:\"phần tử\",verb:\"có\"},set:{unit:\"phần tử\",verb:\"có\"}};function t(r){return e[r]??null}let n={regex:\"đầu vào\",email:\"địa chỉ email\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ngày giờ ISO\",date:\"ngày ISO\",time:\"giờ ISO\",duration:\"khoảng thời gian ISO\",ipv4:\"địa chỉ IPv4\",ipv6:\"địa chỉ IPv6\",cidrv4:\"dải IPv4\",cidrv6:\"dải IPv6\",base64:\"chuỗi mã hóa base64\",base64url:\"chuỗi mã hóa base64url\",json_string:\"chuỗi JSON\",e164:\"số E.164\",jwt:\"JWT\",template_literal:\"đầu vào\"},o={nan:\"NaN\",number:\"số\",array:\"mảng\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${r.expected}, nhận được ${a}`;return`Đầu vào không hợp lệ: mong đợi ${i}, nhận được ${a}`}case\"invalid_value\":if(r.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${x(r.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Quá lớn: mong đợi ${r.origin??\"giá trị\"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??\"phần tử\"}`;return`Quá lớn: mong đợi ${r.origin??\"giá trị\"} ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Quá nhỏ: mong đợi ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`;return`Quá nhỏ: mong đợi ${r.origin} ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Chuỗi không hợp lệ: phải bắt đầu bằng \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Chuỗi không hợp lệ: phải kết thúc bằng \"${i.suffix}\"`;if(i.format===\"includes\")return`Chuỗi không hợp lệ: phải bao gồm \"${i.includes}\"`;if(i.format===\"regex\")return`Chuỗi không hợp lệ: phải khớp với mẫu ${i.pattern}`;return`${n[i.format]??r.format} không hợp lệ`}case\"not_multiple_of\":return`Số không hợp lệ: phải là bội số của ${r.divisor}`;case\"unrecognized_keys\":return`Khóa không được nhận dạng: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Khóa không hợp lệ trong ${r.origin}`;case\"invalid_union\":return\"Đầu vào không hợp lệ\";case\"invalid_element\":return`Giá trị không hợp lệ trong ${r.origin}`;default:return\"Đầu vào không hợp lệ\"}}};function vv(){return{localeError:QU()}}var e4=()=>{let e={string:{unit:\"字符\",verb:\"包含\"},file:{unit:\"字节\",verb:\"包含\"},array:{unit:\"项\",verb:\"包含\"},set:{unit:\"项\",verb:\"包含\"}};function t(r){return e[r]??null}let n={regex:\"输入\",email:\"电子邮件\",url:\"URL\",emoji:\"表情符号\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO日期时间\",date:\"ISO日期\",time:\"ISO时间\",duration:\"ISO时长\",ipv4:\"IPv4地址\",ipv6:\"IPv6地址\",cidrv4:\"IPv4网段\",cidrv6:\"IPv6网段\",base64:\"base64编码字符串\",base64url:\"base64url编码字符串\",json_string:\"JSON字符串\",e164:\"E.164号码\",jwt:\"JWT\",template_literal:\"输入\"},o={nan:\"NaN\",number:\"数字\",array:\"数组\",null:\"空值(null)\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`无效输入:期望 instanceof ${r.expected},实际接收 ${a}`;return`无效输入:期望 ${i},实际接收 ${a}`}case\"invalid_value\":if(r.values.length===1)return`无效输入:期望 ${x(r.values[0])}`;return`无效选项:期望以下之一 ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`数值过大:期望 ${r.origin??\"值\"} ${i}${r.maximum.toString()} ${s.unit??\"个元素\"}`;return`数值过大:期望 ${r.origin??\"值\"} ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`数值过小:期望 ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`;return`数值过小:期望 ${r.origin} ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`无效字符串:必须以 \"${i.prefix}\" 开头`;if(i.format===\"ends_with\")return`无效字符串:必须以 \"${i.suffix}\" 结尾`;if(i.format===\"includes\")return`无效字符串:必须包含 \"${i.includes}\"`;if(i.format===\"regex\")return`无效字符串:必须满足正则表达式 ${i.pattern}`;return`无效${n[i.format]??r.format}`}case\"not_multiple_of\":return`无效数字:必须是 ${r.divisor} 的倍数`;case\"unrecognized_keys\":return`出现未知的键(key): ${v(r.keys,\", \")}`;case\"invalid_key\":return`${r.origin} 中的键(key)无效`;case\"invalid_union\":return\"无效输入\";case\"invalid_element\":return`${r.origin} 中包含无效值(value)`;default:return\"无效输入\"}}};function bv(){return{localeError:e4()}}var t4=()=>{let e={string:{unit:\"字元\",verb:\"擁有\"},file:{unit:\"位元組\",verb:\"擁有\"},array:{unit:\"項目\",verb:\"擁有\"},set:{unit:\"項目\",verb:\"擁有\"}};function t(r){return e[r]??null}let n={regex:\"輸入\",email:\"郵件地址\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO 日期時間\",date:\"ISO 日期\",time:\"ISO 時間\",duration:\"ISO 期間\",ipv4:\"IPv4 位址\",ipv6:\"IPv6 位址\",cidrv4:\"IPv4 範圍\",cidrv6:\"IPv6 範圍\",base64:\"base64 編碼字串\",base64url:\"base64url 編碼字串\",json_string:\"JSON 字串\",e164:\"E.164 數值\",jwt:\"JWT\",template_literal:\"輸入\"},o={nan:\"NaN\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`無效的輸入值:預期為 instanceof ${r.expected},但收到 ${a}`;return`無效的輸入值:預期為 ${i},但收到 ${a}`}case\"invalid_value\":if(r.values.length===1)return`無效的輸入值:預期為 ${x(r.values[0])}`;return`無效的選項:預期為以下其中之一 ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`數值過大:預期 ${r.origin??\"值\"} 應為 ${i}${r.maximum.toString()} ${s.unit??\"個元素\"}`;return`數值過大:預期 ${r.origin??\"值\"} 應為 ${i}${r.maximum.toString()}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`數值過小:預期 ${r.origin} 應為 ${i}${r.minimum.toString()} ${s.unit}`;return`數值過小:預期 ${r.origin} 應為 ${i}${r.minimum.toString()}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`無效的字串:必須以 \"${i.prefix}\" 開頭`;if(i.format===\"ends_with\")return`無效的字串:必須以 \"${i.suffix}\" 結尾`;if(i.format===\"includes\")return`無效的字串:必須包含 \"${i.includes}\"`;if(i.format===\"regex\")return`無效的字串:必須符合格式 ${i.pattern}`;return`無效的 ${n[i.format]??r.format}`}case\"not_multiple_of\":return`無效的數字:必須為 ${r.divisor} 的倍數`;case\"unrecognized_keys\":return`無法識別的鍵值${r.keys.length>1?\"們\":\"\"}:${v(r.keys,\"、\")}`;case\"invalid_key\":return`${r.origin} 中有無效的鍵值`;case\"invalid_union\":return\"無效的輸入值\";case\"invalid_element\":return`${r.origin} 中有無效的值`;default:return\"無效的輸入值\"}}};function Sv(){return{localeError:t4()}}var r4=()=>{let e={string:{unit:\"àmi\",verb:\"ní\"},file:{unit:\"bytes\",verb:\"ní\"},array:{unit:\"nkan\",verb:\"ní\"},set:{unit:\"nkan\",verb:\"ní\"}};function t(r){return e[r]??null}let n={regex:\"ẹ̀rọ ìbáwọlé\",email:\"àdírẹ́sì ìmẹ́lì\",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:\"àkókò ISO\",date:\"ọjọ́ ISO\",time:\"àkókò ISO\",duration:\"àkókò tó pé ISO\",ipv4:\"àdírẹ́sì IPv4\",ipv6:\"àdírẹ́sì IPv6\",cidrv4:\"àgbègbè IPv4\",cidrv6:\"àgbègbè IPv6\",base64:\"ọ̀rọ̀ tí a kọ́ ní base64\",base64url:\"ọ̀rọ̀ base64url\",json_string:\"ọ̀rọ̀ JSON\",e164:\"nọ́mbà E.164\",jwt:\"JWT\",template_literal:\"ẹ̀rọ ìbáwọlé\"},o={nan:\"NaN\",number:\"nọ́mbà\",array:\"akopọ\"};return(r)=>{switch(r.code){case\"invalid_type\":{let i=o[r.expected]??r.expected,s=w(r.input),a=o[s]??s;if(/^[A-Z]/.test(r.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${r.expected}, àmọ̀ a rí ${a}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${i}, àmọ̀ a rí ${a}`}case\"invalid_value\":if(r.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${x(r.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${v(r.values,\"|\")}`;case\"too_big\":{let i=r.inclusive?\"<=\":\"<\",s=t(r.origin);if(s)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${r.origin??\"iye\"} ${s.verb} ${i}${r.maximum} ${s.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${i}${r.maximum}`}case\"too_small\":{let i=r.inclusive?\">=\":\">\",s=t(r.origin);if(s)return`Kéré ju: a ní láti jẹ́ pé ${r.origin} ${s.verb} ${i}${r.minimum} ${s.unit}`;return`Kéré ju: a ní láti jẹ́ ${i}${r.minimum}`}case\"invalid_format\":{let i=r;if(i.format===\"starts_with\")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú \"${i.suffix}\"`;if(i.format===\"includes\")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní \"${i.includes}\"`;if(i.format===\"regex\")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${i.pattern}`;return`Aṣìṣe: ${n[i.format]??r.format}`}case\"not_multiple_of\":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${r.divisor}`;case\"unrecognized_keys\":return`Bọtìnì àìmọ̀: ${v(r.keys,\", \")}`;case\"invalid_key\":return`Bọtìnì aṣìṣe nínú ${r.origin}`;case\"invalid_union\":return\"Ìbáwọlé aṣìṣe\";case\"invalid_element\":return`Iye aṣìṣe nínú ${r.origin}`;default:return\"Ìbáwọlé aṣìṣe\"}}};function yv(){return{localeError:r4()}}var XT,zv=Symbol(\"ZodOutput\"),$v=Symbol(\"ZodInput\");class xv{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n===\"object\"&&\"id\"in n)this._idmap.set(n.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t===\"object\"&&\"id\"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Sd(){return new xv}(XT=globalThis).__zod_globalRegistry??(XT.__zod_globalRegistry=Sd());var Le=globalThis.__zod_globalRegistry;function wv(e,t){return new e({type:\"string\",...R(t)})}function kv(e,t){return new e({type:\"string\",coerce:!0,...R(t)})}function yd(e,t){return new e({type:\"string\",format:\"email\",check:\"string_format\",abort:!1,...R(t)})}function Gc(e,t){return new e({type:\"string\",format:\"guid\",check:\"string_format\",abort:!1,...R(t)})}function zd(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,...R(t)})}function $d(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v4\",...R(t)})}function xd(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v6\",...R(t)})}function wd(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v7\",...R(t)})}function Wc(e,t){return new e({type:\"string\",format:\"url\",check:\"string_format\",abort:!1,...R(t)})}function kd(e,t){return new e({type:\"string\",format:\"emoji\",check:\"string_format\",abort:!1,...R(t)})}function Pd(e,t){return new e({type:\"string\",format:\"nanoid\",check:\"string_format\",abort:!1,...R(t)})}function Rd(e,t){return new e({type:\"string\",format:\"cuid\",check:\"string_format\",abort:!1,...R(t)})}function Id(e,t){return new e({type:\"string\",format:\"cuid2\",check:\"string_format\",abort:!1,...R(t)})}function Td(e,t){return new e({type:\"string\",format:\"ulid\",check:\"string_format\",abort:!1,...R(t)})}function Ed(e,t){return new e({type:\"string\",format:\"xid\",check:\"string_format\",abort:!1,...R(t)})}function Od(e,t){return new e({type:\"string\",format:\"ksuid\",check:\"string_format\",abort:!1,...R(t)})}function jd(e,t){return new e({type:\"string\",format:\"ipv4\",check:\"string_format\",abort:!1,...R(t)})}function Nd(e,t){return new e({type:\"string\",format:\"ipv6\",check:\"string_format\",abort:!1,...R(t)})}function Pv(e,t){return new e({type:\"string\",format:\"mac\",check:\"string_format\",abort:!1,...R(t)})}function Cd(e,t){return new e({type:\"string\",format:\"cidrv4\",check:\"string_format\",abort:!1,...R(t)})}function Zd(e,t){return new e({type:\"string\",format:\"cidrv6\",check:\"string_format\",abort:!1,...R(t)})}function Ad(e,t){return new e({type:\"string\",format:\"base64\",check:\"string_format\",abort:!1,...R(t)})}function Ud(e,t){return new e({type:\"string\",format:\"base64url\",check:\"string_format\",abort:!1,...R(t)})}function Md(e,t){return new e({type:\"string\",format:\"e164\",check:\"string_format\",abort:!1,...R(t)})}function Dd(e,t){return new e({type:\"string\",format:\"jwt\",check:\"string_format\",abort:!1,...R(t)})}var Rv={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Iv(e,t){return new e({type:\"string\",format:\"datetime\",check:\"string_format\",offset:!1,local:!1,precision:null,...R(t)})}function Tv(e,t){return new e({type:\"string\",format:\"date\",check:\"string_format\",...R(t)})}function Ev(e,t){return new e({type:\"string\",format:\"time\",check:\"string_format\",precision:null,...R(t)})}function Ov(e,t){return new e({type:\"string\",format:\"duration\",check:\"string_format\",...R(t)})}function jv(e,t){return new e({type:\"number\",checks:[],...R(t)})}function Nv(e,t){return new e({type:\"number\",coerce:!0,checks:[],...R(t)})}function Cv(e,t){return new e({type:\"number\",check:\"number_format\",abort:!1,format:\"safeint\",...R(t)})}function Zv(e,t){return new e({type:\"number\",check:\"number_format\",abort:!1,format:\"float32\",...R(t)})}function Av(e,t){return new e({type:\"number\",check:\"number_format\",abort:!1,format:\"float64\",...R(t)})}function Uv(e,t){return new e({type:\"number\",check:\"number_format\",abort:!1,format:\"int32\",...R(t)})}function Mv(e,t){return new e({type:\"number\",check:\"number_format\",abort:!1,format:\"uint32\",...R(t)})}function Dv(e,t){return new e({type:\"boolean\",...R(t)})}function Lv(e,t){return new e({type:\"boolean\",coerce:!0,...R(t)})}function qv(e,t){return new e({type:\"bigint\",...R(t)})}function Fv(e,t){return new e({type:\"bigint\",coerce:!0,...R(t)})}function Vv(e,t){return new e({type:\"bigint\",check:\"bigint_format\",abort:!1,format:\"int64\",...R(t)})}function Jv(e,t){return new e({type:\"bigint\",check:\"bigint_format\",abort:!1,format:\"uint64\",...R(t)})}function Bv(e,t){return new e({type:\"symbol\",...R(t)})}function Hv(e,t){return new e({type:\"undefined\",...R(t)})}function Gv(e,t){return new e({type:\"null\",...R(t)})}function Wv(e){return new e({type:\"any\"})}function Kv(e){return new e({type:\"unknown\"})}function Yv(e,t){return new e({type:\"never\",...R(t)})}function Xv(e,t){return new e({type:\"void\",...R(t)})}function Qv(e,t){return new e({type:\"date\",...R(t)})}function eb(e,t){return new e({type:\"date\",coerce:!0,...R(t)})}function tb(e,t){return new e({type:\"nan\",...R(t)})}function Ct(e,t){return new cd({check:\"less_than\",...R(t),value:e,inclusive:!1})}function ht(e,t){return new cd({check:\"less_than\",...R(t),value:e,inclusive:!0})}function Zt(e,t){return new ud({check:\"greater_than\",...R(t),value:e,inclusive:!1})}function Ye(e,t){return new ud({check:\"greater_than\",...R(t),value:e,inclusive:!0})}function Ld(e){return Zt(0,e)}function qd(e){return Ct(0,e)}function Fd(e){return ht(0,e)}function Vd(e){return Ye(0,e)}function Or(e,t){return new Xh({check:\"multiple_of\",...R(t),value:e})}function jr(e,t){return new tg({check:\"max_size\",...R(t),maximum:e})}function At(e,t){return new rg({check:\"min_size\",...R(t),minimum:e})}function $n(e,t){return new ng({check:\"size_equals\",...R(t),size:e})}function xn(e,t){return new og({check:\"max_length\",...R(t),maximum:e})}function nr(e,t){return new ig({check:\"min_length\",...R(t),minimum:e})}function wn(e,t){return new sg({check:\"length_equals\",...R(t),length:e})}function qo(e,t){return new ag({check:\"string_format\",format:\"regex\",...R(t),pattern:e})}function Fo(e){return new cg({check:\"string_format\",format:\"lowercase\",...R(e)})}function Vo(e){return new ug({check:\"string_format\",format:\"uppercase\",...R(e)})}function Jo(e,t){return new lg({check:\"string_format\",format:\"includes\",...R(t),includes:e})}function Bo(e,t){return new dg({check:\"string_format\",format:\"starts_with\",...R(t),prefix:e})}function Ho(e,t){return new pg({check:\"string_format\",format:\"ends_with\",...R(t),suffix:e})}function Jd(e,t,n){return new mg({check:\"property\",property:e,schema:t,...R(n)})}function Go(e,t){return new fg({check:\"mime_type\",mime:e,...R(t)})}function kt(e){return new hg({check:\"overwrite\",tx:e})}function Wo(e){return kt((t)=>t.normalize(e))}function Ko(){return kt((e)=>e.trim())}function Yo(){return kt((e)=>e.toLowerCase())}function Xo(){return kt((e)=>e.toUpperCase())}function Qo(){return kt((e)=>dh(e))}function rb(e,t,n){return new e({type:\"array\",element:t,...R(n)})}function o4(e,t,n){return new e({type:\"union\",options:t,...R(n)})}function i4(e,t,n){return new e({type:\"union\",options:t,inclusive:!1,...R(n)})}function s4(e,t,n,o){return new e({type:\"union\",options:n,discriminator:t,...R(o)})}function a4(e,t,n){return new e({type:\"intersection\",left:t,right:n})}function c4(e,t,n,o){let r=n instanceof V;return new e({type:\"tuple\",items:t,rest:r?n:null,...R(r?o:n)})}function u4(e,t,n,o){return new e({type:\"record\",keyType:t,valueType:n,...R(o)})}function l4(e,t,n,o){return new e({type:\"map\",keyType:t,valueType:n,...R(o)})}function d4(e,t,n){return new e({type:\"set\",valueType:t,...R(n)})}function p4(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map((r)=>[r,r])):t;return new e({type:\"enum\",entries:o,...R(n)})}function m4(e,t,n){return new e({type:\"enum\",entries:t,...R(n)})}function f4(e,t,n){return new e({type:\"literal\",values:Array.isArray(t)?t:[t],...R(n)})}function nb(e,t){return new e({type:\"file\",...R(t)})}function h4(e,t){return new e({type:\"transform\",transform:t})}function g4(e,t){return new e({type:\"optional\",innerType:t})}function _4(e,t){return new e({type:\"nullable\",innerType:t})}function v4(e,t,n){return new e({type:\"default\",innerType:t,get defaultValue(){return typeof n===\"function\"?n():mh(n)}})}function b4(e,t,n){return new e({type:\"nonoptional\",innerType:t,...R(n)})}function S4(e,t){return new e({type:\"success\",innerType:t})}function y4(e,t,n){return new e({type:\"catch\",innerType:t,catchValue:typeof n===\"function\"?n:()=>n})}function z4(e,t,n){return new e({type:\"pipe\",in:t,out:n})}function $4(e,t){return new e({type:\"readonly\",innerType:t})}function x4(e,t,n){return new e({type:\"template_literal\",parts:t,...R(n)})}function w4(e,t){return new e({type:\"lazy\",getter:t})}function k4(e,t){return new e({type:\"promise\",innerType:t})}function ob(e,t,n){let o=R(n);return o.abort??(o.abort=!0),new e({type:\"custom\",check:\"custom\",fn:t,...o})}function ib(e,t,n){return new e({type:\"custom\",check:\"custom\",fn:t,...R(n)})}function sb(e,t){let n=QT((o)=>(o.addIssue=(r)=>{if(typeof r===\"string\")o.issues.push(Co(r,o.value,n._zod.def));else{let i=r;if(i.fatal)i.continue=!1;i.code??(i.code=\"custom\"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(Co(i))}},e(o.value,o)),t);return n}function QT(e,t){let n=new me({check:\"custom\",...R(t)});return n._zod.check=e,n}function ab(e){let t=new me({check:\"describe\"});return t._zod.onattach=[(n)=>{let o=Le.get(n)??{};Le.add(n,{...o,description:e})}],t._zod.check=()=>{},t}function cb(e){let t=new me({check:\"meta\"});return t._zod.onattach=[(n)=>{let o=Le.get(n)??{};Le.add(n,{...o,...e})}],t._zod.check=()=>{},t}function ub(e,t){let n=R(t),o=n.truthy??[\"true\",\"1\",\"yes\",\"on\",\"y\",\"enabled\"],r=n.falsy??[\"false\",\"0\",\"no\",\"off\",\"n\",\"disabled\"];if(n.case!==\"sensitive\")o=o.map((h)=>typeof h===\"string\"?h.toLowerCase():h),r=r.map((h)=>typeof h===\"string\"?h.toLowerCase():h);let i=new Set(o),s=new Set(r),a=e.Codec??qc,c=e.Boolean??Dc,l=new(e.String??zn)({type:\"string\",error:n.error}),m=new c({type:\"boolean\",error:n.error}),f=new a({type:\"pipe\",in:l,out:m,transform:(h,z)=>{let C=h;if(n.case!==\"sensitive\")C=C.toLowerCase();if(i.has(C))return!0;else if(s.has(C))return!1;else return z.issues.push({code:\"invalid_value\",expected:\"stringbool\",values:[...i,...s],input:z.value,inst:f,continue:!1}),{}},reverseTransform:(h,z)=>{if(h===!0)return o[0]||\"true\";else return r[0]||\"false\"},error:n.error});return f}function ei(e,t,n,o={}){let r=R(o),i={...R(o),check:\"string_format\",type:\"string\",format:t,fn:typeof n===\"function\"?n:(a)=>n.test(a),...r};if(n instanceof RegExp)i.pattern=n;return new e(i)}function Nr(e){let t=e?.target??\"draft-2020-12\";if(t===\"draft-4\")t=\"draft-04\";if(t===\"draft-7\")t=\"draft-07\";return{processors:e.processors??{},metadataRegistry:e?.metadata??Le,target:t,unrepresentable:e?.unrepresentable??\"throw\",override:e?.override??(()=>{}),io:e?.io??\"output\",counter:0,seen:new Map,cycles:e?.cycles??\"ref\",reused:e?.reused??\"inline\",external:e?.external??void 0}}function ae(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i){if(i.count++,n.schemaPath.includes(e))i.cycle=n.path;return i.schema}let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let l={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else{let f=s.schema,h=t.processors[r.type];if(!h)throw Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);h(e,t,f,l)}let m=e._zod.parent;if(m){if(!s.ref)s.ref=m;ae(m,t,l),t.seen.get(m).isParent=!0}}let c=t.metadataRegistry.get(e);if(c)Object.assign(s.schema,c);if(t.io===\"input\"&&Xe(e))delete s.schema.examples,delete s.schema.default;if(t.io===\"input\"&&\"_prefault\"in s.schema)(o=s.schema).default??(o.default=s.schema._prefault);return delete s.schema._prefault,t.seen.get(e).schema}function Cr(e,t){let n=e.seen.get(t);if(!n)throw Error(\"Unprocessed schema. This is a bug in Zod.\");let o=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=o.get(a);if(c&&c!==s[0])throw Error(`Duplicate schema id \"${a}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,s[0])}}let r=(s)=>{let a=e.target===\"draft-2020-12\"?\"$defs\":\"definitions\";if(e.external){let m=e.external.registry.get(s[0])?.id,f=e.external.uri??((z)=>z);if(m)return{ref:f(m)};let h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${f(\"__shared\")}#/${a}/${h}`}}if(s[1]===n)return{ref:\"#\"};let u=`${\"#\"}/${a}/`,l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},i=(s)=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:u}=r(s);if(a.def={...a.schema},u)a.defId=u;let l=a.schema;for(let m in l)delete l[m];l.$ref=c};if(e.cycles===\"throw\")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join(\"/\")}/<root>\n\nSet the \\`cycles\\` parameter to \\`\"ref\"\\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){i(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1){if(e.reused===\"ref\"){i(s);continue}}}}function Zr(e,t){let n=e.seen.get(t);if(!n)throw Error(\"Unprocessed schema. This is a bug in Zod.\");let o=(a)=>{let c=e.seen.get(a);if(c.ref===null)return;let u=c.def??c.schema,l={...u},m=c.ref;if(c.ref=null,m){o(m);let h=e.seen.get(m),z=h.schema;if(z.$ref&&(e.target===\"draft-07\"||e.target===\"draft-04\"||e.target===\"openapi-3.0\"))u.allOf=u.allOf??[],u.allOf.push(z);else Object.assign(u,z);if(Object.assign(u,l),a._zod.parent===m)for(let I in u){if(I===\"$ref\"||I===\"allOf\")continue;if(!(I in l))delete u[I]}if(z.$ref&&h.def)for(let I in u){if(I===\"$ref\"||I===\"allOf\")continue;if(I in h.def&&JSON.stringify(u[I])===JSON.stringify(h.def[I]))delete u[I]}}let f=a._zod.parent;if(f&&f!==m){o(f);let h=e.seen.get(f);if(h?.schema.$ref){if(u.$ref=h.schema.$ref,h.def)for(let z in u){if(z===\"$ref\"||z===\"allOf\")continue;if(z in h.def&&JSON.stringify(u[z])===JSON.stringify(h.def[z]))delete u[z]}}}e.override({zodSchema:a,jsonSchema:u,path:c.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);let r={};if(e.target===\"draft-2020-12\")r.$schema=\"https://json-schema.org/draft/2020-12/schema\";else if(e.target===\"draft-07\")r.$schema=\"http://json-schema.org/draft-07/schema#\";else if(e.target===\"draft-04\")r.$schema=\"http://json-schema.org/draft-04/schema#\";else if(e.target===\"openapi-3.0\");if(e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw Error(\"Schema is missing an `id` property\");r.$id=e.external.uri(a)}Object.assign(r,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;if(i!==void 0&&r.id===i)delete r.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let c=a[1];if(c.def&&c.defId){if(c.def.id===c.defId)delete c.def.id;s[c.defId]=c.def}}if(e.external);else if(Object.keys(s).length>0)if(e.target===\"draft-2020-12\")r.$defs=s;else r.definitions=s;try{let a=JSON.parse(JSON.stringify(r));return Object.defineProperty(a,\"~standard\",{value:{...t[\"~standard\"],jsonSchema:{input:ti(t,\"input\",e.processors),output:ti(t,\"output\",e.processors)}},enumerable:!1,writable:!1}),a}catch(a){throw Error(\"Error converting schema to JSON.\")}}function Xe(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type===\"transform\")return!0;if(o.type===\"array\")return Xe(o.element,n);if(o.type===\"set\")return Xe(o.valueType,n);if(o.type===\"lazy\")return Xe(o.getter(),n);if(o.type===\"promise\"||o.type===\"optional\"||o.type===\"nonoptional\"||o.type===\"nullable\"||o.type===\"readonly\"||o.type===\"default\"||o.type===\"prefault\")return Xe(o.innerType,n);if(o.type===\"intersection\")return Xe(o.left,n)||Xe(o.right,n);if(o.type===\"record\"||o.type===\"map\")return Xe(o.keyType,n)||Xe(o.valueType,n);if(o.type===\"pipe\"){if(e._zod.traits.has(\"$ZodCodec\"))return!0;return Xe(o.in,n)||Xe(o.out,n)}if(o.type===\"object\"){for(let r in o.shape)if(Xe(o.shape[r],n))return!0;return!1}if(o.type===\"union\"){for(let r of o.options)if(Xe(r,n))return!0;return!1}if(o.type===\"tuple\"){for(let r of o.items)if(Xe(r,n))return!0;if(o.rest&&Xe(o.rest,n))return!0;return!1}return!1}var lb=(e,t={})=>(n)=>{let o=Nr({...n,processors:t});return ae(e,o),Cr(o,e),Zr(o,e)},ti=(e,t,n={})=>(o)=>{let{libraryOptions:r,target:i}=o??{},s=Nr({...r??{},target:i,io:t,processors:n});return ae(e,s),Cr(s,e),Zr(s,e)};var P4={guid:\"uuid\",url:\"uri\",datetime:\"date-time\",json_string:\"json-string\",regex:\"\"},db=(e,t,n,o)=>{let r=n;r.type=\"string\";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i===\"number\")r.minLength=i;if(typeof s===\"number\")r.maxLength=s;if(a){if(r.format=P4[a]??a,r.format===\"\")delete r.format;if(a===\"time\")delete r.format}if(u)r.contentEncoding=u;if(c&&c.size>0){let l=[...c];if(l.length===1)r.pattern=l[0].source;else if(l.length>1)r.allOf=[...l.map((m)=>({...t.target===\"draft-07\"||t.target===\"draft-04\"||t.target===\"openapi-3.0\"?{type:\"string\"}:{},pattern:m.source}))]}},pb=(e,t,n,o)=>{let r=n,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;if(typeof a===\"string\"&&a.includes(\"int\"))r.type=\"integer\";else r.type=\"number\";let m=typeof l===\"number\"&&l>=(i??Number.NEGATIVE_INFINITY),f=typeof u===\"number\"&&u<=(s??Number.POSITIVE_INFINITY),h=t.target===\"draft-04\"||t.target===\"openapi-3.0\";if(m)if(h)r.minimum=l,r.exclusiveMinimum=!0;else r.exclusiveMinimum=l;else if(typeof i===\"number\")r.minimum=i;if(f)if(h)r.maximum=u,r.exclusiveMaximum=!0;else r.exclusiveMaximum=u;else if(typeof s===\"number\")r.maximum=s;if(typeof c===\"number\")r.multipleOf=c},mb=(e,t,n,o)=>{n.type=\"boolean\"},fb=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"BigInt cannot be represented in JSON Schema\")},hb=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Symbols cannot be represented in JSON Schema\")},gb=(e,t,n,o)=>{if(t.target===\"openapi-3.0\")n.type=\"string\",n.nullable=!0,n.enum=[null];else n.type=\"null\"},_b=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Undefined cannot be represented in JSON Schema\")},vb=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Void cannot be represented in JSON Schema\")},bb=(e,t,n,o)=>{n.not={}},Sb=(e,t,n,o)=>{},yb=(e,t,n,o)=>{},zb=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Date cannot be represented in JSON Schema\")},$b=(e,t,n,o)=>{let r=e._zod.def,i=Ic(r.entries);if(i.every((s)=>typeof s===\"number\"))n.type=\"number\";if(i.every((s)=>typeof s===\"string\"))n.type=\"string\";n.enum=i},xb=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable===\"throw\")throw Error(\"Literal `undefined` cannot be represented in JSON Schema\")}else if(typeof s===\"bigint\")if(t.unrepresentable===\"throw\")throw Error(\"BigInt literals cannot be represented in JSON Schema\");else i.push(Number(s));else i.push(s);if(i.length===0);else if(i.length===1){let s=i[0];if(n.type=s===null?\"null\":typeof s,t.target===\"draft-04\"||t.target===\"openapi-3.0\")n.enum=[s];else n.const=s}else{if(i.every((s)=>typeof s===\"number\"))n.type=\"number\";if(i.every((s)=>typeof s===\"string\"))n.type=\"string\";if(i.every((s)=>typeof s===\"boolean\"))n.type=\"boolean\";if(i.every((s)=>s===null))n.type=\"null\";n.enum=i}},wb=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"NaN cannot be represented in JSON Schema\")},kb=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw Error(\"Pattern not found in template literal\");r.type=\"string\",r.pattern=i.source},Pb=(e,t,n,o)=>{let r=n,i={type:\"string\",format:\"binary\",contentEncoding:\"binary\"},{minimum:s,maximum:a,mime:c}=e._zod.bag;if(s!==void 0)i.minLength=s;if(a!==void 0)i.maxLength=a;if(c)if(c.length===1)i.contentMediaType=c[0],Object.assign(r,i);else Object.assign(r,i),r.anyOf=c.map((u)=>({contentMediaType:u}));else Object.assign(r,i)},Rb=(e,t,n,o)=>{n.type=\"boolean\"},Ib=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Custom types cannot be represented in JSON Schema\")},Tb=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Function types cannot be represented in JSON Schema\")},Eb=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Transforms cannot be represented in JSON Schema\")},Ob=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Map cannot be represented in JSON Schema\")},jb=(e,t,n,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Set cannot be represented in JSON Schema\")},Nb=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;if(typeof s===\"number\")r.minItems=s;if(typeof a===\"number\")r.maxItems=a;r.type=\"array\",r.items=ae(i.element,t,{...o,path:[...o.path,\"items\"]})},Cb=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type=\"object\",r.properties={};let s=i.shape;for(let u in s)r.properties[u]=ae(s[u],t,{...o,path:[...o.path,\"properties\",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter((u)=>{let l=i.shape[u]._zod;if(t.io===\"input\")return l.optin===void 0;else return l.optout===void 0}));if(c.size>0)r.required=Array.from(c);if(i.catchall?._zod.def.type===\"never\")r.additionalProperties=!1;else if(!i.catchall){if(t.io===\"output\")r.additionalProperties=!1}else if(i.catchall)r.additionalProperties=ae(i.catchall,t,{...o,path:[...o.path,\"additionalProperties\"]})},Hd=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,s=r.options.map((a,c)=>ae(a,t,{...o,path:[...o.path,i?\"oneOf\":\"anyOf\",c]}));if(i)n.oneOf=s;else n.anyOf=s},Zb=(e,t,n,o)=>{let r=e._zod.def,i=ae(r.left,t,{...o,path:[...o.path,\"allOf\",0]}),s=ae(r.right,t,{...o,path:[...o.path,\"allOf\",1]}),a=(u)=>(\"allOf\"in u)&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=c},Ab=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type=\"array\";let s=t.target===\"draft-2020-12\"?\"prefixItems\":\"items\",a=t.target===\"draft-2020-12\"?\"items\":t.target===\"openapi-3.0\"?\"items\":\"additionalItems\",c=i.items.map((f,h)=>ae(f,t,{...o,path:[...o.path,s,h]})),u=i.rest?ae(i.rest,t,{...o,path:[...o.path,a,...t.target===\"openapi-3.0\"?[i.items.length]:[]]}):null;if(t.target===\"draft-2020-12\"){if(r.prefixItems=c,u)r.items=u}else if(t.target===\"openapi-3.0\"){if(r.items={anyOf:c},u)r.items.anyOf.push(u);if(r.minItems=c.length,!u)r.maxItems=c.length}else if(r.items=c,u)r.additionalItems=u;let{minimum:l,maximum:m}=e._zod.bag;if(typeof l===\"number\")r.minItems=l;if(typeof m===\"number\")r.maxItems=m},Ub=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type=\"object\";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode===\"loose\"&&c&&c.size>0){let l=ae(i.valueType,t,{...o,path:[...o.path,\"patternProperties\",\"*\"]});r.patternProperties={};for(let m of c)r.patternProperties[m.source]=l}else{if(t.target===\"draft-07\"||t.target===\"draft-2020-12\")r.propertyNames=ae(i.keyType,t,{...o,path:[...o.path,\"propertyNames\"]});r.additionalProperties=ae(i.valueType,t,{...o,path:[...o.path,\"additionalProperties\"]})}let u=s._zod.values;if(u){let l=[...u].filter((m)=>typeof m===\"string\"||typeof m===\"number\");if(l.length>0)r.required=l}},Mb=(e,t,n,o)=>{let r=e._zod.def,i=ae(r.innerType,t,o),s=t.seen.get(e);if(t.target===\"openapi-3.0\")s.ref=r.innerType,n.nullable=!0;else n.anyOf=[i,{type:\"null\"}]},Db=(e,t,n,o)=>{let r=e._zod.def;ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Lb=(e,t,n,o)=>{let r=e._zod.def;ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},qb=(e,t,n,o)=>{let r=e._zod.def;ae(r.innerType,t,o);let i=t.seen.get(e);if(i.ref=r.innerType,t.io===\"input\")n._prefault=JSON.parse(JSON.stringify(r.defaultValue))},Fb=(e,t,n,o)=>{let r=e._zod.def;ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw Error(\"Dynamic catch values are not supported in JSON Schema\")}n.default=s},Vb=(e,t,n,o)=>{let r=e._zod.def,i=r.in._zod.traits.has(\"$ZodTransform\"),s=t.io===\"input\"?i?r.out:r.in:r.out;ae(s,t,o);let a=t.seen.get(e);a.ref=s},Jb=(e,t,n,o)=>{let r=e._zod.def;ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},Bb=(e,t,n,o)=>{let r=e._zod.def;ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Gd=(e,t,n,o)=>{let r=e._zod.def;ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Hb=(e,t,n,o)=>{let r=e._zod.innerType;ae(r,t,o);let i=t.seen.get(e);i.ref=r},Bd={string:db,number:pb,boolean:mb,bigint:fb,symbol:hb,null:gb,undefined:_b,void:vb,never:bb,any:Sb,unknown:yb,date:zb,enum:$b,literal:xb,nan:wb,template_literal:kb,file:Pb,success:Rb,custom:Ib,function:Tb,transform:Eb,map:Ob,set:jb,array:Nb,object:Cb,union:Hd,intersection:Zb,tuple:Ab,record:Ub,nullable:Mb,nonoptional:Db,default:Lb,prefault:qb,catch:Fb,pipe:Vb,readonly:Jb,promise:Bb,optional:Gd,lazy:Hb};function Wd(e,t){if(\"_idmap\"in e){let o=e,r=Nr({...t,processors:Bd}),i={};for(let c of o._idmap.entries()){let[u,l]=c;ae(l,r)}let s={},a={registry:o,uri:t?.uri,defs:i};r.external=a;for(let c of o._idmap.entries()){let[u,l]=c;Cr(r,l),s[u]=Zr(r,l)}if(Object.keys(i).length>0){let c=r.target===\"draft-2020-12\"?\"$defs\":\"definitions\";s.__shared={[c]:i}}return{schemas:s}}let n=Nr({...t,processors:Bd});return ae(e,n),Cr(n,e),Zr(n,e)}class Gb{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??\"draft-2020-12\";if(t===\"draft-4\")t=\"draft-04\";if(t===\"draft-7\")t=\"draft-07\";this.ctx=Nr({processors:Bd,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return ae(e,this.ctx,t)}emit(e,t){if(t){if(t.cycles)this.ctx.cycles=t.cycles;if(t.reused)this.ctx.reused=t.reused;if(t.external)this.ctx.external=t.external}Cr(this.ctx,e);let n=Zr(this.ctx,e),{\"~standard\":o,...r}=n;return r}}var eE={};var Kc={};tt(Kc,{ZodAny:()=>vS,ZodArray:()=>zS,ZodBase64:()=>gp,ZodBase64URL:()=>_p,ZodBigInt:()=>ui,ZodBigIntFormat:()=>Sp,ZodBoolean:()=>ci,ZodCIDRv4:()=>fp,ZodCIDRv6:()=>hp,ZodCUID:()=>ap,ZodCUID2:()=>cp,ZodCatch:()=>VS,ZodCodec:()=>cu,ZodCustom:()=>uu,ZodCustomStringFormat:()=>si,ZodDate:()=>nu,ZodDefault:()=>US,ZodDiscriminatedUnion:()=>xS,ZodE164:()=>vp,ZodEmail:()=>op,ZodEmoji:()=>ip,ZodEnum:()=>oi,ZodExactOptional:()=>CS,ZodFile:()=>jS,ZodFunction:()=>ey,ZodGUID:()=>Xc,ZodIPv4:()=>pp,ZodIPv6:()=>mp,ZodIntersection:()=>wS,ZodJWT:()=>bp,ZodKSUID:()=>dp,ZodLazy:()=>YS,ZodLiteral:()=>OS,ZodMAC:()=>dS,ZodMap:()=>TS,ZodNaN:()=>BS,ZodNanoID:()=>sp,ZodNever:()=>SS,ZodNonOptional:()=>kp,ZodNull:()=>gS,ZodNullable:()=>AS,ZodNumber:()=>ai,ZodNumberFormat:()=>Pn,ZodObject:()=>iu,ZodOptional:()=>wp,ZodPipe:()=>au,ZodPrefault:()=>DS,ZodPreprocess:()=>HS,ZodPromise:()=>QS,ZodReadonly:()=>GS,ZodRecord:()=>ni,ZodSet:()=>ES,ZodString:()=>ii,ZodStringFormat:()=>de,ZodSuccess:()=>FS,ZodSymbol:()=>fS,ZodTemplateLiteral:()=>KS,ZodTransform:()=>NS,ZodTuple:()=>PS,ZodType:()=>J,ZodULID:()=>up,ZodURL:()=>ru,ZodUUID:()=>Ut,ZodUndefined:()=>hS,ZodUnion:()=>su,ZodUnknown:()=>bS,ZodVoid:()=>yS,ZodXID:()=>lp,ZodXor:()=>$S,_ZodString:()=>np,_default:()=>MS,_function:()=>u0,any:()=>DE,array:()=>ou,base64:()=>$E,base64url:()=>xE,bigint:()=>CE,boolean:()=>mS,catch:()=>JS,check:()=>l0,cidrv4:()=>yE,cidrv6:()=>zE,codec:()=>i0,cuid:()=>mE,cuid2:()=>fE,custom:()=>d0,date:()=>qE,describe:()=>p0,discriminatedUnion:()=>GE,e164:()=>wE,email:()=>nE,emoji:()=>dE,enum:()=>$p,exactOptional:()=>ZS,file:()=>t0,float32:()=>EE,float64:()=>OE,function:()=>u0,guid:()=>oE,hash:()=>TE,hex:()=>IE,hostname:()=>RE,httpUrl:()=>lE,instanceof:()=>f0,int:()=>tp,int32:()=>jE,int64:()=>ZE,intersection:()=>kS,invertCodec:()=>s0,ipv4:()=>vE,ipv6:()=>SE,json:()=>g0,jwt:()=>kE,keyof:()=>FE,ksuid:()=>_E,lazy:()=>XS,literal:()=>e0,looseObject:()=>BE,looseRecord:()=>KE,mac:()=>bE,map:()=>YE,meta:()=>m0,nan:()=>o0,nanoid:()=>pE,nativeEnum:()=>QE,never:()=>yp,nonoptional:()=>qS,null:()=>_S,nullable:()=>eu,nullish:()=>r0,number:()=>pS,object:()=>VE,optional:()=>Qc,partialRecord:()=>WE,pipe:()=>rp,prefault:()=>LS,preprocess:()=>_0,promise:()=>c0,readonly:()=>WS,record:()=>IS,refine:()=>ty,set:()=>XE,strictObject:()=>JE,string:()=>Yc,stringFormat:()=>PE,stringbool:()=>h0,success:()=>n0,superRefine:()=>ry,symbol:()=>UE,templateLiteral:()=>a0,transform:()=>xp,tuple:()=>RS,uint32:()=>NE,uint64:()=>AE,ulid:()=>hE,undefined:()=>ME,union:()=>zp,unknown:()=>kn,url:()=>uE,uuid:()=>iE,uuidv4:()=>sE,uuidv6:()=>aE,uuidv7:()=>cE,void:()=>LE,xid:()=>gE,xor:()=>HE});var Kd={};tt(Kd,{endsWith:()=>Ho,gt:()=>Zt,gte:()=>Ye,includes:()=>Jo,length:()=>wn,lowercase:()=>Fo,lt:()=>Ct,lte:()=>ht,maxLength:()=>xn,maxSize:()=>jr,mime:()=>Go,minLength:()=>nr,minSize:()=>At,multipleOf:()=>Or,negative:()=>qd,nonnegative:()=>Vd,nonpositive:()=>Fd,normalize:()=>Wo,overwrite:()=>kt,positive:()=>Ld,property:()=>Jd,regex:()=>qo,size:()=>$n,slugify:()=>Qo,startsWith:()=>Bo,toLowerCase:()=>Yo,toUpperCase:()=>Xo,trim:()=>Ko,uppercase:()=>Vo});var ri={};tt(ri,{ZodISODate:()=>Xd,ZodISODateTime:()=>Yd,ZodISODuration:()=>ep,ZodISOTime:()=>Qd,date:()=>Kb,datetime:()=>Wb,duration:()=>Xb,time:()=>Yb});var Yd=_(\"ZodISODateTime\",(e,t)=>{Ig.init(e,t),de.init(e,t)});function Wb(e){return Iv(Yd,e)}var Xd=_(\"ZodISODate\",(e,t)=>{Tg.init(e,t),de.init(e,t)});function Kb(e){return Tv(Xd,e)}var Qd=_(\"ZodISOTime\",(e,t)=>{Eg.init(e,t),de.init(e,t)});function Yb(e){return Ev(Qd,e)}var ep=_(\"ZodISODuration\",(e,t)=>{Og.init(e,t),de.init(e,t)});function Xb(e){return Ov(ep,e)}var tE=(e,t)=>{Nc.init(e,t),e.name=\"ZodError\",Object.defineProperties(e,{format:{value:(n)=>Zc(e,n)},flatten:{value:(n)=>Cc(e,n)},addIssue:{value:(n)=>{e.issues.push(n),e.message=JSON.stringify(e.issues,jo,2)}},addIssues:{value:(n)=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,jo,2)}},isEmpty:{get(){return e.issues.length===0}}})},I4=_(\"ZodError\",tE),st=_(\"ZodError\",tE,{Parent:Error});var Qb=Zo(st),eS=Ao(st),tS=Uo(st),rS=Mo(st),nS=Ql(st),oS=ed(st),iS=td(st),sS=rd(st),aS=nd(st),cS=od(st),uS=id(st),lS=sd(st);var rE=new WeakMap;function tu(e,t,n){let o=Object.getPrototypeOf(e),r=rE.get(o);if(!r)r=new Set,rE.set(o,r);if(r.has(t))return;r.add(t);for(let i in n){let s=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}var J=_(\"ZodType\",(e,t)=>(V.init(e,t),Object.assign(e[\"~standard\"],{jsonSchema:{input:ti(e,\"input\"),output:ti(e,\"output\")}}),e.toJSONSchema=lb(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,\"_def\",{value:t}),e.parse=(n,o)=>Qb(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>tS(e,n,o),e.parseAsync=async(n,o)=>eS(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>rS(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>nS(e,n,o),e.decode=(n,o)=>oS(e,n,o),e.encodeAsync=async(n,o)=>iS(e,n,o),e.decodeAsync=async(n,o)=>sS(e,n,o),e.safeEncode=(n,o)=>aS(e,n,o),e.safeDecode=(n,o)=>cS(e,n,o),e.safeEncodeAsync=async(n,o)=>uS(e,n,o),e.safeDecodeAsync=async(n,o)=>lS(e,n,o),tu(e,\"ZodType\",{check(...n){let o=this.def;return this.clone(k.mergeDefs(o,{checks:[...o.checks??[],...n.map((r)=>typeof r===\"function\"?{_zod:{check:r,def:{check:\"custom\"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return We(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(ty(n,o))},superRefine(n,o){return this.check(ry(n,o))},overwrite(n){return this.check(kt(n))},optional(){return Qc(this)},exactOptional(){return ZS(this)},nullable(){return eu(this)},nullish(){return Qc(eu(this))},nonoptional(n){return qS(this,n)},array(){return ou(this)},or(n){return zp([this,n])},and(n){return kS(this,n)},transform(n){return rp(this,xp(n))},default(n){return MS(this,n)},prefault(n){return LS(this,n)},catch(n){return JS(this,n)},pipe(n){return rp(this,n)},readonly(){return WS(this)},describe(n){let o=this.clone();return Le.add(o,{description:n}),o},meta(...n){if(n.length===0)return Le.get(this);let o=this.clone();return Le.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,\"description\",{get(){return Le.get(e)?.description},configurable:!0}),e)),np=_(\"_ZodString\",(e,t)=>{zn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(o,r,i)=>db(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,tu(e,\"_ZodString\",{regex(...o){return this.check(qo(...o))},includes(...o){return this.check(Jo(...o))},startsWith(...o){return this.check(Bo(...o))},endsWith(...o){return this.check(Ho(...o))},min(...o){return this.check(nr(...o))},max(...o){return this.check(xn(...o))},length(...o){return this.check(wn(...o))},nonempty(...o){return this.check(nr(1,...o))},lowercase(o){return this.check(Fo(o))},uppercase(o){return this.check(Vo(o))},trim(){return this.check(Ko())},normalize(...o){return this.check(Wo(...o))},toLowerCase(){return this.check(Yo())},toUpperCase(){return this.check(Xo())},slugify(){return this.check(Qo())}})}),ii=_(\"ZodString\",(e,t)=>{zn.init(e,t),np.init(e,t),e.email=(n)=>e.check(yd(op,n)),e.url=(n)=>e.check(Wc(ru,n)),e.jwt=(n)=>e.check(Dd(bp,n)),e.emoji=(n)=>e.check(kd(ip,n)),e.guid=(n)=>e.check(Gc(Xc,n)),e.uuid=(n)=>e.check(zd(Ut,n)),e.uuidv4=(n)=>e.check($d(Ut,n)),e.uuidv6=(n)=>e.check(xd(Ut,n)),e.uuidv7=(n)=>e.check(wd(Ut,n)),e.nanoid=(n)=>e.check(Pd(sp,n)),e.guid=(n)=>e.check(Gc(Xc,n)),e.cuid=(n)=>e.check(Rd(ap,n)),e.cuid2=(n)=>e.check(Id(cp,n)),e.ulid=(n)=>e.check(Td(up,n)),e.base64=(n)=>e.check(Ad(gp,n)),e.base64url=(n)=>e.check(Ud(_p,n)),e.xid=(n)=>e.check(Ed(lp,n)),e.ksuid=(n)=>e.check(Od(dp,n)),e.ipv4=(n)=>e.check(jd(pp,n)),e.ipv6=(n)=>e.check(Nd(mp,n)),e.cidrv4=(n)=>e.check(Cd(fp,n)),e.cidrv6=(n)=>e.check(Zd(hp,n)),e.e164=(n)=>e.check(Md(vp,n)),e.datetime=(n)=>e.check(Wb(n)),e.date=(n)=>e.check(Kb(n)),e.time=(n)=>e.check(Yb(n)),e.duration=(n)=>e.check(Xb(n))});function Yc(e){return wv(ii,e)}var de=_(\"ZodStringFormat\",(e,t)=>{le.init(e,t),np.init(e,t)}),op=_(\"ZodEmail\",(e,t)=>{Sg.init(e,t),de.init(e,t)});function nE(e){return yd(op,e)}var Xc=_(\"ZodGUID\",(e,t)=>{vg.init(e,t),de.init(e,t)});function oE(e){return Gc(Xc,e)}var Ut=_(\"ZodUUID\",(e,t)=>{bg.init(e,t),de.init(e,t)});function iE(e){return zd(Ut,e)}function sE(e){return $d(Ut,e)}function aE(e){return xd(Ut,e)}function cE(e){return wd(Ut,e)}var ru=_(\"ZodURL\",(e,t)=>{yg.init(e,t),de.init(e,t)});function uE(e){return Wc(ru,e)}function lE(e){return Wc(ru,{protocol:ft.httpProtocol,hostname:ft.domain,...k.normalizeParams(e)})}var ip=_(\"ZodEmoji\",(e,t)=>{zg.init(e,t),de.init(e,t)});function dE(e){return kd(ip,e)}var sp=_(\"ZodNanoID\",(e,t)=>{$g.init(e,t),de.init(e,t)});function pE(e){return Pd(sp,e)}var ap=_(\"ZodCUID\",(e,t)=>{xg.init(e,t),de.init(e,t)});function mE(e){return Rd(ap,e)}var cp=_(\"ZodCUID2\",(e,t)=>{wg.init(e,t),de.init(e,t)});function fE(e){return Id(cp,e)}var up=_(\"ZodULID\",(e,t)=>{kg.init(e,t),de.init(e,t)});function hE(e){return Td(up,e)}var lp=_(\"ZodXID\",(e,t)=>{Pg.init(e,t),de.init(e,t)});function gE(e){return Ed(lp,e)}var dp=_(\"ZodKSUID\",(e,t)=>{Rg.init(e,t),de.init(e,t)});function _E(e){return Od(dp,e)}var pp=_(\"ZodIPv4\",(e,t)=>{jg.init(e,t),de.init(e,t)});function vE(e){return jd(pp,e)}var dS=_(\"ZodMAC\",(e,t)=>{Cg.init(e,t),de.init(e,t)});function bE(e){return Pv(dS,e)}var mp=_(\"ZodIPv6\",(e,t)=>{Ng.init(e,t),de.init(e,t)});function SE(e){return Nd(mp,e)}var fp=_(\"ZodCIDRv4\",(e,t)=>{Zg.init(e,t),de.init(e,t)});function yE(e){return Cd(fp,e)}var hp=_(\"ZodCIDRv6\",(e,t)=>{Ag.init(e,t),de.init(e,t)});function zE(e){return Zd(hp,e)}var gp=_(\"ZodBase64\",(e,t)=>{Mg.init(e,t),de.init(e,t)});function $E(e){return Ad(gp,e)}var _p=_(\"ZodBase64URL\",(e,t)=>{Dg.init(e,t),de.init(e,t)});function xE(e){return Ud(_p,e)}var vp=_(\"ZodE164\",(e,t)=>{Lg.init(e,t),de.init(e,t)});function wE(e){return Md(vp,e)}var bp=_(\"ZodJWT\",(e,t)=>{qg.init(e,t),de.init(e,t)});function kE(e){return Dd(bp,e)}var si=_(\"ZodCustomStringFormat\",(e,t)=>{Fg.init(e,t),de.init(e,t)});function PE(e,t,n={}){return ei(si,e,t,n)}function RE(e){return ei(si,\"hostname\",ft.hostname,e)}function IE(e){return ei(si,\"hex\",ft.hex,e)}function TE(e,t){let n=t?.enc??\"hex\",o=`${e}_${n}`,r=ft[o];if(!r)throw Error(`Unrecognized hash format: ${o}`);return ei(si,o,r,t)}var ai=_(\"ZodNumber\",(e,t)=>{hd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(o,r,i)=>pb(e,o,r,i),tu(e,\"ZodNumber\",{gt(o,r){return this.check(Zt(o,r))},gte(o,r){return this.check(Ye(o,r))},min(o,r){return this.check(Ye(o,r))},lt(o,r){return this.check(Ct(o,r))},lte(o,r){return this.check(ht(o,r))},max(o,r){return this.check(ht(o,r))},int(o){return this.check(tp(o))},safe(o){return this.check(tp(o))},positive(o){return this.check(Zt(0,o))},nonnegative(o){return this.check(Ye(0,o))},negative(o){return this.check(Ct(0,o))},nonpositive(o){return this.check(ht(0,o))},multipleOf(o,r){return this.check(Or(o,r))},step(o,r){return this.check(Or(o,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??\"\").includes(\"int\")||Number.isSafeInteger(n.multipleOf??0.5),e.isFinite=!0,e.format=n.format??null});function pS(e){return jv(ai,e)}var Pn=_(\"ZodNumberFormat\",(e,t)=>{Vg.init(e,t),ai.init(e,t)});function tp(e){return Cv(Pn,e)}function EE(e){return Zv(Pn,e)}function OE(e){return Av(Pn,e)}function jE(e){return Uv(Pn,e)}function NE(e){return Mv(Pn,e)}var ci=_(\"ZodBoolean\",(e,t)=>{Dc.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mb(e,n,o,r)});function mS(e){return Dv(ci,e)}var ui=_(\"ZodBigInt\",(e,t)=>{gd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(o,r,i)=>fb(e,o,r,i),e.gte=(o,r)=>e.check(Ye(o,r)),e.min=(o,r)=>e.check(Ye(o,r)),e.gt=(o,r)=>e.check(Zt(o,r)),e.gte=(o,r)=>e.check(Ye(o,r)),e.min=(o,r)=>e.check(Ye(o,r)),e.lt=(o,r)=>e.check(Ct(o,r)),e.lte=(o,r)=>e.check(ht(o,r)),e.max=(o,r)=>e.check(ht(o,r)),e.positive=(o)=>e.check(Zt(BigInt(0),o)),e.negative=(o)=>e.check(Ct(BigInt(0),o)),e.nonpositive=(o)=>e.check(ht(BigInt(0),o)),e.nonnegative=(o)=>e.check(Ye(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(Or(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function CE(e){return qv(ui,e)}var Sp=_(\"ZodBigIntFormat\",(e,t)=>{Jg.init(e,t),ui.init(e,t)});function ZE(e){return Vv(Sp,e)}function AE(e){return Jv(Sp,e)}var fS=_(\"ZodSymbol\",(e,t)=>{Bg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hb(e,n,o,r)});function UE(e){return Bv(fS,e)}var hS=_(\"ZodUndefined\",(e,t)=>{Hg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_b(e,n,o,r)});function ME(e){return Hv(hS,e)}var gS=_(\"ZodNull\",(e,t)=>{Gg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gb(e,n,o,r)});function _S(e){return Gv(gS,e)}var vS=_(\"ZodAny\",(e,t)=>{Wg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sb(e,n,o,r)});function DE(){return Wv(vS)}var bS=_(\"ZodUnknown\",(e,t)=>{Kg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yb(e,n,o,r)});function kn(){return Kv(bS)}var SS=_(\"ZodNever\",(e,t)=>{Yg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bb(e,n,o,r)});function yp(e){return Yv(SS,e)}var yS=_(\"ZodVoid\",(e,t)=>{Xg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vb(e,n,o,r)});function LE(e){return Xv(yS,e)}var nu=_(\"ZodDate\",(e,t)=>{Qg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(o,r,i)=>zb(e,o,r,i),e.min=(o,r)=>e.check(Ye(o,r)),e.max=(o,r)=>e.check(ht(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function qE(e){return Qv(nu,e)}var zS=_(\"ZodArray\",(e,t)=>{e_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Nb(e,n,o,r),e.element=t.element,tu(e,\"ZodArray\",{min(n,o){return this.check(nr(n,o))},nonempty(n){return this.check(nr(1,n))},max(n,o){return this.check(xn(n,o))},length(n,o){return this.check(wn(n,o))},unwrap(){return this.element}})});function ou(e,t){return rb(zS,e,t)}function FE(e){let t=e._zod.def.shape;return $p(Object.keys(t))}var iu=_(\"ZodObject\",(e,t)=>{t_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Cb(e,n,o,r),k.defineLazy(e,\"shape\",()=>t.shape),tu(e,\"ZodObject\",{keyof(){return $p(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:kn()})},loose(){return this.clone({...this._zod.def,catchall:kn()})},strict(){return this.clone({...this._zod.def,catchall:yp()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return k.extend(this,n)},safeExtend(n){return k.safeExtend(this,n)},merge(n){return k.merge(this,n)},pick(n){return k.pick(this,n)},omit(n){return k.omit(this,n)},partial(...n){return k.partial(wp,this,n[0])},required(...n){return k.required(kp,this,n[0])}})});function VE(e,t){let n={type:\"object\",shape:e??{},...k.normalizeParams(t)};return new iu(n)}function JE(e,t){return new iu({type:\"object\",shape:e,catchall:yp(),...k.normalizeParams(t)})}function BE(e,t){return new iu({type:\"object\",shape:e,catchall:kn(),...k.normalizeParams(t)})}var su=_(\"ZodUnion\",(e,t)=>{Lc.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Hd(e,n,o,r),e.options=t.options});function zp(e,t){return new su({type:\"union\",options:e,...k.normalizeParams(t)})}var $S=_(\"ZodXor\",(e,t)=>{su.init(e,t),r_.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Hd(e,n,o,r),e.options=t.options});function HE(e,t){return new $S({type:\"union\",options:e,inclusive:!1,...k.normalizeParams(t)})}var xS=_(\"ZodDiscriminatedUnion\",(e,t)=>{su.init(e,t),n_.init(e,t)});function GE(e,t,n){return new xS({type:\"union\",options:t,discriminator:e,...k.normalizeParams(n)})}var wS=_(\"ZodIntersection\",(e,t)=>{o_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Zb(e,n,o,r)});function kS(e,t){return new wS({type:\"intersection\",left:e,right:t})}var PS=_(\"ZodTuple\",(e,t)=>{_d.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ab(e,n,o,r),e.rest=(n)=>e.clone({...e._zod.def,rest:n})});function RS(e,t,n){let o=t instanceof V,r=o?n:t;return new PS({type:\"tuple\",items:e,rest:o?t:null,...k.normalizeParams(r)})}var ni=_(\"ZodRecord\",(e,t)=>{i_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ub(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function IS(e,t,n){if(!t||!t._zod)return new ni({type:\"record\",keyType:Yc(),valueType:e,...k.normalizeParams(t)});return new ni({type:\"record\",keyType:e,valueType:t,...k.normalizeParams(n)})}function WE(e,t,n){let o=We(e);return o._zod.values=void 0,new ni({type:\"record\",keyType:o,valueType:t,...k.normalizeParams(n)})}function KE(e,t,n){return new ni({type:\"record\",keyType:e,valueType:t,mode:\"loose\",...k.normalizeParams(n)})}var TS=_(\"ZodMap\",(e,t)=>{s_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ob(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(At(...n)),e.nonempty=(n)=>e.check(At(1,n)),e.max=(...n)=>e.check(jr(...n)),e.size=(...n)=>e.check($n(...n))});function YE(e,t,n){return new TS({type:\"map\",keyType:e,valueType:t,...k.normalizeParams(n)})}var ES=_(\"ZodSet\",(e,t)=>{a_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>jb(e,n,o,r),e.min=(...n)=>e.check(At(...n)),e.nonempty=(n)=>e.check(At(1,n)),e.max=(...n)=>e.check(jr(...n)),e.size=(...n)=>e.check($n(...n))});function XE(e,t){return new ES({type:\"set\",valueType:e,...k.normalizeParams(t)})}var oi=_(\"ZodEnum\",(e,t)=>{c_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(o,r,i)=>$b(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let s of o)if(n.has(s))i[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new oi({...t,checks:[],...k.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let s of o)if(n.has(s))delete i[s];else throw Error(`Key ${s} not found in enum`);return new oi({...t,checks:[],...k.normalizeParams(r),entries:i})}});function $p(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map((o)=>[o,o])):e;return new oi({type:\"enum\",entries:n,...k.normalizeParams(t)})}function QE(e,t){return new oi({type:\"enum\",entries:e,...k.normalizeParams(t)})}var OS=_(\"ZodLiteral\",(e,t)=>{u_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xb(e,n,o,r),e.values=new Set(t.values),Object.defineProperty(e,\"value\",{get(){if(t.values.length>1)throw Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");return t.values[0]}})});function e0(e,t){return new OS({type:\"literal\",values:Array.isArray(e)?e:[e],...k.normalizeParams(t)})}var jS=_(\"ZodFile\",(e,t)=>{l_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Pb(e,n,o,r),e.min=(n,o)=>e.check(At(n,o)),e.max=(n,o)=>e.check(jr(n,o)),e.mime=(n,o)=>e.check(Go(Array.isArray(n)?n:[n],o))});function t0(e){return nb(jS,e)}var NS=_(\"ZodTransform\",(e,t)=>{d_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Eb(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction===\"backward\")throw new bn(e.constructor.name);n.addIssue=(i)=>{if(typeof i===\"string\")n.issues.push(k.issue(i,n.value,t));else{let s=i;if(s.fatal)s.continue=!1;s.code??(s.code=\"custom\"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(k.issue(s))}};let r=t.transform(n.value,n);if(r instanceof Promise)return r.then((i)=>(n.value=i,n.fallback=!0,n));return n.value=r,n.fallback=!0,n}});function xp(e){return new NS({type:\"transform\",transform:e})}var wp=_(\"ZodOptional\",(e,t)=>{vd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Gd(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Qc(e){return new wp({type:\"optional\",innerType:e})}var CS=_(\"ZodExactOptional\",(e,t)=>{p_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Gd(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function ZS(e){return new CS({type:\"optional\",innerType:e})}var AS=_(\"ZodNullable\",(e,t)=>{m_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Mb(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function eu(e){return new AS({type:\"nullable\",innerType:e})}function r0(e){return Qc(eu(e))}var US=_(\"ZodDefault\",(e,t)=>{f_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Lb(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function MS(e,t){return new US({type:\"default\",innerType:e,get defaultValue(){return typeof t===\"function\"?t():k.shallowClone(t)}})}var DS=_(\"ZodPrefault\",(e,t)=>{h_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>qb(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function LS(e,t){return new DS({type:\"prefault\",innerType:e,get defaultValue(){return typeof t===\"function\"?t():k.shallowClone(t)}})}var kp=_(\"ZodNonOptional\",(e,t)=>{g_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Db(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function qS(e,t){return new kp({type:\"nonoptional\",innerType:e,...k.normalizeParams(t)})}var FS=_(\"ZodSuccess\",(e,t)=>{__.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rb(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function n0(e){return new FS({type:\"success\",innerType:e})}var VS=_(\"ZodCatch\",(e,t)=>{v_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Fb(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function JS(e,t){return new VS({type:\"catch\",innerType:e,catchValue:typeof t===\"function\"?t:()=>t})}var BS=_(\"ZodNaN\",(e,t)=>{b_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>wb(e,n,o,r)});function o0(e){return tb(BS,e)}var au=_(\"ZodPipe\",(e,t)=>{bd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Vb(e,n,o,r),e.in=t.in,e.out=t.out});function rp(e,t){return new au({type:\"pipe\",in:e,out:t})}var cu=_(\"ZodCodec\",(e,t)=>{au.init(e,t),qc.init(e,t)});function i0(e,t,n){return new cu({type:\"pipe\",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function s0(e){let t=e._zod.def;return new cu({type:\"pipe\",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var HS=_(\"ZodPreprocess\",(e,t)=>{au.init(e,t),S_.init(e,t)}),GS=_(\"ZodReadonly\",(e,t)=>{y_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Jb(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function WS(e){return new GS({type:\"readonly\",innerType:e})}var KS=_(\"ZodTemplateLiteral\",(e,t)=>{z_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>kb(e,n,o,r)});function a0(e,t){return new KS({type:\"template_literal\",parts:e,...k.normalizeParams(t)})}var YS=_(\"ZodLazy\",(e,t)=>{w_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Hb(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function XS(e){return new YS({type:\"lazy\",getter:e})}var QS=_(\"ZodPromise\",(e,t)=>{x_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Bb(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function c0(e){return new QS({type:\"promise\",innerType:e})}var ey=_(\"ZodFunction\",(e,t)=>{$_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Tb(e,n,o,r)});function u0(e){return new ey({type:\"function\",input:Array.isArray(e?.input)?RS(e?.input):e?.input??ou(kn()),output:e?.output??kn()})}var uu=_(\"ZodCustom\",(e,t)=>{k_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ib(e,n,o,r)});function l0(e){let t=new me({check:\"custom\"});return t._zod.check=e,t}function d0(e,t){return ob(uu,e??(()=>!0),t)}function ty(e,t={}){return ib(uu,e,t)}function ry(e,t){return sb(e,t)}var p0=ab,m0=cb;function f0(e,t={}){let n=new uu({type:\"custom\",check:\"custom\",fn:(o)=>o instanceof e,abort:!0,...k.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=(o)=>{if(!(o.value instanceof e))o.issues.push({code:\"invalid_type\",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}var h0=(...e)=>ub({Codec:cu,Boolean:ci,String:ii},...e);function g0(e){let t=XS(()=>zp([Yc(e),pS(),mS(),_S(),ou(t),IS(Yc(),t)]));return t}function _0(e,t){return new HS({type:\"pipe\",in:xp(e),out:t})}var E4={invalid_type:\"invalid_type\",too_big:\"too_big\",too_small:\"too_small\",invalid_format:\"invalid_format\",not_multiple_of:\"not_multiple_of\",unrecognized_keys:\"unrecognized_keys\",invalid_union:\"invalid_union\",invalid_key:\"invalid_key\",invalid_element:\"invalid_element\",invalid_value:\"invalid_value\",custom:\"custom\"};function O4(e){Te({customError:e})}function j4(){return Te().customError}var ny;(function(e){})(ny||(ny={}));var N={...Kc,...Kd,iso:ri},N4=new Set([\"$schema\",\"$ref\",\"$defs\",\"definitions\",\"$id\",\"id\",\"$comment\",\"$anchor\",\"$vocabulary\",\"$dynamicRef\",\"$dynamicAnchor\",\"type\",\"enum\",\"const\",\"anyOf\",\"oneOf\",\"allOf\",\"not\",\"properties\",\"required\",\"additionalProperties\",\"patternProperties\",\"propertyNames\",\"minProperties\",\"maxProperties\",\"items\",\"prefixItems\",\"additionalItems\",\"minItems\",\"maxItems\",\"uniqueItems\",\"contains\",\"minContains\",\"maxContains\",\"minLength\",\"maxLength\",\"pattern\",\"format\",\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\",\"multipleOf\",\"description\",\"default\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\",\"unevaluatedItems\",\"unevaluatedProperties\",\"if\",\"then\",\"else\",\"dependentSchemas\",\"dependentRequired\",\"nullable\",\"readOnly\"]);function C4(e,t){let n=e.$schema;if(n===\"https://json-schema.org/draft/2020-12/schema\")return\"draft-2020-12\";if(n===\"http://json-schema.org/draft-07/schema#\")return\"draft-7\";if(n===\"http://json-schema.org/draft-04/schema#\")return\"draft-4\";return t??\"draft-2020-12\"}function Z4(e,t){if(!e.startsWith(\"#\"))throw Error(\"External $ref is not supported, only local refs (#/...) are allowed\");let n=e.slice(1).split(\"/\").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version===\"draft-2020-12\"?\"$defs\":\"definitions\";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function v0(e,t){if(e.not!==void 0){if(typeof e.not===\"object\"&&Object.keys(e.not).length===0)return N.never();throw Error(\"not is not supported in Zod (except { not: {} } for never)\")}if(e.unevaluatedItems!==void 0)throw Error(\"unevaluatedItems is not supported\");if(e.unevaluatedProperties!==void 0)throw Error(\"unevaluatedProperties is not supported\");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(\"Conditional schemas (if/then/else) are not supported\");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(\"dependentSchemas and dependentRequired are not supported\");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return N.lazy(()=>{if(!t.refs.has(r))throw Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=Z4(r,t),s=Je(i,t);return t.refs.set(r,s),t.processing.delete(r),s}if(e.enum!==void 0){let r=e.enum;if(t.version===\"openapi-3.0\"&&e.nullable===!0&&r.length===1&&r[0]===null)return N.null();if(r.length===0)return N.never();if(r.length===1)return N.literal(r[0]);if(r.every((s)=>typeof s===\"string\"))return N.enum(r);let i=r.map((s)=>N.literal(s));if(i.length<2)return i[0];return N.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return N.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map((i)=>{let s={...e,type:i};return v0(s,t)});if(r.length===0)return N.never();if(r.length===1)return r[0];return N.union(r)}if(!n)return N.any();let o;switch(n){case\"string\":{let r=N.string();if(e.format){let i=e.format;if(i===\"email\")r=r.check(N.email());else if(i===\"uri\"||i===\"uri-reference\")r=r.check(N.url());else if(i===\"uuid\"||i===\"guid\")r=r.check(N.uuid());else if(i===\"date-time\")r=r.check(N.iso.datetime());else if(i===\"date\")r=r.check(N.iso.date());else if(i===\"time\")r=r.check(N.iso.time());else if(i===\"duration\")r=r.check(N.iso.duration());else if(i===\"ipv4\")r=r.check(N.ipv4());else if(i===\"ipv6\")r=r.check(N.ipv6());else if(i===\"mac\")r=r.check(N.mac());else if(i===\"cidr\")r=r.check(N.cidrv4());else if(i===\"cidr-v6\")r=r.check(N.cidrv6());else if(i===\"base64\")r=r.check(N.base64());else if(i===\"base64url\")r=r.check(N.base64url());else if(i===\"e164\")r=r.check(N.e164());else if(i===\"jwt\")r=r.check(N.jwt());else if(i===\"emoji\")r=r.check(N.emoji());else if(i===\"nanoid\")r=r.check(N.nanoid());else if(i===\"cuid\")r=r.check(N.cuid());else if(i===\"cuid2\")r=r.check(N.cuid2());else if(i===\"ulid\")r=r.check(N.ulid());else if(i===\"xid\")r=r.check(N.xid());else if(i===\"ksuid\")r=r.check(N.ksuid())}if(typeof e.minLength===\"number\")r=r.min(e.minLength);if(typeof e.maxLength===\"number\")r=r.max(e.maxLength);if(e.pattern)r=r.regex(new RegExp(e.pattern));o=r;break}case\"number\":case\"integer\":{let r=n===\"integer\"?N.number().int():N.number();if(typeof e.minimum===\"number\")r=r.min(e.minimum);if(typeof e.maximum===\"number\")r=r.max(e.maximum);if(typeof e.exclusiveMinimum===\"number\")r=r.gt(e.exclusiveMinimum);else if(e.exclusiveMinimum===!0&&typeof e.minimum===\"number\")r=r.gt(e.minimum);if(typeof e.exclusiveMaximum===\"number\")r=r.lt(e.exclusiveMaximum);else if(e.exclusiveMaximum===!0&&typeof e.maximum===\"number\")r=r.lt(e.maximum);if(typeof e.multipleOf===\"number\")r=r.multipleOf(e.multipleOf);o=r;break}case\"boolean\":{o=N.boolean();break}case\"null\":{o=N.null();break}case\"object\":{let r={},i=e.properties||{},s=new Set(e.required||[]);for(let[c,u]of Object.entries(i)){let l=Je(u,t);r[c]=s.has(c)?l:l.optional()}if(e.propertyNames){let c=Je(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties===\"object\"?Je(e.additionalProperties,t):N.any();if(Object.keys(r).length===0){o=N.record(c,u);break}let l=N.object(r).passthrough(),m=N.looseRecord(c,u);o=N.intersection(l,m);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),l=[];for(let f of u){let h=Je(c[f],t),z=N.string().regex(new RegExp(f));l.push(N.looseRecord(z,h))}let m=[];if(Object.keys(r).length>0)m.push(N.object(r).passthrough());if(m.push(...l),m.length===0)o=N.object({}).passthrough();else if(m.length===1)o=m[0];else{let f=N.intersection(m[0],m[1]);for(let h=2;h<m.length;h++)f=N.intersection(f,m[h]);o=f}break}let a=N.object(r);if(e.additionalProperties===!1)o=a.strict();else if(typeof e.additionalProperties===\"object\")o=a.catchall(Je(e.additionalProperties,t));else o=a.passthrough();break}case\"array\":{let{prefixItems:r,items:i}=e;if(r&&Array.isArray(r)){let s=r.map((c)=>Je(c,t)),a=i&&typeof i===\"object\"&&!Array.isArray(i)?Je(i,t):void 0;if(a)o=N.tuple(s).rest(a);else o=N.tuple(s);if(typeof e.minItems===\"number\")o=o.check(N.minLength(e.minItems));if(typeof e.maxItems===\"number\")o=o.check(N.maxLength(e.maxItems))}else if(Array.isArray(i)){let s=i.map((c)=>Je(c,t)),a=e.additionalItems&&typeof e.additionalItems===\"object\"?Je(e.additionalItems,t):void 0;if(a)o=N.tuple(s).rest(a);else o=N.tuple(s);if(typeof e.minItems===\"number\")o=o.check(N.minLength(e.minItems));if(typeof e.maxItems===\"number\")o=o.check(N.maxLength(e.maxItems))}else if(i!==void 0){let s=Je(i,t),a=N.array(s);if(typeof e.minItems===\"number\")a=a.min(e.minItems);if(typeof e.maxItems===\"number\")a=a.max(e.maxItems);o=a}else o=N.array(N.any());break}default:throw Error(`Unsupported type: ${n}`)}return o}function Je(e,t){if(typeof e===\"boolean\")return e?N.any():N.never();let n=v0(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map((u)=>Je(u,t)),c=N.union(a);n=o?N.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map((u)=>Je(u,t)),c=N.xor(a);n=o?N.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:N.any();else{let a=o?n:Je(e.allOf[0],t),c=o?0:1;for(let u=c;u<e.allOf.length;u++)a=N.intersection(a,Je(e.allOf[u],t));n=a}if(e.nullable===!0&&t.version===\"openapi-3.0\")n=N.nullable(n);if(e.readOnly===!0)n=N.readonly(n);if(e.default!==void 0)n=n.default(e.default);let r={},i=[\"$id\",\"id\",\"$comment\",\"$anchor\",\"$vocabulary\",\"$dynamicRef\",\"$dynamicAnchor\"];for(let a of i)if(a in e)r[a]=e[a];let s=[\"contentEncoding\",\"contentMediaType\",\"contentSchema\"];for(let a of s)if(a in e)r[a]=e[a];for(let a of Object.keys(e))if(!N4.has(a))r[a]=e[a];if(Object.keys(r).length>0)t.registry.add(n,r);if(e.description)n=n.describe(e.description);return n}function b0(e,t){if(typeof e===\"boolean\")return e?N.any():N.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(\"fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas\")}let o=C4(n,t?.defaultTarget),r=n.$defs||n.definitions||{},i={version:o,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Le};return Je(n,i)}var oy={};tt(oy,{bigint:()=>D4,boolean:()=>M4,date:()=>L4,number:()=>U4,string:()=>A4});function A4(e){return kv(ii,e)}function U4(e){return Nv(ai,e)}function M4(e){return Lv(ci,e)}function D4(e){return Fv(ui,e)}function L4(e){return eb(nu,e)}Te(Fc());class w0{_eventSlots=new Map;setHandler(e,t){let n=this._ensureEventSlot(e);if(n.onHandler&&t)console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener(\"${String(e)}\", …) to add multiple listeners without replacing.`);n.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let o=n.listeners.indexOf(t);if(o!==-1)n.listeners.splice(o,1)}dispatch(e,t){let n=this._eventSlots.get(e);if(!n)return;n.onHandler?.(t);for(let o of[...n.listeners])o(t)}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t)t={listeners:[]},this._eventSlots.set(e,t);return t}}class k0{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for \"${e}\" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}}var S0=new Set;function y0(e,t){let[n,o]=t,r=n?.shape;if(typeof r?.method?.value!==\"string\")return;let i=r.method.value,s=e===\"request\"?\"setRequestHandler\":\"setNotificationHandler\";if(!S0.has(s))S0.add(s),console.warn(`[ext-apps] ${s}(Schema, handler) is deprecated; use ${s}(\"${i}\", { params: Schema.shape.params }, handler).`);let a=o;return[i,{params:r.params},e===\"request\"?(c,u)=>a({method:i,params:c},q4(u)):(c)=>a({method:i,params:c})]}function q4(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var F4=\"2026-01-26\";var V4=\"ui/notifications/tool-input-partial\";class P0{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=(n)=>{if(t&&n.source!==this.eventSource){console.debug(\"Ignoring message from unknown source\",n);return}let o=nn.safeParse(n.data);if(o.success)console.debug(\"Parsed message\",o.data),this.onmessage?.(o.data);else if(n.data?.jsonrpc!==\"2.0\")console.debug(\"Ignoring non-JSON-RPC message\",o.error.message,n);else console.error(\"Failed to parse message\",o.error.message,n),this.onerror?.(Error(\"Invalid JSON-RPC message received: \"+o.error.message))}}async start(){window.addEventListener(\"message\",this.messageListener)}async send(e,t){if(e.method!==V4)console.debug(\"Sending message\",e);this.eventTarget.postMessage(e,\"*\")}async close(){window.removeEventListener(\"message\",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var J4=p.union([p.literal(\"light\"),p.literal(\"dark\")]).describe(\"Color theme preference for the host environment.\"),lu=p.union([p.literal(\"inline\"),p.literal(\"fullscreen\"),p.literal(\"pip\")]).describe(\"Display mode for UI presentation.\"),B4=p.union([p.literal(\"--color-background-primary\"),p.literal(\"--color-background-secondary\"),p.literal(\"--color-background-tertiary\"),p.literal(\"--color-background-inverse\"),p.literal(\"--color-background-ghost\"),p.literal(\"--color-background-info\"),p.literal(\"--color-background-danger\"),p.literal(\"--color-background-success\"),p.literal(\"--color-background-warning\"),p.literal(\"--color-background-disabled\"),p.literal(\"--color-text-primary\"),p.literal(\"--color-text-secondary\"),p.literal(\"--color-text-tertiary\"),p.literal(\"--color-text-inverse\"),p.literal(\"--color-text-ghost\"),p.literal(\"--color-text-info\"),p.literal(\"--color-text-danger\"),p.literal(\"--color-text-success\"),p.literal(\"--color-text-warning\"),p.literal(\"--color-text-disabled\"),p.literal(\"--color-border-primary\"),p.literal(\"--color-border-secondary\"),p.literal(\"--color-border-tertiary\"),p.literal(\"--color-border-inverse\"),p.literal(\"--color-border-ghost\"),p.literal(\"--color-border-info\"),p.literal(\"--color-border-danger\"),p.literal(\"--color-border-success\"),p.literal(\"--color-border-warning\"),p.literal(\"--color-border-disabled\"),p.literal(\"--color-ring-primary\"),p.literal(\"--color-ring-secondary\"),p.literal(\"--color-ring-inverse\"),p.literal(\"--color-ring-info\"),p.literal(\"--color-ring-danger\"),p.literal(\"--color-ring-success\"),p.literal(\"--color-ring-warning\"),p.literal(\"--font-sans\"),p.literal(\"--font-mono\"),p.literal(\"--font-weight-normal\"),p.literal(\"--font-weight-medium\"),p.literal(\"--font-weight-semibold\"),p.literal(\"--font-weight-bold\"),p.literal(\"--font-text-xs-size\"),p.literal(\"--font-text-sm-size\"),p.literal(\"--font-text-md-size\"),p.literal(\"--font-text-lg-size\"),p.literal(\"--font-heading-xs-size\"),p.literal(\"--font-heading-sm-size\"),p.literal(\"--font-heading-md-size\"),p.literal(\"--font-heading-lg-size\"),p.literal(\"--font-heading-xl-size\"),p.literal(\"--font-heading-2xl-size\"),p.literal(\"--font-heading-3xl-size\"),p.literal(\"--font-text-xs-line-height\"),p.literal(\"--font-text-sm-line-height\"),p.literal(\"--font-text-md-line-height\"),p.literal(\"--font-text-lg-line-height\"),p.literal(\"--font-heading-xs-line-height\"),p.literal(\"--font-heading-sm-line-height\"),p.literal(\"--font-heading-md-line-height\"),p.literal(\"--font-heading-lg-line-height\"),p.literal(\"--font-heading-xl-line-height\"),p.literal(\"--font-heading-2xl-line-height\"),p.literal(\"--font-heading-3xl-line-height\"),p.literal(\"--border-radius-xs\"),p.literal(\"--border-radius-sm\"),p.literal(\"--border-radius-md\"),p.literal(\"--border-radius-lg\"),p.literal(\"--border-radius-xl\"),p.literal(\"--border-radius-full\"),p.literal(\"--border-width-regular\"),p.literal(\"--shadow-hairline\"),p.literal(\"--shadow-sm\"),p.literal(\"--shadow-md\"),p.literal(\"--shadow-lg\")]).describe(\"CSS variable keys available to MCP apps for theming.\"),H4=p.record(B4.describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),p.union([p.string(),p.undefined()]).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),KV=p.object({method:p.literal(\"ui/open-link\"),params:p.object({url:p.string().describe(\"URL to open in the host's browser\")})}),G4=p.object({isError:p.boolean().optional().describe(\"True if the host failed to open the URL (e.g., due to security policy).\")}).passthrough(),W4=p.object({isError:p.boolean().optional().describe(\"True if the download failed (e.g., user cancelled or host denied).\")}).passthrough(),K4=p.object({isError:p.boolean().optional().describe(\"True if the host rejected or failed to deliver the message.\")}).passthrough(),YV=p.object({method:p.literal(\"ui/notifications/sandbox-proxy-ready\"),params:p.object({})}),iy=p.object({connectDomains:p.array(p.string()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP \\`connect-src\\` directive\n- Empty or omitted → no network connections (secure default)`),resourceDomains:p.array(p.string()).optional().describe(\"Origins for static resources (images, scripts, stylesheets, fonts, media).\\n\\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\\n- Wildcard subdomains supported: `https://*.example.com`\\n- Empty or omitted → no network resources (secure default)\"),frameDomains:p.array(p.string()).optional().describe(\"Origins for nested iframes.\\n\\n- Maps to CSP `frame-src` directive\\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)\"),baseUriDomains:p.array(p.string()).optional().describe(\"Allowed base URIs for the document.\\n\\n- Maps to CSP `base-uri` directive\\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)\")}),sy=p.object({camera:p.object({}).optional().describe(\"Request camera access.\\n\\nMaps to Permission Policy `camera` feature.\"),microphone:p.object({}).optional().describe(\"Request microphone access.\\n\\nMaps to Permission Policy `microphone` feature.\"),geolocation:p.object({}).optional().describe(\"Request geolocation access.\\n\\nMaps to Permission Policy `geolocation` feature.\"),clipboardWrite:p.object({}).optional().describe(\"Request clipboard write access.\\n\\nMaps to Permission Policy `clipboard-write` feature.\")}),XV=p.object({method:p.literal(\"ui/notifications/size-changed\"),params:p.object({width:p.number().optional().describe(\"New width in pixels.\"),height:p.number().optional().describe(\"New height in pixels.\")})}),Y4=p.object({method:p.literal(\"ui/notifications/tool-input\"),params:p.object({arguments:p.record(p.string(),p.unknown().describe(\"Complete tool call arguments as key-value pairs.\")).optional().describe(\"Complete tool call arguments as key-value pairs.\")})}),X4=p.object({method:p.literal(\"ui/notifications/tool-input-partial\"),params:p.object({arguments:p.record(p.string(),p.unknown().describe(\"Partial tool call arguments (incomplete, may change).\")).optional().describe(\"Partial tool call arguments (incomplete, may change).\")})}),Q4=p.object({method:p.literal(\"ui/notifications/tool-cancelled\"),params:p.object({reason:p.string().optional().describe('Optional reason for the cancellation (e.g., \"user action\", \"timeout\").')})}),e1=p.object({fonts:p.string().optional()}),t1=p.object({variables:H4.optional().describe(\"CSS variables for theming the app.\"),css:e1.optional().describe(\"CSS blocks that apps can inject.\")}),r1=p.object({method:p.literal(\"ui/resource-teardown\"),params:p.object({})}),n1=p.record(p.string(),p.unknown()),z0=p.object({text:p.object({}).optional().describe(\"Host supports text content blocks.\"),image:p.object({}).optional().describe(\"Host supports image content blocks.\"),audio:p.object({}).optional().describe(\"Host supports audio content blocks.\"),resource:p.object({}).optional().describe(\"Host supports resource content blocks.\"),resourceLink:p.object({}).optional().describe(\"Host supports resource link content blocks.\"),structuredContent:p.object({}).optional().describe(\"Host supports structured content.\")}),QV=p.object({method:p.literal(\"ui/notifications/request-teardown\"),params:p.object({}).optional()}),o1=p.object({experimental:p.record(p.string(),p.record(p.string(),p.any()).describe(\"Experimental features keyed by identifier.\")).optional().describe(\"Experimental features keyed by identifier.\"),openLinks:p.object({}).optional().describe(\"Host supports opening external URLs.\"),downloadFile:p.object({}).optional().describe(\"Host supports file downloads via ui/download-file.\"),serverTools:p.object({listChanged:p.boolean().optional().describe(\"Host supports tools/list_changed notifications.\")}).optional().describe(\"Host can proxy tool calls to the MCP server.\"),serverResources:p.object({listChanged:p.boolean().optional().describe(\"Host supports resources/list_changed notifications.\")}).optional().describe(\"Host can proxy resource reads to the MCP server.\"),logging:p.object({}).optional().describe(\"Host accepts log messages.\"),sandbox:p.object({permissions:sy.optional().describe(\"Permissions granted by the host (camera, microphone, geolocation).\"),csp:iy.optional().describe(\"CSP domains approved by the host.\")}).optional().describe(\"Sandbox configuration applied by the host.\"),updateModelContext:z0.optional().describe(\"Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.\"),message:z0.optional().describe(\"Host supports receiving content messages (ui/message) from the view.\"),sampling:p.object({tools:p.object({}).optional().describe(\"Host supports tool use via `tools` and `toolChoice` parameters.\")}).optional().describe(\"Host supports LLM sampling (sampling/createMessage) from the view.\\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.\")}),i1=p.object({experimental:p.record(p.string(),p.record(p.string(),p.any()).describe(\"Experimental features keyed by identifier.\")).optional().describe(\"Experimental features keyed by identifier.\"),tools:p.object({listChanged:p.boolean().optional().describe(\"App supports tools/list_changed notifications.\")}).optional().describe(\"App exposes MCP-style tools that the host can call.\"),availableDisplayModes:p.array(lu).optional().describe(\"Display modes the app supports.\")}),e9=p.object({method:p.literal(\"ui/notifications/initialized\"),params:p.object({}).optional()}),t9=p.object({csp:iy.optional().describe(\"Content Security Policy configuration for UI resources.\"),permissions:sy.optional().describe(\"Sandbox permissions requested by the UI resource.\"),domain:p.string().optional().describe(`Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., \\`{hash}.claudemcpcontent.com\\`)\n- URL-derived subdomains (e.g., \\`www-example-com.oaiusercontent.com\\`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:p.boolean().optional().describe(`Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.\n\n- \\`true\\`: request visible border + background\n- \\`false\\`: request no visible border + background\n- omitted: host decides border`)}),r9=p.object({method:p.literal(\"ui/request-display-mode\"),params:p.object({mode:lu.describe(\"The display mode being requested.\")})}),s1=p.object({mode:lu.describe(\"The display mode that was actually set. May differ from requested if not supported.\")}).passthrough(),a1=p.union([p.literal(\"model\"),p.literal(\"app\")]).describe(\"Tool visibility scope - who can access the tool.\"),n9=p.object({resourceUri:p.string().optional(),visibility:p.array(a1).optional().describe(`Who can access this tool. Default: [\"model\", \"app\"]\n- \"model\": Tool visible to and callable by the agent\n- \"app\": Tool callable by the app from this server only`),csp:p.never().optional(),permissions:p.never().optional()}),o9=p.object({mimeTypes:p.array(p.string()).optional().describe('Array of supported MIME types for UI resources.\\nMust include `\"text/html;profile=mcp-app\"` for MCP Apps support.')}),i9=p.object({method:p.literal(\"ui/download-file\"),params:p.object({contents:p.array(p.union([un,ln])).describe(\"Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.\")})}),s9=p.object({method:p.literal(\"ui/message\"),params:p.object({role:p.literal(\"user\").describe('Message role, currently only \"user\" is supported.'),content:p.array(Ot).describe(\"Message content blocks (text, image, etc.).\")})}),a9=p.object({method:p.literal(\"ui/notifications/sandbox-resource-ready\"),params:p.object({html:p.string().describe(\"HTML content to load into the inner iframe.\"),sandbox:p.string().optional().describe(\"Optional override for the inner iframe's sandbox attribute.\"),csp:iy.optional().describe(\"CSP configuration from resource metadata.\"),permissions:sy.optional().describe(\"Sandbox permissions from resource metadata.\")})}),c1=p.object({method:p.literal(\"ui/notifications/tool-result\"),params:zr.describe(\"Standard MCP tool execution result.\")}),R0=p.object({toolInfo:p.object({id:xt.optional().describe(\"JSON-RPC id of the tools/call request.\"),tool:yr.describe(\"Tool definition including name, inputSchema, etc.\")}).optional().describe(\"Metadata of the tool call that instantiated this App.\"),theme:J4.optional().describe(\"Current color theme preference.\"),styles:t1.optional().describe(\"Style configuration for theming the app.\"),displayMode:lu.optional().describe(\"How the UI is currently displayed.\"),availableDisplayModes:p.array(lu).optional().describe(\"Display modes the host supports.\"),containerDimensions:p.union([p.object({height:p.number().describe(\"Fixed container height in pixels.\")}),p.object({maxHeight:p.union([p.number(),p.undefined()]).optional().describe(\"Maximum container height in pixels.\")})]).and(p.union([p.object({width:p.number().describe(\"Fixed container width in pixels.\")}),p.object({maxWidth:p.union([p.number(),p.undefined()]).optional().describe(\"Maximum container width in pixels.\")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:p.string().optional().describe(\"User's language and region preference in BCP 47 format.\"),timeZone:p.string().optional().describe(\"User's timezone in IANA format.\"),userAgent:p.string().optional().describe(\"Host application identifier.\"),platform:p.union([p.literal(\"web\"),p.literal(\"desktop\"),p.literal(\"mobile\")]).optional().describe(\"Platform type for responsive design decisions.\"),deviceCapabilities:p.object({touch:p.boolean().optional().describe(\"Whether the device supports touch input.\"),hover:p.boolean().optional().describe(\"Whether the device supports hover interactions.\")}).optional().describe(\"Device input capabilities.\"),safeAreaInsets:p.object({top:p.number().describe(\"Top safe area inset in pixels.\"),right:p.number().describe(\"Right safe area inset in pixels.\"),bottom:p.number().describe(\"Bottom safe area inset in pixels.\"),left:p.number().describe(\"Left safe area inset in pixels.\")}).optional().describe(\"Mobile safe area boundaries in pixels.\")}).passthrough(),u1=p.object({method:p.literal(\"ui/notifications/host-context-changed\"),params:R0.describe(\"Partial context update containing only changed fields.\")}),c9=p.object({method:p.literal(\"ui/update-model-context\"),params:p.object({content:p.array(Ot).optional().describe(\"Context content blocks (text, image, etc.).\"),structuredContent:p.record(p.string(),p.unknown().describe(\"Structured content for machine-readable context data.\")).optional().describe(\"Structured content for machine-readable context data.\")})}),u9=p.object({method:p.literal(\"ui/initialize\"),params:p.object({appInfo:Tt.describe(\"App identification (name and version).\"),appCapabilities:i1.describe(\"Features and capabilities this app provides.\"),protocolVersion:p.string().describe(\"Protocol version this app supports.\")})}),l1=p.object({protocolVersion:p.string().describe('Negotiated protocol version string (e.g., \"2025-11-21\").'),hostInfo:Tt.describe(\"Host application identification and version.\"),hostCapabilities:o1.describe(\"Features and capabilities provided by the host.\"),hostContext:R0.describe(\"Rich context about the host environment.\")}).passthrough(),d1={target:\"draft-2020-12\"};async function $0(e,t){let n=e[\"~standard\"];if(n.jsonSchema)return n.jsonSchema[t](d1);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function x0(e,t,n=\"\"){let o=await e[\"~standard\"].validate(t);if(o.issues){let r=o.issues.map((i)=>{let s=i.path?.map((a)=>typeof a===\"object\"?a.key:a).join(\".\");return s?`${s}: ${i.message}`:i.message}).join(\"; \");throw Error(n+r)}return o.value}function I0(e){let t=document.documentElement;t.setAttribute(\"data-theme\",e),t.style.colorScheme=e}function p1(e,t){let n={...e,...t};if(t.experimental!==void 0)n.experimental={...e.experimental,...t.experimental};if(t.tools!==void 0)n.tools={...e.tools,...t.tools};return n}class Pp extends sh{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new w0;_methods=new k0;setRequestHandler=(...e)=>{let[t,...n]=y0(\"request\",e)??e;this._methods.claim(t,\"setRequestHandler\"),super.setRequestHandler.call(this,t,...n)};setNotificationHandler=(...e)=>{let[t,...n]=y0(\"notification\",e)??e;this._methods.claim(t,\"setNotificationHandler\"),super.setNotificationHandler.call(this,t,...n)};removeRequestHandler=(e)=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=(e)=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Y4,toolinputpartial:X4,toolresult:c1,toolcancelled:Q4,hostcontextchanged:u1};static ONE_SHOT_EVENTS=new Set([\"toolinput\",\"toolinputpartial\",\"toolresult\",\"toolcancelled\"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!Pp.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e))return;if(this._everHadListener.add(e),!this._initializedSent)return;let t=`[ext-apps] \"${String(e)}\" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(t);console.warn(t)}setEventHandler(e,t){if(t)this._assertHandlerTiming(e);this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},(n)=>{let o=n;if(e===\"hostcontextchanged\")this._hostContext={...this._hostContext,...o};this._events.dispatch(e,o)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,n){if(t&&n)console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},n={autoResize:!0}){super(n);if(this._appInfo=e,this._appCapabilities=t,this.options=n,this._methods.replace(\"notifications/cancelled\"),this._methods.replace(\"notifications/progress\"),!n.allowUnsafeEval)p.config({jitless:!0});this.replaceRequestHandler(\"ping\",(o)=>(console.log(\"Received ping:\",o.params),{})),this.setEventHandler(\"hostcontextchanged\",void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error(\"Cannot register capabilities after transport is established\");this._appCapabilities=p1(this._appCapabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let o=this,r=()=>{if(o._initializedSent&&o._appCapabilities.tools?.listChanged)o.sendToolListChanged()},i=t.inputSchema!==void 0,s={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,r()},disable(){this.enabled=!1,r()},update(a){Object.assign(this,a),r()},remove(){if(o._registeredTools[e]!==s)return;delete o._registeredTools[e],r()},handler:async(a,c)=>{if(!s.enabled)throw Error(`Tool ${e} is disabled`);let u;if(i){let l=s.inputSchema,m=l?await x0(l,a??{},`Invalid input for tool ${e}: `):a??{};u=await n(m,c)}else u=await n(c);if(s.outputSchema&&!u.isError)u.structuredContent=await x0(s.outputSchema,u.structuredContent,`Invalid output for tool ${e}: `);return u}};if(this._registeredTools[e]=s,!this._appCapabilities.tools&&!this.transport)this.registerAppCapabilities({tools:{listChanged:!0}});return this.ensureToolHandlersInitialized(),r(),s}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){if(this._toolHandlersInitialized)return;this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([n,o])=>o.enabled).map(async([n,o])=>{let r={name:n,title:o.title,description:o.description,inputSchema:o.inputSchema?await $0(o.inputSchema,\"input\"):{type:\"object\",properties:{}}};if(o.outputSchema)r.outputSchema=await $0(o.outputSchema,\"output\");if(o.annotations)r.annotations=o.annotations;if(o._meta)r._meta=o._meta;return r}))})}async sendToolListChanged(e={}){this._assertInitialized(\"sendToolListChanged\"),await this.notification({method:\"notifications/tools/list_changed\",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(\"toolinput\")}set ontoolinput(e){this.setEventHandler(\"toolinput\",e)}get ontoolinputpartial(){return this.getEventHandler(\"toolinputpartial\")}set ontoolinputpartial(e){this.setEventHandler(\"toolinputpartial\",e)}get ontoolresult(){return this.getEventHandler(\"toolresult\")}set ontoolresult(e){this.setEventHandler(\"toolresult\",e)}get ontoolcancelled(){return this.getEventHandler(\"toolcancelled\")}set ontoolcancelled(e){this.setEventHandler(\"toolcancelled\",e)}get onhostcontextchanged(){return this.getEventHandler(\"hostcontextchanged\")}set onhostcontextchanged(e){this.setEventHandler(\"hostcontextchanged\",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(\"onteardown\",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(\"ui/resource-teardown\",{params:r1.shape.params,result:n1},(t,n)=>{if(!this._onteardown)throw Error(\"No onteardown handler set\");return this._onteardown(t,n)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(\"oncalltool\",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(\"tools/call\",(t,n)=>{if(!this._oncalltool)throw Error(\"No oncalltool handler set\");return this._oncalltool(t.params,n)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(\"onlisttools\",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(\"tools/list\",(t,n)=>{if(!this._onlisttools)throw Error(\"No onlisttools handler set\");return this._onlisttools(t.params,n)})}assertCapabilityForMethod(e){switch(e){case\"sampling/createMessage\":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case\"tools/call\":case\"tools/list\":if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized(\"callServerTool\"),typeof e===\"string\")throw Error(`callServerTool() expects an object as its first argument, but received a string (\"${e}\"). Did you mean: callServerTool({ name: \"${e}\", arguments: { ... } })?`);return await this.request({method:\"tools/call\",params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(\"readServerResource\"),await this.request({method:\"resources/read\",params:e},t)}async listServerResources(e,t){return this._assertInitialized(\"listServerResources\"),await this.request({method:\"resources/list\",params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized(\"createSamplingMessage\"),await this.request({method:\"sampling/createMessage\",params:e},t)}sendMessage(e,t){return this._assertInitialized(\"sendMessage\"),this.request({method:\"ui/message\",params:e},K4,t)}sendLog(e){return this.notification({method:\"notifications/message\",params:e})}updateModelContext(e,t){return this._assertInitialized(\"updateModelContext\"),this.request({method:\"ui/update-model-context\",params:e},Sr,t)}openLink(e,t){return this._assertInitialized(\"openLink\"),this.request({method:\"ui/open-link\",params:e},G4,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(\"downloadFile\"),this.request({method:\"ui/download-file\",params:e},W4,t)}requestTeardown(e={}){return this.notification({method:\"ui/notifications/request-teardown\",params:e})}requestDisplayMode(e,t){return this._assertInitialized(\"requestDisplayMode\"),this.request({method:\"ui/request-display-mode\",params:e},s1,t)}sendSizeChanged(e){return this.notification({method:\"ui/notifications/size-changed\",params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,o=()=>{if(e)return;e=!0,requestAnimationFrame(()=>{e=!1;let i=document.documentElement,s=i.style.height;i.style.height=\"max-content\";let a=Math.ceil(i.getBoundingClientRect().height);i.style.height=s;let c=Math.ceil(window.innerWidth);if(c!==t||a!==n)t=c,n=a,this.sendSizeChanged({width:c,height:a})})};o();let r=new ResizeObserver(o);return r.observe(document.documentElement),r.observe(document.body),()=>r.disconnect()}async connect(e=new P0(window.parent,window.parent),t){if(this.transport)throw Error(\"App is already connected. Call close() before connecting again.\");this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:\"ui/initialize\",params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:F4}},l1,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);if(this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:\"ui/notifications/initialized\"}),this._initializedSent=!0,this.options?.autoResize)this.setupSizeChangedNotifications()}catch(n){throw this.close(),n}}}var T0=document.getElementById(\"title\"),E0=document.getElementById(\"summary\"),Rp=document.getElementById(\"cues\"),O0=document.getElementById(\"status\"),j0=document.getElementById(\"open\"),du=new Pp({name:\"Cap recording card\",version:\"1.0.0\"}),N0=(e)=>{try{let t=new URL(e);return t.protocol===\"https:\"?t.toString():null}catch{return null}},m1=(e)=>{if(!T0||!E0||!Rp||!O0||!j0)return;T0.textContent=e.title,E0.textContent=e.summary??\"No summary available\",O0.textContent=e.transcriptStatus===\"disabled\"?\"Transcript disabled\":e.transcriptStatus===\"too_large\"?\"Transcript too large to display\":e.transcriptStatus===\"not_ready\"?\"Transcript not ready\":\"Transcript\",Rp.replaceChildren();for(let n of e.cues){let o=N0(n.url);if(!o)continue;let r=document.createElement(\"button\");r.type=\"button\",r.className=\"cue\";let i=document.createElement(\"strong\"),s=Math.floor(n.startMs/1000);i.textContent=`${Math.floor(s/60)}:${String(s%60).padStart(2,\"0\")}`;let a=document.createElement(\"span\");a.textContent=n.text,r.append(i,a),r.addEventListener(\"click\",()=>du.openLink({url:o})),Rp.append(r)}if(e.hasMoreCues){let n=document.createElement(\"p\");n.className=\"more\",n.textContent=\"More transcript moments are available in Cap.\",Rp.append(n)}let t=N0(e.url);if(t)j0.onclick=()=>{du.openLink({url:t})}};du.ontoolresult=(e)=>{let t=e.structuredContent;if(t&&typeof t.title===\"string\"&&typeof t.url===\"string\"&&Array.isArray(t.cues)&&typeof t.transcriptStatus===\"string\")m1(t)};du.onhostcontextchanged=(e)=>{if(e.theme)I0(e.theme)};du.connect();})();\n</script></body></html>"+ "html": "<!doctype html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><style>\n:root{color-scheme:light dark;font:14px -apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif}body{margin:0;background:Canvas;color:CanvasText}.card{padding:20px;max-width:680px}.brand{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#4f67d9}h1{font-size:21px;line-height:1.3;margin:8px 0 12px}h2{font-size:13px;margin:24px 0 10px}p{line-height:1.55}button{font:inherit;cursor:pointer}.open{background:#4f67d9;color:white;border:0;border-radius:8px;padding:9px 13px}.cue{display:flex;gap:14px;width:100%;padding:11px 0;text-align:left;color:inherit;background:transparent;border:0;border-top:1px solid #8885}.cue strong{min-width:42px;color:#4f67d9}.cue span{line-height:1.4}.more{font-size:12px;opacity:.7}\n</style></head><body><main class=\"card\"><div class=\"brand\">Cap</div><h1 id=\"title\">Recording</h1><p id=\"summary\">Loading recording context…</p><button class=\"open\" id=\"open\" type=\"button\">Open in Cap</button><h2 id=\"status\">Transcript</h2><div id=\"cues\"></div></main><script>(()=>{var{create:ok,defineProperty:Ba,getOwnPropertyDescriptor:nk,getOwnPropertyNames:sk,getPrototypeOf:ik}=Object,ak=Object.prototype.hasOwnProperty,Vd=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Jd=(e,t)=>{let r={};for(var o in e)Ba(r,o,{get:e[o],enumerable:!0});if(t)Ba(r,Symbol.toStringTag,{value:\"Module\"});return r},ck=(e,t,r,o)=>{if(t&&typeof t===\"object\"||typeof t===\"function\"){for(var n=sk(t),i=0,s=n.length,a;i<s;i++)if(a=n[i],!ak.call(e,a)&&a!==r)Ba(e,a,{get:((c)=>t[c]).bind(null,a),enumerable:!(o=nk(t,a))||o.enumerable})}return e},Hd=(e,t,r)=>(r=e!=null?ok(ik(e)):{},ck(t||!e||!e.__esModule?Ba(r,\"default\",{value:e,enumerable:!0}):r,e));var uk=new Set([\"https://json-schema.org/draft/2019-09/schema\",\"http://json-schema.org/draft/2019-09/schema\"]);function Bd(e){return typeof e===\"string\"&&uk.has(e.replace(/#$/,\"\"))}var Wd,Au=Object.freeze({status:\"aborted\"});function _(e,t,r){function o(a,c){if(!a._zod)Object.defineProperty(a,\"_zod\",{value:{def:c,constr:s,traits:new Set},enumerable:!1});if(a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=s.prototype,l=Object.keys(u);for(let m=0;m<l.length;m++){let h=l[m];if(!(h in a))a[h]=u[h].bind(a)}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,\"name\",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,\"init\",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:(a)=>{if(r?.Parent&&a instanceof r.Parent)return!0;return a?._zod?.traits?.has(e)}}),Object.defineProperty(s,\"name\",{value:e}),s}var lk=Symbol(\"zod_brand\");class $t extends Error{constructor(){super(\"Encountered Promise during synchronous parse. Use .parseAsync() instead.\")}}class Yn extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name=\"ZodEncodeError\"}}(Wd=globalThis).__zod_globalConfig??(Wd.__zod_globalConfig={});var So=globalThis.__zod_globalConfig;function Je(e){if(e)Object.assign(So,e);return So}function Ga(e){let t=Object.values(e).filter((o)=>typeof o===\"number\");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function Mu(e,t=\"|\"){return e.map((r)=>Du(r)).join(t)}function Qn(e,t){if(typeof t===\"bigint\")return t.toString();return t}function Xn(e){return{get value(){{let r=e();return Object.defineProperty(this,\"value\",{value:r}),r}throw Error(\"cached value already set\")}}}function Ka(e){return e===null||e===void 0}function Ya(e){let t=e.startsWith(\"^\")?1:0,r=e.endsWith(\"$\")?e.length-1:e.length;return e.slice(t,r)}function Kd(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);if(Math.abs(r-o)<n)return 0;return r-o}var Gd=Symbol(\"evaluating\");function H(e,t,r){let o=void 0;Object.defineProperty(e,t,{get(){if(o===Gd)return;if(o===void 0)o=Gd,o=r();return o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function wr(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Vt(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function qu(e){return JSON.stringify(e)}function Yd(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,\"\").replace(/[\\s_-]+/g,\"-\").replace(/^-+|-+$/g,\"\")}var Lu=\"captureStackTrace\"in Error?Error.captureStackTrace:(...e)=>{};function zo(e){return typeof e===\"object\"&&e!==null&&!Array.isArray(e)}var Qd=Xn(()=>{if(So.jitless)return!1;if(typeof navigator<\"u\"&&navigator?.userAgent?.includes(\"Cloudflare\"))return!1;try{return new Function(\"\"),!0}catch(e){return!1}});function $r(e){if(zo(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!==\"function\")return!0;let r=t.prototype;if(zo(r)===!1)return!1;if(Object.prototype.hasOwnProperty.call(r,\"isPrototypeOf\")===!1)return!1;return!0}function Uu(e){if($r(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}var Xd=new Set([\"string\",\"number\",\"symbol\"]);function Jt(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function it(e,t,r){let o=new e._zod.constr(t??e._zod.def);if(!t||r?.parent)o._zod.parent=e;return o}function O(e){let t=e;if(!t)return{};if(typeof t===\"string\")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error(\"Cannot specify both `message` and `error` params\");t.error=t.message}if(delete t.message,typeof t.error===\"string\")return{...t,error:()=>t.error};return t}function Du(e){if(typeof e===\"bigint\")return e.toString()+\"n\";if(typeof e===\"string\")return`\"${e}\"`;return`${e}`}function em(e){return Object.keys(e).filter((t)=>e[t]._zod.optin===\"optional\"&&e[t]._zod.optout===\"optional\")}var tm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function pk(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw Error(\".pick() cannot be used on object schemas containing refinements\");let i=Vt(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: \"${a}\"`);if(!t[a])continue;s[a]=r.shape[a]}return wr(this,\"shape\",s),s},checks:[]});return it(e,i)}function dk(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw Error(\".omit() cannot be used on object schemas containing refinements\");let i=Vt(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: \"${a}\"`);if(!t[a])continue;delete s[a]}return wr(this,\"shape\",s),s},checks:[]});return it(e,i)}function mk(e,t){if(!$r(t))throw Error(\"Invalid input to extend: expected a plain object\");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\")}let n=Vt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return wr(this,\"shape\",i),i}});return it(e,n)}function hk(e,t){if(!$r(t))throw Error(\"Invalid input to safeExtend: expected a plain object\");let r=Vt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return wr(this,\"shape\",o),o}});return it(e,r)}function fk(e,t){if(e._zod.def.checks?.length)throw Error(\".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.\");let r=Vt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return wr(this,\"shape\",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return it(e,r)}function gk(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw Error(\".partial() cannot be used on object schemas containing refinements\");let s=Vt(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let u in r){if(!(u in a))throw Error(`Unrecognized key: \"${u}\"`);if(!r[u])continue;c[u]=e?new e({type:\"optional\",innerType:a[u]}):a[u]}else for(let u in a)c[u]=e?new e({type:\"optional\",innerType:a[u]}):a[u];return wr(this,\"shape\",c),c},checks:[]});return it(t,s)}function _k(e,t,r){let o=Vt(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw Error(`Unrecognized key: \"${s}\"`);if(!r[s])continue;i[s]=new e({type:\"nonoptional\",innerType:n[s]})}else for(let s in n)i[s]=new e({type:\"nonoptional\",innerType:n[s]});return wr(this,\"shape\",i),i}});return it(t,o)}function kr(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function rm(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Ht(e,t){return t.map((r)=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Wa(e){return typeof e===\"string\"?e:e?.message}function at(e,t,r){let o=e.message?e.message:Wa(e.inst?._zod.def?.error?.(e))??Wa(t?.error?.(e))??Wa(r.customError?.(e))??Wa(r.localeError?.(e))??\"Invalid input\",{inst:n,continue:i,input:s,...a}=e;if(a.path??(a.path=[]),a.message=o,t?.reportInput)a.input=s;return a}function Qa(e){if(Array.isArray(e))return\"array\";if(typeof e===\"string\")return\"string\";return\"unknown\"}function om(e){let t=typeof e;switch(t){case\"number\":return Number.isNaN(e)?\"nan\":\"number\";case\"object\":{if(e===null)return\"null\";if(Array.isArray(e))return\"array\";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&\"constructor\"in r&&r.constructor)return r.constructor.name}}return t}function Rr(...e){let[t,r,o]=e;if(typeof t===\"string\")return{message:t,code:\"custom\",input:r,inst:o};return{...t}}var nm=(e,t)=>{e.name=\"$ZodError\",Object.defineProperty(e,\"_zod\",{value:e._zod,enumerable:!1}),Object.defineProperty(e,\"issues\",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Qn,2),Object.defineProperty(e,\"toString\",{value:()=>e.message,enumerable:!1})},Xa=_(\"$ZodError\",nm),Fu=_(\"$ZodError\",nm,{Parent:Error});function Vu(e,t=(r)=>r.message){let r={},o=[];for(let n of e.issues)if(n.path.length>0)r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n));else o.push(t(n));return{formErrors:o,fieldErrors:r}}function Ju(e,t=(r)=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let s of n.issues)if(s.code===\"invalid_union\"&&s.errors.length)s.errors.map((a)=>o({issues:a},[...i,...s.path]));else if(s.code===\"invalid_key\")o({issues:s.issues},[...i,...s.path]);else if(s.code===\"invalid_element\")o({issues:s.issues},[...i,...s.path]);else{let a=[...i,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,u=0;while(u<a.length){let l=a[u];if(u!==a.length-1)c[l]=c[l]||{_errors:[]};else c[l]=c[l]||{_errors:[]},c[l]._errors.push(t(s));c=c[l],u++}}}};return o(e),r}var ec=(e)=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new $t;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map((c)=>at(c,i,Je())));throw Lu(a,n?.callee),a}return s.value};var tc=(e)=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)s=await s;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map((c)=>at(c,i,Je())));throw Lu(a,n?.callee),a}return s.value};var es=(e)=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new $t;return i.issues.length?{success:!1,error:new(e??Xa)(i.issues.map((s)=>at(s,n,Je())))}:{success:!0,data:i.value}},sm=es(Fu),ts=(e)=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)i=await i;return i.issues.length?{success:!1,error:new e(i.issues.map((s)=>at(s,n,Je())))}:{success:!0,data:i.value}},im=ts(Fu),am=(e)=>(t,r,o)=>{let n=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return ec(e)(t,r,n)};var cm=(e)=>(t,r,o)=>ec(e)(t,r,o);var um=(e)=>async(t,r,o)=>{let n=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return tc(e)(t,r,n)};var lm=(e)=>async(t,r,o)=>tc(e)(t,r,o);var pm=(e)=>(t,r,o)=>{let n=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return es(e)(t,r,n)};var dm=(e)=>(t,r,o)=>es(e)(t,r,o);var mm=(e)=>async(t,r,o)=>{let n=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return ts(e)(t,r,n)};var hm=(e)=>async(t,r,o)=>ts(e)(t,r,o);var fm=/^[cC][0-9a-z]{6,}$/,gm=/^[0-9a-z]+$/,_m=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Sm=/^[0-9a-vA-V]{20}$/,zm=/^[A-Za-z0-9]{27}$/,bm=/^[a-zA-Z0-9_-]{21}$/,ym=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;var vm=/^([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})$/,Hu=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var xm=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;var zk=\"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\";function wm(){return new RegExp(zk,\"u\")}var $m=/^(?:(?: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])$/,km=/^(([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}|:))$/;var Rm=/^((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])$/,Pm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Tm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Bu=/^[A-Za-z0-9_-]*$/;var Em=/^https?$/,Im=/^\\+[1-9]\\d{6,14}$/,Om=\"(?:(?:\\\\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])))\",Cm=new RegExp(`^${Om}$`);function Zm(e){return typeof e.precision===\"number\"?e.precision===-1?\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d\":e.precision===0?\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\":`(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?\"}function Nm(e){return new RegExp(`^${Zm(e)}$`)}function Am(e){let t=Zm({precision:e.precision}),r=[\"Z\"];if(e.local)r.push(\"\");if(e.offset)r.push(\"([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)\");let o=`${t}(?:${r.join(\"|\")})`;return new RegExp(`^${Om}T(?:${o})$`)}var jm=(e)=>{let t=e?`[\\\\s\\\\S]{${e?.minimum??0},${e?.maximum??\"\"}}`:\"[\\\\s\\\\S]*\";return new RegExp(`^${t}$`)};var Mm=/^-?\\d+$/,Wu=/^-?\\d+(?:\\.\\d+)?$/,qm=/^(?:true|false)$/i,Lm=/^null$/i;var Um=/^[^A-Z]*$/,Dm=/^[^a-z]*$/;var Te=_(\"$ZodCheck\",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Fm={number:\"number\",bigint:\"bigint\",object:\"date\"},Gu=_(\"$ZodCheckLessThan\",(e,t)=>{Te.init(e,t);let r=Fm[typeof t.value];e._zod.onattach.push((o)=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<i)if(t.inclusive)n.maximum=t.value;else n.exclusiveMaximum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value<=t.value:o.value<t.value)return;o.issues.push({origin:r,code:\"too_big\",maximum:typeof t.value===\"object\"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ku=_(\"$ZodCheckGreaterThan\",(e,t)=>{Te.init(e,t);let r=Fm[typeof t.value];e._zod.onattach.push((o)=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>i)if(t.inclusive)n.minimum=t.value;else n.exclusiveMinimum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value>=t.value:o.value>t.value)return;o.issues.push({origin:r,code:\"too_small\",minimum:typeof t.value===\"object\"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Vm=_(\"$ZodCheckMultipleOf\",(e,t)=>{Te.init(e,t),e._zod.onattach.push((r)=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=(r)=>{if(typeof r.value!==typeof t.value)throw Error(\"Cannot mix number and bigint in multiple_of check.\");if(typeof r.value===\"bigint\"?r.value%t.value===BigInt(0):Kd(r.value,t.value)===0)return;r.issues.push({origin:typeof r.value,code:\"not_multiple_of\",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Jm=_(\"$ZodCheckNumberFormat\",(e,t)=>{Te.init(e,t),t.format=t.format||\"float64\";let r=t.format?.includes(\"int\"),o=r?\"int\":\"number\",[n,i]=tm[t.format];e._zod.onattach.push((s)=>{let a=s._zod.bag;if(a.format=t.format,a.minimum=n,a.maximum=i,r)a.pattern=Mm}),e._zod.check=(s)=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:\"invalid_type\",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)s.issues.push({input:a,code:\"too_big\",maximum:Number.MAX_SAFE_INTEGER,note:\"Integers must be within the safe integer range.\",inst:e,origin:o,inclusive:!0,continue:!t.abort});else s.issues.push({input:a,code:\"too_small\",minimum:Number.MIN_SAFE_INTEGER,note:\"Integers must be within the safe integer range.\",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}if(a<n)s.issues.push({origin:\"number\",input:a,code:\"too_small\",minimum:n,inclusive:!0,inst:e,continue:!t.abort});if(a>i)s.issues.push({origin:\"number\",input:a,code:\"too_big\",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}});var Hm=_(\"$ZodCheckMaxLength\",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=(o)=>{let n=o.value;return!Ka(n)&&n.length!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<n)o._zod.bag.maximum=t.maximum}),e._zod.check=(o)=>{let n=o.value;if(n.length<=t.maximum)return;let s=Qa(n);o.issues.push({origin:s,code:\"too_big\",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Bm=_(\"$ZodCheckMinLength\",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=(o)=>{let n=o.value;return!Ka(n)&&n.length!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>n)o._zod.bag.minimum=t.minimum}),e._zod.check=(o)=>{let n=o.value;if(n.length>=t.minimum)return;let s=Qa(n);o.issues.push({origin:s,code:\"too_small\",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Wm=_(\"$ZodCheckLengthEquals\",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=(o)=>{let n=o.value;return!Ka(n)&&n.length!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=(o)=>{let n=o.value,i=n.length;if(i===t.length)return;let s=Qa(n),a=i>t.length;o.issues.push({origin:s,...a?{code:\"too_big\",maximum:t.length}:{code:\"too_small\",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),os=_(\"$ZodCheckStringFormat\",(e,t)=>{var r,o;if(Te.init(e,t),e._zod.onattach.push((n)=>{let i=n._zod.bag;if(i.format=t.format,t.pattern)i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern)}),t.pattern)(r=e._zod).check??(r.check=(n)=>{if(t.pattern.lastIndex=0,t.pattern.test(n.value))return;n.issues.push({origin:\"string\",code:\"invalid_format\",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(o=e._zod).check??(o.check=()=>{})}),Gm=_(\"$ZodCheckRegex\",(e,t)=>{os.init(e,t),e._zod.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:\"string\",code:\"invalid_format\",format:\"regex\",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Km=_(\"$ZodCheckLowerCase\",(e,t)=>{t.pattern??(t.pattern=Um),os.init(e,t)}),Ym=_(\"$ZodCheckUpperCase\",(e,t)=>{t.pattern??(t.pattern=Dm),os.init(e,t)}),Qm=_(\"$ZodCheckIncludes\",(e,t)=>{Te.init(e,t);let r=Jt(t.includes),o=new RegExp(typeof t.position===\"number\"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push((n)=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=(n)=>{if(n.value.includes(t.includes,t.position))return;n.issues.push({origin:\"string\",code:\"invalid_format\",format:\"includes\",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Xm=_(\"$ZodCheckStartsWith\",(e,t)=>{Te.init(e,t);let r=new RegExp(`^${Jt(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=(o)=>{if(o.value.startsWith(t.prefix))return;o.issues.push({origin:\"string\",code:\"invalid_format\",format:\"starts_with\",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),eh=_(\"$ZodCheckEndsWith\",(e,t)=>{Te.init(e,t);let r=new RegExp(`.*${Jt(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=(o)=>{if(o.value.endsWith(t.suffix))return;o.issues.push({origin:\"string\",code:\"invalid_format\",format:\"ends_with\",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});var th=_(\"$ZodCheckOverwrite\",(e,t)=>{Te.init(e,t),e._zod.check=(r)=>{r.value=t.tx(r.value)}});class Yu{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e===\"function\"){e(this,{execution:\"sync\"}),e(this,{execution:\"async\"});return}let r=e.split(`\n`).filter((i)=>i),o=Math.min(...r.map((i)=>i.length-i.trimStart().length)),n=r.map((i)=>i.slice(o)).map((i)=>\" \".repeat(this.indent*2)+i);for(let i of n)this.content.push(i)}compile(){let e=Function,t=this?.args,o=[...(this?.content??[\"\"]).map((n)=>` ${n}`)];return new e(...t,o.join(`\n`))}}var oh={major:4,minor:4,patch:3};var X=_(\"$ZodType\",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=oh;let o=[...e._zod.def.checks??[]];if(e._zod.traits.has(\"$ZodCheck\"))o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(s,a,c)=>{let u=kr(s),l;for(let m of a){if(m._zod.def.when){if(rm(s))continue;if(!m._zod.def.when(s))continue}else if(u)continue;let h=s.issues.length,f=m._zod.check(s);if(f instanceof Promise&&c?.async===!1)throw new $t;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{if(await f,s.issues.length===h)return;if(!u)u=kr(s,h)});else{if(s.issues.length===h)continue;if(!u)u=kr(s,h)}}if(l)return l.then(()=>s);return s},i=(s,a,c)=>{if(kr(s))return s.aborted=!0,s;let u=n(a,o,c);if(u instanceof Promise){if(c.async===!1)throw new $t;return u.then((l)=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction===\"backward\"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});if(u instanceof Promise)return u.then((l)=>i(l,s,a));return i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new $t;return c.then((u)=>n(u,o,a))}return n(c,o,a)}}H(e,\"~standard\",()=>({validate:(n)=>{try{let i=sm(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch(i){return im(e,n).then((s)=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:\"zod\",version:1}))}),nc=_(\"$ZodString\",(e,t)=>{X.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??jm(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch(n){}if(typeof r.value===\"string\")return r;return r.issues.push({expected:\"string\",code:\"invalid_type\",input:r.value,inst:e}),r}}),ae=_(\"$ZodStringFormat\",(e,t)=>{os.init(e,t),nc.init(e,t)}),dh=_(\"$ZodGUID\",(e,t)=>{t.pattern??(t.pattern=vm),ae.init(e,t)}),mh=_(\"$ZodUUID\",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw Error(`Invalid UUID version: \"${t.version}\"`);t.pattern??(t.pattern=Hu(o))}else t.pattern??(t.pattern=Hu());ae.init(e,t)}),hh=_(\"$ZodEmail\",(e,t)=>{t.pattern??(t.pattern=xm),ae.init(e,t)}),fh=_(\"$ZodURL\",(e,t)=>{ae.init(e,t),e._zod.check=(r)=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===Em.source){if(!/^https?:\\/\\//i.test(o)){r.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid URL format\",input:r.value,inst:e,continue:!t.abort});return}}let n=new URL(o);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(n.hostname))r.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid hostname\",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(n.protocol.endsWith(\":\")?n.protocol.slice(0,-1):n.protocol))r.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid protocol\",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})}if(t.normalize)r.value=n.href;else r.value=o;return}catch(o){r.issues.push({code:\"invalid_format\",format:\"url\",input:r.value,inst:e,continue:!t.abort})}}}),gh=_(\"$ZodEmoji\",(e,t)=>{t.pattern??(t.pattern=wm()),ae.init(e,t)}),_h=_(\"$ZodNanoID\",(e,t)=>{t.pattern??(t.pattern=bm),ae.init(e,t)}),Sh=_(\"$ZodCUID\",(e,t)=>{t.pattern??(t.pattern=fm),ae.init(e,t)}),zh=_(\"$ZodCUID2\",(e,t)=>{t.pattern??(t.pattern=gm),ae.init(e,t)}),bh=_(\"$ZodULID\",(e,t)=>{t.pattern??(t.pattern=_m),ae.init(e,t)}),yh=_(\"$ZodXID\",(e,t)=>{t.pattern??(t.pattern=Sm),ae.init(e,t)}),vh=_(\"$ZodKSUID\",(e,t)=>{t.pattern??(t.pattern=zm),ae.init(e,t)}),xh=_(\"$ZodISODateTime\",(e,t)=>{t.pattern??(t.pattern=Am(t)),ae.init(e,t)}),wh=_(\"$ZodISODate\",(e,t)=>{t.pattern??(t.pattern=Cm),ae.init(e,t)}),$h=_(\"$ZodISOTime\",(e,t)=>{t.pattern??(t.pattern=Nm(t)),ae.init(e,t)}),kh=_(\"$ZodISODuration\",(e,t)=>{t.pattern??(t.pattern=ym),ae.init(e,t)}),Rh=_(\"$ZodIPv4\",(e,t)=>{t.pattern??(t.pattern=$m),ae.init(e,t),e._zod.bag.format=\"ipv4\"}),Ph=_(\"$ZodIPv6\",(e,t)=>{t.pattern??(t.pattern=km),ae.init(e,t),e._zod.bag.format=\"ipv6\",e._zod.check=(r)=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:\"invalid_format\",format:\"ipv6\",input:r.value,inst:e,continue:!t.abort})}}});var Th=_(\"$ZodCIDRv4\",(e,t)=>{t.pattern??(t.pattern=Rm),ae.init(e,t)}),Eh=_(\"$ZodCIDRv6\",(e,t)=>{t.pattern??(t.pattern=Pm),ae.init(e,t),e._zod.check=(r)=>{let o=r.value.split(\"/\");try{if(o.length!==2)throw Error();let[n,i]=o;if(!i)throw Error();let s=Number(i);if(`${s}`!==i)throw Error();if(s<0||s>128)throw Error();new URL(`http://[${n}]`)}catch{r.issues.push({code:\"invalid_format\",format:\"cidrv6\",input:r.value,inst:e,continue:!t.abort})}}});function Ih(e){if(e===\"\")return!0;if(/\\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Oh=_(\"$ZodBase64\",(e,t)=>{t.pattern??(t.pattern=Tm),ae.init(e,t),e._zod.bag.contentEncoding=\"base64\",e._zod.check=(r)=>{if(Ih(r.value))return;r.issues.push({code:\"invalid_format\",format:\"base64\",input:r.value,inst:e,continue:!t.abort})}});function bk(e){if(!Bu.test(e))return!1;let t=e.replace(/[-_]/g,(o)=>o===\"-\"?\"+\":\"/\"),r=t.padEnd(Math.ceil(t.length/4)*4,\"=\");return Ih(r)}var Ch=_(\"$ZodBase64URL\",(e,t)=>{t.pattern??(t.pattern=Bu),ae.init(e,t),e._zod.bag.contentEncoding=\"base64url\",e._zod.check=(r)=>{if(bk(r.value))return;r.issues.push({code:\"invalid_format\",format:\"base64url\",input:r.value,inst:e,continue:!t.abort})}}),Zh=_(\"$ZodE164\",(e,t)=>{t.pattern??(t.pattern=Im),ae.init(e,t)});function yk(e,t=null){try{let r=e.split(\".\");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));if(\"typ\"in n&&n?.typ!==\"JWT\")return!1;if(!n.alg)return!1;if(t&&(!(\"alg\"in n)||n.alg!==t))return!1;return!0}catch{return!1}}var Nh=_(\"$ZodJWT\",(e,t)=>{ae.init(e,t),e._zod.check=(r)=>{if(yk(r.value,t.alg))return;r.issues.push({code:\"invalid_format\",format:\"jwt\",input:r.value,inst:e,continue:!t.abort})}});var Xu=_(\"$ZodNumber\",(e,t)=>{X.init(e,t),e._zod.pattern=e._zod.bag.pattern??Wu,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch(s){}let n=r.value;if(typeof n===\"number\"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n===\"number\"?Number.isNaN(n)?\"NaN\":!Number.isFinite(n)?\"Infinity\":void 0:void 0;return r.issues.push({expected:\"number\",code:\"invalid_type\",input:n,inst:e,...i?{received:i}:{}}),r}}),Ah=_(\"$ZodNumberFormat\",(e,t)=>{Jm.init(e,t),Xu.init(e,t)}),jh=_(\"$ZodBoolean\",(e,t)=>{X.init(e,t),e._zod.pattern=qm,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Boolean(r.value)}catch(i){}let n=r.value;if(typeof n===\"boolean\")return r;return r.issues.push({expected:\"boolean\",code:\"invalid_type\",input:n,inst:e}),r}});var Mh=_(\"$ZodNull\",(e,t)=>{X.init(e,t),e._zod.pattern=Lm,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;if(n===null)return r;return r.issues.push({expected:\"null\",code:\"invalid_type\",input:n,inst:e}),r}}),qh=_(\"$ZodAny\",(e,t)=>{X.init(e,t),e._zod.parse=(r)=>r}),Lh=_(\"$ZodUnknown\",(e,t)=>{X.init(e,t),e._zod.parse=(r)=>r}),Uh=_(\"$ZodNever\",(e,t)=>{X.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:\"never\",code:\"invalid_type\",input:r.value,inst:e}),r)});function nh(e,t,r){if(e.issues.length)t.issues.push(...Ht(r,e.issues));t.value[r]=e.value}var Dh=_(\"$ZodArray\",(e,t)=>{X.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:\"array\",code:\"invalid_type\",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);if(c instanceof Promise)i.push(c.then((u)=>nh(u,r,s)));else nh(c,r,s)}if(i.length)return Promise.all(i).then(()=>r);return r}});function oc(e,t,r,o,n,i){let s=r in o;if(e.issues.length){if(n&&i&&!s)return;t.issues.push(...Ht(r,e.issues))}if(!s&&!n){if(!e.issues.length)t.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:void 0,path:[r]});return}if(e.value===void 0){if(s)t.value[r]=void 0}else t.value[r]=e.value}function Fh(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has(\"$ZodType\"))throw Error(`Invalid element at key \"${o}\": expected a Zod schema`);let r=em(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Vh(e,t,r,o,n,i){let s=[],a=n.keySet,c=n.catchall._zod,u=c.def.type,l=c.optin===\"optional\",m=c.optout===\"optional\";for(let h in t){if(h===\"__proto__\")continue;if(a.has(h))continue;if(u===\"never\"){s.push(h);continue}let f=c.run({value:t[h],issues:[]},o);if(f instanceof Promise)e.push(f.then((b)=>oc(b,r,h,t,l,m)));else oc(f,r,h,t,l,m)}if(s.length)r.issues.push({code:\"unrecognized_keys\",keys:s,input:t,inst:i});if(!e.length)return r;return Promise.all(e).then(()=>r)}var vk=_(\"$ZodObject\",(e,t)=>{if(X.init(e,t),!Object.getOwnPropertyDescriptor(t,\"shape\")?.get){let a=t.shape;Object.defineProperty(t,\"shape\",{get:()=>{let c={...a};return Object.defineProperty(t,\"shape\",{value:c}),c}})}let o=Xn(()=>Fh(t));H(e._zod,\"propValues\",()=>{let a=t.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let m of l.values)c[u].add(m)}}return c});let n=zo,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!n(u))return a.issues.push({expected:\"object\",code:\"invalid_type\",input:u,inst:e}),a;a.value={};let l=[],m=s.shape;for(let h of s.keys){let f=m[h],b=f._zod.optin===\"optional\",I=f._zod.optout===\"optional\",x=f._zod.run({value:u[h],issues:[]},c);if(x instanceof Promise)l.push(x.then((J)=>oc(J,a,h,u,b,I)));else oc(x,a,h,u,b,I)}if(!i)return l.length?Promise.all(l).then(()=>a):a;return Vh(l,u,a,c,o.value,e)}}),Jh=_(\"$ZodObjectJIT\",(e,t)=>{vk.init(e,t);let r=e._zod.parse,o=Xn(()=>Fh(t)),n=(h)=>{let f=new Yu([\"shape\",\"payload\",\"ctx\"]),b=o.value,I=(M)=>{let k=qu(M);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};f.write(\"const input = payload.value;\");let x=Object.create(null),J=0;for(let M of b.keys)x[M]=`key_${J++}`;f.write(\"const newResult = {};\");for(let M of b.keys){let k=x[M],N=qu(M),K=h[M],de=K?._zod?.optin===\"optional\",Be=K?._zod?.optout===\"optional\";if(f.write(`const ${k} = ${I(M)};`),de&&Be)f.write(`\n if (${k}.issues.length) {\n if (${N} in input) {\n payload.issues = payload.issues.concat(${k}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${N}, ...iss.path] : [${N}]\n })));\n }\n }\n \n if (${k}.value === undefined) {\n if (${N} in input) {\n newResult[${N}] = undefined;\n }\n } else {\n newResult[${N}] = ${k}.value;\n }\n \n `);else if(!de)f.write(`\n const ${k}_present = ${N} in input;\n if (${k}.issues.length) {\n payload.issues = payload.issues.concat(${k}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${N}, ...iss.path] : [${N}]\n })));\n }\n if (!${k}_present && !${k}.issues.length) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [${N}]\n });\n }\n\n if (${k}_present) {\n if (${k}.value === undefined) {\n newResult[${N}] = undefined;\n } else {\n newResult[${N}] = ${k}.value;\n }\n }\n\n `);else f.write(`\n if (${k}.issues.length) {\n payload.issues = payload.issues.concat(${k}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${N}, ...iss.path] : [${N}]\n })));\n }\n \n if (${k}.value === undefined) {\n if (${N} in input) {\n newResult[${N}] = undefined;\n }\n } else {\n newResult[${N}] = ${k}.value;\n }\n \n `)}f.write(\"payload.value = newResult;\"),f.write(\"return payload;\");let re=f.compile();return(M,k)=>re(h,M,k)},i,s=zo,a=!So.jitless,u=a&&Qd.value,l=t.catchall,m;e._zod.parse=(h,f)=>{m??(m=o.value);let b=h.value;if(!s(b))return h.issues.push({expected:\"object\",code:\"invalid_type\",input:b,inst:e}),h;if(a&&u&&f?.async===!1&&f.jitless!==!0){if(!i)i=n(t.shape);if(h=i(h,f),!l)return h;return Vh([],b,h,f,m,e)}return r(h,f)}});function sh(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter((i)=>!kr(i));if(n.length===1)return t.value=n[0].value,n[0];return t.issues.push({code:\"invalid_union\",input:t.value,inst:r,errors:e.map((i)=>i.issues.map((s)=>at(s,o,Je())))}),t}var el=_(\"$ZodUnion\",(e,t)=>{X.init(e,t),H(e._zod,\"optin\",()=>t.options.some((o)=>o._zod.optin===\"optional\")?\"optional\":void 0),H(e._zod,\"optout\",()=>t.options.some((o)=>o._zod.optout===\"optional\")?\"optional\":void 0),H(e._zod,\"values\",()=>{if(t.options.every((o)=>o._zod.values))return new Set(t.options.flatMap((o)=>Array.from(o._zod.values)));return}),H(e._zod,\"pattern\",()=>{if(t.options.every((o)=>o._zod.pattern)){let o=t.options.map((n)=>n._zod.pattern);return new RegExp(`^(${o.map((n)=>Ya(n.source)).join(\"|\")})$`)}return});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},n);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}if(!i)return sh(s,o,e,n);return Promise.all(s).then((a)=>sh(a,o,e,n))}});var Hh=_(\"$ZodDiscriminatedUnion\",(e,t)=>{t.inclusive=!1,el.init(e,t);let r=e._zod.parse;H(e._zod,\"propValues\",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw Error(`Invalid discriminated union option at index \"${t.options.indexOf(i)}\"`);for(let[a,c]of Object.entries(s)){if(!n[a])n[a]=new Set;for(let u of c)n[a].add(u)}}return n});let o=Xn(()=>{let n=t.options,i=new Map;for(let s of n){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw Error(`Invalid discriminated union option at index \"${t.options.indexOf(s)}\"`);for(let c of a){if(i.has(c))throw Error(`Duplicate discriminator value \"${String(c)}\"`);i.set(c,s)}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!zo(s))return n.issues.push({code:\"invalid_type\",expected:\"object\",input:s,inst:e}),n;let a=o.value.get(s?.[t.discriminator]);if(a)return a._zod.run(n,i);if(t.unionFallback||i.direction===\"backward\")return r(n,i);return n.issues.push({code:\"invalid_union\",errors:[],note:\"No matching discriminator\",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),n}}),Bh=_(\"$ZodIntersection\",(e,t)=>{X.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);if(i instanceof Promise||s instanceof Promise)return Promise.all([i,s]).then(([c,u])=>ih(r,c,u));return ih(r,i,s)}});function Qu(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if($r(e)&&$r(t)){let r=Object.keys(t),o=Object.keys(e).filter((i)=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=Qu(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=Qu(n,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function ih(e,t,r){let o=new Map,n;for(let a of t.issues)if(a.code===\"unrecognized_keys\"){n??(n=a);for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).l=!0}}else e.issues.push(a);for(let a of r.issues)if(a.code===\"unrecognized_keys\")for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).r=!0}else e.issues.push(a);let i=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&n)e.issues.push({...n,keys:i});if(kr(e))return e;let s=Qu(t.value,r.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var Wh=_(\"$ZodRecord\",(e,t)=>{X.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!$r(n))return r.issues.push({expected:\"record\",code:\"invalid_type\",input:n,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let a=new Set;for(let u of s)if(typeof u===\"string\"||typeof u===\"number\"||typeof u===\"symbol\"){a.add(typeof u===\"number\"?u.toString():u);let l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(l.issues.length){r.issues.push({code:\"invalid_key\",origin:\"record\",issues:l.issues.map((f)=>at(f,o,Je())),input:u,path:[u],inst:e});continue}let m=l.value,h=t.valueType._zod.run({value:n[u],issues:[]},o);if(h instanceof Promise)i.push(h.then((f)=>{if(f.issues.length)r.issues.push(...Ht(u,f.issues));r.value[m]=f.value}));else{if(h.issues.length)r.issues.push(...Ht(u,h.issues));r.value[m]=h.value}}let c;for(let u in n)if(!a.has(u))c=c??[],c.push(u);if(c&&c.length>0)r.issues.push({code:\"unrecognized_keys\",input:n,inst:e,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(n)){if(a===\"__proto__\")continue;if(!Object.prototype.propertyIsEnumerable.call(n,a))continue;let c=t.keyType._zod.run({value:a,issues:[]},o);if(c instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(typeof a===\"string\"&&Wu.test(a)&&c.issues.length){let m=t.keyType._zod.run({value:Number(a),issues:[]},o);if(m instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(m.issues.length===0)c=m}if(c.issues.length){if(t.mode===\"loose\")r.value[a]=n[a];else r.issues.push({code:\"invalid_key\",origin:\"record\",issues:c.issues.map((m)=>at(m,o,Je())),input:a,path:[a],inst:e});continue}let l=t.valueType._zod.run({value:n[a],issues:[]},o);if(l instanceof Promise)i.push(l.then((m)=>{if(m.issues.length)r.issues.push(...Ht(a,m.issues));r.value[c.value]=m.value}));else{if(l.issues.length)r.issues.push(...Ht(a,l.issues));r.value[c.value]=l.value}}}if(i.length)return Promise.all(i).then(()=>r);return r}});var Gh=_(\"$ZodEnum\",(e,t)=>{X.init(e,t);let r=Ga(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter((n)=>Xd.has(typeof n)).map((n)=>typeof n===\"string\"?Jt(n):n.toString()).join(\"|\")})$`),e._zod.parse=(n,i)=>{let s=n.value;if(o.has(s))return n;return n.issues.push({code:\"invalid_value\",values:r,input:s,inst:e}),n}}),Kh=_(\"$ZodLiteral\",(e,t)=>{if(X.init(e,t),t.values.length===0)throw Error(\"Cannot create literal schema with no valid values\");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map((o)=>typeof o===\"string\"?Jt(o):o?Jt(o.toString()):String(o)).join(\"|\")})$`),e._zod.parse=(o,n)=>{let i=o.value;if(r.has(i))return o;return o.issues.push({code:\"invalid_value\",values:t.values,input:i,inst:e}),o}});var Yh=_(\"$ZodTransform\",(e,t)=>{X.init(e,t),e._zod.optin=\"optional\",e._zod.parse=(r,o)=>{if(o.direction===\"backward\")throw new Yn(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then((s)=>(r.value=s,r.fallback=!0,r));if(n instanceof Promise)throw new $t;return r.value=n,r.fallback=!0,r}});function ah(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var tl=_(\"$ZodOptional\",(e,t)=>{X.init(e,t),e._zod.optin=\"optional\",e._zod.optout=\"optional\",H(e._zod,\"values\",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),H(e._zod,\"pattern\",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ya(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin===\"optional\"){let n=r.value,i=t.innerType._zod.run(r,o);if(i instanceof Promise)return i.then((s)=>ah(s,n));return ah(i,n)}if(r.value===void 0)return r;return t.innerType._zod.run(r,o)}}),Qh=_(\"$ZodExactOptional\",(e,t)=>{tl.init(e,t),H(e._zod,\"values\",()=>t.innerType._zod.values),H(e._zod,\"pattern\",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),Xh=_(\"$ZodNullable\",(e,t)=>{X.init(e,t),H(e._zod,\"optin\",()=>t.innerType._zod.optin),H(e._zod,\"optout\",()=>t.innerType._zod.optout),H(e._zod,\"pattern\",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ya(r.source)}|null)$`):void 0}),H(e._zod,\"values\",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>{if(r.value===null)return r;return t.innerType._zod.run(r,o)}}),ef=_(\"$ZodDefault\",(e,t)=>{X.init(e,t),e._zod.optin=\"optional\",H(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>ch(i,t));return ch(n,t)}});function ch(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var tf=_(\"$ZodPrefault\",(e,t)=>{X.init(e,t),e._zod.optin=\"optional\",H(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(r,o);if(r.value===void 0)r.value=t.defaultValue;return t.innerType._zod.run(r,o)}}),rf=_(\"$ZodNonOptional\",(e,t)=>{X.init(e,t),H(e._zod,\"values\",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter((o)=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>uh(i,e));return uh(n,e)}});function uh(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:e.value,inst:t});return e}var of=_(\"$ZodCatch\",(e,t)=>{X.init(e,t),e._zod.optin=\"optional\",H(e._zod,\"optout\",()=>t.innerType._zod.optout),H(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>{if(r.value=i.value,i.issues.length)r.value=t.catchValue({...r,error:{issues:i.issues.map((s)=>at(s,o,Je()))},input:r.value}),r.issues=[],r.fallback=!0;return r});if(r.value=n.value,n.issues.length)r.value=t.catchValue({...r,error:{issues:n.issues.map((i)=>at(i,o,Je()))},input:r.value}),r.issues=[],r.fallback=!0;return r}});var rl=_(\"$ZodPipe\",(e,t)=>{X.init(e,t),H(e._zod,\"values\",()=>t.in._zod.values),H(e._zod,\"optin\",()=>t.in._zod.optin),H(e._zod,\"optout\",()=>t.out._zod.optout),H(e._zod,\"propValues\",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction===\"backward\"){let i=t.out._zod.run(r,o);if(i instanceof Promise)return i.then((s)=>rc(s,t.in,o));return rc(i,t.in,o)}let n=t.in._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>rc(i,t.out,o));return rc(n,t.out,o)}});function rc(e,t,r){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var nf=_(\"$ZodPreprocess\",(e,t)=>{rl.init(e,t)}),sf=_(\"$ZodReadonly\",(e,t)=>{X.init(e,t),H(e._zod,\"propValues\",()=>t.innerType._zod.propValues),H(e._zod,\"values\",()=>t.innerType._zod.values),H(e._zod,\"optin\",()=>t.innerType?._zod?.optin),H(e._zod,\"optout\",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then(lh);return lh(n)}});function lh(e){return e.value=Object.freeze(e.value),e}var af=_(\"$ZodLazy\",(e,t)=>{X.init(e,t),H(e._zod,\"innerType\",()=>{let r=t;if(!r._cachedInner)r._cachedInner=t.getter();return r._cachedInner}),H(e._zod,\"pattern\",()=>e._zod.innerType?._zod?.pattern),H(e._zod,\"propValues\",()=>e._zod.innerType?._zod?.propValues),H(e._zod,\"optin\",()=>e._zod.innerType?._zod?.optin??void 0),H(e._zod,\"optout\",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),cf=_(\"$ZodCustom\",(e,t)=>{Te.init(e,t),X.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=(r)=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then((i)=>ph(i,r,o,e));ph(n,r,o,e);return}});function ph(e,t,r,o){if(!e){let n={code:\"custom\",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};if(o._zod.def.params)n.params=o._zod.def.params;t.issues.push(Rr(n))}}var xk=()=>{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\"}};function t(n){return e[n]??null}let r={regex:\"input\",email:\"email address\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO datetime\",date:\"ISO date\",time:\"ISO time\",duration:\"ISO duration\",ipv4:\"IPv4 address\",ipv6:\"IPv6 address\",mac:\"MAC address\",cidrv4:\"IPv4 range\",cidrv6:\"IPv6 range\",base64:\"base64-encoded string\",base64url:\"base64url-encoded string\",json_string:\"JSON string\",e164:\"E.164 number\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\"};return(n)=>{switch(n.code){case\"invalid_type\":{let i=o[n.expected]??n.expected,s=om(n.input),a=o[s]??s;return`Invalid input: expected ${i}, received ${a}`}case\"invalid_value\":if(n.values.length===1)return`Invalid input: expected ${Du(n.values[0])}`;return`Invalid option: expected one of ${Mu(n.values,\"|\")}`;case\"too_big\":{let i=n.inclusive?\"<=\":\"<\",s=t(n.origin);if(s)return`Too big: expected ${n.origin??\"value\"} to have ${i}${n.maximum.toString()} ${s.unit??\"elements\"}`;return`Too big: expected ${n.origin??\"value\"} to be ${i}${n.maximum.toString()}`}case\"too_small\":{let i=n.inclusive?\">=\":\">\",s=t(n.origin);if(s)return`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${s.unit}`;return`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case\"invalid_format\":{let i=n;if(i.format===\"starts_with\")return`Invalid string: must start with \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Invalid string: must end with \"${i.suffix}\"`;if(i.format===\"includes\")return`Invalid string: must include \"${i.includes}\"`;if(i.format===\"regex\")return`Invalid string: must match pattern ${i.pattern}`;return`Invalid ${r[i.format]??n.format}`}case\"not_multiple_of\":return`Invalid number: must be a multiple of ${n.divisor}`;case\"unrecognized_keys\":return`Unrecognized key${n.keys.length>1?\"s\":\"\"}: ${Mu(n.keys,\", \")}`;case\"invalid_key\":return`Invalid key in ${n.origin}`;case\"invalid_union\":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`Invalid discriminator value. Expected ${n.options.map((s)=>`'${s}'`).join(\" | \")}`;return\"Invalid input\";case\"invalid_element\":return`Invalid value in ${n.origin}`;default:return\"Invalid input\"}}};function ol(){return{localeError:xk()}}var uf,wk=Symbol(\"ZodOutput\"),$k=Symbol(\"ZodInput\");class lf{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];if(this._map.set(e,r),r&&typeof r===\"object\"&&\"id\"in r)this._idmap.set(r.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t===\"object\"&&\"id\"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let o={...r,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function pf(){return new lf}(uf=globalThis).__zod_globalRegistry??(uf.__zod_globalRegistry=pf());var Bt=globalThis.__zod_globalRegistry;function df(e,t){return new e({type:\"string\",...O(t)})}function mf(e,t){return new e({type:\"string\",format:\"email\",check:\"string_format\",abort:!1,...O(t)})}function nl(e,t){return new e({type:\"string\",format:\"guid\",check:\"string_format\",abort:!1,...O(t)})}function hf(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,...O(t)})}function ff(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v4\",...O(t)})}function gf(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v6\",...O(t)})}function _f(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v7\",...O(t)})}function sl(e,t){return new e({type:\"string\",format:\"url\",check:\"string_format\",abort:!1,...O(t)})}function Sf(e,t){return new e({type:\"string\",format:\"emoji\",check:\"string_format\",abort:!1,...O(t)})}function zf(e,t){return new e({type:\"string\",format:\"nanoid\",check:\"string_format\",abort:!1,...O(t)})}function bf(e,t){return new e({type:\"string\",format:\"cuid\",check:\"string_format\",abort:!1,...O(t)})}function yf(e,t){return new e({type:\"string\",format:\"cuid2\",check:\"string_format\",abort:!1,...O(t)})}function vf(e,t){return new e({type:\"string\",format:\"ulid\",check:\"string_format\",abort:!1,...O(t)})}function xf(e,t){return new e({type:\"string\",format:\"xid\",check:\"string_format\",abort:!1,...O(t)})}function wf(e,t){return new e({type:\"string\",format:\"ksuid\",check:\"string_format\",abort:!1,...O(t)})}function $f(e,t){return new e({type:\"string\",format:\"ipv4\",check:\"string_format\",abort:!1,...O(t)})}function kf(e,t){return new e({type:\"string\",format:\"ipv6\",check:\"string_format\",abort:!1,...O(t)})}function Rf(e,t){return new e({type:\"string\",format:\"cidrv4\",check:\"string_format\",abort:!1,...O(t)})}function Pf(e,t){return new e({type:\"string\",format:\"cidrv6\",check:\"string_format\",abort:!1,...O(t)})}function Tf(e,t){return new e({type:\"string\",format:\"base64\",check:\"string_format\",abort:!1,...O(t)})}function Ef(e,t){return new e({type:\"string\",format:\"base64url\",check:\"string_format\",abort:!1,...O(t)})}function If(e,t){return new e({type:\"string\",format:\"e164\",check:\"string_format\",abort:!1,...O(t)})}function Of(e,t){return new e({type:\"string\",format:\"jwt\",check:\"string_format\",abort:!1,...O(t)})}function Cf(e,t){return new e({type:\"string\",format:\"datetime\",check:\"string_format\",offset:!1,local:!1,precision:null,...O(t)})}function Zf(e,t){return new e({type:\"string\",format:\"date\",check:\"string_format\",...O(t)})}function Nf(e,t){return new e({type:\"string\",format:\"time\",check:\"string_format\",precision:null,...O(t)})}function Af(e,t){return new e({type:\"string\",format:\"duration\",check:\"string_format\",...O(t)})}function jf(e,t){return new e({type:\"number\",checks:[],...O(t)})}function Mf(e,t){return new e({type:\"number\",coerce:!0,checks:[],...O(t)})}function qf(e,t){return new e({type:\"number\",check:\"number_format\",abort:!1,format:\"safeint\",...O(t)})}function Lf(e,t){return new e({type:\"boolean\",...O(t)})}function Uf(e,t){return new e({type:\"null\",...O(t)})}function Df(e){return new e({type:\"any\"})}function Ff(e){return new e({type:\"unknown\"})}function Vf(e,t){return new e({type:\"never\",...O(t)})}function sc(e,t){return new Gu({check:\"less_than\",...O(t),value:e,inclusive:!1})}function ns(e,t){return new Gu({check:\"less_than\",...O(t),value:e,inclusive:!0})}function ic(e,t){return new Ku({check:\"greater_than\",...O(t),value:e,inclusive:!1})}function ss(e,t){return new Ku({check:\"greater_than\",...O(t),value:e,inclusive:!0})}function ac(e,t){return new Vm({check:\"multiple_of\",...O(t),value:e})}function cc(e,t){return new Hm({check:\"max_length\",...O(t),maximum:e})}function bo(e,t){return new Bm({check:\"min_length\",...O(t),minimum:e})}function uc(e,t){return new Wm({check:\"length_equals\",...O(t),length:e})}function il(e,t){return new Gm({check:\"string_format\",format:\"regex\",...O(t),pattern:e})}function al(e){return new Km({check:\"string_format\",format:\"lowercase\",...O(e)})}function cl(e){return new Ym({check:\"string_format\",format:\"uppercase\",...O(e)})}function ul(e,t){return new Qm({check:\"string_format\",format:\"includes\",...O(t),includes:e})}function ll(e,t){return new Xm({check:\"string_format\",format:\"starts_with\",...O(t),prefix:e})}function pl(e,t){return new eh({check:\"string_format\",format:\"ends_with\",...O(t),suffix:e})}function Wt(e){return new th({check:\"overwrite\",tx:e})}function dl(e){return Wt((t)=>t.normalize(e))}function ml(){return Wt((e)=>e.trim())}function hl(){return Wt((e)=>e.toLowerCase())}function fl(){return Wt((e)=>e.toUpperCase())}function gl(){return Wt((e)=>Yd(e))}function Jf(e,t,r){return new e({type:\"array\",element:t,...O(r)})}function Hf(e,t,r){return new e({type:\"custom\",check:\"custom\",fn:t,...O(r)})}function Bf(e,t){let r=kk((o)=>(o.addIssue=(n)=>{if(typeof n===\"string\")o.issues.push(Rr(n,o.value,r._zod.def));else{let i=n;if(i.fatal)i.continue=!1;i.code??(i.code=\"custom\"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(Rr(i))}},e(o.value,o)),t);return r}function kk(e,t){let r=new Te({check:\"custom\",...O(t)});return r._zod.check=e,r}function _l(e){let t=e?.target??\"draft-2020-12\";if(t===\"draft-4\")t=\"draft-04\";if(t===\"draft-7\")t=\"draft-07\";return{processors:e.processors??{},metadataRegistry:e?.metadata??Bt,target:t,unrepresentable:e?.unrepresentable??\"throw\",override:e?.override??(()=>{}),io:e?.io??\"output\",counter:0,seen:new Map,cycles:e?.cycles??\"ref\",reused:e?.reused??\"inline\",external:e?.external??void 0}}function ve(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i){if(i.count++,r.schemaPath.includes(e))i.cycle=r.path;return i.schema}let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else{let h=s.schema,f=t.processors[n.type];if(!f)throw Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(e,t,h,l)}let m=e._zod.parent;if(m){if(!s.ref)s.ref=m;ve(m,t,l),t.seen.get(m).isParent=!0}}let c=t.metadataRegistry.get(e);if(c)Object.assign(s.schema,c);if(t.io===\"input\"&&qe(e))delete s.schema.examples,delete s.schema.default;if(t.io===\"input\"&&\"_prefault\"in s.schema)(o=s.schema).default??(o.default=s.schema._prefault);return delete s.schema._prefault,t.seen.get(e).schema}function Sl(e,t){let r=e.seen.get(t);if(!r)throw Error(\"Unprocessed schema. This is a bug in Zod.\");let o=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=o.get(a);if(c&&c!==s[0])throw Error(`Duplicate schema id \"${a}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,s[0])}}let n=(s)=>{let a=e.target===\"draft-2020-12\"?\"$defs\":\"definitions\";if(e.external){let m=e.external.registry.get(s[0])?.id,h=e.external.uri??((b)=>b);if(m)return{ref:h(m)};let f=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=f,{defId:f,ref:`${h(\"__shared\")}#/${a}/${f}`}}if(s[1]===r)return{ref:\"#\"};let u=`${\"#\"}/${a}/`,l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},i=(s)=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:u}=n(s);if(a.def={...a.schema},u)a.defId=u;let l=a.schema;for(let m in l)delete l[m];l.$ref=c};if(e.cycles===\"throw\")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join(\"/\")}/<root>\n\nSet the \\`cycles\\` parameter to \\`\"ref\"\\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){i(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1){if(e.reused===\"ref\"){i(s);continue}}}}function zl(e,t){let r=e.seen.get(t);if(!r)throw Error(\"Unprocessed schema. This is a bug in Zod.\");let o=(a)=>{let c=e.seen.get(a);if(c.ref===null)return;let u=c.def??c.schema,l={...u},m=c.ref;if(c.ref=null,m){o(m);let f=e.seen.get(m),b=f.schema;if(b.$ref&&(e.target===\"draft-07\"||e.target===\"draft-04\"||e.target===\"openapi-3.0\"))u.allOf=u.allOf??[],u.allOf.push(b);else Object.assign(u,b);if(Object.assign(u,l),a._zod.parent===m)for(let x in u){if(x===\"$ref\"||x===\"allOf\")continue;if(!(x in l))delete u[x]}if(b.$ref&&f.def)for(let x in u){if(x===\"$ref\"||x===\"allOf\")continue;if(x in f.def&&JSON.stringify(u[x])===JSON.stringify(f.def[x]))delete u[x]}}let h=a._zod.parent;if(h&&h!==m){o(h);let f=e.seen.get(h);if(f?.schema.$ref){if(u.$ref=f.schema.$ref,f.def)for(let b in u){if(b===\"$ref\"||b===\"allOf\")continue;if(b in f.def&&JSON.stringify(u[b])===JSON.stringify(f.def[b]))delete u[b]}}}e.override({zodSchema:a,jsonSchema:u,path:c.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);let n={};if(e.target===\"draft-2020-12\")n.$schema=\"https://json-schema.org/draft/2020-12/schema\";else if(e.target===\"draft-07\")n.$schema=\"http://json-schema.org/draft-07/schema#\";else if(e.target===\"draft-04\")n.$schema=\"http://json-schema.org/draft-04/schema#\";else if(e.target===\"openapi-3.0\");if(e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw Error(\"Schema is missing an `id` property\");n.$id=e.external.uri(a)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;if(i!==void 0&&n.id===i)delete n.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let c=a[1];if(c.def&&c.defId){if(c.def.id===c.defId)delete c.def.id;s[c.defId]=c.def}}if(e.external);else if(Object.keys(s).length>0)if(e.target===\"draft-2020-12\")n.$defs=s;else n.definitions=s;try{let a=JSON.parse(JSON.stringify(n));return Object.defineProperty(a,\"~standard\",{value:{...t[\"~standard\"],jsonSchema:{input:is(t,\"input\",e.processors),output:is(t,\"output\",e.processors)}},enumerable:!1,writable:!1}),a}catch(a){throw Error(\"Error converting schema to JSON.\")}}function qe(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type===\"transform\")return!0;if(o.type===\"array\")return qe(o.element,r);if(o.type===\"set\")return qe(o.valueType,r);if(o.type===\"lazy\")return qe(o.getter(),r);if(o.type===\"promise\"||o.type===\"optional\"||o.type===\"nonoptional\"||o.type===\"nullable\"||o.type===\"readonly\"||o.type===\"default\"||o.type===\"prefault\")return qe(o.innerType,r);if(o.type===\"intersection\")return qe(o.left,r)||qe(o.right,r);if(o.type===\"record\"||o.type===\"map\")return qe(o.keyType,r)||qe(o.valueType,r);if(o.type===\"pipe\"){if(e._zod.traits.has(\"$ZodCodec\"))return!0;return qe(o.in,r)||qe(o.out,r)}if(o.type===\"object\"){for(let n in o.shape)if(qe(o.shape[n],r))return!0;return!1}if(o.type===\"union\"){for(let n of o.options)if(qe(n,r))return!0;return!1}if(o.type===\"tuple\"){for(let n of o.items)if(qe(n,r))return!0;if(o.rest&&qe(o.rest,r))return!0;return!1}return!1}var Wf=(e,t={})=>(r)=>{let o=_l({...r,processors:t});return ve(e,o),Sl(o,e),zl(o,e)},is=(e,t,r={})=>(o)=>{let{libraryOptions:n,target:i}=o??{},s=_l({...n??{},target:i,io:t,processors:r});return ve(e,s),Sl(s,e),zl(s,e)};var Rk={guid:\"uuid\",url:\"uri\",datetime:\"date-time\",json_string:\"json-string\",regex:\"\"},Gf=(e,t,r,o)=>{let n=r;n.type=\"string\";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i===\"number\")n.minLength=i;if(typeof s===\"number\")n.maxLength=s;if(a){if(n.format=Rk[a]??a,n.format===\"\")delete n.format;if(a===\"time\")delete n.format}if(u)n.contentEncoding=u;if(c&&c.size>0){let l=[...c];if(l.length===1)n.pattern=l[0].source;else if(l.length>1)n.allOf=[...l.map((m)=>({...t.target===\"draft-07\"||t.target===\"draft-04\"||t.target===\"openapi-3.0\"?{type:\"string\"}:{},pattern:m.source}))]}},Kf=(e,t,r,o)=>{let n=r,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;if(typeof a===\"string\"&&a.includes(\"int\"))n.type=\"integer\";else n.type=\"number\";let m=typeof l===\"number\"&&l>=(i??Number.NEGATIVE_INFINITY),h=typeof u===\"number\"&&u<=(s??Number.POSITIVE_INFINITY),f=t.target===\"draft-04\"||t.target===\"openapi-3.0\";if(m)if(f)n.minimum=l,n.exclusiveMinimum=!0;else n.exclusiveMinimum=l;else if(typeof i===\"number\")n.minimum=i;if(h)if(f)n.maximum=u,n.exclusiveMaximum=!0;else n.exclusiveMaximum=u;else if(typeof s===\"number\")n.maximum=s;if(typeof c===\"number\")n.multipleOf=c},Yf=(e,t,r,o)=>{r.type=\"boolean\"};var Qf=(e,t,r,o)=>{if(t.target===\"openapi-3.0\")r.type=\"string\",r.nullable=!0,r.enum=[null];else r.type=\"null\"};var Xf=(e,t,r,o)=>{r.not={}},eg=(e,t,r,o)=>{},tg=(e,t,r,o)=>{};var rg=(e,t,r,o)=>{let n=e._zod.def,i=Ga(n.entries);if(i.every((s)=>typeof s===\"number\"))r.type=\"number\";if(i.every((s)=>typeof s===\"string\"))r.type=\"string\";r.enum=i},og=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let s of n.values)if(s===void 0){if(t.unrepresentable===\"throw\")throw Error(\"Literal `undefined` cannot be represented in JSON Schema\")}else if(typeof s===\"bigint\")if(t.unrepresentable===\"throw\")throw Error(\"BigInt literals cannot be represented in JSON Schema\");else i.push(Number(s));else i.push(s);if(i.length===0);else if(i.length===1){let s=i[0];if(r.type=s===null?\"null\":typeof s,t.target===\"draft-04\"||t.target===\"openapi-3.0\")r.enum=[s];else r.const=s}else{if(i.every((s)=>typeof s===\"number\"))r.type=\"number\";if(i.every((s)=>typeof s===\"string\"))r.type=\"string\";if(i.every((s)=>typeof s===\"boolean\"))r.type=\"boolean\";if(i.every((s)=>s===null))r.type=\"null\";r.enum=i}};var ng=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Custom types cannot be represented in JSON Schema\")};var sg=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Transforms cannot be represented in JSON Schema\")};var ig=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;if(typeof s===\"number\")n.minItems=s;if(typeof a===\"number\")n.maxItems=a;n.type=\"array\",n.items=ve(i.element,t,{...o,path:[...o.path,\"items\"]})},ag=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type=\"object\",n.properties={};let s=i.shape;for(let u in s)n.properties[u]=ve(s[u],t,{...o,path:[...o.path,\"properties\",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter((u)=>{let l=i.shape[u]._zod;if(t.io===\"input\")return l.optin===void 0;else return l.optout===void 0}));if(c.size>0)n.required=Array.from(c);if(i.catchall?._zod.def.type===\"never\")n.additionalProperties=!1;else if(!i.catchall){if(t.io===\"output\")n.additionalProperties=!1}else if(i.catchall)n.additionalProperties=ve(i.catchall,t,{...o,path:[...o.path,\"additionalProperties\"]})},cg=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,s=n.options.map((a,c)=>ve(a,t,{...o,path:[...o.path,i?\"oneOf\":\"anyOf\",c]}));if(i)r.oneOf=s;else r.anyOf=s},ug=(e,t,r,o)=>{let n=e._zod.def,i=ve(n.left,t,{...o,path:[...o.path,\"allOf\",0]}),s=ve(n.right,t,{...o,path:[...o.path,\"allOf\",1]}),a=(u)=>(\"allOf\"in u)&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c};var lg=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type=\"object\";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode===\"loose\"&&c&&c.size>0){let l=ve(i.valueType,t,{...o,path:[...o.path,\"patternProperties\",\"*\"]});n.patternProperties={};for(let m of c)n.patternProperties[m.source]=l}else{if(t.target===\"draft-07\"||t.target===\"draft-2020-12\")n.propertyNames=ve(i.keyType,t,{...o,path:[...o.path,\"propertyNames\"]});n.additionalProperties=ve(i.valueType,t,{...o,path:[...o.path,\"additionalProperties\"]})}let u=s._zod.values;if(u){let l=[...u].filter((m)=>typeof m===\"string\"||typeof m===\"number\");if(l.length>0)n.required=l}},pg=(e,t,r,o)=>{let n=e._zod.def,i=ve(n.innerType,t,o),s=t.seen.get(e);if(t.target===\"openapi-3.0\")s.ref=n.innerType,r.nullable=!0;else r.anyOf=[i,{type:\"null\"}]},dg=(e,t,r,o)=>{let n=e._zod.def;ve(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},mg=(e,t,r,o)=>{let n=e._zod.def;ve(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},hg=(e,t,r,o)=>{let n=e._zod.def;ve(n.innerType,t,o);let i=t.seen.get(e);if(i.ref=n.innerType,t.io===\"input\")r._prefault=JSON.parse(JSON.stringify(n.defaultValue))},fg=(e,t,r,o)=>{let n=e._zod.def;ve(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw Error(\"Dynamic catch values are not supported in JSON Schema\")}r.default=s},gg=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has(\"$ZodTransform\"),s=t.io===\"input\"?i?n.out:n.in:n.out;ve(s,t,o);let a=t.seen.get(e);a.ref=s},_g=(e,t,r,o)=>{let n=e._zod.def;ve(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0};var bl=(e,t,r,o)=>{let n=e._zod.def;ve(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Sg=(e,t,r,o)=>{let n=e._zod.innerType;ve(n,t,o);let i=t.seen.get(e);i.ref=n};var Nk=_(\"ZodISODateTime\",(e,t)=>{xh.init(e,t),me.init(e,t)});function yl(e){return Cf(Nk,e)}var Ak=_(\"ZodISODate\",(e,t)=>{wh.init(e,t),me.init(e,t)});function zg(e){return Zf(Ak,e)}var jk=_(\"ZodISOTime\",(e,t)=>{$h.init(e,t),me.init(e,t)});function bg(e){return Nf(jk,e)}var Mk=_(\"ZodISODuration\",(e,t)=>{kh.init(e,t),me.init(e,t)});function yg(e){return Af(Mk,e)}var qk=(e,t)=>{Xa.init(e,t),e.name=\"ZodError\",Object.defineProperties(e,{format:{value:(r)=>Ju(e,r)},flatten:{value:(r)=>Vu(e,r)},addIssue:{value:(r)=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Qn,2)}},addIssues:{value:(r)=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Qn,2)}},isEmpty:{get(){return e.issues.length===0}}})};var Ke=_(\"ZodError\",qk,{Parent:Error});var xg=ec(Ke),wg=tc(Ke),$g=es(Ke),kg=ts(Ke),Rg=am(Ke),Pg=cm(Ke),Tg=um(Ke),Eg=lm(Ke),Ig=pm(Ke),Og=dm(Ke),Cg=mm(Ke),Zg=hm(Ke);var Ng=new WeakMap;function as(e,t,r){let o=Object.getPrototypeOf(e),n=Ng.get(o);if(!n)n=new Set,Ng.set(o,n);if(n.has(t))return;n.add(t);for(let i in r){let s=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}var oe=_(\"ZodType\",(e,t)=>(X.init(e,t),Object.assign(e[\"~standard\"],{jsonSchema:{input:is(e,\"input\"),output:is(e,\"output\")}}),e.toJSONSchema=Wf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,\"_def\",{value:t}),e.parse=(r,o)=>xg(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>$g(e,r,o),e.parseAsync=async(r,o)=>wg(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>kg(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>Rg(e,r,o),e.decode=(r,o)=>Pg(e,r,o),e.encodeAsync=async(r,o)=>Tg(e,r,o),e.decodeAsync=async(r,o)=>Eg(e,r,o),e.safeEncode=(r,o)=>Ig(e,r,o),e.safeDecode=(r,o)=>Og(e,r,o),e.safeEncodeAsync=async(r,o)=>Cg(e,r,o),e.safeDecodeAsync=async(r,o)=>Zg(e,r,o),as(e,\"ZodType\",{check(...r){let o=this.def;return this.clone(Vt(o,{checks:[...o.checks??[],...r.map((n)=>typeof n===\"function\"?{_zod:{check:n,def:{check:\"custom\"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return it(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(TR(r,o))},superRefine(r,o){return this.check(ER(r,o))},overwrite(r){return this.check(Wt(r))},optional(){return he(this)},exactOptional(){return fR(this)},nullable(){return qg(this)},nullish(){return he(qg(this))},nonoptional(r){return yR(this,r)},array(){return w(this)},or(r){return ne([this,r])},and(r){return dc(this,r)},transform(r){return Lg(this,Gg(r))},default(r){return SR(this,r)},prefault(r){return bR(this,r)},catch(r){return xR(this,r)},pipe(r){return Lg(this,r)},readonly(){return kR(this)},describe(r){let o=this.clone();return Bt.add(o,{description:r}),o},meta(...r){if(r.length===0)return Bt.get(this);let o=this.clone();return Bt.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,\"description\",{get(){return Bt.get(e)?.description},configurable:!0}),e)),Ug=_(\"_ZodString\",(e,t)=>{nc.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Gf(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,as(e,\"_ZodString\",{regex(...o){return this.check(il(...o))},includes(...o){return this.check(ul(...o))},startsWith(...o){return this.check(ll(...o))},endsWith(...o){return this.check(pl(...o))},min(...o){return this.check(bo(...o))},max(...o){return this.check(cc(...o))},length(...o){return this.check(uc(...o))},nonempty(...o){return this.check(bo(1,...o))},lowercase(o){return this.check(al(o))},uppercase(o){return this.check(cl(o))},trim(){return this.check(ml())},normalize(...o){return this.check(dl(...o))},toLowerCase(){return this.check(hl())},toUpperCase(){return this.check(fl())},slugify(){return this.check(gl())}})}),Dg=_(\"ZodString\",(e,t)=>{nc.init(e,t),Ug.init(e,t),e.email=(r)=>e.check(mf(Uk,r)),e.url=(r)=>e.check(sl(Fg,r)),e.jwt=(r)=>e.check(Of(rR,r)),e.emoji=(r)=>e.check(Sf(Dk,r)),e.guid=(r)=>e.check(nl(Ag,r)),e.uuid=(r)=>e.check(hf(lc,r)),e.uuidv4=(r)=>e.check(ff(lc,r)),e.uuidv6=(r)=>e.check(gf(lc,r)),e.uuidv7=(r)=>e.check(_f(lc,r)),e.nanoid=(r)=>e.check(zf(Fk,r)),e.guid=(r)=>e.check(nl(Ag,r)),e.cuid=(r)=>e.check(bf(Vk,r)),e.cuid2=(r)=>e.check(yf(Jk,r)),e.ulid=(r)=>e.check(vf(Hk,r)),e.base64=(r)=>e.check(Tf(Xk,r)),e.base64url=(r)=>e.check(Ef(eR,r)),e.xid=(r)=>e.check(xf(Bk,r)),e.ksuid=(r)=>e.check(wf(Wk,r)),e.ipv4=(r)=>e.check($f(Gk,r)),e.ipv6=(r)=>e.check(kf(Kk,r)),e.cidrv4=(r)=>e.check(Rf(Yk,r)),e.cidrv6=(r)=>e.check(Pf(Qk,r)),e.e164=(r)=>e.check(If(tR,r)),e.datetime=(r)=>e.check(yl(r)),e.date=(r)=>e.check(zg(r)),e.time=(r)=>e.check(bg(r)),e.duration=(r)=>e.check(yg(r))});function d(e){return df(Dg,e)}var me=_(\"ZodStringFormat\",(e,t)=>{ae.init(e,t),Ug.init(e,t)}),Uk=_(\"ZodEmail\",(e,t)=>{hh.init(e,t),me.init(e,t)});var Ag=_(\"ZodGUID\",(e,t)=>{dh.init(e,t),me.init(e,t)});var lc=_(\"ZodUUID\",(e,t)=>{mh.init(e,t),me.init(e,t)});var Fg=_(\"ZodURL\",(e,t)=>{fh.init(e,t),me.init(e,t)});function Vg(e){return sl(Fg,e)}var Dk=_(\"ZodEmoji\",(e,t)=>{gh.init(e,t),me.init(e,t)});var Fk=_(\"ZodNanoID\",(e,t)=>{_h.init(e,t),me.init(e,t)});var Vk=_(\"ZodCUID\",(e,t)=>{Sh.init(e,t),me.init(e,t)});var Jk=_(\"ZodCUID2\",(e,t)=>{zh.init(e,t),me.init(e,t)});var Hk=_(\"ZodULID\",(e,t)=>{bh.init(e,t),me.init(e,t)});var Bk=_(\"ZodXID\",(e,t)=>{yh.init(e,t),me.init(e,t)});var Wk=_(\"ZodKSUID\",(e,t)=>{vh.init(e,t),me.init(e,t)});var Gk=_(\"ZodIPv4\",(e,t)=>{Rh.init(e,t),me.init(e,t)});var Kk=_(\"ZodIPv6\",(e,t)=>{Ph.init(e,t),me.init(e,t)});var Yk=_(\"ZodCIDRv4\",(e,t)=>{Th.init(e,t),me.init(e,t)});var Qk=_(\"ZodCIDRv6\",(e,t)=>{Eh.init(e,t),me.init(e,t)});var Xk=_(\"ZodBase64\",(e,t)=>{Oh.init(e,t),me.init(e,t)});var eR=_(\"ZodBase64URL\",(e,t)=>{Ch.init(e,t),me.init(e,t)});var tR=_(\"ZodE164\",(e,t)=>{Zh.init(e,t),me.init(e,t)});var rR=_(\"ZodJWT\",(e,t)=>{Nh.init(e,t),me.init(e,t)});var pc=_(\"ZodNumber\",(e,t)=>{Xu.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Kf(e,o,n,i),as(e,\"ZodNumber\",{gt(o,n){return this.check(ic(o,n))},gte(o,n){return this.check(ss(o,n))},min(o,n){return this.check(ss(o,n))},lt(o,n){return this.check(sc(o,n))},lte(o,n){return this.check(ns(o,n))},max(o,n){return this.check(ns(o,n))},int(o){return this.check(jg(o))},safe(o){return this.check(jg(o))},positive(o){return this.check(ic(0,o))},nonnegative(o){return this.check(ss(0,o))},negative(o){return this.check(sc(0,o))},nonpositive(o){return this.check(ns(0,o))},multipleOf(o,n){return this.check(ac(o,n))},step(o,n){return this.check(ac(o,n))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??\"\").includes(\"int\")||Number.isSafeInteger(r.multipleOf??0.5),e.isFinite=!0,e.format=r.format??null});function G(e){return jf(pc,e)}var oR=_(\"ZodNumberFormat\",(e,t)=>{Ah.init(e,t),pc.init(e,t)});function jg(e){return qf(oR,e)}var Jg=_(\"ZodBoolean\",(e,t)=>{jh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yf(e,r,o,n)});function Y(e){return Lf(Jg,e)}var nR=_(\"ZodNull\",(e,t)=>{Mh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qf(e,r,o,n)});function wl(e){return Uf(nR,e)}var sR=_(\"ZodAny\",(e,t)=>{qh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>eg(e,r,o,n)});function Hg(){return Df(sR)}var iR=_(\"ZodUnknown\",(e,t)=>{Lh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>tg(e,r,o,n)});function Se(){return Ff(iR)}var aR=_(\"ZodNever\",(e,t)=>{Uh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xf(e,r,o,n)});function cR(e){return Vf(aR,e)}var uR=_(\"ZodArray\",(e,t)=>{Dh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ig(e,r,o,n),e.element=t.element,as(e,\"ZodArray\",{min(r,o){return this.check(bo(r,o))},nonempty(r){return this.check(bo(1,r))},max(r,o){return this.check(cc(r,o))},length(r,o){return this.check(uc(r,o))},unwrap(){return this.element}})});function w(e,t){return Jf(uR,e,t)}var Bg=_(\"ZodObject\",(e,t)=>{Jh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ag(e,r,o,n),H(e,\"shape\",()=>t.shape),as(e,\"ZodObject\",{keyof(){return He(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Se()})},loose(){return this.clone({...this._zod.def,catchall:Se()})},strict(){return this.clone({...this._zod.def,catchall:cR()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return mk(this,r)},safeExtend(r){return hk(this,r)},merge(r){return fk(this,r)},pick(r){return pk(this,r)},omit(r){return dk(this,r)},partial(...r){return gk(Kg,this,r[0])},required(...r){return _k(Yg,this,r[0])}})});function P(e,t){let r={type:\"object\",shape:e??{},...O(t)};return new Bg(r)}function $e(e,t){return new Bg({type:\"object\",shape:e,catchall:Se(),...O(t)})}var Wg=_(\"ZodUnion\",(e,t)=>{el.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>cg(e,r,o,n),e.options=t.options});function ne(e,t){return new Wg({type:\"union\",options:e,...O(t)})}var lR=_(\"ZodDiscriminatedUnion\",(e,t)=>{Wg.init(e,t),Hh.init(e,t)});function $l(e,t,r){return new lR({type:\"union\",options:t,discriminator:e,...O(r)})}var pR=_(\"ZodIntersection\",(e,t)=>{Bh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ug(e,r,o,n)});function dc(e,t){return new pR({type:\"intersection\",left:e,right:t})}var Mg=_(\"ZodRecord\",(e,t)=>{Wh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>lg(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function fe(e,t,r){if(!t||!t._zod)return new Mg({type:\"record\",keyType:d(),valueType:e,...O(t)});return new Mg({type:\"record\",keyType:e,valueType:t,...O(r)})}var xl=_(\"ZodEnum\",(e,t)=>{Gh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(o,n,i)=>rg(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new xl({...t,checks:[],...O(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw Error(`Key ${s} not found in enum`);return new xl({...t,checks:[],...O(n),entries:i})}});function He(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map((o)=>[o,o])):e;return new xl({type:\"enum\",entries:r,...O(t)})}var dR=_(\"ZodLiteral\",(e,t)=>{Kh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>og(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,\"value\",{get(){if(t.values.length>1)throw Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");return t.values[0]}})});function C(e,t){return new dR({type:\"literal\",values:Array.isArray(e)?e:[e],...O(t)})}var mR=_(\"ZodTransform\",(e,t)=>{Yh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>sg(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")throw new Yn(e.constructor.name);r.addIssue=(i)=>{if(typeof i===\"string\")r.issues.push(Rr(i,r.value,t));else{let s=i;if(s.fatal)s.continue=!1;s.code??(s.code=\"custom\"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Rr(s))}};let n=t.transform(r.value,r);if(n instanceof Promise)return n.then((i)=>(r.value=i,r.fallback=!0,r));return r.value=n,r.fallback=!0,r}});function Gg(e){return new mR({type:\"transform\",transform:e})}var Kg=_(\"ZodOptional\",(e,t)=>{tl.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>bl(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function he(e){return new Kg({type:\"optional\",innerType:e})}var hR=_(\"ZodExactOptional\",(e,t)=>{Qh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>bl(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function fR(e){return new hR({type:\"optional\",innerType:e})}var gR=_(\"ZodNullable\",(e,t)=>{Xh.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>pg(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function qg(e){return new gR({type:\"nullable\",innerType:e})}var _R=_(\"ZodDefault\",(e,t)=>{ef.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>mg(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function SR(e,t){return new _R({type:\"default\",innerType:e,get defaultValue(){return typeof t===\"function\"?t():Uu(t)}})}var zR=_(\"ZodPrefault\",(e,t)=>{tf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>hg(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function bR(e,t){return new zR({type:\"prefault\",innerType:e,get defaultValue(){return typeof t===\"function\"?t():Uu(t)}})}var Yg=_(\"ZodNonOptional\",(e,t)=>{rf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>dg(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function yR(e,t){return new Yg({type:\"nonoptional\",innerType:e,...O(t)})}var vR=_(\"ZodCatch\",(e,t)=>{of.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>fg(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function xR(e,t){return new vR({type:\"catch\",innerType:e,catchValue:typeof t===\"function\"?t:()=>t})}var Qg=_(\"ZodPipe\",(e,t)=>{rl.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>gg(e,r,o,n),e.in=t.in,e.out=t.out});function Lg(e,t){return new Qg({type:\"pipe\",in:e,out:t})}var wR=_(\"ZodPreprocess\",(e,t)=>{Qg.init(e,t),nf.init(e,t)}),$R=_(\"ZodReadonly\",(e,t)=>{sf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>_g(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function kR(e){return new $R({type:\"readonly\",innerType:e})}var RR=_(\"ZodLazy\",(e,t)=>{af.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Sg(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function Xg(e){return new RR({type:\"lazy\",getter:e})}var PR=_(\"ZodCustom\",(e,t)=>{cf.init(e,t),oe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ng(e,r,o,n)});function TR(e,t={}){return Hf(PR,e,t)}function ER(e,t){return Bf(e,t)}function kl(e,t){return new wR({type:\"pipe\",in:Gg(e),out:t})}var t_={invalid_type:\"invalid_type\",too_big:\"too_big\",too_small:\"too_small\",invalid_format:\"invalid_format\",not_multiple_of:\"not_multiple_of\",unrecognized_keys:\"unrecognized_keys\",invalid_union:\"invalid_union\",invalid_key:\"invalid_key\",invalid_element:\"invalid_element\",invalid_value:\"invalid_value\",custom:\"custom\"};var e_;(function(e){})(e_||(e_={}));function IR(e){return Mf(pc,e)}Je(ol());var mc=\"2025-11-25\";var hc=[mc,\"2025-06-18\",\"2025-03-26\",\"2024-11-05\",\"2024-10-07\"],fc=\"io.modelcontextprotocol/related-task\",Pr=\"io.modelcontextprotocol/protocolVersion\",vo=\"io.modelcontextprotocol/clientInfo\",Kt=\"io.modelcontextprotocol/serverInfo\",Tr=\"io.modelcontextprotocol/clientCapabilities\",gc=\"io.modelcontextprotocol/subscriptionId\",xo=\"io.modelcontextprotocol/logLevel\";var Er=\"2.0\";var kt=Xg(()=>ne([d(),G(),Y(),wl(),fe(d(),kt),w(kt)])),ze=fe(d(),kt),_c=w(kt),wo=ne([d(),G().int()]),$o=d(),cs=P({ttl:G().optional()}),us=P({taskId:d()}),ko=$e({progressToken:wo.optional(),[fc]:us.optional()}),Pe=P({_meta:ko.optional()}),Yt=Pe.extend({task:cs.optional()}),be=P({method:d(),params:Pe.loose().optional()}),je=P({_meta:ko.optional()}),Ee=P({method:d(),params:je.loose().optional()}),Ro=$e({get[Kt](){return gt.optional().catch(void 0)}}),ye=$e({_meta:Ro.optional()}),ct=ne([d(),G().int()]),Po=P({jsonrpc:C(Er),id:ct,...be.shape}).strict(),To=P({jsonrpc:C(Er),...Ee.shape}).strict(),Ir=P({jsonrpc:C(Er),id:ct,result:ye}).strict(),Or=P({jsonrpc:C(Er),id:ct.optional(),error:P({code:G().int(),message:d(),data:Se().optional()})}).strict(),Cr=ne([Po,To,Ir,Or]),Sc=ne([Ir,Or]),Qt=ye.strict(),ls=je.extend({requestId:ct.optional(),reason:d().optional()}),Eo=Ee.extend({method:C(\"notifications/cancelled\"),params:ls}),ps=P({src:d(),mimeType:d().optional(),sizes:w(d()).optional(),theme:He([\"light\",\"dark\"]).optional()}),Rt=P({icons:w(ps).optional()}),ft=P({name:d(),title:d().optional()}),gt=ft.extend({...ft.shape,...Rt.shape,version:d(),websiteUrl:d().optional(),description:d().optional()}),OR=dc(P({applyDefaults:Y().optional()}),ze),CR=kl((e)=>{if(e&&typeof e===\"object\"&&!Array.isArray(e)&&Object.keys(e).length===0)return{form:{}};return e},dc(P({form:OR.optional(),url:ze.optional()}),ze.optional())),zc=$e({list:ze.optional(),cancel:ze.optional(),requests:$e({sampling:$e({createMessage:ze.optional()}).optional(),elicitation:$e({create:ze.optional()}).optional()}).optional()}),bc=$e({list:ze.optional(),cancel:ze.optional(),requests:$e({tools:$e({call:ze.optional()}).optional()}).optional()}),ds=P({experimental:fe(d(),ze).optional(),sampling:P({context:ze.optional(),tools:ze.optional()}).optional(),elicitation:CR.optional(),roots:P({listChanged:Y().optional()}).optional(),tasks:zc.optional(),extensions:fe(d(),ze).optional()}),ms=Pe.extend({protocolVersion:d(),capabilities:ds,clientInfo:gt}),hs=be.extend({method:C(\"initialize\"),params:ms}),Io=P({experimental:fe(d(),ze).optional(),logging:ze.optional(),completions:ze.optional(),prompts:P({listChanged:Y().optional()}).optional(),resources:P({subscribe:Y().optional(),listChanged:Y().optional()}).optional(),tools:P({listChanged:Y().optional()}).optional(),tasks:bc.optional(),extensions:fe(d(),ze).optional()}),fs=ye.extend({protocolVersion:d(),capabilities:Io,serverInfo:gt,instructions:d().optional()}),gs=Ee.extend({method:C(\"notifications/initialized\"),params:je.optional()}),_s=be.extend({method:C(\"server/discover\"),params:Pe.optional()}),Oo=ye.extend({supportedVersions:w(d()),capabilities:Io,instructions:d().optional()}),Co=be.extend({method:C(\"ping\"),params:Pe.optional()}),Ss=P({progress:G(),total:he(G()),message:he(d())}),zs=P({...je.shape,...Ss.shape,progressToken:wo}),Zo=Ee.extend({method:C(\"notifications/progress\"),params:zs}),bs=Pe.extend({cursor:$o.optional()}),Pt=be.extend({params:bs.optional()}),Tt=ye.extend({nextCursor:$o.optional()}),No=P({uri:d(),mimeType:he(d()),_meta:fe(d(),Se()).optional()}),Ao=No.extend({text:d()}),Pl=d().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:\"Invalid Base64 string\"}),jo=No.extend({blob:Pl}),Et=He([\"user\",\"assistant\"]),_t=P({audience:w(Et).optional(),priority:G().min(0).max(1).optional(),lastModified:yl({offset:!0}).optional()}),Mo=P({...ft.shape,...Rt.shape,uri:d(),description:he(d()),mimeType:he(d()),size:he(G()),annotations:_t.optional(),_meta:he($e({}))}),ys=P({...ft.shape,...Rt.shape,uriTemplate:d(),description:he(d()),mimeType:he(d()),annotations:_t.optional(),_meta:he($e({}))}),vs=Pt.extend({method:C(\"resources/list\")}),xs=Tt.extend({resources:w(Mo)}),ws=Pt.extend({method:C(\"resources/templates/list\")}),$s=Tt.extend({resourceTemplates:w(ys)}),Zr=Pe.extend({uri:d()}),ks=Zr,Rs=be.extend({method:C(\"resources/read\"),params:ks}),Ps=ye.extend({contents:w(ne([Ao,jo]))}),Ts=Ee.extend({method:C(\"notifications/resources/list_changed\"),params:je.optional()}),Es=Zr,Is=be.extend({method:C(\"resources/subscribe\"),params:Es}),Os=Zr,Cs=be.extend({method:C(\"resources/unsubscribe\"),params:Os}),qo=P({toolsListChanged:Y().optional(),promptsListChanged:Y().optional(),resourcesListChanged:Y().optional(),resourceSubscriptions:w(d()).optional()}),Zs=Pe.extend({notifications:qo}),Ns=be.extend({method:C(\"subscriptions/listen\"),params:Zs}),As=je.extend({notifications:qo}),js=Ee.extend({method:C(\"notifications/subscriptions/acknowledged\"),params:As}),Ms=Ro.extend({[gc]:ct}),qs=ye.extend({_meta:Ms}),Ls=je.extend({uri:d()}),Us=Ee.extend({method:C(\"notifications/resources/updated\"),params:Ls}),Ds=P({name:d(),description:he(d()),required:he(Y())}),Fs=P({...ft.shape,...Rt.shape,description:he(d()),arguments:he(w(Ds)),_meta:he($e({}))}),Vs=Pt.extend({method:C(\"prompts/list\")}),Js=Tt.extend({prompts:w(Fs)}),Hs=Pe.extend({name:d(),arguments:fe(d(),d()).optional()}),Bs=be.extend({method:C(\"prompts/get\"),params:Hs}),Nr=P({type:C(\"text\"),text:d(),annotations:_t.optional(),_meta:fe(d(),Se()).optional()}),Ar=P({type:C(\"image\"),data:Pl,mimeType:d(),annotations:_t.optional(),_meta:fe(d(),Se()).optional()}),jr=P({type:C(\"audio\"),data:Pl,mimeType:d(),annotations:_t.optional(),_meta:fe(d(),Se()).optional()}),Ws=P({type:C(\"tool_use\"),name:d(),id:d(),input:fe(d(),Se()),_meta:fe(d(),Se()).optional()}),Mr=P({type:C(\"resource\"),resource:ne([Ao,jo]),annotations:_t.optional(),_meta:fe(d(),Se()).optional()}),qr=Mo.extend({type:C(\"resource_link\")}),St=ne([Nr,Ar,jr,qr,Mr]),Gs=P({role:Et,content:St}),Ks=ye.extend({description:d().optional(),messages:w(Gs)}),Ys=Ee.extend({method:C(\"notifications/prompts/list_changed\"),params:je.optional()}),Qs=P({title:d().optional(),readOnlyHint:Y().optional(),destructiveHint:Y().optional(),idempotentHint:Y().optional(),openWorldHint:Y().optional()}),Xs=P({taskSupport:He([\"required\",\"optional\",\"forbidden\"]).optional()}),Xt=P({...ft.shape,...Rt.shape,description:d().optional(),inputSchema:P({type:C(\"object\"),properties:fe(d(),kt).optional(),required:w(d()).optional()}).catchall(Se()),outputSchema:$e({$schema:d().optional()}).optional(),annotations:Qs.optional(),execution:Xs.optional(),_meta:fe(d(),Se()).optional()}),ei=Pt.extend({method:C(\"tools/list\")}),ti=Tt.extend({tools:w(Xt)}),er=ye.extend({content:w(St).default([]),structuredContent:Se().optional(),isError:Y().optional()}),yc=er.or(ye.extend({toolResult:Se()})),ri=Yt.extend({name:d(),arguments:fe(d(),Se()).optional()}),oi=be.extend({method:C(\"tools/call\"),params:ri}),ni=Ee.extend({method:C(\"notifications/tools/list_changed\"),params:je.optional()}),vc=P({autoRefresh:Y().default(!0),debounceMs:G().int().nonnegative().default(300)}),Lo=He([\"debug\",\"info\",\"notice\",\"warning\",\"error\",\"critical\",\"alert\",\"emergency\"]),si=Pe.extend({level:Lo}),ii=be.extend({method:C(\"logging/setLevel\"),params:si}),ai=je.extend({level:Lo,logger:d().optional(),data:Se()}),ci=Ee.extend({method:C(\"notifications/message\"),params:ai}),ui=P({name:d().optional()}),li=P({hints:w(ui).optional(),costPriority:G().min(0).max(1).optional(),speedPriority:G().min(0).max(1).optional(),intelligencePriority:G().min(0).max(1).optional()}),pi=P({mode:He([\"auto\",\"required\",\"none\"]).optional()}),di=P({type:C(\"tool_result\"),toolUseId:d().describe(\"The unique identifier for the corresponding tool call.\"),content:w(St),structuredContent:Se().optional(),isError:Y().optional(),_meta:fe(d(),Se()).optional()}),mi=$l(\"type\",[Nr,Ar,jr]),Gt=$l(\"type\",[Nr,Ar,jr,Ws,di]),hi=P({role:Et,content:ne([Gt,w(Gt)]),_meta:fe(d(),Se()).optional()}),fi=Yt.extend({messages:w(hi),modelPreferences:li.optional(),systemPrompt:d().optional(),includeContext:He([\"none\",\"thisServer\",\"allServers\"]).optional(),temperature:G().optional(),maxTokens:G().int(),stopSequences:w(d()).optional(),metadata:ze.optional(),tools:w(Xt).optional(),toolChoice:pi.optional()}),gi=be.extend({method:C(\"sampling/createMessage\"),params:fi}),_i=ye.extend({model:d(),stopReason:he(He([\"endTurn\",\"stopSequence\",\"maxTokens\"]).or(d())),role:Et,content:mi}),Si=ye.extend({model:d(),stopReason:he(He([\"endTurn\",\"stopSequence\",\"maxTokens\",\"toolUse\"]).or(d())),role:Et,content:ne([Gt,w(Gt)])}),Uo=P({type:C(\"boolean\"),title:d().optional(),description:d().optional(),default:Y().optional()}),Lr=P({type:C(\"string\"),title:d().optional(),description:d().optional(),minLength:G().optional(),maxLength:G().optional(),format:He([\"email\",\"uri\",\"date\",\"date-time\"]).optional(),default:d().optional()}),Ur=P({type:He([\"number\",\"integer\"]),title:d().optional(),description:d().optional(),minimum:G().optional(),maximum:G().optional(),default:G().optional()}),Do=P({type:C(\"string\"),title:d().optional(),description:d().optional(),enum:w(d()),default:d().optional()}),Fo=P({type:C(\"string\"),title:d().optional(),description:d().optional(),oneOf:w(P({const:d(),title:d()})),default:d().optional()}),Vo=P({type:C(\"string\"),title:d().optional(),description:d().optional(),enum:w(d()),enumNames:w(d()).optional(),default:d().optional()}),zi=ne([Do,Fo]),Jo=P({type:C(\"array\"),title:d().optional(),description:d().optional(),minItems:G().optional(),maxItems:G().optional(),items:P({type:C(\"string\"),enum:w(d())}),default:w(d()).optional()}),Ho=P({type:C(\"array\"),title:d().optional(),description:d().optional(),minItems:G().optional(),maxItems:G().optional(),items:P({anyOf:w(P({const:d(),title:d()}))}),default:w(d()).optional()}),bi=ne([Jo,Ho]),yi=ne([Vo,zi,bi]),Bo=ne([yi,Uo,Lr,Ur]),Dr=Yt.extend({mode:C(\"form\").optional(),message:d(),requestedSchema:P({type:C(\"object\"),properties:fe(d(),Bo),required:w(d()).optional()}).catchall(Se())}),vi=Yt.extend({mode:C(\"url\"),message:d(),elicitationId:d(),url:d().url()}),xi=ne([Dr,vi]),wi=be.extend({method:C(\"elicitation/create\"),params:xi}),$i=je.extend({elicitationId:d()}),ki=Ee.extend({method:C(\"notifications/elicitation/complete\"),params:$i}),Ri=ye.extend({action:He([\"accept\",\"decline\",\"cancel\"]),content:kl((e)=>e===null?void 0:e,fe(d(),ne([d(),G(),Y(),w(d())])).optional())}),Pi=P({type:C(\"ref/resource\"),uri:d()}),Ti=P({type:C(\"ref/prompt\"),name:d()}),Ei=Pe.extend({ref:ne([Ti,Pi]),argument:P({name:d(),value:d()}),context:P({arguments:fe(d(),d()).optional()}).optional()}),Ii=be.extend({method:C(\"completion/complete\"),params:Ei}),Oi=ye.extend({completion:$e({values:w(d()).max(100),total:he(G().int()),hasMore:he(Y())})}),Ci=P({uri:d().startsWith(\"file://\"),name:d().optional(),_meta:fe(d(),Se()).optional()}),Zi=be.extend({method:C(\"roots/list\"),params:Pe.optional()}),Ni=ye.extend({roots:w(Ci)}),Ai=Ee.extend({method:C(\"notifications/roots/list_changed\"),params:je.optional()}),xc=$e({ttl:G().optional(),pollInterval:G().optional()}),ji=He([\"working\",\"input_required\",\"completed\",\"failed\",\"cancelled\"]),It=P({taskId:d(),status:ji,ttl:ne([G(),wl()]),createdAt:d(),lastUpdatedAt:d(),pollInterval:he(G()),statusMessage:he(d())}),wc=ye.extend({task:It}),Mi=je.merge(It),$c=Ee.extend({method:C(\"notifications/tasks/status\"),params:Mi}),kc=be.extend({method:C(\"tasks/get\"),params:Pe.extend({taskId:d()})}),Rc=ye.merge(It),Pc=be.extend({method:C(\"tasks/result\"),params:Pe.extend({taskId:d()})}),Tc=ye.loose(),Ec=Pt.extend({method:C(\"tasks/list\")}),Ic=Tt.extend({tasks:w(It)}),Oc=be.extend({method:C(\"tasks/cancel\"),params:Pe.extend({taskId:d()})}),Cc=ye.merge(It),Zc=ne([Co,hs,_s,Ii,ii,Bs,Vs,vs,ws,Rs,Is,Cs,Ns,oi,ei]),Nc=ne([Eo,Zo,gs,Ai]),Ac=ne([Qt,_i,Si,Ri,Ni]),jc=ne([Co,gi,wi,Zi]),Mc=ne([Eo,Zo,ci,Us,Ts,ni,Ys,js,ki]),qc=ne([Qt,fs,Oo,Oi,Ks,Js,xs,$s,Ps,er,ti,qs]),Re=Vg().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:t_.custom,message:\"URL must be parseable\",fatal:!0}),Au}).refine((e)=>{let t=new URL(e);return t.protocol!==\"javascript:\"&&t.protocol!==\"data:\"&&t.protocol!==\"vbscript:\"},{message:\"URL cannot use javascript:, data:, or vbscript: scheme\"}),qi=$e({resource:d().url(),authorization_servers:w(Re).optional(),jwks_uri:d().url().optional(),scopes_supported:w(d()).optional(),bearer_methods_supported:w(d()).optional(),resource_signing_alg_values_supported:w(d()).optional(),resource_name:d().optional(),resource_documentation:d().optional(),resource_policy_uri:d().url().optional(),resource_tos_uri:d().url().optional(),tls_client_certificate_bound_access_tokens:Y().optional(),authorization_details_types_supported:w(d()).optional(),dpop_signing_alg_values_supported:w(d()).optional(),dpop_bound_access_tokens_required:Y().optional()}),Wo=$e({issuer:d(),authorization_endpoint:Re,token_endpoint:Re,registration_endpoint:Re.optional(),scopes_supported:w(d()).optional(),response_types_supported:w(d()),response_modes_supported:w(d()).optional(),grant_types_supported:w(d()).optional(),token_endpoint_auth_methods_supported:w(d()).optional(),token_endpoint_auth_signing_alg_values_supported:w(d()).optional(),service_documentation:Re.optional(),revocation_endpoint:Re.optional(),revocation_endpoint_auth_methods_supported:w(d()).optional(),revocation_endpoint_auth_signing_alg_values_supported:w(d()).optional(),introspection_endpoint:d().optional(),introspection_endpoint_auth_methods_supported:w(d()).optional(),introspection_endpoint_auth_signing_alg_values_supported:w(d()).optional(),code_challenge_methods_supported:w(d()).optional(),client_id_metadata_document_supported:Y().optional(),authorization_response_iss_parameter_supported:Y().optional().catch(void 0)}),Li=$e({issuer:d(),authorization_endpoint:Re,token_endpoint:Re,userinfo_endpoint:Re.optional(),jwks_uri:Re,registration_endpoint:Re.optional(),scopes_supported:w(d()).optional(),response_types_supported:w(d()),response_modes_supported:w(d()).optional(),grant_types_supported:w(d()).optional(),acr_values_supported:w(d()).optional(),subject_types_supported:w(d()),id_token_signing_alg_values_supported:w(d()),id_token_encryption_alg_values_supported:w(d()).optional(),id_token_encryption_enc_values_supported:w(d()).optional(),userinfo_signing_alg_values_supported:w(d()).optional(),userinfo_encryption_alg_values_supported:w(d()).optional(),userinfo_encryption_enc_values_supported:w(d()).optional(),request_object_signing_alg_values_supported:w(d()).optional(),request_object_encryption_alg_values_supported:w(d()).optional(),request_object_encryption_enc_values_supported:w(d()).optional(),token_endpoint_auth_methods_supported:w(d()).optional(),token_endpoint_auth_signing_alg_values_supported:w(d()).optional(),display_values_supported:w(d()).optional(),claim_types_supported:w(d()).optional(),claims_supported:w(d()).optional(),service_documentation:d().optional(),claims_locales_supported:w(d()).optional(),ui_locales_supported:w(d()).optional(),claims_parameter_supported:Y().optional(),request_parameter_supported:Y().optional(),request_uri_parameter_supported:Y().optional(),require_request_uri_registration:Y().optional(),op_policy_uri:Re.optional(),op_tos_uri:Re.optional(),client_id_metadata_document_supported:Y().optional(),authorization_response_iss_parameter_supported:Y().optional().catch(void 0)}),Ui=P({...Li.shape,...Wo.pick({code_challenge_methods_supported:!0}).shape}),Di=P({access_token:d(),id_token:d().optional(),token_type:d(),expires_in:IR().optional(),scope:d().optional(),refresh_token:d().optional()}).strip(),Fi=P({issued_token_type:C(\"urn:ietf:params:oauth:token-type:id-jag\"),access_token:d(),token_type:d().optional(),expires_in:G().optional(),scope:d().optional()}).strip(),Vi=P({error:d(),error_description:d().optional(),error_uri:d().optional()}),Rl=Re.optional().or(C(\"\").transform(()=>{return})),Ji=P({redirect_uris:w(Re),token_endpoint_auth_method:d().optional(),grant_types:w(d()).optional(),response_types:w(d()).optional(),application_type:d().optional(),client_name:d().optional(),client_uri:Re.optional(),logo_uri:Rl,scope:d().optional(),contacts:w(d()).optional(),tos_uri:Rl,policy_uri:d().optional(),jwks_uri:Re.optional(),jwks:Hg().optional(),software_id:d().optional(),software_version:d().optional(),software_statement:d().optional()}).strip(),Hi=P({client_id:d(),client_secret:d().optional(),client_id_issued_at:G().optional(),client_secret_expires_at:G().optional()}).strip(),Bi=Ji.merge(Hi),Lc=P({error:d(),error_description:d().optional()}).strip(),Uc=P({token:d(),token_type_hint:d().optional()}).strip();var d_;function S(e,t,r){function o(a,c){if(!a._zod)Object.defineProperty(a,\"_zod\",{value:{def:c,constr:s,traits:new Set},enumerable:!1});if(a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=s.prototype,l=Object.keys(u);for(let m=0;m<l.length;m++){let h=l[m];if(!(h in a))a[h]=u[h].bind(a)}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,\"name\",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,\"init\",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:(a)=>{if(r?.Parent&&a instanceof r.Parent)return!0;return a?._zod?.traits?.has(e)}}),Object.defineProperty(s,\"name\",{value:e}),s}var iZ=Symbol(\"zod_brand\");class Ot extends Error{constructor(){super(\"Encountered Promise during synchronous parse. Use .parseAsync() instead.\")}}class Wi extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name=\"ZodEncodeError\"}}(d_=globalThis).__zod_globalConfig??(d_.__zod_globalConfig={});var Go=globalThis.__zod_globalConfig;function Ye(e){if(e)Object.assign(Go,e);return Go}function Fc(e){let t=Object.values(e).filter((o)=>typeof o===\"number\");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function El(e,t=\"|\"){return e.map((r)=>Zl(r)).join(t)}function Gi(e,t){if(typeof t===\"bigint\")return t.toString();return t}function Ki(e){return{get value(){{let r=e();return Object.defineProperty(this,\"value\",{value:r}),r}throw Error(\"cached value already set\")}}}function Vc(e){return e===null||e===void 0}function Jc(e){let t=e.startsWith(\"^\")?1:0,r=e.endsWith(\"$\")?e.length-1:e.length;return e.slice(t,r)}function h_(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);if(Math.abs(r-o)<n)return 0;return r-o}var m_=Symbol(\"evaluating\");function B(e,t,r){let o=void 0;Object.defineProperty(e,t,{get(){if(o===m_)return;if(o===void 0)o=m_,o=r();return o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Fr(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function tr(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function Il(e){return JSON.stringify(e)}function f_(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,\"\").replace(/[\\s_-]+/g,\"-\").replace(/^-+|-+$/g,\"\")}var Ol=\"captureStackTrace\"in Error?Error.captureStackTrace:(...e)=>{};function Ko(e){return typeof e===\"object\"&&e!==null&&!Array.isArray(e)}var g_=Ki(()=>{if(Go.jitless)return!1;if(typeof navigator<\"u\"&&navigator?.userAgent?.includes(\"Cloudflare\"))return!1;try{return new Function(\"\"),!0}catch(e){return!1}});function Vr(e){if(Ko(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!==\"function\")return!0;let r=t.prototype;if(Ko(r)===!1)return!1;if(Object.prototype.hasOwnProperty.call(r,\"isPrototypeOf\")===!1)return!1;return!0}function Cl(e){if(Vr(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}var __=new Set([\"string\",\"number\",\"symbol\"]);function rr(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function zt(e,t,r){let o=new e._zod.constr(t??e._zod.def);if(!t||r?.parent)o._zod.parent=e;return o}function Z(e){let t=e;if(!t)return{};if(typeof t===\"string\")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error(\"Cannot specify both `message` and `error` params\");t.error=t.message}if(delete t.message,typeof t.error===\"string\")return{...t,error:()=>t.error};return t}function Zl(e){if(typeof e===\"bigint\")return e.toString()+\"n\";if(typeof e===\"string\")return`\"${e}\"`;return`${e}`}function S_(e){return Object.keys(e).filter((t)=>e[t]._zod.optin===\"optional\"&&e[t]._zod.optout===\"optional\")}var z_={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ZR(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw Error(\".pick() cannot be used on object schemas containing refinements\");let i=tr(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: \"${a}\"`);if(!t[a])continue;s[a]=r.shape[a]}return Fr(this,\"shape\",s),s},checks:[]});return zt(e,i)}function NR(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw Error(\".omit() cannot be used on object schemas containing refinements\");let i=tr(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: \"${a}\"`);if(!t[a])continue;delete s[a]}return Fr(this,\"shape\",s),s},checks:[]});return zt(e,i)}function AR(e,t){if(!Vr(t))throw Error(\"Invalid input to extend: expected a plain object\");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\")}let n=tr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Fr(this,\"shape\",i),i}});return zt(e,n)}function jR(e,t){if(!Vr(t))throw Error(\"Invalid input to safeExtend: expected a plain object\");let r=tr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Fr(this,\"shape\",o),o}});return zt(e,r)}function MR(e,t){if(e._zod.def.checks?.length)throw Error(\".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.\");let r=tr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Fr(this,\"shape\",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return zt(e,r)}function qR(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw Error(\".partial() cannot be used on object schemas containing refinements\");let s=tr(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let u in r){if(!(u in a))throw Error(`Unrecognized key: \"${u}\"`);if(!r[u])continue;c[u]=e?new e({type:\"optional\",innerType:a[u]}):a[u]}else for(let u in a)c[u]=e?new e({type:\"optional\",innerType:a[u]}):a[u];return Fr(this,\"shape\",c),c},checks:[]});return zt(t,s)}function LR(e,t,r){let o=tr(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw Error(`Unrecognized key: \"${s}\"`);if(!r[s])continue;i[s]=new e({type:\"nonoptional\",innerType:n[s]})}else for(let s in n)i[s]=new e({type:\"nonoptional\",innerType:n[s]});return Fr(this,\"shape\",i),i}});return zt(t,o)}function Jr(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function b_(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function or(e,t){return t.map((r)=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Dc(e){return typeof e===\"string\"?e:e?.message}function ut(e,t,r){let o=e.message?e.message:Dc(e.inst?._zod.def?.error?.(e))??Dc(t?.error?.(e))??Dc(r.customError?.(e))??Dc(r.localeError?.(e))??\"Invalid input\",{inst:n,continue:i,input:s,...a}=e;if(a.path??(a.path=[]),a.message=o,t?.reportInput)a.input=s;return a}function Hc(e){if(Array.isArray(e))return\"array\";if(typeof e===\"string\")return\"string\";return\"unknown\"}function y_(e){let t=typeof e;switch(t){case\"number\":return Number.isNaN(e)?\"nan\":\"number\";case\"object\":{if(e===null)return\"null\";if(Array.isArray(e))return\"array\";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&\"constructor\"in r&&r.constructor)return r.constructor.name}}return t}function Hr(...e){let[t,r,o]=e;if(typeof t===\"string\")return{message:t,code:\"custom\",input:r,inst:o};return{...t}}var v_=(e,t)=>{e.name=\"$ZodError\",Object.defineProperty(e,\"_zod\",{value:e._zod,enumerable:!1}),Object.defineProperty(e,\"issues\",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Gi,2),Object.defineProperty(e,\"toString\",{value:()=>e.message,enumerable:!1})},Bc=S(\"$ZodError\",v_),Nl=S(\"$ZodError\",v_,{Parent:Error});function x_(e,t=(r)=>r.message){let r={},o=[];for(let n of e.issues)if(n.path.length>0)r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n));else o.push(t(n));return{formErrors:o,fieldErrors:r}}function w_(e,t=(r)=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let s of n.issues)if(s.code===\"invalid_union\"&&s.errors.length)s.errors.map((a)=>o({issues:a},[...i,...s.path]));else if(s.code===\"invalid_key\")o({issues:s.issues},[...i,...s.path]);else if(s.code===\"invalid_element\")o({issues:s.issues},[...i,...s.path]);else{let a=[...i,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,u=0;while(u<a.length){let l=a[u];if(u!==a.length-1)c[l]=c[l]||{_errors:[]};else c[l]=c[l]||{_errors:[]},c[l]._errors.push(t(s));c=c[l],u++}}}};return o(e),r}var Wc=(e)=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Ot;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map((c)=>ut(c,i,Ye())));throw Ol(a,n?.callee),a}return s.value};var Gc=(e)=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)s=await s;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map((c)=>ut(c,i,Ye())));throw Ol(a,n?.callee),a}return s.value};var Yi=(e)=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Ot;return i.issues.length?{success:!1,error:new(e??Bc)(i.issues.map((s)=>ut(s,n,Ye())))}:{success:!0,data:i.value}},$_=Yi(Nl),Qi=(e)=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)i=await i;return i.issues.length?{success:!1,error:new e(i.issues.map((s)=>ut(s,n,Ye())))}:{success:!0,data:i.value}},k_=Qi(Nl),R_=(e)=>(t,r,o)=>{let n=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return Wc(e)(t,r,n)};var P_=(e)=>(t,r,o)=>Wc(e)(t,r,o);var T_=(e)=>async(t,r,o)=>{let n=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return Gc(e)(t,r,n)};var E_=(e)=>async(t,r,o)=>Gc(e)(t,r,o);var I_=(e)=>(t,r,o)=>{let n=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return Yi(e)(t,r,n)};var O_=(e)=>(t,r,o)=>Yi(e)(t,r,o);var C_=(e)=>async(t,r,o)=>{let n=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return Qi(e)(t,r,n)};var Z_=(e)=>async(t,r,o)=>Qi(e)(t,r,o);var N_=/^[cC][0-9a-z]{6,}$/,A_=/^[0-9a-z]+$/,j_=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,M_=/^[0-9a-vA-V]{20}$/,q_=/^[A-Za-z0-9]{27}$/,L_=/^[a-zA-Z0-9_-]{21}$/,U_=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;var D_=/^([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})$/,Al=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var F_=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;var DR=\"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\";function V_(){return new RegExp(DR,\"u\")}var J_=/^(?:(?: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])$/,H_=/^(([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}|:))$/;var B_=/^((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])$/,W_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,G_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,jl=/^[A-Za-z0-9_-]*$/;var K_=/^https?$/,Y_=/^\\+[1-9]\\d{6,14}$/,Q_=\"(?:(?:\\\\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])))\",X_=new RegExp(`^${Q_}$`);function eS(e){return typeof e.precision===\"number\"?e.precision===-1?\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d\":e.precision===0?\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\":`(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?\"}function tS(e){return new RegExp(`^${eS(e)}$`)}function rS(e){let t=eS({precision:e.precision}),r=[\"Z\"];if(e.local)r.push(\"\");if(e.offset)r.push(\"([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)\");let o=`${t}(?:${r.join(\"|\")})`;return new RegExp(`^${Q_}T(?:${o})$`)}var oS=(e)=>{let t=e?`[\\\\s\\\\S]{${e?.minimum??0},${e?.maximum??\"\"}}`:\"[\\\\s\\\\S]*\";return new RegExp(`^${t}$`)};var nS=/^-?\\d+$/,Ml=/^-?\\d+(?:\\.\\d+)?$/,sS=/^(?:true|false)$/i,iS=/^null$/i;var aS=/^[^A-Z]*$/,cS=/^[^a-z]*$/;var Ie=S(\"$ZodCheck\",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),uS={number:\"number\",bigint:\"bigint\",object:\"date\"},ql=S(\"$ZodCheckLessThan\",(e,t)=>{Ie.init(e,t);let r=uS[typeof t.value];e._zod.onattach.push((o)=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<i)if(t.inclusive)n.maximum=t.value;else n.exclusiveMaximum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value<=t.value:o.value<t.value)return;o.issues.push({origin:r,code:\"too_big\",maximum:typeof t.value===\"object\"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ll=S(\"$ZodCheckGreaterThan\",(e,t)=>{Ie.init(e,t);let r=uS[typeof t.value];e._zod.onattach.push((o)=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>i)if(t.inclusive)n.minimum=t.value;else n.exclusiveMinimum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value>=t.value:o.value>t.value)return;o.issues.push({origin:r,code:\"too_small\",minimum:typeof t.value===\"object\"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lS=S(\"$ZodCheckMultipleOf\",(e,t)=>{Ie.init(e,t),e._zod.onattach.push((r)=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=(r)=>{if(typeof r.value!==typeof t.value)throw Error(\"Cannot mix number and bigint in multiple_of check.\");if(typeof r.value===\"bigint\"?r.value%t.value===BigInt(0):h_(r.value,t.value)===0)return;r.issues.push({origin:typeof r.value,code:\"not_multiple_of\",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),pS=S(\"$ZodCheckNumberFormat\",(e,t)=>{Ie.init(e,t),t.format=t.format||\"float64\";let r=t.format?.includes(\"int\"),o=r?\"int\":\"number\",[n,i]=z_[t.format];e._zod.onattach.push((s)=>{let a=s._zod.bag;if(a.format=t.format,a.minimum=n,a.maximum=i,r)a.pattern=nS}),e._zod.check=(s)=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:\"invalid_type\",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)s.issues.push({input:a,code:\"too_big\",maximum:Number.MAX_SAFE_INTEGER,note:\"Integers must be within the safe integer range.\",inst:e,origin:o,inclusive:!0,continue:!t.abort});else s.issues.push({input:a,code:\"too_small\",minimum:Number.MIN_SAFE_INTEGER,note:\"Integers must be within the safe integer range.\",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}if(a<n)s.issues.push({origin:\"number\",input:a,code:\"too_small\",minimum:n,inclusive:!0,inst:e,continue:!t.abort});if(a>i)s.issues.push({origin:\"number\",input:a,code:\"too_big\",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}});var dS=S(\"$ZodCheckMaxLength\",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=(o)=>{let n=o.value;return!Vc(n)&&n.length!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<n)o._zod.bag.maximum=t.maximum}),e._zod.check=(o)=>{let n=o.value;if(n.length<=t.maximum)return;let s=Hc(n);o.issues.push({origin:s,code:\"too_big\",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),mS=S(\"$ZodCheckMinLength\",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=(o)=>{let n=o.value;return!Vc(n)&&n.length!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>n)o._zod.bag.minimum=t.minimum}),e._zod.check=(o)=>{let n=o.value;if(n.length>=t.minimum)return;let s=Hc(n);o.issues.push({origin:s,code:\"too_small\",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),hS=S(\"$ZodCheckLengthEquals\",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=(o)=>{let n=o.value;return!Vc(n)&&n.length!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=(o)=>{let n=o.value,i=n.length;if(i===t.length)return;let s=Hc(n),a=i>t.length;o.issues.push({origin:s,...a?{code:\"too_big\",maximum:t.length}:{code:\"too_small\",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Xi=S(\"$ZodCheckStringFormat\",(e,t)=>{var r,o;if(Ie.init(e,t),e._zod.onattach.push((n)=>{let i=n._zod.bag;if(i.format=t.format,t.pattern)i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern)}),t.pattern)(r=e._zod).check??(r.check=(n)=>{if(t.pattern.lastIndex=0,t.pattern.test(n.value))return;n.issues.push({origin:\"string\",code:\"invalid_format\",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(o=e._zod).check??(o.check=()=>{})}),fS=S(\"$ZodCheckRegex\",(e,t)=>{Xi.init(e,t),e._zod.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:\"string\",code:\"invalid_format\",format:\"regex\",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),gS=S(\"$ZodCheckLowerCase\",(e,t)=>{t.pattern??(t.pattern=aS),Xi.init(e,t)}),_S=S(\"$ZodCheckUpperCase\",(e,t)=>{t.pattern??(t.pattern=cS),Xi.init(e,t)}),SS=S(\"$ZodCheckIncludes\",(e,t)=>{Ie.init(e,t);let r=rr(t.includes),o=new RegExp(typeof t.position===\"number\"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push((n)=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=(n)=>{if(n.value.includes(t.includes,t.position))return;n.issues.push({origin:\"string\",code:\"invalid_format\",format:\"includes\",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),zS=S(\"$ZodCheckStartsWith\",(e,t)=>{Ie.init(e,t);let r=new RegExp(`^${rr(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=(o)=>{if(o.value.startsWith(t.prefix))return;o.issues.push({origin:\"string\",code:\"invalid_format\",format:\"starts_with\",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),bS=S(\"$ZodCheckEndsWith\",(e,t)=>{Ie.init(e,t);let r=new RegExp(`.*${rr(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=(o)=>{if(o.value.endsWith(t.suffix))return;o.issues.push({origin:\"string\",code:\"invalid_format\",format:\"ends_with\",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});var yS=S(\"$ZodCheckOverwrite\",(e,t)=>{Ie.init(e,t),e._zod.check=(r)=>{r.value=t.tx(r.value)}});class Ul{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e===\"function\"){e(this,{execution:\"sync\"}),e(this,{execution:\"async\"});return}let r=e.split(`\n`).filter((i)=>i),o=Math.min(...r.map((i)=>i.length-i.trimStart().length)),n=r.map((i)=>i.slice(o)).map((i)=>\" \".repeat(this.indent*2)+i);for(let i of n)this.content.push(i)}compile(){let e=Function,t=this?.args,o=[...(this?.content??[\"\"]).map((n)=>` ${n}`)];return new e(...t,o.join(`\n`))}}var xS={major:4,minor:4,patch:3};var se=S(\"$ZodType\",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=xS;let o=[...e._zod.def.checks??[]];if(e._zod.traits.has(\"$ZodCheck\"))o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(s,a,c)=>{let u=Jr(s),l;for(let m of a){if(m._zod.def.when){if(b_(s))continue;if(!m._zod.def.when(s))continue}else if(u)continue;let h=s.issues.length,f=m._zod.check(s);if(f instanceof Promise&&c?.async===!1)throw new Ot;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{if(await f,s.issues.length===h)return;if(!u)u=Jr(s,h)});else{if(s.issues.length===h)continue;if(!u)u=Jr(s,h)}}if(l)return l.then(()=>s);return s},i=(s,a,c)=>{if(Jr(s))return s.aborted=!0,s;let u=n(a,o,c);if(u instanceof Promise){if(c.async===!1)throw new Ot;return u.then((l)=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction===\"backward\"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});if(u instanceof Promise)return u.then((l)=>i(l,s,a));return i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new Ot;return c.then((u)=>n(u,o,a))}return n(c,o,a)}}B(e,\"~standard\",()=>({validate:(n)=>{try{let i=$_(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch(i){return k_(e,n).then((s)=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:\"zod\",version:1}))}),Xc=S(\"$ZodString\",(e,t)=>{se.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??oS(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch(n){}if(typeof r.value===\"string\")return r;return r.issues.push({expected:\"string\",code:\"invalid_type\",input:r.value,inst:e}),r}}),ce=S(\"$ZodStringFormat\",(e,t)=>{Xi.init(e,t),Xc.init(e,t)}),OS=S(\"$ZodGUID\",(e,t)=>{t.pattern??(t.pattern=D_),ce.init(e,t)}),CS=S(\"$ZodUUID\",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw Error(`Invalid UUID version: \"${t.version}\"`);t.pattern??(t.pattern=Al(o))}else t.pattern??(t.pattern=Al());ce.init(e,t)}),ZS=S(\"$ZodEmail\",(e,t)=>{t.pattern??(t.pattern=F_),ce.init(e,t)}),NS=S(\"$ZodURL\",(e,t)=>{ce.init(e,t),e._zod.check=(r)=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===K_.source){if(!/^https?:\\/\\//i.test(o)){r.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid URL format\",input:r.value,inst:e,continue:!t.abort});return}}let n=new URL(o);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(n.hostname))r.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid hostname\",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(n.protocol.endsWith(\":\")?n.protocol.slice(0,-1):n.protocol))r.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid protocol\",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})}if(t.normalize)r.value=n.href;else r.value=o;return}catch(o){r.issues.push({code:\"invalid_format\",format:\"url\",input:r.value,inst:e,continue:!t.abort})}}}),AS=S(\"$ZodEmoji\",(e,t)=>{t.pattern??(t.pattern=V_()),ce.init(e,t)}),jS=S(\"$ZodNanoID\",(e,t)=>{t.pattern??(t.pattern=L_),ce.init(e,t)}),MS=S(\"$ZodCUID\",(e,t)=>{t.pattern??(t.pattern=N_),ce.init(e,t)}),qS=S(\"$ZodCUID2\",(e,t)=>{t.pattern??(t.pattern=A_),ce.init(e,t)}),LS=S(\"$ZodULID\",(e,t)=>{t.pattern??(t.pattern=j_),ce.init(e,t)}),US=S(\"$ZodXID\",(e,t)=>{t.pattern??(t.pattern=M_),ce.init(e,t)}),DS=S(\"$ZodKSUID\",(e,t)=>{t.pattern??(t.pattern=q_),ce.init(e,t)}),FS=S(\"$ZodISODateTime\",(e,t)=>{t.pattern??(t.pattern=rS(t)),ce.init(e,t)}),VS=S(\"$ZodISODate\",(e,t)=>{t.pattern??(t.pattern=X_),ce.init(e,t)}),JS=S(\"$ZodISOTime\",(e,t)=>{t.pattern??(t.pattern=tS(t)),ce.init(e,t)}),HS=S(\"$ZodISODuration\",(e,t)=>{t.pattern??(t.pattern=U_),ce.init(e,t)}),BS=S(\"$ZodIPv4\",(e,t)=>{t.pattern??(t.pattern=J_),ce.init(e,t),e._zod.bag.format=\"ipv4\"}),WS=S(\"$ZodIPv6\",(e,t)=>{t.pattern??(t.pattern=H_),ce.init(e,t),e._zod.bag.format=\"ipv6\",e._zod.check=(r)=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:\"invalid_format\",format:\"ipv6\",input:r.value,inst:e,continue:!t.abort})}}});var GS=S(\"$ZodCIDRv4\",(e,t)=>{t.pattern??(t.pattern=B_),ce.init(e,t)}),KS=S(\"$ZodCIDRv6\",(e,t)=>{t.pattern??(t.pattern=W_),ce.init(e,t),e._zod.check=(r)=>{let o=r.value.split(\"/\");try{if(o.length!==2)throw Error();let[n,i]=o;if(!i)throw Error();let s=Number(i);if(`${s}`!==i)throw Error();if(s<0||s>128)throw Error();new URL(`http://[${n}]`)}catch{r.issues.push({code:\"invalid_format\",format:\"cidrv6\",input:r.value,inst:e,continue:!t.abort})}}});function YS(e){if(e===\"\")return!0;if(/\\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var QS=S(\"$ZodBase64\",(e,t)=>{t.pattern??(t.pattern=G_),ce.init(e,t),e._zod.bag.contentEncoding=\"base64\",e._zod.check=(r)=>{if(YS(r.value))return;r.issues.push({code:\"invalid_format\",format:\"base64\",input:r.value,inst:e,continue:!t.abort})}});function FR(e){if(!jl.test(e))return!1;let t=e.replace(/[-_]/g,(o)=>o===\"-\"?\"+\":\"/\"),r=t.padEnd(Math.ceil(t.length/4)*4,\"=\");return YS(r)}var XS=S(\"$ZodBase64URL\",(e,t)=>{t.pattern??(t.pattern=jl),ce.init(e,t),e._zod.bag.contentEncoding=\"base64url\",e._zod.check=(r)=>{if(FR(r.value))return;r.issues.push({code:\"invalid_format\",format:\"base64url\",input:r.value,inst:e,continue:!t.abort})}}),ez=S(\"$ZodE164\",(e,t)=>{t.pattern??(t.pattern=Y_),ce.init(e,t)});function VR(e,t=null){try{let r=e.split(\".\");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));if(\"typ\"in n&&n?.typ!==\"JWT\")return!1;if(!n.alg)return!1;if(t&&(!(\"alg\"in n)||n.alg!==t))return!1;return!0}catch{return!1}}var tz=S(\"$ZodJWT\",(e,t)=>{ce.init(e,t),e._zod.check=(r)=>{if(VR(r.value,t.alg))return;r.issues.push({code:\"invalid_format\",format:\"jwt\",input:r.value,inst:e,continue:!t.abort})}});var Fl=S(\"$ZodNumber\",(e,t)=>{se.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ml,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch(s){}let n=r.value;if(typeof n===\"number\"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n===\"number\"?Number.isNaN(n)?\"NaN\":!Number.isFinite(n)?\"Infinity\":void 0:void 0;return r.issues.push({expected:\"number\",code:\"invalid_type\",input:n,inst:e,...i?{received:i}:{}}),r}}),rz=S(\"$ZodNumberFormat\",(e,t)=>{pS.init(e,t),Fl.init(e,t)}),oz=S(\"$ZodBoolean\",(e,t)=>{se.init(e,t),e._zod.pattern=sS,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Boolean(r.value)}catch(i){}let n=r.value;if(typeof n===\"boolean\")return r;return r.issues.push({expected:\"boolean\",code:\"invalid_type\",input:n,inst:e}),r}});var nz=S(\"$ZodNull\",(e,t)=>{se.init(e,t),e._zod.pattern=iS,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;if(n===null)return r;return r.issues.push({expected:\"null\",code:\"invalid_type\",input:n,inst:e}),r}});var sz=S(\"$ZodUnknown\",(e,t)=>{se.init(e,t),e._zod.parse=(r)=>r}),iz=S(\"$ZodNever\",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:\"never\",code:\"invalid_type\",input:r.value,inst:e}),r)});function wS(e,t,r){if(e.issues.length)t.issues.push(...or(r,e.issues));t.value[r]=e.value}var az=S(\"$ZodArray\",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:\"array\",code:\"invalid_type\",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);if(c instanceof Promise)i.push(c.then((u)=>wS(u,r,s)));else wS(c,r,s)}if(i.length)return Promise.all(i).then(()=>r);return r}});function Qc(e,t,r,o,n,i){let s=r in o;if(e.issues.length){if(n&&i&&!s)return;t.issues.push(...or(r,e.issues))}if(!s&&!n){if(!e.issues.length)t.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:void 0,path:[r]});return}if(e.value===void 0){if(s)t.value[r]=void 0}else t.value[r]=e.value}function cz(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has(\"$ZodType\"))throw Error(`Invalid element at key \"${o}\": expected a Zod schema`);let r=S_(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function uz(e,t,r,o,n,i){let s=[],a=n.keySet,c=n.catchall._zod,u=c.def.type,l=c.optin===\"optional\",m=c.optout===\"optional\";for(let h in t){if(h===\"__proto__\")continue;if(a.has(h))continue;if(u===\"never\"){s.push(h);continue}let f=c.run({value:t[h],issues:[]},o);if(f instanceof Promise)e.push(f.then((b)=>Qc(b,r,h,t,l,m)));else Qc(f,r,h,t,l,m)}if(s.length)r.issues.push({code:\"unrecognized_keys\",keys:s,input:t,inst:i});if(!e.length)return r;return Promise.all(e).then(()=>r)}var JR=S(\"$ZodObject\",(e,t)=>{if(se.init(e,t),!Object.getOwnPropertyDescriptor(t,\"shape\")?.get){let a=t.shape;Object.defineProperty(t,\"shape\",{get:()=>{let c={...a};return Object.defineProperty(t,\"shape\",{value:c}),c}})}let o=Ki(()=>cz(t));B(e._zod,\"propValues\",()=>{let a=t.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let m of l.values)c[u].add(m)}}return c});let n=Ko,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!n(u))return a.issues.push({expected:\"object\",code:\"invalid_type\",input:u,inst:e}),a;a.value={};let l=[],m=s.shape;for(let h of s.keys){let f=m[h],b=f._zod.optin===\"optional\",I=f._zod.optout===\"optional\",x=f._zod.run({value:u[h],issues:[]},c);if(x instanceof Promise)l.push(x.then((J)=>Qc(J,a,h,u,b,I)));else Qc(x,a,h,u,b,I)}if(!i)return l.length?Promise.all(l).then(()=>a):a;return uz(l,u,a,c,o.value,e)}}),lz=S(\"$ZodObjectJIT\",(e,t)=>{JR.init(e,t);let r=e._zod.parse,o=Ki(()=>cz(t)),n=(h)=>{let f=new Ul([\"shape\",\"payload\",\"ctx\"]),b=o.value,I=(M)=>{let k=Il(M);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};f.write(\"const input = payload.value;\");let x=Object.create(null),J=0;for(let M of b.keys)x[M]=`key_${J++}`;f.write(\"const newResult = {};\");for(let M of b.keys){let k=x[M],N=Il(M),K=h[M],de=K?._zod?.optin===\"optional\",Be=K?._zod?.optout===\"optional\";if(f.write(`const ${k} = ${I(M)};`),de&&Be)f.write(`\n if (${k}.issues.length) {\n if (${N} in input) {\n payload.issues = payload.issues.concat(${k}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${N}, ...iss.path] : [${N}]\n })));\n }\n }\n \n if (${k}.value === undefined) {\n if (${N} in input) {\n newResult[${N}] = undefined;\n }\n } else {\n newResult[${N}] = ${k}.value;\n }\n \n `);else if(!de)f.write(`\n const ${k}_present = ${N} in input;\n if (${k}.issues.length) {\n payload.issues = payload.issues.concat(${k}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${N}, ...iss.path] : [${N}]\n })));\n }\n if (!${k}_present && !${k}.issues.length) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [${N}]\n });\n }\n\n if (${k}_present) {\n if (${k}.value === undefined) {\n newResult[${N}] = undefined;\n } else {\n newResult[${N}] = ${k}.value;\n }\n }\n\n `);else f.write(`\n if (${k}.issues.length) {\n payload.issues = payload.issues.concat(${k}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${N}, ...iss.path] : [${N}]\n })));\n }\n \n if (${k}.value === undefined) {\n if (${N} in input) {\n newResult[${N}] = undefined;\n }\n } else {\n newResult[${N}] = ${k}.value;\n }\n \n `)}f.write(\"payload.value = newResult;\"),f.write(\"return payload;\");let re=f.compile();return(M,k)=>re(h,M,k)},i,s=Ko,a=!Go.jitless,u=a&&g_.value,l=t.catchall,m;e._zod.parse=(h,f)=>{m??(m=o.value);let b=h.value;if(!s(b))return h.issues.push({expected:\"object\",code:\"invalid_type\",input:b,inst:e}),h;if(a&&u&&f?.async===!1&&f.jitless!==!0){if(!i)i=n(t.shape);if(h=i(h,f),!l)return h;return uz([],b,h,f,m,e)}return r(h,f)}});function $S(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter((i)=>!Jr(i));if(n.length===1)return t.value=n[0].value,n[0];return t.issues.push({code:\"invalid_union\",input:t.value,inst:r,errors:e.map((i)=>i.issues.map((s)=>ut(s,o,Ye())))}),t}var Vl=S(\"$ZodUnion\",(e,t)=>{se.init(e,t),B(e._zod,\"optin\",()=>t.options.some((o)=>o._zod.optin===\"optional\")?\"optional\":void 0),B(e._zod,\"optout\",()=>t.options.some((o)=>o._zod.optout===\"optional\")?\"optional\":void 0),B(e._zod,\"values\",()=>{if(t.options.every((o)=>o._zod.values))return new Set(t.options.flatMap((o)=>Array.from(o._zod.values)));return}),B(e._zod,\"pattern\",()=>{if(t.options.every((o)=>o._zod.pattern)){let o=t.options.map((n)=>n._zod.pattern);return new RegExp(`^(${o.map((n)=>Jc(n.source)).join(\"|\")})$`)}return});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},n);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}if(!i)return $S(s,o,e,n);return Promise.all(s).then((a)=>$S(a,o,e,n))}});var pz=S(\"$ZodDiscriminatedUnion\",(e,t)=>{t.inclusive=!1,Vl.init(e,t);let r=e._zod.parse;B(e._zod,\"propValues\",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw Error(`Invalid discriminated union option at index \"${t.options.indexOf(i)}\"`);for(let[a,c]of Object.entries(s)){if(!n[a])n[a]=new Set;for(let u of c)n[a].add(u)}}return n});let o=Ki(()=>{let n=t.options,i=new Map;for(let s of n){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw Error(`Invalid discriminated union option at index \"${t.options.indexOf(s)}\"`);for(let c of a){if(i.has(c))throw Error(`Duplicate discriminator value \"${String(c)}\"`);i.set(c,s)}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!Ko(s))return n.issues.push({code:\"invalid_type\",expected:\"object\",input:s,inst:e}),n;let a=o.value.get(s?.[t.discriminator]);if(a)return a._zod.run(n,i);if(t.unionFallback||i.direction===\"backward\")return r(n,i);return n.issues.push({code:\"invalid_union\",errors:[],note:\"No matching discriminator\",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),n}}),dz=S(\"$ZodIntersection\",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);if(i instanceof Promise||s instanceof Promise)return Promise.all([i,s]).then(([c,u])=>kS(r,c,u));return kS(r,i,s)}});function Dl(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Vr(e)&&Vr(t)){let r=Object.keys(t),o=Object.keys(e).filter((i)=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=Dl(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=Dl(n,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function kS(e,t,r){let o=new Map,n;for(let a of t.issues)if(a.code===\"unrecognized_keys\"){n??(n=a);for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).l=!0}}else e.issues.push(a);for(let a of r.issues)if(a.code===\"unrecognized_keys\")for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).r=!0}else e.issues.push(a);let i=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&n)e.issues.push({...n,keys:i});if(Jr(e))return e;let s=Dl(t.value,r.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var mz=S(\"$ZodRecord\",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Vr(n))return r.issues.push({expected:\"record\",code:\"invalid_type\",input:n,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let a=new Set;for(let u of s)if(typeof u===\"string\"||typeof u===\"number\"||typeof u===\"symbol\"){a.add(typeof u===\"number\"?u.toString():u);let l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(l.issues.length){r.issues.push({code:\"invalid_key\",origin:\"record\",issues:l.issues.map((f)=>ut(f,o,Ye())),input:u,path:[u],inst:e});continue}let m=l.value,h=t.valueType._zod.run({value:n[u],issues:[]},o);if(h instanceof Promise)i.push(h.then((f)=>{if(f.issues.length)r.issues.push(...or(u,f.issues));r.value[m]=f.value}));else{if(h.issues.length)r.issues.push(...or(u,h.issues));r.value[m]=h.value}}let c;for(let u in n)if(!a.has(u))c=c??[],c.push(u);if(c&&c.length>0)r.issues.push({code:\"unrecognized_keys\",input:n,inst:e,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(n)){if(a===\"__proto__\")continue;if(!Object.prototype.propertyIsEnumerable.call(n,a))continue;let c=t.keyType._zod.run({value:a,issues:[]},o);if(c instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(typeof a===\"string\"&&Ml.test(a)&&c.issues.length){let m=t.keyType._zod.run({value:Number(a),issues:[]},o);if(m instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(m.issues.length===0)c=m}if(c.issues.length){if(t.mode===\"loose\")r.value[a]=n[a];else r.issues.push({code:\"invalid_key\",origin:\"record\",issues:c.issues.map((m)=>ut(m,o,Ye())),input:a,path:[a],inst:e});continue}let l=t.valueType._zod.run({value:n[a],issues:[]},o);if(l instanceof Promise)i.push(l.then((m)=>{if(m.issues.length)r.issues.push(...or(a,m.issues));r.value[c.value]=m.value}));else{if(l.issues.length)r.issues.push(...or(a,l.issues));r.value[c.value]=l.value}}}if(i.length)return Promise.all(i).then(()=>r);return r}});var hz=S(\"$ZodEnum\",(e,t)=>{se.init(e,t);let r=Fc(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter((n)=>__.has(typeof n)).map((n)=>typeof n===\"string\"?rr(n):n.toString()).join(\"|\")})$`),e._zod.parse=(n,i)=>{let s=n.value;if(o.has(s))return n;return n.issues.push({code:\"invalid_value\",values:r,input:s,inst:e}),n}}),fz=S(\"$ZodLiteral\",(e,t)=>{if(se.init(e,t),t.values.length===0)throw Error(\"Cannot create literal schema with no valid values\");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map((o)=>typeof o===\"string\"?rr(o):o?rr(o.toString()):String(o)).join(\"|\")})$`),e._zod.parse=(o,n)=>{let i=o.value;if(r.has(i))return o;return o.issues.push({code:\"invalid_value\",values:t.values,input:i,inst:e}),o}});var gz=S(\"$ZodTransform\",(e,t)=>{se.init(e,t),e._zod.optin=\"optional\",e._zod.parse=(r,o)=>{if(o.direction===\"backward\")throw new Wi(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then((s)=>(r.value=s,r.fallback=!0,r));if(n instanceof Promise)throw new Ot;return r.value=n,r.fallback=!0,r}});function RS(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var Jl=S(\"$ZodOptional\",(e,t)=>{se.init(e,t),e._zod.optin=\"optional\",e._zod.optout=\"optional\",B(e._zod,\"values\",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),B(e._zod,\"pattern\",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Jc(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin===\"optional\"){let n=r.value,i=t.innerType._zod.run(r,o);if(i instanceof Promise)return i.then((s)=>RS(s,n));return RS(i,n)}if(r.value===void 0)return r;return t.innerType._zod.run(r,o)}}),_z=S(\"$ZodExactOptional\",(e,t)=>{Jl.init(e,t),B(e._zod,\"values\",()=>t.innerType._zod.values),B(e._zod,\"pattern\",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),Sz=S(\"$ZodNullable\",(e,t)=>{se.init(e,t),B(e._zod,\"optin\",()=>t.innerType._zod.optin),B(e._zod,\"optout\",()=>t.innerType._zod.optout),B(e._zod,\"pattern\",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Jc(r.source)}|null)$`):void 0}),B(e._zod,\"values\",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>{if(r.value===null)return r;return t.innerType._zod.run(r,o)}}),zz=S(\"$ZodDefault\",(e,t)=>{se.init(e,t),e._zod.optin=\"optional\",B(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>PS(i,t));return PS(n,t)}});function PS(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var bz=S(\"$ZodPrefault\",(e,t)=>{se.init(e,t),e._zod.optin=\"optional\",B(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(r,o);if(r.value===void 0)r.value=t.defaultValue;return t.innerType._zod.run(r,o)}}),yz=S(\"$ZodNonOptional\",(e,t)=>{se.init(e,t),B(e._zod,\"values\",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter((o)=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>TS(i,e));return TS(n,e)}});function TS(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:e.value,inst:t});return e}var vz=S(\"$ZodCatch\",(e,t)=>{se.init(e,t),e._zod.optin=\"optional\",B(e._zod,\"optout\",()=>t.innerType._zod.optout),B(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>{if(r.value=i.value,i.issues.length)r.value=t.catchValue({...r,error:{issues:i.issues.map((s)=>ut(s,o,Ye()))},input:r.value}),r.issues=[],r.fallback=!0;return r});if(r.value=n.value,n.issues.length)r.value=t.catchValue({...r,error:{issues:n.issues.map((i)=>ut(i,o,Ye()))},input:r.value}),r.issues=[],r.fallback=!0;return r}});var Hl=S(\"$ZodPipe\",(e,t)=>{se.init(e,t),B(e._zod,\"values\",()=>t.in._zod.values),B(e._zod,\"optin\",()=>t.in._zod.optin),B(e._zod,\"optout\",()=>t.out._zod.optout),B(e._zod,\"propValues\",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction===\"backward\"){let i=t.out._zod.run(r,o);if(i instanceof Promise)return i.then((s)=>Yc(s,t.in,o));return Yc(i,t.in,o)}let n=t.in._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>Yc(i,t.out,o));return Yc(n,t.out,o)}});function Yc(e,t,r){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var xz=S(\"$ZodPreprocess\",(e,t)=>{Hl.init(e,t)}),wz=S(\"$ZodReadonly\",(e,t)=>{se.init(e,t),B(e._zod,\"propValues\",()=>t.innerType._zod.propValues),B(e._zod,\"values\",()=>t.innerType._zod.values),B(e._zod,\"optin\",()=>t.innerType?._zod?.optin),B(e._zod,\"optout\",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then(ES);return ES(n)}});function ES(e){return e.value=Object.freeze(e.value),e}var $z=S(\"$ZodLazy\",(e,t)=>{se.init(e,t),B(e._zod,\"innerType\",()=>{let r=t;if(!r._cachedInner)r._cachedInner=t.getter();return r._cachedInner}),B(e._zod,\"pattern\",()=>e._zod.innerType?._zod?.pattern),B(e._zod,\"propValues\",()=>e._zod.innerType?._zod?.propValues),B(e._zod,\"optin\",()=>e._zod.innerType?._zod?.optin??void 0),B(e._zod,\"optout\",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),kz=S(\"$ZodCustom\",(e,t)=>{Ie.init(e,t),se.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=(r)=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then((i)=>IS(i,r,o,e));IS(n,r,o,e);return}});function IS(e,t,r,o){if(!e){let n={code:\"custom\",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};if(o._zod.def.params)n.params=o._zod.def.params;t.issues.push(Hr(n))}}var HR=()=>{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\"}};function t(n){return e[n]??null}let r={regex:\"input\",email:\"email address\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO datetime\",date:\"ISO date\",time:\"ISO time\",duration:\"ISO duration\",ipv4:\"IPv4 address\",ipv6:\"IPv6 address\",mac:\"MAC address\",cidrv4:\"IPv4 range\",cidrv6:\"IPv6 range\",base64:\"base64-encoded string\",base64url:\"base64url-encoded string\",json_string:\"JSON string\",e164:\"E.164 number\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\"};return(n)=>{switch(n.code){case\"invalid_type\":{let i=o[n.expected]??n.expected,s=y_(n.input),a=o[s]??s;return`Invalid input: expected ${i}, received ${a}`}case\"invalid_value\":if(n.values.length===1)return`Invalid input: expected ${Zl(n.values[0])}`;return`Invalid option: expected one of ${El(n.values,\"|\")}`;case\"too_big\":{let i=n.inclusive?\"<=\":\"<\",s=t(n.origin);if(s)return`Too big: expected ${n.origin??\"value\"} to have ${i}${n.maximum.toString()} ${s.unit??\"elements\"}`;return`Too big: expected ${n.origin??\"value\"} to be ${i}${n.maximum.toString()}`}case\"too_small\":{let i=n.inclusive?\">=\":\">\",s=t(n.origin);if(s)return`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${s.unit}`;return`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case\"invalid_format\":{let i=n;if(i.format===\"starts_with\")return`Invalid string: must start with \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Invalid string: must end with \"${i.suffix}\"`;if(i.format===\"includes\")return`Invalid string: must include \"${i.includes}\"`;if(i.format===\"regex\")return`Invalid string: must match pattern ${i.pattern}`;return`Invalid ${r[i.format]??n.format}`}case\"not_multiple_of\":return`Invalid number: must be a multiple of ${n.divisor}`;case\"unrecognized_keys\":return`Unrecognized key${n.keys.length>1?\"s\":\"\"}: ${El(n.keys,\", \")}`;case\"invalid_key\":return`Invalid key in ${n.origin}`;case\"invalid_union\":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`Invalid discriminator value. Expected ${n.options.map((s)=>`'${s}'`).join(\" | \")}`;return\"Invalid input\";case\"invalid_element\":return`Invalid value in ${n.origin}`;default:return\"Invalid input\"}}};function Bl(){return{localeError:HR()}}var Rz,RZ=Symbol(\"ZodOutput\"),PZ=Symbol(\"ZodInput\");class Pz{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];if(this._map.set(e,r),r&&typeof r===\"object\"&&\"id\"in r)this._idmap.set(r.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t===\"object\"&&\"id\"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let o={...r,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function BR(){return new Pz}(Rz=globalThis).__zod_globalRegistry??(Rz.__zod_globalRegistry=BR());var Br=globalThis.__zod_globalRegistry;function Tz(e,t){return new e({type:\"string\",...Z(t)})}function Wl(e,t){return new e({type:\"string\",format:\"email\",check:\"string_format\",abort:!1,...Z(t)})}function Gl(e,t){return new e({type:\"string\",format:\"guid\",check:\"string_format\",abort:!1,...Z(t)})}function Ez(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,...Z(t)})}function Iz(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v4\",...Z(t)})}function Oz(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v6\",...Z(t)})}function Cz(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v7\",...Z(t)})}function Kl(e,t){return new e({type:\"string\",format:\"url\",check:\"string_format\",abort:!1,...Z(t)})}function Zz(e,t){return new e({type:\"string\",format:\"emoji\",check:\"string_format\",abort:!1,...Z(t)})}function Nz(e,t){return new e({type:\"string\",format:\"nanoid\",check:\"string_format\",abort:!1,...Z(t)})}function Az(e,t){return new e({type:\"string\",format:\"cuid\",check:\"string_format\",abort:!1,...Z(t)})}function jz(e,t){return new e({type:\"string\",format:\"cuid2\",check:\"string_format\",abort:!1,...Z(t)})}function Mz(e,t){return new e({type:\"string\",format:\"ulid\",check:\"string_format\",abort:!1,...Z(t)})}function qz(e,t){return new e({type:\"string\",format:\"xid\",check:\"string_format\",abort:!1,...Z(t)})}function Lz(e,t){return new e({type:\"string\",format:\"ksuid\",check:\"string_format\",abort:!1,...Z(t)})}function Uz(e,t){return new e({type:\"string\",format:\"ipv4\",check:\"string_format\",abort:!1,...Z(t)})}function Dz(e,t){return new e({type:\"string\",format:\"ipv6\",check:\"string_format\",abort:!1,...Z(t)})}function Fz(e,t){return new e({type:\"string\",format:\"cidrv4\",check:\"string_format\",abort:!1,...Z(t)})}function Vz(e,t){return new e({type:\"string\",format:\"cidrv6\",check:\"string_format\",abort:!1,...Z(t)})}function Jz(e,t){return new e({type:\"string\",format:\"base64\",check:\"string_format\",abort:!1,...Z(t)})}function Hz(e,t){return new e({type:\"string\",format:\"base64url\",check:\"string_format\",abort:!1,...Z(t)})}function Bz(e,t){return new e({type:\"string\",format:\"e164\",check:\"string_format\",abort:!1,...Z(t)})}function Wz(e,t){return new e({type:\"string\",format:\"jwt\",check:\"string_format\",abort:!1,...Z(t)})}function Gz(e,t){return new e({type:\"string\",format:\"datetime\",check:\"string_format\",offset:!1,local:!1,precision:null,...Z(t)})}function Kz(e,t){return new e({type:\"string\",format:\"date\",check:\"string_format\",...Z(t)})}function Yz(e,t){return new e({type:\"string\",format:\"time\",check:\"string_format\",precision:null,...Z(t)})}function Qz(e,t){return new e({type:\"string\",format:\"duration\",check:\"string_format\",...Z(t)})}function Xz(e,t){return new e({type:\"number\",checks:[],...Z(t)})}function eb(e,t){return new e({type:\"number\",check:\"number_format\",abort:!1,format:\"safeint\",...Z(t)})}function tb(e,t){return new e({type:\"boolean\",...Z(t)})}function rb(e,t){return new e({type:\"null\",...Z(t)})}function ob(e){return new e({type:\"unknown\"})}function nb(e,t){return new e({type:\"never\",...Z(t)})}function eu(e,t){return new ql({check:\"less_than\",...Z(t),value:e,inclusive:!1})}function ea(e,t){return new ql({check:\"less_than\",...Z(t),value:e,inclusive:!0})}function tu(e,t){return new Ll({check:\"greater_than\",...Z(t),value:e,inclusive:!1})}function ta(e,t){return new Ll({check:\"greater_than\",...Z(t),value:e,inclusive:!0})}function ru(e,t){return new lS({check:\"multiple_of\",...Z(t),value:e})}function ou(e,t){return new dS({check:\"max_length\",...Z(t),maximum:e})}function Yo(e,t){return new mS({check:\"min_length\",...Z(t),minimum:e})}function nu(e,t){return new hS({check:\"length_equals\",...Z(t),length:e})}function Yl(e,t){return new fS({check:\"string_format\",format:\"regex\",...Z(t),pattern:e})}function Ql(e){return new gS({check:\"string_format\",format:\"lowercase\",...Z(e)})}function Xl(e){return new _S({check:\"string_format\",format:\"uppercase\",...Z(e)})}function ep(e,t){return new SS({check:\"string_format\",format:\"includes\",...Z(t),includes:e})}function tp(e,t){return new zS({check:\"string_format\",format:\"starts_with\",...Z(t),prefix:e})}function rp(e,t){return new bS({check:\"string_format\",format:\"ends_with\",...Z(t),suffix:e})}function nr(e){return new yS({check:\"overwrite\",tx:e})}function op(e){return nr((t)=>t.normalize(e))}function np(){return nr((e)=>e.trim())}function sp(){return nr((e)=>e.toLowerCase())}function ip(){return nr((e)=>e.toUpperCase())}function ap(){return nr((e)=>f_(e))}function sb(e,t,r){return new e({type:\"array\",element:t,...Z(r)})}function ib(e,t,r){return new e({type:\"custom\",check:\"custom\",fn:t,...Z(r)})}function ab(e,t){let r=WR((o)=>(o.addIssue=(n)=>{if(typeof n===\"string\")o.issues.push(Hr(n,o.value,r._zod.def));else{let i=n;if(i.fatal)i.continue=!1;i.code??(i.code=\"custom\"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(Hr(i))}},e(o.value,o)),t);return r}function WR(e,t){let r=new Ie({check:\"custom\",...Z(t)});return r._zod.check=e,r}function oa(e){let t=e?.target??\"draft-2020-12\";if(t===\"draft-4\")t=\"draft-04\";if(t===\"draft-7\")t=\"draft-07\";return{processors:e.processors??{},metadataRegistry:e?.metadata??Br,target:t,unrepresentable:e?.unrepresentable??\"throw\",override:e?.override??(()=>{}),io:e?.io??\"output\",counter:0,seen:new Map,cycles:e?.cycles??\"ref\",reused:e?.reused??\"inline\",external:e?.external??void 0}}function ee(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i){if(i.count++,r.schemaPath.includes(e))i.cycle=r.path;return i.schema}let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else{let h=s.schema,f=t.processors[n.type];if(!f)throw Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(e,t,h,l)}let m=e._zod.parent;if(m){if(!s.ref)s.ref=m;ee(m,t,l),t.seen.get(m).isParent=!0}}let c=t.metadataRegistry.get(e);if(c)Object.assign(s.schema,c);if(t.io===\"input\"&&Le(e))delete s.schema.examples,delete s.schema.default;if(t.io===\"input\"&&\"_prefault\"in s.schema)(o=s.schema).default??(o.default=s.schema._prefault);return delete s.schema._prefault,t.seen.get(e).schema}function na(e,t){let r=e.seen.get(t);if(!r)throw Error(\"Unprocessed schema. This is a bug in Zod.\");let o=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=o.get(a);if(c&&c!==s[0])throw Error(`Duplicate schema id \"${a}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,s[0])}}let n=(s)=>{let a=e.target===\"draft-2020-12\"?\"$defs\":\"definitions\";if(e.external){let m=e.external.registry.get(s[0])?.id,h=e.external.uri??((b)=>b);if(m)return{ref:h(m)};let f=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=f,{defId:f,ref:`${h(\"__shared\")}#/${a}/${f}`}}if(s[1]===r)return{ref:\"#\"};let u=`${\"#\"}/${a}/`,l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},i=(s)=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:u}=n(s);if(a.def={...a.schema},u)a.defId=u;let l=a.schema;for(let m in l)delete l[m];l.$ref=c};if(e.cycles===\"throw\")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join(\"/\")}/<root>\n\nSet the \\`cycles\\` parameter to \\`\"ref\"\\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){i(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1){if(e.reused===\"ref\"){i(s);continue}}}}function sa(e,t){let r=e.seen.get(t);if(!r)throw Error(\"Unprocessed schema. This is a bug in Zod.\");let o=(a)=>{let c=e.seen.get(a);if(c.ref===null)return;let u=c.def??c.schema,l={...u},m=c.ref;if(c.ref=null,m){o(m);let f=e.seen.get(m),b=f.schema;if(b.$ref&&(e.target===\"draft-07\"||e.target===\"draft-04\"||e.target===\"openapi-3.0\"))u.allOf=u.allOf??[],u.allOf.push(b);else Object.assign(u,b);if(Object.assign(u,l),a._zod.parent===m)for(let x in u){if(x===\"$ref\"||x===\"allOf\")continue;if(!(x in l))delete u[x]}if(b.$ref&&f.def)for(let x in u){if(x===\"$ref\"||x===\"allOf\")continue;if(x in f.def&&JSON.stringify(u[x])===JSON.stringify(f.def[x]))delete u[x]}}let h=a._zod.parent;if(h&&h!==m){o(h);let f=e.seen.get(h);if(f?.schema.$ref){if(u.$ref=f.schema.$ref,f.def)for(let b in u){if(b===\"$ref\"||b===\"allOf\")continue;if(b in f.def&&JSON.stringify(u[b])===JSON.stringify(f.def[b]))delete u[b]}}}e.override({zodSchema:a,jsonSchema:u,path:c.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);let n={};if(e.target===\"draft-2020-12\")n.$schema=\"https://json-schema.org/draft/2020-12/schema\";else if(e.target===\"draft-07\")n.$schema=\"http://json-schema.org/draft-07/schema#\";else if(e.target===\"draft-04\")n.$schema=\"http://json-schema.org/draft-04/schema#\";else if(e.target===\"openapi-3.0\");if(e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw Error(\"Schema is missing an `id` property\");n.$id=e.external.uri(a)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;if(i!==void 0&&n.id===i)delete n.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let c=a[1];if(c.def&&c.defId){if(c.def.id===c.defId)delete c.def.id;s[c.defId]=c.def}}if(e.external);else if(Object.keys(s).length>0)if(e.target===\"draft-2020-12\")n.$defs=s;else n.definitions=s;try{let a=JSON.parse(JSON.stringify(n));return Object.defineProperty(a,\"~standard\",{value:{...t[\"~standard\"],jsonSchema:{input:ra(t,\"input\",e.processors),output:ra(t,\"output\",e.processors)}},enumerable:!1,writable:!1}),a}catch(a){throw Error(\"Error converting schema to JSON.\")}}function Le(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type===\"transform\")return!0;if(o.type===\"array\")return Le(o.element,r);if(o.type===\"set\")return Le(o.valueType,r);if(o.type===\"lazy\")return Le(o.getter(),r);if(o.type===\"promise\"||o.type===\"optional\"||o.type===\"nonoptional\"||o.type===\"nullable\"||o.type===\"readonly\"||o.type===\"default\"||o.type===\"prefault\")return Le(o.innerType,r);if(o.type===\"intersection\")return Le(o.left,r)||Le(o.right,r);if(o.type===\"record\"||o.type===\"map\")return Le(o.keyType,r)||Le(o.valueType,r);if(o.type===\"pipe\"){if(e._zod.traits.has(\"$ZodCodec\"))return!0;return Le(o.in,r)||Le(o.out,r)}if(o.type===\"object\"){for(let n in o.shape)if(Le(o.shape[n],r))return!0;return!1}if(o.type===\"union\"){for(let n of o.options)if(Le(n,r))return!0;return!1}if(o.type===\"tuple\"){for(let n of o.items)if(Le(n,r))return!0;if(o.rest&&Le(o.rest,r))return!0;return!1}return!1}var cb=(e,t={})=>(r)=>{let o=oa({...r,processors:t});return ee(e,o),na(o,e),sa(o,e)},ra=(e,t,r={})=>(o)=>{let{libraryOptions:n,target:i}=o??{},s=oa({...n??{},target:i,io:t,processors:r});return ee(e,s),na(s,e),sa(s,e)};var GR={guid:\"uuid\",url:\"uri\",datetime:\"date-time\",json_string:\"json-string\",regex:\"\"},cp=(e,t,r,o)=>{let n=r;n.type=\"string\";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i===\"number\")n.minLength=i;if(typeof s===\"number\")n.maxLength=s;if(a){if(n.format=GR[a]??a,n.format===\"\")delete n.format;if(a===\"time\")delete n.format}if(u)n.contentEncoding=u;if(c&&c.size>0){let l=[...c];if(l.length===1)n.pattern=l[0].source;else if(l.length>1)n.allOf=[...l.map((m)=>({...t.target===\"draft-07\"||t.target===\"draft-04\"||t.target===\"openapi-3.0\"?{type:\"string\"}:{},pattern:m.source}))]}},up=(e,t,r,o)=>{let n=r,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;if(typeof a===\"string\"&&a.includes(\"int\"))n.type=\"integer\";else n.type=\"number\";let m=typeof l===\"number\"&&l>=(i??Number.NEGATIVE_INFINITY),h=typeof u===\"number\"&&u<=(s??Number.POSITIVE_INFINITY),f=t.target===\"draft-04\"||t.target===\"openapi-3.0\";if(m)if(f)n.minimum=l,n.exclusiveMinimum=!0;else n.exclusiveMinimum=l;else if(typeof i===\"number\")n.minimum=i;if(h)if(f)n.maximum=u,n.exclusiveMaximum=!0;else n.exclusiveMaximum=u;else if(typeof s===\"number\")n.maximum=s;if(typeof c===\"number\")n.multipleOf=c},lp=(e,t,r,o)=>{r.type=\"boolean\"},lb=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"BigInt cannot be represented in JSON Schema\")},pb=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Symbols cannot be represented in JSON Schema\")},pp=(e,t,r,o)=>{if(t.target===\"openapi-3.0\")r.type=\"string\",r.nullable=!0,r.enum=[null];else r.type=\"null\"},db=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Undefined cannot be represented in JSON Schema\")},mb=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Void cannot be represented in JSON Schema\")},dp=(e,t,r,o)=>{r.not={}},hb=(e,t,r,o)=>{},mp=(e,t,r,o)=>{},fb=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Date cannot be represented in JSON Schema\")},hp=(e,t,r,o)=>{let n=e._zod.def,i=Fc(n.entries);if(i.every((s)=>typeof s===\"number\"))r.type=\"number\";if(i.every((s)=>typeof s===\"string\"))r.type=\"string\";r.enum=i},fp=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let s of n.values)if(s===void 0){if(t.unrepresentable===\"throw\")throw Error(\"Literal `undefined` cannot be represented in JSON Schema\")}else if(typeof s===\"bigint\")if(t.unrepresentable===\"throw\")throw Error(\"BigInt literals cannot be represented in JSON Schema\");else i.push(Number(s));else i.push(s);if(i.length===0);else if(i.length===1){let s=i[0];if(r.type=s===null?\"null\":typeof s,t.target===\"draft-04\"||t.target===\"openapi-3.0\")r.enum=[s];else r.const=s}else{if(i.every((s)=>typeof s===\"number\"))r.type=\"number\";if(i.every((s)=>typeof s===\"string\"))r.type=\"string\";if(i.every((s)=>typeof s===\"boolean\"))r.type=\"boolean\";if(i.every((s)=>s===null))r.type=\"null\";r.enum=i}},gb=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"NaN cannot be represented in JSON Schema\")},_b=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw Error(\"Pattern not found in template literal\");n.type=\"string\",n.pattern=i.source},Sb=(e,t,r,o)=>{let n=r,i={type:\"string\",format:\"binary\",contentEncoding:\"binary\"},{minimum:s,maximum:a,mime:c}=e._zod.bag;if(s!==void 0)i.minLength=s;if(a!==void 0)i.maxLength=a;if(c)if(c.length===1)i.contentMediaType=c[0],Object.assign(n,i);else Object.assign(n,i),n.anyOf=c.map((u)=>({contentMediaType:u}));else Object.assign(n,i)},zb=(e,t,r,o)=>{r.type=\"boolean\"},gp=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Custom types cannot be represented in JSON Schema\")},bb=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Function types cannot be represented in JSON Schema\")},_p=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Transforms cannot be represented in JSON Schema\")},yb=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Map cannot be represented in JSON Schema\")},vb=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Set cannot be represented in JSON Schema\")},Sp=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;if(typeof s===\"number\")n.minItems=s;if(typeof a===\"number\")n.maxItems=a;n.type=\"array\",n.items=ee(i.element,t,{...o,path:[...o.path,\"items\"]})},zp=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type=\"object\",n.properties={};let s=i.shape;for(let u in s)n.properties[u]=ee(s[u],t,{...o,path:[...o.path,\"properties\",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter((u)=>{let l=i.shape[u]._zod;if(t.io===\"input\")return l.optin===void 0;else return l.optout===void 0}));if(c.size>0)n.required=Array.from(c);if(i.catchall?._zod.def.type===\"never\")n.additionalProperties=!1;else if(!i.catchall){if(t.io===\"output\")n.additionalProperties=!1}else if(i.catchall)n.additionalProperties=ee(i.catchall,t,{...o,path:[...o.path,\"additionalProperties\"]})},bp=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,s=n.options.map((a,c)=>ee(a,t,{...o,path:[...o.path,i?\"oneOf\":\"anyOf\",c]}));if(i)r.oneOf=s;else r.anyOf=s},yp=(e,t,r,o)=>{let n=e._zod.def,i=ee(n.left,t,{...o,path:[...o.path,\"allOf\",0]}),s=ee(n.right,t,{...o,path:[...o.path,\"allOf\",1]}),a=(u)=>(\"allOf\"in u)&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c},xb=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type=\"array\";let s=t.target===\"draft-2020-12\"?\"prefixItems\":\"items\",a=t.target===\"draft-2020-12\"?\"items\":t.target===\"openapi-3.0\"?\"items\":\"additionalItems\",c=i.items.map((h,f)=>ee(h,t,{...o,path:[...o.path,s,f]})),u=i.rest?ee(i.rest,t,{...o,path:[...o.path,a,...t.target===\"openapi-3.0\"?[i.items.length]:[]]}):null;if(t.target===\"draft-2020-12\"){if(n.prefixItems=c,u)n.items=u}else if(t.target===\"openapi-3.0\"){if(n.items={anyOf:c},u)n.items.anyOf.push(u);if(n.minItems=c.length,!u)n.maxItems=c.length}else if(n.items=c,u)n.additionalItems=u;let{minimum:l,maximum:m}=e._zod.bag;if(typeof l===\"number\")n.minItems=l;if(typeof m===\"number\")n.maxItems=m},vp=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type=\"object\";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode===\"loose\"&&c&&c.size>0){let l=ee(i.valueType,t,{...o,path:[...o.path,\"patternProperties\",\"*\"]});n.patternProperties={};for(let m of c)n.patternProperties[m.source]=l}else{if(t.target===\"draft-07\"||t.target===\"draft-2020-12\")n.propertyNames=ee(i.keyType,t,{...o,path:[...o.path,\"propertyNames\"]});n.additionalProperties=ee(i.valueType,t,{...o,path:[...o.path,\"additionalProperties\"]})}let u=s._zod.values;if(u){let l=[...u].filter((m)=>typeof m===\"string\"||typeof m===\"number\");if(l.length>0)n.required=l}},xp=(e,t,r,o)=>{let n=e._zod.def,i=ee(n.innerType,t,o),s=t.seen.get(e);if(t.target===\"openapi-3.0\")s.ref=n.innerType,r.nullable=!0;else r.anyOf=[i,{type:\"null\"}]},wp=(e,t,r,o)=>{let n=e._zod.def;ee(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},$p=(e,t,r,o)=>{let n=e._zod.def;ee(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},kp=(e,t,r,o)=>{let n=e._zod.def;ee(n.innerType,t,o);let i=t.seen.get(e);if(i.ref=n.innerType,t.io===\"input\")r._prefault=JSON.parse(JSON.stringify(n.defaultValue))},Rp=(e,t,r,o)=>{let n=e._zod.def;ee(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw Error(\"Dynamic catch values are not supported in JSON Schema\")}r.default=s},Pp=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has(\"$ZodTransform\"),s=t.io===\"input\"?i?n.out:n.in:n.out;ee(s,t,o);let a=t.seen.get(e);a.ref=s},Tp=(e,t,r,o)=>{let n=e._zod.def;ee(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},wb=(e,t,r,o)=>{let n=e._zod.def;ee(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},su=(e,t,r,o)=>{let n=e._zod.def;ee(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Ep=(e,t,r,o)=>{let n=e._zod.innerType;ee(n,t,o);let i=t.seen.get(e);i.ref=n},ub={string:cp,number:up,boolean:lp,bigint:lb,symbol:pb,null:pp,undefined:db,void:mb,never:dp,any:hb,unknown:mp,date:fb,enum:hp,literal:fp,nan:gb,template_literal:_b,file:Sb,success:zb,custom:gp,function:bb,transform:_p,map:yb,set:vb,array:Sp,object:zp,union:bp,intersection:yp,tuple:xb,record:vp,nullable:xp,nonoptional:wp,default:$p,prefault:kp,catch:Rp,pipe:Pp,readonly:Tp,promise:wb,optional:su,lazy:Ep};function iu(e,t){if(\"_idmap\"in e){let o=e,n=oa({...t,processors:ub}),i={};for(let c of o._idmap.entries()){let[u,l]=c;ee(l,n)}let s={},a={registry:o,uri:t?.uri,defs:i};n.external=a;for(let c of o._idmap.entries()){let[u,l]=c;na(n,l),s[u]=sa(n,l)}if(Object.keys(i).length>0){let c=n.target===\"draft-2020-12\"?\"$defs\":\"definitions\";s.__shared={[c]:i}}return{schemas:s}}let r=oa({...t,processors:ub});return ee(e,r),na(r,e),sa(r,e)}var oP=S(\"ZodISODateTime\",(e,t)=>{FS.init(e,t),ge.init(e,t)});function aa(e){return Gz(oP,e)}var nP=S(\"ZodISODate\",(e,t)=>{VS.init(e,t),ge.init(e,t)});function Ip(e){return Kz(nP,e)}var sP=S(\"ZodISOTime\",(e,t)=>{JS.init(e,t),ge.init(e,t)});function $b(e){return Yz(sP,e)}var iP=S(\"ZodISODuration\",(e,t)=>{HS.init(e,t),ge.init(e,t)});function kb(e){return Qz(iP,e)}var cP=(e,t)=>{Bc.init(e,t),e.name=\"ZodError\",Object.defineProperties(e,{format:{value:(r)=>w_(e,r)},flatten:{value:(r)=>x_(e,r)},addIssue:{value:(r)=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Gi,2)}},addIssues:{value:(r)=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Gi,2)}},isEmpty:{get(){return e.issues.length===0}}})};var Qe=S(\"ZodError\",cP,{Parent:Error});var Rb=Wc(Qe),Pb=Gc(Qe),au=Yi(Qe),Tb=Qi(Qe),Eb=R_(Qe),Ib=P_(Qe),Ob=T_(Qe),Cb=E_(Qe),Zb=I_(Qe),Nb=O_(Qe),Ab=C_(Qe),jb=Z_(Qe);var Mb=new WeakMap;function ca(e,t,r){let o=Object.getPrototypeOf(e),n=Mb.get(o);if(!n)n=new Set,Mb.set(o,n);if(n.has(t))return;n.add(t);for(let i in r){let s=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}var ue=S(\"ZodType\",(e,t)=>(se.init(e,t),Object.assign(e[\"~standard\"],{jsonSchema:{input:ra(e,\"input\"),output:ra(e,\"output\")}}),e.toJSONSchema=cb(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,\"_def\",{value:t}),e.parse=(r,o)=>Rb(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>au(e,r,o),e.parseAsync=async(r,o)=>Pb(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Tb(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>Eb(e,r,o),e.decode=(r,o)=>Ib(e,r,o),e.encodeAsync=async(r,o)=>Ob(e,r,o),e.decodeAsync=async(r,o)=>Cb(e,r,o),e.safeEncode=(r,o)=>Zb(e,r,o),e.safeDecode=(r,o)=>Nb(e,r,o),e.safeEncodeAsync=async(r,o)=>Ab(e,r,o),e.safeDecodeAsync=async(r,o)=>jb(e,r,o),ca(e,\"ZodType\",{check(...r){let o=this.def;return this.clone(tr(o,{checks:[...o.checks??[],...r.map((n)=>typeof n===\"function\"?{_zod:{check:n,def:{check:\"custom\"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return zt(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(QP(r,o))},superRefine(r,o){return this.check(XP(r,o))},overwrite(r){return this.check(nr(r))},optional(){return D(this)},exactOptional(){return MP(this)},nullable(){return Db(this)},nullish(){return D(Db(this))},nonoptional(r){return VP(this,r)},array(){return R(this)},or(r){return q([this,r])},and(r){return Qo(this,r)},transform(r){return Fb(this,Qb(r))},default(r){return UP(this,r)},prefault(r){return FP(this,r)},catch(r){return HP(this,r)},pipe(r){return Fb(this,r)},readonly(){return GP(this)},describe(r){let o=this.clone();return Br.add(o,{description:r}),o},meta(...r){if(r.length===0)return Br.get(this);let o=this.clone();return Br.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,\"description\",{get(){return Br.get(e)?.description},configurable:!0}),e)),Vb=S(\"_ZodString\",(e,t)=>{Xc.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>cp(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,ca(e,\"_ZodString\",{regex(...o){return this.check(Yl(...o))},includes(...o){return this.check(ep(...o))},startsWith(...o){return this.check(tp(...o))},endsWith(...o){return this.check(rp(...o))},min(...o){return this.check(Yo(...o))},max(...o){return this.check(ou(...o))},length(...o){return this.check(nu(...o))},nonempty(...o){return this.check(Yo(1,...o))},lowercase(o){return this.check(Ql(o))},uppercase(o){return this.check(Xl(o))},trim(){return this.check(np())},normalize(...o){return this.check(op(...o))},toLowerCase(){return this.check(sp())},toUpperCase(){return this.check(ip())},slugify(){return this.check(ap())}})}),lP=S(\"ZodString\",(e,t)=>{Xc.init(e,t),Vb.init(e,t),e.email=(r)=>e.check(Wl(Jb,r)),e.url=(r)=>e.check(Kl(Bb,r)),e.jwt=(r)=>e.check(Wz($P,r)),e.emoji=(r)=>e.check(Zz(pP,r)),e.guid=(r)=>e.check(Gl(qb,r)),e.uuid=(r)=>e.check(Ez(cu,r)),e.uuidv4=(r)=>e.check(Iz(cu,r)),e.uuidv6=(r)=>e.check(Oz(cu,r)),e.uuidv7=(r)=>e.check(Cz(cu,r)),e.nanoid=(r)=>e.check(Nz(dP,r)),e.guid=(r)=>e.check(Gl(qb,r)),e.cuid=(r)=>e.check(Az(mP,r)),e.cuid2=(r)=>e.check(jz(hP,r)),e.ulid=(r)=>e.check(Mz(fP,r)),e.base64=(r)=>e.check(Jz(vP,r)),e.base64url=(r)=>e.check(Hz(xP,r)),e.xid=(r)=>e.check(qz(gP,r)),e.ksuid=(r)=>e.check(Lz(_P,r)),e.ipv4=(r)=>e.check(Uz(SP,r)),e.ipv6=(r)=>e.check(Dz(zP,r)),e.cidrv4=(r)=>e.check(Fz(bP,r)),e.cidrv6=(r)=>e.check(Vz(yP,r)),e.e164=(r)=>e.check(Bz(wP,r)),e.datetime=(r)=>e.check(aa(r)),e.date=(r)=>e.check(Ip(r)),e.time=(r)=>e.check($b(r)),e.duration=(r)=>e.check(kb(r))});function p(e){return Tz(lP,e)}var ge=S(\"ZodStringFormat\",(e,t)=>{ce.init(e,t),Vb.init(e,t)}),Jb=S(\"ZodEmail\",(e,t)=>{ZS.init(e,t),ge.init(e,t)});function Hb(e){return Wl(Jb,e)}var qb=S(\"ZodGUID\",(e,t)=>{OS.init(e,t),ge.init(e,t)});var cu=S(\"ZodUUID\",(e,t)=>{CS.init(e,t),ge.init(e,t)});var Bb=S(\"ZodURL\",(e,t)=>{NS.init(e,t),ge.init(e,t)});function Wb(e){return Kl(Bb,e)}var pP=S(\"ZodEmoji\",(e,t)=>{AS.init(e,t),ge.init(e,t)});var dP=S(\"ZodNanoID\",(e,t)=>{jS.init(e,t),ge.init(e,t)});var mP=S(\"ZodCUID\",(e,t)=>{MS.init(e,t),ge.init(e,t)});var hP=S(\"ZodCUID2\",(e,t)=>{qS.init(e,t),ge.init(e,t)});var fP=S(\"ZodULID\",(e,t)=>{LS.init(e,t),ge.init(e,t)});var gP=S(\"ZodXID\",(e,t)=>{US.init(e,t),ge.init(e,t)});var _P=S(\"ZodKSUID\",(e,t)=>{DS.init(e,t),ge.init(e,t)});var SP=S(\"ZodIPv4\",(e,t)=>{BS.init(e,t),ge.init(e,t)});var zP=S(\"ZodIPv6\",(e,t)=>{WS.init(e,t),ge.init(e,t)});var bP=S(\"ZodCIDRv4\",(e,t)=>{GS.init(e,t),ge.init(e,t)});var yP=S(\"ZodCIDRv6\",(e,t)=>{KS.init(e,t),ge.init(e,t)});var vP=S(\"ZodBase64\",(e,t)=>{QS.init(e,t),ge.init(e,t)});var xP=S(\"ZodBase64URL\",(e,t)=>{XS.init(e,t),ge.init(e,t)});var wP=S(\"ZodE164\",(e,t)=>{ez.init(e,t),ge.init(e,t)});var $P=S(\"ZodJWT\",(e,t)=>{tz.init(e,t),ge.init(e,t)});var Gb=S(\"ZodNumber\",(e,t)=>{Fl.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>up(e,o,n,i),ca(e,\"ZodNumber\",{gt(o,n){return this.check(tu(o,n))},gte(o,n){return this.check(ta(o,n))},min(o,n){return this.check(ta(o,n))},lt(o,n){return this.check(eu(o,n))},lte(o,n){return this.check(ea(o,n))},max(o,n){return this.check(ea(o,n))},int(o){return this.check(Lb(o))},safe(o){return this.check(Lb(o))},positive(o){return this.check(tu(0,o))},nonnegative(o){return this.check(ta(0,o))},negative(o){return this.check(eu(0,o))},nonpositive(o){return this.check(ea(0,o))},multipleOf(o,n){return this.check(ru(o,n))},step(o,n){return this.check(ru(o,n))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??\"\").includes(\"int\")||Number.isSafeInteger(r.multipleOf??0.5),e.isFinite=!0,e.format=r.format??null});function E(e){return Xz(Gb,e)}var kP=S(\"ZodNumberFormat\",(e,t)=>{rz.init(e,t),Gb.init(e,t)});function Lb(e){return eb(kP,e)}var RP=S(\"ZodBoolean\",(e,t)=>{oz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>lp(e,r,o,n)});function U(e){return tb(RP,e)}var PP=S(\"ZodNull\",(e,t)=>{nz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>pp(e,r,o,n)});function uu(e){return rb(PP,e)}var TP=S(\"ZodUnknown\",(e,t)=>{sz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>mp(e,r,o,n)});function L(){return ob(TP)}var EP=S(\"ZodNever\",(e,t)=>{iz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>dp(e,r,o,n)});function IP(e){return nb(EP,e)}var OP=S(\"ZodArray\",(e,t)=>{az.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Sp(e,r,o,n),e.element=t.element,ca(e,\"ZodArray\",{min(r,o){return this.check(Yo(r,o))},nonempty(r){return this.check(Yo(1,r))},max(r,o){return this.check(ou(r,o))},length(r,o){return this.check(nu(r,o))},unwrap(){return this.element}})});function R(e,t){return sb(OP,e,t)}var Kb=S(\"ZodObject\",(e,t)=>{lz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zp(e,r,o,n),B(e,\"shape\",()=>t.shape),ca(e,\"ZodObject\",{keyof(){return W(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:L()})},loose(){return this.clone({...this._zod.def,catchall:L()})},strict(){return this.clone({...this._zod.def,catchall:IP()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return AR(this,r)},safeExtend(r){return jR(this,r)},merge(r){return MR(this,r)},pick(r){return ZR(this,r)},omit(r){return NR(this,r)},partial(...r){return qR(Xb,this,r[0])},required(...r){return LR(ey,this,r[0])}})});function g(e,t){let r={type:\"object\",shape:e??{},...Z(t)};return new Kb(r)}function V(e,t){return new Kb({type:\"object\",shape:e,catchall:L(),...Z(t)})}var Yb=S(\"ZodUnion\",(e,t)=>{Vl.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>bp(e,r,o,n),e.options=t.options});function q(e,t){return new Yb({type:\"union\",options:e,...Z(t)})}var CP=S(\"ZodDiscriminatedUnion\",(e,t)=>{Yb.init(e,t),pz.init(e,t)});function Zp(e,t,r){return new CP({type:\"union\",options:t,discriminator:e,...Z(r)})}var ZP=S(\"ZodIntersection\",(e,t)=>{dz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>yp(e,r,o,n)});function Qo(e,t){return new ZP({type:\"intersection\",left:e,right:t})}var Ub=S(\"ZodRecord\",(e,t)=>{mz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>vp(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function j(e,t,r){if(!t||!t._zod)return new Ub({type:\"record\",keyType:p(),valueType:e,...Z(t)});return new Ub({type:\"record\",keyType:e,valueType:t,...Z(r)})}var Cp=S(\"ZodEnum\",(e,t)=>{hz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>hp(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new Cp({...t,checks:[],...Z(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw Error(`Key ${s} not found in enum`);return new Cp({...t,checks:[],...Z(n),entries:i})}});function W(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map((o)=>[o,o])):e;return new Cp({type:\"enum\",entries:r,...Z(t)})}var NP=S(\"ZodLiteral\",(e,t)=>{fz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>fp(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,\"value\",{get(){if(t.values.length>1)throw Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");return t.values[0]}})});function v(e,t){return new NP({type:\"literal\",values:Array.isArray(e)?e:[e],...Z(t)})}var AP=S(\"ZodTransform\",(e,t)=>{gz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>_p(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")throw new Wi(e.constructor.name);r.addIssue=(i)=>{if(typeof i===\"string\")r.issues.push(Hr(i,r.value,t));else{let s=i;if(s.fatal)s.continue=!1;s.code??(s.code=\"custom\"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Hr(s))}};let n=t.transform(r.value,r);if(n instanceof Promise)return n.then((i)=>(r.value=i,r.fallback=!0,r));return r.value=n,r.fallback=!0,r}});function Qb(e){return new AP({type:\"transform\",transform:e})}var Xb=S(\"ZodOptional\",(e,t)=>{Jl.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>su(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function D(e){return new Xb({type:\"optional\",innerType:e})}var jP=S(\"ZodExactOptional\",(e,t)=>{_z.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>su(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function MP(e){return new jP({type:\"optional\",innerType:e})}var qP=S(\"ZodNullable\",(e,t)=>{Sz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>xp(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Db(e){return new qP({type:\"nullable\",innerType:e})}var LP=S(\"ZodDefault\",(e,t)=>{zz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$p(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function UP(e,t){return new LP({type:\"default\",innerType:e,get defaultValue(){return typeof t===\"function\"?t():Cl(t)}})}var DP=S(\"ZodPrefault\",(e,t)=>{bz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>kp(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function FP(e,t){return new DP({type:\"prefault\",innerType:e,get defaultValue(){return typeof t===\"function\"?t():Cl(t)}})}var ey=S(\"ZodNonOptional\",(e,t)=>{yz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>wp(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function VP(e,t){return new ey({type:\"nonoptional\",innerType:e,...Z(t)})}var JP=S(\"ZodCatch\",(e,t)=>{vz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Rp(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function HP(e,t){return new JP({type:\"catch\",innerType:e,catchValue:typeof t===\"function\"?t:()=>t})}var ty=S(\"ZodPipe\",(e,t)=>{Hl.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pp(e,r,o,n),e.in=t.in,e.out=t.out});function Fb(e,t){return new ty({type:\"pipe\",in:e,out:t})}var BP=S(\"ZodPreprocess\",(e,t)=>{ty.init(e,t),xz.init(e,t)}),WP=S(\"ZodReadonly\",(e,t)=>{wz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tp(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function GP(e){return new WP({type:\"readonly\",innerType:e})}var KP=S(\"ZodLazy\",(e,t)=>{$z.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ep(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function Np(e){return new KP({type:\"lazy\",getter:e})}var YP=S(\"ZodCustom\",(e,t)=>{kz.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>gp(e,r,o,n)});function QP(e,t={}){return ib(YP,e,t)}function XP(e,t){return ab(e,t)}function lu(e,t){return new BP({type:\"pipe\",in:Qb(e),out:t})}Ye(Bl());var Up=Symbol.for(\"mcp.sdk.errorBrands\");function Gr(e,t){let r=new Set,o=t;while(typeof o===\"function\"){let n=o.mcpBrand;if(Object.prototype.hasOwnProperty.call(o,\"mcpBrand\")&&typeof n===\"string\")r.add(n);o=Object.getPrototypeOf(o)}if(r.size===0)return;Object.defineProperty(e,Up,{value:r,enumerable:!1,configurable:!0})}function Xe(e,t){try{if(typeof t===\"object\"&&t!==null&&Object.prototype.hasOwnProperty.call(e,\"mcpBrand\")&&typeof e.mcpBrand===\"string\"&&Object.prototype.hasOwnProperty.call(t,Up)){let r=t[Up];if(r&&typeof r.has===\"function\"&&r.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var e0=class e extends Error{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.OAuthError\"})}static[Symbol.hasInstance](t){return Xe(this,t)}static isInstance(t){if(typeof this!==\"function\")throw TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");return Xe(this,t)}constructor(t,r,o){super(r);this.code=t,this.errorUri=o,this.name=\"OAuthError\",Gr(this,new.target)}toResponseObject(){let t={error:this.code,error_description:this.message};if(this.errorUri)t.error_uri=this.errorUri;return t}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},Oe=function(e){return e.NotConnected=\"NOT_CONNECTED\",e.AlreadyConnected=\"ALREADY_CONNECTED\",e.NotInitialized=\"NOT_INITIALIZED\",e.CapabilityNotSupported=\"CAPABILITY_NOT_SUPPORTED\",e.RequestTimeout=\"REQUEST_TIMEOUT\",e.ConnectionClosed=\"CONNECTION_CLOSED\",e.SendFailed=\"SEND_FAILED\",e.InvalidResult=\"INVALID_RESULT\",e.UnsupportedResultType=\"UNSUPPORTED_RESULT_TYPE\",e.InputRequiredRoundsExceeded=\"INPUT_REQUIRED_ROUNDS_EXCEEDED\",e.ListPaginationExceeded=\"LIST_PAGINATION_EXCEEDED\",e.MethodNotSupportedByProtocolVersion=\"METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION\",e.EraNegotiationFailed=\"ERA_NEGOTIATION_FAILED\",e.ClientHttpNotImplemented=\"CLIENT_HTTP_NOT_IMPLEMENTED\",e.ClientHttpAuthentication=\"CLIENT_HTTP_AUTHENTICATION\",e.ClientHttpForbidden=\"CLIENT_HTTP_FORBIDDEN\",e.ClientHttpUnexpectedContent=\"CLIENT_HTTP_UNEXPECTED_CONTENT\",e.ClientHttpFailedToOpenStream=\"CLIENT_HTTP_FAILED_TO_OPEN_STREAM\",e.ClientHttpFailedToTerminateSession=\"CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION\",e}({}),ke=class extends Error{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.SdkError\"})}static[Symbol.hasInstance](e){return Xe(this,e)}static isInstance(e){if(typeof this!==\"function\")throw TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");return Xe(this,e)}constructor(e,t,r){super(t);this.code=e,this.data=r,this.name=\"SdkError\",Gr(this,new.target)}},t0=class extends ke{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.SdkHttpError\"})}constructor(e,t,r){super(e,t,r);this.name=\"SdkHttpError\"}get status(){return this.data.status}get statusText(){return this.data.statusText}};var r0=\"2026-07-28\";function dy(e){return e>=r0}function my(e){let t=e.structuredContent;if(t===void 0)return e;if(!(typeof t!==\"object\"||t===null||Array.isArray(t)))return e;if(e.content?.some((r)=>r.type===\"text\")??!1)return e;return{...e,content:[...e.content??[],{type:\"text\",text:JSON.stringify(t)}]}}var hy=[\"task\",\"inputRequests\",\"requestState\"];function o0(e){if(e===null||typeof e!==\"object\"||Array.isArray(e)||e.content!==void 0||hy.some((t)=>(t in e)))return e;return{...e,content:[]}}function n0(){let e=Np(()=>q([p(),E(),U(),uu(),j(p(),e),R(e)])),t=j(p(),e),r=q([p(),E().int()]),o=p(),n=g({ttl:E().optional()}),i=g({taskId:p()}),s=V({progressToken:r.optional(),\"io.modelcontextprotocol/related-task\":i.optional()}),a=g({_meta:s.optional()}),c=a.extend({task:n.optional()}),u=g({method:p(),params:a.loose().optional()}),l=g({_meta:s.optional()}),m=g({method:p(),params:l.loose().optional()}),h=V({_meta:s.optional()}),f=q([p(),E().int()]),b=h.strict(),I=l.extend({requestId:f.optional(),reason:p().optional()}),x=m.extend({method:v(\"notifications/cancelled\"),params:I}),J=g({src:p(),mimeType:p().optional(),sizes:R(p()).optional(),theme:W([\"light\",\"dark\"]).optional()}),re=g({icons:R(J).optional()}),M=g({name:p(),title:p().optional()}),k=M.extend({...M.shape,...re.shape,version:p(),websiteUrl:p().optional(),description:p().optional()}),N=Qo(g({applyDefaults:U().optional()}),t),K=lu((Ae)=>{if(Ae&&typeof Ae===\"object\"&&!Array.isArray(Ae)&&Object.keys(Ae).length===0)return{form:{}};return Ae},Qo(g({form:N.optional(),url:t.optional()}),t.optional())),de=V({list:t.optional(),cancel:t.optional(),requests:V({sampling:V({createMessage:t.optional()}).optional(),elicitation:V({create:t.optional()}).optional()}).optional()}),Be=V({list:t.optional(),cancel:t.optional(),requests:V({tools:V({call:t.optional()}).optional()}).optional()}),Me=g({experimental:j(p(),t).optional(),sampling:g({context:t.optional(),tools:t.optional()}).optional(),elicitation:K.optional(),roots:g({listChanged:U().optional()}).optional(),tasks:de.optional(),extensions:j(p(),t).optional()}),jt=a.extend({protocolVersion:p(),capabilities:Me,clientInfo:k}),lr=u.extend({method:v(\"initialize\"),params:jt}),rn=g({experimental:j(p(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:g({listChanged:U().optional()}).optional(),resources:g({subscribe:U().optional(),listChanged:U().optional()}).optional(),tools:g({listChanged:U().optional()}).optional(),tasks:Be.optional(),extensions:j(p(),t).optional()}),on=h.extend({protocolVersion:p(),capabilities:rn,serverInfo:k,instructions:p().optional()}),eo=m.extend({method:v(\"notifications/initialized\"),params:l.optional()}),Mt=u.extend({method:v(\"ping\"),params:a.optional()}),pr=g({progress:E(),total:D(E()),message:D(p())}),dt=g({...l.shape,...pr.shape,progressToken:r}),qt=m.extend({method:v(\"notifications/progress\"),params:dt}),to=a.extend({cursor:o.optional()}),xt=u.extend({params:to.optional()}),wt=h.extend({nextCursor:o.optional()}),ro=g({uri:p(),mimeType:D(p()),_meta:j(p(),L()).optional()}),oo=ro.extend({text:p()}),dr=p().refine((Ae)=>{try{return atob(Ae),!0}catch{return!1}},{message:\"Invalid Base64 string\"}),no=ro.extend({blob:dr}),mt=W([\"user\",\"assistant\"]),nt=g({audience:R(mt).optional(),priority:E().min(0).max(1).optional(),lastModified:aa({offset:!0}).optional()}),mr=g({...M.shape,...re.shape,uri:p(),description:D(p()),mimeType:D(p()),size:D(E()),annotations:nt.optional(),_meta:D(V({}))}),nn=g({...M.shape,...re.shape,uriTemplate:p(),description:D(p()),mimeType:D(p()),annotations:nt.optional(),_meta:D(V({}))}),sn=xt.extend({method:v(\"resources/list\")}),an=wt.extend({resources:R(mr)}),Lt=xt.extend({method:v(\"resources/templates/list\")}),so=wt.extend({resourceTemplates:R(nn)}),hr=a.extend({uri:p()}),cn=hr,un=u.extend({method:v(\"resources/read\"),params:cn}),ln=h.extend({contents:R(q([oo,no]))}),pn=m.extend({method:v(\"notifications/resources/list_changed\"),params:l.optional()}),dn=hr,mn=u.extend({method:v(\"resources/subscribe\"),params:dn}),hn=hr,fn=u.extend({method:v(\"resources/unsubscribe\"),params:hn}),gn=l.extend({uri:p()}),_n=m.extend({method:v(\"notifications/resources/updated\"),params:gn}),Sn=g({name:p(),description:D(p()),required:D(U())}),zn=g({...M.shape,...re.shape,description:D(p()),arguments:D(R(Sn)),_meta:D(V({}))}),bn=xt.extend({method:v(\"prompts/list\")}),yn=wt.extend({prompts:R(zn)}),vn=a.extend({name:p(),arguments:j(p(),p()).optional()}),xn=u.extend({method:v(\"prompts/get\"),params:vn}),fr=g({type:v(\"text\"),text:p(),annotations:nt.optional(),_meta:j(p(),L()).optional()}),gr=g({type:v(\"image\"),data:dr,mimeType:p(),annotations:nt.optional(),_meta:j(p(),L()).optional()}),_r=g({type:v(\"audio\"),data:dr,mimeType:p(),annotations:nt.optional(),_meta:j(p(),L()).optional()}),wn=g({type:v(\"tool_use\"),name:p(),id:p(),input:j(p(),L()),_meta:j(p(),L()).optional()}),Ut=g({type:v(\"resource\"),resource:q([oo,no]),annotations:nt.optional(),_meta:j(p(),L()).optional()}),$n=mr.extend({type:v(\"resource_link\")}),tt=q([fr,gr,_r,$n,Ut]),io=g({role:mt,content:tt}),ao=h.extend({description:p().optional(),messages:R(io)}),Sr=m.extend({method:v(\"notifications/prompts/list_changed\"),params:l.optional()}),kn=g({title:p().optional(),readOnlyHint:U().optional(),destructiveHint:U().optional(),idempotentHint:U().optional(),openWorldHint:U().optional()}),co=g({taskSupport:W([\"required\",\"optional\",\"forbidden\"]).optional()}),zr=g({...M.shape,...re.shape,description:p().optional(),inputSchema:g({type:v(\"object\"),properties:j(p(),e).optional(),required:R(p()).optional()}).catchall(L()),outputSchema:g({type:v(\"object\"),properties:j(p(),e).optional(),required:R(p()).optional()}).catchall(L()).optional(),annotations:kn.optional(),execution:co.optional(),_meta:j(p(),L()).optional()}),uo=xt.extend({method:v(\"tools/list\")}),lo=wt.extend({tools:R(zr)}),po=h.extend({content:R(tt),structuredContent:j(p(),L()).optional(),isError:U().optional()}),Ne=c.extend({name:p(),arguments:j(p(),L()).optional()}),Rn=u.extend({method:v(\"tools/call\"),params:Ne}),Ea=m.extend({method:v(\"notifications/tools/list_changed\"),params:l.optional()}),mo=W([\"debug\",\"info\",\"notice\",\"warning\",\"error\",\"critical\",\"alert\",\"emergency\"]),Pn=a.extend({level:mo}),Tn=u.extend({method:v(\"logging/setLevel\"),params:Pn}),En=l.extend({level:mo,logger:p().optional(),data:L()}),In=m.extend({method:v(\"notifications/message\"),params:En}),On=g({name:p().optional()}),Cn=g({hints:R(On).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),Zn=g({mode:W([\"auto\",\"required\",\"none\"]).optional()}),Ia=g({type:v(\"tool_result\"),toolUseId:p().describe(\"The unique identifier for the corresponding tool call.\"),content:R(tt),structuredContent:g({}).loose().optional(),isError:U().optional(),_meta:j(p(),L()).optional()}),Nn=Zp(\"type\",[fr,gr,_r]),Dt=Zp(\"type\",[fr,gr,_r,wn,Ia]),An=g({role:mt,content:q([Dt,R(Dt)]),_meta:j(p(),L()).optional()}),jn=c.extend({messages:R(An),modelPreferences:Cn.optional(),systemPrompt:p().optional(),includeContext:W([\"none\",\"thisServer\",\"allServers\"]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:R(p()).optional(),metadata:t.optional(),tools:R(zr).optional(),toolChoice:Zn.optional()}),Mn=u.extend({method:v(\"sampling/createMessage\"),params:jn}),qn=h.extend({model:p(),stopReason:D(W([\"endTurn\",\"stopSequence\",\"maxTokens\"]).or(p())),role:mt,content:Nn}),Ln=h.extend({model:p(),stopReason:D(W([\"endTurn\",\"stopSequence\",\"maxTokens\",\"toolUse\"]).or(p())),role:mt,content:q([Dt,R(Dt)])}),Un=g({type:v(\"boolean\"),title:p().optional(),description:p().optional(),default:U().optional()}),Dn=g({type:v(\"string\"),title:p().optional(),description:p().optional(),minLength:E().optional(),maxLength:E().optional(),format:W([\"email\",\"uri\",\"date\",\"date-time\"]).optional(),default:p().optional()}),Fn=g({type:W([\"number\",\"integer\"]),title:p().optional(),description:p().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Vn=g({type:v(\"string\"),title:p().optional(),description:p().optional(),enum:R(p()),default:p().optional()}),Jn=g({type:v(\"string\"),title:p().optional(),description:p().optional(),oneOf:R(g({const:p(),title:p()})),default:p().optional()}),Hn=g({type:v(\"string\"),title:p().optional(),description:p().optional(),enum:R(p()),enumNames:R(p()).optional(),default:p().optional()}),Bn=q([Vn,Jn]),br=g({type:v(\"array\"),title:p().optional(),description:p().optional(),minItems:E().optional(),maxItems:E().optional(),items:g({type:v(\"string\"),enum:R(p())}),default:R(p()).optional()}),yr=g({type:v(\"array\"),title:p().optional(),description:p().optional(),minItems:E().optional(),maxItems:E().optional(),items:g({anyOf:R(g({const:p(),title:p()}))}),default:R(p()).optional()}),Oa=q([br,yr]),Ca=q([Hn,Bn,Oa]),We=q([Ca,Un,Dn,Fn]),Ge=c.extend({mode:v(\"form\").optional(),message:p(),requestedSchema:g({type:v(\"object\"),properties:j(p(),We),required:R(p()).optional()}).catchall(L())}),Wn=c.extend({mode:v(\"url\"),message:p(),elicitationId:p(),url:p().url()}),st=q([Ge,Wn]),Za=u.extend({method:v(\"elicitation/create\"),params:st}),Na=l.extend({elicitationId:p()}),Aa=m.extend({method:v(\"notifications/elicitation/complete\"),params:Na}),ja=h.extend({action:W([\"accept\",\"decline\",\"cancel\"]),content:lu((Ae)=>Ae===null?void 0:Ae,j(p(),q([p(),E(),U(),R(p())])).optional())}),Ma=g({type:v(\"ref/resource\"),uri:p()}),qa=g({type:v(\"ref/prompt\"),name:p()}),La=a.extend({ref:q([qa,Ma]),argument:g({name:p(),value:p()}),context:g({arguments:j(p(),p()).optional()}).optional()}),Gn=u.extend({method:v(\"completion/complete\"),params:La}),Ua=h.extend({completion:V({values:R(p()).max(100),total:D(E().int()),hasMore:D(U())})}),Da=g({uri:p().startsWith(\"file://\"),name:p().optional(),_meta:j(p(),L()).optional()}),ho=u.extend({method:v(\"roots/list\"),params:a.optional()}),Kn=h.extend({roots:R(Da)}),Fa=m.extend({method:v(\"notifications/roots/list_changed\"),params:l.optional()}),Va=V({ttl:E().optional(),pollInterval:E().optional()}),Ja=W([\"working\",\"input_required\",\"completed\",\"failed\",\"cancelled\"]),Ft=g({taskId:p(),status:Ja,ttl:q([E(),uu()]),createdAt:p(),lastUpdatedAt:p(),pollInterval:D(E()),statusMessage:D(p())}),Fe=h.extend({task:Ft}),Ha=l.merge(Ft),vr=m.extend({method:v(\"notifications/tasks/status\"),params:Ha}),fo=u.extend({method:v(\"tasks/get\"),params:a.extend({taskId:p()})}),go=h.merge(Ft),_o=u.extend({method:v(\"tasks/result\"),params:a.extend({taskId:p()})}),Nu=h.loose(),Ve=xt.extend({method:v(\"tasks/list\")}),xe=wt.extend({tasks:R(Ft)}),xr=u.extend({method:v(\"tasks/cancel\"),params:a.extend({taskId:p()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:o,TaskMetadataSchema:n,RelatedTaskMetadataSchema:i,RequestMetaSchema:s,BaseRequestParamsSchema:a,TaskAugmentedRequestParamsSchema:c,RequestSchema:u,NotificationsParamsSchema:l,NotificationSchema:m,ResultSchema:h,RequestIdSchema:f,EmptyResultSchema:b,CancelledNotificationParamsSchema:I,CancelledNotificationSchema:x,IconSchema:J,IconsSchema:re,BaseMetadataSchema:M,ImplementationSchema:k,ClientTasksCapabilitySchema:de,ServerTasksCapabilitySchema:Be,ClientCapabilitiesSchema:Me,InitializeRequestParamsSchema:jt,InitializeRequestSchema:lr,ServerCapabilitiesSchema:rn,InitializeResultSchema:on,InitializedNotificationSchema:eo,PingRequestSchema:Mt,ProgressSchema:pr,ProgressNotificationParamsSchema:dt,ProgressNotificationSchema:qt,PaginatedRequestParamsSchema:to,PaginatedRequestSchema:xt,PaginatedResultSchema:wt,ResourceContentsSchema:ro,TextResourceContentsSchema:oo,BlobResourceContentsSchema:no,RoleSchema:mt,AnnotationsSchema:nt,ResourceSchema:mr,ResourceTemplateSchema:nn,ListResourcesRequestSchema:sn,ListResourcesResultSchema:an,ListResourceTemplatesRequestSchema:Lt,ListResourceTemplatesResultSchema:so,ResourceRequestParamsSchema:hr,ReadResourceRequestParamsSchema:cn,ReadResourceRequestSchema:un,ReadResourceResultSchema:ln,ResourceListChangedNotificationSchema:pn,SubscribeRequestParamsSchema:dn,SubscribeRequestSchema:mn,UnsubscribeRequestParamsSchema:hn,UnsubscribeRequestSchema:fn,ResourceUpdatedNotificationParamsSchema:gn,ResourceUpdatedNotificationSchema:_n,PromptArgumentSchema:Sn,PromptSchema:zn,ListPromptsRequestSchema:bn,ListPromptsResultSchema:yn,GetPromptRequestParamsSchema:vn,GetPromptRequestSchema:xn,TextContentSchema:fr,ImageContentSchema:gr,AudioContentSchema:_r,ToolUseContentSchema:wn,EmbeddedResourceSchema:Ut,ResourceLinkSchema:$n,ContentBlockSchema:tt,PromptMessageSchema:io,GetPromptResultSchema:ao,PromptListChangedNotificationSchema:Sr,ToolAnnotationsSchema:kn,ToolExecutionSchema:co,ToolSchema:zr,ListToolsRequestSchema:uo,ListToolsResultSchema:lo,CallToolResultSchema:po,CallToolRequestParamsSchema:Ne,CallToolRequestSchema:Rn,ToolListChangedNotificationSchema:Ea,LoggingLevelSchema:mo,SetLevelRequestParamsSchema:Pn,SetLevelRequestSchema:Tn,LoggingMessageNotificationParamsSchema:En,LoggingMessageNotificationSchema:In,ModelHintSchema:On,ModelPreferencesSchema:Cn,ToolChoiceSchema:Zn,ToolResultContentSchema:Ia,SamplingContentSchema:Nn,SamplingMessageContentBlockSchema:Dt,SamplingMessageSchema:An,CreateMessageRequestParamsSchema:jn,CreateMessageRequestSchema:Mn,CreateMessageResultSchema:qn,CreateMessageResultWithToolsSchema:Ln,BooleanSchemaSchema:Un,StringSchemaSchema:Dn,NumberSchemaSchema:Fn,UntitledSingleSelectEnumSchemaSchema:Vn,TitledSingleSelectEnumSchemaSchema:Jn,LegacyTitledEnumSchemaSchema:Hn,SingleSelectEnumSchemaSchema:Bn,UntitledMultiSelectEnumSchemaSchema:br,TitledMultiSelectEnumSchemaSchema:yr,MultiSelectEnumSchemaSchema:Oa,EnumSchemaSchema:Ca,PrimitiveSchemaDefinitionSchema:We,ElicitRequestFormParamsSchema:Ge,ElicitRequestURLParamsSchema:Wn,ElicitRequestParamsSchema:st,ElicitRequestSchema:Za,ElicitationCompleteNotificationParamsSchema:Na,ElicitationCompleteNotificationSchema:Aa,ElicitResultSchema:ja,ResourceTemplateReferenceSchema:Ma,PromptReferenceSchema:qa,CompleteRequestParamsSchema:La,CompleteRequestSchema:Gn,CompleteResultSchema:Ua,RootSchema:Da,ListRootsRequestSchema:ho,ListRootsResultSchema:Kn,RootsListChangedNotificationSchema:Fa,TaskCreationParamsSchema:Va,TaskStatusSchema:Ja,TaskSchema:Ft,CreateTaskResultSchema:Fe,TaskStatusNotificationParamsSchema:Ha,TaskStatusNotificationSchema:vr,GetTaskRequestSchema:fo,GetTaskResultSchema:go,GetTaskPayloadRequestSchema:_o,GetTaskPayloadResultSchema:Nu,ListTasksRequestSchema:Ve,ListTasksResultSchema:xe,CancelTaskRequestSchema:xr,CancelTaskResultSchema:h.merge(Ft),ClientRequestSchema:q([Mt,lr,Gn,Tn,xn,bn,sn,Lt,un,mn,fn,Rn,uo,fo,_o,Ve,xr]),ClientNotificationSchema:q([x,qt,eo,Fa,vr]),ClientResultSchema:q([b,qn,Ln,ja,Kn,go,xe,Fe]),ServerRequestSchema:q([Mt,Mn,Za,ho,fo,_o,Ve,xr]),ServerNotificationSchema:q([x,qt,In,_n,pn,Ea,Sr,vr,Aa]),ServerResultSchema:q([b,on,Ua,ao,yn,an,so,ln,po,lo,go,xe,Fe]),CallToolResultWireSchema:L().superRefine((Ae,rk)=>{if(typeof Ae!==\"object\"||Ae===null||Array.isArray(Ae)||Ae.content!==void 0)return;for(let Fd of hy)if(Fd in Ae){rk.addIssue({code:\"custom\",message:`content is required when the body carries '${Fd}' — another result family cannot default into an empty tools/call success`});return}}).transform(o0).pipe(po)}}var s0;function fy(){return s0??=n0()}function gy(e){return e.type!==\"object\"}var i0=new Set([\"const\",\"enum\",\"default\",\"examples\"]),a0=new Set([\"properties\",\"patternProperties\",\"$defs\",\"definitions\",\"dependentSchemas\",\"dependencies\"]);function ry(e){return e!==void 0&&!(typeof e===\"string\"&&e.startsWith(\"#\"))}function c0(e){let t=typeof e.$schema===\"string\"?e.$schema:void 0;if(ry(e.$id))return{...t!==void 0&&{$schema:t},type:\"object\",properties:{result:e},required:[\"result\"]};let r=Bd(e.$schema)&&e.$recursiveAnchor!==!0,o=(n,i)=>{if(Array.isArray(n))return n.map((c)=>o(c,!1));if(n===null||typeof n!==\"object\")return n;if(!i&&ry(n.$id))return n;let s={},a=!1;for(let[c,u]of Object.entries(n))if(i)s[c]=o(u,!1);else if((c===\"$ref\"||c===\"$dynamicRef\")&&typeof u===\"string\")s[c]=u===\"#\"?\"#/properties/result\":u.startsWith(\"#/\")?`#/properties/result${u.slice(1)}`:u;else if(c===\"$recursiveRef\"&&u===\"#\"&&r)a=!0;else if(i0.has(c))s[c]=u;else if(a0.has(c))s[c]=o(u,!0);else s[c]=o(u,!1);if(a)if(\"$ref\"in s)s.allOf=[...Array.isArray(s.allOf)?s.allOf:[],{$ref:\"#/properties/result\"}];else s.$ref=\"#/properties/result\";return s};return{...t!==void 0&&{$schema:t},type:\"object\",properties:{result:o(e,!1)},required:[\"result\"]}}var _y={ping:null,initialize:null,\"completion/complete\":null,\"logging/setLevel\":null,\"prompts/get\":null,\"prompts/list\":null,\"resources/list\":null,\"resources/templates/list\":null,\"resources/read\":null,\"resources/subscribe\":null,\"resources/unsubscribe\":null,\"tools/call\":null,\"tools/list\":null,\"tasks/get\":null,\"tasks/result\":null,\"tasks/list\":null,\"tasks/cancel\":null,\"sampling/createMessage\":null,\"elicitation/create\":null,\"roots/list\":null},Sy={\"notifications/cancelled\":null,\"notifications/progress\":null,\"notifications/initialized\":null,\"notifications/roots/list_changed\":null,\"notifications/tasks/status\":null,\"notifications/message\":null,\"notifications/resources/updated\":null,\"notifications/resources/list_changed\":null,\"notifications/tools/list_changed\":null,\"notifications/prompts/list_changed\":null,\"notifications/elicitation/complete\":null},u0={ping:null,initialize:null,\"completion/complete\":null,\"logging/setLevel\":null,\"prompts/get\":null,\"prompts/list\":null,\"resources/list\":null,\"resources/templates/list\":null,\"resources/read\":null,\"resources/subscribe\":null,\"resources/unsubscribe\":null,\"tools/call\":null,\"tools/list\":null,\"sampling/createMessage\":null,\"elicitation/create\":null,\"roots/list\":null},pu;function Bp(){if(pu)return pu;let e=fy();return pu={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,\"completion/complete\":e.CompleteRequestSchema,\"logging/setLevel\":e.SetLevelRequestSchema,\"prompts/get\":e.GetPromptRequestSchema,\"prompts/list\":e.ListPromptsRequestSchema,\"resources/list\":e.ListResourcesRequestSchema,\"resources/templates/list\":e.ListResourceTemplatesRequestSchema,\"resources/read\":e.ReadResourceRequestSchema,\"resources/subscribe\":e.SubscribeRequestSchema,\"resources/unsubscribe\":e.UnsubscribeRequestSchema,\"tools/call\":e.CallToolRequestSchema,\"tools/list\":e.ListToolsRequestSchema,\"tasks/get\":e.GetTaskRequestSchema,\"tasks/result\":e.GetTaskPayloadRequestSchema,\"tasks/list\":e.ListTasksRequestSchema,\"tasks/cancel\":e.CancelTaskRequestSchema,\"sampling/createMessage\":e.CreateMessageRequestSchema,\"elicitation/create\":e.ElicitRequestSchema,\"roots/list\":e.ListRootsRequestSchema},notificationSchemas:{\"notifications/cancelled\":e.CancelledNotificationSchema,\"notifications/progress\":e.ProgressNotificationSchema,\"notifications/initialized\":e.InitializedNotificationSchema,\"notifications/roots/list_changed\":e.RootsListChangedNotificationSchema,\"notifications/tasks/status\":e.TaskStatusNotificationSchema,\"notifications/message\":e.LoggingMessageNotificationSchema,\"notifications/resources/updated\":e.ResourceUpdatedNotificationSchema,\"notifications/resources/list_changed\":e.ResourceListChangedNotificationSchema,\"notifications/tools/list_changed\":e.ToolListChangedNotificationSchema,\"notifications/prompts/list_changed\":e.PromptListChangedNotificationSchema,\"notifications/elicitation/complete\":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,\"completion/complete\":e.CompleteResultSchema,\"logging/setLevel\":e.EmptyResultSchema,\"prompts/get\":e.GetPromptResultSchema,\"prompts/list\":e.ListPromptsResultSchema,\"resources/list\":e.ListResourcesResultSchema,\"resources/templates/list\":e.ListResourceTemplatesResultSchema,\"resources/read\":e.ReadResourceResultSchema,\"resources/subscribe\":e.EmptyResultSchema,\"resources/unsubscribe\":e.EmptyResultSchema,\"tools/call\":e.CallToolResultWireSchema,\"tools/list\":e.ListToolsResultSchema,\"sampling/createMessage\":e.CreateMessageResultWithToolsSchema,\"elicitation/create\":e.ElicitResultSchema,\"roots/list\":e.ListRootsResultSchema}},pu}function zy(e){return Object.prototype.hasOwnProperty.call(_y,e)}function by(e){return Object.prototype.hasOwnProperty.call(Sy,e)}function l0(e){return Object.prototype.hasOwnProperty.call(u0,e)}function p0(e){return l0(e)?Bp().resultSchemas[e]:void 0}function d0(e){return zy(e)?Bp().requestSchemas[e]:void 0}function m0(e){return by(e)?Bp().notificationSchemas[e]:void 0}var cA=Object.keys(_y),uA=Object.keys(Sy);function Dp(e){return e!==null&&typeof e===\"object\"&&!Array.isArray(e)}function du(e,t){if(e===void 0)return{ok:!1,reason:\"not-in-era\"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:\"invalid\",message:String(r.error)}}var oy={ok:!1,reason:\"not-in-era\"};function ny(e){return Dp(e)&&Dp(e.outputSchema)&&gy(e.outputSchema)}function sy(e){return e}var Wp={era:\"2025-11-25\",hasRequestMethod:zy,hasNotificationMethod:by,validateRequest:(e,t)=>du(d0(e),t),validateResult:(e,t)=>du(p0(e),t),validateNotification:(e,t)=>du(m0(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>oy,validateInputResponse:()=>oy,samplingResultVariant:(e,t)=>{let r=fy();return du(e?r.CreateMessageResultWithToolsSchema:r.CreateMessageResultSchema,t)},outboundEnvelope:(e)=>{return},validateEnvelopeMeta:(e)=>[],projectCallToolResult(e,t){let r=my(e),o=r.structuredContent;if(o===void 0)return r;let n=typeof o!==\"object\"||o===null||Array.isArray(o),i=t!==void 0&&gy(t);if(!n&&!i)return r;return{...r,structuredContent:{result:o}}},decodeResult(e,t){if(Dp(t)&&\"resultType\"in t){let r={...t};return delete r.resultType,{kind:\"complete\",result:sy(r)}}return{kind:\"complete\",result:sy(t)}},encodeResult(e,t){if(e!==\"tools/list\")return t;let r=t.tools;if(!Array.isArray(r)||!r.some((o)=>ny(o)))return t;return{...t,tools:r.map((o)=>ny(o)?{...o,outputSchema:c0(o.outputSchema)}:o)}},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope:(e)=>{return}};function h0(){let e=Np(()=>q([p(),E(),U(),uu(),j(p(),e),R(e)])),t=j(p(),e),r=q([p(),E().int()]),o=p(),n=q([p(),E().int()]),i=W([\"user\",\"assistant\"]),s=W([\"debug\",\"info\",\"notice\",\"warning\",\"error\",\"critical\",\"alert\",\"emergency\"]),a=p().refine((xe)=>{try{return atob(xe),!0}catch{return!1}},{message:\"Invalid Base64 string\"}),c=g({ttl:E().optional()}),u=g({taskId:p()}),l=V({progressToken:r.optional(),\"io.modelcontextprotocol/related-task\":u.optional()}),m=g({_meta:l.optional()}),h=m.extend({task:c.optional()}),f=g({_meta:l.optional()}),b=g({method:p(),params:f.loose().optional()}),I=g({src:p(),mimeType:p().optional(),sizes:R(p()).optional(),theme:W([\"light\",\"dark\"]).optional()}),x=g({icons:R(I).optional()}),J=g({name:p(),title:p().optional()}),re=J.extend({...J.shape,...x.shape,version:p(),websiteUrl:p().optional(),description:p().optional()}),M=Qo(g({applyDefaults:U().optional()}),t),k=lu((xe)=>{if(xe&&typeof xe===\"object\"&&!Array.isArray(xe)&&Object.keys(xe).length===0)return{form:{}};return xe},Qo(g({form:M.optional(),url:t.optional()}),t.optional())),N=V({list:t.optional(),cancel:t.optional(),requests:V({sampling:V({createMessage:t.optional()}).optional(),elicitation:V({create:t.optional()}).optional()}).optional()}),K=V({list:t.optional(),cancel:t.optional(),requests:V({tools:V({call:t.optional()}).optional()}).optional()}),de=g({experimental:j(p(),t).optional(),sampling:g({context:t.optional(),tools:t.optional()}).optional(),elicitation:k.optional(),roots:g({listChanged:U().optional()}).optional(),tasks:N.optional(),extensions:j(p(),t).optional()}),Be=g({experimental:j(p(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:g({listChanged:U().optional()}).optional(),resources:g({subscribe:U().optional(),listChanged:U().optional()}).optional(),tools:g({listChanged:U().optional()}).optional(),tasks:K.optional(),extensions:j(p(),t).optional()}),Me=g({progress:E(),total:D(E()),message:D(p())}),jt=g({...f.shape,...Me.shape,progressToken:r}),lr=b.extend({method:v(\"notifications/progress\"),params:jt}),rn=f.extend({level:s,logger:p().optional(),data:L()}),on=b.extend({method:v(\"notifications/message\"),params:rn}),eo=g({uri:p(),mimeType:D(p()),_meta:j(p(),L()).optional()}),Mt=eo.extend({text:p()}),pr=eo.extend({blob:a}),dt=g({audience:R(i).optional(),priority:E().min(0).max(1).optional(),lastModified:aa({offset:!0}).optional()}),qt=g({...J.shape,...x.shape,uri:p(),description:D(p()),mimeType:D(p()),size:D(E()),annotations:dt.optional(),_meta:D(V({}))}),to=g({...J.shape,...x.shape,uriTemplate:p(),description:D(p()),mimeType:D(p()),annotations:dt.optional(),_meta:D(V({}))}),xt=b.extend({method:v(\"notifications/resources/list_changed\"),params:f.optional()}),wt=f.extend({uri:p()}),ro=b.extend({method:v(\"notifications/resources/updated\"),params:wt}),oo=g({name:p(),description:D(p()),required:D(U())}),dr=g({...J.shape,...x.shape,description:D(p()),arguments:D(R(oo)),_meta:D(V({}))}),no=b.extend({method:v(\"notifications/prompts/list_changed\"),params:f.optional()}),mt=g({type:v(\"text\"),text:p(),annotations:dt.optional(),_meta:j(p(),L()).optional()}),nt=g({type:v(\"image\"),data:a,mimeType:p(),annotations:dt.optional(),_meta:j(p(),L()).optional()}),mr=g({type:v(\"audio\"),data:a,mimeType:p(),annotations:dt.optional(),_meta:j(p(),L()).optional()}),nn=g({type:v(\"tool_use\"),name:p(),id:p(),input:j(p(),L()),_meta:j(p(),L()).optional()}),sn=g({type:v(\"resource\"),resource:q([Mt,pr]),annotations:dt.optional(),_meta:j(p(),L()).optional()}),an=qt.extend({type:v(\"resource_link\")}),Lt=q([mt,nt,mr,an,sn]),so=g({role:i,content:Lt}),hr=g({title:p().optional(),readOnlyHint:U().optional(),destructiveHint:U().optional(),idempotentHint:U().optional(),openWorldHint:U().optional()}),cn=b.extend({method:v(\"notifications/tools/list_changed\"),params:f.optional()}),un=g({name:p().optional()}),ln=g({hints:R(un).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),pn=g({mode:W([\"auto\",\"required\",\"none\"]).optional()}),dn=g({type:v(\"boolean\"),title:p().optional(),description:p().optional(),default:U().optional()}),mn=g({type:v(\"string\"),title:p().optional(),description:p().optional(),minLength:E().optional(),maxLength:E().optional(),format:W([\"email\",\"uri\",\"date\",\"date-time\"]).optional(),default:p().optional()}),hn=g({type:W([\"number\",\"integer\"]),title:p().optional(),description:p().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),fn=g({type:v(\"string\"),title:p().optional(),description:p().optional(),enum:R(p()),default:p().optional()}),gn=g({type:v(\"string\"),title:p().optional(),description:p().optional(),oneOf:R(g({const:p(),title:p()})),default:p().optional()}),_n=g({type:v(\"string\"),title:p().optional(),description:p().optional(),enum:R(p()),enumNames:R(p()).optional(),default:p().optional()}),Sn=q([fn,gn]),zn=g({type:v(\"array\"),title:p().optional(),description:p().optional(),minItems:E().optional(),maxItems:E().optional(),items:g({type:v(\"string\"),enum:R(p())}),default:R(p()).optional()}),bn=g({type:v(\"array\"),title:p().optional(),description:p().optional(),minItems:E().optional(),maxItems:E().optional(),items:g({anyOf:R(g({const:p(),title:p()}))}),default:R(p()).optional()}),yn=q([zn,bn]),vn=q([_n,Sn,yn]),xn=q([vn,dn,mn,hn]),fr=h.extend({mode:v(\"form\").optional(),message:p(),requestedSchema:g({type:v(\"object\"),properties:j(p(),xn),required:R(p()).optional()}).catchall(L())}),gr=g({type:v(\"ref/resource\"),uri:p()}),_r=g({type:v(\"ref/prompt\"),name:p()}),wn=g({uri:p().startsWith(\"file://\"),name:p().optional(),_meta:j(p(),L()).optional()}),Ut=de.shape,$n=g({experimental:Ut.experimental,sampling:Ut.sampling,elicitation:Ut.elicitation,roots:Ut.roots,extensions:Ut.extensions}),tt=Be.shape,io=g({experimental:tt.experimental,logging:tt.logging,completions:tt.completions,prompts:tt.prompts,resources:tt.resources,tools:tt.tools,extensions:tt.extensions}),ao=V({progressToken:r.optional(),[Pr]:p(),[vo]:re.optional(),[Tr]:$n,[xo]:s.optional()}),Sr=g({...J.shape,...x.shape,description:p().optional(),inputSchema:V({$schema:p().optional(),type:v(\"object\")}),outputSchema:V({$schema:p().optional()}).optional(),annotations:hr.optional(),_meta:j(p(),L()).optional()}),kn=g({type:v(\"tool_result\"),toolUseId:p(),content:R(Lt),structuredContent:L().optional(),isError:U().optional(),_meta:j(p(),L()).optional()}),co=q([mt,nt,mr,nn,kn]),zr=g({role:i,content:q([co,R(co)]),_meta:j(p(),L()).optional()}),uo=p(),lo=V({[Kt]:re.optional().catch(void 0)}),po=lo.optional();function Ne(xe){return V({_meta:po,resultType:uo.default(\"complete\"),...xe})}let Rn=Ne({}),Ea=Ne({nextCursor:o.optional()}),mo=Ne({content:R(Lt),structuredContent:L().optional(),isError:U().optional()}),Pn=Ne({ttlMs:E().int().min(0),cacheScope:W([\"public\",\"private\"]),tools:R(Sr),nextCursor:o.optional()}),Tn=Ne({ttlMs:E().int().min(0),cacheScope:W([\"public\",\"private\"]),prompts:R(dr),nextCursor:o.optional()}),En=Ne({description:p().optional(),messages:R(so)}),In=Ne({ttlMs:E().int().min(0),cacheScope:W([\"public\",\"private\"]),resources:R(qt),nextCursor:o.optional()}),On=Ne({ttlMs:E().int().min(0),cacheScope:W([\"public\",\"private\"]),resourceTemplates:R(to),nextCursor:o.optional()}),Cn=Ne({ttlMs:E().int().min(0),cacheScope:W([\"public\",\"private\"]),contents:R(q([Mt,pr]))}),Zn=Ne({completion:g({values:R(p()).max(100),total:E().int().optional(),hasMore:U().optional()}).loose()}),Ia=Ne({ttlMs:E().int().min(0),cacheScope:W([\"public\",\"private\"])}),Nn=Ne({ttlMs:E().int().min(0).catch(0),cacheScope:W([\"public\",\"private\"]).catch(\"private\"),supportedVersions:R(p()),capabilities:io,instructions:p().optional()}),Dt=g({messages:R(zr),modelPreferences:ln.optional(),systemPrompt:p().optional(),includeContext:W([\"none\",\"thisServer\",\"allServers\"]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:R(p()).optional(),metadata:t.optional(),tools:R(Sr).optional(),toolChoice:pn.optional()}),An=g({method:v(\"sampling/createMessage\"),params:Dt}),jn=g({method:v(\"roots/list\"),params:g({_meta:j(p(),L()).optional()}).optional()}),Mn=g({...zr.shape,model:p(),stopReason:p().optional()}),qn=g({roots:R(wn)}),Ln=g({action:W([\"accept\",\"decline\",\"cancel\"]),content:j(p(),q([p(),E(),U(),R(p())])).optional()}),Un=g({mode:v(\"url\"),message:p(),url:p().url()}),Dn=q([fr,Un]),Fn=g({method:v(\"elicitation/create\"),params:Dn}),Vn=q([An,jn,Fn]),Jn=q([Mn,qn,Ln]),Hn=j(p(),Vn),Bn=j(p(),Jn),br=Ne({inputRequests:Hn.optional(),requestState:p().optional()}),yr={inputResponses:Bn.optional(),requestState:p().optional()},Oa=g({_meta:ao,...yr}),Ca=V({progressToken:r.optional()});function We(xe,xr){return g({method:v(xe),params:g({_meta:ao,...xr})})}function Ge(xe,xr){return g({method:v(xe),params:g({_meta:Ca.optional(),...xr}).optional()})}let Wn={name:p(),arguments:j(p(),L()).optional(),...yr},st={cursor:o.optional()},Za=We(\"tools/call\",Wn),Na=We(\"tools/list\",st),Aa=We(\"prompts/list\",st),ja=We(\"prompts/get\",{name:p(),arguments:j(p(),p()).optional(),...yr}),Ma=We(\"resources/list\",st),qa=We(\"resources/templates/list\",st),La=We(\"resources/read\",{uri:p(),...yr}),Gn={ref:q([_r,gr]),argument:g({name:p(),value:p()}),context:g({arguments:j(p(),p()).optional()}).optional()},Ua=We(\"completion/complete\",Gn),Da=We(\"server/discover\",{}),ho=g({toolsListChanged:U().optional(),promptsListChanged:U().optional(),resourcesListChanged:U().optional(),resourceSubscriptions:R(p()).optional()}),Kn={notifications:ho},Fa=We(\"subscriptions/listen\",Kn),Va=lo.extend({\"io.modelcontextprotocol/subscriptionId\":n}),Ja=V({_meta:Va,resultType:uo.default(\"complete\")}),Ft={\"tools/call\":Ge(\"tools/call\",Wn),\"tools/list\":Ge(\"tools/list\",st),\"prompts/get\":Ge(\"prompts/get\",{name:p(),arguments:j(p(),p()).optional()}),\"prompts/list\":Ge(\"prompts/list\",st),\"resources/list\":Ge(\"resources/list\",st),\"resources/templates/list\":Ge(\"resources/templates/list\",st),\"resources/read\":Ge(\"resources/read\",{uri:p()}),\"completion/complete\":Ge(\"completion/complete\",Gn),\"server/discover\":Ge(\"server/discover\",{}),\"subscriptions/listen\":Ge(\"subscriptions/listen\",Kn)};function Fe(xe){return V({_meta:po,...xe})}let Ha={\"tools/call\":Fe({content:R(Lt),structuredContent:L().optional(),isError:U().optional()}),\"tools/list\":Fe({ttlMs:E().int().min(0),cacheScope:W([\"public\",\"private\"]),tools:R(Sr),nextCursor:o.optional()}),\"prompts/get\":Fe({description:p().optional(),messages:R(so)}),\"prompts/list\":Fe({ttlMs:E().int().min(0),cacheScope:W([\"public\",\"private\"]),prompts:R(dr),nextCursor:o.optional()}),\"resources/list\":Fe({ttlMs:E().int().min(0),cacheScope:W([\"public\",\"private\"]),resources:R(qt),nextCursor:o.optional()}),\"resources/templates/list\":Fe({ttlMs:E().int().min(0),cacheScope:W([\"public\",\"private\"]),resourceTemplates:R(to),nextCursor:o.optional()}),\"resources/read\":Fe({ttlMs:E().int().min(0),cacheScope:W([\"public\",\"private\"]),contents:R(q([Mt,pr]))}),\"completion/complete\":Fe({completion:g({values:R(p()).max(100),total:E().int().optional(),hasMore:U().optional()}).loose()}),\"server/discover\":Fe({ttlMs:E().int().min(0).catch(0),cacheScope:W([\"public\",\"private\"]).catch(\"private\"),supportedVersions:R(p()),capabilities:io,instructions:p().optional()}),\"subscriptions/listen\":Fe({})},vr=V({\"io.modelcontextprotocol/subscriptionId\":n.optional()}),fo=g({method:v(\"notifications/subscriptions/acknowledged\"),params:g({_meta:vr.optional(),notifications:ho})}),go=g({_meta:vr.optional(),requestId:n,reason:p().optional()}),_o=g({method:v(\"notifications/cancelled\"),params:go}),Nu={\"notifications/cancelled\":_o,\"notifications/progress\":lr,\"notifications/message\":on,\"notifications/resources/updated\":ro,\"notifications/resources/list_changed\":xt,\"notifications/tools/list_changed\":cn,\"notifications/prompts/list_changed\":no,\"notifications/subscriptions/acknowledged\":fo},Ve=(xe)=>g({jsonrpc:v(\"2.0\"),id:q([p(),E().int()]),result:xe}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:o,RequestIdSchema:n,RoleSchema:i,LoggingLevelSchema:s,TaskMetadataSchema:c,RelatedTaskMetadataSchema:u,RequestMetaSchema:l,BaseRequestParamsSchema:m,TaskAugmentedRequestParamsSchema:h,NotificationsParamsSchema:f,NotificationSchema:b,IconSchema:I,IconsSchema:x,BaseMetadataSchema:J,ImplementationSchema:re,ClientTasksCapabilitySchema:N,ServerTasksCapabilitySchema:K,ClientCapabilitiesSchema:de,ServerCapabilitiesSchema:Be,ProgressSchema:Me,ProgressNotificationParamsSchema:jt,ProgressNotificationSchema:lr,LoggingMessageNotificationParamsSchema:rn,LoggingMessageNotificationSchema:on,ResourceContentsSchema:eo,TextResourceContentsSchema:Mt,BlobResourceContentsSchema:pr,AnnotationsSchema:dt,ResourceSchema:qt,ResourceTemplateSchema:to,ResourceListChangedNotificationSchema:xt,ResourceUpdatedNotificationParamsSchema:wt,ResourceUpdatedNotificationSchema:ro,PromptArgumentSchema:oo,PromptSchema:dr,PromptListChangedNotificationSchema:no,TextContentSchema:mt,ImageContentSchema:nt,AudioContentSchema:mr,ToolUseContentSchema:nn,EmbeddedResourceSchema:sn,ResourceLinkSchema:an,ContentBlockSchema:Lt,PromptMessageSchema:so,ToolAnnotationsSchema:hr,ToolListChangedNotificationSchema:cn,ModelHintSchema:un,ModelPreferencesSchema:ln,ToolChoiceSchema:pn,BooleanSchemaSchema:dn,StringSchemaSchema:mn,NumberSchemaSchema:hn,UntitledSingleSelectEnumSchemaSchema:fn,TitledSingleSelectEnumSchemaSchema:gn,LegacyTitledEnumSchemaSchema:_n,SingleSelectEnumSchemaSchema:Sn,UntitledMultiSelectEnumSchemaSchema:zn,TitledMultiSelectEnumSchemaSchema:bn,MultiSelectEnumSchemaSchema:yn,EnumSchemaSchema:vn,PrimitiveSchemaDefinitionSchema:xn,ElicitRequestFormParamsSchema:fr,ResourceTemplateReferenceSchema:gr,PromptReferenceSchema:_r,RootSchema:wn,ClientCapabilities2026Schema:$n,ServerCapabilities2026Schema:io,RequestMetaEnvelopeSchema:ao,ToolSchema:Sr,ToolResultContentSchema:kn,SamplingMessageContentBlockSchema:co,SamplingMessageSchema:zr,ResultTypeSchema:uo,ResultMetaSchema:lo,ResultSchema:Rn,PaginatedResultSchema:Ea,CallToolResultSchema:mo,ListToolsResultSchema:Pn,ListPromptsResultSchema:Tn,GetPromptResultSchema:En,ListResourcesResultSchema:In,ListResourceTemplatesResultSchema:On,ReadResourceResultSchema:Cn,CompleteResultSchema:Zn,CacheableResultSchema:Ia,DiscoverResultSchema:Nn,CreateMessageRequestParamsSchema:Dt,CreateMessageRequestSchema:An,ListRootsRequestSchema:jn,CreateMessageResultSchema:Mn,ListRootsResultSchema:qn,ElicitResultSchema:Ln,ElicitRequestURLParamsSchema:Un,ElicitRequestParamsSchema:Dn,ElicitRequestSchema:Fn,InputRequestSchema:Vn,InputResponseSchema:Jn,InputRequestsSchema:Hn,InputResponsesSchema:Bn,InputRequiredResultSchema:br,InputResponseRequestParamsSchema:Oa,CallToolRequestSchema:Za,ListToolsRequestSchema:Na,ListPromptsRequestSchema:Aa,GetPromptRequestSchema:ja,ListResourcesRequestSchema:Ma,ListResourceTemplatesRequestSchema:qa,ReadResourceRequestSchema:La,CompleteRequestSchema:Ua,DiscoverRequestSchema:Da,SubscriptionFilterSchema:ho,SubscriptionsListenRequestSchema:Fa,SubscriptionsListenResultMetaSchema:Va,SubscriptionsListenResultSchema:Ja,dispatchRequestSchemas:Ft,dispatchResultSchemas:Ha,NotificationMetaSchema:vr,SubscriptionsAcknowledgedNotificationSchema:fo,CancelledNotificationParamsSchema:go,CancelledNotificationSchema:_o,notificationSchemas2026:Nu,JSONRPCResultResponseSchema:Ve(Rn),CallToolResultResponseSchema:Ve(q([mo,br])),ListToolsResultResponseSchema:Ve(Pn),ListPromptsResultResponseSchema:Ve(Tn),GetPromptResultResponseSchema:Ve(q([En,br])),ListResourcesResultResponseSchema:Ve(In),ListResourceTemplatesResultResponseSchema:Ve(On),ReadResourceResultResponseSchema:Ve(q([Cn,br])),CompleteResultResponseSchema:Ve(Zn),DiscoverResultResponseSchema:Ve(Nn)}}var f0;function Wr(){return f0??=h0()}var g0=[\"tools/list\",\"prompts/list\",\"resources/list\",\"resources/templates/list\",\"resources/read\",\"server/discover\"];function _0(e){return g0.includes(e)}var Gp=Symbol(\"modelcontextprotocol.resultCacheHintFallback\");function S0(e){return e[Gp]}function yy(e){return typeof e===\"number\"&&Number.isSafeInteger(e)&&e>=0}function vy(e){return e===\"public\"||e===\"private\"}var F=function(e){return e[e.ParseError=-32700]=\"ParseError\",e[e.InvalidRequest=-32600]=\"InvalidRequest\",e[e.MethodNotFound=-32601]=\"MethodNotFound\",e[e.InvalidParams=-32602]=\"InvalidParams\",e[e.InternalError=-32603]=\"InternalError\",e[e.ResourceNotFound=-32002]=\"ResourceNotFound\",e[e.MissingRequiredClientCapability=-32021]=\"MissingRequiredClientCapability\",e[e.UnsupportedProtocolVersion=-32022]=\"UnsupportedProtocolVersion\",e[e.UrlElicitationRequired=-32042]=\"UrlElicitationRequired\",e}({}),Ce=class e extends Error{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.ProtocolError\"})}static[Symbol.hasInstance](t){return Xe(this,t)}static isInstance(t){if(typeof this!==\"function\")throw TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");return Xe(this,t)}constructor(t,r,o){super(r);this.code=t,this.data=o,this.name=\"ProtocolError\",Gr(this,new.target)}static fromError(t,r,o){if(t===F.UrlElicitationRequired&&o){let n=o;if(n.elicitations)return new wy(n.elicitations,r)}if(t===F.UnsupportedProtocolVersion&&o){let n=o;if(Array.isArray(n.supported)&&typeof n.requested===\"string\")return new $y({supported:n.supported,requested:n.requested},r)}if(t===F.InvalidParams||t===F.ResourceNotFound){let n=o;if(typeof n?.uri===\"string\"&&(t===F.ResourceNotFound||Object.keys(n).length===1))return new xy(n.uri,r)}if(t===F.MissingRequiredClientCapability&&o){let n=o;if(n.requiredCapabilities!==null&&typeof n.requiredCapabilities===\"object\"&&!Array.isArray(n.requiredCapabilities))return new ky({requiredCapabilities:n.requiredCapabilities},r)}return new e(t,r,o)}},xy=class extends Ce{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.ResourceNotFoundError\"})}constructor(e,t=`Resource not found: ${e}`){super(F.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},wy=class extends Ce{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.UrlElicitationRequiredError\"})}constructor(e,t=`URL elicitation${e.length>1?\"s\":\"\"} required`){super(F.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},$y=class extends Ce{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.UnsupportedProtocolVersionError\"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(F.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},ky=class extends Ce{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.MissingRequiredClientCapabilityError\"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(\", \")}`){super(F.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},z0=0,b0=\"private\",y0=[\"tools/call\",\"prompts/get\",\"resources/read\"];function v0(e,t){let r=t.resultType;if(r===void 0)return{...t,resultType:\"complete\"};if(r===\"complete\")return t;if(y0.includes(e))return t;throw new Ce(F.InternalError,`Handler for ${e} returned resultType '${String(r)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function x0(e,t){let r=S0(t);if(t.resultType!==\"complete\"||!_0(e))return r===void 0?t:P0(t);let o=t,n=yy(o.ttlMs)?o.ttlMs:k0(r),i=vy(o.cacheScope)?o.cacheScope:R0(r),s={...o,ttlMs:n,cacheScope:i};return delete s[Gp],s}function w0(e){return e!==null&&typeof e===\"object\"&&!Array.isArray(e)}function $0(e,t){if(t===void 0)return e;let r=e._meta;if(r===void 0)return{...e,_meta:{[Kt]:t}};if(!w0(r))return e;if(r[Kt]!==void 0)return e;return{...e,_meta:{...r,[Kt]:t}}}function k0(e){return e!==void 0&&yy(e.ttlMs)?e.ttlMs:z0}function R0(e){return e!==void 0&&vy(e.cacheScope)?e.cacheScope:b0}function P0(e){let t={...e};return delete t[Gp],t}var T0=[\"elicitation/create\",\"sampling/createMessage\",\"roots/list\"],mu;function Ry(){if(mu)return mu;let e=Wr();return mu={request:{\"elicitation/create\":g({method:v(\"elicitation/create\"),params:e.ElicitRequestParamsSchema}),\"sampling/createMessage\":g({method:v(\"sampling/createMessage\"),params:e.CreateMessageRequestParamsSchema}),\"roots/list\":g({method:v(\"roots/list\"),params:V({}).optional()})},response:{\"elicitation/create\":e.ElicitResultSchema,\"sampling/createMessage\":e.CreateMessageResultSchema,\"roots/list\":e.ListRootsResultSchema}},mu}function Py(e){return T0.includes(e)}function Ap(e){return Py(e)?Ry().request[e]:void 0}function E0(e){return Py(e)?Ry().response[e]:void 0}var Kp={\"tools/call\":null,\"tools/list\":null,\"prompts/get\":null,\"prompts/list\":null,\"resources/list\":null,\"resources/templates/list\":null,\"resources/read\":null,\"completion/complete\":null,\"server/discover\":null,\"subscriptions/listen\":null},Ty={\"notifications/cancelled\":null,\"notifications/progress\":null,\"notifications/message\":null,\"notifications/resources/updated\":null,\"notifications/resources/list_changed\":null,\"notifications/tools/list_changed\":null,\"notifications/prompts/list_changed\":null,\"notifications/subscriptions/acknowledged\":null};function Ey(e){return Object.prototype.hasOwnProperty.call(Kp,e)}function Iy(e){return Object.prototype.hasOwnProperty.call(Ty,e)}function I0(e){return Object.prototype.hasOwnProperty.call(Kp,e)}function O0(e){return Ey(e)?Wr().dispatchRequestSchemas[e]:void 0}function C0(e){return I0(e)?Wr().dispatchResultSchemas[e]:void 0}function Z0(e){return Iy(e)?Wr().notificationSchemas2026[e]:void 0}var lA=Object.keys(Kp),pA=Object.keys(Ty);function pa(e){return e!==null&&typeof e===\"object\"&&!Array.isArray(e)}function ua(e,t){if(e===void 0)return{ok:!1,reason:\"not-in-era\"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:\"invalid\",message:String(r.error)}}var N0={ok:!1,reason:\"not-in-era\"},A0=[Pr,Tr];function j0(e,t){let r=t,o=!1,n=()=>{if(!o)r={...r},o=!0;return r},i=t.tools;if(e===\"tools/list\"&&Array.isArray(i)&&i.some((a)=>pa(a)&&(\"execution\"in a)))n().tools=i.map((a)=>{if(!pa(a)||!(\"execution\"in a))return a;let c={...a};return delete c.execution,c});let s=t.capabilities;if(pa(s)&&\"tasks\"in s){let a={...s};delete a.tasks,n().capabilities=a}return r}var Yp={era:\"2026-07-28\",hasRequestMethod:Ey,hasNotificationMethod:Iy,hasInputRequestMethod:(e)=>Ap(e)!==void 0,validateRequest:(e,t)=>ua(O0(e),t),validateResult:(e,t)=>ua(C0(e),t),validateNotification:(e,t)=>ua(Z0(e),t),validateInputRequest:(e,t)=>ua(Ap(e),t),validateInputResponse:(e,t)=>ua(E0(e),t),samplingResultVariant:()=>N0,outboundEnvelope(e){return{[Pr]:e.protocolVersion,[vo]:e.clientInfo,[Tr]:e.clientCapabilities,...e.logLevel!==void 0&&{[xo]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let o of A0)if(!(o in e))t.push({key:o,problem:\"missing\"});let r=Wr().RequestMetaEnvelopeSchema.safeParse(e);if(!r.success)for(let o of r.error.issues){let n=o.path.map(String),i=n.length>0?n.join(\".\"):\"_meta\";if(n.length===1&&t.some((s)=>s.key===i&&s.problem===\"missing\"))continue;t.push({key:i,problem:o.message})}return t},projectCallToolResult:(e)=>my(e),inputRequestSchema:Ap,decodeResult(e,t){if(!pa(t))return{kind:\"invalid\",error:new ke(Oe.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let r=t.resultType;if(r===void 0)return{kind:\"invalid\",error:new ke(Oe.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:\"missing-resultType\"})};if(typeof r!==\"string\")return{kind:\"invalid\",error:new ke(Oe.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:r})};if(r===\"input_required\"){let s=t.inputRequests,a=pa(s)?s:{},c=t.requestState;if(Object.keys(a).length===0&&typeof c!==\"string\")return{kind:\"invalid\",error:new ke(Oe.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:\"input-required-missing-both\"})};return{kind:\"input_required\",inputRequests:a,...typeof c===\"string\"&&{requestState:c}}}if(r!==\"complete\")return{kind:\"invalid\",error:new ke(Oe.UnsupportedResultType,`Unsupported result type '${r}' for ${e}`,{resultType:r,method:e})};let o=M0(),n=Object.hasOwn(o,e)?o[e]:void 0;if(n!==void 0){let s=n.safeParse(t);if(!s.success)return{kind:\"invalid\",error:new ke(Oe.InvalidResult,`Invalid result for ${e}: ${s.error}`,{method:e})}}let i={...t};return delete i.resultType,{kind:\"complete\",result:i}},encodeResult(e,t,r){return $0(x0(e,v0(e,j0(e,t))),r)},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return\"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)\";let t=Wr().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map((r)=>r.message).join(\"; \")}`}},hu;function M0(){if(hu)return hu;let e=Wr();return hu={\"tools/call\":e.CallToolResultSchema,\"tools/list\":e.ListToolsResultSchema,\"prompts/get\":e.GetPromptResultSchema,\"prompts/list\":e.ListPromptsResultSchema,\"resources/list\":e.ListResourcesResultSchema,\"resources/templates/list\":e.ListResourceTemplatesResultSchema,\"resources/read\":e.ReadResourceResultSchema,\"completion/complete\":e.CompleteResultSchema,\"server/discover\":e.DiscoverResultSchema},hu}var Qp=\"2026-07-28\";function ma(e){return e!==void 0&&dy(e)?Yp:Wp}function iy(e){if(e.revision!==void 0)return ma(e.revision).era;return e.era===\"modern\"?Yp.era:Wp.era}function jp(e){return Oy.some((t)=>t.hasRequestMethod(e))}function Mp(e){return Oy.some((t)=>t.hasNotificationMethod(e))}var Oy=[Wp,Yp],q0=Jd({AnnotationsSchema:()=>_t,AudioContentSchema:()=>jr,BaseMetadataSchema:()=>ft,BaseRequestParamsSchema:()=>Pe,BlobResourceContentsSchema:()=>jo,BooleanSchemaSchema:()=>Uo,CallToolRequestParamsSchema:()=>ri,CallToolRequestSchema:()=>oi,CallToolResultSchema:()=>er,CancelTaskRequestSchema:()=>Oc,CancelTaskResultSchema:()=>Cc,CancelledNotificationParamsSchema:()=>ls,CancelledNotificationSchema:()=>Eo,ClientCapabilitiesSchema:()=>ds,ClientNotificationSchema:()=>Nc,ClientRequestSchema:()=>Zc,ClientResultSchema:()=>Ac,ClientTasksCapabilitySchema:()=>zc,CompatibilityCallToolResultSchema:()=>yc,CompleteRequestParamsSchema:()=>Ei,CompleteRequestSchema:()=>Ii,CompleteResultSchema:()=>Oi,ContentBlockSchema:()=>St,CreateMessageRequestParamsSchema:()=>fi,CreateMessageRequestSchema:()=>gi,CreateMessageResultSchema:()=>_i,CreateMessageResultWithToolsSchema:()=>Si,CreateTaskResultSchema:()=>wc,CursorSchema:()=>$o,DiscoverRequestSchema:()=>_s,DiscoverResultSchema:()=>Oo,ElicitRequestFormParamsSchema:()=>Dr,ElicitRequestParamsSchema:()=>xi,ElicitRequestSchema:()=>wi,ElicitRequestURLParamsSchema:()=>vi,ElicitResultSchema:()=>Ri,ElicitationCompleteNotificationParamsSchema:()=>$i,ElicitationCompleteNotificationSchema:()=>ki,EmbeddedResourceSchema:()=>Mr,EmptyResultSchema:()=>Qt,EnumSchemaSchema:()=>yi,GetPromptRequestParamsSchema:()=>Hs,GetPromptRequestSchema:()=>Bs,GetPromptResultSchema:()=>Ks,GetTaskPayloadRequestSchema:()=>Pc,GetTaskPayloadResultSchema:()=>Tc,GetTaskRequestSchema:()=>kc,GetTaskResultSchema:()=>Rc,IconSchema:()=>ps,IconsSchema:()=>Rt,ImageContentSchema:()=>Ar,ImplementationSchema:()=>gt,InitializeRequestParamsSchema:()=>ms,InitializeRequestSchema:()=>hs,InitializeResultSchema:()=>fs,InitializedNotificationSchema:()=>gs,JSONArraySchema:()=>_c,JSONObjectSchema:()=>ze,JSONRPCErrorResponseSchema:()=>Or,JSONRPCMessageSchema:()=>Cr,JSONRPCNotificationSchema:()=>To,JSONRPCRequestSchema:()=>Po,JSONRPCResponseSchema:()=>Sc,JSONRPCResultResponseSchema:()=>Ir,JSONValueSchema:()=>kt,LegacyTitledEnumSchemaSchema:()=>Vo,ListChangedOptionsBaseSchema:()=>vc,ListPromptsRequestSchema:()=>Vs,ListPromptsResultSchema:()=>Js,ListResourceTemplatesRequestSchema:()=>ws,ListResourceTemplatesResultSchema:()=>$s,ListResourcesRequestSchema:()=>vs,ListResourcesResultSchema:()=>xs,ListRootsRequestSchema:()=>Zi,ListRootsResultSchema:()=>Ni,ListTasksRequestSchema:()=>Ec,ListTasksResultSchema:()=>Ic,ListToolsRequestSchema:()=>ei,ListToolsResultSchema:()=>ti,LoggingLevelSchema:()=>Lo,LoggingMessageNotificationParamsSchema:()=>ai,LoggingMessageNotificationSchema:()=>ci,ModelHintSchema:()=>ui,ModelPreferencesSchema:()=>li,MultiSelectEnumSchemaSchema:()=>bi,NotificationSchema:()=>Ee,NotificationsParamsSchema:()=>je,NumberSchemaSchema:()=>Ur,PaginatedRequestParamsSchema:()=>bs,PaginatedRequestSchema:()=>Pt,PaginatedResultSchema:()=>Tt,PingRequestSchema:()=>Co,PrimitiveSchemaDefinitionSchema:()=>Bo,ProgressNotificationParamsSchema:()=>zs,ProgressNotificationSchema:()=>Zo,ProgressSchema:()=>Ss,ProgressTokenSchema:()=>wo,PromptArgumentSchema:()=>Ds,PromptListChangedNotificationSchema:()=>Ys,PromptMessageSchema:()=>Gs,PromptReferenceSchema:()=>Ti,PromptSchema:()=>Fs,ReadResourceRequestParamsSchema:()=>ks,ReadResourceRequestSchema:()=>Rs,ReadResourceResultSchema:()=>Ps,RelatedTaskMetadataSchema:()=>us,RequestIdSchema:()=>ct,RequestMetaSchema:()=>ko,RequestSchema:()=>be,ResourceContentsSchema:()=>No,ResourceLinkSchema:()=>qr,ResourceListChangedNotificationSchema:()=>Ts,ResourceRequestParamsSchema:()=>Zr,ResourceSchema:()=>Mo,ResourceTemplateReferenceSchema:()=>Pi,ResourceTemplateSchema:()=>ys,ResourceUpdatedNotificationParamsSchema:()=>Ls,ResourceUpdatedNotificationSchema:()=>Us,ResultMetaObjectSchema:()=>Ro,ResultSchema:()=>ye,RoleSchema:()=>Et,RootSchema:()=>Ci,RootsListChangedNotificationSchema:()=>Ai,SamplingContentSchema:()=>mi,SamplingMessageContentBlockSchema:()=>Gt,SamplingMessageSchema:()=>hi,ServerCapabilitiesSchema:()=>Io,ServerNotificationSchema:()=>Mc,ServerRequestSchema:()=>jc,ServerResultSchema:()=>qc,ServerTasksCapabilitySchema:()=>bc,SetLevelRequestParamsSchema:()=>si,SetLevelRequestSchema:()=>ii,SingleSelectEnumSchemaSchema:()=>zi,StringSchemaSchema:()=>Lr,SubscribeRequestParamsSchema:()=>Es,SubscribeRequestSchema:()=>Is,SubscriptionFilterSchema:()=>qo,SubscriptionsAcknowledgedNotificationParamsSchema:()=>As,SubscriptionsAcknowledgedNotificationSchema:()=>js,SubscriptionsListenRequestParamsSchema:()=>Zs,SubscriptionsListenRequestSchema:()=>Ns,SubscriptionsListenResultMetaSchema:()=>Ms,SubscriptionsListenResultSchema:()=>qs,TaskAugmentedRequestParamsSchema:()=>Yt,TaskCreationParamsSchema:()=>xc,TaskMetadataSchema:()=>cs,TaskSchema:()=>It,TaskStatusNotificationParamsSchema:()=>Mi,TaskStatusNotificationSchema:()=>$c,TaskStatusSchema:()=>ji,TextContentSchema:()=>Nr,TextResourceContentsSchema:()=>Ao,TitledMultiSelectEnumSchemaSchema:()=>Ho,TitledSingleSelectEnumSchemaSchema:()=>Fo,ToolAnnotationsSchema:()=>Qs,ToolChoiceSchema:()=>pi,ToolExecutionSchema:()=>Xs,ToolListChangedNotificationSchema:()=>ni,ToolResultContentSchema:()=>di,ToolSchema:()=>Xt,ToolUseContentSchema:()=>Ws,UnsubscribeRequestParamsSchema:()=>Os,UnsubscribeRequestSchema:()=>Cs,UntitledMultiSelectEnumSchemaSchema:()=>Jo,UntitledSingleSelectEnumSchemaSchema:()=>Do});var Cy=(e)=>Po.safeParse(e).success,Zy=(e)=>To.safeParse(e).success,Fp=(e)=>Ir.safeParse(e).success,Ny=(e)=>Or.safeParse(e).success;var da=-32020,dA=[{rung:\"http-method\",order:1,evaluatedAt:\"edge\",codes:[-32000],conformance:[],rationale:\"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read.\"},{rung:\"jsonrpc-shape\",order:2,evaluatedAt:\"edge\",codes:[F.InvalidRequest],conformance:[\"server-stateless\"],rationale:\"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic.\"},{rung:\"era-classification\",order:3,evaluatedAt:\"edge\",codes:[da,F.UnsupportedProtocolVersion],conformance:[\"server-stateless\",\"http-header-validation\",\"http-custom-header-server-validation\"],rationale:\"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions.\"},{rung:\"envelope\",order:4,evaluatedAt:\"edge\",codes:[F.InvalidParams],conformance:[\"server-stateless\"],rationale:\"A present envelope claim with a malformed envelope — and a missing envelope on a request whose protocol-version header names a modern revision — is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400.\"},{rung:\"method-registry\",order:5,evaluatedAt:\"dispatch\",codes:[F.MethodNotFound],conformance:[\"server-stateless\"],rationale:\"Method existence outranks parameter validity: a method absent from the negotiated revision’s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at.\"},{rung:\"request-params\",order:6,evaluatedAt:\"dispatch\",codes:[F.InvalidParams],conformance:[],rationale:\"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table.\"},{rung:\"standard-header-validation\",order:7,evaluatedAt:\"pre-dispatch\",codes:[da],conformance:[\"http-header-validation\"],rationale:\"SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers — presence, sentinel decoding, and `Mcp-Name` ↔ body cross-check — are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The classifier’s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5–6) are consulted.\"},{rung:\"client-capabilities\",order:8,evaluatedAt:\"pre-dispatch\",codes:[F.MissingRequiredClientCapability],conformance:[\"server-stateless\"],rationale:\"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced — pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable.\"},{rung:\"param-header-validation\",order:9,evaluatedAt:\"pre-dispatch\",codes:[da],conformance:[\"http-custom-header-server-validation\"],rationale:\"SEP-2243 `Mcp-Param-*` headers are validated against the named tool’s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung.\"}],mA={[F.ParseError]:400,[F.InvalidRequest]:400,[F.MethodNotFound]:404,[F.UnsupportedProtocolVersion]:400,[F.MissingRequiredClientCapability]:400,[da]:400};function Xp(e,t){return au(e,t)}function la(e){return new Set(e.flatMap((t)=>Object.keys(t.shape)))}function Vp(e){if(e==null)return!1;let t=typeof e;if(t!==\"object\"&&t!==\"function\")return!1;if(!(\"~standard\"in e))return!1;return typeof e[\"~standard\"]?.validate===\"function\"}var ay=!1,Jp=\"draft-2020-12\";function L0(e,t=\"input\"){let r=e[\"~standard\"],o;if(r.jsonSchema)o=r.jsonSchema[t]({target:Jp});else if(r.vendor===\"zod\"){if(!(\"_zod\"in e))throw Error(\"Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().\");if(!ay)ay=!0,console.warn(\"[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.\");o=iu(e,{target:Jp,io:t})}else throw Error(`Schema library \"${r.vendor}\" does not implement StandardJSONSchemaV1 (\\`~standard.jsonSchema\\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===\"output\"){if(o.type!==void 0)return o;return Ay(o)?{type:\"object\",...o}:o}if(o.type!==void 0&&o.type!==\"object\")throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(o.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:\"object\",...o}}function Ay(e){if(\"properties\"in e||\"patternProperties\"in e||\"additionalProperties\"in e||\"required\"in e)return!0;for(let t of[\"oneOf\",\"anyOf\",\"allOf\"]){let r=e[t];if(Array.isArray(r)&&r.length>0)return r.every((o)=>o!==null&&typeof o===\"object\"&&(o.type===\"object\"||Ay(o)))}return!1}function U0(e){if(!e.path?.length)return e.message;return`${e.path.map((t)=>String(typeof t===\"object\"?t.key:t)).join(\".\")}: ${e.message}`}async function qp(e,t){let r=await e[\"~standard\"].validate(t);if(r.issues&&r.issues.length>0)return{success:!1,error:r.issues.map((o)=>U0(o)).join(\", \")};return{success:!0,data:r.value}}function D0(e){let t=iu(e,{target:Jp,io:\"input\"});return typeof t.pattern===\"string\"?t.pattern:void 0}var F0=/\\\\\\.\\\\d\\{(\\d+)\\}/;function V0(e){let t=F0.exec(e),r=[void 0,-1,0];if(t)r.push(Number(t[1]));return[!1,!0].flatMap((o)=>[!1,!0].flatMap((n)=>r.map((i)=>aa({local:o,offset:n,precision:i}))))}function J0(e,t){let r;switch(e){case\"email\":r=[Hb()];break;case\"uri\":r=[Wb()];break;case\"date\":r=[Ip()];break;case\"date-time\":r=V0(t);break}return new Set(r.map((o)=>D0(o)).filter((o)=>o!==void 0))}function H0(e,t,r){if(r!==\"zod\")return!0;return J0(e,t).has(t)}function ha(e){return typeof e===\"object\"&&e!==null&&!Array.isArray(e)}function B0(e){try{return L0(e,\"input\")}catch(t){let r=t instanceof Error?t.message:String(t);throw new Ce(F.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${r}`)}}var W0=new Set([\"$comment\",\"deprecated\",\"description\",\"examples\",\"readOnly\",\"title\",\"writeOnly\"]);function ed(e){return W0.has(e)||e.startsWith(\"x-\")}var G0=new Set([\"$schema\",...Object.keys(Dr.shape.requestedSchema.shape)]),cy={string:la([Lr,Do,Fo,Vo]),number:la([Ur]),integer:la([Ur]),boolean:la([Uo]),array:la([Jo,Ho])},K0=new Set(Lr.shape.format.unwrap().options);function Y0(e,t,r,o){if(!ha(e))return e;let n=typeof e.type===\"string\"&&Object.hasOwn(cy,e.type)?cy[e.type]:void 0;if(n===void 0)return e;let i={};for(let[s,a]of Object.entries(e))if(n.has(s)||ed(s))i[s]=a;else if(s===\"pattern\"&&e.type===\"string\"&&typeof e.format===\"string\"){if(!K0.has(e.format))i[s]=a;else if(typeof a!==\"string\"||!H0(e.format,a,r))o.push(`${t}.${s}`)}else o.push(`${t}.${s}`);return i}function Q0(e,t){let r={},o=[];for(let[n,i]of Object.entries(e))if(n===\"properties\"&&ha(i))r[n]=Object.fromEntries(Object.entries(i).map(([s,a])=>[s,Y0(a,`properties.${s}`,t,o)]));else if(G0.has(n))r[n]=i;else if(!ed(n))o.push(n);if(o.length>0)throw new Ce(F.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${o.join(\", \")}`);return r}function X0(e,t){if(!ha(e.properties))return t;let r=Object.entries(e.properties).filter(([,o])=>!Xp(Bo,o).success).map(([o])=>`properties.${o}`);return r.length>0?r.join(\", \"):t}function Hp(e,t,r=\"\"){if(Array.isArray(e)&&Array.isArray(t))return e.flatMap((o,n)=>Hp(o,t[n],`${r}[${n}]`));if(!ha(e)||!ha(t))return[];return Object.entries(e).flatMap(([o,n])=>{let i=r?`${r}.${o}`:o;if(!Object.prototype.hasOwnProperty.call(t,o))return ed(o)?[]:[i];return Hp(n,t[o],i)})}function eT(e){if(!Vp(e.requestedSchema))return{...e,mode:\"form\",requestedSchema:e.requestedSchema};let t=e.requestedSchema[\"~standard\"].vendor,r=Q0(B0(e.requestedSchema),t),o=Xp(Dr.shape.requestedSchema,r);if(!o.success)throw new Ce(F.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${X0(r,o.error.message)}`);let n=Hp(r,o.data);if(n.length>0)throw new Ce(F.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${n.join(\", \")}`);let i=(o.data.required??[]).filter((s)=>!Object.prototype.hasOwnProperty.call(o.data.properties,s));if(i.length>0)throw new Ce(F.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${i.join(\", \")}`);return{...e,mode:\"form\",requestedSchema:o.data}}function tT(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,r=typeof e.requestState===\"string\";if(!t&&!r)throw TypeError(\"inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)\");return{resultType:\"input_required\",...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}var hA=Object.assign(tT,{elicit(e){try{return{method:\"elicitation/create\",params:eT(e)}}catch(t){throw t instanceof Ce?TypeError(t.message,{cause:t}):t}},elicitUrl(e){return{method:\"elicitation/create\",params:{...e,mode:\"url\"}}},createMessage(e){return{method:\"sampling/createMessage\",params:e}},listRoots(){return{method:\"roots/list\"}}});var rT=[\"AnnotationsSchema\",\"AudioContentSchema\",\"BaseMetadataSchema\",\"BlobResourceContentsSchema\",\"BooleanSchemaSchema\",\"CallToolRequestSchema\",\"CallToolRequestParamsSchema\",\"CallToolResultSchema\",\"CancelledNotificationSchema\",\"CancelledNotificationParamsSchema\",\"CancelTaskRequestSchema\",\"CancelTaskResultSchema\",\"ClientCapabilitiesSchema\",\"ClientNotificationSchema\",\"ClientRequestSchema\",\"ClientResultSchema\",\"CompatibilityCallToolResultSchema\",\"CompleteRequestSchema\",\"CompleteRequestParamsSchema\",\"CompleteResultSchema\",\"ContentBlockSchema\",\"CreateMessageRequestSchema\",\"CreateMessageRequestParamsSchema\",\"CreateMessageResultSchema\",\"CreateMessageResultWithToolsSchema\",\"CreateTaskResultSchema\",\"CursorSchema\",\"DiscoverRequestSchema\",\"DiscoverResultSchema\",\"ElicitationCompleteNotificationSchema\",\"ElicitationCompleteNotificationParamsSchema\",\"ElicitRequestSchema\",\"ElicitRequestFormParamsSchema\",\"ElicitRequestParamsSchema\",\"ElicitRequestURLParamsSchema\",\"ElicitResultSchema\",\"EmbeddedResourceSchema\",\"EmptyResultSchema\",\"EnumSchemaSchema\",\"GetPromptRequestSchema\",\"GetPromptRequestParamsSchema\",\"GetPromptResultSchema\",\"GetTaskPayloadRequestSchema\",\"GetTaskPayloadResultSchema\",\"GetTaskRequestSchema\",\"GetTaskResultSchema\",\"IconSchema\",\"IconsSchema\",\"ImageContentSchema\",\"ImplementationSchema\",\"InitializedNotificationSchema\",\"InitializeRequestSchema\",\"InitializeRequestParamsSchema\",\"InitializeResultSchema\",\"JSONArraySchema\",\"JSONObjectSchema\",\"JSONRPCErrorResponseSchema\",\"JSONRPCMessageSchema\",\"JSONRPCNotificationSchema\",\"JSONRPCRequestSchema\",\"JSONRPCResponseSchema\",\"JSONRPCResultResponseSchema\",\"JSONValueSchema\",\"LegacyTitledEnumSchemaSchema\",\"ListPromptsRequestSchema\",\"ListPromptsResultSchema\",\"ListResourcesRequestSchema\",\"ListResourcesResultSchema\",\"ListResourceTemplatesRequestSchema\",\"ListResourceTemplatesResultSchema\",\"ListRootsRequestSchema\",\"ListRootsResultSchema\",\"ListTasksRequestSchema\",\"ListTasksResultSchema\",\"ListToolsRequestSchema\",\"ListToolsResultSchema\",\"LoggingLevelSchema\",\"LoggingMessageNotificationSchema\",\"LoggingMessageNotificationParamsSchema\",\"ModelHintSchema\",\"ModelPreferencesSchema\",\"MultiSelectEnumSchemaSchema\",\"NotificationSchema\",\"NumberSchemaSchema\",\"PaginatedRequestSchema\",\"PaginatedRequestParamsSchema\",\"PaginatedResultSchema\",\"PingRequestSchema\",\"PrimitiveSchemaDefinitionSchema\",\"ProgressSchema\",\"ProgressNotificationSchema\",\"ProgressNotificationParamsSchema\",\"ProgressTokenSchema\",\"PromptSchema\",\"PromptArgumentSchema\",\"PromptListChangedNotificationSchema\",\"PromptMessageSchema\",\"PromptReferenceSchema\",\"ReadResourceRequestSchema\",\"ReadResourceRequestParamsSchema\",\"ReadResourceResultSchema\",\"RelatedTaskMetadataSchema\",\"RequestSchema\",\"RequestIdSchema\",\"RequestMetaSchema\",\"ResourceSchema\",\"ResourceContentsSchema\",\"ResourceLinkSchema\",\"ResourceListChangedNotificationSchema\",\"ResourceRequestParamsSchema\",\"ResourceTemplateSchema\",\"ResourceTemplateReferenceSchema\",\"ResourceUpdatedNotificationSchema\",\"ResourceUpdatedNotificationParamsSchema\",\"ResultMetaObjectSchema\",\"ResultSchema\",\"RoleSchema\",\"RootSchema\",\"RootsListChangedNotificationSchema\",\"SamplingContentSchema\",\"SamplingMessageSchema\",\"SamplingMessageContentBlockSchema\",\"ServerCapabilitiesSchema\",\"ServerNotificationSchema\",\"ServerRequestSchema\",\"ServerResultSchema\",\"SetLevelRequestSchema\",\"SetLevelRequestParamsSchema\",\"SingleSelectEnumSchemaSchema\",\"StringSchemaSchema\",\"SubscribeRequestSchema\",\"SubscribeRequestParamsSchema\",\"SubscriptionFilterSchema\",\"SubscriptionsAcknowledgedNotificationSchema\",\"SubscriptionsAcknowledgedNotificationParamsSchema\",\"SubscriptionsListenRequestSchema\",\"SubscriptionsListenRequestParamsSchema\",\"SubscriptionsListenResultSchema\",\"SubscriptionsListenResultMetaSchema\",\"TaskAugmentedRequestParamsSchema\",\"TaskCreationParamsSchema\",\"TaskMetadataSchema\",\"TaskSchema\",\"TaskStatusSchema\",\"TaskStatusNotificationSchema\",\"TaskStatusNotificationParamsSchema\",\"TextContentSchema\",\"TextResourceContentsSchema\",\"TitledMultiSelectEnumSchemaSchema\",\"TitledSingleSelectEnumSchemaSchema\",\"ToolSchema\",\"ToolAnnotationsSchema\",\"ToolChoiceSchema\",\"ToolExecutionSchema\",\"ToolListChangedNotificationSchema\",\"ToolResultContentSchema\",\"ToolUseContentSchema\",\"UnsubscribeRequestSchema\",\"UnsubscribeRequestParamsSchema\",\"UntitledMultiSelectEnumSchemaSchema\",\"UntitledSingleSelectEnumSchemaSchema\"],oT={IdJagTokenExchangeResponseSchema:Fi,OAuthClientInformationFullSchema:Bi,OAuthClientInformationSchema:Hi,OAuthClientMetadataSchema:Ji,OAuthClientRegistrationErrorSchema:Lc,OAuthErrorResponseSchema:Vi,OAuthMetadataSchema:Wo,OAuthProtectedResourceMetadataSchema:qi,OAuthTokenRevocationRequestSchema:Uc,OAuthTokensSchema:Di,OpenIdProviderDiscoveryMetadataSchema:Ui,OpenIdProviderMetadataSchema:Li},jy={},My={};function qy(e,t){let r=e.slice(0,-6);jy[r]=t,My[r]=(o)=>t.safeParse(o).success}for(let e of rT)qy(e,q0[e]);for(let[e,t]of Object.entries(oT))qy(e,t);var nT=Object.freeze(jy),sT=Object.freeze(My);function iT(e){switch(e){case\"initialize\":case\"notifications/initialized\":return ma(void 0);case\"server/discover\":return ma(Qp);default:return}}var Ly=60000,aT=[Pr,vo,Tr,xo],cT=[\"inputResponses\",\"requestState\"];function uy(e,t){let r=e.params;if(!Lp(r))return{message:e,lifted:{}};let o=r._meta,n=Lp(o)?aT.filter((c)=>(c in o)):[],i=t===\"request\"?cT.filter((c)=>(c in r)):[];if(n.length===0&&i.length===0)return{message:e,lifted:{}};let s={},a={...r};if(n.length>0&&Lp(o)){let c={},u={...o};for(let l of n)c[l]=o[l],delete u[l];if(s.envelope=c,Object.keys(u).length>0)a._meta=u;else delete a._meta}for(let c of i){if(c===\"inputResponses\")s.inputResponses=a[c];if(c===\"requestState\")s.requestState=a[c];delete a[c]}return{message:{...e,params:a},lifted:s}}function ly(e,t){let r=e.validateResult(t,void 0);if(!r.ok&&r.reason===\"not-in-era\")return;return{\"~standard\":{version:1,vendor:\"mcp-wire-codec\",validate(o){let n=e.validateResult(t,o);if(n.ok)return{value:n.value};return{issues:[{message:n.reason===\"invalid\"?n.message:`not-in-era: ${t}`}]}}}}}function Uy(e){return()=>e}var uT=Uy(void 0),lT,td=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{lT=(e,t)=>{e._negotiatedProtocolVersion=t}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??hc,this.setNotificationHandler(\"notifications/cancelled\",(t)=>{this._oncancel(t)}),this.setNotificationHandler(\"notifications/progress\",(t)=>{this._onprogress(t)}),this.setRequestHandler(\"ping\",(t)=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let r=e.params??{};return{...e,params:{...r,_meta:{...t,...r._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new ke(Oe.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,o,n=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:n,onTimeout:o})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new ke(Oe.RequestTimeout,\"Maximum total timeout exceeded\",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);if(t)clearTimeout(t.timeoutId),this._timeoutInfo.delete(e)}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let r=this.transport?.onerror;this._transport.onerror=(n)=>{r?.(n),this._onerror(n)};let o=this._transport?.onmessage;this._transport.onmessage=(n,i)=>{if(o?.(n,i),Fp(n)||Ny(n))this._onresponse(n);else if(Cy(n))this._onrequest(n,i);else if(Zy(n))this._onnotification(n,i);else this._onerror(Error(`Unknown message type: ${JSON.stringify(n)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let r=new ke(Oe.ConnectionClosed,\"Connection closed\");this._transport=void 0;try{this.onclose?.()}finally{for(let o of e.values())o(r);for(let o of t.values())o.abort(r)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:r}=uy(e,\"notification\"),o=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===\"drop\")return;if(t?.classification!==void 0){let s=iy(t.classification);if(s!==o.era){this._onerror(Error(`Era mismatch on inbound notification '${r.method}': classified as ${s} but this instance serves ${o.era}`));return}}if(Mp(r.method)&&!o.hasNotificationMethod(r.method))return;let n=this._notificationHandlers.get(r.method),i=this.fallbackNotificationHandler;if(n===void 0&&i===void 0)return;Promise.resolve().then(()=>n===void 0?i(r):n(r,o)).catch((s)=>this._onerror(Error(`Uncaught error in notification handler: ${s}`)))}_onrequest(e,t){let{message:r,lifted:o}=uy(e,\"request\"),n=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===\"drop\"){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let i=this._transport,s=(I,x,J)=>{let re={jsonrpc:\"2.0\",id:r.id,error:{code:I,message:x,...J!==void 0&&{data:J}}};i?.send(re).catch((M)=>this._onerror(Error(`Failed to send an error response: ${M}`)))};if(t?.classification!==void 0){let I=iy(t.classification);if(I!==n.era){this._onerror(Error(`Era mismatch on inbound request '${r.method}': classified as ${I} but this instance serves ${n.era}`));let x=t.classification.revision??I;s(F.UnsupportedProtocolVersion,`Unsupported protocol version: ${x}`,{supported:this._supportedProtocolVersions,requested:x});return}}if(jp(r.method)&&!n.hasRequestMethod(r.method)){s(F.MethodNotFound,\"Method not found\");return}let a=this._requestHandlers.get(r.method)??this.fallbackRequestHandler;if(a===void 0){s(F.MethodNotFound,\"Method not found\");return}let c=n.checkInboundEnvelope(o);if(c!==void 0){s(F.InvalidParams,c);return}let u=(I,x)=>this._notificationViaCodec(this._resolveOutboundCodec(I.method),I,{...x,relatedRequestId:r.id}),l=(I,x,J)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(I.method),I,x,{...J,relatedRequestId:r.id}),m=new AbortController;this._requestHandlerAbortControllers.set(r.id,m);let h=o.inputResponses===void 0?void 0:pT(o.inputResponses),f={sessionId:i?.sessionId,mcpReq:{id:r.id,method:r.method,_meta:r.params?._meta,...o.envelope!==void 0&&{envelope:o.envelope},...h!==void 0&&{inputResponses:h.accepted},...h!==void 0&&h.droppedKeys.length>0&&{droppedInputResponseKeys:h.droppedKeys},requestState:o.requestState===void 0?uT:Uy(o.requestState),signal:m.signal,send:(I,x,J)=>{let re=this._resolveOutboundCodec(I.method);if(this._assertOutboundRequestInEra(re,I.method),Vp(x))return l(I,x,J);let M=ly(re,I.method);if(M===void 0)throw TypeError(`'${I.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return l(I,M,x)},notify:u},http:t?.authInfo?{authInfo:t.authInfo}:void 0},b=this.buildContext(f,t);Promise.resolve().then(()=>a(r,b)).then(async(I)=>{if(m.signal.aborted)return;let x;try{x=n.encodeResult(r.method,I,this._outboundServerInfo())}catch(re){this._onerror(Error(`Failed to encode result for ${r.method}: ${re}`)),s(F.InternalError,\"Internal error\");return}let J={result:x,jsonrpc:\"2.0\",id:r.id};await i?.send(J)},async(I)=>{if(m.signal.aborted)return;let x=Number.isSafeInteger(I.code)?I.code:F.InternalError,J={jsonrpc:\"2.0\",id:r.id,error:{code:n.encodeErrorCode(x),message:I.message??\"Internal error\",...I.data!==void 0&&{data:I.data}}};await i?.send(J)}).catch((I)=>this._onerror(Error(`Failed to send response: ${I}`))).finally(()=>{if(this._requestHandlerAbortControllers.get(r.id)===m)this._requestHandlerAbortControllers.delete(r.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,o=Number(t),n=this._progressHandlers.get(o);if(!n){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let i=this._responseHandlers.get(o),s=this._timeoutInfo.get(o);if(s&&i&&s.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(a){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),i(a);return}n(r)}_onresponse(e){let t=Number(e.id),r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Fp(e))r(e);else r(Ce.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,r){let o=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(o,e.method),Vp(t))return this._requestWithSchemaViaCodec(o,e,t,r);let n=ly(o,e.method);if(n===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(o,e,n,t)}_negotiatedWireCodec(){return ma(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=iT(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(jp(t)&&!e.hasRequestMethod(t))throw new ke(Oe.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,r){let o=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(o,e.method),this._requestWithSchemaViaCodec(o,e,t,r)}_requestWithSchemaViaCodec(e,t,r,o){let{relatedRequestId:n,resumptionToken:i,onresumptiontoken:s,headers:a}=o??{},c=Date.now(),u,l;return new Promise((m,h)=>{let f=(K)=>{h(K)};if(!this._transport){f(Error(\"Not connected\"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(K){f(K);return}if(o?.signal?.aborted){let K=o.signal.reason;throw K instanceof ke?K:new ke(Oe.RequestTimeout,String(K))}let b=e.era===Qp&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,I=this._requestMessageId++;l=I;let x={...t,jsonrpc:\"2.0\",id:I};if(o?.onprogress)this._progressHandlers.set(I,o.onprogress),x.params={...t.params,_meta:{...t.params?._meta,progressToken:I}};let J=this._envelopeOutbound(x),re=!1,M=(K)=>{if(re)return;if(this._progressHandlers.delete(I),b===void 0)this._transport?.send(this._envelopeOutbound({jsonrpc:\"2.0\",method:\"notifications/cancelled\",params:{requestId:I,reason:String(K)}}),{relatedRequestId:n,resumptionToken:i,onresumptiontoken:s}).catch((de)=>this._onerror(Error(`Failed to send cancellation: ${de}`)));else b.abort();h(K instanceof ke?K:new ke(Oe.RequestTimeout,String(K)))};this._responseHandlers.set(I,(K)=>{if(o?.signal?.aborted)return;if(re=!0,K instanceof Error)return h(K);let de;try{de=e.decodeResult(t.method,K.result)}catch(Me){return h(Me instanceof Error?Me:Error(String(Me)))}if(de.kind===\"invalid\")return h(de.error);if(de.kind===\"input_required\"){if(o?.allowInputRequired===!0)return m(dT(de));let Me={codec:e,request:t,resultSchema:r,options:o,flowStartedAt:c,retry:(jt,lr)=>this._requestWithSchemaViaCodec(e,jt===void 0?{method:t.method}:{method:t.method,params:jt},r,lr)};return m(this._resolveNonCompleteResult(de,Me))}let Be=de.result;qp(r,Be).then((Me)=>{if(Me.success)m(Me.data);else h(new ke(Oe.InvalidResult,`Invalid result for ${t.method}: ${Me.error}`))},h)}),u=()=>M(o?.signal?.reason),o?.signal?.addEventListener(\"abort\",u,{once:!0});let k=o?.timeout??Ly,N=()=>M(new ke(Oe.RequestTimeout,\"Request timed out\",{timeout:k}));this._setupTimeout(I,k,o?.maxTotalTimeout,N,o?.resetTimeoutOnProgress??!1),this._transport.send(J,{relatedRequestId:n,resumptionToken:i,onresumptiontoken:s,headers:a,requestSignal:b?.signal}).catch((K)=>{this._progressHandlers.delete(I),h(K)})}).finally(()=>{if(u)o?.signal?.removeEventListener(\"abort\",u);if(l!==void 0)this._responseHandlers.delete(l),this._cleanupTimeout(l)})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,r){if(!this._transport)throw new ke(Oe.NotConnected,\"Not connected\");if(Mp(t.method)&&!e.hasNotificationMethod(t.method))throw new ke(Oe.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let o=this._envelopeOutbound({jsonrpc:\"2.0\",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;this._transport?.send(o,r).catch((n)=>this._onerror(n))});return}await this._transport.send(o,r)}setRequestHandler(e,t,r){this.assertRequestHandlerCapability(e);let o;if(typeof t===\"function\"){if(!jp(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);o=(n,i)=>{let s=this._negotiatedWireCodec(),a=s.validateRequest(e,n);if(!a.ok&&a.reason===\"not-in-era\")a=s.validateInputRequest(e,n);if(!a.ok){if(a.reason===\"not-in-era\")throw new Ce(F.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(a.message)}return Promise.resolve(t(a.value,i))}}else if(r)o=async(n,i)=>{let s=await qp(t.params,{...n.params});if(!s.success)throw new Ce(F.InvalidParams,`Invalid params for ${e}: ${s.error}`);return r(s.data,i)};else throw TypeError(\"setRequestHandler: handler is required\");this._requestHandlers.set(e,this._wrapHandler(e,o))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,r){if(typeof t===\"function\"){if(!Mp(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(o,n)=>{let i=n.validateNotification(e,o);if(!i.ok){if(i.reason===\"not-in-era\")throw new Ce(F.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(i.message)}return Promise.resolve(t(i.value))});return}if(!r)throw TypeError(\"setNotificationHandler: handler is required\");this._notificationHandlers.set(e,async(o)=>{let n=await qp(t.params,{...o.params});if(!n.success)throw new Ce(F.InvalidParams,`Invalid params for notification ${e}: ${n.error}`);await r(n.data,o)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Lp(e){return e!==null&&typeof e===\"object\"&&!Array.isArray(e)}function py(e){return typeof e===\"object\"&&e!==null&&!Array.isArray(e)}function pT(e){let t={},r=[];if(!py(e))return{accepted:t,droppedKeys:r};for(let[o,n]of Object.entries(e)){if(!py(n)||\"method\"in n||\"result\"in n){r.push(o);continue}t[o]=n}return{accepted:t,droppedKeys:r}}function dT(e){return{resultType:\"input_required\",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}/*!\n* content-type\n* Copyright(c) 2015 Douglas Christopher Wilson\n* MIT Licensed\n*/var mT=Vd((e)=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *(\"(?:[\\u000b\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\u000b\\u0020-\\u00ff])*\"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,r=/\\\\([\\u000b\\u0020-\\u00ff])/g,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=n;function n(a){if(!a)throw TypeError(\"argument string is required\");var c=typeof a===\"object\"?i(a):a;if(typeof c!==\"string\")throw TypeError(\"argument string is required to be a string\");var u=c.indexOf(\";\"),l=u!==-1?c.slice(0,u).trim():c.trim();if(!o.test(l))throw TypeError(\"invalid media type\");var m=new s(l.toLowerCase());if(u!==-1){var h,f,b;t.lastIndex=u;while(f=t.exec(c)){if(f.index!==u)throw TypeError(\"invalid parameter format\");if(u+=f[0].length,h=f[1].toLowerCase(),b=f[2],b.charCodeAt(0)===34){if(b=b.slice(1,-1),b.indexOf(\"\\\\\")!==-1)b=b.replace(r,\"$1\")}m.parameters[h]=b}if(u!==c.length)throw TypeError(\"invalid parameter format\")}return m}function i(a){var c;if(typeof a.getHeader===\"function\")c=a.getHeader(\"content-type\");else if(typeof a.headers===\"object\")c=a.headers&&a.headers[\"content-type\"];if(typeof c!==\"string\")throw TypeError(\"content-type header is missing from object\");return c}function s(a){this.parameters=Object.create(null),this.type=a}}),fA=Hd(mT(),1);var kA=typeof self<\"u\"&&self.location&&self.location.origin!==\"null\"?new URL(self.location.origin+self.location.pathname+location.search):new URL(\"https://github.com/cfworker\");var hT=/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/,fT=[0,31,28,31,30,31,30,31,31,30,31,30,31],gT=/^(\\d\\d):(\\d\\d):(\\d\\d)(\\.\\d+)?(z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,_T=/^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i,ST=/^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'\"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,zT=/^(?:(?:[^\\x00-\\x20\"'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,bT=/^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,yT=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,vT=/^(?:\\/(?:[^~/]|~0|~1)*)*$/,xT=/^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,wT=/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,$T=(e)=>{if(e[0]==='\"')return!1;let[t,r,...o]=e.split(\"@\");if(!t||!r||o.length!==0||t.length>64||r.length>253)return!1;if(t[0]===\".\"||t.endsWith(\".\")||t.includes(\"..\"))return!1;if(!/^[a-z0-9.-]+$/i.test(r)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t))return!1;return r.split(\".\").every((n)=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(n))},kT=/^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,RT=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,PT=(e)=>e.length>1&&e.length<80&&(/^P\\d+([.,]\\d+)?W$/.test(e)||/^P[\\dYMDTHS]*(\\d[.,]\\d+)?[YMDHS]$/.test(e)&&/^P([.,\\d]+Y)?([.,\\d]+M)?([.,\\d]+D)?(T([.,\\d]+H)?([.,\\d]+M)?([.,\\d]+S)?)?$/.test(e));function bt(e){return e.test.bind(e)}var RA={date:Dy,time:Fy.bind(void 0,!1),\"date-time\":IT,duration:PT,uri:ZT,\"uri-reference\":bt(ST),\"uri-template\":bt(zT),url:bt(bT),email:$T,hostname:bt(_T),ipv4:bt(kT),ipv6:bt(RT),regex:AT,uuid:bt(yT),\"json-pointer\":bt(vT),\"json-pointer-uri-fragment\":bt(xT),\"relative-json-pointer\":bt(wT)};function TT(e){return e%4===0&&(e%100!==0||e%400===0)}function Dy(e){let t=e.match(hT);if(!t)return!1;let r=+t[1],o=+t[2],n=+t[3];return o>=1&&o<=12&&n>=1&&n<=(o==2&&TT(r)?29:fT[o])}function Fy(e,t){let r=t.match(gT);if(!r)return!1;let o=+r[1],n=+r[2],i=+r[3],s=!!r[5];return(o<=23&&n<=59&&i<=59||o==23&&n==59&&i==60)&&(!e||s)}var ET=/t|\\s/i;function IT(e){let t=e.split(ET);return t.length==2&&Dy(t[0])&&Fy(!0,t[1])}var OT=/\\/|:/,CT=/^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function ZT(e){return OT.test(e)&&CT.test(e)}var NT=/[^\\\\]\\\\Z/;function AT(e){if(NT.test(e))return!1;try{return new RegExp(e,\"u\"),!0}catch(t){return!1}}var MT;MT=globalThis.crypto;var fa=class extends Error{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.OAuthClientFlowError\"})}static[Symbol.hasInstance](e){return Xe(this,e)}static isInstance(e){if(typeof this!==\"function\")throw TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");return Xe(this,e)}constructor(e){super(e);this.name=new.target.name,Gr(this,new.target)}},Sj=class extends fa{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.IssuerMismatchError\"})}kind;expected;received;constructor(e,t,r){super(`Issuer mismatch in ${e===\"metadata\"?\"authorization server metadata (RFC 8414 §3.3)\":\"authorization response (RFC 9207)\"}: expected ${JSON.stringify(t)}, received ${JSON.stringify(r)}`);this.kind=e,this.expected=t,this.received=r}},zj=class extends fa{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.RegistrationRejectedError\"})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`);this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},bj=class extends fa{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.InsecureTokenEndpointError\"})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / 127.0.0.1 / ::1 are exempt).`);this.tokenEndpoint=e}},yj=class extends fa{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.AuthorizationServerMismatchError\"})}constructor(e,t){super(`Authorization server changed between redirect and callback (redirected to ${JSON.stringify(e)}, callback resolved ${JSON.stringify(t)}); refusing to send authorization_code/code_verifier to a different token endpoint`);this.recordedIssuer=e,this.currentIssuer=t}},vj=class extends fa{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.InsufficientScopeError\"})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required \"${e.requiredScope}\"`:\"\"}`);this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var xj=class extends Error{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.UnauthorizedError\"})}static[Symbol.hasInstance](e){return Xe(this,e)}static isInstance(e){if(typeof this!==\"function\")throw TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");return Xe(this,e)}constructor(e){super(e??\"Unauthorized\");this.name=\"UnauthorizedError\",Gr(this,new.target)}};var wj=class extends Error{static{Object.defineProperty(this,\"mcpBrand\",{value:\"mcp.SseError\"})}static[Symbol.hasInstance](e){return Xe(this,e)}static isInstance(e){if(typeof this!==\"function\")throw TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");return Xe(this,e)}constructor(e,t,r){super(`SSE error: ${t}`);this.code=e,this.event=r,Gr(this,new.target)}};var Vy;function z(e,t,r){function o(a,c){if(!a._zod)Object.defineProperty(a,\"_zod\",{value:{def:c,constr:s,traits:new Set},enumerable:!1});if(a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=s.prototype,l=Object.keys(u);for(let m=0;m<l.length;m++){let h=l[m];if(!(h in a))a[h]=u[h].bind(a)}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,\"name\",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,\"init\",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:(a)=>{if(r?.Parent&&a instanceof r.Parent)return!0;return a?._zod?.traits?.has(e)}}),Object.defineProperty(s,\"name\",{value:e}),s}var qT=Symbol(\"zod_brand\");class Zt extends Error{constructor(){super(\"Encountered Promise during synchronous parse. Use .parseAsync() instead.\")}}class ga extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name=\"ZodEncodeError\"}}(Vy=globalThis).__zod_globalConfig??(Vy.__zod_globalConfig={});var Xo=globalThis.__zod_globalConfig;function Ue(e){if(e)Object.assign(Xo,e);return Xo}function gu(e){let t=Object.values(e).filter((o)=>typeof o===\"number\");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function od(e,t=\"|\"){return e.map((r)=>ad(r)).join(t)}function Sa(e,t){if(typeof t===\"bigint\")return t.toString();return t}function _u(e){return{get value(){{let r=e();return Object.defineProperty(this,\"value\",{value:r}),r}throw Error(\"cached value already set\")}}}function Su(e){return e===null||e===void 0}function zu(e){let t=e.startsWith(\"^\")?1:0,r=e.endsWith(\"$\")?e.length-1:e.length;return e.slice(t,r)}function Hy(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);if(Math.abs(r-o)<n)return 0;return r-o}var Jy=Symbol(\"evaluating\");function Q(e,t,r){let o=void 0;Object.defineProperty(e,t,{get(){if(o===Jy)return;if(o===void 0)o=Jy,o=r();return o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Kr(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function sr(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function nd(e){return JSON.stringify(e)}function By(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,\"\").replace(/[\\s_-]+/g,\"-\").replace(/^-+|-+$/g,\"\")}var sd=\"captureStackTrace\"in Error?Error.captureStackTrace:(...e)=>{};function _a(e){return typeof e===\"object\"&&e!==null&&!Array.isArray(e)}var Wy=_u(()=>{if(Xo.jitless)return!1;if(typeof navigator<\"u\"&&navigator?.userAgent?.includes(\"Cloudflare\"))return!1;try{return new Function(\"\"),!0}catch(e){return!1}});function Yr(e){if(_a(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!==\"function\")return!0;let r=t.prototype;if(_a(r)===!1)return!1;if(Object.prototype.hasOwnProperty.call(r,\"isPrototypeOf\")===!1)return!1;return!0}function id(e){if(Yr(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}var Gy=new Set([\"string\",\"number\",\"symbol\"]);function ir(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function lt(e,t,r){let o=new e._zod.constr(t??e._zod.def);if(!t||r?.parent)o._zod.parent=e;return o}function A(e){let t=e;if(!t)return{};if(typeof t===\"string\")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error(\"Cannot specify both `message` and `error` params\");t.error=t.message}if(delete t.message,typeof t.error===\"string\")return{...t,error:()=>t.error};return t}function ad(e){if(typeof e===\"bigint\")return e.toString()+\"n\";if(typeof e===\"string\")return`\"${e}\"`;return`${e}`}function Ky(e){return Object.keys(e).filter((t)=>e[t]._zod.optin===\"optional\"&&e[t]._zod.optout===\"optional\")}var Yy={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function LT(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw Error(\".pick() cannot be used on object schemas containing refinements\");let i=sr(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: \"${a}\"`);if(!t[a])continue;s[a]=r.shape[a]}return Kr(this,\"shape\",s),s},checks:[]});return lt(e,i)}function UT(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw Error(\".omit() cannot be used on object schemas containing refinements\");let i=sr(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: \"${a}\"`);if(!t[a])continue;delete s[a]}return Kr(this,\"shape\",s),s},checks:[]});return lt(e,i)}function DT(e,t){if(!Yr(t))throw Error(\"Invalid input to extend: expected a plain object\");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\")}let n=sr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Kr(this,\"shape\",i),i}});return lt(e,n)}function FT(e,t){if(!Yr(t))throw Error(\"Invalid input to safeExtend: expected a plain object\");let r=sr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Kr(this,\"shape\",o),o}});return lt(e,r)}function VT(e,t){if(e._zod.def.checks?.length)throw Error(\".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.\");let r=sr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Kr(this,\"shape\",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return lt(e,r)}function JT(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw Error(\".partial() cannot be used on object schemas containing refinements\");let s=sr(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let u in r){if(!(u in a))throw Error(`Unrecognized key: \"${u}\"`);if(!r[u])continue;c[u]=e?new e({type:\"optional\",innerType:a[u]}):a[u]}else for(let u in a)c[u]=e?new e({type:\"optional\",innerType:a[u]}):a[u];return Kr(this,\"shape\",c),c},checks:[]});return lt(t,s)}function HT(e,t,r){let o=sr(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw Error(`Unrecognized key: \"${s}\"`);if(!r[s])continue;i[s]=new e({type:\"nonoptional\",innerType:n[s]})}else for(let s in n)i[s]=new e({type:\"nonoptional\",innerType:n[s]});return Kr(this,\"shape\",i),i}});return lt(t,o)}function Qr(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Qy(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function ar(e,t){return t.map((r)=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function fu(e){return typeof e===\"string\"?e:e?.message}function pt(e,t,r){let o=e.message?e.message:fu(e.inst?._zod.def?.error?.(e))??fu(t?.error?.(e))??fu(r.customError?.(e))??fu(r.localeError?.(e))??\"Invalid input\",{inst:n,continue:i,input:s,...a}=e;if(a.path??(a.path=[]),a.message=o,t?.reportInput)a.input=s;return a}function bu(e){if(Array.isArray(e))return\"array\";if(typeof e===\"string\")return\"string\";return\"unknown\"}function Xy(e){let t=typeof e;switch(t){case\"number\":return Number.isNaN(e)?\"nan\":\"number\";case\"object\":{if(e===null)return\"null\";if(Array.isArray(e))return\"array\";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&\"constructor\"in r&&r.constructor)return r.constructor.name}}return t}function Xr(...e){let[t,r,o]=e;if(typeof t===\"string\")return{message:t,code:\"custom\",input:r,inst:o};return{...t}}var ev=(e,t)=>{e.name=\"$ZodError\",Object.defineProperty(e,\"_zod\",{value:e._zod,enumerable:!1}),Object.defineProperty(e,\"issues\",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Sa,2),Object.defineProperty(e,\"toString\",{value:()=>e.message,enumerable:!1})},yu=z(\"$ZodError\",ev),cd=z(\"$ZodError\",ev,{Parent:Error});function ud(e,t=(r)=>r.message){let r={},o=[];for(let n of e.issues)if(n.path.length>0)r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n));else o.push(t(n));return{formErrors:o,fieldErrors:r}}function ld(e,t=(r)=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let s of n.issues)if(s.code===\"invalid_union\"&&s.errors.length)s.errors.map((a)=>o({issues:a},[...i,...s.path]));else if(s.code===\"invalid_key\")o({issues:s.issues},[...i,...s.path]);else if(s.code===\"invalid_element\")o({issues:s.issues},[...i,...s.path]);else{let a=[...i,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,u=0;while(u<a.length){let l=a[u];if(u!==a.length-1)c[l]=c[l]||{_errors:[]};else c[l]=c[l]||{_errors:[]},c[l]._errors.push(t(s));c=c[l],u++}}}};return o(e),r}var vu=(e)=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Zt;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map((c)=>pt(c,i,Ue())));throw sd(a,n?.callee),a}return s.value};var xu=(e)=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)s=await s;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map((c)=>pt(c,i,Ue())));throw sd(a,n?.callee),a}return s.value};var za=(e)=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Zt;return i.issues.length?{success:!1,error:new(e??yu)(i.issues.map((s)=>pt(s,n,Ue())))}:{success:!0,data:i.value}},tv=za(cd),ba=(e)=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)i=await i;return i.issues.length?{success:!1,error:new e(i.issues.map((s)=>pt(s,n,Ue())))}:{success:!0,data:i.value}},rv=ba(cd),ov=(e)=>(t,r,o)=>{let n=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return vu(e)(t,r,n)};var nv=(e)=>(t,r,o)=>vu(e)(t,r,o);var sv=(e)=>async(t,r,o)=>{let n=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return xu(e)(t,r,n)};var iv=(e)=>async(t,r,o)=>xu(e)(t,r,o);var av=(e)=>(t,r,o)=>{let n=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return za(e)(t,r,n)};var cv=(e)=>(t,r,o)=>za(e)(t,r,o);var uv=(e)=>async(t,r,o)=>{let n=o?{...o,direction:\"backward\"}:{direction:\"backward\"};return ba(e)(t,r,n)};var lv=(e)=>async(t,r,o)=>ba(e)(t,r,o);var pv=/^[cC][0-9a-z]{6,}$/,dv=/^[0-9a-z]+$/,mv=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,hv=/^[0-9a-vA-V]{20}$/,fv=/^[A-Za-z0-9]{27}$/,gv=/^[a-zA-Z0-9_-]{21}$/,_v=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;var Sv=/^([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})$/,pd=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var zv=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;var WT=\"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\";function bv(){return new RegExp(WT,\"u\")}var yv=/^(?:(?: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])$/,vv=/^(([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}|:))$/;var xv=/^((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])$/,wv=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$v=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dd=/^[A-Za-z0-9_-]*$/;var kv=/^https?$/,Rv=/^\\+[1-9]\\d{6,14}$/,Pv=\"(?:(?:\\\\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])))\",Tv=new RegExp(`^${Pv}$`);function Ev(e){return typeof e.precision===\"number\"?e.precision===-1?\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d\":e.precision===0?\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\":`(?:[01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:\"(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?\"}function Iv(e){return new RegExp(`^${Ev(e)}$`)}function Ov(e){let t=Ev({precision:e.precision}),r=[\"Z\"];if(e.local)r.push(\"\");if(e.offset)r.push(\"([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)\");let o=`${t}(?:${r.join(\"|\")})`;return new RegExp(`^${Pv}T(?:${o})$`)}var Cv=(e)=>{let t=e?`[\\\\s\\\\S]{${e?.minimum??0},${e?.maximum??\"\"}}`:\"[\\\\s\\\\S]*\";return new RegExp(`^${t}$`)};var Zv=/^-?\\d+$/,md=/^-?\\d+(?:\\.\\d+)?$/,Nv=/^(?:true|false)$/i;var Av=/^undefined$/i;var jv=/^[^A-Z]*$/,Mv=/^[^a-z]*$/;var Ze=z(\"$ZodCheck\",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),qv={number:\"number\",bigint:\"bigint\",object:\"date\"},hd=z(\"$ZodCheckLessThan\",(e,t)=>{Ze.init(e,t);let r=qv[typeof t.value];e._zod.onattach.push((o)=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<i)if(t.inclusive)n.maximum=t.value;else n.exclusiveMaximum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value<=t.value:o.value<t.value)return;o.issues.push({origin:r,code:\"too_big\",maximum:typeof t.value===\"object\"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),fd=z(\"$ZodCheckGreaterThan\",(e,t)=>{Ze.init(e,t);let r=qv[typeof t.value];e._zod.onattach.push((o)=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>i)if(t.inclusive)n.minimum=t.value;else n.exclusiveMinimum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value>=t.value:o.value>t.value)return;o.issues.push({origin:r,code:\"too_small\",minimum:typeof t.value===\"object\"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Lv=z(\"$ZodCheckMultipleOf\",(e,t)=>{Ze.init(e,t),e._zod.onattach.push((r)=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=(r)=>{if(typeof r.value!==typeof t.value)throw Error(\"Cannot mix number and bigint in multiple_of check.\");if(typeof r.value===\"bigint\"?r.value%t.value===BigInt(0):Hy(r.value,t.value)===0)return;r.issues.push({origin:typeof r.value,code:\"not_multiple_of\",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Uv=z(\"$ZodCheckNumberFormat\",(e,t)=>{Ze.init(e,t),t.format=t.format||\"float64\";let r=t.format?.includes(\"int\"),o=r?\"int\":\"number\",[n,i]=Yy[t.format];e._zod.onattach.push((s)=>{let a=s._zod.bag;if(a.format=t.format,a.minimum=n,a.maximum=i,r)a.pattern=Zv}),e._zod.check=(s)=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:\"invalid_type\",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)s.issues.push({input:a,code:\"too_big\",maximum:Number.MAX_SAFE_INTEGER,note:\"Integers must be within the safe integer range.\",inst:e,origin:o,inclusive:!0,continue:!t.abort});else s.issues.push({input:a,code:\"too_small\",minimum:Number.MIN_SAFE_INTEGER,note:\"Integers must be within the safe integer range.\",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}if(a<n)s.issues.push({origin:\"number\",input:a,code:\"too_small\",minimum:n,inclusive:!0,inst:e,continue:!t.abort});if(a>i)s.issues.push({origin:\"number\",input:a,code:\"too_big\",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}});var Dv=z(\"$ZodCheckMaxLength\",(e,t)=>{var r;Ze.init(e,t),(r=e._zod.def).when??(r.when=(o)=>{let n=o.value;return!Su(n)&&n.length!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<n)o._zod.bag.maximum=t.maximum}),e._zod.check=(o)=>{let n=o.value;if(n.length<=t.maximum)return;let s=bu(n);o.issues.push({origin:s,code:\"too_big\",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Fv=z(\"$ZodCheckMinLength\",(e,t)=>{var r;Ze.init(e,t),(r=e._zod.def).when??(r.when=(o)=>{let n=o.value;return!Su(n)&&n.length!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>n)o._zod.bag.minimum=t.minimum}),e._zod.check=(o)=>{let n=o.value;if(n.length>=t.minimum)return;let s=bu(n);o.issues.push({origin:s,code:\"too_small\",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Vv=z(\"$ZodCheckLengthEquals\",(e,t)=>{var r;Ze.init(e,t),(r=e._zod.def).when??(r.when=(o)=>{let n=o.value;return!Su(n)&&n.length!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=(o)=>{let n=o.value,i=n.length;if(i===t.length)return;let s=bu(n),a=i>t.length;o.issues.push({origin:s,...a?{code:\"too_big\",maximum:t.length}:{code:\"too_small\",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),va=z(\"$ZodCheckStringFormat\",(e,t)=>{var r,o;if(Ze.init(e,t),e._zod.onattach.push((n)=>{let i=n._zod.bag;if(i.format=t.format,t.pattern)i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern)}),t.pattern)(r=e._zod).check??(r.check=(n)=>{if(t.pattern.lastIndex=0,t.pattern.test(n.value))return;n.issues.push({origin:\"string\",code:\"invalid_format\",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(o=e._zod).check??(o.check=()=>{})}),Jv=z(\"$ZodCheckRegex\",(e,t)=>{va.init(e,t),e._zod.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:\"string\",code:\"invalid_format\",format:\"regex\",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Hv=z(\"$ZodCheckLowerCase\",(e,t)=>{t.pattern??(t.pattern=jv),va.init(e,t)}),Bv=z(\"$ZodCheckUpperCase\",(e,t)=>{t.pattern??(t.pattern=Mv),va.init(e,t)}),Wv=z(\"$ZodCheckIncludes\",(e,t)=>{Ze.init(e,t);let r=ir(t.includes),o=new RegExp(typeof t.position===\"number\"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push((n)=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=(n)=>{if(n.value.includes(t.includes,t.position))return;n.issues.push({origin:\"string\",code:\"invalid_format\",format:\"includes\",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Gv=z(\"$ZodCheckStartsWith\",(e,t)=>{Ze.init(e,t);let r=new RegExp(`^${ir(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=(o)=>{if(o.value.startsWith(t.prefix))return;o.issues.push({origin:\"string\",code:\"invalid_format\",format:\"starts_with\",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Kv=z(\"$ZodCheckEndsWith\",(e,t)=>{Ze.init(e,t);let r=new RegExp(`.*${ir(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=(o)=>{if(o.value.endsWith(t.suffix))return;o.issues.push({origin:\"string\",code:\"invalid_format\",format:\"ends_with\",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});var Yv=z(\"$ZodCheckOverwrite\",(e,t)=>{Ze.init(e,t),e._zod.check=(r)=>{r.value=t.tx(r.value)}});class gd{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e===\"function\"){e(this,{execution:\"sync\"}),e(this,{execution:\"async\"});return}let r=e.split(`\n`).filter((i)=>i),o=Math.min(...r.map((i)=>i.length-i.trimStart().length)),n=r.map((i)=>i.slice(o)).map((i)=>\" \".repeat(this.indent*2)+i);for(let i of n)this.content.push(i)}compile(){let e=Function,t=this?.args,o=[...(this?.content??[\"\"]).map((n)=>` ${n}`)];return new e(...t,o.join(`\n`))}}var Xv={major:4,minor:4,patch:3};var ie=z(\"$ZodType\",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Xv;let o=[...e._zod.def.checks??[]];if(e._zod.traits.has(\"$ZodCheck\"))o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(s,a,c)=>{let u=Qr(s),l;for(let m of a){if(m._zod.def.when){if(Qy(s))continue;if(!m._zod.def.when(s))continue}else if(u)continue;let h=s.issues.length,f=m._zod.check(s);if(f instanceof Promise&&c?.async===!1)throw new Zt;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{if(await f,s.issues.length===h)return;if(!u)u=Qr(s,h)});else{if(s.issues.length===h)continue;if(!u)u=Qr(s,h)}}if(l)return l.then(()=>s);return s},i=(s,a,c)=>{if(Qr(s))return s.aborted=!0,s;let u=n(a,o,c);if(u instanceof Promise){if(c.async===!1)throw new Zt;return u.then((l)=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction===\"backward\"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});if(u instanceof Promise)return u.then((l)=>i(l,s,a));return i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new Zt;return c.then((u)=>n(u,o,a))}return n(c,o,a)}}Q(e,\"~standard\",()=>({validate:(n)=>{try{let i=tv(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch(i){return rv(e,n).then((s)=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:\"zod\",version:1}))}),ku=z(\"$ZodString\",(e,t)=>{ie.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Cv(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch(n){}if(typeof r.value===\"string\")return r;return r.issues.push({expected:\"string\",code:\"invalid_type\",input:r.value,inst:e}),r}}),le=z(\"$ZodStringFormat\",(e,t)=>{va.init(e,t),ku.init(e,t)}),cx=z(\"$ZodGUID\",(e,t)=>{t.pattern??(t.pattern=Sv),le.init(e,t)}),ux=z(\"$ZodUUID\",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw Error(`Invalid UUID version: \"${t.version}\"`);t.pattern??(t.pattern=pd(o))}else t.pattern??(t.pattern=pd());le.init(e,t)}),lx=z(\"$ZodEmail\",(e,t)=>{t.pattern??(t.pattern=zv),le.init(e,t)}),px=z(\"$ZodURL\",(e,t)=>{le.init(e,t),e._zod.check=(r)=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===kv.source){if(!/^https?:\\/\\//i.test(o)){r.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid URL format\",input:r.value,inst:e,continue:!t.abort});return}}let n=new URL(o);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(n.hostname))r.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid hostname\",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(n.protocol.endsWith(\":\")?n.protocol.slice(0,-1):n.protocol))r.issues.push({code:\"invalid_format\",format:\"url\",note:\"Invalid protocol\",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})}if(t.normalize)r.value=n.href;else r.value=o;return}catch(o){r.issues.push({code:\"invalid_format\",format:\"url\",input:r.value,inst:e,continue:!t.abort})}}}),dx=z(\"$ZodEmoji\",(e,t)=>{t.pattern??(t.pattern=bv()),le.init(e,t)}),mx=z(\"$ZodNanoID\",(e,t)=>{t.pattern??(t.pattern=gv),le.init(e,t)}),hx=z(\"$ZodCUID\",(e,t)=>{t.pattern??(t.pattern=pv),le.init(e,t)}),fx=z(\"$ZodCUID2\",(e,t)=>{t.pattern??(t.pattern=dv),le.init(e,t)}),gx=z(\"$ZodULID\",(e,t)=>{t.pattern??(t.pattern=mv),le.init(e,t)}),_x=z(\"$ZodXID\",(e,t)=>{t.pattern??(t.pattern=hv),le.init(e,t)}),Sx=z(\"$ZodKSUID\",(e,t)=>{t.pattern??(t.pattern=fv),le.init(e,t)}),zx=z(\"$ZodISODateTime\",(e,t)=>{t.pattern??(t.pattern=Ov(t)),le.init(e,t)}),bx=z(\"$ZodISODate\",(e,t)=>{t.pattern??(t.pattern=Tv),le.init(e,t)}),yx=z(\"$ZodISOTime\",(e,t)=>{t.pattern??(t.pattern=Iv(t)),le.init(e,t)}),vx=z(\"$ZodISODuration\",(e,t)=>{t.pattern??(t.pattern=_v),le.init(e,t)}),xx=z(\"$ZodIPv4\",(e,t)=>{t.pattern??(t.pattern=yv),le.init(e,t),e._zod.bag.format=\"ipv4\"}),wx=z(\"$ZodIPv6\",(e,t)=>{t.pattern??(t.pattern=vv),le.init(e,t),e._zod.bag.format=\"ipv6\",e._zod.check=(r)=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:\"invalid_format\",format:\"ipv6\",input:r.value,inst:e,continue:!t.abort})}}});var $x=z(\"$ZodCIDRv4\",(e,t)=>{t.pattern??(t.pattern=xv),le.init(e,t)}),kx=z(\"$ZodCIDRv6\",(e,t)=>{t.pattern??(t.pattern=wv),le.init(e,t),e._zod.check=(r)=>{let o=r.value.split(\"/\");try{if(o.length!==2)throw Error();let[n,i]=o;if(!i)throw Error();let s=Number(i);if(`${s}`!==i)throw Error();if(s<0||s>128)throw Error();new URL(`http://[${n}]`)}catch{r.issues.push({code:\"invalid_format\",format:\"cidrv6\",input:r.value,inst:e,continue:!t.abort})}}});function Rx(e){if(e===\"\")return!0;if(/\\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Px=z(\"$ZodBase64\",(e,t)=>{t.pattern??(t.pattern=$v),le.init(e,t),e._zod.bag.contentEncoding=\"base64\",e._zod.check=(r)=>{if(Rx(r.value))return;r.issues.push({code:\"invalid_format\",format:\"base64\",input:r.value,inst:e,continue:!t.abort})}});function GT(e){if(!dd.test(e))return!1;let t=e.replace(/[-_]/g,(o)=>o===\"-\"?\"+\":\"/\"),r=t.padEnd(Math.ceil(t.length/4)*4,\"=\");return Rx(r)}var Tx=z(\"$ZodBase64URL\",(e,t)=>{t.pattern??(t.pattern=dd),le.init(e,t),e._zod.bag.contentEncoding=\"base64url\",e._zod.check=(r)=>{if(GT(r.value))return;r.issues.push({code:\"invalid_format\",format:\"base64url\",input:r.value,inst:e,continue:!t.abort})}}),Ex=z(\"$ZodE164\",(e,t)=>{t.pattern??(t.pattern=Rv),le.init(e,t)});function KT(e,t=null){try{let r=e.split(\".\");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));if(\"typ\"in n&&n?.typ!==\"JWT\")return!1;if(!n.alg)return!1;if(t&&(!(\"alg\"in n)||n.alg!==t))return!1;return!0}catch{return!1}}var Ix=z(\"$ZodJWT\",(e,t)=>{le.init(e,t),e._zod.check=(r)=>{if(KT(r.value,t.alg))return;r.issues.push({code:\"invalid_format\",format:\"jwt\",input:r.value,inst:e,continue:!t.abort})}});var Sd=z(\"$ZodNumber\",(e,t)=>{ie.init(e,t),e._zod.pattern=e._zod.bag.pattern??md,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch(s){}let n=r.value;if(typeof n===\"number\"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n===\"number\"?Number.isNaN(n)?\"NaN\":!Number.isFinite(n)?\"Infinity\":void 0:void 0;return r.issues.push({expected:\"number\",code:\"invalid_type\",input:n,inst:e,...i?{received:i}:{}}),r}}),Ox=z(\"$ZodNumberFormat\",(e,t)=>{Uv.init(e,t),Sd.init(e,t)}),Cx=z(\"$ZodBoolean\",(e,t)=>{ie.init(e,t),e._zod.pattern=Nv,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Boolean(r.value)}catch(i){}let n=r.value;if(typeof n===\"boolean\")return r;return r.issues.push({expected:\"boolean\",code:\"invalid_type\",input:n,inst:e}),r}});var Zx=z(\"$ZodUndefined\",(e,t)=>{ie.init(e,t),e._zod.pattern=Av,e._zod.values=new Set([void 0]),e._zod.parse=(r,o)=>{let n=r.value;if(typeof n>\"u\")return r;return r.issues.push({expected:\"undefined\",code:\"invalid_type\",input:n,inst:e}),r}});var Nx=z(\"$ZodAny\",(e,t)=>{ie.init(e,t),e._zod.parse=(r)=>r}),Ax=z(\"$ZodUnknown\",(e,t)=>{ie.init(e,t),e._zod.parse=(r)=>r}),jx=z(\"$ZodNever\",(e,t)=>{ie.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:\"never\",code:\"invalid_type\",input:r.value,inst:e}),r)});function ex(e,t,r){if(e.issues.length)t.issues.push(...ar(r,e.issues));t.value[r]=e.value}var Mx=z(\"$ZodArray\",(e,t)=>{ie.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:\"array\",code:\"invalid_type\",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);if(c instanceof Promise)i.push(c.then((u)=>ex(u,r,s)));else ex(c,r,s)}if(i.length)return Promise.all(i).then(()=>r);return r}});function $u(e,t,r,o,n,i){let s=r in o;if(e.issues.length){if(n&&i&&!s)return;t.issues.push(...ar(r,e.issues))}if(!s&&!n){if(!e.issues.length)t.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:void 0,path:[r]});return}if(e.value===void 0){if(s)t.value[r]=void 0}else t.value[r]=e.value}function qx(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has(\"$ZodType\"))throw Error(`Invalid element at key \"${o}\": expected a Zod schema`);let r=Ky(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Lx(e,t,r,o,n,i){let s=[],a=n.keySet,c=n.catchall._zod,u=c.def.type,l=c.optin===\"optional\",m=c.optout===\"optional\";for(let h in t){if(h===\"__proto__\")continue;if(a.has(h))continue;if(u===\"never\"){s.push(h);continue}let f=c.run({value:t[h],issues:[]},o);if(f instanceof Promise)e.push(f.then((b)=>$u(b,r,h,t,l,m)));else $u(f,r,h,t,l,m)}if(s.length)r.issues.push({code:\"unrecognized_keys\",keys:s,input:t,inst:i});if(!e.length)return r;return Promise.all(e).then(()=>r)}var YT=z(\"$ZodObject\",(e,t)=>{if(ie.init(e,t),!Object.getOwnPropertyDescriptor(t,\"shape\")?.get){let a=t.shape;Object.defineProperty(t,\"shape\",{get:()=>{let c={...a};return Object.defineProperty(t,\"shape\",{value:c}),c}})}let o=_u(()=>qx(t));Q(e._zod,\"propValues\",()=>{let a=t.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let m of l.values)c[u].add(m)}}return c});let n=_a,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!n(u))return a.issues.push({expected:\"object\",code:\"invalid_type\",input:u,inst:e}),a;a.value={};let l=[],m=s.shape;for(let h of s.keys){let f=m[h],b=f._zod.optin===\"optional\",I=f._zod.optout===\"optional\",x=f._zod.run({value:u[h],issues:[]},c);if(x instanceof Promise)l.push(x.then((J)=>$u(J,a,h,u,b,I)));else $u(x,a,h,u,b,I)}if(!i)return l.length?Promise.all(l).then(()=>a):a;return Lx(l,u,a,c,o.value,e)}}),Ux=z(\"$ZodObjectJIT\",(e,t)=>{YT.init(e,t);let r=e._zod.parse,o=_u(()=>qx(t)),n=(h)=>{let f=new gd([\"shape\",\"payload\",\"ctx\"]),b=o.value,I=(M)=>{let k=nd(M);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};f.write(\"const input = payload.value;\");let x=Object.create(null),J=0;for(let M of b.keys)x[M]=`key_${J++}`;f.write(\"const newResult = {};\");for(let M of b.keys){let k=x[M],N=nd(M),K=h[M],de=K?._zod?.optin===\"optional\",Be=K?._zod?.optout===\"optional\";if(f.write(`const ${k} = ${I(M)};`),de&&Be)f.write(`\n if (${k}.issues.length) {\n if (${N} in input) {\n payload.issues = payload.issues.concat(${k}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${N}, ...iss.path] : [${N}]\n })));\n }\n }\n \n if (${k}.value === undefined) {\n if (${N} in input) {\n newResult[${N}] = undefined;\n }\n } else {\n newResult[${N}] = ${k}.value;\n }\n \n `);else if(!de)f.write(`\n const ${k}_present = ${N} in input;\n if (${k}.issues.length) {\n payload.issues = payload.issues.concat(${k}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${N}, ...iss.path] : [${N}]\n })));\n }\n if (!${k}_present && !${k}.issues.length) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [${N}]\n });\n }\n\n if (${k}_present) {\n if (${k}.value === undefined) {\n newResult[${N}] = undefined;\n } else {\n newResult[${N}] = ${k}.value;\n }\n }\n\n `);else f.write(`\n if (${k}.issues.length) {\n payload.issues = payload.issues.concat(${k}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${N}, ...iss.path] : [${N}]\n })));\n }\n \n if (${k}.value === undefined) {\n if (${N} in input) {\n newResult[${N}] = undefined;\n }\n } else {\n newResult[${N}] = ${k}.value;\n }\n \n `)}f.write(\"payload.value = newResult;\"),f.write(\"return payload;\");let re=f.compile();return(M,k)=>re(h,M,k)},i,s=_a,a=!Xo.jitless,u=a&&Wy.value,l=t.catchall,m;e._zod.parse=(h,f)=>{m??(m=o.value);let b=h.value;if(!s(b))return h.issues.push({expected:\"object\",code:\"invalid_type\",input:b,inst:e}),h;if(a&&u&&f?.async===!1&&f.jitless!==!0){if(!i)i=n(t.shape);if(h=i(h,f),!l)return h;return Lx([],b,h,f,m,e)}return r(h,f)}});function tx(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter((i)=>!Qr(i));if(n.length===1)return t.value=n[0].value,n[0];return t.issues.push({code:\"invalid_union\",input:t.value,inst:r,errors:e.map((i)=>i.issues.map((s)=>pt(s,o,Ue())))}),t}var Dx=z(\"$ZodUnion\",(e,t)=>{ie.init(e,t),Q(e._zod,\"optin\",()=>t.options.some((o)=>o._zod.optin===\"optional\")?\"optional\":void 0),Q(e._zod,\"optout\",()=>t.options.some((o)=>o._zod.optout===\"optional\")?\"optional\":void 0),Q(e._zod,\"values\",()=>{if(t.options.every((o)=>o._zod.values))return new Set(t.options.flatMap((o)=>Array.from(o._zod.values)));return}),Q(e._zod,\"pattern\",()=>{if(t.options.every((o)=>o._zod.pattern)){let o=t.options.map((n)=>n._zod.pattern);return new RegExp(`^(${o.map((n)=>zu(n.source)).join(\"|\")})$`)}return});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},n);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}if(!i)return tx(s,o,e,n);return Promise.all(s).then((a)=>tx(a,o,e,n))}});var Fx=z(\"$ZodIntersection\",(e,t)=>{ie.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);if(i instanceof Promise||s instanceof Promise)return Promise.all([i,s]).then(([c,u])=>rx(r,c,u));return rx(r,i,s)}});function _d(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Yr(e)&&Yr(t)){let r=Object.keys(t),o=Object.keys(e).filter((i)=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=_d(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=_d(n,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function rx(e,t,r){let o=new Map,n;for(let a of t.issues)if(a.code===\"unrecognized_keys\"){n??(n=a);for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).l=!0}}else e.issues.push(a);for(let a of r.issues)if(a.code===\"unrecognized_keys\")for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).r=!0}else e.issues.push(a);let i=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&n)e.issues.push({...n,keys:i});if(Qr(e))return e;let s=_d(t.value,r.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var Vx=z(\"$ZodRecord\",(e,t)=>{ie.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Yr(n))return r.issues.push({expected:\"record\",code:\"invalid_type\",input:n,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let a=new Set;for(let u of s)if(typeof u===\"string\"||typeof u===\"number\"||typeof u===\"symbol\"){a.add(typeof u===\"number\"?u.toString():u);let l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(l.issues.length){r.issues.push({code:\"invalid_key\",origin:\"record\",issues:l.issues.map((f)=>pt(f,o,Ue())),input:u,path:[u],inst:e});continue}let m=l.value,h=t.valueType._zod.run({value:n[u],issues:[]},o);if(h instanceof Promise)i.push(h.then((f)=>{if(f.issues.length)r.issues.push(...ar(u,f.issues));r.value[m]=f.value}));else{if(h.issues.length)r.issues.push(...ar(u,h.issues));r.value[m]=h.value}}let c;for(let u in n)if(!a.has(u))c=c??[],c.push(u);if(c&&c.length>0)r.issues.push({code:\"unrecognized_keys\",input:n,inst:e,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(n)){if(a===\"__proto__\")continue;if(!Object.prototype.propertyIsEnumerable.call(n,a))continue;let c=t.keyType._zod.run({value:a,issues:[]},o);if(c instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(typeof a===\"string\"&&md.test(a)&&c.issues.length){let m=t.keyType._zod.run({value:Number(a),issues:[]},o);if(m instanceof Promise)throw Error(\"Async schemas not supported in object keys currently\");if(m.issues.length===0)c=m}if(c.issues.length){if(t.mode===\"loose\")r.value[a]=n[a];else r.issues.push({code:\"invalid_key\",origin:\"record\",issues:c.issues.map((m)=>pt(m,o,Ue())),input:a,path:[a],inst:e});continue}let l=t.valueType._zod.run({value:n[a],issues:[]},o);if(l instanceof Promise)i.push(l.then((m)=>{if(m.issues.length)r.issues.push(...ar(a,m.issues));r.value[c.value]=m.value}));else{if(l.issues.length)r.issues.push(...ar(a,l.issues));r.value[c.value]=l.value}}}if(i.length)return Promise.all(i).then(()=>r);return r}});var Jx=z(\"$ZodEnum\",(e,t)=>{ie.init(e,t);let r=gu(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter((n)=>Gy.has(typeof n)).map((n)=>typeof n===\"string\"?ir(n):n.toString()).join(\"|\")})$`),e._zod.parse=(n,i)=>{let s=n.value;if(o.has(s))return n;return n.issues.push({code:\"invalid_value\",values:r,input:s,inst:e}),n}}),Hx=z(\"$ZodLiteral\",(e,t)=>{if(ie.init(e,t),t.values.length===0)throw Error(\"Cannot create literal schema with no valid values\");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map((o)=>typeof o===\"string\"?ir(o):o?ir(o.toString()):String(o)).join(\"|\")})$`),e._zod.parse=(o,n)=>{let i=o.value;if(r.has(i))return o;return o.issues.push({code:\"invalid_value\",values:t.values,input:i,inst:e}),o}});var Bx=z(\"$ZodTransform\",(e,t)=>{ie.init(e,t),e._zod.optin=\"optional\",e._zod.parse=(r,o)=>{if(o.direction===\"backward\")throw new ga(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then((s)=>(r.value=s,r.fallback=!0,r));if(n instanceof Promise)throw new Zt;return r.value=n,r.fallback=!0,r}});function ox(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var zd=z(\"$ZodOptional\",(e,t)=>{ie.init(e,t),e._zod.optin=\"optional\",e._zod.optout=\"optional\",Q(e._zod,\"values\",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Q(e._zod,\"pattern\",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${zu(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin===\"optional\"){let n=r.value,i=t.innerType._zod.run(r,o);if(i instanceof Promise)return i.then((s)=>ox(s,n));return ox(i,n)}if(r.value===void 0)return r;return t.innerType._zod.run(r,o)}}),Wx=z(\"$ZodExactOptional\",(e,t)=>{zd.init(e,t),Q(e._zod,\"values\",()=>t.innerType._zod.values),Q(e._zod,\"pattern\",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),Gx=z(\"$ZodNullable\",(e,t)=>{ie.init(e,t),Q(e._zod,\"optin\",()=>t.innerType._zod.optin),Q(e._zod,\"optout\",()=>t.innerType._zod.optout),Q(e._zod,\"pattern\",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${zu(r.source)}|null)$`):void 0}),Q(e._zod,\"values\",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>{if(r.value===null)return r;return t.innerType._zod.run(r,o)}}),Kx=z(\"$ZodDefault\",(e,t)=>{ie.init(e,t),e._zod.optin=\"optional\",Q(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>nx(i,t));return nx(n,t)}});function nx(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var Yx=z(\"$ZodPrefault\",(e,t)=>{ie.init(e,t),e._zod.optin=\"optional\",Q(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(r,o);if(r.value===void 0)r.value=t.defaultValue;return t.innerType._zod.run(r,o)}}),Qx=z(\"$ZodNonOptional\",(e,t)=>{ie.init(e,t),Q(e._zod,\"values\",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter((o)=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>sx(i,e));return sx(n,e)}});function sx(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:e.value,inst:t});return e}var Xx=z(\"$ZodCatch\",(e,t)=>{ie.init(e,t),e._zod.optin=\"optional\",Q(e._zod,\"optout\",()=>t.innerType._zod.optout),Q(e._zod,\"values\",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>{if(r.value=i.value,i.issues.length)r.value=t.catchValue({...r,error:{issues:i.issues.map((s)=>pt(s,o,Ue()))},input:r.value}),r.issues=[],r.fallback=!0;return r});if(r.value=n.value,n.issues.length)r.value=t.catchValue({...r,error:{issues:n.issues.map((i)=>pt(i,o,Ue()))},input:r.value}),r.issues=[],r.fallback=!0;return r}});var ew=z(\"$ZodPipe\",(e,t)=>{ie.init(e,t),Q(e._zod,\"values\",()=>t.in._zod.values),Q(e._zod,\"optin\",()=>t.in._zod.optin),Q(e._zod,\"optout\",()=>t.out._zod.optout),Q(e._zod,\"propValues\",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction===\"backward\"){let i=t.out._zod.run(r,o);if(i instanceof Promise)return i.then((s)=>wu(s,t.in,o));return wu(i,t.in,o)}let n=t.in._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>wu(i,t.out,o));return wu(n,t.out,o)}});function wu(e,t,r){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var tw=z(\"$ZodReadonly\",(e,t)=>{ie.init(e,t),Q(e._zod,\"propValues\",()=>t.innerType._zod.propValues),Q(e._zod,\"values\",()=>t.innerType._zod.values),Q(e._zod,\"optin\",()=>t.innerType?._zod?.optin),Q(e._zod,\"optout\",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then(ix);return ix(n)}});function ix(e){return e.value=Object.freeze(e.value),e}var rw=z(\"$ZodCustom\",(e,t)=>{Ze.init(e,t),ie.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=(r)=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then((i)=>ax(i,r,o,e));ax(n,r,o,e);return}});function ax(e,t,r,o){if(!e){let n={code:\"custom\",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};if(o._zod.def.params)n.params=o._zod.def.params;t.issues.push(Xr(n))}}var QT=()=>{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\"}};function t(n){return e[n]??null}let r={regex:\"input\",email:\"email address\",url:\"URL\",emoji:\"emoji\",uuid:\"UUID\",uuidv4:\"UUIDv4\",uuidv6:\"UUIDv6\",nanoid:\"nanoid\",guid:\"GUID\",cuid:\"cuid\",cuid2:\"cuid2\",ulid:\"ULID\",xid:\"XID\",ksuid:\"KSUID\",datetime:\"ISO datetime\",date:\"ISO date\",time:\"ISO time\",duration:\"ISO duration\",ipv4:\"IPv4 address\",ipv6:\"IPv6 address\",mac:\"MAC address\",cidrv4:\"IPv4 range\",cidrv6:\"IPv6 range\",base64:\"base64-encoded string\",base64url:\"base64url-encoded string\",json_string:\"JSON string\",e164:\"E.164 number\",jwt:\"JWT\",template_literal:\"input\"},o={nan:\"NaN\"};return(n)=>{switch(n.code){case\"invalid_type\":{let i=o[n.expected]??n.expected,s=Xy(n.input),a=o[s]??s;return`Invalid input: expected ${i}, received ${a}`}case\"invalid_value\":if(n.values.length===1)return`Invalid input: expected ${ad(n.values[0])}`;return`Invalid option: expected one of ${od(n.values,\"|\")}`;case\"too_big\":{let i=n.inclusive?\"<=\":\"<\",s=t(n.origin);if(s)return`Too big: expected ${n.origin??\"value\"} to have ${i}${n.maximum.toString()} ${s.unit??\"elements\"}`;return`Too big: expected ${n.origin??\"value\"} to be ${i}${n.maximum.toString()}`}case\"too_small\":{let i=n.inclusive?\">=\":\">\",s=t(n.origin);if(s)return`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${s.unit}`;return`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case\"invalid_format\":{let i=n;if(i.format===\"starts_with\")return`Invalid string: must start with \"${i.prefix}\"`;if(i.format===\"ends_with\")return`Invalid string: must end with \"${i.suffix}\"`;if(i.format===\"includes\")return`Invalid string: must include \"${i.includes}\"`;if(i.format===\"regex\")return`Invalid string: must match pattern ${i.pattern}`;return`Invalid ${r[i.format]??n.format}`}case\"not_multiple_of\":return`Invalid number: must be a multiple of ${n.divisor}`;case\"unrecognized_keys\":return`Unrecognized key${n.keys.length>1?\"s\":\"\"}: ${od(n.keys,\", \")}`;case\"invalid_key\":return`Invalid key in ${n.origin}`;case\"invalid_union\":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`Invalid discriminator value. Expected ${n.options.map((s)=>`'${s}'`).join(\" | \")}`;return\"Invalid input\";case\"invalid_element\":return`Invalid value in ${n.origin}`;default:return\"Invalid input\"}}};function bd(){return{localeError:QT()}}var ow,XT=Symbol(\"ZodOutput\"),eE=Symbol(\"ZodInput\");class nw{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];if(this._map.set(e,r),r&&typeof r===\"object\"&&\"id\"in r)this._idmap.set(r.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t===\"object\"&&\"id\"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let o={...r,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function sw(){return new nw}(ow=globalThis).__zod_globalRegistry??(ow.__zod_globalRegistry=sw());var cr=globalThis.__zod_globalRegistry;function iw(e,t){return new e({type:\"string\",...A(t)})}function aw(e,t){return new e({type:\"string\",format:\"email\",check:\"string_format\",abort:!1,...A(t)})}function yd(e,t){return new e({type:\"string\",format:\"guid\",check:\"string_format\",abort:!1,...A(t)})}function cw(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,...A(t)})}function uw(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v4\",...A(t)})}function lw(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v6\",...A(t)})}function pw(e,t){return new e({type:\"string\",format:\"uuid\",check:\"string_format\",abort:!1,version:\"v7\",...A(t)})}function dw(e,t){return new e({type:\"string\",format:\"url\",check:\"string_format\",abort:!1,...A(t)})}function mw(e,t){return new e({type:\"string\",format:\"emoji\",check:\"string_format\",abort:!1,...A(t)})}function hw(e,t){return new e({type:\"string\",format:\"nanoid\",check:\"string_format\",abort:!1,...A(t)})}function fw(e,t){return new e({type:\"string\",format:\"cuid\",check:\"string_format\",abort:!1,...A(t)})}function gw(e,t){return new e({type:\"string\",format:\"cuid2\",check:\"string_format\",abort:!1,...A(t)})}function _w(e,t){return new e({type:\"string\",format:\"ulid\",check:\"string_format\",abort:!1,...A(t)})}function Sw(e,t){return new e({type:\"string\",format:\"xid\",check:\"string_format\",abort:!1,...A(t)})}function zw(e,t){return new e({type:\"string\",format:\"ksuid\",check:\"string_format\",abort:!1,...A(t)})}function bw(e,t){return new e({type:\"string\",format:\"ipv4\",check:\"string_format\",abort:!1,...A(t)})}function yw(e,t){return new e({type:\"string\",format:\"ipv6\",check:\"string_format\",abort:!1,...A(t)})}function vw(e,t){return new e({type:\"string\",format:\"cidrv4\",check:\"string_format\",abort:!1,...A(t)})}function xw(e,t){return new e({type:\"string\",format:\"cidrv6\",check:\"string_format\",abort:!1,...A(t)})}function ww(e,t){return new e({type:\"string\",format:\"base64\",check:\"string_format\",abort:!1,...A(t)})}function $w(e,t){return new e({type:\"string\",format:\"base64url\",check:\"string_format\",abort:!1,...A(t)})}function kw(e,t){return new e({type:\"string\",format:\"e164\",check:\"string_format\",abort:!1,...A(t)})}function Rw(e,t){return new e({type:\"string\",format:\"jwt\",check:\"string_format\",abort:!1,...A(t)})}function Pw(e,t){return new e({type:\"string\",format:\"datetime\",check:\"string_format\",offset:!1,local:!1,precision:null,...A(t)})}function Tw(e,t){return new e({type:\"string\",format:\"date\",check:\"string_format\",...A(t)})}function Ew(e,t){return new e({type:\"string\",format:\"time\",check:\"string_format\",precision:null,...A(t)})}function Iw(e,t){return new e({type:\"string\",format:\"duration\",check:\"string_format\",...A(t)})}function Ow(e,t){return new e({type:\"number\",checks:[],...A(t)})}function Cw(e,t){return new e({type:\"number\",check:\"number_format\",abort:!1,format:\"safeint\",...A(t)})}function Zw(e,t){return new e({type:\"boolean\",...A(t)})}function Nw(e,t){return new e({type:\"undefined\",...A(t)})}function Aw(e){return new e({type:\"any\"})}function jw(e){return new e({type:\"unknown\"})}function Mw(e,t){return new e({type:\"never\",...A(t)})}function Ru(e,t){return new hd({check:\"less_than\",...A(t),value:e,inclusive:!1})}function xa(e,t){return new hd({check:\"less_than\",...A(t),value:e,inclusive:!0})}function Pu(e,t){return new fd({check:\"greater_than\",...A(t),value:e,inclusive:!1})}function wa(e,t){return new fd({check:\"greater_than\",...A(t),value:e,inclusive:!0})}function Tu(e,t){return new Lv({check:\"multiple_of\",...A(t),value:e})}function Eu(e,t){return new Dv({check:\"max_length\",...A(t),maximum:e})}function en(e,t){return new Fv({check:\"min_length\",...A(t),minimum:e})}function Iu(e,t){return new Vv({check:\"length_equals\",...A(t),length:e})}function vd(e,t){return new Jv({check:\"string_format\",format:\"regex\",...A(t),pattern:e})}function xd(e){return new Hv({check:\"string_format\",format:\"lowercase\",...A(e)})}function wd(e){return new Bv({check:\"string_format\",format:\"uppercase\",...A(e)})}function $d(e,t){return new Wv({check:\"string_format\",format:\"includes\",...A(t),includes:e})}function kd(e,t){return new Gv({check:\"string_format\",format:\"starts_with\",...A(t),prefix:e})}function Rd(e,t){return new Kv({check:\"string_format\",format:\"ends_with\",...A(t),suffix:e})}function ur(e){return new Yv({check:\"overwrite\",tx:e})}function Pd(e){return ur((t)=>t.normalize(e))}function Td(){return ur((e)=>e.trim())}function Ed(){return ur((e)=>e.toLowerCase())}function Id(){return ur((e)=>e.toUpperCase())}function Od(){return ur((e)=>By(e))}function qw(e,t,r){return new e({type:\"array\",element:t,...A(r)})}function Lw(e,t,r){return new e({type:\"custom\",check:\"custom\",fn:t,...A(r)})}function Uw(e,t){let r=tE((o)=>(o.addIssue=(n)=>{if(typeof n===\"string\")o.issues.push(Xr(n,o.value,r._zod.def));else{let i=n;if(i.fatal)i.continue=!1;i.code??(i.code=\"custom\"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(Xr(i))}},e(o.value,o)),t);return r}function tE(e,t){let r=new Ze({check:\"custom\",...A(t)});return r._zod.check=e,r}function Cd(e){let t=e?.target??\"draft-2020-12\";if(t===\"draft-4\")t=\"draft-04\";if(t===\"draft-7\")t=\"draft-07\";return{processors:e.processors??{},metadataRegistry:e?.metadata??cr,target:t,unrepresentable:e?.unrepresentable??\"throw\",override:e?.override??(()=>{}),io:e?.io??\"output\",counter:0,seen:new Map,cycles:e?.cycles??\"ref\",reused:e?.reused??\"inline\",external:e?.external??void 0}}function we(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i){if(i.count++,r.schemaPath.includes(e))i.cycle=r.path;return i.schema}let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else{let h=s.schema,f=t.processors[n.type];if(!f)throw Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(e,t,h,l)}let m=e._zod.parent;if(m){if(!s.ref)s.ref=m;we(m,t,l),t.seen.get(m).isParent=!0}}let c=t.metadataRegistry.get(e);if(c)Object.assign(s.schema,c);if(t.io===\"input\"&&De(e))delete s.schema.examples,delete s.schema.default;if(t.io===\"input\"&&\"_prefault\"in s.schema)(o=s.schema).default??(o.default=s.schema._prefault);return delete s.schema._prefault,t.seen.get(e).schema}function Zd(e,t){let r=e.seen.get(t);if(!r)throw Error(\"Unprocessed schema. This is a bug in Zod.\");let o=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=o.get(a);if(c&&c!==s[0])throw Error(`Duplicate schema id \"${a}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,s[0])}}let n=(s)=>{let a=e.target===\"draft-2020-12\"?\"$defs\":\"definitions\";if(e.external){let m=e.external.registry.get(s[0])?.id,h=e.external.uri??((b)=>b);if(m)return{ref:h(m)};let f=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=f,{defId:f,ref:`${h(\"__shared\")}#/${a}/${f}`}}if(s[1]===r)return{ref:\"#\"};let u=`${\"#\"}/${a}/`,l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},i=(s)=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:u}=n(s);if(a.def={...a.schema},u)a.defId=u;let l=a.schema;for(let m in l)delete l[m];l.$ref=c};if(e.cycles===\"throw\")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join(\"/\")}/<root>\n\nSet the \\`cycles\\` parameter to \\`\"ref\"\\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){i(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1){if(e.reused===\"ref\"){i(s);continue}}}}function Nd(e,t){let r=e.seen.get(t);if(!r)throw Error(\"Unprocessed schema. This is a bug in Zod.\");let o=(a)=>{let c=e.seen.get(a);if(c.ref===null)return;let u=c.def??c.schema,l={...u},m=c.ref;if(c.ref=null,m){o(m);let f=e.seen.get(m),b=f.schema;if(b.$ref&&(e.target===\"draft-07\"||e.target===\"draft-04\"||e.target===\"openapi-3.0\"))u.allOf=u.allOf??[],u.allOf.push(b);else Object.assign(u,b);if(Object.assign(u,l),a._zod.parent===m)for(let x in u){if(x===\"$ref\"||x===\"allOf\")continue;if(!(x in l))delete u[x]}if(b.$ref&&f.def)for(let x in u){if(x===\"$ref\"||x===\"allOf\")continue;if(x in f.def&&JSON.stringify(u[x])===JSON.stringify(f.def[x]))delete u[x]}}let h=a._zod.parent;if(h&&h!==m){o(h);let f=e.seen.get(h);if(f?.schema.$ref){if(u.$ref=f.schema.$ref,f.def)for(let b in u){if(b===\"$ref\"||b===\"allOf\")continue;if(b in f.def&&JSON.stringify(u[b])===JSON.stringify(f.def[b]))delete u[b]}}}e.override({zodSchema:a,jsonSchema:u,path:c.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);let n={};if(e.target===\"draft-2020-12\")n.$schema=\"https://json-schema.org/draft/2020-12/schema\";else if(e.target===\"draft-07\")n.$schema=\"http://json-schema.org/draft-07/schema#\";else if(e.target===\"draft-04\")n.$schema=\"http://json-schema.org/draft-04/schema#\";else if(e.target===\"openapi-3.0\");if(e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw Error(\"Schema is missing an `id` property\");n.$id=e.external.uri(a)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;if(i!==void 0&&n.id===i)delete n.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let c=a[1];if(c.def&&c.defId){if(c.def.id===c.defId)delete c.def.id;s[c.defId]=c.def}}if(e.external);else if(Object.keys(s).length>0)if(e.target===\"draft-2020-12\")n.$defs=s;else n.definitions=s;try{let a=JSON.parse(JSON.stringify(n));return Object.defineProperty(a,\"~standard\",{value:{...t[\"~standard\"],jsonSchema:{input:$a(t,\"input\",e.processors),output:$a(t,\"output\",e.processors)}},enumerable:!1,writable:!1}),a}catch(a){throw Error(\"Error converting schema to JSON.\")}}function De(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type===\"transform\")return!0;if(o.type===\"array\")return De(o.element,r);if(o.type===\"set\")return De(o.valueType,r);if(o.type===\"lazy\")return De(o.getter(),r);if(o.type===\"promise\"||o.type===\"optional\"||o.type===\"nonoptional\"||o.type===\"nullable\"||o.type===\"readonly\"||o.type===\"default\"||o.type===\"prefault\")return De(o.innerType,r);if(o.type===\"intersection\")return De(o.left,r)||De(o.right,r);if(o.type===\"record\"||o.type===\"map\")return De(o.keyType,r)||De(o.valueType,r);if(o.type===\"pipe\"){if(e._zod.traits.has(\"$ZodCodec\"))return!0;return De(o.in,r)||De(o.out,r)}if(o.type===\"object\"){for(let n in o.shape)if(De(o.shape[n],r))return!0;return!1}if(o.type===\"union\"){for(let n of o.options)if(De(n,r))return!0;return!1}if(o.type===\"tuple\"){for(let n of o.items)if(De(n,r))return!0;if(o.rest&&De(o.rest,r))return!0;return!1}return!1}var Dw=(e,t={})=>(r)=>{let o=Cd({...r,processors:t});return we(e,o),Zd(o,e),Nd(o,e)},$a=(e,t,r={})=>(o)=>{let{libraryOptions:n,target:i}=o??{},s=Cd({...n??{},target:i,io:t,processors:r});return we(e,s),Zd(s,e),Nd(s,e)};var rE={guid:\"uuid\",url:\"uri\",datetime:\"date-time\",json_string:\"json-string\",regex:\"\"},Fw=(e,t,r,o)=>{let n=r;n.type=\"string\";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i===\"number\")n.minLength=i;if(typeof s===\"number\")n.maxLength=s;if(a){if(n.format=rE[a]??a,n.format===\"\")delete n.format;if(a===\"time\")delete n.format}if(u)n.contentEncoding=u;if(c&&c.size>0){let l=[...c];if(l.length===1)n.pattern=l[0].source;else if(l.length>1)n.allOf=[...l.map((m)=>({...t.target===\"draft-07\"||t.target===\"draft-04\"||t.target===\"openapi-3.0\"?{type:\"string\"}:{},pattern:m.source}))]}},Vw=(e,t,r,o)=>{let n=r,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;if(typeof a===\"string\"&&a.includes(\"int\"))n.type=\"integer\";else n.type=\"number\";let m=typeof l===\"number\"&&l>=(i??Number.NEGATIVE_INFINITY),h=typeof u===\"number\"&&u<=(s??Number.POSITIVE_INFINITY),f=t.target===\"draft-04\"||t.target===\"openapi-3.0\";if(m)if(f)n.minimum=l,n.exclusiveMinimum=!0;else n.exclusiveMinimum=l;else if(typeof i===\"number\")n.minimum=i;if(h)if(f)n.maximum=u,n.exclusiveMaximum=!0;else n.exclusiveMaximum=u;else if(typeof s===\"number\")n.maximum=s;if(typeof c===\"number\")n.multipleOf=c},Jw=(e,t,r,o)=>{r.type=\"boolean\"};var Hw=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Undefined cannot be represented in JSON Schema\")};var Bw=(e,t,r,o)=>{r.not={}},Ww=(e,t,r,o)=>{},Gw=(e,t,r,o)=>{};var Kw=(e,t,r,o)=>{let n=e._zod.def,i=gu(n.entries);if(i.every((s)=>typeof s===\"number\"))r.type=\"number\";if(i.every((s)=>typeof s===\"string\"))r.type=\"string\";r.enum=i},Yw=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let s of n.values)if(s===void 0){if(t.unrepresentable===\"throw\")throw Error(\"Literal `undefined` cannot be represented in JSON Schema\")}else if(typeof s===\"bigint\")if(t.unrepresentable===\"throw\")throw Error(\"BigInt literals cannot be represented in JSON Schema\");else i.push(Number(s));else i.push(s);if(i.length===0);else if(i.length===1){let s=i[0];if(r.type=s===null?\"null\":typeof s,t.target===\"draft-04\"||t.target===\"openapi-3.0\")r.enum=[s];else r.const=s}else{if(i.every((s)=>typeof s===\"number\"))r.type=\"number\";if(i.every((s)=>typeof s===\"string\"))r.type=\"string\";if(i.every((s)=>typeof s===\"boolean\"))r.type=\"boolean\";if(i.every((s)=>s===null))r.type=\"null\";r.enum=i}};var Qw=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Custom types cannot be represented in JSON Schema\")};var Xw=(e,t,r,o)=>{if(t.unrepresentable===\"throw\")throw Error(\"Transforms cannot be represented in JSON Schema\")};var e$=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;if(typeof s===\"number\")n.minItems=s;if(typeof a===\"number\")n.maxItems=a;n.type=\"array\",n.items=we(i.element,t,{...o,path:[...o.path,\"items\"]})},t$=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type=\"object\",n.properties={};let s=i.shape;for(let u in s)n.properties[u]=we(s[u],t,{...o,path:[...o.path,\"properties\",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter((u)=>{let l=i.shape[u]._zod;if(t.io===\"input\")return l.optin===void 0;else return l.optout===void 0}));if(c.size>0)n.required=Array.from(c);if(i.catchall?._zod.def.type===\"never\")n.additionalProperties=!1;else if(!i.catchall){if(t.io===\"output\")n.additionalProperties=!1}else if(i.catchall)n.additionalProperties=we(i.catchall,t,{...o,path:[...o.path,\"additionalProperties\"]})},r$=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,s=n.options.map((a,c)=>we(a,t,{...o,path:[...o.path,i?\"oneOf\":\"anyOf\",c]}));if(i)r.oneOf=s;else r.anyOf=s},o$=(e,t,r,o)=>{let n=e._zod.def,i=we(n.left,t,{...o,path:[...o.path,\"allOf\",0]}),s=we(n.right,t,{...o,path:[...o.path,\"allOf\",1]}),a=(u)=>(\"allOf\"in u)&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c};var n$=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type=\"object\";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode===\"loose\"&&c&&c.size>0){let l=we(i.valueType,t,{...o,path:[...o.path,\"patternProperties\",\"*\"]});n.patternProperties={};for(let m of c)n.patternProperties[m.source]=l}else{if(t.target===\"draft-07\"||t.target===\"draft-2020-12\")n.propertyNames=we(i.keyType,t,{...o,path:[...o.path,\"propertyNames\"]});n.additionalProperties=we(i.valueType,t,{...o,path:[...o.path,\"additionalProperties\"]})}let u=s._zod.values;if(u){let l=[...u].filter((m)=>typeof m===\"string\"||typeof m===\"number\");if(l.length>0)n.required=l}},s$=(e,t,r,o)=>{let n=e._zod.def,i=we(n.innerType,t,o),s=t.seen.get(e);if(t.target===\"openapi-3.0\")s.ref=n.innerType,r.nullable=!0;else r.anyOf=[i,{type:\"null\"}]},i$=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},a$=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},c$=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);if(i.ref=n.innerType,t.io===\"input\")r._prefault=JSON.parse(JSON.stringify(n.defaultValue))},u$=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw Error(\"Dynamic catch values are not supported in JSON Schema\")}r.default=s},l$=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has(\"$ZodTransform\"),s=t.io===\"input\"?i?n.out:n.in:n.out;we(s,t,o);let a=t.seen.get(e);a.ref=s},p$=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0};var Ad=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType};var lE=z(\"ZodISODateTime\",(e,t)=>{zx.init(e,t),_e.init(e,t)});function d$(e){return Pw(lE,e)}var pE=z(\"ZodISODate\",(e,t)=>{bx.init(e,t),_e.init(e,t)});function m$(e){return Tw(pE,e)}var dE=z(\"ZodISOTime\",(e,t)=>{yx.init(e,t),_e.init(e,t)});function h$(e){return Ew(dE,e)}var mE=z(\"ZodISODuration\",(e,t)=>{vx.init(e,t),_e.init(e,t)});function f$(e){return Iw(mE,e)}var fE=(e,t)=>{yu.init(e,t),e.name=\"ZodError\",Object.defineProperties(e,{format:{value:(r)=>ld(e,r)},flatten:{value:(r)=>ud(e,r)},addIssue:{value:(r)=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Sa,2)}},addIssues:{value:(r)=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Sa,2)}},isEmpty:{get(){return e.issues.length===0}}})};var et=z(\"ZodError\",fE,{Parent:Error});var _$=vu(et),S$=xu(et),z$=za(et),b$=ba(et),y$=ov(et),v$=nv(et),x$=sv(et),w$=iv(et),$$=av(et),k$=cv(et),R$=uv(et),P$=lv(et);var T$=new WeakMap;function Ra(e,t,r){let o=Object.getPrototypeOf(e),n=T$.get(o);if(!n)n=new Set,T$.set(o,n);if(n.has(t))return;n.add(t);for(let i in r){let s=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}var pe=z(\"ZodType\",(e,t)=>(ie.init(e,t),Object.assign(e[\"~standard\"],{jsonSchema:{input:$a(e,\"input\"),output:$a(e,\"output\")}}),e.toJSONSchema=Dw(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,\"_def\",{value:t}),e.parse=(r,o)=>_$(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>z$(e,r,o),e.parseAsync=async(r,o)=>S$(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>b$(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>y$(e,r,o),e.decode=(r,o)=>v$(e,r,o),e.encodeAsync=async(r,o)=>x$(e,r,o),e.decodeAsync=async(r,o)=>w$(e,r,o),e.safeEncode=(r,o)=>$$(e,r,o),e.safeDecode=(r,o)=>k$(e,r,o),e.safeEncodeAsync=async(r,o)=>R$(e,r,o),e.safeDecodeAsync=async(r,o)=>P$(e,r,o),Ra(e,\"ZodType\",{check(...r){let o=this.def;return this.clone(sr(o,{checks:[...o.checks??[],...r.map((n)=>typeof n===\"function\"?{_zod:{check:n,def:{check:\"custom\"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return lt(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(lI(r,o))},superRefine(r,o){return this.check(pI(r,o))},overwrite(r){return this.check(ur(r))},optional(){return C$(this)},exactOptional(){return YE(this)},nullable(){return Z$(this)},nullish(){return C$(Z$(this))},nonoptional(r){return oI(this,r)},array(){return rt(this)},or(r){return ot([this,r])},and(r){return JE(this,r)},transform(r){return N$(this,GE(r))},default(r){return eI(this,r)},prefault(r){return rI(this,r)},catch(r){return sI(this,r)},pipe(r){return N$(this,r)},readonly(){return cI(this)},describe(r){let o=this.clone();return cr.add(o,{description:r}),o},meta(...r){if(r.length===0)return cr.get(this);let o=this.clone();return cr.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,\"description\",{get(){return cr.get(e)?.description},configurable:!0}),e)),A$=z(\"_ZodString\",(e,t)=>{ku.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Fw(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Ra(e,\"_ZodString\",{regex(...o){return this.check(vd(...o))},includes(...o){return this.check($d(...o))},startsWith(...o){return this.check(kd(...o))},endsWith(...o){return this.check(Rd(...o))},min(...o){return this.check(en(...o))},max(...o){return this.check(Eu(...o))},length(...o){return this.check(Iu(...o))},nonempty(...o){return this.check(en(1,...o))},lowercase(o){return this.check(xd(o))},uppercase(o){return this.check(wd(o))},trim(){return this.check(Td())},normalize(...o){return this.check(Pd(...o))},toLowerCase(){return this.check(Ed())},toUpperCase(){return this.check(Id())},slugify(){return this.check(Od())}})}),_E=z(\"ZodString\",(e,t)=>{ku.init(e,t),A$.init(e,t),e.email=(r)=>e.check(aw(SE,r)),e.url=(r)=>e.check(dw(zE,r)),e.jwt=(r)=>e.check(Rw(ZE,r)),e.emoji=(r)=>e.check(mw(bE,r)),e.guid=(r)=>e.check(yd(E$,r)),e.uuid=(r)=>e.check(cw(Ou,r)),e.uuidv4=(r)=>e.check(uw(Ou,r)),e.uuidv6=(r)=>e.check(lw(Ou,r)),e.uuidv7=(r)=>e.check(pw(Ou,r)),e.nanoid=(r)=>e.check(hw(yE,r)),e.guid=(r)=>e.check(yd(E$,r)),e.cuid=(r)=>e.check(fw(vE,r)),e.cuid2=(r)=>e.check(gw(xE,r)),e.ulid=(r)=>e.check(_w(wE,r)),e.base64=(r)=>e.check(ww(IE,r)),e.base64url=(r)=>e.check($w(OE,r)),e.xid=(r)=>e.check(Sw($E,r)),e.ksuid=(r)=>e.check(zw(kE,r)),e.ipv4=(r)=>e.check(bw(RE,r)),e.ipv6=(r)=>e.check(yw(PE,r)),e.cidrv4=(r)=>e.check(vw(TE,r)),e.cidrv6=(r)=>e.check(xw(EE,r)),e.e164=(r)=>e.check(kw(CE,r)),e.datetime=(r)=>e.check(d$(r)),e.date=(r)=>e.check(m$(r)),e.time=(r)=>e.check(h$(r)),e.duration=(r)=>e.check(f$(r))});function te(e){return iw(_E,e)}var _e=z(\"ZodStringFormat\",(e,t)=>{le.init(e,t),A$.init(e,t)}),SE=z(\"ZodEmail\",(e,t)=>{lx.init(e,t),_e.init(e,t)});var E$=z(\"ZodGUID\",(e,t)=>{cx.init(e,t),_e.init(e,t)});var Ou=z(\"ZodUUID\",(e,t)=>{ux.init(e,t),_e.init(e,t)});var zE=z(\"ZodURL\",(e,t)=>{px.init(e,t),_e.init(e,t)});var bE=z(\"ZodEmoji\",(e,t)=>{dx.init(e,t),_e.init(e,t)});var yE=z(\"ZodNanoID\",(e,t)=>{mx.init(e,t),_e.init(e,t)});var vE=z(\"ZodCUID\",(e,t)=>{hx.init(e,t),_e.init(e,t)});var xE=z(\"ZodCUID2\",(e,t)=>{fx.init(e,t),_e.init(e,t)});var wE=z(\"ZodULID\",(e,t)=>{gx.init(e,t),_e.init(e,t)});var $E=z(\"ZodXID\",(e,t)=>{_x.init(e,t),_e.init(e,t)});var kE=z(\"ZodKSUID\",(e,t)=>{Sx.init(e,t),_e.init(e,t)});var RE=z(\"ZodIPv4\",(e,t)=>{xx.init(e,t),_e.init(e,t)});var PE=z(\"ZodIPv6\",(e,t)=>{wx.init(e,t),_e.init(e,t)});var TE=z(\"ZodCIDRv4\",(e,t)=>{$x.init(e,t),_e.init(e,t)});var EE=z(\"ZodCIDRv6\",(e,t)=>{kx.init(e,t),_e.init(e,t)});var IE=z(\"ZodBase64\",(e,t)=>{Px.init(e,t),_e.init(e,t)});var OE=z(\"ZodBase64URL\",(e,t)=>{Tx.init(e,t),_e.init(e,t)});var CE=z(\"ZodE164\",(e,t)=>{Ex.init(e,t),_e.init(e,t)});var ZE=z(\"ZodJWT\",(e,t)=>{Ix.init(e,t),_e.init(e,t)});var j$=z(\"ZodNumber\",(e,t)=>{Sd.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Vw(e,o,n,i),Ra(e,\"ZodNumber\",{gt(o,n){return this.check(Pu(o,n))},gte(o,n){return this.check(wa(o,n))},min(o,n){return this.check(wa(o,n))},lt(o,n){return this.check(Ru(o,n))},lte(o,n){return this.check(xa(o,n))},max(o,n){return this.check(xa(o,n))},int(o){return this.check(I$(o))},safe(o){return this.check(I$(o))},positive(o){return this.check(Pu(0,o))},nonnegative(o){return this.check(wa(0,o))},negative(o){return this.check(Ru(0,o))},nonpositive(o){return this.check(xa(0,o))},multipleOf(o,n){return this.check(Tu(o,n))},step(o,n){return this.check(Tu(o,n))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??\"\").includes(\"int\")||Number.isSafeInteger(r.multipleOf??0.5),e.isFinite=!0,e.format=r.format??null});function vt(e){return Ow(j$,e)}var NE=z(\"ZodNumberFormat\",(e,t)=>{Ox.init(e,t),j$.init(e,t)});function I$(e){return Cw(NE,e)}var AE=z(\"ZodBoolean\",(e,t)=>{Cx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Jw(e,r,o,n)});function Nt(e){return Zw(AE,e)}var jE=z(\"ZodUndefined\",(e,t)=>{Zx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Hw(e,r,o,n)});function Md(e){return Nw(jE,e)}var ME=z(\"ZodAny\",(e,t)=>{Nx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ww(e,r,o,n)});function M$(){return Aw(ME)}var qE=z(\"ZodUnknown\",(e,t)=>{Ax.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gw(e,r,o,n)});function tn(){return jw(qE)}var LE=z(\"ZodNever\",(e,t)=>{jx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bw(e,r,o,n)});function qd(e){return Mw(LE,e)}var UE=z(\"ZodArray\",(e,t)=>{Mx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>e$(e,r,o,n),e.element=t.element,Ra(e,\"ZodArray\",{min(r,o){return this.check(en(r,o))},nonempty(r){return this.check(en(1,r))},max(r,o){return this.check(Eu(r,o))},length(r,o){return this.check(Iu(r,o))},unwrap(){return this.element}})});function rt(e,t){return qw(UE,e,t)}var DE=z(\"ZodObject\",(e,t)=>{Ux.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>t$(e,r,o,n),Q(e,\"shape\",()=>t.shape),Ra(e,\"ZodObject\",{keyof(){return HE(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:tn()})},loose(){return this.clone({...this._zod.def,catchall:tn()})},strict(){return this.clone({...this._zod.def,catchall:qd()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return DT(this,r)},safeExtend(r){return FT(this,r)},merge(r){return VT(this,r)},pick(r){return LT(this,r)},omit(r){return UT(this,r)},partial(...r){return JT(q$,this,r[0])},required(...r){return HT(L$,this,r[0])}})});function T(e,t){let r={type:\"object\",shape:e??{},...A(t)};return new DE(r)}var FE=z(\"ZodUnion\",(e,t)=>{Dx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>r$(e,r,o,n),e.options=t.options});function ot(e,t){return new FE({type:\"union\",options:e,...A(t)})}var VE=z(\"ZodIntersection\",(e,t)=>{Fx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>o$(e,r,o,n)});function JE(e,t){return new VE({type:\"intersection\",left:e,right:t})}var O$=z(\"ZodRecord\",(e,t)=>{Vx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>n$(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function At(e,t,r){if(!t||!t._zod)return new O$({type:\"record\",keyType:te(),valueType:e,...A(t)});return new O$({type:\"record\",keyType:e,valueType:t,...A(r)})}var jd=z(\"ZodEnum\",(e,t)=>{Jx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Kw(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new jd({...t,checks:[],...A(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw Error(`Key ${s} not found in enum`);return new jd({...t,checks:[],...A(n),entries:i})}});function HE(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map((o)=>[o,o])):e;return new jd({type:\"enum\",entries:r,...A(t)})}var BE=z(\"ZodLiteral\",(e,t)=>{Hx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yw(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,\"value\",{get(){if(t.values.length>1)throw Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");return t.values[0]}})});function y(e,t){return new BE({type:\"literal\",values:Array.isArray(e)?e:[e],...A(t)})}var WE=z(\"ZodTransform\",(e,t)=>{Bx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xw(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction===\"backward\")throw new ga(e.constructor.name);r.addIssue=(i)=>{if(typeof i===\"string\")r.issues.push(Xr(i,r.value,t));else{let s=i;if(s.fatal)s.continue=!1;s.code??(s.code=\"custom\"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Xr(s))}};let n=t.transform(r.value,r);if(n instanceof Promise)return n.then((i)=>(r.value=i,r.fallback=!0,r));return r.value=n,r.fallback=!0,r}});function GE(e){return new WE({type:\"transform\",transform:e})}var q$=z(\"ZodOptional\",(e,t)=>{zd.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ad(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function C$(e){return new q$({type:\"optional\",innerType:e})}var KE=z(\"ZodExactOptional\",(e,t)=>{Wx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ad(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function YE(e){return new KE({type:\"optional\",innerType:e})}var QE=z(\"ZodNullable\",(e,t)=>{Gx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>s$(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Z$(e){return new QE({type:\"nullable\",innerType:e})}var XE=z(\"ZodDefault\",(e,t)=>{Kx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>a$(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function eI(e,t){return new XE({type:\"default\",innerType:e,get defaultValue(){return typeof t===\"function\"?t():id(t)}})}var tI=z(\"ZodPrefault\",(e,t)=>{Yx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>c$(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function rI(e,t){return new tI({type:\"prefault\",innerType:e,get defaultValue(){return typeof t===\"function\"?t():id(t)}})}var L$=z(\"ZodNonOptional\",(e,t)=>{Qx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>i$(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function oI(e,t){return new L$({type:\"nonoptional\",innerType:e,...A(t)})}var nI=z(\"ZodCatch\",(e,t)=>{Xx.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>u$(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function sI(e,t){return new nI({type:\"catch\",innerType:e,catchValue:typeof t===\"function\"?t:()=>t})}var iI=z(\"ZodPipe\",(e,t)=>{ew.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>l$(e,r,o,n),e.in=t.in,e.out=t.out});function N$(e,t){return new iI({type:\"pipe\",in:e,out:t})}var aI=z(\"ZodReadonly\",(e,t)=>{tw.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>p$(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function cI(e){return new aI({type:\"readonly\",innerType:e})}var uI=z(\"ZodCustom\",(e,t)=>{rw.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qw(e,r,o,n)});function lI(e,t={}){return Lw(uI,e,t)}function pI(e,t){return Uw(e,t)}Ue(bd());class H${_eventSlots=new Map;setHandler(e,t){let r=this._ensureEventSlot(e);if(r.onHandler&&t)console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener(\"${String(e)}\", …) to add multiple listeners without replacing.`);r.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let r=this._eventSlots.get(e);if(!r)return;let o=r.listeners.indexOf(t);if(o!==-1)r.listeners.splice(o,1)}dispatch(e,t){let r=this._eventSlots.get(e);if(!r)return;r.onHandler?.(t);for(let o of[...r.listeners])o(t)}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t)t={listeners:[]},this._eventSlots.set(e,t);return t}}class B${_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for \"${e}\" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}}var U$=new Set;function D$(e,t){let[r,o]=t,n=r?.shape;if(typeof n?.method?.value!==\"string\")return;let i=n.method.value,s=e===\"request\"?\"setRequestHandler\":\"setNotificationHandler\";if(!U$.has(s))U$.add(s),console.warn(`[ext-apps] ${s}(Schema, handler) is deprecated; use ${s}(\"${i}\", { params: Schema.shape.params }, handler).`);let a=o;return[i,{params:n.params},e===\"request\"?(c,u)=>a({method:i,params:c},dI(u)):(c)=>a({method:i,params:c})]}function dI(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var mI=\"2026-01-26\";var hI=\"ui/notifications/tool-input-partial\";class W${eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=(r)=>{if(t&&r.source!==this.eventSource){console.debug(\"Ignoring message from unknown source\",r);return}let o=Cr.safeParse(r.data);if(o.success)console.debug(\"Parsed message\",o.data),this.onmessage?.(o.data);else if(r.data?.jsonrpc!==\"2.0\")console.debug(\"Ignoring non-JSON-RPC message\",o.error.message,r);else console.error(\"Failed to parse message\",o.error.message,r),this.onerror?.(Error(\"Invalid JSON-RPC message received: \"+o.error.message))}}async start(){window.addEventListener(\"message\",this.messageListener)}async send(e,t){if(e.method!==hI)console.debug(\"Sending message\",e);this.eventTarget.postMessage(e,\"*\")}async close(){window.removeEventListener(\"message\",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var fI=ot([y(\"light\"),y(\"dark\")]).describe(\"Color theme preference for the host environment.\"),Pa=ot([y(\"inline\"),y(\"fullscreen\"),y(\"pip\")]).describe(\"Display mode for UI presentation.\"),gI=ot([y(\"--color-background-primary\"),y(\"--color-background-secondary\"),y(\"--color-background-tertiary\"),y(\"--color-background-inverse\"),y(\"--color-background-ghost\"),y(\"--color-background-info\"),y(\"--color-background-danger\"),y(\"--color-background-success\"),y(\"--color-background-warning\"),y(\"--color-background-disabled\"),y(\"--color-text-primary\"),y(\"--color-text-secondary\"),y(\"--color-text-tertiary\"),y(\"--color-text-inverse\"),y(\"--color-text-ghost\"),y(\"--color-text-info\"),y(\"--color-text-danger\"),y(\"--color-text-success\"),y(\"--color-text-warning\"),y(\"--color-text-disabled\"),y(\"--color-border-primary\"),y(\"--color-border-secondary\"),y(\"--color-border-tertiary\"),y(\"--color-border-inverse\"),y(\"--color-border-ghost\"),y(\"--color-border-info\"),y(\"--color-border-danger\"),y(\"--color-border-success\"),y(\"--color-border-warning\"),y(\"--color-border-disabled\"),y(\"--color-ring-primary\"),y(\"--color-ring-secondary\"),y(\"--color-ring-inverse\"),y(\"--color-ring-info\"),y(\"--color-ring-danger\"),y(\"--color-ring-success\"),y(\"--color-ring-warning\"),y(\"--font-sans\"),y(\"--font-mono\"),y(\"--font-weight-normal\"),y(\"--font-weight-medium\"),y(\"--font-weight-semibold\"),y(\"--font-weight-bold\"),y(\"--font-text-xs-size\"),y(\"--font-text-sm-size\"),y(\"--font-text-md-size\"),y(\"--font-text-lg-size\"),y(\"--font-heading-xs-size\"),y(\"--font-heading-sm-size\"),y(\"--font-heading-md-size\"),y(\"--font-heading-lg-size\"),y(\"--font-heading-xl-size\"),y(\"--font-heading-2xl-size\"),y(\"--font-heading-3xl-size\"),y(\"--font-text-xs-line-height\"),y(\"--font-text-sm-line-height\"),y(\"--font-text-md-line-height\"),y(\"--font-text-lg-line-height\"),y(\"--font-heading-xs-line-height\"),y(\"--font-heading-sm-line-height\"),y(\"--font-heading-md-line-height\"),y(\"--font-heading-lg-line-height\"),y(\"--font-heading-xl-line-height\"),y(\"--font-heading-2xl-line-height\"),y(\"--font-heading-3xl-line-height\"),y(\"--border-radius-xs\"),y(\"--border-radius-sm\"),y(\"--border-radius-md\"),y(\"--border-radius-lg\"),y(\"--border-radius-xl\"),y(\"--border-radius-full\"),y(\"--border-width-regular\"),y(\"--shadow-hairline\"),y(\"--shadow-sm\"),y(\"--shadow-md\"),y(\"--shadow-lg\")]).describe(\"CSS variable keys available to MCP apps for theming.\"),_I=At(gI.describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),ot([te(),Md()]).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),o1=T({method:y(\"ui/open-link\"),params:T({url:te().describe(\"URL to open in the host's browser\")})}),SI=T({isError:Nt().optional().describe(\"True if the host failed to open the URL (e.g., due to security policy).\")}).passthrough(),zI=T({isError:Nt().optional().describe(\"True if the download failed (e.g., user cancelled or host denied).\")}).passthrough(),bI=T({isError:Nt().optional().describe(\"True if the host rejected or failed to deliver the message.\")}).passthrough(),n1=T({method:y(\"ui/notifications/sandbox-proxy-ready\"),params:T({})}),Ud=T({connectDomains:rt(te()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP \\`connect-src\\` directive\n- Empty or omitted → no network connections (secure default)`),resourceDomains:rt(te()).optional().describe(\"Origins for static resources (images, scripts, stylesheets, fonts, media).\\n\\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\\n- Wildcard subdomains supported: `https://*.example.com`\\n- Empty or omitted → no network resources (secure default)\"),frameDomains:rt(te()).optional().describe(\"Origins for nested iframes.\\n\\n- Maps to CSP `frame-src` directive\\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)\"),baseUriDomains:rt(te()).optional().describe(\"Allowed base URIs for the document.\\n\\n- Maps to CSP `base-uri` directive\\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)\")}),Dd=T({camera:T({}).optional().describe(\"Request camera access.\\n\\nMaps to Permission Policy `camera` feature.\"),microphone:T({}).optional().describe(\"Request microphone access.\\n\\nMaps to Permission Policy `microphone` feature.\"),geolocation:T({}).optional().describe(\"Request geolocation access.\\n\\nMaps to Permission Policy `geolocation` feature.\"),clipboardWrite:T({}).optional().describe(\"Request clipboard write access.\\n\\nMaps to Permission Policy `clipboard-write` feature.\")}),s1=T({method:y(\"ui/notifications/size-changed\"),params:T({width:vt().optional().describe(\"New width in pixels.\"),height:vt().optional().describe(\"New height in pixels.\")})}),yI=T({method:y(\"ui/notifications/tool-input\"),params:T({arguments:At(te(),tn().describe(\"Complete tool call arguments as key-value pairs.\")).optional().describe(\"Complete tool call arguments as key-value pairs.\")})}),vI=T({method:y(\"ui/notifications/tool-input-partial\"),params:T({arguments:At(te(),tn().describe(\"Partial tool call arguments (incomplete, may change).\")).optional().describe(\"Partial tool call arguments (incomplete, may change).\")})}),xI=T({method:y(\"ui/notifications/tool-cancelled\"),params:T({reason:te().optional().describe('Optional reason for the cancellation (e.g., \"user action\", \"timeout\").')})}),wI=T({fonts:te().optional()}),$I=T({variables:_I.optional().describe(\"CSS variables for theming the app.\"),css:wI.optional().describe(\"CSS blocks that apps can inject.\")}),kI=T({method:y(\"ui/resource-teardown\"),params:T({})}),RI=At(te(),tn()),F$=T({text:T({}).optional().describe(\"Host supports text content blocks.\"),image:T({}).optional().describe(\"Host supports image content blocks.\"),audio:T({}).optional().describe(\"Host supports audio content blocks.\"),resource:T({}).optional().describe(\"Host supports resource content blocks.\"),resourceLink:T({}).optional().describe(\"Host supports resource link content blocks.\"),structuredContent:T({}).optional().describe(\"Host supports structured content.\")}),i1=T({method:y(\"ui/notifications/request-teardown\"),params:T({}).optional()}),PI=T({experimental:At(te(),At(te(),M$()).describe(\"Experimental features keyed by identifier.\")).optional().describe(\"Experimental features keyed by identifier.\"),openLinks:T({}).optional().describe(\"Host supports opening external URLs.\"),downloadFile:T({}).optional().describe(\"Host supports file downloads via ui/download-file.\"),serverTools:T({listChanged:Nt().optional().describe(\"Host supports tools/list_changed notifications.\")}).optional().describe(\"Host can proxy tool calls to the MCP server.\"),serverResources:T({listChanged:Nt().optional().describe(\"Host supports resources/list_changed notifications.\")}).optional().describe(\"Host can proxy resource reads to the MCP server.\"),logging:T({}).optional().describe(\"Host accepts log messages.\"),sandbox:T({permissions:Dd.optional().describe(\"Permissions granted by the host (camera, microphone, geolocation).\"),csp:Ud.optional().describe(\"CSP domains approved by the host.\")}).optional().describe(\"Sandbox configuration applied by the host.\"),updateModelContext:F$.optional().describe(\"Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.\"),message:F$.optional().describe(\"Host supports receiving content messages (ui/message) from the view.\"),sampling:T({tools:T({}).optional().describe(\"Host supports tool use via `tools` and `toolChoice` parameters.\")}).optional().describe(\"Host supports LLM sampling (sampling/createMessage) from the view.\\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.\")}),TI=T({experimental:At(te(),At(te(),M$()).describe(\"Experimental features keyed by identifier.\")).optional().describe(\"Experimental features keyed by identifier.\"),tools:T({listChanged:Nt().optional().describe(\"App supports tools/list_changed notifications.\")}).optional().describe(\"App exposes MCP-style tools that the host can call.\"),availableDisplayModes:rt(Pa).optional().describe(\"Display modes the app supports.\")}),a1=T({method:y(\"ui/notifications/initialized\"),params:T({}).optional()}),c1=T({csp:Ud.optional().describe(\"Content Security Policy configuration for UI resources.\"),permissions:Dd.optional().describe(\"Sandbox permissions requested by the UI resource.\"),domain:te().optional().describe(`Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., \\`{hash}.claudemcpcontent.com\\`)\n- URL-derived subdomains (e.g., \\`www-example-com.oaiusercontent.com\\`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:Nt().optional().describe(`Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.\n\n- \\`true\\`: request visible border + background\n- \\`false\\`: request no visible border + background\n- omitted: host decides border`)}),u1=T({method:y(\"ui/request-display-mode\"),params:T({mode:Pa.describe(\"The display mode being requested.\")})}),EI=T({mode:Pa.describe(\"The display mode that was actually set. May differ from requested if not supported.\")}).passthrough(),II=ot([y(\"model\"),y(\"app\")]).describe(\"Tool visibility scope - who can access the tool.\"),l1=T({resourceUri:te().optional(),visibility:rt(II).optional().describe(`Who can access this tool. Default: [\"model\", \"app\"]\n- \"model\": Tool visible to and callable by the agent\n- \"app\": Tool callable by the app from this server only`),csp:qd().optional(),permissions:qd().optional()}),p1=T({mimeTypes:rt(te()).optional().describe('Array of supported MIME types for UI resources.\\nMust include `\"text/html;profile=mcp-app\"` for MCP Apps support.')}),d1=T({method:y(\"ui/download-file\"),params:T({contents:rt(ot([Mr,qr])).describe(\"Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.\")})}),m1=T({method:y(\"ui/message\"),params:T({role:y(\"user\").describe('Message role, currently only \"user\" is supported.'),content:rt(St).describe(\"Message content blocks (text, image, etc.).\")})}),h1=T({method:y(\"ui/notifications/sandbox-resource-ready\"),params:T({html:te().describe(\"HTML content to load into the inner iframe.\"),sandbox:te().optional().describe(\"Optional override for the inner iframe's sandbox attribute.\"),csp:Ud.optional().describe(\"CSP configuration from resource metadata.\"),permissions:Dd.optional().describe(\"Sandbox permissions from resource metadata.\")})}),OI=T({method:y(\"ui/notifications/tool-result\"),params:er.describe(\"Standard MCP tool execution result.\")}),G$=T({toolInfo:T({id:ct.optional().describe(\"JSON-RPC id of the tools/call request.\"),tool:Xt.describe(\"Tool definition including name, inputSchema, etc.\")}).optional().describe(\"Metadata of the tool call that instantiated this App.\"),theme:fI.optional().describe(\"Current color theme preference.\"),styles:$I.optional().describe(\"Style configuration for theming the app.\"),displayMode:Pa.optional().describe(\"How the UI is currently displayed.\"),availableDisplayModes:rt(Pa).optional().describe(\"Display modes the host supports.\"),containerDimensions:ot([T({height:vt().describe(\"Fixed container height in pixels.\")}),T({maxHeight:ot([vt(),Md()]).optional().describe(\"Maximum container height in pixels.\")})]).and(ot([T({width:vt().describe(\"Fixed container width in pixels.\")}),T({maxWidth:ot([vt(),Md()]).optional().describe(\"Maximum container width in pixels.\")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:te().optional().describe(\"User's language and region preference in BCP 47 format.\"),timeZone:te().optional().describe(\"User's timezone in IANA format.\"),userAgent:te().optional().describe(\"Host application identifier.\"),platform:ot([y(\"web\"),y(\"desktop\"),y(\"mobile\")]).optional().describe(\"Platform type for responsive design decisions.\"),deviceCapabilities:T({touch:Nt().optional().describe(\"Whether the device supports touch input.\"),hover:Nt().optional().describe(\"Whether the device supports hover interactions.\")}).optional().describe(\"Device input capabilities.\"),safeAreaInsets:T({top:vt().describe(\"Top safe area inset in pixels.\"),right:vt().describe(\"Right safe area inset in pixels.\"),bottom:vt().describe(\"Bottom safe area inset in pixels.\"),left:vt().describe(\"Left safe area inset in pixels.\")}).optional().describe(\"Mobile safe area boundaries in pixels.\")}).passthrough(),CI=T({method:y(\"ui/notifications/host-context-changed\"),params:G$.describe(\"Partial context update containing only changed fields.\")}),f1=T({method:y(\"ui/update-model-context\"),params:T({content:rt(St).optional().describe(\"Context content blocks (text, image, etc.).\"),structuredContent:At(te(),tn().describe(\"Structured content for machine-readable context data.\")).optional().describe(\"Structured content for machine-readable context data.\")})}),g1=T({method:y(\"ui/initialize\"),params:T({appInfo:gt.describe(\"App identification (name and version).\"),appCapabilities:TI.describe(\"Features and capabilities this app provides.\"),protocolVersion:te().describe(\"Protocol version this app supports.\")})}),ZI=T({protocolVersion:te().describe('Negotiated protocol version string (e.g., \"2025-11-21\").'),hostInfo:gt.describe(\"Host application identification and version.\"),hostCapabilities:PI.describe(\"Features and capabilities provided by the host.\"),hostContext:G$.describe(\"Rich context about the host environment.\")}).passthrough(),NI={target:\"draft-2020-12\"};async function V$(e,t){let r=e[\"~standard\"];if(r.jsonSchema)return r.jsonSchema[t](NI);throw Error(`Schema (vendor: ${r.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function J$(e,t,r=\"\"){let o=await e[\"~standard\"].validate(t);if(o.issues){let n=o.issues.map((i)=>{let s=i.path?.map((a)=>typeof a===\"object\"?a.key:a).join(\".\");return s?`${s}: ${i.message}`:i.message}).join(\"; \");throw Error(r+n)}return o.value}function K$(e){let t=document.documentElement;t.setAttribute(\"data-theme\",e),t.style.colorScheme=e}function AI(e,t){let r={...e,...t};if(t.experimental!==void 0)r.experimental={...e.experimental,...t.experimental};if(t.tools!==void 0)r.tools={...e.tools,...t.tools};return r}class Cu extends td{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new H$;_methods=new B$;setRequestHandler=(...e)=>{let[t,...r]=D$(\"request\",e)??e;this._methods.claim(t,\"setRequestHandler\"),super.setRequestHandler.call(this,t,...r)};setNotificationHandler=(...e)=>{let[t,...r]=D$(\"notification\",e)??e;this._methods.claim(t,\"setNotificationHandler\"),super.setNotificationHandler.call(this,t,...r)};removeRequestHandler=(e)=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=(e)=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:yI,toolinputpartial:vI,toolresult:OI,toolcancelled:xI,hostcontextchanged:CI};static ONE_SHOT_EVENTS=new Set([\"toolinput\",\"toolinputpartial\",\"toolresult\",\"toolcancelled\"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!Cu.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e))return;if(this._everHadListener.add(e),!this._initializedSent)return;let t=`[ext-apps] \"${String(e)}\" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(t);console.warn(t)}setEventHandler(e,t){if(t)this._assertHandlerTiming(e);this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},(r)=>{let o=r;if(e===\"hostcontextchanged\")this._hostContext={...this._hostContext,...o};this._events.dispatch(e,o)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,r){if(t&&r)console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},r={autoResize:!0}){super(r);if(this._appInfo=e,this._appCapabilities=t,this.options=r,this._methods.replace(\"notifications/cancelled\"),this._methods.replace(\"notifications/progress\"),!r.allowUnsafeEval)Ue({jitless:!0});this.replaceRequestHandler(\"ping\",(o)=>(console.log(\"Received ping:\",o.params),{})),this.setEventHandler(\"hostcontextchanged\",void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error(\"Cannot register capabilities after transport is established\");this._appCapabilities=AI(this._appCapabilities,e)}registerTool(e,t,r){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let o=this,n=()=>{if(o._initializedSent&&o._appCapabilities.tools?.listChanged)o.sendToolListChanged()},i=t.inputSchema!==void 0,s={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,n()},disable(){this.enabled=!1,n()},update(a){Object.assign(this,a),n()},remove(){if(o._registeredTools[e]!==s)return;delete o._registeredTools[e],n()},handler:async(a,c)=>{if(!s.enabled)throw Error(`Tool ${e} is disabled`);let u;if(i){let l=s.inputSchema,m=l?await J$(l,a??{},`Invalid input for tool ${e}: `):a??{};u=await r(m,c)}else u=await r(c);if(s.outputSchema&&!u.isError)u.structuredContent=await J$(s.outputSchema,u.structuredContent,`Invalid output for tool ${e}: `);return u}};if(this._registeredTools[e]=s,!this._appCapabilities.tools&&!this.transport)this.registerAppCapabilities({tools:{listChanged:!0}});return this.ensureToolHandlersInitialized(),n(),s}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){if(this._toolHandlersInitialized)return;this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let r=this._registeredTools[e.name];if(!r)throw Error(`Tool ${e.name} not found`);return r.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([r,o])=>o.enabled).map(async([r,o])=>{let n={name:r,title:o.title,description:o.description,inputSchema:o.inputSchema?await V$(o.inputSchema,\"input\"):{type:\"object\",properties:{}}};if(o.outputSchema)n.outputSchema=await V$(o.outputSchema,\"output\");if(o.annotations)n.annotations=o.annotations;if(o._meta)n._meta=o._meta;return n}))})}async sendToolListChanged(e={}){this._assertInitialized(\"sendToolListChanged\"),await this.notification({method:\"notifications/tools/list_changed\",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(\"toolinput\")}set ontoolinput(e){this.setEventHandler(\"toolinput\",e)}get ontoolinputpartial(){return this.getEventHandler(\"toolinputpartial\")}set ontoolinputpartial(e){this.setEventHandler(\"toolinputpartial\",e)}get ontoolresult(){return this.getEventHandler(\"toolresult\")}set ontoolresult(e){this.setEventHandler(\"toolresult\",e)}get ontoolcancelled(){return this.getEventHandler(\"toolcancelled\")}set ontoolcancelled(e){this.setEventHandler(\"toolcancelled\",e)}get onhostcontextchanged(){return this.getEventHandler(\"hostcontextchanged\")}set onhostcontextchanged(e){this.setEventHandler(\"hostcontextchanged\",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(\"onteardown\",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(\"ui/resource-teardown\",{params:kI.shape.params,result:RI},(t,r)=>{if(!this._onteardown)throw Error(\"No onteardown handler set\");return this._onteardown(t,r)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(\"oncalltool\",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(\"tools/call\",(t,r)=>{if(!this._oncalltool)throw Error(\"No oncalltool handler set\");return this._oncalltool(t.params,r)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(\"onlisttools\",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(\"tools/list\",(t,r)=>{if(!this._onlisttools)throw Error(\"No onlisttools handler set\");return this._onlisttools(t.params,r)})}assertCapabilityForMethod(e){switch(e){case\"sampling/createMessage\":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case\"tools/call\":case\"tools/list\":if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized(\"callServerTool\"),typeof e===\"string\")throw Error(`callServerTool() expects an object as its first argument, but received a string (\"${e}\"). Did you mean: callServerTool({ name: \"${e}\", arguments: { ... } })?`);return await this.request({method:\"tools/call\",params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(\"readServerResource\"),await this.request({method:\"resources/read\",params:e},t)}async listServerResources(e,t){return this._assertInitialized(\"listServerResources\"),await this.request({method:\"resources/list\",params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized(\"createSamplingMessage\"),await this.request({method:\"sampling/createMessage\",params:e},t)}sendMessage(e,t){return this._assertInitialized(\"sendMessage\"),this.request({method:\"ui/message\",params:e},bI,t)}sendLog(e){return this.notification({method:\"notifications/message\",params:e})}updateModelContext(e,t){return this._assertInitialized(\"updateModelContext\"),this.request({method:\"ui/update-model-context\",params:e},Qt,t)}openLink(e,t){return this._assertInitialized(\"openLink\"),this.request({method:\"ui/open-link\",params:e},SI,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(\"downloadFile\"),this.request({method:\"ui/download-file\",params:e},zI,t)}requestTeardown(e={}){return this.notification({method:\"ui/notifications/request-teardown\",params:e})}requestDisplayMode(e,t){return this._assertInitialized(\"requestDisplayMode\"),this.request({method:\"ui/request-display-mode\",params:e},EI,t)}sendSizeChanged(e){return this.notification({method:\"ui/notifications/size-changed\",params:e})}setupSizeChangedNotifications(){let e=!1,t=0,r=0,o=()=>{if(e)return;e=!0,requestAnimationFrame(()=>{e=!1;let i=document.documentElement,s=i.style.height;i.style.height=\"max-content\";let a=Math.ceil(i.getBoundingClientRect().height);i.style.height=s;let c=Math.ceil(window.innerWidth);if(c!==t||a!==r)t=c,r=a,this.sendSizeChanged({width:c,height:a})})};o();let n=new ResizeObserver(o);return n.observe(document.documentElement),n.observe(document.body),()=>n.disconnect()}async connect(e=new W$(window.parent,window.parent),t){if(this.transport)throw Error(\"App is already connected. Call close() before connecting again.\");this._initializedSent=!1;try{await super.connect(e);let r=await this.request({method:\"ui/initialize\",params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:mI}},ZI,t);if(r===void 0)throw Error(`Server sent invalid initialize result: ${r}`);if(this._hostCapabilities=r.hostCapabilities,this._hostInfo=r.hostInfo,this._hostContext=r.hostContext,await this.notification({method:\"ui/notifications/initialized\"}),this._initializedSent=!0,this.options?.autoResize)this.setupSizeChangedNotifications()}catch(r){throw this.close(),r}}}var Y$=document.getElementById(\"title\"),Q$=document.getElementById(\"summary\"),Zu=document.getElementById(\"cues\"),X$=document.getElementById(\"status\"),ek=document.getElementById(\"open\"),Ta=new Cu({name:\"Cap recording card\",version:\"1.0.0\"}),tk=(e)=>{try{let t=new URL(e);return t.protocol===\"https:\"?t.toString():null}catch{return null}},jI=(e)=>{if(!Y$||!Q$||!Zu||!X$||!ek)return;Y$.textContent=e.title,Q$.textContent=e.summary??\"No summary available\",X$.textContent=e.transcriptStatus===\"disabled\"?\"Transcript disabled\":e.transcriptStatus===\"too_large\"?\"Transcript too large to display\":e.transcriptStatus===\"not_ready\"?\"Transcript not ready\":\"Transcript\",Zu.replaceChildren();for(let r of e.cues){let o=tk(r.url);if(!o)continue;let n=document.createElement(\"button\");n.type=\"button\",n.className=\"cue\";let i=document.createElement(\"strong\"),s=Math.floor(r.startMs/1000);i.textContent=`${Math.floor(s/60)}:${String(s%60).padStart(2,\"0\")}`;let a=document.createElement(\"span\");a.textContent=r.text,n.append(i,a),n.addEventListener(\"click\",()=>Ta.openLink({url:o})),Zu.append(n)}if(e.hasMoreCues){let r=document.createElement(\"p\");r.className=\"more\",r.textContent=\"More transcript moments are available in Cap.\",Zu.append(r)}let t=tk(e.url);if(t)ek.onclick=()=>{Ta.openLink({url:t})}};Ta.ontoolresult=(e)=>{let t=e.structuredContent;if(t&&typeof t.title===\"string\"&&typeof t.url===\"string\"&&Array.isArray(t.cues)&&typeof t.transcriptStatus===\"string\")jI(t)};Ta.onhostcontextchanged=(e)=>{if(e.theme)K$(e.theme)};Ta.connect();})();\n</script></body></html>"}