← Files pen.devARCHIVED FILE

bin/editor.html

253 KB · Oct 8, 2026 · 06:38 UTC

↓ Download file

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="pen-editor-url" content="__PEN_EDITOR_URL__" />
    <title>pen.dev</title>
    <style>
      :root {
        --bg: #ffffff;
        --fg: #18181b;
        --muted: #71717a;
        --track: #e4e4e7;
      }
      @media (prefers-color-scheme: dark) {
        :root:not([data-theme="light"]) {
          --bg: #18181b;
          --fg: #fafafa;
          --muted: #a1a1aa;
          --track: #3f3f46;
        }
      }
      [data-theme="dark"] {
        --bg: #18181b;
        --fg: #fafafa;
        --muted: #a1a1aa;
        --track: #3f3f46;
      }
      html,
      body {
        margin: 0;
        height: 100%;
        font-family: var(--font-sans, system-ui, sans-serif);
      }
      #app {
        position: relative;
        height: 640px;
      }
      body.fullscreen #app {
        height: 100vh;
      }
      #editor {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
      }
      #status {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        padding: 24px;
        text-align: center;
        background: var(--color-background-primary, var(--bg));
        color: var(--color-text-primary, var(--fg));
      }
      #status[hidden] {
        display: none;
      }
      .logo {
        display: block;
        height: 28px;
        width: auto;
      }
      .logo-dark {
        display: none;
      }
      :root[data-theme="dark"] .logo-light {
        display: none;
      }
      :root[data-theme="dark"] .logo-dark {
        display: block;
      }
      @media (prefers-color-scheme: dark) {
        :root:not([data-theme="light"]) .logo-light {
          display: none;
        }
        :root:not([data-theme="light"]) .logo-dark {
          display: block;
        }
      }
      #spinner {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        border: 2px solid var(--track);
        border-top-color: var(--color-text-primary, var(--fg));
        animation: spin 0.8s linear infinite;
      }
      #status.message #spinner {
        display: none;
      }
      #status-text {
        margin: 0;
        max-width: 360px;
        font-size: 13px;
        line-height: 1.5;
        color: var(--color-text-secondary, var(--muted));
      }
      @keyframes spin {
        to {
          transform: rotate(360deg);
        }
      }
      @media (prefers-reduced-motion: reduce) {
        #spinner {
          animation-duration: 3s;
        }
      }
    </style>
    <script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function o(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(s){if(s.ep)return;s.ep=!0;const r=o(s);fetch(s.href,r)}})();function wl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jn={exports:{}},li;function Tl(){return li||(li=1,(function(e){var t=Object.prototype.hasOwnProperty,o="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(o=!1));function s(u,d,h){this.fn=u,this.context=d,this.once=h||!1}function r(u,d,h,g,b){if(typeof h!="function")throw new TypeError("The listener must be a function");var f=new s(h,g||u,b),R=o?o+d:d;return u._events[R]?u._events[R].fn?u._events[R]=[u._events[R],f]:u._events[R].push(f):(u._events[R]=f,u._eventsCount++),u}function a(u,d){--u._eventsCount===0?u._events=new n:delete u._events[d]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],h,g;if(this._eventsCount===0)return d;for(g in h=this._events)t.call(h,g)&&d.push(o?g.slice(1):g);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},c.prototype.listeners=function(d){var h=o?o+d:d,g=this._events[h];if(!g)return[];if(g.fn)return[g.fn];for(var b=0,f=g.length,R=new Array(f);b<f;b++)R[b]=g[b].fn;return R},c.prototype.listenerCount=function(d){var h=o?o+d:d,g=this._events[h];return g?g.fn?1:g.length:0},c.prototype.emit=function(d,h,g,b,f,R){var P=o?o+d:d;if(!this._events[P])return!1;var v=this._events[P],A=arguments.length,U,N;if(v.fn){switch(v.once&&this.removeListener(d,v.fn,void 0,!0),A){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,h),!0;case 3:return v.fn.call(v.context,h,g),!0;case 4:return v.fn.call(v.context,h,g,b),!0;case 5:return v.fn.call(v.context,h,g,b,f),!0;case 6:return v.fn.call(v.context,h,g,b,f,R),!0}for(N=1,U=new Array(A-1);N<A;N++)U[N-1]=arguments[N];v.fn.apply(v.context,U)}else{var x=v.length,$;for(N=0;N<x;N++)switch(v[N].once&&this.removeListener(d,v[N].fn,void 0,!0),A){case 1:v[N].fn.call(v[N].context);break;case 2:v[N].fn.call(v[N].context,h);break;case 3:v[N].fn.call(v[N].context,h,g);break;case 4:v[N].fn.call(v[N].context,h,g,b);break;default:if(!U)for($=1,U=new Array(A-1);$<A;$++)U[$-1]=arguments[$];v[N].fn.apply(v[N].context,U)}}return!0},c.prototype.on=function(d,h,g){return r(this,d,h,g,!1)},c.prototype.once=function(d,h,g){return r(this,d,h,g,!0)},c.prototype.removeListener=function(d,h,g,b){var f=o?o+d:d;if(!this._events[f])return this;if(!h)return a(this,f),this;var R=this._events[f];if(R.fn)R.fn===h&&(!b||R.once)&&(!g||R.context===g)&&a(this,f);else{for(var P=0,v=[],A=R.length;P<A;P++)(R[P].fn!==h||b&&!R[P].once||g&&R[P].context!==g)&&v.push(R[P]);v.length?this._events[f]=v.length===1?v[0]:v:a(this,f)}return this},c.prototype.removeAllListeners=function(d){var h;return d?(h=o?o+d:d,this._events[h]&&a(this,h)):(this._events=new n,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=o,c.EventEmitter=c,e.exports=c})(Jn)),Jn.exports}Tl();var Vn={exports:{}},ui;function Pl(){return ui||(ui=1,(function(e){var t=(()=>{var o=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(x,$,z)=>$ in x?o(x,$,{enumerable:!0,configurable:!0,writable:!0,value:z}):x[$]=z,d=(x,$)=>{for(var z in $||($={}))a.call($,z)&&u(x,z,$[z]);if(r)for(var z of r($))c.call($,z)&&u(x,z,$[z]);return x},h=(x,$)=>{for(var z in $)o(x,z,{get:$[z],enumerable:!0})},g=(x,$,z,G)=>{if($&&typeof $=="object"||typeof $=="function")for(let ne of s($))!a.call(x,ne)&&ne!==z&&o(x,ne,{get:()=>$[ne],enumerable:!(G=n($,ne))||G.enumerable});return x},b=x=>g(o({},"__esModule",{value:!0}),x),f=(x,$,z)=>u(x,typeof $!="symbol"?$+"":$,z),R={};h(R,{DEFAULT_OPTIONS:()=>A,DEFAULT_UUID_LENGTH:()=>v,default:()=>N});var P="5.3.2",v=6,A={dictionary:"alphanum",shuffle:!0,debug:!1,length:v,counter:0},U=class{constructor($={}){f(this,"counter"),f(this,"debug"),f(this,"dict"),f(this,"version"),f(this,"dictIndex",0),f(this,"dictRange",[]),f(this,"lowerBound",0),f(this,"upperBound",0),f(this,"dictLength",0),f(this,"uuidLength"),f(this,"_digit_first_ascii",48),f(this,"_digit_last_ascii",58),f(this,"_alpha_lower_first_ascii",97),f(this,"_alpha_lower_last_ascii",123),f(this,"_hex_last_ascii",103),f(this,"_alpha_upper_first_ascii",65),f(this,"_alpha_upper_last_ascii",91),f(this,"_number_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),f(this,"_alpha_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),f(this,"_alpha_lower_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),f(this,"_alpha_upper_dict_ranges",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),f(this,"_alphanum_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),f(this,"_alphanum_lower_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),f(this,"_alphanum_upper_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),f(this,"_hex_dict_ranges",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),f(this,"_dict_ranges",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),f(this,"log",(...q)=>{const L=[...q];if(L[0]="[short-unique-id] ".concat(q[0]),this.debug===!0&&typeof console<"u"&&console!==null){console.log(...L);return}}),f(this,"_normalizeDictionary",(q,L)=>{let M;if(q&&Array.isArray(q)&&q.length>1)M=q;else{M=[],this.dictIndex=0;const F="_".concat(q,"_dict_ranges"),Z=this._dict_ranges[F];let H=0;for(const[,he]of Object.entries(Z)){const[re,fe]=he;H+=Math.abs(fe-re)}M=new Array(H);let Y=0;for(const[,he]of Object.entries(Z)){this.dictRange=he,this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1];const re=this.lowerBound<=this.upperBound,fe=this.lowerBound,Te=this.upperBound;if(re)for(let ae=fe;ae<Te;ae++)M[Y++]=String.fromCharCode(ae),this.dictIndex=ae;else for(let ae=fe;ae>Te;ae--)M[Y++]=String.fromCharCode(ae),this.dictIndex=ae}M.length=Y}if(L){const F=M.length;for(let Z=F-1;Z>0;Z--){const H=Math.floor(Math.random()*(Z+1));[M[Z],M[H]]=[M[H],M[Z]]}}return M}),f(this,"setDictionary",(q,L)=>{this.dict=this._normalizeDictionary(q,L),this.dictLength=this.dict.length,this.setCounter(0)}),f(this,"seq",()=>this.sequentialUUID()),f(this,"sequentialUUID",()=>{const q=this.dictLength,L=this.dict;let M=this.counter;const F=[];do{const H=M%q;M=Math.trunc(M/q),F.push(L[H])}while(M!==0);const Z=F.join("");return this.counter+=1,Z}),f(this,"rnd",(q=this.uuidLength||v)=>this.randomUUID(q)),f(this,"randomUUID",(q=this.uuidLength||v)=>{if(q===null||typeof q>"u"||q<1)throw new Error("Invalid UUID Length Provided");const L=new Array(q),M=this.dictLength,F=this.dict;for(let Z=0;Z<q;Z++){const H=Math.floor(Math.random()*M);L[Z]=F[H]}return L.join("")}),f(this,"fmt",(q,L)=>this.formattedUUID(q,L)),f(this,"formattedUUID",(q,L)=>{const M={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return q.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,Z=>{const H=Z.slice(0,2),Y=Number.parseInt(Z.slice(2),10);return H==="$s"?M[H]().padStart(Y,"0"):H==="$t"&&L?M[H](Y,L):M[H](Y)})}),f(this,"availableUUIDs",(q=this.uuidLength)=>Number.parseFloat(([...new Set(this.dict)].length**q).toFixed(0))),f(this,"_collisionCache",new Map),f(this,"approxMaxBeforeCollision",(q=this.availableUUIDs(this.uuidLength))=>{const L=q,M=this._collisionCache.get(L);if(M!==void 0)return M;const F=Number.parseFloat(Math.sqrt(Math.PI/2*q).toFixed(20));return this._collisionCache.set(L,F),F}),f(this,"collisionProbability",(q=this.availableUUIDs(this.uuidLength),L=this.uuidLength)=>Number.parseFloat((this.approxMaxBeforeCollision(q)/this.availableUUIDs(L)).toFixed(20))),f(this,"uniqueness",(q=this.availableUUIDs(this.uuidLength))=>{const L=Number.parseFloat((1-this.approxMaxBeforeCollision(q)/q).toFixed(20));return L>1?1:L<0?0:L}),f(this,"getVersion",()=>this.version),f(this,"stamp",(q,L)=>{const M=Math.floor(+(L||new Date)/1e3).toString(16);if(typeof q=="number"&&q===0)return M;if(typeof q!="number"||q<10)throw new Error(["Param finalLength must be a number greater than or equal to 10,","or 0 if you want the raw hexadecimal timestamp"].join(`
`));const F=q-9,Z=Math.round(Math.random()*(F>15?15:F)),H=this.randomUUID(F);return"".concat(H.substring(0,Z)).concat(M).concat(H.substring(Z)).concat(Z.toString(16))}),f(this,"parseStamp",(q,L)=>{if(L&&!/t0|t[1-9]\d{1,}/.test(L))throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");const M=L?L.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,Z=>{const H={$r:re=>[...Array(re)].map(()=>"r").join(""),$s:re=>[...Array(re)].map(()=>"s").join(""),$t:re=>[...Array(re)].map(()=>"t").join("")},Y=Z.slice(0,2),he=Number.parseInt(Z.slice(2),10);return H[Y](he)}).replace(/^(.*?)(t{8,})(.*)$/g,(Z,H,Y)=>q.substring(H.length,H.length+Y.length)):q;if(M.length===8)return new Date(Number.parseInt(M,16)*1e3);if(M.length<10)throw new Error("Stamp length invalid");const F=Number.parseInt(M.substring(M.length-1),16);return new Date(Number.parseInt(M.substring(F,F+8),16)*1e3)}),f(this,"setCounter",q=>{this.counter=q}),f(this,"validate",(q,L)=>{const M=L?this._normalizeDictionary(L):this.dict;return q.split("").every(F=>M.includes(F))});const z=d(d({},A),$);this.counter=0,this.debug=!1,this.dict=[],this.version=P;const{dictionary:G,shuffle:ne,length:se,counter:$e}=z;this.uuidLength=se,this.setDictionary(G,ne),this.setCounter($e),this.debug=z.debug,this.log(this.dict),this.log("Generator instantiated with Dictionary Size ".concat(this.dictLength," and counter set to ").concat(this.counter)),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this)}};f(U,"default",U);var N=U;return b(R)})();e.exports=t.default,typeof window<"u"&&(t=t.default)})(Vn)),Vn.exports}var Cl=Pl();const er=wl(Cl);let pi=(function(e){return e[e.Saved=0]="Saved",e[e.NothingToSave=1]="NothingToSave",e[e.Cancelled=2]="Cancelled",e[e.DiskFull=3]="DiskFull",e[e.NotPermitted=4]="NotPermitted",e[e.ReadOnlyDisk=5]="ReadOnlyDisk",e[e.FolderMissing=6]="FolderMissing",e[e.FileInUse=7]="FileInUse",e[e.DocumentUnreadable=8]="DocumentUnreadable",e[e.WriteFailed=9]="WriteFailed",e})({});function Qe(e){const t=`ftyp${e}`,o=new Uint8Array(12),n=new Uint8Array(12);for(let s=0;s<t.length;s++)o[s+4]=t.charCodeAt(s),n[s+4]=255;return{magic:o,mask:n}}new Uint8Array([137,80,78,71,13,10,26,10]),new Uint8Array([71,73,70,56,55,97]),new Uint8Array([71,73,70,56,57,97]),new Uint8Array([255,216,255]),new Uint8Array([82,73,70,70,0,0,0,0,87,69,66,80]),new Uint8Array([255,255,255,255,0,0,0,0,255,255,255,255]),{...Qe("avif")},{...Qe("avis")},{...Qe("heic")},{...Qe("heix")},{...Qe("hevc")},{...Qe("mif1")},{...Qe("msf1")},new Uint8Array([0,0,1,0]),new Uint8Array([66,77]);const{randomUUID:wg}=new er({length:5}),{randomUUID:Tg}=new er({length:1,dictionary:"alpha"});var El=Object.create,fs=Object.defineProperty,kl=Object.getOwnPropertyDescriptor,$l=Object.getOwnPropertyNames,ql=Object.getPrototypeOf,Il=Object.prototype.hasOwnProperty,xl=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Nl=(e,t)=>{let o={};for(var n in e)fs(o,n,{get:e[n],enumerable:!0});return o},zl=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=$l(t),r=0,a=s.length,c;r<a;r++)c=s[r],!Il.call(e,c)&&c!==o&&fs(e,c,{get:(u=>t[u]).bind(null,c),enumerable:!(n=kl(t,c))||n.enumerable});return e},Ol=(e,t,o)=>(o=e!=null?El(ql(e)):{},zl(fs(o,"default",{value:e,enumerable:!0}),e));const Ml=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]);function Ll(e){return typeof e=="string"&&Ml.has(e.replace(/#$/,""))}var di;const Al=Object.freeze({status:"aborted"});function S(e,t,o){function n(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);const d=a.prototype,h=Object.keys(d);for(let g=0;g<h.length;g++){const b=h[g];b in c||(c[b]=d[b].bind(c))}}const s=o?.Parent??Object;class r extends s{}Object.defineProperty(r,"name",{value:e});function a(c){var u;const d=o?.Parent?new r:this;n(d,c),(u=d._zod).deferred??(u.deferred=[]);for(const h of d._zod.deferred)h();return d}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>o?.Parent&&c instanceof o.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class yt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class tr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(di=globalThis).__zod_globalConfig??(di.__zod_globalConfig={});const hn=globalThis.__zod_globalConfig;function xe(e){return e&&Object.assign(hn,e),hn}function or(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,s])=>t.indexOf(+n)===-1).map(([n,s])=>s)}function os(e,t){return typeof t=="bigint"?t.toString():t}function Cn(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ss(e){return e==null}function gs(e){const t=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(t,o)}function jl(e,t){const o=e/t,n=Math.round(o),s=Number.EPSILON*Math.max(Math.abs(o),1);return Math.abs(o-n)<s?0:o-n}const mi=Symbol("evaluating");function D(e,t,o){let n;Object.defineProperty(e,t,{get(){if(n!==mi)return n===void 0&&(n=mi,n=o()),n},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function ot(e,t,o){Object.defineProperty(e,t,{value:o,writable:!0,enumerable:!0,configurable:!0})}function Ae(...e){const t={};for(const o of e){const n=Object.getOwnPropertyDescriptors(o);Object.assign(t,n)}return Object.defineProperties({},t)}function hi(e){return JSON.stringify(e)}function Ul(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const nr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function xo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Zl=Cn(()=>{if(hn.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Rt(e){if(xo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const o=t.prototype;return!(xo(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function sr(e){return Rt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Dl=new Set(["string","number","symbol"]);function wt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function je(e,t,o){const n=new e._zod.constr(t??e._zod.def);return(!t||o?.parent)&&(n._zod.parent=e),n}function E(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Hl(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Fl={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Jl(e,t){const o=e._zod.def,n=o.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const r=Ae(e._zod.def,{get shape(){const a={};for(const c in t){if(!(c in o.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(a[c]=o.shape[c])}return ot(this,"shape",a),a},checks:[]});return je(e,r)}function Vl(e,t){const o=e._zod.def,n=o.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=Ae(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const c in t){if(!(c in o.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete a[c]}return ot(this,"shape",a),a},checks:[]});return je(e,r)}function Bl(e,t){if(!Rt(t))throw new Error("Invalid input to extend: expected a plain object");const o=e._zod.def.checks;if(o&&o.length>0){const r=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(r,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=Ae(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return ot(this,"shape",r),r}});return je(e,s)}function Wl(e,t){if(!Rt(t))throw new Error("Invalid input to safeExtend: expected a plain object");const o=Ae(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return ot(this,"shape",n),n}});return je(e,o)}function Gl(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const o=Ae(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return ot(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return je(e,o)}function Kl(e,t,o){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=Ae(t._zod.def,{get shape(){const c=t._zod.def.shape,u={...c};if(o)for(const d in o){if(!(d in c))throw new Error(`Unrecognized key: "${d}"`);o[d]&&(u[d]=e?new e({type:"optional",innerType:c[d]}):c[d])}else for(const d in c)u[d]=e?new e({type:"optional",innerType:c[d]}):c[d];return ot(this,"shape",u),u},checks:[]});return je(t,a)}function Yl(e,t,o){const n=Ae(t._zod.def,{get shape(){const s=t._zod.def.shape,r={...s};if(o)for(const a in o){if(!(a in r))throw new Error(`Unrecognized key: "${a}"`);o[a]&&(r[a]=new e({type:"nonoptional",innerType:s[a]}))}else for(const a in s)r[a]=new e({type:"nonoptional",innerType:s[a]});return ot(this,"shape",r),r}});return je(t,n)}function bt(e,t=0){if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(e.issues[o]?.continue!==!0)return!0;return!1}function Ql(e,t=0){if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(e.issues[o]?.continue===!1)return!0;return!1}function vt(e,t){return t.map(o=>{var n;return(n=o).path??(n.path=[]),o.path.unshift(e),o})}function an(e){return typeof e=="string"?e:e?.message}function Ne(e,t,o){const n=e.message?e.message:an(e.inst?._zod.def?.error?.(e))??an(t?.error?.(e))??an(o.customError?.(e))??an(o.localeError?.(e))??"Invalid input",{inst:s,continue:r,input:a,...c}=e;return c.path??(c.path=[]),c.message=n,t?.reportInput&&(c.input=a),c}function _s(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function No(...e){const[t,o,n]=e;return typeof t=="string"?{message:t,code:"custom",input:o,inst:n}:{...t}}const ir=(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,os,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},rr=S("$ZodError",ir),ar=S("$ZodError",ir,{Parent:Error});function Xl(e,t=o=>o.message){const o={},n=[];for(const s of e.issues)s.path.length>0?(o[s.path[0]]=o[s.path[0]]||[],o[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:o}}function eu(e,t=o=>o.message){const o={_errors:[]},n=(s,r=[])=>{for(const a of s.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>n({issues:c},[...r,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...r,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...r,...a.path]);else{const c=[...r,...a.path];if(c.length===0)o._errors.push(t(a));else{let u=o,d=0;for(;d<c.length;){const h=c[d];d===c.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(t(a))):u[h]=u[h]||{_errors:[]},u=u[h],d++}}}};return n(e),o}const bs=e=>(t,o,n,s)=>{const r=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:o,issues:[]},r);if(a instanceof Promise)throw new yt;if(a.issues.length){const c=new(s?.Err??e)(a.issues.map(u=>Ne(u,r,xe())));throw nr(c,s?.callee),c}return a.value},vs=e=>async(t,o,n,s)=>{const r=n?{...n,async:!0}:{async:!0};let a=t._zod.run({value:o,issues:[]},r);if(a instanceof Promise&&(a=await a),a.issues.length){const c=new(s?.Err??e)(a.issues.map(u=>Ne(u,r,xe())));throw nr(c,s?.callee),c}return a.value},En=e=>(t,o,n)=>{const s=n?{...n,async:!1}:{async:!1},r=t._zod.run({value:o,issues:[]},s);if(r instanceof Promise)throw new yt;return r.issues.length?{success:!1,error:new(e??rr)(r.issues.map(a=>Ne(a,s,xe())))}:{success:!0,data:r.value}},tu=En(ar),kn=e=>async(t,o,n)=>{const s=n?{...n,async:!0}:{async:!0};let r=t._zod.run({value:o,issues:[]},s);return r instanceof Promise&&(r=await r),r.issues.length?{success:!1,error:new e(r.issues.map(a=>Ne(a,s,xe())))}:{success:!0,data:r.value}},ou=kn(ar),nu=e=>(t,o,n)=>{const s=n?{...n,direction:"backward"}:{direction:"backward"};return bs(e)(t,o,s)},su=e=>(t,o,n)=>bs(e)(t,o,n),iu=e=>async(t,o,n)=>{const s=n?{...n,direction:"backward"}:{direction:"backward"};return vs(e)(t,o,s)},ru=e=>async(t,o,n)=>vs(e)(t,o,n),au=e=>(t,o,n)=>{const s=n?{...n,direction:"backward"}:{direction:"backward"};return En(e)(t,o,s)},cu=e=>(t,o,n)=>En(e)(t,o,n),lu=e=>async(t,o,n)=>{const s=n?{...n,direction:"backward"}:{direction:"backward"};return kn(e)(t,o,s)},uu=e=>async(t,o,n)=>kn(e)(t,o,n),pu=/^[cC][0-9a-z]{6,}$/,du=/^[0-9a-z]+$/,mu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,hu=/^[0-9a-vA-V]{20}$/,fu=/^[A-Za-z0-9]{27}$/,Su=/^[a-zA-Z0-9_-]{21}$/,gu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_u=/^([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})$/,fi=e=>e?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})$`):/^([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)$/,bu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,vu="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function yu(){return new RegExp(vu,"u")}const Ru=/^(?:(?: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])$/,wu=/^(([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}|:))$/,Tu=/^((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])$/,Pu=/^(([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])$/,Cu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,cr=/^[A-Za-z0-9_-]*$/,Eu=/^https?$/,ku=/^\+[1-9]\d{6,14}$/,lr="(?:(?:\\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])))",$u=new RegExp(`^${lr}$`);function ur(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function qu(e){return new RegExp(`^${ur(e)}$`)}function Iu(e){const t=ur({precision:e.precision}),o=["Z"];e.local&&o.push(""),e.offset&&o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${o.join("|")})`;return new RegExp(`^${lr}T(?:${n})$`)}const xu=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Nu=/^-?\d+$/,pr=/^-?\d+(?:\.\d+)?$/,zu=/^(?:true|false)$/i,Ou=/^null$/i,Mu=/^undefined$/i,Lu=/^[^A-Z]*$/,Au=/^[^a-z]*$/,_e=S("$ZodCheck",(e,t)=>{var o;e._zod??(e._zod={}),e._zod.def=t,(o=e._zod).onattach??(o.onattach=[])}),dr={number:"number",bigint:"bigint",object:"date"},mr=S("$ZodCheckLessThan",(e,t)=>{_e.init(e,t);const o=dr[typeof t.value];e._zod.onattach.push(n=>{const s=n._zod.bag,r=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:o,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),hr=S("$ZodCheckGreaterThan",(e,t)=>{_e.init(e,t);const o=dr[typeof t.value];e._zod.onattach.push(n=>{const s=n._zod.bag,r=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:o,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ju=S("$ZodCheckMultipleOf",(e,t)=>{_e.init(e,t),e._zod.onattach.push(o=>{var n;(n=o._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=o=>{if(typeof o.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof o.value=="bigint"?o.value%t.value===BigInt(0):jl(o.value,t.value)===0)||o.issues.push({origin:typeof o.value,code:"not_multiple_of",divisor:t.value,input:o.value,inst:e,continue:!t.abort})}}),Uu=S("$ZodCheckNumberFormat",(e,t)=>{_e.init(e,t),t.format=t.format||"float64";const o=t.format?.includes("int"),n=o?"int":"number",[s,r]=Fl[t.format];e._zod.onattach.push(a=>{const c=a._zod.bag;c.format=t.format,c.minimum=s,c.maximum=r,o&&(c.pattern=Nu)}),e._zod.check=a=>{const c=a.value;if(o){if(!Number.isInteger(c)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}c<s&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),c>r&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Zu=S("$ZodCheckMaxLength",(e,t)=>{var o;_e.init(e,t),(o=e._zod.def).when??(o.when=n=>{const s=n.value;return!Ss(s)&&s.length!==void 0}),e._zod.onattach.push(n=>{const s=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const s=n.value;if(s.length<=t.maximum)return;const a=_s(s);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Du=S("$ZodCheckMinLength",(e,t)=>{var o;_e.init(e,t),(o=e._zod.def).when??(o.when=n=>{const s=n.value;return!Ss(s)&&s.length!==void 0}),e._zod.onattach.push(n=>{const s=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const s=n.value;if(s.length>=t.minimum)return;const a=_s(s);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Hu=S("$ZodCheckLengthEquals",(e,t)=>{var o;_e.init(e,t),(o=e._zod.def).when??(o.when=n=>{const s=n.value;return!Ss(s)&&s.length!==void 0}),e._zod.onattach.push(n=>{const s=n._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=n=>{const s=n.value,r=s.length;if(r===t.length)return;const a=_s(s),c=r>t.length;n.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),$n=S("$ZodCheckStringFormat",(e,t)=>{var o,n;_e.init(e,t),e._zod.onattach.push(s=>{const r=s._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(o=e._zod).check??(o.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Fu=S("$ZodCheckRegex",(e,t)=>{$n.init(e,t),e._zod.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ju=S("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Lu),$n.init(e,t)}),Vu=S("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Au),$n.init(e,t)}),Bu=S("$ZodCheckIncludes",(e,t)=>{_e.init(e,t);const o=wt(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${o}`:o);t.pattern=n,e._zod.onattach.push(s=>{const r=s._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),Wu=S("$ZodCheckStartsWith",(e,t)=>{_e.init(e,t);const o=new RegExp(`^${wt(t.prefix)}.*`);t.pattern??(t.pattern=o),e._zod.onattach.push(n=>{const s=n._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(o)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Gu=S("$ZodCheckEndsWith",(e,t)=>{_e.init(e,t);const o=new RegExp(`.*${wt(t.suffix)}$`);t.pattern??(t.pattern=o),e._zod.onattach.push(n=>{const s=n._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(o)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Ku=S("$ZodCheckOverwrite",(e,t)=>{_e.init(e,t),e._zod.check=o=>{o.value=t.tx(o.value)}});class Yu{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
`).filter(a=>a),s=Math.min(...n.map(a=>a.length-a.trimStart().length)),r=n.map(a=>a.slice(s)).map(a=>" ".repeat(this.indent*2)+a);for(const a of r)this.content.push(a)}compile(){const t=Function,o=this?.args,s=[...(this?.content??[""]).map(r=>`  ${r}`)];return new t(...o,s.join(`
`))}}const Qu={major:4,minor:4,patch:3},J=S("$ZodType",(e,t)=>{var o;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Qu;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const s of n)for(const r of s._zod.onattach)r(e);if(n.length===0)(o=e._zod).deferred??(o.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(a,c,u)=>{let d=bt(a),h;for(const g of c){if(g._zod.def.when){if(Ql(a)||!g._zod.def.when(a))continue}else if(d)continue;const b=a.issues.length,f=g._zod.check(a);if(f instanceof Promise&&u?.async===!1)throw new yt;if(h||f instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await f,a.issues.length!==b&&(d||(d=bt(a,b)))});else{if(a.issues.length===b)continue;d||(d=bt(a,b))}}return h?h.then(()=>a):a},r=(a,c,u)=>{if(bt(a))return a.aborted=!0,a;const d=s(c,n,u);if(d instanceof Promise){if(u.async===!1)throw new yt;return d.then(h=>e._zod.parse(h,u))}return e._zod.parse(d,u)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){const d=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return d instanceof Promise?d.then(h=>r(h,a,c)):r(d,a,c)}const u=e._zod.parse(a,c);if(u instanceof Promise){if(c.async===!1)throw new yt;return u.then(d=>s(d,n,c))}return s(u,n,c)}}D(e,"~standard",()=>({validate:s=>{try{const r=tu(e,s);return r.success?{value:r.data}:{issues:r.error?.issues}}catch{return ou(e,s).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),ys=S("$ZodString",(e,t)=>{J.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??xu(e._zod.bag),e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=String(o.value)}catch{}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),W=S("$ZodStringFormat",(e,t)=>{$n.init(e,t),ys.init(e,t)}),Xu=S("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=_u),W.init(e,t)}),ep=S("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=fi(n))}else t.pattern??(t.pattern=fi());W.init(e,t)}),tp=S("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=bu),W.init(e,t)}),op=S("$ZodURL",(e,t)=>{W.init(e,t),e._zod.check=o=>{try{const n=o.value.trim();if(!t.normalize&&t.protocol?.source===Eu.source&&!/^https?:\/\//i.test(n)){o.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:o.value,inst:e,continue:!t.abort});return}const s=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:o.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:o.value,inst:e,continue:!t.abort})),t.normalize?o.value=s.href:o.value=n;return}catch{o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:e,continue:!t.abort})}}}),np=S("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=yu()),W.init(e,t)}),sp=S("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Su),W.init(e,t)}),ip=S("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=pu),W.init(e,t)}),rp=S("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=du),W.init(e,t)}),ap=S("$ZodULID",(e,t)=>{t.pattern??(t.pattern=mu),W.init(e,t)}),cp=S("$ZodXID",(e,t)=>{t.pattern??(t.pattern=hu),W.init(e,t)}),lp=S("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=fu),W.init(e,t)}),up=S("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Iu(t)),W.init(e,t)}),pp=S("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=$u),W.init(e,t)}),dp=S("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=qu(t)),W.init(e,t)}),mp=S("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=gu),W.init(e,t)}),hp=S("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ru),W.init(e,t),e._zod.bag.format="ipv4"}),fp=S("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=wu),W.init(e,t),e._zod.bag.format="ipv6",e._zod.check=o=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:e,continue:!t.abort})}}}),Sp=S("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Tu),W.init(e,t)}),gp=S("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Pu),W.init(e,t),e._zod.check=o=>{const n=o.value.split("/");try{if(n.length!==2)throw new Error;const[s,r]=n;if(!r)throw new Error;const a=Number(r);if(`${a}`!==r)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${s}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:e,continue:!t.abort})}}});function fr(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const _p=S("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Cu),W.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=o=>{fr(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!t.abort})}});function bp(e){if(!cr.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),o=t.padEnd(Math.ceil(t.length/4)*4,"=");return fr(o)}const vp=S("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=cr),W.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=o=>{bp(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!t.abort})}}),yp=S("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ku),W.init(e,t)});function Rp(e,t=null){try{const o=e.split(".");if(o.length!==3)return!1;const[n]=o;if(!n)return!1;const s=JSON.parse(atob(n));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const wp=S("$ZodJWT",(e,t)=>{W.init(e,t),e._zod.check=o=>{Rp(o.value,t.alg)||o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!t.abort})}}),Sr=S("$ZodNumber",(e,t)=>{J.init(e,t),e._zod.pattern=e._zod.bag.pattern??pr,e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=Number(o.value)}catch{}const s=o.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return o;const r=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return o.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...r?{received:r}:{}}),o}}),Tp=S("$ZodNumberFormat",(e,t)=>{Uu.init(e,t),Sr.init(e,t)}),Pp=S("$ZodBoolean",(e,t)=>{J.init(e,t),e._zod.pattern=zu,e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=!!o.value}catch{}const s=o.value;return typeof s=="boolean"||o.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),o}}),Cp=S("$ZodUndefined",(e,t)=>{J.init(e,t),e._zod.pattern=Mu,e._zod.values=new Set([void 0]),e._zod.parse=(o,n)=>{const s=o.value;return typeof s>"u"||o.issues.push({expected:"undefined",code:"invalid_type",input:s,inst:e}),o}}),Ep=S("$ZodNull",(e,t)=>{J.init(e,t),e._zod.pattern=Ou,e._zod.values=new Set([null]),e._zod.parse=(o,n)=>{const s=o.value;return s===null||o.issues.push({expected:"null",code:"invalid_type",input:s,inst:e}),o}}),kp=S("$ZodAny",(e,t)=>{J.init(e,t),e._zod.parse=o=>o}),$p=S("$ZodUnknown",(e,t)=>{J.init(e,t),e._zod.parse=o=>o}),qp=S("$ZodNever",(e,t)=>{J.init(e,t),e._zod.parse=(o,n)=>(o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:e}),o)});function Si(e,t,o){e.issues.length&&t.issues.push(...vt(o,e.issues)),t.value[o]=e.value}const Ip=S("$ZodArray",(e,t)=>{J.init(e,t),e._zod.parse=(o,n)=>{const s=o.value;if(!Array.isArray(s))return o.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),o;o.value=Array(s.length);const r=[];for(let a=0;a<s.length;a++){const c=s[a],u=t.element._zod.run({value:c,issues:[]},n);u instanceof Promise?r.push(u.then(d=>Si(d,o,a))):Si(u,o,a)}return r.length?Promise.all(r).then(()=>o):o}});function fn(e,t,o,n,s,r){const a=o in n;if(e.issues.length){if(s&&r&&!a)return;t.issues.push(...vt(o,e.issues))}if(!a&&!s){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[o]});return}e.value===void 0?a&&(t.value[o]=void 0):t.value[o]=e.value}function gr(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const o=Hl(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function _r(e,t,o,n,s,r){const a=[],c=s.keySet,u=s.catchall._zod,d=u.def.type,h=u.optin==="optional",g=u.optout==="optional";for(const b in t){if(b==="__proto__"||c.has(b))continue;if(d==="never"){a.push(b);continue}const f=u.run({value:t[b],issues:[]},n);f instanceof Promise?e.push(f.then(R=>fn(R,o,b,t,h,g))):fn(f,o,b,t,h,g)}return a.length&&o.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:r}),e.length?Promise.all(e).then(()=>o):o}const xp=S("$ZodObject",(e,t)=>{if(J.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}const n=Cn(()=>gr(t));D(e._zod,"propValues",()=>{const c=t.shape,u={};for(const d in c){const h=c[d]._zod;if(h.values){u[d]??(u[d]=new Set);for(const g of h.values)u[d].add(g)}}return u});const s=xo,r=t.catchall;let a;e._zod.parse=(c,u)=>{a??(a=n.value);const d=c.value;if(!s(d))return c.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),c;c.value={};const h=[],g=a.shape;for(const b of a.keys){const f=g[b],R=f._zod.optin==="optional",P=f._zod.optout==="optional",v=f._zod.run({value:d[b],issues:[]},u);v instanceof Promise?h.push(v.then(A=>fn(A,c,b,d,R,P))):fn(v,c,b,d,R,P)}return r?_r(h,d,c,u,n.value,e):h.length?Promise.all(h).then(()=>c):c}}),Np=S("$ZodObjectJIT",(e,t)=>{xp.init(e,t);const o=e._zod.parse,n=Cn(()=>gr(t)),s=b=>{const f=new Yu(["shape","payload","ctx"]),R=n.value,P=N=>{const x=hi(N);return`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`};f.write("const input = payload.value;");const v=Object.create(null);let A=0;for(const N of R.keys)v[N]=`key_${A++}`;f.write("const newResult = {};");for(const N of R.keys){const x=v[N],$=hi(N),z=b[N],G=z?._zod?.optin==="optional",ne=z?._zod?.optout==="optional";f.write(`const ${x} = ${P(N)};`),G&&ne?f.write(`
        if (${x}.issues.length) {
          if (${$} in input) {
            payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
              ...iss,
              path: iss.path ? [${$}, ...iss.path] : [${$}]
            })));
          }
        }
        
        if (${x}.value === undefined) {
          if (${$} in input) {
            newResult[${$}] = undefined;
          }
        } else {
          newResult[${$}] = ${x}.value;
        }
        
      `):G?f.write(`
        if (${x}.issues.length) {
          payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${$}, ...iss.path] : [${$}]
          })));
        }
        
        if (${x}.value === undefined) {
          if (${$} in input) {
            newResult[${$}] = undefined;
          }
        } else {
          newResult[${$}] = ${x}.value;
        }
        
      `):f.write(`
        const ${x}_present = ${$} in input;
        if (${x}.issues.length) {
          payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${$}, ...iss.path] : [${$}]
          })));
        }
        if (!${x}_present && !${x}.issues.length) {
          payload.issues.push({
            code: "invalid_type",
            expected: "nonoptional",
            input: undefined,
            path: [${$}]
          });
        }

        if (${x}_present) {
          if (${x}.value === undefined) {
            newResult[${$}] = undefined;
          } else {
            newResult[${$}] = ${x}.value;
          }
        }

      `)}f.write("payload.value = newResult;"),f.write("return payload;");const U=f.compile();return(N,x)=>U(b,N,x)};let r;const a=xo,c=!hn.jitless,d=c&&Zl.value,h=t.catchall;let g;e._zod.parse=(b,f)=>{g??(g=n.value);const R=b.value;return a(R)?c&&d&&f?.async===!1&&f.jitless!==!0?(r||(r=s(t.shape)),b=r(b,f),h?_r([],R,b,f,g,e):b):o(b,f):(b.issues.push({expected:"object",code:"invalid_type",input:R,inst:e}),b)}});function gi(e,t,o,n){for(const r of e)if(r.issues.length===0)return t.value=r.value,t;const s=e.filter(r=>!bt(r));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:o,errors:e.map(r=>r.issues.map(a=>Ne(a,n,xe())))}),t)}const br=S("$ZodUnion",(e,t)=>{J.init(e,t),D(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),D(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),D(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),D(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${n.map(s=>gs(s.source)).join("|")})$`)}});const o=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,s)=>{if(o)return o(n,s);let r=!1;const a=[];for(const c of t.options){const u=c._zod.run({value:n.value,issues:[]},s);if(u instanceof Promise)a.push(u),r=!0;else{if(u.issues.length===0)return u;a.push(u)}}return r?Promise.all(a).then(c=>gi(c,n,e,s)):gi(a,n,e,s)}}),zp=S("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,br.init(e,t);const o=e._zod.parse;D(e._zod,"propValues",()=>{const s={};for(const r of t.options){const a=r._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const[c,u]of Object.entries(a)){s[c]||(s[c]=new Set);for(const d of u)s[c].add(d)}}return s});const n=Cn(()=>{const s=t.options,r=new Map;for(const a of s){const c=a._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const u of c){if(r.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);r.set(u,a)}}return r});e._zod.parse=(s,r)=>{const a=s.value;if(!xo(a))return s.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),s;const c=n.value.get(a?.[t.discriminator]);return c?c._zod.run(s,r):t.unionFallback||r.direction==="backward"?o(s,r):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()),input:a,path:[t.discriminator],inst:e}),s)}}),Op=S("$ZodIntersection",(e,t)=>{J.init(e,t),e._zod.parse=(o,n)=>{const s=o.value,r=t.left._zod.run({value:s,issues:[]},n),a=t.right._zod.run({value:s,issues:[]},n);return r instanceof Promise||a instanceof Promise?Promise.all([r,a]).then(([u,d])=>_i(o,u,d)):_i(o,r,a)}});function ns(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(Rt(e)&&Rt(t)){const o=Object.keys(t),n=Object.keys(e).filter(r=>o.indexOf(r)!==-1),s={...e,...t};for(const r of n){const a=ns(e[r],t[r]);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};s[r]=a.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const o=[];for(let n=0;n<e.length;n++){const s=e[n],r=t[n],a=ns(s,r);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};o.push(a.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function _i(e,t,o){const n=new Map;let s;for(const c of t.issues)if(c.code==="unrecognized_keys"){s??(s=c);for(const u of c.keys)n.has(u)||n.set(u,{}),n.get(u).l=!0}else e.issues.push(c);for(const c of o.issues)if(c.code==="unrecognized_keys")for(const u of c.keys)n.has(u)||n.set(u,{}),n.get(u).r=!0;else e.issues.push(c);const r=[...n].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(r.length&&s&&e.issues.push({...s,keys:r}),bt(e))return e;const a=ns(t.value,o.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Mp=S("$ZodRecord",(e,t)=>{J.init(e,t),e._zod.parse=(o,n)=>{const s=o.value;if(!Rt(s))return o.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),o;const r=[],a=t.keyType._zod.values;if(a){o.value={};const c=new Set;for(const d of a)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){c.add(typeof d=="number"?d.toString():d);const h=t.keyType._zod.run({value:d,issues:[]},n);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(h.issues.length){o.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(f=>Ne(f,n,xe())),input:d,path:[d],inst:e});continue}const g=h.value,b=t.valueType._zod.run({value:s[d],issues:[]},n);b instanceof Promise?r.push(b.then(f=>{f.issues.length&&o.issues.push(...vt(d,f.issues)),o.value[g]=f.value})):(b.issues.length&&o.issues.push(...vt(d,b.issues)),o.value[g]=b.value)}let u;for(const d in s)c.has(d)||(u=u??[],u.push(d));u&&u.length>0&&o.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:u})}else{o.value={};for(const c of Reflect.ownKeys(s)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,c))continue;let u=t.keyType._zod.run({value:c,issues:[]},n);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&pr.test(c)&&u.issues.length){const g=t.keyType._zod.run({value:Number(c),issues:[]},n);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(u=g)}if(u.issues.length){t.mode==="loose"?o.value[c]=s[c]:o.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(g=>Ne(g,n,xe())),input:c,path:[c],inst:e});continue}const h=t.valueType._zod.run({value:s[c],issues:[]},n);h instanceof Promise?r.push(h.then(g=>{g.issues.length&&o.issues.push(...vt(c,g.issues)),o.value[u.value]=g.value})):(h.issues.length&&o.issues.push(...vt(c,h.issues)),o.value[u.value]=h.value)}}return r.length?Promise.all(r).then(()=>o):o}}),Lp=S("$ZodEnum",(e,t)=>{J.init(e,t);const o=or(t.entries),n=new Set(o);e._zod.values=n,e._zod.pattern=new RegExp(`^(${o.filter(s=>Dl.has(typeof s)).map(s=>typeof s=="string"?wt(s):s.toString()).join("|")})$`),e._zod.parse=(s,r)=>{const a=s.value;return n.has(a)||s.issues.push({code:"invalid_value",values:o,input:a,inst:e}),s}}),Ap=S("$ZodLiteral",(e,t)=>{if(J.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const o=new Set(t.values);e._zod.values=o,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?wt(n):n?wt(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,s)=>{const r=n.value;return o.has(r)||n.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),n}}),jp=S("$ZodTransform",(e,t)=>{J.init(e,t),e._zod.optin="optional",e._zod.parse=(o,n)=>{if(n.direction==="backward")throw new tr(e.constructor.name);const s=t.transform(o.value,o);if(n.async)return(s instanceof Promise?s:Promise.resolve(s)).then(a=>(o.value=a,o.fallback=!0,o));if(s instanceof Promise)throw new yt;return o.value=s,o.fallback=!0,o}});function bi(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const vr=S("$ZodOptional",(e,t)=>{J.init(e,t),e._zod.optin="optional",e._zod.optout="optional",D(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),D(e._zod,"pattern",()=>{const o=t.innerType._zod.pattern;return o?new RegExp(`^(${gs(o.source)})?$`):void 0}),e._zod.parse=(o,n)=>{if(t.innerType._zod.optin==="optional"){const s=o.value,r=t.innerType._zod.run(o,n);return r instanceof Promise?r.then(a=>bi(a,s)):bi(r,s)}return o.value===void 0?o:t.innerType._zod.run(o,n)}}),Up=S("$ZodExactOptional",(e,t)=>{vr.init(e,t),D(e._zod,"values",()=>t.innerType._zod.values),D(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(o,n)=>t.innerType._zod.run(o,n)}),Zp=S("$ZodNullable",(e,t)=>{J.init(e,t),D(e._zod,"optin",()=>t.innerType._zod.optin),D(e._zod,"optout",()=>t.innerType._zod.optout),D(e._zod,"pattern",()=>{const o=t.innerType._zod.pattern;return o?new RegExp(`^(${gs(o.source)}|null)$`):void 0}),D(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(o,n)=>o.value===null?o:t.innerType._zod.run(o,n)}),Dp=S("$ZodDefault",(e,t)=>{J.init(e,t),e._zod.optin="optional",D(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,n)=>{if(n.direction==="backward")return t.innerType._zod.run(o,n);if(o.value===void 0)return o.value=t.defaultValue,o;const s=t.innerType._zod.run(o,n);return s instanceof Promise?s.then(r=>vi(r,t)):vi(s,t)}});function vi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Hp=S("$ZodPrefault",(e,t)=>{J.init(e,t),e._zod.optin="optional",D(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,n)=>(n.direction==="backward"||o.value===void 0&&(o.value=t.defaultValue),t.innerType._zod.run(o,n))}),Fp=S("$ZodNonOptional",(e,t)=>{J.init(e,t),D(e._zod,"values",()=>{const o=t.innerType._zod.values;return o?new Set([...o].filter(n=>n!==void 0)):void 0}),e._zod.parse=(o,n)=>{const s=t.innerType._zod.run(o,n);return s instanceof Promise?s.then(r=>yi(r,e)):yi(s,e)}});function yi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Jp=S("$ZodCatch",(e,t)=>{J.init(e,t),e._zod.optin="optional",D(e._zod,"optout",()=>t.innerType._zod.optout),D(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,n)=>{if(n.direction==="backward")return t.innerType._zod.run(o,n);const s=t.innerType._zod.run(o,n);return s instanceof Promise?s.then(r=>(o.value=r.value,r.issues.length&&(o.value=t.catchValue({...o,error:{issues:r.issues.map(a=>Ne(a,n,xe()))},input:o.value}),o.issues=[],o.fallback=!0),o)):(o.value=s.value,s.issues.length&&(o.value=t.catchValue({...o,error:{issues:s.issues.map(r=>Ne(r,n,xe()))},input:o.value}),o.issues=[],o.fallback=!0),o)}}),yr=S("$ZodPipe",(e,t)=>{J.init(e,t),D(e._zod,"values",()=>t.in._zod.values),D(e._zod,"optin",()=>t.in._zod.optin),D(e._zod,"optout",()=>t.out._zod.optout),D(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(o,n)=>{if(n.direction==="backward"){const r=t.out._zod.run(o,n);return r instanceof Promise?r.then(a=>cn(a,t.in,n)):cn(r,t.in,n)}const s=t.in._zod.run(o,n);return s instanceof Promise?s.then(r=>cn(r,t.out,n)):cn(s,t.out,n)}});function cn(e,t,o){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},o)}const Vp=S("$ZodPreprocess",(e,t)=>{yr.init(e,t)}),Bp=S("$ZodReadonly",(e,t)=>{J.init(e,t),D(e._zod,"propValues",()=>t.innerType._zod.propValues),D(e._zod,"values",()=>t.innerType._zod.values),D(e._zod,"optin",()=>t.innerType?._zod?.optin),D(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(o,n)=>{if(n.direction==="backward")return t.innerType._zod.run(o,n);const s=t.innerType._zod.run(o,n);return s instanceof Promise?s.then(Ri):Ri(s)}});function Ri(e){return e.value=Object.freeze(e.value),e}const Wp=S("$ZodLazy",(e,t)=>{J.init(e,t),D(e._zod,"innerType",()=>{const o=t;return o._cachedInner||(o._cachedInner=t.getter()),o._cachedInner}),D(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),D(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),D(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),D(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(o,n)=>e._zod.innerType._zod.run(o,n)}),Gp=S("$ZodCustom",(e,t)=>{_e.init(e,t),J.init(e,t),e._zod.parse=(o,n)=>o,e._zod.check=o=>{const n=o.value,s=t.fn(n);if(s instanceof Promise)return s.then(r=>wi(r,o,n,e));wi(s,o,n,e)}});function wi(e,t,o,n){if(!e){const s={code:"custom",input:o,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(s.params=n._zod.def.params),t.issues.push(No(s))}}var Ti;class Kp{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...o){const n=o[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const o=this._map.get(t);return o&&typeof o=="object"&&"id"in o&&this._idmap.delete(o.id),this._map.delete(t),this}get(t){const o=t._zod.parent;if(o){const n={...this.get(o)??{}};delete n.id;const s={...n,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Yp(){return new Kp}(Ti=globalThis).__zod_globalRegistry??(Ti.__zod_globalRegistry=Yp());const ko=globalThis.__zod_globalRegistry;function Qp(e,t){return new e({type:"string",...E(t)})}function Rr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...E(t)})}function Pi(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...E(t)})}function Xp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...E(t)})}function ed(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(t)})}function td(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(t)})}function od(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(t)})}function wr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...E(t)})}function nd(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...E(t)})}function sd(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(t)})}function id(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...E(t)})}function rd(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(t)})}function ad(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...E(t)})}function cd(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...E(t)})}function ld(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(t)})}function ud(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(t)})}function pd(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(t)})}function dd(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(t)})}function md(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(t)})}function hd(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...E(t)})}function fd(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...E(t)})}function Sd(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...E(t)})}function gd(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...E(t)})}function _d(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(t)})}function bd(e,t){return new e({type:"string",format:"date",check:"string_format",...E(t)})}function vd(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...E(t)})}function yd(e,t){return new e({type:"string",format:"duration",check:"string_format",...E(t)})}function Rd(e,t){return new e({type:"number",checks:[],...E(t)})}function wd(e,t){return new e({type:"number",coerce:!0,checks:[],...E(t)})}function Td(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...E(t)})}function Pd(e,t){return new e({type:"boolean",...E(t)})}function Cd(e,t){return new e({type:"undefined",...E(t)})}function Ed(e,t){return new e({type:"null",...E(t)})}function kd(e){return new e({type:"any"})}function $d(e){return new e({type:"unknown"})}function qd(e,t){return new e({type:"never",...E(t)})}function Ci(e,t){return new mr({check:"less_than",...E(t),value:e,inclusive:!1})}function Bn(e,t){return new mr({check:"less_than",...E(t),value:e,inclusive:!0})}function Ei(e,t){return new hr({check:"greater_than",...E(t),value:e,inclusive:!1})}function Wn(e,t){return new hr({check:"greater_than",...E(t),value:e,inclusive:!0})}function ki(e,t){return new ju({check:"multiple_of",...E(t),value:e})}function Tr(e,t){return new Zu({check:"max_length",...E(t),maximum:e})}function Sn(e,t){return new Du({check:"min_length",...E(t),minimum:e})}function Pr(e,t){return new Hu({check:"length_equals",...E(t),length:e})}function Id(e,t){return new Fu({check:"string_format",format:"regex",...E(t),pattern:e})}function xd(e){return new Ju({check:"string_format",format:"lowercase",...E(e)})}function Nd(e){return new Vu({check:"string_format",format:"uppercase",...E(e)})}function zd(e,t){return new Bu({check:"string_format",format:"includes",...E(t),includes:e})}function Od(e,t){return new Wu({check:"string_format",format:"starts_with",...E(t),prefix:e})}function Md(e,t){return new Gu({check:"string_format",format:"ends_with",...E(t),suffix:e})}function Pt(e){return new Ku({check:"overwrite",tx:e})}function Ld(e){return Pt(t=>t.normalize(e))}function Ad(){return Pt(e=>e.trim())}function jd(){return Pt(e=>e.toLowerCase())}function Ud(){return Pt(e=>e.toUpperCase())}function Zd(){return Pt(e=>Ul(e))}function Dd(e,t,o){return new e({type:"array",element:t,...E(o)})}function Hd(e,t,o){return new e({type:"custom",check:"custom",fn:t,...E(o)})}function Fd(e,t){const o=Jd(n=>(n.addIssue=s=>{if(typeof s=="string")n.issues.push(No(s,n.value,o._zod.def));else{const r=s;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=o),r.continue??(r.continue=!o._zod.def.abort),n.issues.push(No(r))}},e(n.value,n)),t);return o}function Jd(e,t){const o=new _e({check:"custom",...E(t)});return o._zod.check=e,o}function gn(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ko,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 B(e,t,o={path:[],schemaPath:[]}){var n;const s=e._zod.def,r=t.seen.get(e);if(r)return r.count++,o.schemaPath.includes(e)&&(r.cycle=o.path),r.schema;const a={schema:{},count:1,cycle:void 0,path:o.path};t.seen.set(e,a);const c=e._zod.toJSONSchema?.();if(c)a.schema=c;else{const h={...o,schemaPath:[...o.schemaPath,e],path:o.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,h);else{const b=a.schema,f=t.processors[s.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);f(e,t,b,h)}const g=e._zod.parent;g&&(a.ref||(a.ref=g),B(g,t,h),t.seen.get(g).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Object.assign(a.schema,u),t.io==="input"&&me(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function _n(e,t){const o=e.seen.get(t);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const a of e.seen.entries()){const c=e.metadataRegistry.get(a[0])?.id;if(c){const u=n.get(c);if(u&&u!==a[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(c,a[0])}}const s=a=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(a[0])?.id,b=e.external.uri??(R=>R);if(g)return{ref:b(g)};const f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${b("__shared")}#/${c}/${f}`}}if(a[1]===o)return{ref:"#"};const d=`#/${c}/`,h=a[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:d+h}},r=a=>{if(a[1].schema.$ref)return;const c=a[1],{ref:u,defId:d}=s(a);c.def={...c.schema},d&&(c.defId=d);const h=c.schema;for(const g in h)delete h[g];h.$ref=u};if(e.cycles==="throw")for(const a of e.seen.entries()){const c=a[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>

Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const c=a[1];if(t===a[0]){r(a);continue}if(e.external){const d=e.external.registry.get(a[0])?.id;if(t!==a[0]&&d){r(a);continue}}if(e.metadataRegistry.get(a[0])?.id){r(a);continue}if(c.cycle){r(a);continue}if(c.count>1&&e.reused==="ref"){r(a);continue}}}function bn(e,t){const o=e.seen.get(t);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=c=>{const u=e.seen.get(c);if(u.ref===null)return;const d=u.def??u.schema,h={...d},g=u.ref;if(u.ref=null,g){n(g);const f=e.seen.get(g),R=f.schema;if(R.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(R)):Object.assign(d,R),Object.assign(d,h),c._zod.parent===g)for(const v in d)v==="$ref"||v==="allOf"||v in h||delete d[v];if(R.$ref&&f.def)for(const v in d)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(d[v])===JSON.stringify(f.def[v])&&delete d[v]}const b=c._zod.parent;if(b&&b!==g){n(b);const f=e.seen.get(b);if(f?.schema.$ref&&(d.$ref=f.schema.$ref,f.def))for(const R in d)R==="$ref"||R==="allOf"||R in f.def&&JSON.stringify(d[R])===JSON.stringify(f.def[R])&&delete d[R]}e.override({zodSchema:c,jsonSchema:d,path:u.path??[]})};for(const c of[...e.seen.entries()].reverse())n(c[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(c)}Object.assign(s,o.def??o.schema);const r=e.metadataRegistry.get(t)?.id;r!==void 0&&s.id===r&&delete s.id;const a=e.external?.defs??{};for(const c of e.seen.entries()){const u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,a[u.defId]=u.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?s.$defs=a:s.definitions=a);try{const c=JSON.parse(JSON.stringify(s));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:vn(t,"input",e.processors),output:vn(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function me(e,t){const o=t??{seen:new Set};if(o.seen.has(e))return!1;o.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return me(n.element,o);if(n.type==="set")return me(n.valueType,o);if(n.type==="lazy")return me(n.getter(),o);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return me(n.innerType,o);if(n.type==="intersection")return me(n.left,o)||me(n.right,o);if(n.type==="record"||n.type==="map")return me(n.keyType,o)||me(n.valueType,o);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:me(n.in,o)||me(n.out,o);if(n.type==="object"){for(const s in n.shape)if(me(n.shape[s],o))return!0;return!1}if(n.type==="union"){for(const s of n.options)if(me(s,o))return!0;return!1}if(n.type==="tuple"){for(const s of n.items)if(me(s,o))return!0;return!!(n.rest&&me(n.rest,o))}return!1}const Vd=(e,t={})=>o=>{const n=gn({...o,processors:t});return B(e,n),_n(n,e),bn(n,e)},vn=(e,t,o={})=>n=>{const{libraryOptions:s,target:r}=n??{},a=gn({...s??{},target:r,io:t,processors:o});return B(e,a),_n(a,e),bn(a,e)},Bd={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Cr=(e,t,o,n)=>{const s=o;s.type="string";const{minimum:r,maximum:a,format:c,patterns:u,contentEncoding:d}=e._zod.bag;if(typeof r=="number"&&(s.minLength=r),typeof a=="number"&&(s.maxLength=a),c&&(s.format=Bd[c]??c,s.format===""&&delete s.format,c==="time"&&delete s.format),d&&(s.contentEncoding=d),u&&u.size>0){const h=[...u];h.length===1?s.pattern=h[0].source:h.length>1&&(s.allOf=[...h.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},Er=(e,t,o,n)=>{const s=o,{minimum:r,maximum:a,format:c,multipleOf:u,exclusiveMaximum:d,exclusiveMinimum:h}=e._zod.bag;typeof c=="string"&&c.includes("int")?s.type="integer":s.type="number";const g=typeof h=="number"&&h>=(r??Number.NEGATIVE_INFINITY),b=typeof d=="number"&&d<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";g?f?(s.minimum=h,s.exclusiveMinimum=!0):s.exclusiveMinimum=h:typeof r=="number"&&(s.minimum=r),b?f?(s.maximum=d,s.exclusiveMaximum=!0):s.exclusiveMaximum=d:typeof a=="number"&&(s.maximum=a),typeof u=="number"&&(s.multipleOf=u)},kr=(e,t,o,n)=>{o.type="boolean"},Wd=(e,t,o,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Gd=(e,t,o,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},$r=(e,t,o,n)=>{t.target==="openapi-3.0"?(o.type="string",o.nullable=!0,o.enum=[null]):o.type="null"},qr=(e,t,o,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Kd=(e,t,o,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Ir=(e,t,o,n)=>{o.not={}},xr=(e,t,o,n)=>{},Nr=(e,t,o,n)=>{},Yd=(e,t,o,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},zr=(e,t,o,n)=>{const s=e._zod.def,r=or(s.entries);r.every(a=>typeof a=="number")&&(o.type="number"),r.every(a=>typeof a=="string")&&(o.type="string"),o.enum=r},Or=(e,t,o,n)=>{const s=e._zod.def,r=[];for(const a of s.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");r.push(Number(a))}else r.push(a);if(r.length!==0)if(r.length===1){const a=r[0];o.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?o.enum=[a]:o.const=a}else r.every(a=>typeof a=="number")&&(o.type="number"),r.every(a=>typeof a=="string")&&(o.type="string"),r.every(a=>typeof a=="boolean")&&(o.type="boolean"),r.every(a=>a===null)&&(o.type="null"),o.enum=r},Qd=(e,t,o,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Xd=(e,t,o,n)=>{const s=o,r=e._zod.pattern;if(!r)throw new Error("Pattern not found in template literal");s.type="string",s.pattern=r.source},em=(e,t,o,n)=>{const s=o,r={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:c,mime:u}=e._zod.bag;a!==void 0&&(r.minLength=a),c!==void 0&&(r.maxLength=c),u?u.length===1?(r.contentMediaType=u[0],Object.assign(s,r)):(Object.assign(s,r),s.anyOf=u.map(d=>({contentMediaType:d}))):Object.assign(s,r)},tm=(e,t,o,n)=>{o.type="boolean"},Mr=(e,t,o,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},om=(e,t,o,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Lr=(e,t,o,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},nm=(e,t,o,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},sm=(e,t,o,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Ar=(e,t,o,n)=>{const s=o,r=e._zod.def,{minimum:a,maximum:c}=e._zod.bag;typeof a=="number"&&(s.minItems=a),typeof c=="number"&&(s.maxItems=c),s.type="array",s.items=B(r.element,t,{...n,path:[...n.path,"items"]})},jr=(e,t,o,n)=>{const s=o,r=e._zod.def;s.type="object",s.properties={};const a=r.shape;for(const d in a)s.properties[d]=B(a[d],t,{...n,path:[...n.path,"properties",d]});const c=new Set(Object.keys(a)),u=new Set([...c].filter(d=>{const h=r.shape[d]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));u.size>0&&(s.required=Array.from(u)),r.catchall?._zod.def.type==="never"?s.additionalProperties=!1:r.catchall?r.catchall&&(s.additionalProperties=B(r.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},Ur=(e,t,o,n)=>{const s=e._zod.def,r=s.inclusive===!1,a=s.options.map((c,u)=>B(c,t,{...n,path:[...n.path,r?"oneOf":"anyOf",u]}));r?o.oneOf=a:o.anyOf=a},Zr=(e,t,o,n)=>{const s=e._zod.def,r=B(s.left,t,{...n,path:[...n.path,"allOf",0]}),a=B(s.right,t,{...n,path:[...n.path,"allOf",1]}),c=d=>"allOf"in d&&Object.keys(d).length===1,u=[...c(r)?r.allOf:[r],...c(a)?a.allOf:[a]];o.allOf=u},im=(e,t,o,n)=>{const s=o,r=e._zod.def;s.type="array";const a=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=r.items.map((b,f)=>B(b,t,{...n,path:[...n.path,a,f]})),d=r.rest?B(r.rest,t,{...n,path:[...n.path,c,...t.target==="openapi-3.0"?[r.items.length]:[]]}):null;t.target==="draft-2020-12"?(s.prefixItems=u,d&&(s.items=d)):t.target==="openapi-3.0"?(s.items={anyOf:u},d&&s.items.anyOf.push(d),s.minItems=u.length,d||(s.maxItems=u.length)):(s.items=u,d&&(s.additionalItems=d));const{minimum:h,maximum:g}=e._zod.bag;typeof h=="number"&&(s.minItems=h),typeof g=="number"&&(s.maxItems=g)},Dr=(e,t,o,n)=>{const s=o,r=e._zod.def;s.type="object";const a=r.keyType,u=a._zod.bag?.patterns;if(r.mode==="loose"&&u&&u.size>0){const h=B(r.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});s.patternProperties={};for(const g of u)s.patternProperties[g.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=B(r.keyType,t,{...n,path:[...n.path,"propertyNames"]})),s.additionalProperties=B(r.valueType,t,{...n,path:[...n.path,"additionalProperties"]});const d=a._zod.values;if(d){const h=[...d].filter(g=>typeof g=="string"||typeof g=="number");h.length>0&&(s.required=h)}},Hr=(e,t,o,n)=>{const s=e._zod.def,r=B(s.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=s.innerType,o.nullable=!0):o.anyOf=[r,{type:"null"}]},Fr=(e,t,o,n)=>{const s=e._zod.def;B(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType},Jr=(e,t,o,n)=>{const s=e._zod.def;B(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType,o.default=JSON.parse(JSON.stringify(s.defaultValue))},Vr=(e,t,o,n)=>{const s=e._zod.def;B(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType,t.io==="input"&&(o._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},Br=(e,t,o,n)=>{const s=e._zod.def;B(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType;let a;try{a=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}o.default=a},Wr=(e,t,o,n)=>{const s=e._zod.def,r=s.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?r?s.out:s.in:s.out;B(a,t,n);const c=t.seen.get(e);c.ref=a},Gr=(e,t,o,n)=>{const s=e._zod.def;B(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType,o.readOnly=!0},rm=(e,t,o,n)=>{const s=e._zod.def;B(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType},Rs=(e,t,o,n)=>{const s=e._zod.def;B(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType},Kr=(e,t,o,n)=>{const s=e._zod.innerType;B(s,t,n);const r=t.seen.get(e);r.ref=s},$i={string:Cr,number:Er,boolean:kr,bigint:Wd,symbol:Gd,null:$r,undefined:qr,void:Kd,never:Ir,any:xr,unknown:Nr,date:Yd,enum:zr,literal:Or,nan:Qd,template_literal:Xd,file:em,success:tm,custom:Mr,function:om,transform:Lr,map:nm,set:sm,array:Ar,object:jr,union:Ur,intersection:Zr,tuple:im,record:Dr,nullable:Hr,nonoptional:Fr,default:Jr,prefault:Vr,catch:Br,pipe:Wr,readonly:Gr,promise:rm,optional:Rs,lazy:Kr};function Yr(e,t){if("_idmap"in e){const n=e,s=gn({...t,processors:$i}),r={};for(const u of n._idmap.entries()){const[d,h]=u;B(h,s)}const a={},c={registry:n,uri:t?.uri,defs:r};s.external=c;for(const u of n._idmap.entries()){const[d,h]=u;_n(s,h),a[d]=bn(s,h)}if(Object.keys(r).length>0){const u=s.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:r}}return{schemas:a}}const o=gn({...t,processors:$i});return B(e,o),_n(o,e),bn(o,e)}const am=S("ZodISODateTime",(e,t)=>{up.init(e,t),K.init(e,t)});function Uo(e){return _d(am,e)}const cm=S("ZodISODate",(e,t)=>{pp.init(e,t),K.init(e,t)});function Qr(e){return bd(cm,e)}const lm=S("ZodISOTime",(e,t)=>{dp.init(e,t),K.init(e,t)});function um(e){return vd(lm,e)}const pm=S("ZodISODuration",(e,t)=>{mp.init(e,t),K.init(e,t)});function dm(e){return yd(pm,e)}const mm=(e,t)=>{rr.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:o=>eu(e,o)},flatten:{value:o=>Xl(e,o)},addIssue:{value:o=>{e.issues.push(o),e.message=JSON.stringify(e.issues,os,2)}},addIssues:{value:o=>{e.issues.push(...o),e.message=JSON.stringify(e.issues,os,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ce=S("ZodError",mm,{Parent:Error}),hm=bs(Ce),fm=vs(Ce),Xr=En(Ce),Sm=kn(Ce),gm=nu(Ce),_m=su(Ce),bm=iu(Ce),vm=ru(Ce),ym=au(Ce),Rm=cu(Ce),wm=lu(Ce),Tm=uu(Ce),qi=new WeakMap;function Zo(e,t,o){const n=Object.getPrototypeOf(e);let s=qi.get(n);if(s||(s=new Set,qi.set(n,s)),!s.has(t)){s.add(t);for(const r in o){const a=o[r];Object.defineProperty(n,r,{configurable:!0,enumerable:!1,get(){const c=a.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}const V=S("ZodType",(e,t)=>(J.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:vn(e,"input"),output:vn(e,"output")}}),e.toJSONSchema=Vd(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(o,n)=>hm(e,o,n,{callee:e.parse}),e.safeParse=(o,n)=>Xr(e,o,n),e.parseAsync=async(o,n)=>fm(e,o,n,{callee:e.parseAsync}),e.safeParseAsync=async(o,n)=>Sm(e,o,n),e.spa=e.safeParseAsync,e.encode=(o,n)=>gm(e,o,n),e.decode=(o,n)=>_m(e,o,n),e.encodeAsync=async(o,n)=>bm(e,o,n),e.decodeAsync=async(o,n)=>vm(e,o,n),e.safeEncode=(o,n)=>ym(e,o,n),e.safeDecode=(o,n)=>Rm(e,o,n),e.safeEncodeAsync=async(o,n)=>wm(e,o,n),e.safeDecodeAsync=async(o,n)=>Tm(e,o,n),Zo(e,"ZodType",{check(...o){const n=this.def;return this.clone(Ae(n,{checks:[...n.checks??[],...o.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...o){return this.check(...o)},clone(o,n){return je(this,o,n)},brand(){return this},register(o,n){return o.add(this,n),this},refine(o,n){return this.check(fh(o,n))},superRefine(o,n){return this.check(Sh(o,n))},overwrite(o){return this.check(Pt(o))},optional(){return k(this)},exactOptional(){return th(this)},nullable(){return zi(this)},nullish(){return k(zi(this))},nonoptional(o){return ah(this,o)},array(){return m(this)},or(o){return w([this,o])},and(o){return Xe(this,o)},transform(o){return Oi(this,ra(o))},default(o){return sh(this,o)},prefault(o){return rh(this,o)},catch(o){return lh(this,o)},pipe(o){return Oi(this,o)},readonly(){return dh(this)},describe(o){const n=this.clone();return ko.add(n,{description:o}),n},meta(...o){if(o.length===0)return ko.get(this);const n=this.clone();return ko.add(n,o[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(o){return o(this)}}),Object.defineProperty(e,"description",{get(){return ko.get(e)?.description},configurable:!0}),e)),ea=S("_ZodString",(e,t)=>{ys.init(e,t),V.init(e,t),e._zod.processJSONSchema=(n,s,r)=>Cr(e,n,s);const o=e._zod.bag;e.format=o.format??null,e.minLength=o.minimum??null,e.maxLength=o.maximum??null,Zo(e,"_ZodString",{regex(...n){return this.check(Id(...n))},includes(...n){return this.check(zd(...n))},startsWith(...n){return this.check(Od(...n))},endsWith(...n){return this.check(Md(...n))},min(...n){return this.check(Sn(...n))},max(...n){return this.check(Tr(...n))},length(...n){return this.check(Pr(...n))},nonempty(...n){return this.check(Sn(1,...n))},lowercase(n){return this.check(xd(n))},uppercase(n){return this.check(Nd(n))},trim(){return this.check(Ad())},normalize(...n){return this.check(Ld(...n))},toLowerCase(){return this.check(jd())},toUpperCase(){return this.check(Ud())},slugify(){return this.check(Zd())}})}),Pm=S("ZodString",(e,t)=>{ys.init(e,t),ea.init(e,t),e.email=o=>e.check(Rr(ta,o)),e.url=o=>e.check(wr(oa,o)),e.jwt=o=>e.check(gd(Zm,o)),e.emoji=o=>e.check(nd(Em,o)),e.guid=o=>e.check(Pi(Ii,o)),e.uuid=o=>e.check(Xp(ln,o)),e.uuidv4=o=>e.check(ed(ln,o)),e.uuidv6=o=>e.check(td(ln,o)),e.uuidv7=o=>e.check(od(ln,o)),e.nanoid=o=>e.check(sd(km,o)),e.guid=o=>e.check(Pi(Ii,o)),e.cuid=o=>e.check(id($m,o)),e.cuid2=o=>e.check(rd(qm,o)),e.ulid=o=>e.check(ad(Im,o)),e.base64=o=>e.check(hd(Am,o)),e.base64url=o=>e.check(fd(jm,o)),e.xid=o=>e.check(cd(xm,o)),e.ksuid=o=>e.check(ld(Nm,o)),e.ipv4=o=>e.check(ud(zm,o)),e.ipv6=o=>e.check(pd(Om,o)),e.cidrv4=o=>e.check(dd(Mm,o)),e.cidrv6=o=>e.check(md(Lm,o)),e.e164=o=>e.check(Sd(Um,o)),e.datetime=o=>e.check(Uo(o)),e.date=o=>e.check(Qr(o)),e.time=o=>e.check(um(o)),e.duration=o=>e.check(dm(o))});function i(e){return Qp(Pm,e)}const K=S("ZodStringFormat",(e,t)=>{W.init(e,t),ea.init(e,t)}),ta=S("ZodEmail",(e,t)=>{tp.init(e,t),K.init(e,t)});function Cm(e){return Rr(ta,e)}const Ii=S("ZodGUID",(e,t)=>{Xu.init(e,t),K.init(e,t)}),ln=S("ZodUUID",(e,t)=>{ep.init(e,t),K.init(e,t)}),oa=S("ZodURL",(e,t)=>{op.init(e,t),K.init(e,t)});function na(e){return wr(oa,e)}const Em=S("ZodEmoji",(e,t)=>{np.init(e,t),K.init(e,t)}),km=S("ZodNanoID",(e,t)=>{sp.init(e,t),K.init(e,t)}),$m=S("ZodCUID",(e,t)=>{ip.init(e,t),K.init(e,t)}),qm=S("ZodCUID2",(e,t)=>{rp.init(e,t),K.init(e,t)}),Im=S("ZodULID",(e,t)=>{ap.init(e,t),K.init(e,t)}),xm=S("ZodXID",(e,t)=>{cp.init(e,t),K.init(e,t)}),Nm=S("ZodKSUID",(e,t)=>{lp.init(e,t),K.init(e,t)}),zm=S("ZodIPv4",(e,t)=>{hp.init(e,t),K.init(e,t)}),Om=S("ZodIPv6",(e,t)=>{fp.init(e,t),K.init(e,t)}),Mm=S("ZodCIDRv4",(e,t)=>{Sp.init(e,t),K.init(e,t)}),Lm=S("ZodCIDRv6",(e,t)=>{gp.init(e,t),K.init(e,t)}),Am=S("ZodBase64",(e,t)=>{_p.init(e,t),K.init(e,t)}),jm=S("ZodBase64URL",(e,t)=>{vp.init(e,t),K.init(e,t)}),Um=S("ZodE164",(e,t)=>{yp.init(e,t),K.init(e,t)}),Zm=S("ZodJWT",(e,t)=>{wp.init(e,t),K.init(e,t)}),ws=S("ZodNumber",(e,t)=>{Sr.init(e,t),V.init(e,t),e._zod.processJSONSchema=(n,s,r)=>Er(e,n,s),Zo(e,"ZodNumber",{gt(n,s){return this.check(Ei(n,s))},gte(n,s){return this.check(Wn(n,s))},min(n,s){return this.check(Wn(n,s))},lt(n,s){return this.check(Ci(n,s))},lte(n,s){return this.check(Bn(n,s))},max(n,s){return this.check(Bn(n,s))},int(n){return this.check(xi(n))},safe(n){return this.check(xi(n))},positive(n){return this.check(Ei(0,n))},nonnegative(n){return this.check(Wn(0,n))},negative(n){return this.check(Ci(0,n))},nonpositive(n){return this.check(Bn(0,n))},multipleOf(n,s){return this.check(ki(n,s))},step(n,s){return this.check(ki(n,s))},finite(){return this}});const o=e._zod.bag;e.minValue=Math.max(o.minimum??Number.NEGATIVE_INFINITY,o.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(o.maximum??Number.POSITIVE_INFINITY,o.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(o.format??"").includes("int")||Number.isSafeInteger(o.multipleOf??.5),e.isFinite=!0,e.format=o.format??null});function _(e){return Rd(ws,e)}const Dm=S("ZodNumberFormat",(e,t)=>{Tp.init(e,t),ws.init(e,t)});function xi(e){return Td(Dm,e)}const Hm=S("ZodBoolean",(e,t)=>{Pp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>kr(e,o,n)});function T(e){return Pd(Hm,e)}const Fm=S("ZodUndefined",(e,t)=>{Cp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>qr(e,o)});function ss(e){return Cd(Fm,e)}const Jm=S("ZodNull",(e,t)=>{Ep.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>$r(e,o,n)});function zo(e){return Ed(Jm,e)}const Vm=S("ZodAny",(e,t)=>{kp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>xr()});function Ts(){return kd(Vm)}const Bm=S("ZodUnknown",(e,t)=>{$p.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Nr()});function C(){return $d(Bm)}const Wm=S("ZodNever",(e,t)=>{qp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Ir(e,o,n)});function is(e){return qd(Wm,e)}const Gm=S("ZodArray",(e,t)=>{Ip.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Ar(e,o,n,s),e.element=t.element,Zo(e,"ZodArray",{min(o,n){return this.check(Sn(o,n))},nonempty(o){return this.check(Sn(1,o))},max(o,n){return this.check(Tr(o,n))},length(o,n){return this.check(Pr(o,n))},unwrap(){return this.element}})});function m(e,t){return Dd(Gm,e,t)}const sa=S("ZodObject",(e,t)=>{Np.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>jr(e,o,n,s),D(e,"shape",()=>t.shape),Zo(e,"ZodObject",{keyof(){return O(Object.keys(this._zod.def.shape))},catchall(o){return this.clone({...this._zod.def,catchall:o})},passthrough(){return this.clone({...this._zod.def,catchall:C()})},loose(){return this.clone({...this._zod.def,catchall:C()})},strict(){return this.clone({...this._zod.def,catchall:is()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(o){return Bl(this,o)},safeExtend(o){return Wl(this,o)},merge(o){return Gl(this,o)},pick(o){return Jl(this,o)},omit(o){return Vl(this,o)},partial(...o){return Kl(aa,this,o[0])},required(...o){return Yl(ca,this,o[0])}})});function l(e,t){const o={type:"object",shape:e??{},...E(t)};return new sa(o)}function I(e,t){return new sa({type:"object",shape:e,catchall:C(),...E(t)})}const ia=S("ZodUnion",(e,t)=>{br.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Ur(e,o,n,s),e.options=t.options});function w(e,t){return new ia({type:"union",options:e,...E(t)})}const Km=S("ZodDiscriminatedUnion",(e,t)=>{ia.init(e,t),zp.init(e,t)});function yn(e,t,o){return new Km({type:"union",options:t,discriminator:e,...E(o)})}const Ym=S("ZodIntersection",(e,t)=>{Op.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Zr(e,o,n,s)});function Xe(e,t){return new Ym({type:"intersection",left:e,right:t})}const Ni=S("ZodRecord",(e,t)=>{Mp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Dr(e,o,n,s),e.keyType=t.keyType,e.valueType=t.valueType});function y(e,t,o){return!t||!t._zod?new Ni({type:"record",keyType:i(),valueType:e,...E(t)}):new Ni({type:"record",keyType:e,valueType:t,...E(o)})}const rs=S("ZodEnum",(e,t)=>{Lp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(n,s,r)=>zr(e,n,s),e.enum=t.entries,e.options=Object.values(t.entries);const o=new Set(Object.keys(t.entries));e.extract=(n,s)=>{const r={};for(const a of n)if(o.has(a))r[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new rs({...t,checks:[],...E(s),entries:r})},e.exclude=(n,s)=>{const r={...t.entries};for(const a of n)if(o.has(a))delete r[a];else throw new Error(`Key ${a} not found in enum`);return new rs({...t,checks:[],...E(s),entries:r})}});function O(e,t){const o=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new rs({type:"enum",entries:o,...E(t)})}const Qm=S("ZodLiteral",(e,t)=>{Ap.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Or(e,o,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function p(e,t){return new Qm({type:"literal",values:Array.isArray(e)?e:[e],...E(t)})}const Xm=S("ZodTransform",(e,t)=>{jp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Lr(e,o),e._zod.parse=(o,n)=>{if(n.direction==="backward")throw new tr(e.constructor.name);o.addIssue=r=>{if(typeof r=="string")o.issues.push(No(r,o.value,t));else{const a=r;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=o.value),a.inst??(a.inst=e),o.issues.push(No(a))}};const s=t.transform(o.value,o);return s instanceof Promise?s.then(r=>(o.value=r,o.fallback=!0,o)):(o.value=s,o.fallback=!0,o)}});function ra(e){return new Xm({type:"transform",transform:e})}const aa=S("ZodOptional",(e,t)=>{vr.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Rs(e,o,n,s),e.unwrap=()=>e._zod.def.innerType});function k(e){return new aa({type:"optional",innerType:e})}const eh=S("ZodExactOptional",(e,t)=>{Up.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Rs(e,o,n,s),e.unwrap=()=>e._zod.def.innerType});function th(e){return new eh({type:"optional",innerType:e})}const oh=S("ZodNullable",(e,t)=>{Zp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Hr(e,o,n,s),e.unwrap=()=>e._zod.def.innerType});function zi(e){return new oh({type:"nullable",innerType:e})}const nh=S("ZodDefault",(e,t)=>{Dp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Jr(e,o,n,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sh(e,t){return new nh({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():sr(t)}})}const ih=S("ZodPrefault",(e,t)=>{Hp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Vr(e,o,n,s),e.unwrap=()=>e._zod.def.innerType});function rh(e,t){return new ih({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():sr(t)}})}const ca=S("ZodNonOptional",(e,t)=>{Fp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Fr(e,o,n,s),e.unwrap=()=>e._zod.def.innerType});function ah(e,t){return new ca({type:"nonoptional",innerType:e,...E(t)})}const ch=S("ZodCatch",(e,t)=>{Jp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Br(e,o,n,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function lh(e,t){return new ch({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const la=S("ZodPipe",(e,t)=>{yr.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Wr(e,o,n,s),e.in=t.in,e.out=t.out});function Oi(e,t){return new la({type:"pipe",in:e,out:t})}const uh=S("ZodPreprocess",(e,t)=>{la.init(e,t),Vp.init(e,t)}),ph=S("ZodReadonly",(e,t)=>{Bp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Gr(e,o,n,s),e.unwrap=()=>e._zod.def.innerType});function dh(e){return new ph({type:"readonly",innerType:e})}const mh=S("ZodLazy",(e,t)=>{Wp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Kr(e,o,n,s),e.unwrap=()=>e._zod.def.getter()});function Ps(e){return new mh({type:"lazy",getter:e})}const hh=S("ZodCustom",(e,t)=>{Gp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Mr(e,o)});function fh(e,t={}){return Hd(hh,e,t)}function Sh(e,t){return Fd(e,t)}function Oo(e,t){return new uh({type:"pipe",in:ra(e),out:t})}const gh={custom:"custom"};function _h(e){return wd(ws,e)}const bh="2025-11-25",vh=[bh,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],yh="io.modelcontextprotocol/related-task",qn="io.modelcontextprotocol/protocolVersion",Cs="io.modelcontextprotocol/clientInfo",$o="io.modelcontextprotocol/serverInfo",In="io.modelcontextprotocol/clientCapabilities",Rh="io.modelcontextprotocol/subscriptionId",Es="io.modelcontextprotocol/logLevel",xn="2.0",Tt=Ps(()=>w([i(),_(),T(),zo(),y(i(),Tt),m(Tt)])),X=y(i(),Tt),wh=m(Tt),ks=w([i(),_().int()]),$s=i(),ua=l({ttl:_().optional()}),pa=l({taskId:i()}),qs=I({progressToken:ks.optional(),[yh]:pa.optional()}),de=l({_meta:qs.optional()}),Do=de.extend({task:ua.optional()}),ee=l({method:i(),params:de.loose().optional()}),be=l({_meta:qs.optional()}),ve=l({method:i(),params:be.loose().optional()}),Is=I({get[$o](){return Et.optional().catch(void 0)}}),te=I({_meta:Is.optional()}),nt=w([i(),_().int()]),xs=l({jsonrpc:p(xn),id:nt,...ee.shape}).strict(),Ns=l({jsonrpc:p(xn),...ve.shape}).strict(),Nn=l({jsonrpc:p(xn),id:nt,result:te}).strict(),zn=l({jsonrpc:p(xn),id:nt.optional(),error:l({code:_().int(),message:i(),data:C().optional()})}).strict(),da=w([xs,Ns,Nn,zn]),Th=w([Nn,zn]),On=te.strict(),ma=be.extend({requestId:nt.optional(),reason:i().optional()}),zs=ve.extend({method:p("notifications/cancelled"),params:ma}),ha=l({src:i(),mimeType:i().optional(),sizes:m(i()).optional(),theme:O(["light","dark"]).optional()}),Ct=l({icons:m(ha).optional()}),et=l({name:i(),title:i().optional()}),Et=et.extend({...et.shape,...Ct.shape,version:i(),websiteUrl:i().optional(),description:i().optional()}),Ph=Xe(l({applyDefaults:T().optional()}),X),Ch=Oo(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Xe(l({form:Ph.optional(),url:X.optional()}),X.optional())),fa=I({list:X.optional(),cancel:X.optional(),requests:I({sampling:I({createMessage:X.optional()}).optional(),elicitation:I({create:X.optional()}).optional()}).optional()}),Sa=I({list:X.optional(),cancel:X.optional(),requests:I({tools:I({call:X.optional()}).optional()}).optional()}),ga=l({experimental:y(i(),X).optional(),sampling:l({context:X.optional(),tools:X.optional()}).optional(),elicitation:Ch.optional(),roots:l({listChanged:T().optional()}).optional(),tasks:fa.optional(),extensions:y(i(),X).optional()}),_a=de.extend({protocolVersion:i(),capabilities:ga,clientInfo:Et}),ba=ee.extend({method:p("initialize"),params:_a}),Os=l({experimental:y(i(),X).optional(),logging:X.optional(),completions:X.optional(),prompts:l({listChanged:T().optional()}).optional(),resources:l({subscribe:T().optional(),listChanged:T().optional()}).optional(),tools:l({listChanged:T().optional()}).optional(),tasks:Sa.optional(),extensions:y(i(),X).optional()}),va=te.extend({protocolVersion:i(),capabilities:Os,serverInfo:Et,instructions:i().optional()}),ya=ve.extend({method:p("notifications/initialized"),params:be.optional()}),Ra=ee.extend({method:p("server/discover"),params:de.optional()}),wa=te.extend({supportedVersions:m(i()),capabilities:Os,instructions:i().optional()}),Ms=ee.extend({method:p("ping"),params:de.optional()}),Ta=l({progress:_(),total:k(_()),message:k(i())}),Pa=l({...be.shape,...Ta.shape,progressToken:ks}),Ls=ve.extend({method:p("notifications/progress"),params:Pa}),Ca=de.extend({cursor:$s.optional()}),kt=ee.extend({params:Ca.optional()}),$t=te.extend({nextCursor:$s.optional()}),As=l({uri:i(),mimeType:k(i()),_meta:y(i(),C()).optional()}),js=As.extend({text:i()}),Us=i().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Zs=As.extend({blob:Us}),qt=O(["user","assistant"]),st=l({audience:m(qt).optional(),priority:_().min(0).max(1).optional(),lastModified:Uo({offset:!0}).optional()}),Ds=l({...et.shape,...Ct.shape,uri:i(),description:k(i()),mimeType:k(i()),size:k(_()),annotations:st.optional(),_meta:k(I({}))}),Ea=l({...et.shape,...Ct.shape,uriTemplate:i(),description:k(i()),mimeType:k(i()),annotations:st.optional(),_meta:k(I({}))}),ka=kt.extend({method:p("resources/list")}),$a=$t.extend({resources:m(Ds)}),qa=kt.extend({method:p("resources/templates/list")}),Ia=$t.extend({resourceTemplates:m(Ea)}),Mn=de.extend({uri:i()}),xa=Mn,Na=ee.extend({method:p("resources/read"),params:xa}),za=te.extend({contents:m(w([js,Zs]))}),Oa=ve.extend({method:p("notifications/resources/list_changed"),params:be.optional()}),Ma=Mn,La=ee.extend({method:p("resources/subscribe"),params:Ma}),Aa=Mn,ja=ee.extend({method:p("resources/unsubscribe"),params:Aa}),Hs=l({toolsListChanged:T().optional(),promptsListChanged:T().optional(),resourcesListChanged:T().optional(),resourceSubscriptions:m(i()).optional()}),Ua=de.extend({notifications:Hs}),Za=ee.extend({method:p("subscriptions/listen"),params:Ua}),Da=be.extend({notifications:Hs}),Ha=ve.extend({method:p("notifications/subscriptions/acknowledged"),params:Da}),Fa=Is.extend({[Rh]:nt}),Ja=te.extend({_meta:Fa}),Va=be.extend({uri:i()}),Ba=ve.extend({method:p("notifications/resources/updated"),params:Va}),Wa=l({name:i(),description:k(i()),required:k(T())}),Ga=l({...et.shape,...Ct.shape,description:k(i()),arguments:k(m(Wa)),_meta:k(I({}))}),Ka=kt.extend({method:p("prompts/list")}),Ya=$t.extend({prompts:m(Ga)}),Qa=de.extend({name:i(),arguments:y(i(),i()).optional()}),Xa=ee.extend({method:p("prompts/get"),params:Qa}),Ln=l({type:p("text"),text:i(),annotations:st.optional(),_meta:y(i(),C()).optional()}),An=l({type:p("image"),data:Us,mimeType:i(),annotations:st.optional(),_meta:y(i(),C()).optional()}),jn=l({type:p("audio"),data:Us,mimeType:i(),annotations:st.optional(),_meta:y(i(),C()).optional()}),ec=l({type:p("tool_use"),name:i(),id:i(),input:y(i(),C()),_meta:y(i(),C()).optional()}),Fs=l({type:p("resource"),resource:w([js,Zs]),annotations:st.optional(),_meta:y(i(),C()).optional()}),Js=Ds.extend({type:p("resource_link")}),It=w([Ln,An,jn,Js,Fs]),tc=l({role:qt,content:It}),oc=te.extend({description:i().optional(),messages:m(tc)}),nc=ve.extend({method:p("notifications/prompts/list_changed"),params:be.optional()}),sc=l({title:i().optional(),readOnlyHint:T().optional(),destructiveHint:T().optional(),idempotentHint:T().optional(),openWorldHint:T().optional()}),ic=l({taskSupport:O(["required","optional","forbidden"]).optional()}),Un=l({...et.shape,...Ct.shape,description:i().optional(),inputSchema:l({type:p("object"),properties:y(i(),Tt).optional(),required:m(i()).optional()}).catchall(C()),outputSchema:I({$schema:i().optional()}).optional(),annotations:sc.optional(),execution:ic.optional(),_meta:y(i(),C()).optional()}),rc=kt.extend({method:p("tools/list")}),ac=$t.extend({tools:m(Un)}),Zn=te.extend({content:m(It).default([]),structuredContent:C().optional(),isError:T().optional()}),Eh=Zn.or(te.extend({toolResult:C()})),cc=Do.extend({name:i(),arguments:y(i(),C()).optional()}),lc=ee.extend({method:p("tools/call"),params:cc}),uc=ve.extend({method:p("notifications/tools/list_changed"),params:be.optional()}),kh=l({autoRefresh:T().default(!0),debounceMs:_().int().nonnegative().default(300)}),Vs=O(["debug","info","notice","warning","error","critical","alert","emergency"]),pc=de.extend({level:Vs}),dc=ee.extend({method:p("logging/setLevel"),params:pc}),mc=be.extend({level:Vs,logger:i().optional(),data:C()}),hc=ve.extend({method:p("notifications/message"),params:mc}),fc=l({name:i().optional()}),Sc=l({hints:m(fc).optional(),costPriority:_().min(0).max(1).optional(),speedPriority:_().min(0).max(1).optional(),intelligencePriority:_().min(0).max(1).optional()}),gc=l({mode:O(["auto","required","none"]).optional()}),_c=l({type:p("tool_result"),toolUseId:i().describe("The unique identifier for the corresponding tool call."),content:m(It),structuredContent:C().optional(),isError:T().optional(),_meta:y(i(),C()).optional()}),bc=yn("type",[Ln,An,jn]),Mo=yn("type",[Ln,An,jn,ec,_c]),vc=l({role:qt,content:w([Mo,m(Mo)]),_meta:y(i(),C()).optional()}),yc=Do.extend({messages:m(vc),modelPreferences:Sc.optional(),systemPrompt:i().optional(),includeContext:O(["none","thisServer","allServers"]).optional(),temperature:_().optional(),maxTokens:_().int(),stopSequences:m(i()).optional(),metadata:X.optional(),tools:m(Un).optional(),toolChoice:gc.optional()}),Rc=ee.extend({method:p("sampling/createMessage"),params:yc}),wc=te.extend({model:i(),stopReason:k(O(["endTurn","stopSequence","maxTokens"]).or(i())),role:qt,content:bc}),Tc=te.extend({model:i(),stopReason:k(O(["endTurn","stopSequence","maxTokens","toolUse"]).or(i())),role:qt,content:w([Mo,m(Mo)])}),Bs=l({type:p("boolean"),title:i().optional(),description:i().optional(),default:T().optional()}),Dn=l({type:p("string"),title:i().optional(),description:i().optional(),minLength:_().optional(),maxLength:_().optional(),format:O(["email","uri","date","date-time"]).optional(),default:i().optional()}),Rn=l({type:O(["number","integer"]),title:i().optional(),description:i().optional(),minimum:_().optional(),maximum:_().optional(),default:_().optional()}),Ws=l({type:p("string"),title:i().optional(),description:i().optional(),enum:m(i()),default:i().optional()}),Gs=l({type:p("string"),title:i().optional(),description:i().optional(),oneOf:m(l({const:i(),title:i()})),default:i().optional()}),Ks=l({type:p("string"),title:i().optional(),description:i().optional(),enum:m(i()),enumNames:m(i()).optional(),default:i().optional()}),Pc=w([Ws,Gs]),Ys=l({type:p("array"),title:i().optional(),description:i().optional(),minItems:_().optional(),maxItems:_().optional(),items:l({type:p("string"),enum:m(i())}),default:m(i()).optional()}),Qs=l({type:p("array"),title:i().optional(),description:i().optional(),minItems:_().optional(),maxItems:_().optional(),items:l({anyOf:m(l({const:i(),title:i()}))}),default:m(i()).optional()}),Cc=w([Ys,Qs]),Ec=w([Ks,Pc,Cc]),Xs=w([Ec,Bs,Dn,Rn]),Hn=Do.extend({mode:p("form").optional(),message:i(),requestedSchema:l({type:p("object"),properties:y(i(),Xs),required:m(i()).optional()}).catchall(C())}),kc=Do.extend({mode:p("url"),message:i(),elicitationId:i(),url:i().url()}),$c=w([Hn,kc]),qc=ee.extend({method:p("elicitation/create"),params:$c}),Ic=be.extend({elicitationId:i()}),xc=ve.extend({method:p("notifications/elicitation/complete"),params:Ic}),Nc=te.extend({action:O(["accept","decline","cancel"]),content:Oo(e=>e===null?void 0:e,y(i(),w([i(),_(),T(),m(i())])).optional())}),zc=l({type:p("ref/resource"),uri:i()}),Oc=l({type:p("ref/prompt"),name:i()}),Mc=de.extend({ref:w([Oc,zc]),argument:l({name:i(),value:i()}),context:l({arguments:y(i(),i()).optional()}).optional()}),Lc=ee.extend({method:p("completion/complete"),params:Mc}),Ac=te.extend({completion:I({values:m(i()).max(100),total:k(_().int()),hasMore:k(T())})}),jc=l({uri:i().startsWith("file://"),name:i().optional(),_meta:y(i(),C()).optional()}),Uc=ee.extend({method:p("roots/list"),params:de.optional()}),Zc=te.extend({roots:m(jc)}),Dc=ve.extend({method:p("notifications/roots/list_changed"),params:be.optional()}),$h=I({ttl:_().optional(),pollInterval:_().optional()}),Hc=O(["working","input_required","completed","failed","cancelled"]),xt=l({taskId:i(),status:Hc,ttl:w([_(),zo()]),createdAt:i(),lastUpdatedAt:i(),pollInterval:k(_()),statusMessage:k(i())}),qh=te.extend({task:xt}),Fc=be.merge(xt),Ih=ve.extend({method:p("notifications/tasks/status"),params:Fc}),xh=ee.extend({method:p("tasks/get"),params:de.extend({taskId:i()})}),Nh=te.merge(xt),zh=ee.extend({method:p("tasks/result"),params:de.extend({taskId:i()})}),Oh=te.loose(),Mh=kt.extend({method:p("tasks/list")}),Lh=$t.extend({tasks:m(xt)}),Ah=ee.extend({method:p("tasks/cancel"),params:de.extend({taskId:i()})}),jh=te.merge(xt),Uh=w([Ms,ba,Ra,Lc,dc,Xa,Ka,ka,qa,Na,La,ja,Za,lc,rc]),Zh=w([zs,Ls,ya,Dc]),Dh=w([On,wc,Tc,Nc,Zc]),Hh=w([Ms,Rc,qc,Uc]),Fh=w([zs,Ls,hc,Ba,Oa,uc,nc,Ha,xc]),Jh=w([On,va,wa,Ac,oc,Ya,$a,Ia,za,Zn,ac,Ja]),ie=na().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:gh.custom,message:"URL must be parseable",fatal:!0}),Al}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Vh=I({resource:i().url(),authorization_servers:m(ie).optional(),jwks_uri:i().url().optional(),scopes_supported:m(i()).optional(),bearer_methods_supported:m(i()).optional(),resource_signing_alg_values_supported:m(i()).optional(),resource_name:i().optional(),resource_documentation:i().optional(),resource_policy_uri:i().url().optional(),resource_tos_uri:i().url().optional(),tls_client_certificate_bound_access_tokens:T().optional(),authorization_details_types_supported:m(i()).optional(),dpop_signing_alg_values_supported:m(i()).optional(),dpop_bound_access_tokens_required:T().optional()}),Jc=I({issuer:i(),authorization_endpoint:ie,token_endpoint:ie,registration_endpoint:ie.optional(),scopes_supported:m(i()).optional(),response_types_supported:m(i()),response_modes_supported:m(i()).optional(),grant_types_supported:m(i()).optional(),token_endpoint_auth_methods_supported:m(i()).optional(),token_endpoint_auth_signing_alg_values_supported:m(i()).optional(),service_documentation:ie.optional(),revocation_endpoint:ie.optional(),revocation_endpoint_auth_methods_supported:m(i()).optional(),revocation_endpoint_auth_signing_alg_values_supported:m(i()).optional(),introspection_endpoint:i().optional(),introspection_endpoint_auth_methods_supported:m(i()).optional(),introspection_endpoint_auth_signing_alg_values_supported:m(i()).optional(),code_challenge_methods_supported:m(i()).optional(),client_id_metadata_document_supported:T().optional(),authorization_response_iss_parameter_supported:T().optional().catch(void 0),dpop_signing_alg_values_supported:m(i()).optional()}),Vc=I({issuer:i(),authorization_endpoint:ie,token_endpoint:ie,userinfo_endpoint:ie.optional(),jwks_uri:ie,registration_endpoint:ie.optional(),scopes_supported:m(i()).optional(),response_types_supported:m(i()),response_modes_supported:m(i()).optional(),grant_types_supported:m(i()).optional(),acr_values_supported:m(i()).optional(),subject_types_supported:m(i()),id_token_signing_alg_values_supported:m(i()),id_token_encryption_alg_values_supported:m(i()).optional(),id_token_encryption_enc_values_supported:m(i()).optional(),userinfo_signing_alg_values_supported:m(i()).optional(),userinfo_encryption_alg_values_supported:m(i()).optional(),userinfo_encryption_enc_values_supported:m(i()).optional(),request_object_signing_alg_values_supported:m(i()).optional(),request_object_encryption_alg_values_supported:m(i()).optional(),request_object_encryption_enc_values_supported:m(i()).optional(),token_endpoint_auth_methods_supported:m(i()).optional(),token_endpoint_auth_signing_alg_values_supported:m(i()).optional(),display_values_supported:m(i()).optional(),claim_types_supported:m(i()).optional(),claims_supported:m(i()).optional(),service_documentation:i().optional(),claims_locales_supported:m(i()).optional(),ui_locales_supported:m(i()).optional(),claims_parameter_supported:T().optional(),request_parameter_supported:T().optional(),request_uri_parameter_supported:T().optional(),require_request_uri_registration:T().optional(),op_policy_uri:ie.optional(),op_tos_uri:ie.optional(),client_id_metadata_document_supported:T().optional(),authorization_response_iss_parameter_supported:T().optional().catch(void 0)}),Bh=l({...Vc.shape,...Jc.pick({code_challenge_methods_supported:!0}).shape}),Wh=l({access_token:i(),id_token:i().optional(),token_type:i(),expires_in:_h().optional(),scope:i().optional(),refresh_token:i().optional()}).strip(),Gh=l({issued_token_type:p("urn:ietf:params:oauth:token-type:id-jag"),access_token:i(),token_type:i().optional(),expires_in:_().optional(),scope:i().optional()}).strip(),Kh=l({error:i(),error_description:i().optional(),error_uri:i().optional()}),Mi=ie.optional().or(p("").transform(()=>{})),Bc=l({redirect_uris:m(ie),token_endpoint_auth_method:i().optional(),grant_types:m(i()).optional(),response_types:m(i()).optional(),application_type:i().optional(),client_name:i().optional(),client_uri:ie.optional(),logo_uri:Mi,scope:i().optional(),contacts:m(i()).optional(),tos_uri:Mi,policy_uri:i().optional(),jwks_uri:ie.optional(),jwks:Ts().optional(),software_id:i().optional(),software_version:i().optional(),software_statement:i().optional()}).strip(),Wc=l({client_id:i(),client_secret:i().optional(),client_id_issued_at:_().optional(),client_secret_expires_at:_().optional()}).strip(),Yh=Bc.merge(Wc),Qh=l({error:i(),error_description:i().optional()}).strip(),Xh=l({token:i(),token_type_hint:i().optional()}).strip(),as=Symbol.for("mcp.sdk.errorBrands");function Gc(e,t){const o=new Set;let n=t;for(;typeof n=="function";){const s=n.mcpBrand;Object.prototype.hasOwnProperty.call(n,"mcpBrand")&&typeof s=="string"&&o.add(s),n=Object.getPrototypeOf(n)}o.size!==0&&Object.defineProperty(e,as,{value:o,enumerable:!1,configurable:!0})}function wn(e,t){try{if(typeof t=="object"&&t!==null&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&typeof e.mcpBrand=="string"&&Object.prototype.hasOwnProperty.call(t,as)){const o=t[as];if(o&&typeof o.has=="function"&&o.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}let ue=(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})({});var oe=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return wn(this,e)}static isInstance(e){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return wn(this,e)}constructor(e,t,o,n){super(t,n),this.code=e,this.data=o,this.name="SdkError",Gc(this,new.target)}};const ef="2026-07-28";function tf(e){return e>=ef}function Kc(e){const t=e.structuredContent;return t===void 0||!(typeof t!="object"||t===null||Array.isArray(t))||(e.content?.some(o=>o.type==="text")??!1)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}const Yc=["task","inputRequests","requestState"];function of(e){return e===null||typeof e!="object"||Array.isArray(e)||e.content!==void 0||Yc.some(t=>t in e)?e:{...e,content:[]}}function nf(){const e=Ps(()=>w([i(),_(),T(),zo(),y(i(),e),m(e)])),t=y(i(),e),o=w([i(),_().int()]),n=i(),s=l({ttl:_().optional()}),r=l({taskId:i()}),a=I({progressToken:o.optional(),"io.modelcontextprotocol/related-task":r.optional()}),c=l({_meta:a.optional()}),u=c.extend({task:s.optional()}),d=l({method:i(),params:c.loose().optional()}),h=l({_meta:a.optional()}),g=l({method:i(),params:h.loose().optional()}),b=I({_meta:a.optional()}),f=w([i(),_().int()]),R=b.strict(),P=h.extend({requestId:f.optional(),reason:i().optional()}),v=g.extend({method:p("notifications/cancelled"),params:P}),A=l({src:i(),mimeType:i().optional(),sizes:m(i()).optional(),theme:O(["light","dark"]).optional()}),U=l({icons:m(A).optional()}),N=l({name:i(),title:i().optional()}),x=N.extend({...N.shape,...U.shape,version:i(),websiteUrl:i().optional(),description:i().optional()}),$=Xe(l({applyDefaults:T().optional()}),t),z=Oo(le=>le&&typeof le=="object"&&!Array.isArray(le)&&Object.keys(le).length===0?{form:{}}:le,Xe(l({form:$.optional(),url:t.optional()}),t.optional())),G=I({list:t.optional(),cancel:t.optional(),requests:I({sampling:I({createMessage:t.optional()}).optional(),elicitation:I({create:t.optional()}).optional()}).optional()}),ne=I({list:t.optional(),cancel:t.optional(),requests:I({tools:I({call:t.optional()}).optional()}).optional()}),se=l({experimental:y(i(),t).optional(),sampling:l({context:t.optional(),tools:t.optional()}).optional(),elicitation:z.optional(),roots:l({listChanged:T().optional()}).optional(),tasks:G.optional(),extensions:y(i(),t).optional()}),$e=c.extend({protocolVersion:i(),capabilities:se,clientInfo:x}),q=d.extend({method:p("initialize"),params:$e}),L=l({experimental:y(i(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:l({listChanged:T().optional()}).optional(),resources:l({subscribe:T().optional(),listChanged:T().optional()}).optional(),tools:l({listChanged:T().optional()}).optional(),tasks:ne.optional(),extensions:y(i(),t).optional()}),M=b.extend({protocolVersion:i(),capabilities:L,serverInfo:x,instructions:i().optional()}),F=g.extend({method:p("notifications/initialized"),params:h.optional()}),Z=d.extend({method:p("ping"),params:c.optional()}),H=l({progress:_(),total:k(_()),message:k(i())}),Y=l({...h.shape,...H.shape,progressToken:o}),he=g.extend({method:p("notifications/progress"),params:Y}),re=c.extend({cursor:n.optional()}),fe=d.extend({params:re.optional()}),Te=b.extend({nextCursor:n.optional()}),ae=l({uri:i(),mimeType:k(i()),_meta:y(i(),C()).optional()}),it=ae.extend({text:i()}),Ue=i().refine(le=>{try{return atob(le),!0}catch{return!1}},{message:"Invalid Base64 string"}),rt=ae.extend({blob:Ue}),qe=O(["user","assistant"]),Ee=l({audience:m(qe).optional(),priority:_().min(0).max(1).optional(),lastModified:Uo({offset:!0}).optional()}),Ze=l({...N.shape,...U.shape,uri:i(),description:k(i()),mimeType:k(i()),size:k(_()),annotations:Ee.optional(),_meta:k(I({}))}),Nt=l({...N.shape,...U.shape,uriTemplate:i(),description:k(i()),mimeType:k(i()),annotations:Ee.optional(),_meta:k(I({}))}),zt=fe.extend({method:p("resources/list")}),Ot=Te.extend({resources:m(Ze)}),ze=fe.extend({method:p("resources/templates/list")}),at=Te.extend({resourceTemplates:m(Nt)}),De=c.extend({uri:i()}),Mt=De,Lt=d.extend({method:p("resources/read"),params:Mt}),At=b.extend({contents:m(w([it,rt]))}),jt=g.extend({method:p("notifications/resources/list_changed"),params:h.optional()}),Ut=De,Zt=d.extend({method:p("resources/subscribe"),params:Ut}),Dt=De,Ht=d.extend({method:p("resources/unsubscribe"),params:Dt}),Ft=h.extend({uri:i()}),Jt=g.extend({method:p("notifications/resources/updated"),params:Ft}),Vt=l({name:i(),description:k(i()),required:k(T())}),Bt=l({...N.shape,...U.shape,description:k(i()),arguments:k(m(Vt)),_meta:k(I({}))}),Wt=fe.extend({method:p("prompts/list")}),Gt=Te.extend({prompts:m(Bt)}),Kt=c.extend({name:i(),arguments:y(i(),i()).optional()}),Yt=d.extend({method:p("prompts/get"),params:Kt}),He=l({type:p("text"),text:i(),annotations:Ee.optional(),_meta:y(i(),C()).optional()}),Fe=l({type:p("image"),data:Ue,mimeType:i(),annotations:Ee.optional(),_meta:y(i(),C()).optional()}),Je=l({type:p("audio"),data:Ue,mimeType:i(),annotations:Ee.optional(),_meta:y(i(),C()).optional()}),Qt=l({type:p("tool_use"),name:i(),id:i(),input:y(i(),C()),_meta:y(i(),C()).optional()}),Oe=l({type:p("resource"),resource:w([it,rt]),annotations:Ee.optional(),_meta:y(i(),C()).optional()}),Xt=Ze.extend({type:p("resource_link")}),Pe=w([He,Fe,Je,Xt,Oe]),ct=l({role:qe,content:Pe}),lt=b.extend({description:i().optional(),messages:m(ct)}),Ve=g.extend({method:p("notifications/prompts/list_changed"),params:h.optional()}),eo=l({title:i().optional(),readOnlyHint:T().optional(),destructiveHint:T().optional(),idempotentHint:T().optional(),openWorldHint:T().optional()}),ut=l({taskSupport:O(["required","optional","forbidden"]).optional()}),Be=l({...N.shape,...U.shape,description:i().optional(),inputSchema:l({type:p("object"),properties:y(i(),e).optional(),required:m(i()).optional()}).catchall(C()),outputSchema:l({type:p("object"),properties:y(i(),e).optional(),required:m(i()).optional()}).catchall(C()).optional(),annotations:eo.optional(),execution:ut.optional(),_meta:y(i(),C()).optional()}),pt=fe.extend({method:p("tools/list")}),dt=Te.extend({tools:m(Be)}),mt=b.extend({content:m(Pe),structuredContent:y(i(),C()).optional(),isError:T().optional()}),ce=u.extend({name:i(),arguments:y(i(),C()).optional()}),to=d.extend({method:p("tools/call"),params:ce}),Ho=g.extend({method:p("notifications/tools/list_changed"),params:h.optional()}),ht=O(["debug","info","notice","warning","error","critical","alert","emergency"]),oo=c.extend({level:ht}),no=d.extend({method:p("logging/setLevel"),params:oo}),so=h.extend({level:ht,logger:i().optional(),data:C()}),io=g.extend({method:p("notifications/message"),params:so}),ro=l({name:i().optional()}),ao=l({hints:m(ro).optional(),costPriority:_().min(0).max(1).optional(),speedPriority:_().min(0).max(1).optional(),intelligencePriority:_().min(0).max(1).optional()}),co=l({mode:O(["auto","required","none"]).optional()}),Fo=l({type:p("tool_result"),toolUseId:i().describe("The unique identifier for the corresponding tool call."),content:m(Pe),structuredContent:l({}).loose().optional(),isError:T().optional(),_meta:y(i(),C()).optional()}),lo=yn("type",[He,Fe,Je]),Me=yn("type",[He,Fe,Je,Qt,Fo]),uo=l({role:qe,content:w([Me,m(Me)]),_meta:y(i(),C()).optional()}),po=u.extend({messages:m(uo),modelPreferences:ao.optional(),systemPrompt:i().optional(),includeContext:O(["none","thisServer","allServers"]).optional(),temperature:_().optional(),maxTokens:_().int(),stopSequences:m(i()).optional(),metadata:t.optional(),tools:m(Be).optional(),toolChoice:co.optional()}),mo=d.extend({method:p("sampling/createMessage"),params:po}),ho=b.extend({model:i(),stopReason:k(O(["endTurn","stopSequence","maxTokens"]).or(i())),role:qe,content:lo}),fo=b.extend({model:i(),stopReason:k(O(["endTurn","stopSequence","maxTokens","toolUse"]).or(i())),role:qe,content:w([Me,m(Me)])}),So=l({type:p("boolean"),title:i().optional(),description:i().optional(),default:T().optional()}),go=l({type:p("string"),title:i().optional(),description:i().optional(),minLength:_().optional(),maxLength:_().optional(),format:O(["email","uri","date","date-time"]).optional(),default:i().optional()}),_o=l({type:O(["number","integer"]),title:i().optional(),description:i().optional(),minimum:_().optional(),maximum:_().optional(),default:_().optional()}),bo=l({type:p("string"),title:i().optional(),description:i().optional(),enum:m(i()),default:i().optional()}),vo=l({type:p("string"),title:i().optional(),description:i().optional(),oneOf:m(l({const:i(),title:i()})),default:i().optional()}),yo=l({type:p("string"),title:i().optional(),description:i().optional(),enum:m(i()),enumNames:m(i()).optional(),default:i().optional()}),Ro=w([bo,vo]),We=l({type:p("array"),title:i().optional(),description:i().optional(),minItems:_().optional(),maxItems:_().optional(),items:l({type:p("string"),enum:m(i())}),default:m(i()).optional()}),Ge=l({type:p("array"),title:i().optional(),description:i().optional(),minItems:_().optional(),maxItems:_().optional(),items:l({anyOf:m(l({const:i(),title:i()}))}),default:m(i()).optional()}),Jo=w([We,Ge]),Vo=w([yo,Ro,Jo]),ye=w([Vo,So,go,_o]),Re=u.extend({mode:p("form").optional(),message:i(),requestedSchema:l({type:p("object"),properties:y(i(),ye),required:m(i()).optional()}).catchall(C())}),wo=u.extend({mode:p("url"),message:i(),elicitationId:i(),url:i().url()}),ke=w([Re,wo]),Bo=d.extend({method:p("elicitation/create"),params:ke}),Wo=h.extend({elicitationId:i()}),Go=g.extend({method:p("notifications/elicitation/complete"),params:Wo}),Ko=b.extend({action:O(["accept","decline","cancel"]),content:Oo(le=>le===null?void 0:le,y(i(),w([i(),_(),T(),m(i())])).optional())}),Yo=l({type:p("ref/resource"),uri:i()}),Qo=l({type:p("ref/prompt"),name:i()}),Xo=c.extend({ref:w([Qo,Yo]),argument:l({name:i(),value:i()}),context:l({arguments:y(i(),i()).optional()}).optional()}),To=d.extend({method:p("completion/complete"),params:Xo}),en=b.extend({completion:I({values:m(i()).max(100),total:k(_().int()),hasMore:k(T())})}),tn=l({uri:i().startsWith("file://"),name:i().optional(),_meta:y(i(),C()).optional()}),ft=d.extend({method:p("roots/list"),params:c.optional()}),Po=b.extend({roots:m(tn)}),on=g.extend({method:p("notifications/roots/list_changed"),params:h.optional()}),nn=I({ttl:_().optional(),pollInterval:_().optional()}),sn=O(["working","input_required","completed","failed","cancelled"]),Le=l({taskId:i(),status:sn,ttl:w([_(),zo()]),createdAt:i(),lastUpdatedAt:i(),pollInterval:k(_()),statusMessage:k(i())}),Se=b.extend({task:Le}),rn=h.merge(Le),Ke=g.extend({method:p("notifications/tasks/status"),params:rn}),St=d.extend({method:p("tasks/get"),params:c.extend({taskId:i()})}),gt=b.merge(Le),_t=d.extend({method:p("tasks/result"),params:c.extend({taskId:i()})}),Fn=b.loose(),ge=fe.extend({method:p("tasks/list")}),Q=Te.extend({tasks:m(Le)}),Ye=d.extend({method:p("tasks/cancel"),params:c.extend({taskId:i()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:o,CursorSchema:n,TaskMetadataSchema:s,RelatedTaskMetadataSchema:r,RequestMetaSchema:a,BaseRequestParamsSchema:c,TaskAugmentedRequestParamsSchema:u,RequestSchema:d,NotificationsParamsSchema:h,NotificationSchema:g,ResultSchema:b,RequestIdSchema:f,EmptyResultSchema:R,CancelledNotificationParamsSchema:P,CancelledNotificationSchema:v,IconSchema:A,IconsSchema:U,BaseMetadataSchema:N,ImplementationSchema:x,ClientTasksCapabilitySchema:G,ServerTasksCapabilitySchema:ne,ClientCapabilitiesSchema:se,InitializeRequestParamsSchema:$e,InitializeRequestSchema:q,ServerCapabilitiesSchema:L,InitializeResultSchema:M,InitializedNotificationSchema:F,PingRequestSchema:Z,ProgressSchema:H,ProgressNotificationParamsSchema:Y,ProgressNotificationSchema:he,PaginatedRequestParamsSchema:re,PaginatedRequestSchema:fe,PaginatedResultSchema:Te,ResourceContentsSchema:ae,TextResourceContentsSchema:it,BlobResourceContentsSchema:rt,RoleSchema:qe,AnnotationsSchema:Ee,ResourceSchema:Ze,ResourceTemplateSchema:Nt,ListResourcesRequestSchema:zt,ListResourcesResultSchema:Ot,ListResourceTemplatesRequestSchema:ze,ListResourceTemplatesResultSchema:at,ResourceRequestParamsSchema:De,ReadResourceRequestParamsSchema:Mt,ReadResourceRequestSchema:Lt,ReadResourceResultSchema:At,ResourceListChangedNotificationSchema:jt,SubscribeRequestParamsSchema:Ut,SubscribeRequestSchema:Zt,UnsubscribeRequestParamsSchema:Dt,UnsubscribeRequestSchema:Ht,ResourceUpdatedNotificationParamsSchema:Ft,ResourceUpdatedNotificationSchema:Jt,PromptArgumentSchema:Vt,PromptSchema:Bt,ListPromptsRequestSchema:Wt,ListPromptsResultSchema:Gt,GetPromptRequestParamsSchema:Kt,GetPromptRequestSchema:Yt,TextContentSchema:He,ImageContentSchema:Fe,AudioContentSchema:Je,ToolUseContentSchema:Qt,EmbeddedResourceSchema:Oe,ResourceLinkSchema:Xt,ContentBlockSchema:Pe,PromptMessageSchema:ct,GetPromptResultSchema:lt,PromptListChangedNotificationSchema:Ve,ToolAnnotationsSchema:eo,ToolExecutionSchema:ut,ToolSchema:Be,ListToolsRequestSchema:pt,ListToolsResultSchema:dt,CallToolResultSchema:mt,CallToolRequestParamsSchema:ce,CallToolRequestSchema:to,ToolListChangedNotificationSchema:Ho,LoggingLevelSchema:ht,SetLevelRequestParamsSchema:oo,SetLevelRequestSchema:no,LoggingMessageNotificationParamsSchema:so,LoggingMessageNotificationSchema:io,ModelHintSchema:ro,ModelPreferencesSchema:ao,ToolChoiceSchema:co,ToolResultContentSchema:Fo,SamplingContentSchema:lo,SamplingMessageContentBlockSchema:Me,SamplingMessageSchema:uo,CreateMessageRequestParamsSchema:po,CreateMessageRequestSchema:mo,CreateMessageResultSchema:ho,CreateMessageResultWithToolsSchema:fo,BooleanSchemaSchema:So,StringSchemaSchema:go,NumberSchemaSchema:_o,UntitledSingleSelectEnumSchemaSchema:bo,TitledSingleSelectEnumSchemaSchema:vo,LegacyTitledEnumSchemaSchema:yo,SingleSelectEnumSchemaSchema:Ro,UntitledMultiSelectEnumSchemaSchema:We,TitledMultiSelectEnumSchemaSchema:Ge,MultiSelectEnumSchemaSchema:Jo,EnumSchemaSchema:Vo,PrimitiveSchemaDefinitionSchema:ye,ElicitRequestFormParamsSchema:Re,ElicitRequestURLParamsSchema:wo,ElicitRequestParamsSchema:ke,ElicitRequestSchema:Bo,ElicitationCompleteNotificationParamsSchema:Wo,ElicitationCompleteNotificationSchema:Go,ElicitResultSchema:Ko,ResourceTemplateReferenceSchema:Yo,PromptReferenceSchema:Qo,CompleteRequestParamsSchema:Xo,CompleteRequestSchema:To,CompleteResultSchema:en,RootSchema:tn,ListRootsRequestSchema:ft,ListRootsResultSchema:Po,RootsListChangedNotificationSchema:on,TaskCreationParamsSchema:nn,TaskStatusSchema:sn,TaskSchema:Le,CreateTaskResultSchema:Se,TaskStatusNotificationParamsSchema:rn,TaskStatusNotificationSchema:Ke,GetTaskRequestSchema:St,GetTaskResultSchema:gt,GetTaskPayloadRequestSchema:_t,GetTaskPayloadResultSchema:Fn,ListTasksRequestSchema:ge,ListTasksResultSchema:Q,CancelTaskRequestSchema:Ye,CancelTaskResultSchema:b.merge(Le),ClientRequestSchema:w([Z,q,To,no,Yt,Wt,zt,ze,Lt,Zt,Ht,to,pt,St,_t,ge,Ye]),ClientNotificationSchema:w([v,he,F,on,Ke]),ClientResultSchema:w([R,ho,fo,Ko,Po,gt,Q,Se]),ServerRequestSchema:w([Z,mo,Bo,ft,St,_t,ge,Ye]),ServerNotificationSchema:w([v,he,io,Jt,jt,Ho,Ve,Ke,Go]),ServerResultSchema:w([R,M,en,lt,Gt,Ot,at,At,mt,dt,gt,Q,Se]),CallToolResultWireSchema:C().superRefine((le,Rl)=>{if(!(typeof le!="object"||le===null||Array.isArray(le)||le.content!==void 0)){for(const ci of Yc)if(ci in le){Rl.addIssue({code:"custom",message:`content is required when the body carries '${ci}' — another result family cannot default into an empty tools/call success`});return}}}).transform(of).pipe(mt)}}let sf;function Qc(){return sf??=nf()}function Xc(e){return e.type!=="object"}const rf=new Set(["const","enum","default","examples"]),af=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function Li(e){return e!==void 0&&!(typeof e=="string"&&e.startsWith("#"))}function cf(e){const t=typeof e.$schema=="string"?e.$schema:void 0;if(Li(e.$id))return{...t!==void 0&&{$schema:t},type:"object",properties:{result:e},required:["result"]};const o=Ll(e.$schema)&&e.$recursiveAnchor!==!0,n=(s,r)=>{if(Array.isArray(s))return s.map(u=>n(u,!1));if(s===null||typeof s!="object"||!r&&Li(s.$id))return s;const a={};let c=!1;for(const[u,d]of Object.entries(s))r?a[u]=n(d,!1):(u==="$ref"||u==="$dynamicRef")&&typeof d=="string"?a[u]=d==="#"?"#/properties/result":d.startsWith("#/")?`#/properties/result${d.slice(1)}`:d:u==="$recursiveRef"&&d==="#"&&o?c=!0:rf.has(u)?a[u]=d:af.has(u)?a[u]=n(d,!0):a[u]=n(d,!1);return c&&("$ref"in a?a.allOf=[...Array.isArray(a.allOf)?a.allOf:[],{$ref:"#/properties/result"}]:a.$ref="#/properties/result"),a};return{...t!==void 0&&{$schema:t},type:"object",properties:{result:n(e,!1)},required:["result"]}}const lf={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},uf={"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},pf={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};let un;function ei(){if(un)return un;const e=Qc();return un={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}},un}function el(e){return Object.prototype.hasOwnProperty.call(lf,e)}function tl(e){return Object.prototype.hasOwnProperty.call(uf,e)}function df(e){return Object.prototype.hasOwnProperty.call(pf,e)}function mf(e){return df(e)?ei().resultSchemas[e]:void 0}function hf(e){return el(e)?ei().requestSchemas[e]:void 0}function ff(e){return tl(e)?ei().notificationSchemas[e]:void 0}function cs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function pn(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};const o=e.safeParse(t);return o.success?{ok:!0,value:o.data}:{ok:!1,reason:"invalid",message:String(o.error)}}const Ai={ok:!1,reason:"not-in-era"};function ji(e){return cs(e)&&cs(e.outputSchema)&&Xc(e.outputSchema)}const ti={era:"2025-11-25",hasRequestMethod:el,hasNotificationMethod:tl,validateRequest:(e,t)=>pn(hf(e),t),validateResult:(e,t)=>pn(mf(e),t),validateNotification:(e,t)=>pn(ff(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Ai,validateInputResponse:()=>Ai,samplingResultVariant:((e,t)=>{const o=Qc();return pn(e?o.CreateMessageResultWithToolsSchema:o.CreateMessageResultSchema,t)}),outboundEnvelope:e=>{},validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){const o=Kc(e),n=o.structuredContent;if(n===void 0)return o;const s=typeof n!="object"||n===null||Array.isArray(n),r=t!==void 0&&Xc(t);return!s&&!r?o:{...o,structuredContent:{result:n}}},decodeResult(e,t){if(cs(t)&&"resultType"in t){const o={...t};return delete o.resultType,{kind:"complete",result:o}}return{kind:"complete",result:t}},encodeResult(e,t){if(e!=="tools/list")return t;const o=t.tools;return!Array.isArray(o)||!o.some(n=>ji(n))?t:{...t,tools:o.map(n=>ji(n)?{...n,outputSchema:cf(n.outputSchema)}:n)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>{}};function Sf(){const e=Ps(()=>w([i(),_(),T(),zo(),y(i(),e),m(e)])),t=y(i(),e),o=w([i(),_().int()]),n=i(),s=w([i(),_().int()]),r=O(["user","assistant"]),a=O(["debug","info","notice","warning","error","critical","alert","emergency"]),c=i().refine(Q=>{try{return atob(Q),!0}catch{return!1}},{message:"Invalid Base64 string"}),u=l({ttl:_().optional()}),d=l({taskId:i()}),h=I({progressToken:o.optional(),"io.modelcontextprotocol/related-task":d.optional()}),g=l({_meta:h.optional()}),b=g.extend({task:u.optional()}),f=l({_meta:h.optional()}),R=l({method:i(),params:f.loose().optional()}),P=l({src:i(),mimeType:i().optional(),sizes:m(i()).optional(),theme:O(["light","dark"]).optional()}),v=l({icons:m(P).optional()}),A=l({name:i(),title:i().optional()}),U=A.extend({...A.shape,...v.shape,version:i(),websiteUrl:i().optional(),description:i().optional()}),N=Xe(l({applyDefaults:T().optional()}),t),x=Oo(Q=>Q&&typeof Q=="object"&&!Array.isArray(Q)&&Object.keys(Q).length===0?{form:{}}:Q,Xe(l({form:N.optional(),url:t.optional()}),t.optional())),$=I({list:t.optional(),cancel:t.optional(),requests:I({sampling:I({createMessage:t.optional()}).optional(),elicitation:I({create:t.optional()}).optional()}).optional()}),z=I({list:t.optional(),cancel:t.optional(),requests:I({tools:I({call:t.optional()}).optional()}).optional()}),G=l({experimental:y(i(),t).optional(),sampling:l({context:t.optional(),tools:t.optional()}).optional(),elicitation:x.optional(),roots:l({listChanged:T().optional()}).optional(),tasks:$.optional(),extensions:y(i(),t).optional()}),ne=l({experimental:y(i(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:l({listChanged:T().optional()}).optional(),resources:l({subscribe:T().optional(),listChanged:T().optional()}).optional(),tools:l({listChanged:T().optional()}).optional(),tasks:z.optional(),extensions:y(i(),t).optional()}),se=l({progress:_(),total:k(_()),message:k(i())}),$e=l({...f.shape,...se.shape,progressToken:o}),q=R.extend({method:p("notifications/progress"),params:$e}),L=f.extend({level:a,logger:i().optional(),data:C()}),M=R.extend({method:p("notifications/message"),params:L}),F=l({uri:i(),mimeType:k(i()),_meta:y(i(),C()).optional()}),Z=F.extend({text:i()}),H=F.extend({blob:c}),Y=l({audience:m(r).optional(),priority:_().min(0).max(1).optional(),lastModified:Uo({offset:!0}).optional()}),he=l({...A.shape,...v.shape,uri:i(),description:k(i()),mimeType:k(i()),size:k(_()),annotations:Y.optional(),_meta:k(I({}))}),re=l({...A.shape,...v.shape,uriTemplate:i(),description:k(i()),mimeType:k(i()),annotations:Y.optional(),_meta:k(I({}))}),fe=R.extend({method:p("notifications/resources/list_changed"),params:f.optional()}),Te=f.extend({uri:i()}),ae=R.extend({method:p("notifications/resources/updated"),params:Te}),it=l({name:i(),description:k(i()),required:k(T())}),Ue=l({...A.shape,...v.shape,description:k(i()),arguments:k(m(it)),_meta:k(I({}))}),rt=R.extend({method:p("notifications/prompts/list_changed"),params:f.optional()}),qe=l({type:p("text"),text:i(),annotations:Y.optional(),_meta:y(i(),C()).optional()}),Ee=l({type:p("image"),data:c,mimeType:i(),annotations:Y.optional(),_meta:y(i(),C()).optional()}),Ze=l({type:p("audio"),data:c,mimeType:i(),annotations:Y.optional(),_meta:y(i(),C()).optional()}),Nt=l({type:p("tool_use"),name:i(),id:i(),input:y(i(),C()),_meta:y(i(),C()).optional()}),zt=l({type:p("resource"),resource:w([Z,H]),annotations:Y.optional(),_meta:y(i(),C()).optional()}),Ot=he.extend({type:p("resource_link")}),ze=w([qe,Ee,Ze,Ot,zt]),at=l({role:r,content:ze}),De=l({title:i().optional(),readOnlyHint:T().optional(),destructiveHint:T().optional(),idempotentHint:T().optional(),openWorldHint:T().optional()}),Mt=R.extend({method:p("notifications/tools/list_changed"),params:f.optional()}),Lt=l({name:i().optional()}),At=l({hints:m(Lt).optional(),costPriority:_().min(0).max(1).optional(),speedPriority:_().min(0).max(1).optional(),intelligencePriority:_().min(0).max(1).optional()}),jt=l({mode:O(["auto","required","none"]).optional()}),Ut=l({type:p("boolean"),title:i().optional(),description:i().optional(),default:T().optional()}),Zt=l({type:p("string"),title:i().optional(),description:i().optional(),minLength:_().optional(),maxLength:_().optional(),format:O(["email","uri","date","date-time"]).optional(),default:i().optional()}),Dt=l({type:O(["number","integer"]),title:i().optional(),description:i().optional(),minimum:_().optional(),maximum:_().optional(),default:_().optional()}),Ht=l({type:p("string"),title:i().optional(),description:i().optional(),enum:m(i()),default:i().optional()}),Ft=l({type:p("string"),title:i().optional(),description:i().optional(),oneOf:m(l({const:i(),title:i()})),default:i().optional()}),Jt=l({type:p("string"),title:i().optional(),description:i().optional(),enum:m(i()),enumNames:m(i()).optional(),default:i().optional()}),Vt=w([Ht,Ft]),Bt=l({type:p("array"),title:i().optional(),description:i().optional(),minItems:_().optional(),maxItems:_().optional(),items:l({type:p("string"),enum:m(i())}),default:m(i()).optional()}),Wt=l({type:p("array"),title:i().optional(),description:i().optional(),minItems:_().optional(),maxItems:_().optional(),items:l({anyOf:m(l({const:i(),title:i()}))}),default:m(i()).optional()}),Gt=w([Bt,Wt]),Kt=w([Jt,Vt,Gt]),Yt=w([Kt,Ut,Zt,Dt]),He=b.extend({mode:p("form").optional(),message:i(),requestedSchema:l({type:p("object"),properties:y(i(),Yt),required:m(i()).optional()}).catchall(C())}),Fe=l({type:p("ref/resource"),uri:i()}),Je=l({type:p("ref/prompt"),name:i()}),Qt=l({uri:i().startsWith("file://"),name:i().optional(),_meta:y(i(),C()).optional()}),Oe=G.shape,Xt=l({experimental:Oe.experimental,sampling:Oe.sampling,elicitation:Oe.elicitation,roots:Oe.roots,extensions:Oe.extensions}),Pe=ne.shape,ct=l({experimental:Pe.experimental,logging:Pe.logging,completions:Pe.completions,prompts:Pe.prompts,resources:Pe.resources,tools:Pe.tools,extensions:Pe.extensions}),lt=I({progressToken:o.optional(),[qn]:i(),[Cs]:U.optional(),[In]:Xt,[Es]:a.optional()}),Ve=l({...A.shape,...v.shape,description:i().optional(),inputSchema:I({$schema:i().optional(),type:p("object")}),outputSchema:I({$schema:i().optional()}).optional(),annotations:De.optional(),_meta:y(i(),C()).optional()}),eo=l({type:p("tool_result"),toolUseId:i(),content:m(ze),structuredContent:C().optional(),isError:T().optional(),_meta:y(i(),C()).optional()}),ut=w([qe,Ee,Ze,Nt,eo]),Be=l({role:r,content:w([ut,m(ut)]),_meta:y(i(),C()).optional()}),pt=i(),dt=I({[$o]:U.optional().catch(void 0)}),mt=dt.optional();function ce(Q){return I({_meta:mt,resultType:pt.default("complete"),...Q})}const to=ce({}),Ho=ce({nextCursor:n.optional()}),ht=ce({content:m(ze),structuredContent:C().optional(),isError:T().optional()}),oo=ce({ttlMs:_().int().min(0),cacheScope:O(["public","private"]),tools:m(Ve),nextCursor:n.optional()}),no=ce({ttlMs:_().int().min(0),cacheScope:O(["public","private"]),prompts:m(Ue),nextCursor:n.optional()}),so=ce({description:i().optional(),messages:m(at)}),io=ce({ttlMs:_().int().min(0),cacheScope:O(["public","private"]),resources:m(he),nextCursor:n.optional()}),ro=ce({ttlMs:_().int().min(0),cacheScope:O(["public","private"]),resourceTemplates:m(re),nextCursor:n.optional()}),ao=ce({ttlMs:_().int().min(0),cacheScope:O(["public","private"]),contents:m(w([Z,H]))}),co=ce({completion:l({values:m(i()).max(100),total:_().int().optional(),hasMore:T().optional()}).loose()}),Fo=ce({ttlMs:_().int().min(0),cacheScope:O(["public","private"])}),lo=ce({ttlMs:_().int().min(0).catch(0),cacheScope:O(["public","private"]).catch("private"),supportedVersions:m(i()),capabilities:ct,instructions:i().optional()}),Me=l({messages:m(Be),modelPreferences:At.optional(),systemPrompt:i().optional(),includeContext:O(["none","thisServer","allServers"]).optional(),temperature:_().optional(),maxTokens:_().int(),stopSequences:m(i()).optional(),metadata:t.optional(),tools:m(Ve).optional(),toolChoice:jt.optional()}),uo=l({method:p("sampling/createMessage"),params:Me}),po=l({method:p("roots/list"),params:l({_meta:y(i(),C()).optional()}).optional()}),mo=l({...Be.shape,model:i(),stopReason:i().optional()}),ho=l({roots:m(Qt)}),fo=l({action:O(["accept","decline","cancel"]),content:y(i(),w([i(),_(),T(),m(i())])).optional()}),So=l({mode:p("url"),message:i(),url:i().url()}),go=w([He,So]),_o=l({method:p("elicitation/create"),params:go}),bo=w([uo,po,_o]),vo=w([mo,ho,fo]),yo=y(i(),bo),Ro=y(i(),vo),We=ce({inputRequests:yo.optional(),requestState:i().optional()}),Ge={inputResponses:Ro.optional(),requestState:i().optional()},Jo=l({_meta:lt,...Ge}),Vo=I({progressToken:o.optional()});function ye(Q,Ye){return l({method:p(Q),params:l({_meta:lt,...Ye})})}function Re(Q,Ye){return l({method:p(Q),params:l({_meta:Vo.optional(),...Ye}).optional()})}const wo={name:i(),arguments:y(i(),C()).optional(),...Ge},ke={cursor:n.optional()},Bo=ye("tools/call",wo),Wo=ye("tools/list",ke),Go=ye("prompts/list",ke),Ko=ye("prompts/get",{name:i(),arguments:y(i(),i()).optional(),...Ge}),Yo=ye("resources/list",ke),Qo=ye("resources/templates/list",ke),Xo=ye("resources/read",{uri:i(),...Ge}),To={ref:w([Je,Fe]),argument:l({name:i(),value:i()}),context:l({arguments:y(i(),i()).optional()}).optional()},en=ye("completion/complete",To),tn=ye("server/discover",{}),ft=l({toolsListChanged:T().optional(),promptsListChanged:T().optional(),resourcesListChanged:T().optional(),resourceSubscriptions:m(i()).optional()}),Po={notifications:ft},on=ye("subscriptions/listen",Po),nn=dt.extend({"io.modelcontextprotocol/subscriptionId":s}),sn=I({_meta:nn,resultType:pt.default("complete")}),Le={"tools/call":Re("tools/call",wo),"tools/list":Re("tools/list",ke),"prompts/get":Re("prompts/get",{name:i(),arguments:y(i(),i()).optional()}),"prompts/list":Re("prompts/list",ke),"resources/list":Re("resources/list",ke),"resources/templates/list":Re("resources/templates/list",ke),"resources/read":Re("resources/read",{uri:i()}),"completion/complete":Re("completion/complete",To),"server/discover":Re("server/discover",{}),"subscriptions/listen":Re("subscriptions/listen",Po)};function Se(Q){return I({_meta:mt,...Q})}const rn={"tools/call":Se({content:m(ze),structuredContent:C().optional(),isError:T().optional()}),"tools/list":Se({ttlMs:_().int().min(0),cacheScope:O(["public","private"]),tools:m(Ve),nextCursor:n.optional()}),"prompts/get":Se({description:i().optional(),messages:m(at)}),"prompts/list":Se({ttlMs:_().int().min(0),cacheScope:O(["public","private"]),prompts:m(Ue),nextCursor:n.optional()}),"resources/list":Se({ttlMs:_().int().min(0),cacheScope:O(["public","private"]),resources:m(he),nextCursor:n.optional()}),"resources/templates/list":Se({ttlMs:_().int().min(0),cacheScope:O(["public","private"]),resourceTemplates:m(re),nextCursor:n.optional()}),"resources/read":Se({ttlMs:_().int().min(0),cacheScope:O(["public","private"]),contents:m(w([Z,H]))}),"completion/complete":Se({completion:l({values:m(i()).max(100),total:_().int().optional(),hasMore:T().optional()}).loose()}),"server/discover":Se({ttlMs:_().int().min(0).catch(0),cacheScope:O(["public","private"]).catch("private"),supportedVersions:m(i()),capabilities:ct,instructions:i().optional()}),"subscriptions/listen":Se({})},Ke=I({"io.modelcontextprotocol/subscriptionId":s.optional()}),St=l({method:p("notifications/subscriptions/acknowledged"),params:l({_meta:Ke.optional(),notifications:ft})}),gt=l({_meta:Ke.optional(),requestId:s,reason:i().optional()}),_t=l({method:p("notifications/cancelled"),params:gt}),Fn={"notifications/cancelled":_t,"notifications/progress":q,"notifications/message":M,"notifications/resources/updated":ae,"notifications/resources/list_changed":fe,"notifications/tools/list_changed":Mt,"notifications/prompts/list_changed":rt,"notifications/subscriptions/acknowledged":St},ge=Q=>l({jsonrpc:p("2.0"),id:w([i(),_().int()]),result:Q}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:o,CursorSchema:n,RequestIdSchema:s,RoleSchema:r,LoggingLevelSchema:a,TaskMetadataSchema:u,RelatedTaskMetadataSchema:d,RequestMetaSchema:h,BaseRequestParamsSchema:g,TaskAugmentedRequestParamsSchema:b,NotificationsParamsSchema:f,NotificationSchema:R,IconSchema:P,IconsSchema:v,BaseMetadataSchema:A,ImplementationSchema:U,ClientTasksCapabilitySchema:$,ServerTasksCapabilitySchema:z,ClientCapabilitiesSchema:G,ServerCapabilitiesSchema:ne,ProgressSchema:se,ProgressNotificationParamsSchema:$e,ProgressNotificationSchema:q,LoggingMessageNotificationParamsSchema:L,LoggingMessageNotificationSchema:M,ResourceContentsSchema:F,TextResourceContentsSchema:Z,BlobResourceContentsSchema:H,AnnotationsSchema:Y,ResourceSchema:he,ResourceTemplateSchema:re,ResourceListChangedNotificationSchema:fe,ResourceUpdatedNotificationParamsSchema:Te,ResourceUpdatedNotificationSchema:ae,PromptArgumentSchema:it,PromptSchema:Ue,PromptListChangedNotificationSchema:rt,TextContentSchema:qe,ImageContentSchema:Ee,AudioContentSchema:Ze,ToolUseContentSchema:Nt,EmbeddedResourceSchema:zt,ResourceLinkSchema:Ot,ContentBlockSchema:ze,PromptMessageSchema:at,ToolAnnotationsSchema:De,ToolListChangedNotificationSchema:Mt,ModelHintSchema:Lt,ModelPreferencesSchema:At,ToolChoiceSchema:jt,BooleanSchemaSchema:Ut,StringSchemaSchema:Zt,NumberSchemaSchema:Dt,UntitledSingleSelectEnumSchemaSchema:Ht,TitledSingleSelectEnumSchemaSchema:Ft,LegacyTitledEnumSchemaSchema:Jt,SingleSelectEnumSchemaSchema:Vt,UntitledMultiSelectEnumSchemaSchema:Bt,TitledMultiSelectEnumSchemaSchema:Wt,MultiSelectEnumSchemaSchema:Gt,EnumSchemaSchema:Kt,PrimitiveSchemaDefinitionSchema:Yt,ElicitRequestFormParamsSchema:He,ResourceTemplateReferenceSchema:Fe,PromptReferenceSchema:Je,RootSchema:Qt,ClientCapabilities2026Schema:Xt,ServerCapabilities2026Schema:ct,RequestMetaEnvelopeSchema:lt,ToolSchema:Ve,ToolResultContentSchema:eo,SamplingMessageContentBlockSchema:ut,SamplingMessageSchema:Be,ResultTypeSchema:pt,ResultMetaSchema:dt,ResultSchema:to,PaginatedResultSchema:Ho,CallToolResultSchema:ht,ListToolsResultSchema:oo,ListPromptsResultSchema:no,GetPromptResultSchema:so,ListResourcesResultSchema:io,ListResourceTemplatesResultSchema:ro,ReadResourceResultSchema:ao,CompleteResultSchema:co,CacheableResultSchema:Fo,DiscoverResultSchema:lo,CreateMessageRequestParamsSchema:Me,CreateMessageRequestSchema:uo,ListRootsRequestSchema:po,CreateMessageResultSchema:mo,ListRootsResultSchema:ho,ElicitResultSchema:fo,ElicitRequestURLParamsSchema:So,ElicitRequestParamsSchema:go,ElicitRequestSchema:_o,InputRequestSchema:bo,InputResponseSchema:vo,InputRequestsSchema:yo,InputResponsesSchema:Ro,InputRequiredResultSchema:We,InputResponseRequestParamsSchema:Jo,CallToolRequestSchema:Bo,ListToolsRequestSchema:Wo,ListPromptsRequestSchema:Go,GetPromptRequestSchema:Ko,ListResourcesRequestSchema:Yo,ListResourceTemplatesRequestSchema:Qo,ReadResourceRequestSchema:Xo,CompleteRequestSchema:en,DiscoverRequestSchema:tn,SubscriptionFilterSchema:ft,SubscriptionsListenRequestSchema:on,SubscriptionsListenResultMetaSchema:nn,SubscriptionsListenResultSchema:sn,dispatchRequestSchemas:Le,dispatchResultSchemas:rn,NotificationMetaSchema:Ke,SubscriptionsAcknowledgedNotificationSchema:St,CancelledNotificationParamsSchema:gt,CancelledNotificationSchema:_t,notificationSchemas2026:Fn,JSONRPCResultResponseSchema:ge(to),CallToolResultResponseSchema:ge(w([ht,We])),ListToolsResultResponseSchema:ge(oo),ListPromptsResultResponseSchema:ge(no),GetPromptResultResponseSchema:ge(w([so,We])),ListResourcesResultResponseSchema:ge(io),ListResourceTemplatesResultResponseSchema:ge(ro),ReadResourceResultResponseSchema:ge(w([ao,We])),CompleteResultResponseSchema:ge(co),DiscoverResultResponseSchema:ge(lo)}}let gf;function tt(){return gf??=Sf()}const _f=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function bf(e){return _f.includes(e)}const oi=Symbol("modelcontextprotocol.resultCacheHintFallback");function vf(e){return e[oi]}function ol(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function nl(e){return e==="public"||e==="private"}let j=(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})({});var pe=class sl extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](t){return wn(this,t)}static isInstance(t){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return wn(this,t)}constructor(t,o,n){super(o),this.code=t,this.data=n,this.name="ProtocolError",Gc(this,new.target)}static fromError(t,o,n){if(t===j.UrlElicitationRequired&&n){const s=n;if(s.elicitations)return new Rf(s.elicitations,o)}if(t===j.UnsupportedProtocolVersion&&n){const s=n;if(Array.isArray(s.supported)&&typeof s.requested=="string")return new wf({supported:s.supported,requested:s.requested},o)}if(t===j.InvalidParams||t===j.ResourceNotFound){const s=n;if(typeof s?.uri=="string"&&(t===j.ResourceNotFound||Object.keys(s).length===1))return new yf(s.uri,o)}if(t===j.MissingRequiredClientCapability&&n){const s=n;if(s.requiredCapabilities!==null&&typeof s.requiredCapabilities=="object"&&!Array.isArray(s.requiredCapabilities))return new Tf({requiredCapabilities:s.requiredCapabilities},o)}return new sl(t,o,n)}},yf=class extends pe{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(j.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Rf=class extends pe{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(j.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},wf=class extends pe{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(j.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Tf=class extends pe{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(j.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}};const Pf=0,Cf="private",Ef=["tools/call","prompts/get","resources/read"];function kf(e,t){const o=t.resultType;if(o===void 0)return{...t,resultType:"complete"};if(o==="complete"||Ef.includes(e))return t;throw new pe(j.InternalError,`Handler for ${e} returned resultType '${String(o)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function $f(e,t){const o=vf(t);if(t.resultType!=="complete"||!bf(e))return o===void 0?t:zf(t);const n=t,s=ol(n.ttlMs)?n.ttlMs:xf(o),r=nl(n.cacheScope)?n.cacheScope:Nf(o),a={...n,ttlMs:s,cacheScope:r};return delete a[oi],a}function qf(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function If(e,t){if(t===void 0)return e;const o=e._meta;return o===void 0?{...e,_meta:{[$o]:t}}:!qf(o)||o[$o]!==void 0?e:{...e,_meta:{...o,[$o]:t}}}function xf(e){return e!==void 0&&ol(e.ttlMs)?e.ttlMs:Pf}function Nf(e){return e!==void 0&&nl(e.cacheScope)?e.cacheScope:Cf}function zf(e){const t={...e};return delete t[oi],t}const Of=["elicitation/create","sampling/createMessage","roots/list"];let dn;function il(){if(dn)return dn;const e=tt();return dn={request:{"elicitation/create":l({method:p("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":l({method:p("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":l({method:p("roots/list"),params:I({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},dn}function rl(e){return Of.includes(e)}function Gn(e){return rl(e)?il().request[e]:void 0}function Mf(e){return rl(e)?il().response[e]:void 0}const al={"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},Lf={"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 cl(e){return Object.prototype.hasOwnProperty.call(al,e)}function ll(e){return Object.prototype.hasOwnProperty.call(Lf,e)}function Af(e){return Object.prototype.hasOwnProperty.call(al,e)}function jf(e){return cl(e)?tt().dispatchRequestSchemas[e]:void 0}function Uf(e){return Af(e)?tt().dispatchResultSchemas[e]:void 0}function Zf(e){return ll(e)?tt().notificationSchemas2026[e]:void 0}function qo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Co(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};const o=e.safeParse(t);return o.success?{ok:!0,value:o.data}:{ok:!1,reason:"invalid",message:String(o.error)}}const Df={ok:!1,reason:"not-in-era"},Hf=[qn,In];function Ff(e,t){let o=t,n=!1;const s=()=>(n||(o={...o},n=!0),o),r=t.tools;e==="tools/list"&&Array.isArray(r)&&r.some(c=>qo(c)&&"execution"in c)&&(s().tools=r.map(c=>{if(!qo(c)||!("execution"in c))return c;const u={...c};return delete u.execution,u}));const a=t.capabilities;if(qo(a)&&"tasks"in a){const c={...a};delete c.tasks,s().capabilities=c}return o}const ni={era:"2026-07-28",hasRequestMethod:cl,hasNotificationMethod:ll,hasInputRequestMethod:e=>Gn(e)!==void 0,validateRequest:(e,t)=>Co(jf(e),t),validateResult:(e,t)=>Co(Uf(e),t),validateNotification:(e,t)=>Co(Zf(e),t),validateInputRequest:(e,t)=>Co(Gn(e),t),validateInputResponse:(e,t)=>Co(Mf(e),t),samplingResultVariant:()=>Df,outboundEnvelope(e){return{[qn]:e.protocolVersion,[Cs]:e.clientInfo,[In]:e.clientCapabilities,...e.logLevel!==void 0&&{[Es]:e.logLevel}}},validateEnvelopeMeta(e){const t=[];for(const n of Hf)n in e||t.push({key:n,problem:"missing"});const o=tt().RequestMetaEnvelopeSchema.safeParse(e);if(!o.success)for(const n of o.error.issues){const s=n.path.map(String),r=s.length>0?s.join("."):"_meta";s.length===1&&t.some(a=>a.key===r&&a.problem==="missing")||t.push({key:r,problem:n.message})}return t},projectCallToolResult:e=>Kc(e),inputRequestSchema:Gn,decodeResult(e,t){if(!qo(t))return{kind:"invalid",error:new oe(ue.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};const o=t.resultType;if(o===void 0)return{kind:"invalid",error:new oe(ue.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 o!="string")return{kind:"invalid",error:new oe(ue.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:o})};if(o==="input_required"){const a=t.inputRequests,c=qo(a)?a:{},u=t.requestState;return Object.keys(c).length===0&&typeof u!="string"?{kind:"invalid",error:new oe(ue.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"})}:{kind:"input_required",inputRequests:c,...typeof u=="string"&&{requestState:u}}}if(o!=="complete")return{kind:"invalid",error:new oe(ue.UnsupportedResultType,`Unsupported result type '${o}' for ${e}`,{resultType:o,method:e})};const n=Jf(),s=Object.hasOwn(n,e)?n[e]:void 0;if(s!==void 0){const a=s.safeParse(t);if(!a.success)return{kind:"invalid",error:new oe(ue.InvalidResult,`Invalid result for ${e}: ${a.error}`,{method:e})}}const r={...t};return delete r.resultType,{kind:"complete",result:r}},encodeResult(e,t,o){return If($f(e,kf(e,Ff(e,t))),o)},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)";const t=tt().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(o=>o.message).join("; ")}`}};let mn;function Jf(){if(mn)return mn;const e=tt();return mn={"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},mn}const ul="2026-07-28";function Tn(e){return e!==void 0&&tf(e)?ni:ti}function Ui(e){return e.revision!==void 0?Tn(e.revision).era:e.era==="modern"?ni.era:ti.era}function Kn(e){return pl.some(t=>t.hasRequestMethod(e))}function Yn(e){return pl.some(t=>t.hasNotificationMethod(e))}const pl=[ti,ni];var Vf=Nl({AnnotationsSchema:()=>st,AudioContentSchema:()=>jn,BaseMetadataSchema:()=>et,BaseRequestParamsSchema:()=>de,BlobResourceContentsSchema:()=>Zs,BooleanSchemaSchema:()=>Bs,CallToolRequestParamsSchema:()=>cc,CallToolRequestSchema:()=>lc,CallToolResultSchema:()=>Zn,CancelTaskRequestSchema:()=>Ah,CancelTaskResultSchema:()=>jh,CancelledNotificationParamsSchema:()=>ma,CancelledNotificationSchema:()=>zs,ClientCapabilitiesSchema:()=>ga,ClientNotificationSchema:()=>Zh,ClientRequestSchema:()=>Uh,ClientResultSchema:()=>Dh,ClientTasksCapabilitySchema:()=>fa,CompatibilityCallToolResultSchema:()=>Eh,CompleteRequestParamsSchema:()=>Mc,CompleteRequestSchema:()=>Lc,CompleteResultSchema:()=>Ac,ContentBlockSchema:()=>It,CreateMessageRequestParamsSchema:()=>yc,CreateMessageRequestSchema:()=>Rc,CreateMessageResultSchema:()=>wc,CreateMessageResultWithToolsSchema:()=>Tc,CreateTaskResultSchema:()=>qh,CursorSchema:()=>$s,DiscoverRequestSchema:()=>Ra,DiscoverResultSchema:()=>wa,ElicitRequestFormParamsSchema:()=>Hn,ElicitRequestParamsSchema:()=>$c,ElicitRequestSchema:()=>qc,ElicitRequestURLParamsSchema:()=>kc,ElicitResultSchema:()=>Nc,ElicitationCompleteNotificationParamsSchema:()=>Ic,ElicitationCompleteNotificationSchema:()=>xc,EmbeddedResourceSchema:()=>Fs,EmptyResultSchema:()=>On,EnumSchemaSchema:()=>Ec,GetPromptRequestParamsSchema:()=>Qa,GetPromptRequestSchema:()=>Xa,GetPromptResultSchema:()=>oc,GetTaskPayloadRequestSchema:()=>zh,GetTaskPayloadResultSchema:()=>Oh,GetTaskRequestSchema:()=>xh,GetTaskResultSchema:()=>Nh,IconSchema:()=>ha,IconsSchema:()=>Ct,ImageContentSchema:()=>An,ImplementationSchema:()=>Et,InitializeRequestParamsSchema:()=>_a,InitializeRequestSchema:()=>ba,InitializeResultSchema:()=>va,InitializedNotificationSchema:()=>ya,JSONArraySchema:()=>wh,JSONObjectSchema:()=>X,JSONRPCErrorResponseSchema:()=>zn,JSONRPCMessageSchema:()=>da,JSONRPCNotificationSchema:()=>Ns,JSONRPCRequestSchema:()=>xs,JSONRPCResponseSchema:()=>Th,JSONRPCResultResponseSchema:()=>Nn,JSONValueSchema:()=>Tt,LegacyTitledEnumSchemaSchema:()=>Ks,ListChangedOptionsBaseSchema:()=>kh,ListPromptsRequestSchema:()=>Ka,ListPromptsResultSchema:()=>Ya,ListResourceTemplatesRequestSchema:()=>qa,ListResourceTemplatesResultSchema:()=>Ia,ListResourcesRequestSchema:()=>ka,ListResourcesResultSchema:()=>$a,ListRootsRequestSchema:()=>Uc,ListRootsResultSchema:()=>Zc,ListTasksRequestSchema:()=>Mh,ListTasksResultSchema:()=>Lh,ListToolsRequestSchema:()=>rc,ListToolsResultSchema:()=>ac,LoggingLevelSchema:()=>Vs,LoggingMessageNotificationParamsSchema:()=>mc,LoggingMessageNotificationSchema:()=>hc,ModelHintSchema:()=>fc,ModelPreferencesSchema:()=>Sc,MultiSelectEnumSchemaSchema:()=>Cc,NotificationSchema:()=>ve,NotificationsParamsSchema:()=>be,NumberSchemaSchema:()=>Rn,PaginatedRequestParamsSchema:()=>Ca,PaginatedRequestSchema:()=>kt,PaginatedResultSchema:()=>$t,PingRequestSchema:()=>Ms,PrimitiveSchemaDefinitionSchema:()=>Xs,ProgressNotificationParamsSchema:()=>Pa,ProgressNotificationSchema:()=>Ls,ProgressSchema:()=>Ta,ProgressTokenSchema:()=>ks,PromptArgumentSchema:()=>Wa,PromptListChangedNotificationSchema:()=>nc,PromptMessageSchema:()=>tc,PromptReferenceSchema:()=>Oc,PromptSchema:()=>Ga,ReadResourceRequestParamsSchema:()=>xa,ReadResourceRequestSchema:()=>Na,ReadResourceResultSchema:()=>za,RelatedTaskMetadataSchema:()=>pa,RequestIdSchema:()=>nt,RequestMetaSchema:()=>qs,RequestSchema:()=>ee,ResourceContentsSchema:()=>As,ResourceLinkSchema:()=>Js,ResourceListChangedNotificationSchema:()=>Oa,ResourceRequestParamsSchema:()=>Mn,ResourceSchema:()=>Ds,ResourceTemplateReferenceSchema:()=>zc,ResourceTemplateSchema:()=>Ea,ResourceUpdatedNotificationParamsSchema:()=>Va,ResourceUpdatedNotificationSchema:()=>Ba,ResultMetaObjectSchema:()=>Is,ResultSchema:()=>te,RoleSchema:()=>qt,RootSchema:()=>jc,RootsListChangedNotificationSchema:()=>Dc,SamplingContentSchema:()=>bc,SamplingMessageContentBlockSchema:()=>Mo,SamplingMessageSchema:()=>vc,ServerCapabilitiesSchema:()=>Os,ServerNotificationSchema:()=>Fh,ServerRequestSchema:()=>Hh,ServerResultSchema:()=>Jh,ServerTasksCapabilitySchema:()=>Sa,SetLevelRequestParamsSchema:()=>pc,SetLevelRequestSchema:()=>dc,SingleSelectEnumSchemaSchema:()=>Pc,StringSchemaSchema:()=>Dn,SubscribeRequestParamsSchema:()=>Ma,SubscribeRequestSchema:()=>La,SubscriptionFilterSchema:()=>Hs,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Da,SubscriptionsAcknowledgedNotificationSchema:()=>Ha,SubscriptionsListenRequestParamsSchema:()=>Ua,SubscriptionsListenRequestSchema:()=>Za,SubscriptionsListenResultMetaSchema:()=>Fa,SubscriptionsListenResultSchema:()=>Ja,TaskAugmentedRequestParamsSchema:()=>Do,TaskCreationParamsSchema:()=>$h,TaskMetadataSchema:()=>ua,TaskSchema:()=>xt,TaskStatusNotificationParamsSchema:()=>Fc,TaskStatusNotificationSchema:()=>Ih,TaskStatusSchema:()=>Hc,TextContentSchema:()=>Ln,TextResourceContentsSchema:()=>js,TitledMultiSelectEnumSchemaSchema:()=>Qs,TitledSingleSelectEnumSchemaSchema:()=>Gs,ToolAnnotationsSchema:()=>sc,ToolChoiceSchema:()=>gc,ToolExecutionSchema:()=>ic,ToolListChangedNotificationSchema:()=>uc,ToolResultContentSchema:()=>_c,ToolSchema:()=>Un,ToolUseContentSchema:()=>ec,UnsubscribeRequestParamsSchema:()=>Aa,UnsubscribeRequestSchema:()=>ja,UntitledMultiSelectEnumSchemaSchema:()=>Ys,UntitledSingleSelectEnumSchemaSchema:()=>Ws});const Bf=e=>xs.safeParse(e).success,Wf=e=>Ns.safeParse(e).success,Zi=e=>Nn.safeParse(e).success,Gf=e=>zn.safeParse(e).success,Qn=-32020;j.InvalidRequest,j.UnsupportedProtocolVersion,j.InvalidParams,j.MethodNotFound,j.InvalidParams,j.MissingRequiredClientCapability;j.ParseError+"",j.InvalidRequest+"",j.MethodNotFound+"",j.UnsupportedProtocolVersion+"",j.MissingRequiredClientCapability+"";function dl(e,t){return Xr(e,t)}function Eo(e){return new Set(e.flatMap(t=>Object.keys(t.shape)))}function ls(e){if(e==null)return!1;const t=typeof e;return t!=="object"&&t!=="function"||!("~standard"in e)?!1:typeof e["~standard"]?.validate=="function"}let Di=!1;const us="draft-2020-12";function Kf(e,t="input"){const o=e["~standard"];let n;if(o.jsonSchema)n=o.jsonSchema[t]({target:us});else if(o.vendor==="zod"){if(!("_zod"in e))throw new 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().");Di||(Di=!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.")),n=Yr(e,{target:us,io:t})}else throw new Error(`Schema library "${o.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t==="output")return n.type!==void 0?n:ml(n)?{type:"object",...n}:n;if(n.type!==void 0&&n.type!=="object")throw new Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(n.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...n}}function ml(e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return!0;for(const t of["oneOf","anyOf","allOf"]){const o=e[t];if(Array.isArray(o)&&o.length>0)return o.every(n=>n!==null&&typeof n=="object"&&(n.type==="object"||ml(n)))}return!1}function Yf(e){return e.path?.length?`${e.path.map(t=>String(typeof t=="object"?t.key:t)).join(".")}: ${e.message}`:e.message}async function Xn(e,t){const o=await e["~standard"].validate(t);return o.issues&&o.issues.length>0?{success:!1,error:o.issues.map(n=>Yf(n)).join(", ")}:{success:!0,data:o.value}}function Qf(e){const t=Yr(e,{target:us,io:"input"});return typeof t.pattern=="string"?t.pattern:void 0}const Xf=/\\\.\\d\{(\d+)\}/;function eS(e){const t=Xf.exec(e),o=[void 0,-1,0];return t&&o.push(Number(t[1])),[!1,!0].flatMap(n=>[!1,!0].flatMap(s=>o.map(r=>Uo({local:n,offset:s,precision:r}))))}function tS(e,t){let o;switch(e){case"email":o=[Cm()];break;case"uri":o=[na()];break;case"date":o=[Qr()];break;case"date-time":o=eS(t);break}return new Set(o.map(n=>Qf(n)).filter(n=>n!==void 0))}function oS(e,t,o){return o!=="zod"?!0:tS(e,t).has(t)}function Lo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function nS(e){try{return Kf(e,"input")}catch(t){const o=t instanceof Error?t.message:String(t);throw new pe(j.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${o}`)}}const sS=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function si(e){return sS.has(e)||e.startsWith("x-")}const iS=new Set(["$schema",...Object.keys(Hn.shape.requestedSchema.shape)]),Hi={string:Eo([Dn,Ws,Gs,Ks]),number:Eo([Rn]),integer:Eo([Rn]),boolean:Eo([Bs]),array:Eo([Ys,Qs])},rS=new Set(Dn.shape.format.unwrap().options);function aS(e,t,o,n){if(!Lo(e))return e;const s=typeof e.type=="string"&&Object.hasOwn(Hi,e.type)?Hi[e.type]:void 0;if(s===void 0)return e;const r={};for(const[a,c]of Object.entries(e))s.has(a)||si(a)?r[a]=c:a==="pattern"&&e.type==="string"&&typeof e.format=="string"?rS.has(e.format)?(typeof c!="string"||!oS(e.format,c,o))&&n.push(`${t}.${a}`):r[a]=c:n.push(`${t}.${a}`);return r}function cS(e,t){const o={},n=[];for(const[s,r]of Object.entries(e))s==="properties"&&Lo(r)?o[s]=Object.fromEntries(Object.entries(r).map(([a,c])=>[a,aS(c,`properties.${a}`,t,n)])):iS.has(s)?o[s]=r:si(s)||n.push(s);if(n.length>0)throw new pe(j.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${n.join(", ")}`);return o}function lS(e,t){if(!Lo(e.properties))return t;const o=Object.entries(e.properties).filter(([,n])=>!dl(Xs,n).success).map(([n])=>`properties.${n}`);return o.length>0?o.join(", "):t}function ps(e,t,o=""){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((n,s)=>ps(n,t[s],`${o}[${s}]`)):!Lo(e)||!Lo(t)?[]:Object.entries(e).flatMap(([n,s])=>{const r=o?`${o}.${n}`:n;return Object.prototype.hasOwnProperty.call(t,n)?ps(s,t[n],r):si(n)?[]:[r]})}function uS(e){if(!ls(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};const t=e.requestedSchema["~standard"].vendor,o=cS(nS(e.requestedSchema),t),n=dl(Hn.shape.requestedSchema,o);if(!n.success)throw new pe(j.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${lS(o,n.error.message)}`);const s=ps(o,n.data);if(s.length>0)throw new pe(j.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${s.join(", ")}`);const r=(n.data.required??[]).filter(a=>!Object.prototype.hasOwnProperty.call(n.data.properties,a));if(r.length>0)throw new pe(j.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${r.join(", ")}`);return{...e,mode:"form",requestedSchema:n.data}}function pS(e){const t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,o=typeof e.requestState=="string";if(!t&&!o)throw new 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}}}Object.assign(pS,{elicit(e){try{return{method:"elicitation/create",params:uS(e)}}catch(t){throw t instanceof pe?new 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"}}});const dS=["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"],mS={IdJagTokenExchangeResponseSchema:Gh,OAuthClientInformationFullSchema:Yh,OAuthClientInformationSchema:Wc,OAuthClientMetadataSchema:Bc,OAuthClientRegistrationErrorSchema:Qh,OAuthErrorResponseSchema:Kh,OAuthMetadataSchema:Jc,OAuthProtectedResourceMetadataSchema:Vh,OAuthTokenRevocationRequestSchema:Xh,OAuthTokensSchema:Wh,OpenIdProviderDiscoveryMetadataSchema:Bh,OpenIdProviderMetadataSchema:Vc},hl={},fl={};function Sl(e,t){const o=e.slice(0,-6);hl[o]=t,fl[o]=n=>t.safeParse(n).success}for(const e of dS)Sl(e,Vf[e]);for(const[e,t]of Object.entries(mS))Sl(e,t);Object.freeze(hl);Object.freeze(fl);function hS(e){switch(e){case"initialize":case"notifications/initialized":return Tn(void 0);case"server/discover":return Tn(ul);default:return}}const fS=6e4,SS=[qn,Cs,In,Es],gS=["inputResponses","requestState"];function Fi(e,t){const o=e.params;if(!es(o))return{message:e,lifted:{}};const n=o._meta,s=es(n)?SS.filter(u=>u in n):[],r=t==="request"?gS.filter(u=>u in o):[];if(s.length===0&&r.length===0)return{message:e,lifted:{}};const a={},c={...o};if(s.length>0&&es(n)){const u={},d={...n};for(const h of s)u[h]=n[h],delete d[h];a.envelope=u,Object.keys(d).length>0?c._meta=d:delete c._meta}for(const u of r)u==="inputResponses"&&(a.inputResponses=c[u]),u==="requestState"&&(a.requestState=c[u]),delete c[u];return{message:{...e,params:c},lifted:a}}function Ji(e,t){const o=e.validateResult(t,void 0);if(!(!o.ok&&o.reason==="not-in-era"))return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(n){const s=e.validateResult(t,n);return s.ok?{value:s.value}:{issues:[{message:s.reason==="invalid"?s.message:`not-in-era: ${t}`}]}}}}}function gl(e){return()=>e}const _S=gl(void 0);var bS=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;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??vh,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){const t=this._outboundMetaEnvelope();if(t===void 0)return e;const o=e.params??{};return{...e,params:{...o,_meta:{...t,...o._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new oe(ue.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){e.params.requestId!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,o,n,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(n,t),startTime:Date.now(),timeout:t,maxTotalTimeout:o,resetTimeoutOnProgress:s,onTimeout:n})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const o=Date.now()-t.startTime;if(t.maxTotalTimeout&&o>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new oe(ue.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:o});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};const o=this.transport?.onerror;this._transport.onerror=s=>{o?.(s),this._onerror(s)};const n=this._transport?.onmessage;this._transport.onmessage=(s,r)=>{n?.(s,r),Zi(s)||Gf(s)?this._onresponse(s):Bf(s)?this._onrequest(s,r):Wf(s)?this._onnotification(s,r):this._onerror(new Error(`Unknown message type: ${JSON.stringify(s)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(const n of this._timeoutInfo.values())clearTimeout(n.timeoutId);this._timeoutInfo.clear();const t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;const o=new oe(ue.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(const n of e.values())n(o);for(const n of t.values())n.abort(o)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){const{message:o}=Fi(e,"notification"),n=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){const a=Ui(t.classification);if(a!==n.era){this._onerror(new Error(`Era mismatch on inbound notification '${o.method}': classified as ${a} but this instance serves ${n.era}`));return}}if(Yn(o.method)&&!n.hasNotificationMethod(o.method))return;const s=this._notificationHandlers.get(o.method),r=this.fallbackNotificationHandler;s===void 0&&r===void 0||Promise.resolve().then(()=>s===void 0?r(o):s(o,n)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,t){const{message:o,lifted:n}=Fi(e,"request"),s=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop"){this._onerror(new Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}const r=this._transport,a=(P,v,A)=>{const U={jsonrpc:"2.0",id:o.id,error:{code:P,message:v,...A!==void 0&&{data:A}}};r?.send(U).catch(N=>this._onerror(new Error(`Failed to send an error response: ${N}`)))};if(t?.classification!==void 0){const P=Ui(t.classification);if(P!==s.era){this._onerror(new Error(`Era mismatch on inbound request '${o.method}': classified as ${P} but this instance serves ${s.era}`));const v=t.classification.revision??P;a(j.UnsupportedProtocolVersion,`Unsupported protocol version: ${v}`,{supported:this._supportedProtocolVersions,requested:v});return}}if(Kn(o.method)&&!s.hasRequestMethod(o.method)){a(j.MethodNotFound,"Method not found");return}const c=this._requestHandlers.get(o.method)??this.fallbackRequestHandler;if(c===void 0){a(j.MethodNotFound,"Method not found");return}const u=s.checkInboundEnvelope(n);if(u!==void 0){a(j.InvalidParams,u);return}const d=(P,v)=>this._notificationViaCodec(this._resolveOutboundCodec(P.method),P,{...v,relatedRequestId:o.id}),h=(P,v,A)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(P.method),P,v,{...A,relatedRequestId:o.id}),g=new AbortController;this._requestHandlerAbortControllers.set(o.id,g);const b=n.inputResponses===void 0?void 0:vS(n.inputResponses),f={sessionId:r?.sessionId,mcpReq:{id:o.id,method:o.method,_meta:o.params?._meta,...n.envelope!==void 0&&{envelope:n.envelope},...b!==void 0&&{inputResponses:b.accepted},...b!==void 0&&b.droppedKeys.length>0&&{droppedInputResponseKeys:b.droppedKeys},requestState:n.requestState===void 0?_S:gl(n.requestState),signal:g.signal,send:((P,v,A)=>{const U=this._resolveOutboundCodec(P.method);if(this._assertOutboundRequestInEra(U,P.method),ls(v))return h(P,v,A);const N=Ji(U,P.method);if(N===void 0)throw new TypeError(`'${P.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return h(P,N,v)}),notify:d},http:t?.authInfo?{authInfo:t.authInfo}:void 0},R=this.buildContext(f,t);Promise.resolve().then(()=>c(o,R)).then(async P=>{if(g.signal.aborted)return;let v;try{v=s.encodeResult(o.method,P,this._outboundServerInfo())}catch(U){this._onerror(new Error(`Failed to encode result for ${o.method}: ${U}`)),a(j.InternalError,"Internal error");return}const A={result:v,jsonrpc:"2.0",id:o.id};await r?.send(A)},async P=>{if(g.signal.aborted)return;const v=Number.isSafeInteger(P.code)?P.code:j.InternalError,A={jsonrpc:"2.0",id:o.id,error:{code:s.encodeErrorCode(v),message:P.message??"Internal error",...P.data!==void 0&&{data:P.data}}};await r?.send(A)}).catch(P=>this._onerror(new Error(`Failed to send response: ${P}`))).finally(()=>{this._requestHandlerAbortControllers.get(o.id)===g&&this._requestHandlerAbortControllers.delete(o.id)})}_onprogress(e){const{progressToken:t,...o}=e.params,n=Number(t),s=this._progressHandlers.get(n);if(!s){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const r=this._responseHandlers.get(n),a=this._timeoutInfo.get(n);if(a&&r&&a.resetTimeoutOnProgress)try{this._resetTimeout(n)}catch(c){this._responseHandlers.delete(n),this._progressHandlers.delete(n),this._cleanupTimeout(n),r(c);return}s(o)}_onresponse(e){const t=Number(e.id),o=this._responseHandlers.get(t);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Zi(e)?o(e):o(pe.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,o){const n=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(n,e.method),ls(t))return this._requestWithSchemaViaCodec(n,e,t,o);const s=Ji(n,e.method);if(s===void 0)throw new TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(n,e,s,t)}_negotiatedWireCodec(){return Tn(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){const t=hS(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Kn(t)&&!e.hasRequestMethod(t))throw new oe(ue.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,o){const n=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(n,e.method),this._requestWithSchemaViaCodec(n,e,t,o)}_requestWithSchemaViaCodec(e,t,o,n){const{relatedRequestId:s,resumptionToken:r,onresumptiontoken:a,headers:c}=n??{},u=Date.now();let d,h;return new Promise((g,b)=>{const f=z=>{b(z)};if(!this._transport){f(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(z){f(z);return}if(n?.signal?.aborted){const z=n.signal.reason;throw z instanceof oe?z:new oe(ue.RequestTimeout,String(z))}const R=e.era===ul&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,P=this._requestMessageId++;h=P;const v={...t,jsonrpc:"2.0",id:P};n?.onprogress&&(this._progressHandlers.set(P,n.onprogress),v.params={...t.params,_meta:{...t.params?._meta,progressToken:P}});const A=this._envelopeOutbound(v);let U=!1;const N=z=>{U||(this._progressHandlers.delete(P),R===void 0?t.method!=="initialize"&&this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:P,reason:String(z)}}),{relatedRequestId:s,resumptionToken:r,onresumptiontoken:a}).catch(G=>this._onerror(new Error(`Failed to send cancellation: ${G}`))):R.abort(),b(z instanceof oe?z:new oe(ue.RequestTimeout,String(z))))};this._responseHandlers.set(P,z=>{if(n?.signal?.aborted)return;if(U=!0,z instanceof Error)return b(z);let G;try{G=e.decodeResult(t.method,z.result)}catch(se){return b(se instanceof Error?se:new Error(String(se)))}if(G.kind==="invalid")return b(G.error);if(G.kind==="input_required"){if(n?.allowInputRequired===!0)return g(yS(G));const se={codec:e,request:t,resultSchema:o,options:n,flowStartedAt:u,retry:($e,q)=>this._requestWithSchemaViaCodec(e,$e===void 0?{method:t.method}:{method:t.method,params:$e},o,q)};return g(this._resolveNonCompleteResult(G,se))}const ne=G.result;Xn(o,ne).then(se=>{se.success?g(se.data):b(new oe(ue.InvalidResult,`Invalid result for ${t.method}: ${se.error}`))},b)}),d=()=>N(n?.signal?.reason),n?.signal?.addEventListener("abort",d,{once:!0});const x=n?.timeout??fS,$=()=>N(new oe(ue.RequestTimeout,"Request timed out",{timeout:x}));this._setupTimeout(P,x,n?.maxTotalTimeout,$,n?.resetTimeoutOnProgress??!1),this._transport.send(A,{relatedRequestId:s,resumptionToken:r,onresumptiontoken:a,headers:c,requestSignal:R?.signal}).catch(z=>{this._progressHandlers.delete(P),b(z)})}).finally(()=>{d&&n?.signal?.removeEventListener("abort",d),h!==void 0&&(this._responseHandlers.delete(h),this._cleanupTimeout(h))})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,o){if(!this._transport)throw new oe(ue.NotConnected,"Not connected");if(Yn(t.method)&&!e.hasNotificationMethod(t.method))throw new oe(ue.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);const n=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&o?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(n,o).catch(s=>this._onerror(s))});return}await this._transport.send(n,o)}setRequestHandler(e,t,o){this.assertRequestHandlerCapability(e);let n;if(typeof t=="function"){if(!Kn(e))throw new TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);n=(s,r)=>{const a=this._negotiatedWireCodec();let c=a.validateRequest(e,s);if(!c.ok&&c.reason==="not-in-era"&&(c=a.validateInputRequest(e,s)),!c.ok)throw c.reason==="not-in-era"?new pe(j.InternalError,`No wire schema for ${e} in the resolved era`):new Error(c.message);return Promise.resolve(t(c.value,r))}}else if(o)n=async(s,r)=>{const a=await Xn(t.params,{...s.params});if(!a.success)throw new pe(j.InvalidParams,`Invalid params for ${e}: ${a.error}`);return o(a.data,r)};else throw new TypeError("setRequestHandler: handler is required");this._requestHandlers.set(e,this._wrapHandler(e,n))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,o){if(typeof t=="function"){if(!Yn(e))throw new TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,s)=>{const r=s.validateNotification(e,n);if(!r.ok)throw r.reason==="not-in-era"?new pe(j.InternalError,`No wire schema for ${e} in the resolved era`):new Error(r.message);return Promise.resolve(t(r.value))});return}if(!o)throw new TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async n=>{const s=await Xn(t.params,{...n.params});if(!s.success)throw new pe(j.InvalidParams,`Invalid params for notification ${e}: ${s.error}`);await o(s.data,n)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function es(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Vi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function vS(e){const t={},o=[];if(!Vi(e))return{accepted:t,droppedKeys:o};for(const[n,s]of Object.entries(e)){if(!Vi(s)||"method"in s||"result"in s){o.push(n);continue}t[n]=s}return{accepted:t,droppedKeys:o}}function yS(e){return{resultType:"input_required",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}/*!
* content-type
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/var RS=xl((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,o=/\\([\u000b\u0020-\u00ff])/g,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=s;function s(c){if(!c)throw new TypeError("argument string is required");var u=typeof c=="object"?r(c):c;if(typeof u!="string")throw new TypeError("argument string is required to be a string");var d=u.indexOf(";"),h=d!==-1?u.slice(0,d).trim():u.trim();if(!n.test(h))throw new TypeError("invalid media type");var g=new a(h.toLowerCase());if(d!==-1){var b,f,R;for(t.lastIndex=d;f=t.exec(u);){if(f.index!==d)throw new TypeError("invalid parameter format");d+=f[0].length,b=f[1].toLowerCase(),R=f[2],R.charCodeAt(0)===34&&(R=R.slice(1,-1),R.indexOf("\\")!==-1&&(R=R.replace(o,"$1"))),g.parameters[b]=R}if(d!==u.length)throw new TypeError("invalid parameter format")}return g}function r(c){var u;if(typeof c.getHeader=="function"?u=c.getHeader("content-type"):typeof c.headers=="object"&&(u=c.headers&&c.headers["content-type"]),typeof u!="string")throw new TypeError("content-type header is missing from object");return u}function a(c){this.parameters=Object.create(null),this.type=c}}));RS();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");const wS=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,TS=/^(?=.{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,PS=/^(?:[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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})|((:[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;function Ie(e){return e.test.bind(e)}zS.bind(void 0,!1),Ie(PS),Ie(CS),Ie(ES),Ie(TS),Ie(xS),Ie(NS),Ie(kS),Ie($S),Ie(qS),Ie(IS);function zS(e,t){const o=t.match(wS);if(!o)return!1;const n=+o[1],s=+o[2],r=+o[3],a=!!o[5];return(n<=23&&s<=59&&r<=59||n==23&&s==59&&r==60)&&(!e||a)}class OS{_eventSlots=new Map;setHandler(t,o){let n=this._ensureEventSlot(t);n.onHandler&&o&&console.warn(`[MCP Apps] on${String(t)} handler replaced. Use addEventListener("${String(t)}", …) to add multiple listeners without replacing.`),n.onHandler=o}getHandler(t){return this._eventSlots.get(t)?.onHandler}addEventListener(t,o){this._ensureEventSlot(t).listeners.push(o)}removeEventListener(t,o){let n=this._eventSlots.get(t);if(!n)return;let s=n.listeners.indexOf(o);s!==-1&&n.listeners.splice(s,1)}dispatch(t,o){let n=this._eventSlots.get(t);if(n){n.onHandler?.(o);for(let s of[...n.listeners])s(o)}}_ensureEventSlot(t){let o=this._eventSlots.get(t);return o||(o={listeners:[]},this._eventSlots.set(t,o)),o}}class MS{_methods=new Set;claim(t,o){if(this._methods.has(t))throw Error(`Handler for "${t}" already registered (via ${o}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(t)}replace(t){this._methods.add(t)}release(t){this._methods.delete(t)}has(t){return this._methods.has(t)}}var Bi=new Set;function Wi(e,t){let[o,n]=t,s=o?.shape;if(typeof s?.method?.value!="string")return;let r=s.method.value,a=e==="request"?"setRequestHandler":"setNotificationHandler";Bi.has(a)||(Bi.add(a),console.warn(`[ext-apps] ${a}(Schema, handler) is deprecated; use ${a}("${r}", { params: Schema.shape.params }, handler).`));let c=n;return[r,{params:s.params},e==="request"?(u,d)=>c({method:r,params:u},LS(d)):u=>c({method:r,params:u})]}function LS(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 AS="2026-01-26",jS="ui/notifications/tool-input-partial";class US{eventTarget;eventSource;messageListener;constructor(t=window.parent,o){this.eventTarget=t,this.eventSource=o,this.messageListener=n=>{if(o&&n.source!==this.eventSource){console.debug("Ignoring message from unknown source",n);return}let s=da.safeParse(n.data);s.success?(console.debug("Parsed message",s.data),this.onmessage?.(s.data)):n.data?.jsonrpc!=="2.0"?console.debug("Ignoring non-JSON-RPC message",s.error.message,n):(console.error("Failed to parse message",s.error.message,n),this.onerror?.(Error("Invalid JSON-RPC message received: "+s.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(t,o){t.method!==jS&&console.debug("Sending message",t),this.eventTarget.postMessage(t,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var ZS=w([p("light"),p("dark")]).describe("Color theme preference for the host environment."),Ao=w([p("inline"),p("fullscreen"),p("pip")]).describe("Display mode for UI presentation."),DS=w([p("--color-background-primary"),p("--color-background-secondary"),p("--color-background-tertiary"),p("--color-background-inverse"),p("--color-background-ghost"),p("--color-background-info"),p("--color-background-danger"),p("--color-background-success"),p("--color-background-warning"),p("--color-background-disabled"),p("--color-text-primary"),p("--color-text-secondary"),p("--color-text-tertiary"),p("--color-text-inverse"),p("--color-text-ghost"),p("--color-text-info"),p("--color-text-danger"),p("--color-text-success"),p("--color-text-warning"),p("--color-text-disabled"),p("--color-border-primary"),p("--color-border-secondary"),p("--color-border-tertiary"),p("--color-border-inverse"),p("--color-border-ghost"),p("--color-border-info"),p("--color-border-danger"),p("--color-border-success"),p("--color-border-warning"),p("--color-border-disabled"),p("--color-ring-primary"),p("--color-ring-secondary"),p("--color-ring-inverse"),p("--color-ring-info"),p("--color-ring-danger"),p("--color-ring-success"),p("--color-ring-warning"),p("--font-sans"),p("--font-mono"),p("--font-weight-normal"),p("--font-weight-medium"),p("--font-weight-semibold"),p("--font-weight-bold"),p("--font-text-xs-size"),p("--font-text-sm-size"),p("--font-text-md-size"),p("--font-text-lg-size"),p("--font-heading-xs-size"),p("--font-heading-sm-size"),p("--font-heading-md-size"),p("--font-heading-lg-size"),p("--font-heading-xl-size"),p("--font-heading-2xl-size"),p("--font-heading-3xl-size"),p("--font-text-xs-line-height"),p("--font-text-sm-line-height"),p("--font-text-md-line-height"),p("--font-text-lg-line-height"),p("--font-heading-xs-line-height"),p("--font-heading-sm-line-height"),p("--font-heading-md-line-height"),p("--font-heading-lg-line-height"),p("--font-heading-xl-line-height"),p("--font-heading-2xl-line-height"),p("--font-heading-3xl-line-height"),p("--border-radius-xs"),p("--border-radius-sm"),p("--border-radius-md"),p("--border-radius-lg"),p("--border-radius-xl"),p("--border-radius-full"),p("--border-width-regular"),p("--shadow-hairline"),p("--shadow-sm"),p("--shadow-md"),p("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),HS=y(DS.describe(`Style variables for theming MCP apps.

Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).

Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),w([i(),ss()]).describe(`Style variables for theming MCP apps.

Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).

Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.

Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).

Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);l({method:p("ui/open-link"),params:l({url:i().describe("URL to open in the host's browser")})});var FS=l({isError:T().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),JS=l({isError:T().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),VS=l({isError:T().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();l({method:p("ui/notifications/sandbox-proxy-ready"),params:l({})});var ii=l({connectDomains:m(i()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).

- Maps to CSP \`connect-src\` directive
- Empty or omitted → no network connections (secure default)`),resourceDomains:m(i()).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:m(i()).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:m(i()).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'`)")}),ri=l({camera:l({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:l({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:l({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:l({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")});l({method:p("ui/notifications/size-changed"),params:l({width:_().optional().describe("New width in pixels."),height:_().optional().describe("New height in pixels.")})});var BS=l({method:p("ui/notifications/tool-input"),params:l({arguments:y(i(),C().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),WS=l({method:p("ui/notifications/tool-input-partial"),params:l({arguments:y(i(),C().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),GS=l({method:p("ui/notifications/tool-cancelled"),params:l({reason:i().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),KS=l({fonts:i().optional()}),YS=l({variables:HS.optional().describe("CSS variables for theming the app."),css:KS.optional().describe("CSS blocks that apps can inject.")}),QS=l({method:p("ui/resource-teardown"),params:l({})}),XS=y(i(),C()),Gi=l({text:l({}).optional().describe("Host supports text content blocks."),image:l({}).optional().describe("Host supports image content blocks."),audio:l({}).optional().describe("Host supports audio content blocks."),resource:l({}).optional().describe("Host supports resource content blocks."),resourceLink:l({}).optional().describe("Host supports resource link content blocks."),structuredContent:l({}).optional().describe("Host supports structured content.")});l({method:p("ui/notifications/request-teardown"),params:l({}).optional()});var eg=l({experimental:y(i(),y(i(),Ts()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),openLinks:l({}).optional().describe("Host supports opening external URLs."),downloadFile:l({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:l({listChanged:T().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:l({listChanged:T().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:l({}).optional().describe("Host accepts log messages."),sandbox:l({permissions:ri.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:ii.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Gi.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Gi.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:l({tools:l({}).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.")}),tg=l({experimental:y(i(),y(i(),Ts()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),tools:l({listChanged:T().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:m(Ao).optional().describe("Display modes the app supports.")});l({method:p("ui/notifications/initialized"),params:l({}).optional()});l({csp:ii.optional().describe("Content Security Policy configuration for UI resources."),permissions:ri.optional().describe("Sandbox permissions requested by the UI resource."),domain:i().optional().describe(`Dedicated origin for view sandbox.

Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.

**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:
- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)

If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:T().optional().describe(`Visual boundary preference - true if view prefers a visible border.

Boolean 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.

- \`true\`: request visible border + background
- \`false\`: request no visible border + background
- omitted: host decides border`)});l({method:p("ui/request-display-mode"),params:l({mode:Ao.describe("The display mode being requested.")})});var og=l({mode:Ao.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),ng=w([p("model"),p("app")]).describe("Tool visibility scope - who can access the tool.");l({resourceUri:i().optional(),visibility:m(ng).optional().describe(`Who can access this tool. Default: ["model", "app"]
- "model": Tool visible to and callable by the agent
- "app": Tool callable by the app from this server only`),csp:is().optional(),permissions:is().optional()});l({mimeTypes:m(i()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});l({method:p("ui/download-file"),params:l({contents:m(w([Fs,Js])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})});l({method:p("ui/message"),params:l({role:p("user").describe('Message role, currently only "user" is supported.'),content:m(It).describe("Message content blocks (text, image, etc.).")})});l({method:p("ui/notifications/sandbox-resource-ready"),params:l({html:i().describe("HTML content to load into the inner iframe."),sandbox:i().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:ii.optional().describe("CSP configuration from resource metadata."),permissions:ri.optional().describe("Sandbox permissions from resource metadata.")})});var sg=l({method:p("ui/notifications/tool-result"),params:Zn.describe("Standard MCP tool execution result.")}),_l=l({toolInfo:l({id:nt.optional().describe("JSON-RPC id of the tools/call request."),tool:Un.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:ZS.optional().describe("Current color theme preference."),styles:YS.optional().describe("Style configuration for theming the app."),displayMode:Ao.optional().describe("How the UI is currently displayed."),availableDisplayModes:m(Ao).optional().describe("Display modes the host supports."),containerDimensions:w([l({height:_().describe("Fixed container height in pixels.")}),l({maxHeight:w([_(),ss()]).optional().describe("Maximum container height in pixels.")})]).and(w([l({width:_().describe("Fixed container width in pixels.")}),l({maxWidth:w([_(),ss()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:i().optional().describe("User's language and region preference in BCP 47 format."),timeZone:i().optional().describe("User's timezone in IANA format."),userAgent:i().optional().describe("Host application identifier."),platform:w([p("web"),p("desktop"),p("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:l({touch:T().optional().describe("Whether the device supports touch input."),hover:T().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:l({top:_().describe("Top safe area inset in pixels."),right:_().describe("Right safe area inset in pixels."),bottom:_().describe("Bottom safe area inset in pixels."),left:_().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),ig=l({method:p("ui/notifications/host-context-changed"),params:_l.describe("Partial context update containing only changed fields.")});l({method:p("ui/update-model-context"),params:l({content:m(It).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:y(i(),C().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});l({method:p("ui/initialize"),params:l({appInfo:Et.describe("App identification (name and version)."),appCapabilities:tg.describe("Features and capabilities this app provides."),protocolVersion:i().describe("Protocol version this app supports.")})});var rg=l({protocolVersion:i().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Et.describe("Host application identification and version."),hostCapabilities:eg.describe("Features and capabilities provided by the host."),hostContext:_l.describe("Rich context about the host environment.")}).passthrough(),ag={target:"draft-2020-12"};async function Ki(e,t){let o=e["~standard"];if(o.jsonSchema)return o.jsonSchema[t](ag);throw Error(`Schema (vendor: ${o.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 Yi(e,t,o=""){let n=await e["~standard"].validate(t);if(n.issues){let s=n.issues.map(r=>{let a=r.path?.map(c=>typeof c=="object"?c.key:c).join(".");return a?`${a}: ${r.message}`:r.message}).join("; ");throw Error(o+s)}return n.value}function cg(e){let t=document.documentElement;t.setAttribute("data-theme",e),t.style.colorScheme=e}function lg(e,t=document.documentElement){for(let[o,n]of Object.entries(e))n!==void 0&&t.style.setProperty(o,n)}function ug(e,t){let o={...e,...t};return t.experimental!==void 0&&(o.experimental={...e.experimental,...t.experimental}),t.tools!==void 0&&(o.tools={...e.tools,...t.tools}),o}class ai extends bS{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new OS;_methods=new MS;setRequestHandler=(...t)=>{let[o,...n]=Wi("request",t)??t;this._methods.claim(o,"setRequestHandler"),super.setRequestHandler.call(this,o,...n)};setNotificationHandler=(...t)=>{let[o,...n]=Wi("notification",t)??t;this._methods.claim(o,"setNotificationHandler"),super.setNotificationHandler.call(this,o,...n)};removeRequestHandler=t=>{this._methods.release(t),super.removeRequestHandler(t)};removeNotificationHandler=t=>{this._methods.release(t),super.removeNotificationHandler(t)};replaceRequestHandler=(t,...o)=>{this._methods.replace(t),super.setRequestHandler.call(this,t,...o)};_assertInitialized(t){if(this._initializedSent)return;let o=`[ext-apps] App.${t}() 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(o);console.warn(`${o}. This will throw in a future release.`)}eventSchemas={toolinput:BS,toolinputpartial:WS,toolresult:sg,toolcancelled:GS,hostcontextchanged:ig};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(t){if(!ai.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let o=`[ext-apps] "${String(t)}" 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(o);console.warn(o)}setEventHandler(t,o){o&&this._assertHandlerTiming(t),this._ensureEventSlot(t),this._events.setHandler(t,o)}addEventListener(t,o){this._assertHandlerTiming(t),this._ensureEventSlot(t),this._events.addEventListener(t,o)}removeEventListener(t,o){this._events.removeEventListener(t,o)}_ensureEventSlot(t){if(this._registeredEvents.has(t))return;let o=this.eventSchemas[t];if(!o)throw Error(`Unknown event: ${String(t)}`);this.setNotificationHandler(o.shape.method.value,{params:o.shape.params},n=>{let s=n;t==="hostcontextchanged"&&(this._hostContext={...this._hostContext,...s}),this._events.dispatch(t,s)}),this._registeredEvents.add(t)}getEventHandler(t){return this._events.getHandler(t)}warnIfRequestHandlerReplaced(t,o,n){o&&n&&console.warn(`[MCP Apps] ${t} handler replaced. Previous handler will no longer be called.`)}constructor(t,o={},n={autoResize:!0}){super(n),this._appInfo=t,this._appCapabilities=o,this.options=n,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),!n.allowUnsafeEval&&xe({jitless:!0}),this.replaceRequestHandler("ping",s=>(console.log("Received ping:",s.params),{})),this.setEventHandler("hostcontextchanged",void 0)}buildContext(t){return t}registerAppCapabilities(t){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._appCapabilities=ug(this._appCapabilities,t)}registerTool(t,o,n){if(this._registeredTools[t])throw Error(`Tool ${t} is already registered`);let s=this,r=()=>{s._initializedSent&&s._appCapabilities.tools?.listChanged&&s.sendToolListChanged()},a=o.inputSchema!==void 0,c={title:o.title,description:o.description,inputSchema:o.inputSchema,outputSchema:o.outputSchema,annotations:o.annotations,_meta:o._meta,enabled:!0,enable(){this.enabled=!0,r()},disable(){this.enabled=!1,r()},update(u){Object.assign(this,u),r()},remove(){s._registeredTools[t]===c&&(delete s._registeredTools[t],r())},handler:async(u,d)=>{if(!c.enabled)throw Error(`Tool ${t} is disabled`);let h;if(a){let g=c.inputSchema,b=g?await Yi(g,u??{},`Invalid input for tool ${t}: `):u??{};h=await n(b,d)}else h=await n(d);return c.outputSchema&&!h.isError&&(h.structuredContent=await Yi(c.outputSchema,h.structuredContent,`Invalid output for tool ${t}: `)),h}};return this._registeredTools[t]=c,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),r(),c}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(t,o)=>{let n=this._registeredTools[t.name];if(!n)throw Error(`Tool ${t.name} not found`);return n.handler(t.arguments,o)},this.onlisttools=async(t,o)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([n,s])=>s.enabled).map(async([n,s])=>{let r={name:n,title:s.title,description:s.description,inputSchema:s.inputSchema?await Ki(s.inputSchema,"input"):{type:"object",properties:{}}};return s.outputSchema&&(r.outputSchema=await Ki(s.outputSchema,"output")),s.annotations&&(r.annotations=s.annotations),s._meta&&(r._meta=s._meta),r}))}))}async sendToolListChanged(t={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:t})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(t){this.setEventHandler("toolinput",t)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(t){this.setEventHandler("toolinputpartial",t)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(t){this.setEventHandler("toolresult",t)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(t){this.setEventHandler("toolcancelled",t)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(t){this.setEventHandler("hostcontextchanged",t)}_onteardown;get onteardown(){return this._onteardown}set onteardown(t){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,t),this._onteardown=t,this.replaceRequestHandler("ui/resource-teardown",{params:QS.shape.params,result:XS},(o,n)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(o,n)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(t){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,t),this._oncalltool=t,this.replaceRequestHandler("tools/call",(o,n)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(o.params,n)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(t){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,t),this._onlisttools=t,this.replaceRequestHandler("tools/list",(o,n)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(o.params,n)})}assertCapabilityForMethod(t){switch(t){case"sampling/createMessage":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${t})`);break}}assertRequestHandlerCapability(t){switch(t){case"tools/call":case"tools/list":if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${t})`);return;default:return}}assertNotificationCapability(t){}async callServerTool(t,o){if(this._assertInitialized("callServerTool"),typeof t=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${t}"). Did you mean: callServerTool({ name: "${t}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:t},{onprogress:()=>{},resetTimeoutOnProgress:!0,...o})}async readServerResource(t,o){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:t},o)}async listServerResources(t,o){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:t},o)}async createSamplingMessage(t,o){return this._assertInitialized("createSamplingMessage"),await this.request({method:"sampling/createMessage",params:t},o)}sendMessage(t,o){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:t},VS,o)}sendLog(t){return this.notification({method:"notifications/message",params:t})}updateModelContext(t,o){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:t},On,o)}openLink(t,o){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:t},FS,o)}sendOpenLink=this.openLink;downloadFile(t,o){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:t},JS,o)}requestTeardown(t={}){return this.notification({method:"ui/notifications/request-teardown",params:t})}requestDisplayMode(t,o){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:t},og,o)}sendSizeChanged(t){return this.notification({method:"ui/notifications/size-changed",params:t})}setupSizeChangedNotifications(){let t=!1,o=0,n=0,s=()=>{t||(t=!0,requestAnimationFrame(()=>{t=!1;let a=document.documentElement,c=a.style.height;a.style.height="max-content";let u=Math.ceil(a.getBoundingClientRect().height);a.style.height=c;let d=Math.ceil(window.innerWidth);(d!==o||u!==n)&&(o=d,n=u,this.sendSizeChanged({width:d,height:u}))}))};s();let r=new ResizeObserver(s);return r.observe(document.documentElement),r.observe(document.body),()=>r.disconnect()}async connect(t=new US(window.parent,window.parent),o){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1;try{await super.connect(t);let n=await this.request({method:"ui/initialize",params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:AS}},rg,o);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);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}}}const pg="0.1.1",jo=document.getElementById("status"),ds=document.getElementById("status-text"),Pn=document.getElementById("editor"),dg=document.querySelector('meta[name="pen-editor-url"]').content,we=new ai({name:"pen.dev",version:pg});let ts,ms,Qi,bl,Io,Xi=!1,hs=!1;we.ontoolresult=({structuredContent:e})=>{ts||!e||(ts=e,mg(ts))};we.onhostcontextchanged=()=>{yl();const e=we.getHostContext()?.theme;e&&e!==Io&&(Io=e,bl?.("color-theme-changed",{theme:Io}))};we.onteardown=async()=>(hs=!0,{});await we.connect();Io=we.getHostContext()?.theme;yl();we.getHostContext()?.availableDisplayModes?.includes("fullscreen")&&we.requestDisplayMode({mode:"fullscreen"}).catch(()=>{});function vl(e){ds.textContent=e,jo.classList.add("message"),jo.hidden=!1}function yl(){const e=we.getHostContext();document.body.classList.toggle("fullscreen",e?.displayMode==="fullscreen"),e?.theme&&cg(e.theme),e?.styles?.variables&&lg(e.styles.variables)}function mg(e){const t=new URL(dg);t.searchParams.set("embed",""),ds.textContent=`Opening ${e.filePath.split(/[\\/]/).pop()}…`,setTimeout(()=>{!jo.hidden&&!jo.classList.contains("message")&&(ds.textContent="This is taking longer than usual…")},2e4),window.addEventListener("message",o=>{o.source===Pn.contentWindow&&o.data?.type==="pen:ready"&&hg(t.origin,e)}),Pn.src=t.href}function hg(e,t){const o=new MessageChannel,n=new Map;let s=0;Qi?.(),Qi=()=>{for(const r of n.values())r.reject(new Error("The editor reloaded."));n.clear(),o.port1.close()},o.port1.onmessage=({data:r})=>{switch(r?.kind){case"ready":jo.hidden=!0,fg(t);break;case"error":vl(r.message);break;case"request":gg(o.port1,r,t);break;case"response":{const a=n.get(r.id);n.delete(r.id),r.error?a?.reject(new Error(r.error.message)):a?.resolve(r.payload);break}case"notification":r.method==="selection-changed"&&yg(t,r.payload);break}},bl=(r,a)=>o.port1.postMessage({kind:"notification",method:r,payload:a}),ms=(r,a)=>new Promise((c,u)=>{const d=`app-${++s}`;n.set(d,{resolve:c,reject:u}),o.port1.postMessage({kind:"request",id:d,method:r,payload:a})}),Pn.contentWindow?.postMessage({type:"pen:connect",fileURI:t.fileURI,theme:Io},e,[o.port2])}async function fg(e){if(Xi)return;Xi=!0;const t={viewId:e.viewId,filePath:e.filePath};for(;!hs;){let o;try{o=(await we.callServerTool({name:"next_command",arguments:t})).structuredContent}catch{await new Promise(n=>setTimeout(n,1e3));continue}switch(o.kind){case"replaced":hs=!0,Pn.src="about:blank",vl("This document is now open in a newer editor.");break;case"command":await we.callServerTool({name:"command_result",arguments:{...t,commandId:o.command.id,result:await Sg(o.command)}}).catch(()=>{});break}}}async function Sg(e){try{if(!ms)throw new Error("The editor is not connected.");return await ms("mcp-tool-call",{name:e.name,arguments:e.arguments})}catch(t){return{isError:!0,content:[{type:"text",text:t instanceof Error?t.message:String(t)}]}}}async function gg(e,{id:t,method:o,payload:n},s){try{e.postMessage({kind:"response",id:t,payload:await _g(o,n,s)})}catch(r){e.postMessage({kind:"response",id:t,error:{code:"STORAGE_FAILED",message:r instanceof Error?r.message:String(r)}})}}async function _g(e,t,o){const n=async c=>{const u=await we.callServerTool({name:"editor_storage",arguments:{viewId:o.viewId,filePath:o.filePath,request:c}});if(u.isError)throw new Error(JSON.stringify(u.content));return u.structuredContent},{content:s,path:r,data:a}=t??{};switch(e){case"storage-load":return n({method:e});case"storage-write":{const{saved:c}=await n({method:e,content:s??""});return c?pi.Saved:pi.WriteFailed}case"storage-read-asset":{const c=await n({method:e,path:r??""});return typeof c.data=="string"?vg(c.data):void 0}case"storage-write-asset":await n({method:e,path:r??"",data:bg(a??new Uint8Array)});return;case"storage-has-asset":return(await n({method:e,path:r??""})).exists;default:throw new Error(`Unsupported editor request: ${e}`)}}function bg(e){let t="";for(const o of e)t+=String.fromCharCode(o);return btoa(t)}function vg(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}function yg(e,{nodes:t}){we.updateModelContext({content:t.map(o=>({type:"text",text:`pen.dev selected node id: ${o.id}${o.name?`, name: ${o.name}`:""}, type: ${o.type}, file: ${e.filePath}`,_meta:{"openai/title":o.name??o.id}}))}).catch(()=>{})}</script>
  </head>
  <body>
    <div id="app">
      <iframe
        id="editor"
        title="pen.dev editor"
        allow="clipboard-read; clipboard-write"
      ></iframe>
      <div id="status" role="status">
        <img
          class="logo logo-light"
          src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAABYCAYAAADbc6GhAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAKNFJREFUeAHtnQu0JFV57/9V3efR55xh5swDRAj08BCQJCJRvOYKNIK8si4MXhVcAqeB4CMxEYg3XhJcNOCDGw2CcrOueO+dYzCPtbKiGIxEYDg9goIhwAEUIwgUUYfX4MzAPM/pUzv1VdWuvXdVddfu7uo+fYb9m6nT3VW7qqu6qr7//r5v710WgML69euHjn3b22aef/6F4+b27MHIyKhlWbAajQbm5+f9ac/uXdizZw7z3jzXdWHZNvxCFrzJhu29sf15wefg1Qom+mfbbvDR8svCXweMtlOwvTm2zfzXAEbb8grRf0ZvLPpjB9vysaJ3YIz5b12X+at4M8LZjP6A4++3ZYXr0C4F+0ffNTQ0hNFSCZMrVjBv3kOf+cxnKrfeeuser2gDBoPBYEhQ9KaFlavWNK699rpGdWrKfumll/D/16/HU08+CXdhAUPDw1i5eg0Oe9ObcOhhb8Ib938Dli9fjrGxMYyOjmDEWz5ULHoGuIhicQjFQsF7LXhG2XsteCJRIIEokLW2yWDbgWD4y0kwbK98gcoFIuKJCr2nt/y9HRh6EidvZwNhQfQ5+BCKkooyg4sJnxa8Y6Op4U3zc3PYsWMHNm3ahL/7+7+3du3ceey11167vVAolKanp42AGAyLS0WjzKw3bYWhrxSvueaay//gD//AfebpnxeHvVr4jTfdhB/dfz8mJyd94++ZXr92PjJSAnkkL3oCs2XLFgwPD3nTsC8gw76IeOJBIlIo+gJS8F4LhVAsfJEohMJhB/P9cnwKREesW/BFh4sLrWeF63IPxpLfh1PklUjeSUDgKYmPYrkveKUxlErjOOCAA/DY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fg4PjCcN8DD33nqKOOcH+1aRO78tM1dsklF7v3PfDwP4dlCjAYDAbDwGFh8SGBWPir/zv9d888+dPzXnrpZfbO4yt/+7FLLjyfL4PBYDAYDE3wheyssy5e9rmbb14VzjNhK4PBYBhg/hPRaoiXn4Q+pwAAAABJRU5ErkJggg=="
          alt="pen.dev"
        />
        <img
          class="logo logo-dark"
          src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAABYCAYAAADbc6GhAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAKb9JREFUeAHtfQuYHMV17ume3sfsrqRdvTCGwIiHAZPEhtj4OtdCIwvzyndB+NoGfwZ2BcGPxIkl4htfEvxpBX5wYwdLNjffNb73ah05j+/LFwPBMTEgdmSwwSHACmwcg0FDbIuXsFboubuzXanTXdVV1d0zXT3TPTsr6pd6u6f7VHVVP85f55yqagsAClu3bu06+x3vGH/xxZfOmZ6agp6eXsuywKrVajAzM+MtU0cOw9TUNMzQfa7rgmXb4AlZQBcbbLphe/v83/7a8hf8Z9uu/9PyZMFLAwTzKdh0j20Tb+2DYF5UCP8T3LDwj+3n5cEKtoAQ4m26LvGS0B1sN8E/wOGV27JYGiySXz48V1dXF/QWizA0OEjovsc+97nPlbdt2zZFRWtgYGBgYBCBQ5fZxUuW1W666ebayPCw/corr8D/37oVnn3mGXBnZ6GruxsWL10Gp7zlLXDyKW+BNx/7Jli0aBH09fVBb28P9NDjXY5DFbADjtMFTqFA1wWqlOm6QEmigARRQG1to8K2fcLwjiNh2FS+gHI+iVBSwW3c5Nu2r+iRnGhhfWKB4Lf/g5GSCmUHJxO+zNK64VKjy8z0NBw8eBB2794Nf/f3f28dPnTo7JtuuulAoVAojo2NGQIxMJhD0Pe1rCE2QRt+k2DQVjibNm3a8Ad/+Afu88/93OmmrfDNW7bAjx5+GIaGhjzlT2+f1zrv6SkCWi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JyYsBcuOfaPV69619dZ2V0wMDAwMJgTtINAEMgE9uXv/2//5/0f+Mj6gjttj1d2BCSCcCVR5euFOKvukSnyyCM/sJYfX/rzNee++2tw9JEHfr9hRcKyDgwMDAw6CO0iEAQqfHvl775jy+VXXjt65PVf2xVKIgMLaEzEdb2xIIREvVGEBkju/d6/WCecfPrnzy+/5wtwFFoe7JvM1aQFDAwMDDoI7SQQhEciq1e+a9MVV1335Zd+VbXHx3eQBQsWUBLxBQib5p14kyPa5G/+Zpu16r2X3nbhmlU3gnFbGRgYGHQM2k0gCI9ELljznv9x5bqPff1nP5mwxnc8SEmkX4wDcQn09PSQb9z+dfjvH7z6m+88+9Q/AkMeBgYGBgYMHnl9++7vfuvcc1e6mz5/izszM0M+/od/TH7+3PPkmmvWuQ8/OvGPsqyBgYGBgQGHRwwPPfLYd8444zT3V7t3kxs+O0quvfYa96FHHv9nJlMAAwMDA4OOgwVzDySI2b/6v2N/9/wzP73ilVdeJe9eWf7bT1x79ZX8GBgYGBgYGNSBR2SXXHLNgi/cdtsSts+4rQwMDAw6GP8J7L9HA8tugoEAAAAASUVORK5CYII="
          alt="pen.dev"
        />
        <div id="spinner"></div>
        <p id="status-text">Opening the editor…</p>
      </div>
    </div>
  </body>
</html>

SHA-256: 95cb88ae68f8aeb5d2f5cdba43222b6c7e42b321baf6ab896407b178f618731b