@modelcontextprotocol/ext-apps 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- var x2=Object.defineProperty;var u2=(Q,Y)=>{for(var X in Y)x2(Q,X,{get:Y[X],enumerable:!0,configurable:!0,set:(W)=>Y[X]=()=>W})};import{CallToolRequestSchema as f9,CallToolResultSchema as o9,ListPromptsRequestSchema as l9,ListPromptsResultSchema as r9,ListResourcesRequestSchema as p9,ListResourcesResultSchema as d9,ListResourceTemplatesRequestSchema as i9,ListResourceTemplatesResultSchema as n9,LoggingMessageNotificationSchema as e9,PingRequestSchema as t9,PromptListChangedNotificationSchema as a9,ReadResourceRequestSchema as s9,ReadResourceResultSchema as QX,ResourceListChangedNotificationSchema as YX,ToolListChangedNotificationSchema as XX}from"@modelcontextprotocol/sdk/types.js";import{Protocol as WX}from"@modelcontextprotocol/sdk/shared/protocol.js";var n="2025-11-21";var LX=Object.freeze({status:"aborted"});function w(Q,Y,X){function W(A,L){if(!A._zod)Object.defineProperty(A,"_zod",{value:{def:L,constr:K,traits:new Set},enumerable:!1});if(A._zod.traits.has(Q))return;A._zod.traits.add(Q),Y(A,L);let H=K.prototype,N=Object.keys(H);for(let q=0;q<N.length;q++){let O=N[q];if(!(O in A))A[O]=H[O].bind(A)}}let G=X?.Parent??Object;class J extends G{}Object.defineProperty(J,"name",{value:Q});function K(A){var L;let H=X?.Parent?new J:this;W(H,A),(L=H._zod).deferred??(L.deferred=[]);for(let N of H._zod.deferred)N();return H}return Object.defineProperty(K,"init",{value:W}),Object.defineProperty(K,Symbol.hasInstance,{value:(A)=>{if(X?.Parent&&A instanceof X.Parent)return!0;return A?._zod?.traits?.has(Q)}}),Object.defineProperty(K,"name",{value:Q}),K}var HX=Symbol("zod_brand");class h extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class XQ extends Error{constructor(Q){super(`Encountered unidirectional transform during encode: ${Q}`);this.name="ZodEncodeError"}}var IQ={};function v(Q){if(Q)Object.assign(IQ,Q);return IQ}var I={};u2(I,{unwrapMessage:()=>WQ,uint8ArrayToHex:()=>H3,uint8ArrayToBase64url:()=>w3,uint8ArrayToBase64:()=>mY,stringifyPrimitive:()=>xY,slugify:()=>yQ,shallowClone:()=>gY,safeExtend:()=>X3,required:()=>J3,randomString:()=>n2,propertyKeyTypes:()=>mQ,promiseAllObject:()=>i2,primitiveTypes:()=>hY,prefixIssues:()=>u,pick:()=>s2,partial:()=>G3,optionalKeys:()=>fQ,omit:()=>Q3,objectClone:()=>r2,numKeys:()=>e2,nullish:()=>KQ,normalizeParams:()=>B,mergeDefs:()=>f,merge:()=>W3,jsonStringifyReplacer:()=>t,joinValues:()=>l2,issue:()=>a,isPlainObject:()=>o,isObject:()=>e,hexToUint8Array:()=>L3,getSizableOrigin:()=>yY,getParsedType:()=>t2,getLengthableOrigin:()=>wQ,getEnumValues:()=>GQ,getElementAtPath:()=>d2,floatSafeRemainder:()=>uQ,finalizeIssue:()=>j,extend:()=>Y3,escapeRegex:()=>x,esc:()=>DQ,defineLazy:()=>D,createTransparentProxy:()=>a2,cloneDef:()=>p2,clone:()=>b,cleanRegex:()=>AQ,cleanEnum:()=>K3,captureStackTrace:()=>MQ,cached:()=>JQ,base64urlToUint8Array:()=>A3,base64ToUint8Array:()=>cY,assignProp:()=>m,assertNotEqual:()=>c2,assertNever:()=>f2,assertIs:()=>m2,assertEqual:()=>y2,assert:()=>o2,allowsEval:()=>cQ,aborted:()=>l,NUMBER_FORMAT_RANGES:()=>oQ,Class:()=>fY,BIGINT_FORMAT_RANGES:()=>uY});function y2(Q){return Q}function c2(Q){return Q}function m2(Q){}function f2(Q){throw Error("Unexpected value in exhaustive check")}function o2(Q){}function GQ(Q){let Y=Object.values(Q).filter((W)=>typeof W==="number");return Object.entries(Q).filter(([W,G])=>Y.indexOf(+W)===-1).map(([W,G])=>G)}function l2(Q,Y="|"){return Q.map((X)=>xY(X)).join(Y)}function t(Q,Y){if(typeof Y==="bigint")return Y.toString();return Y}function JQ(Q){return{get value(){{let X=Q();return Object.defineProperty(this,"value",{value:X}),X}throw Error("cached value already set")}}}function KQ(Q){return Q===null||Q===void 0}function AQ(Q){let Y=Q.startsWith("^")?1:0,X=Q.endsWith("$")?Q.length-1:Q.length;return Q.slice(Y,X)}function uQ(Q,Y){let X=(Q.toString().split(".")[1]||"").length,W=Y.toString(),G=(W.split(".")[1]||"").length;if(G===0&&/\d?e-\d?/.test(W)){let L=W.match(/\d?e-(\d?)/);if(L?.[1])G=Number.parseInt(L[1])}let J=X>G?X:G,K=Number.parseInt(Q.toFixed(J).replace(".","")),A=Number.parseInt(Y.toFixed(J).replace(".",""));return K%A/10**J}var vY=Symbol("evaluating");function D(Q,Y,X){let W=void 0;Object.defineProperty(Q,Y,{get(){if(W===vY)return;if(W===void 0)W=vY,W=X();return W},set(G){Object.defineProperty(Q,Y,{value:G})},configurable:!0})}function r2(Q){return Object.create(Object.getPrototypeOf(Q),Object.getOwnPropertyDescriptors(Q))}function m(Q,Y,X){Object.defineProperty(Q,Y,{value:X,writable:!0,enumerable:!0,configurable:!0})}function f(...Q){let Y={};for(let X of Q){let W=Object.getOwnPropertyDescriptors(X);Object.assign(Y,W)}return Object.defineProperties({},Y)}function p2(Q){return f(Q._zod.def)}function d2(Q,Y){if(!Y)return Q;return Y.reduce((X,W)=>X?.[W],Q)}function i2(Q){let Y=Object.keys(Q),X=Y.map((W)=>Q[W]);return Promise.all(X).then((W)=>{let G={};for(let J=0;J<Y.length;J++)G[Y[J]]=W[J];return G})}function n2(Q=10){let X="";for(let W=0;W<Q;W++)X+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return X}function DQ(Q){return JSON.stringify(Q)}function yQ(Q){return Q.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var MQ="captureStackTrace"in Error?Error.captureStackTrace:(...Q)=>{};function e(Q){return typeof Q==="object"&&Q!==null&&!Array.isArray(Q)}var cQ=JQ(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(Q){return!1}});function o(Q){if(e(Q)===!1)return!1;let Y=Q.constructor;if(Y===void 0)return!0;if(typeof Y!=="function")return!0;let X=Y.prototype;if(e(X)===!1)return!1;if(Object.prototype.hasOwnProperty.call(X,"isPrototypeOf")===!1)return!1;return!0}function gY(Q){if(o(Q))return{...Q};if(Array.isArray(Q))return[...Q];return Q}function e2(Q){let Y=0;for(let X in Q)if(Object.prototype.hasOwnProperty.call(Q,X))Y++;return Y}var t2=(Q)=>{let Y=typeof Q;switch(Y){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(Q)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(Q))return"array";if(Q===null)return"null";if(Q.then&&typeof Q.then==="function"&&Q.catch&&typeof Q.catch==="function")return"promise";if(typeof Map<"u"&&Q instanceof Map)return"map";if(typeof Set<"u"&&Q instanceof Set)return"set";if(typeof Date<"u"&&Q instanceof Date)return"date";if(typeof File<"u"&&Q instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${Y}`)}},mQ=new Set(["string","number","symbol"]),hY=new Set(["string","number","bigint","boolean","symbol","undefined"]);function x(Q){return Q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(Q,Y,X){let W=new Q._zod.constr(Y??Q._zod.def);if(!Y||X?.parent)W._zod.parent=Q;return W}function B(Q){let Y=Q;if(!Y)return{};if(typeof Y==="string")return{error:()=>Y};if(Y?.message!==void 0){if(Y?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");Y.error=Y.message}if(delete Y.message,typeof Y.error==="string")return{...Y,error:()=>Y.error};return Y}function a2(Q){let Y;return new Proxy({},{get(X,W,G){return Y??(Y=Q()),Reflect.get(Y,W,G)},set(X,W,G,J){return Y??(Y=Q()),Reflect.set(Y,W,G,J)},has(X,W){return Y??(Y=Q()),Reflect.has(Y,W)},deleteProperty(X,W){return Y??(Y=Q()),Reflect.deleteProperty(Y,W)},ownKeys(X){return Y??(Y=Q()),Reflect.ownKeys(Y)},getOwnPropertyDescriptor(X,W){return Y??(Y=Q()),Reflect.getOwnPropertyDescriptor(Y,W)},defineProperty(X,W,G){return Y??(Y=Q()),Reflect.defineProperty(Y,W,G)}})}function xY(Q){if(typeof Q==="bigint")return Q.toString()+"n";if(typeof Q==="string")return`"${Q}"`;return`${Q}`}function fQ(Q){return Object.keys(Q).filter((Y)=>{return Q[Y]._zod.optin==="optional"&&Q[Y]._zod.optout==="optional"})}var oQ={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},uY={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function s2(Q,Y){let X=Q._zod.def,W=f(Q._zod.def,{get shape(){let G={};for(let J in Y){if(!(J in X.shape))throw Error(`Unrecognized key: "${J}"`);if(!Y[J])continue;G[J]=X.shape[J]}return m(this,"shape",G),G},checks:[]});return b(Q,W)}function Q3(Q,Y){let X=Q._zod.def,W=f(Q._zod.def,{get shape(){let G={...Q._zod.def.shape};for(let J in Y){if(!(J in X.shape))throw Error(`Unrecognized key: "${J}"`);if(!Y[J])continue;delete G[J]}return m(this,"shape",G),G},checks:[]});return b(Q,W)}function Y3(Q,Y){if(!o(Y))throw Error("Invalid input to extend: expected a plain object");let X=Q._zod.def.checks;if(X&&X.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let G=f(Q._zod.def,{get shape(){let J={...Q._zod.def.shape,...Y};return m(this,"shape",J),J},checks:[]});return b(Q,G)}function X3(Q,Y){if(!o(Y))throw Error("Invalid input to safeExtend: expected a plain object");let X={...Q._zod.def,get shape(){let W={...Q._zod.def.shape,...Y};return m(this,"shape",W),W},checks:Q._zod.def.checks};return b(Q,X)}function W3(Q,Y){let X=f(Q._zod.def,{get shape(){let W={...Q._zod.def.shape,...Y._zod.def.shape};return m(this,"shape",W),W},get catchall(){return Y._zod.def.catchall},checks:[]});return b(Q,X)}function G3(Q,Y,X){let W=f(Y._zod.def,{get shape(){let G=Y._zod.def.shape,J={...G};if(X)for(let K in X){if(!(K in G))throw Error(`Unrecognized key: "${K}"`);if(!X[K])continue;J[K]=Q?new Q({type:"optional",innerType:G[K]}):G[K]}else for(let K in G)J[K]=Q?new Q({type:"optional",innerType:G[K]}):G[K];return m(this,"shape",J),J},checks:[]});return b(Y,W)}function J3(Q,Y,X){let W=f(Y._zod.def,{get shape(){let G=Y._zod.def.shape,J={...G};if(X)for(let K in X){if(!(K in J))throw Error(`Unrecognized key: "${K}"`);if(!X[K])continue;J[K]=new Q({type:"nonoptional",innerType:G[K]})}else for(let K in G)J[K]=new Q({type:"nonoptional",innerType:G[K]});return m(this,"shape",J),J},checks:[]});return b(Y,W)}function l(Q,Y=0){if(Q.aborted===!0)return!0;for(let X=Y;X<Q.issues.length;X++)if(Q.issues[X]?.continue!==!0)return!0;return!1}function u(Q,Y){return Y.map((X)=>{var W;return(W=X).path??(W.path=[]),X.path.unshift(Q),X})}function WQ(Q){return typeof Q==="string"?Q:Q?.message}function j(Q,Y,X){let W={...Q,path:Q.path??[]};if(!Q.message){let G=WQ(Q.inst?._zod.def?.error?.(Q))??WQ(Y?.error?.(Q))??WQ(X.customError?.(Q))??WQ(X.localeError?.(Q))??"Invalid input";W.message=G}if(delete W.inst,delete W.continue,!Y?.reportInput)delete W.input;return W}function yY(Q){if(Q instanceof Set)return"set";if(Q instanceof Map)return"map";if(Q instanceof File)return"file";return"unknown"}function wQ(Q){if(Array.isArray(Q))return"array";if(typeof Q==="string")return"string";return"unknown"}function a(...Q){let[Y,X,W]=Q;if(typeof Y==="string")return{message:Y,code:"custom",input:X,inst:W};return{...Y}}function K3(Q){return Object.entries(Q).filter(([Y,X])=>{return Number.isNaN(Number.parseInt(Y,10))}).map((Y)=>Y[1])}function cY(Q){let Y=atob(Q),X=new Uint8Array(Y.length);for(let W=0;W<Y.length;W++)X[W]=Y.charCodeAt(W);return X}function mY(Q){let Y="";for(let X=0;X<Q.length;X++)Y+=String.fromCharCode(Q[X]);return btoa(Y)}function A3(Q){let Y=Q.replace(/-/g,"+").replace(/_/g,"/"),X="=".repeat((4-Y.length%4)%4);return cY(Y+X)}function w3(Q){return mY(Q).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function L3(Q){let Y=Q.replace(/^0x/,"");if(Y.length%2!==0)throw Error("Invalid hex string length");let X=new Uint8Array(Y.length/2);for(let W=0;W<Y.length;W+=2)X[W/2]=Number.parseInt(Y.slice(W,W+2),16);return X}function H3(Q){return Array.from(Q).map((Y)=>Y.toString(16).padStart(2,"0")).join("")}class fY{constructor(...Q){}}var oY=(Q,Y)=>{Q.name="$ZodError",Object.defineProperty(Q,"_zod",{value:Q._zod,enumerable:!1}),Object.defineProperty(Q,"issues",{value:Y,enumerable:!1}),Q.message=JSON.stringify(Y,t,2),Object.defineProperty(Q,"toString",{value:()=>Q.message,enumerable:!1})},FQ=w("$ZodError",oY),lQ=w("$ZodError",oY,{Parent:Error});function lY(Q,Y=(X)=>X.message){let X={},W=[];for(let G of Q.issues)if(G.path.length>0)X[G.path[0]]=X[G.path[0]]||[],X[G.path[0]].push(Y(G));else W.push(Y(G));return{formErrors:W,fieldErrors:X}}function rY(Q,Y=(X)=>X.message){let X={_errors:[]},W=(G)=>{for(let J of G.issues)if(J.code==="invalid_union"&&J.errors.length)J.errors.map((K)=>W({issues:K}));else if(J.code==="invalid_key")W({issues:J.issues});else if(J.code==="invalid_element")W({issues:J.issues});else if(J.path.length===0)X._errors.push(Y(J));else{let K=X,A=0;while(A<J.path.length){let L=J.path[A];if(A!==J.path.length-1)K[L]=K[L]||{_errors:[]};else K[L]=K[L]||{_errors:[]},K[L]._errors.push(Y(J));K=K[L],A++}}};return W(Q),X}var VQ=(Q)=>(Y,X,W,G)=>{let J=W?Object.assign(W,{async:!1}):{async:!1},K=Y._zod.run({value:X,issues:[]},J);if(K instanceof Promise)throw new h;if(K.issues.length){let A=new(G?.Err??Q)(K.issues.map((L)=>j(L,J,v())));throw MQ(A,G?.callee),A}return K.value};var UQ=(Q)=>async(Y,X,W,G)=>{let J=W?Object.assign(W,{async:!0}):{async:!0},K=Y._zod.run({value:X,issues:[]},J);if(K instanceof Promise)K=await K;if(K.issues.length){let A=new(G?.Err??Q)(K.issues.map((L)=>j(L,J,v())));throw MQ(A,G?.callee),A}return K.value};var LQ=(Q)=>(Y,X,W)=>{let G=W?{...W,async:!1}:{async:!1},J=Y._zod.run({value:X,issues:[]},G);if(J instanceof Promise)throw new h;return J.issues.length?{success:!1,error:new(Q??FQ)(J.issues.map((K)=>j(K,G,v())))}:{success:!0,data:J.value}},pY=LQ(lQ),HQ=(Q)=>async(Y,X,W)=>{let G=W?Object.assign(W,{async:!0}):{async:!0},J=Y._zod.run({value:X,issues:[]},G);if(J instanceof Promise)J=await J;return J.issues.length?{success:!1,error:new Q(J.issues.map((K)=>j(K,G,v())))}:{success:!0,data:J.value}},dY=HQ(lQ),iY=(Q)=>(Y,X,W)=>{let G=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return VQ(Q)(Y,X,G)};var nY=(Q)=>(Y,X,W)=>{return VQ(Q)(Y,X,W)};var eY=(Q)=>async(Y,X,W)=>{let G=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return UQ(Q)(Y,X,G)};var tY=(Q)=>async(Y,X,W)=>{return UQ(Q)(Y,X,W)};var aY=(Q)=>(Y,X,W)=>{let G=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return LQ(Q)(Y,X,G)};var sY=(Q)=>(Y,X,W)=>{return LQ(Q)(Y,X,W)};var Q0=(Q)=>async(Y,X,W)=>{let G=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return HQ(Q)(Y,X,G)};var Y0=(Q)=>async(Y,X,W)=>{return HQ(Q)(Y,X,W)};var X0=/^[cC][^\s-]{8,}$/,W0=/^[0-9a-z]+$/,G0=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,J0=/^[0-9a-vA-V]{20}$/,K0=/^[A-Za-z0-9]{27}$/,A0=/^[a-zA-Z0-9_-]{21}$/,w0=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var L0=/^([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})$/,rQ=(Q)=>{if(!Q)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${Q}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var H0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var N3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function E0(){return new RegExp(N3,"u")}var N0=/^(?:(?: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])$/,B0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;var z0=/^((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])$/,q0=/^(([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])$/,O0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pQ=/^[A-Za-z0-9_-]*$/;var I0=/^\+(?:[0-9]){6,14}[0-9]$/,D0="(?:(?:\\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])))",M0=new RegExp(`^${D0}$`);function F0(Q){return typeof Q.precision==="number"?Q.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":Q.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${Q.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function V0(Q){return new RegExp(`^${F0(Q)}$`)}function U0(Q){let Y=F0({precision:Q.precision}),X=["Z"];if(Q.local)X.push("");if(Q.offset)X.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let W=`${Y}(?:${X.join("|")})`;return new RegExp(`^${D0}T(?:${W})$`)}var $0=(Q)=>{let Y=Q?`[\\s\\S]{${Q?.minimum??0},${Q?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${Y}$`)};var P0=/^-?\d+$/,R0=/^-?\d+(?:\.\d+)?/,S0=/^(?:true|false)$/i;var _0=/^undefined$/i;var T0=/^[^A-Z]*$/,Z0=/^[^a-z]*$/;var S=w("$ZodCheck",(Q,Y)=>{var X;Q._zod??(Q._zod={}),Q._zod.def=Y,(X=Q._zod).onattach??(X.onattach=[])}),b0={number:"number",bigint:"bigint",object:"date"},dQ=w("$ZodCheckLessThan",(Q,Y)=>{S.init(Q,Y);let X=b0[typeof Y.value];Q._zod.onattach.push((W)=>{let G=W._zod.bag,J=(Y.inclusive?G.maximum:G.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(Y.value<J)if(Y.inclusive)G.maximum=Y.value;else G.exclusiveMaximum=Y.value}),Q._zod.check=(W)=>{if(Y.inclusive?W.value<=Y.value:W.value<Y.value)return;W.issues.push({origin:X,code:"too_big",maximum:Y.value,input:W.value,inclusive:Y.inclusive,inst:Q,continue:!Y.abort})}}),iQ=w("$ZodCheckGreaterThan",(Q,Y)=>{S.init(Q,Y);let X=b0[typeof Y.value];Q._zod.onattach.push((W)=>{let G=W._zod.bag,J=(Y.inclusive?G.minimum:G.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(Y.value>J)if(Y.inclusive)G.minimum=Y.value;else G.exclusiveMinimum=Y.value}),Q._zod.check=(W)=>{if(Y.inclusive?W.value>=Y.value:W.value>Y.value)return;W.issues.push({origin:X,code:"too_small",minimum:Y.value,input:W.value,inclusive:Y.inclusive,inst:Q,continue:!Y.abort})}}),j0=w("$ZodCheckMultipleOf",(Q,Y)=>{S.init(Q,Y),Q._zod.onattach.push((X)=>{var W;(W=X._zod.bag).multipleOf??(W.multipleOf=Y.value)}),Q._zod.check=(X)=>{if(typeof X.value!==typeof Y.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof X.value==="bigint"?X.value%Y.value===BigInt(0):uQ(X.value,Y.value)===0)return;X.issues.push({origin:typeof X.value,code:"not_multiple_of",divisor:Y.value,input:X.value,inst:Q,continue:!Y.abort})}}),C0=w("$ZodCheckNumberFormat",(Q,Y)=>{S.init(Q,Y),Y.format=Y.format||"float64";let X=Y.format?.includes("int"),W=X?"int":"number",[G,J]=oQ[Y.format];Q._zod.onattach.push((K)=>{let A=K._zod.bag;if(A.format=Y.format,A.minimum=G,A.maximum=J,X)A.pattern=P0}),Q._zod.check=(K)=>{let A=K.value;if(X){if(!Number.isInteger(A)){K.issues.push({expected:W,format:Y.format,code:"invalid_type",continue:!1,input:A,inst:Q});return}if(!Number.isSafeInteger(A)){if(A>0)K.issues.push({input:A,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:Q,origin:W,continue:!Y.abort});else K.issues.push({input:A,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:Q,origin:W,continue:!Y.abort});return}}if(A<G)K.issues.push({origin:"number",input:A,code:"too_small",minimum:G,inclusive:!0,inst:Q,continue:!Y.abort});if(A>J)K.issues.push({origin:"number",input:A,code:"too_big",maximum:J,inst:Q})}});var k0=w("$ZodCheckMaxLength",(Q,Y)=>{var X;S.init(Q,Y),(X=Q._zod.def).when??(X.when=(W)=>{let G=W.value;return!KQ(G)&&G.length!==void 0}),Q._zod.onattach.push((W)=>{let G=W._zod.bag.maximum??Number.POSITIVE_INFINITY;if(Y.maximum<G)W._zod.bag.maximum=Y.maximum}),Q._zod.check=(W)=>{let G=W.value;if(G.length<=Y.maximum)return;let K=wQ(G);W.issues.push({origin:K,code:"too_big",maximum:Y.maximum,inclusive:!0,input:G,inst:Q,continue:!Y.abort})}}),v0=w("$ZodCheckMinLength",(Q,Y)=>{var X;S.init(Q,Y),(X=Q._zod.def).when??(X.when=(W)=>{let G=W.value;return!KQ(G)&&G.length!==void 0}),Q._zod.onattach.push((W)=>{let G=W._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(Y.minimum>G)W._zod.bag.minimum=Y.minimum}),Q._zod.check=(W)=>{let G=W.value;if(G.length>=Y.minimum)return;let K=wQ(G);W.issues.push({origin:K,code:"too_small",minimum:Y.minimum,inclusive:!0,input:G,inst:Q,continue:!Y.abort})}}),g0=w("$ZodCheckLengthEquals",(Q,Y)=>{var X;S.init(Q,Y),(X=Q._zod.def).when??(X.when=(W)=>{let G=W.value;return!KQ(G)&&G.length!==void 0}),Q._zod.onattach.push((W)=>{let G=W._zod.bag;G.minimum=Y.length,G.maximum=Y.length,G.length=Y.length}),Q._zod.check=(W)=>{let G=W.value,J=G.length;if(J===Y.length)return;let K=wQ(G),A=J>Y.length;W.issues.push({origin:K,...A?{code:"too_big",maximum:Y.length}:{code:"too_small",minimum:Y.length},inclusive:!0,exact:!0,input:W.value,inst:Q,continue:!Y.abort})}}),EQ=w("$ZodCheckStringFormat",(Q,Y)=>{var X,W;if(S.init(Q,Y),Q._zod.onattach.push((G)=>{let J=G._zod.bag;if(J.format=Y.format,Y.pattern)J.patterns??(J.patterns=new Set),J.patterns.add(Y.pattern)}),Y.pattern)(X=Q._zod).check??(X.check=(G)=>{if(Y.pattern.lastIndex=0,Y.pattern.test(G.value))return;G.issues.push({origin:"string",code:"invalid_format",format:Y.format,input:G.value,...Y.pattern?{pattern:Y.pattern.toString()}:{},inst:Q,continue:!Y.abort})});else(W=Q._zod).check??(W.check=()=>{})}),h0=w("$ZodCheckRegex",(Q,Y)=>{EQ.init(Q,Y),Q._zod.check=(X)=>{if(Y.pattern.lastIndex=0,Y.pattern.test(X.value))return;X.issues.push({origin:"string",code:"invalid_format",format:"regex",input:X.value,pattern:Y.pattern.toString(),inst:Q,continue:!Y.abort})}}),x0=w("$ZodCheckLowerCase",(Q,Y)=>{Y.pattern??(Y.pattern=T0),EQ.init(Q,Y)}),u0=w("$ZodCheckUpperCase",(Q,Y)=>{Y.pattern??(Y.pattern=Z0),EQ.init(Q,Y)}),y0=w("$ZodCheckIncludes",(Q,Y)=>{S.init(Q,Y);let X=x(Y.includes),W=new RegExp(typeof Y.position==="number"?`^.{${Y.position}}${X}`:X);Y.pattern=W,Q._zod.onattach.push((G)=>{let J=G._zod.bag;J.patterns??(J.patterns=new Set),J.patterns.add(W)}),Q._zod.check=(G)=>{if(G.value.includes(Y.includes,Y.position))return;G.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:Y.includes,input:G.value,inst:Q,continue:!Y.abort})}}),c0=w("$ZodCheckStartsWith",(Q,Y)=>{S.init(Q,Y);let X=new RegExp(`^${x(Y.prefix)}.*`);Y.pattern??(Y.pattern=X),Q._zod.onattach.push((W)=>{let G=W._zod.bag;G.patterns??(G.patterns=new Set),G.patterns.add(X)}),Q._zod.check=(W)=>{if(W.value.startsWith(Y.prefix))return;W.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:Y.prefix,input:W.value,inst:Q,continue:!Y.abort})}}),m0=w("$ZodCheckEndsWith",(Q,Y)=>{S.init(Q,Y);let X=new RegExp(`.*${x(Y.suffix)}$`);Y.pattern??(Y.pattern=X),Q._zod.onattach.push((W)=>{let G=W._zod.bag;G.patterns??(G.patterns=new Set),G.patterns.add(X)}),Q._zod.check=(W)=>{if(W.value.endsWith(Y.suffix))return;W.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:Y.suffix,input:W.value,inst:Q,continue:!Y.abort})}});var f0=w("$ZodCheckOverwrite",(Q,Y)=>{S.init(Q,Y),Q._zod.check=(X)=>{X.value=Y.tx(X.value)}});class nQ{constructor(Q=[]){if(this.content=[],this.indent=0,this)this.args=Q}indented(Q){this.indent+=1,Q(this),this.indent-=1}write(Q){if(typeof Q==="function"){Q(this,{execution:"sync"}),Q(this,{execution:"async"});return}let X=Q.split(`
2
- `).filter((J)=>J),W=Math.min(...X.map((J)=>J.length-J.trimStart().length)),G=X.map((J)=>J.slice(W)).map((J)=>" ".repeat(this.indent*2)+J);for(let J of G)this.content.push(J)}compile(){let Q=Function,Y=this?.args,W=[...(this?.content??[""]).map((G)=>` ${G}`)];return new Q(...Y,W.join(`
3
- `))}}var l0={major:4,minor:2,patch:1};var M=w("$ZodType",(Q,Y)=>{var X;Q??(Q={}),Q._zod.def=Y,Q._zod.bag=Q._zod.bag||{},Q._zod.version=l0;let W=[...Q._zod.def.checks??[]];if(Q._zod.traits.has("$ZodCheck"))W.unshift(Q);for(let G of W)for(let J of G._zod.onattach)J(Q);if(W.length===0)(X=Q._zod).deferred??(X.deferred=[]),Q._zod.deferred?.push(()=>{Q._zod.run=Q._zod.parse});else{let G=(K,A,L)=>{let H=l(K),N;for(let q of A){if(q._zod.def.when){if(!q._zod.def.when(K))continue}else if(H)continue;let O=K.issues.length,U=q._zod.check(K);if(U instanceof Promise&&L?.async===!1)throw new h;if(N||U instanceof Promise)N=(N??Promise.resolve()).then(async()=>{if(await U,K.issues.length===O)return;if(!H)H=l(K,O)});else{if(K.issues.length===O)continue;if(!H)H=l(K,O)}}if(N)return N.then(()=>{return K});return K},J=(K,A,L)=>{if(l(K))return K.aborted=!0,K;let H=G(A,W,L);if(H instanceof Promise){if(L.async===!1)throw new h;return H.then((N)=>Q._zod.parse(N,L))}return Q._zod.parse(H,L)};Q._zod.run=(K,A)=>{if(A.skipChecks)return Q._zod.parse(K,A);if(A.direction==="backward"){let H=Q._zod.parse({value:K.value,issues:[]},{...A,skipChecks:!0});if(H instanceof Promise)return H.then((N)=>{return J(N,K,A)});return J(H,K,A)}let L=Q._zod.parse(K,A);if(L instanceof Promise){if(A.async===!1)throw new h;return L.then((H)=>G(H,W,A))}return G(L,W,A)}}Q["~standard"]={validate:(G)=>{try{let J=pY(Q,G);return J.success?{value:J.data}:{issues:J.error?.issues}}catch(J){return dY(Q,G).then((K)=>K.success?{value:K.data}:{issues:K.error?.issues})}},vendor:"zod",version:1}}),SQ=w("$ZodString",(Q,Y)=>{M.init(Q,Y),Q._zod.pattern=[...Q?._zod.bag?.patterns??[]].pop()??$0(Q._zod.bag),Q._zod.parse=(X,W)=>{if(Y.coerce)try{X.value=String(X.value)}catch(G){}if(typeof X.value==="string")return X;return X.issues.push({expected:"string",code:"invalid_type",input:X.value,inst:Q}),X}}),F=w("$ZodStringFormat",(Q,Y)=>{EQ.init(Q,Y),SQ.init(Q,Y)}),s0=w("$ZodGUID",(Q,Y)=>{Y.pattern??(Y.pattern=L0),F.init(Q,Y)}),Q1=w("$ZodUUID",(Q,Y)=>{if(Y.version){let W={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[Y.version];if(W===void 0)throw Error(`Invalid UUID version: "${Y.version}"`);Y.pattern??(Y.pattern=rQ(W))}else Y.pattern??(Y.pattern=rQ());F.init(Q,Y)}),Y1=w("$ZodEmail",(Q,Y)=>{Y.pattern??(Y.pattern=H0),F.init(Q,Y)}),X1=w("$ZodURL",(Q,Y)=>{F.init(Q,Y),Q._zod.check=(X)=>{try{let W=X.value.trim(),G=new URL(W);if(Y.hostname){if(Y.hostname.lastIndex=0,!Y.hostname.test(G.hostname))X.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Y.hostname.source,input:X.value,inst:Q,continue:!Y.abort})}if(Y.protocol){if(Y.protocol.lastIndex=0,!Y.protocol.test(G.protocol.endsWith(":")?G.protocol.slice(0,-1):G.protocol))X.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:Y.protocol.source,input:X.value,inst:Q,continue:!Y.abort})}if(Y.normalize)X.value=G.href;else X.value=W;return}catch(W){X.issues.push({code:"invalid_format",format:"url",input:X.value,inst:Q,continue:!Y.abort})}}}),W1=w("$ZodEmoji",(Q,Y)=>{Y.pattern??(Y.pattern=E0()),F.init(Q,Y)}),G1=w("$ZodNanoID",(Q,Y)=>{Y.pattern??(Y.pattern=A0),F.init(Q,Y)}),J1=w("$ZodCUID",(Q,Y)=>{Y.pattern??(Y.pattern=X0),F.init(Q,Y)}),K1=w("$ZodCUID2",(Q,Y)=>{Y.pattern??(Y.pattern=W0),F.init(Q,Y)}),A1=w("$ZodULID",(Q,Y)=>{Y.pattern??(Y.pattern=G0),F.init(Q,Y)}),w1=w("$ZodXID",(Q,Y)=>{Y.pattern??(Y.pattern=J0),F.init(Q,Y)}),L1=w("$ZodKSUID",(Q,Y)=>{Y.pattern??(Y.pattern=K0),F.init(Q,Y)}),H1=w("$ZodISODateTime",(Q,Y)=>{Y.pattern??(Y.pattern=U0(Y)),F.init(Q,Y)}),E1=w("$ZodISODate",(Q,Y)=>{Y.pattern??(Y.pattern=M0),F.init(Q,Y)}),N1=w("$ZodISOTime",(Q,Y)=>{Y.pattern??(Y.pattern=V0(Y)),F.init(Q,Y)}),B1=w("$ZodISODuration",(Q,Y)=>{Y.pattern??(Y.pattern=w0),F.init(Q,Y)}),z1=w("$ZodIPv4",(Q,Y)=>{Y.pattern??(Y.pattern=N0),F.init(Q,Y),Q._zod.bag.format="ipv4"}),q1=w("$ZodIPv6",(Q,Y)=>{Y.pattern??(Y.pattern=B0),F.init(Q,Y),Q._zod.bag.format="ipv6",Q._zod.check=(X)=>{try{new URL(`http://[${X.value}]`)}catch{X.issues.push({code:"invalid_format",format:"ipv6",input:X.value,inst:Q,continue:!Y.abort})}}});var O1=w("$ZodCIDRv4",(Q,Y)=>{Y.pattern??(Y.pattern=z0),F.init(Q,Y)}),I1=w("$ZodCIDRv6",(Q,Y)=>{Y.pattern??(Y.pattern=q0),F.init(Q,Y),Q._zod.check=(X)=>{let W=X.value.split("/");try{if(W.length!==2)throw Error();let[G,J]=W;if(!J)throw Error();let K=Number(J);if(`${K}`!==J)throw Error();if(K<0||K>128)throw Error();new URL(`http://[${G}]`)}catch{X.issues.push({code:"invalid_format",format:"cidrv6",input:X.value,inst:Q,continue:!Y.abort})}}});function D1(Q){if(Q==="")return!0;if(Q.length%4!==0)return!1;try{return atob(Q),!0}catch{return!1}}var M1=w("$ZodBase64",(Q,Y)=>{Y.pattern??(Y.pattern=O0),F.init(Q,Y),Q._zod.bag.contentEncoding="base64",Q._zod.check=(X)=>{if(D1(X.value))return;X.issues.push({code:"invalid_format",format:"base64",input:X.value,inst:Q,continue:!Y.abort})}});function B3(Q){if(!pQ.test(Q))return!1;let Y=Q.replace(/[-_]/g,(W)=>W==="-"?"+":"/"),X=Y.padEnd(Math.ceil(Y.length/4)*4,"=");return D1(X)}var F1=w("$ZodBase64URL",(Q,Y)=>{Y.pattern??(Y.pattern=pQ),F.init(Q,Y),Q._zod.bag.contentEncoding="base64url",Q._zod.check=(X)=>{if(B3(X.value))return;X.issues.push({code:"invalid_format",format:"base64url",input:X.value,inst:Q,continue:!Y.abort})}}),V1=w("$ZodE164",(Q,Y)=>{Y.pattern??(Y.pattern=I0),F.init(Q,Y)});function z3(Q,Y=null){try{let X=Q.split(".");if(X.length!==3)return!1;let[W]=X;if(!W)return!1;let G=JSON.parse(atob(W));if("typ"in G&&G?.typ!=="JWT")return!1;if(!G.alg)return!1;if(Y&&(!("alg"in G)||G.alg!==Y))return!1;return!0}catch{return!1}}var U1=w("$ZodJWT",(Q,Y)=>{F.init(Q,Y),Q._zod.check=(X)=>{if(z3(X.value,Y.alg))return;X.issues.push({code:"invalid_format",format:"jwt",input:X.value,inst:Q,continue:!Y.abort})}});var tQ=w("$ZodNumber",(Q,Y)=>{M.init(Q,Y),Q._zod.pattern=Q._zod.bag.pattern??R0,Q._zod.parse=(X,W)=>{if(Y.coerce)try{X.value=Number(X.value)}catch(K){}let G=X.value;if(typeof G==="number"&&!Number.isNaN(G)&&Number.isFinite(G))return X;let J=typeof G==="number"?Number.isNaN(G)?"NaN":!Number.isFinite(G)?"Infinity":void 0:void 0;return X.issues.push({expected:"number",code:"invalid_type",input:G,inst:Q,...J?{received:J}:{}}),X}}),$1=w("$ZodNumberFormat",(Q,Y)=>{C0.init(Q,Y),tQ.init(Q,Y)}),P1=w("$ZodBoolean",(Q,Y)=>{M.init(Q,Y),Q._zod.pattern=S0,Q._zod.parse=(X,W)=>{if(Y.coerce)try{X.value=Boolean(X.value)}catch(J){}let G=X.value;if(typeof G==="boolean")return X;return X.issues.push({expected:"boolean",code:"invalid_type",input:G,inst:Q}),X}});var R1=w("$ZodUndefined",(Q,Y)=>{M.init(Q,Y),Q._zod.pattern=_0,Q._zod.values=new Set([void 0]),Q._zod.optin="optional",Q._zod.optout="optional",Q._zod.parse=(X,W)=>{let G=X.value;if(typeof G>"u")return X;return X.issues.push({expected:"undefined",code:"invalid_type",input:G,inst:Q}),X}});var S1=w("$ZodUnknown",(Q,Y)=>{M.init(Q,Y),Q._zod.parse=(X)=>X}),_1=w("$ZodNever",(Q,Y)=>{M.init(Q,Y),Q._zod.parse=(X,W)=>{return X.issues.push({expected:"never",code:"invalid_type",input:X.value,inst:Q}),X}});function r0(Q,Y,X){if(Q.issues.length)Y.issues.push(...u(X,Q.issues));Y.value[X]=Q.value}var T1=w("$ZodArray",(Q,Y)=>{M.init(Q,Y),Q._zod.parse=(X,W)=>{let G=X.value;if(!Array.isArray(G))return X.issues.push({expected:"array",code:"invalid_type",input:G,inst:Q}),X;X.value=Array(G.length);let J=[];for(let K=0;K<G.length;K++){let A=G[K],L=Y.element._zod.run({value:A,issues:[]},W);if(L instanceof Promise)J.push(L.then((H)=>r0(H,X,K)));else r0(L,X,K)}if(J.length)return Promise.all(J).then(()=>X);return X}});function RQ(Q,Y,X,W){if(Q.issues.length)Y.issues.push(...u(X,Q.issues));if(Q.value===void 0){if(X in W)Y.value[X]=void 0}else Y.value[X]=Q.value}function Z1(Q){let Y=Object.keys(Q.shape);for(let W of Y)if(!Q.shape?.[W]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${W}": expected a Zod schema`);let X=fQ(Q.shape);return{...Q,keys:Y,keySet:new Set(Y),numKeys:Y.length,optionalKeys:new Set(X)}}function b1(Q,Y,X,W,G,J){let K=[],A=G.keySet,L=G.catchall._zod,H=L.def.type;for(let N in Y){if(A.has(N))continue;if(H==="never"){K.push(N);continue}let q=L.run({value:Y[N],issues:[]},W);if(q instanceof Promise)Q.push(q.then((O)=>RQ(O,X,N,Y)));else RQ(q,X,N,Y)}if(K.length)X.issues.push({code:"unrecognized_keys",keys:K,input:Y,inst:J});if(!Q.length)return X;return Promise.all(Q).then(()=>{return X})}var q3=w("$ZodObject",(Q,Y)=>{if(M.init(Q,Y),!Object.getOwnPropertyDescriptor(Y,"shape")?.get){let A=Y.shape;Object.defineProperty(Y,"shape",{get:()=>{let L={...A};return Object.defineProperty(Y,"shape",{value:L}),L}})}let W=JQ(()=>Z1(Y));D(Q._zod,"propValues",()=>{let A=Y.shape,L={};for(let H in A){let N=A[H]._zod;if(N.values){L[H]??(L[H]=new Set);for(let q of N.values)L[H].add(q)}}return L});let G=e,J=Y.catchall,K;Q._zod.parse=(A,L)=>{K??(K=W.value);let H=A.value;if(!G(H))return A.issues.push({expected:"object",code:"invalid_type",input:H,inst:Q}),A;A.value={};let N=[],q=K.shape;for(let O of K.keys){let T=q[O]._zod.run({value:H[O],issues:[]},L);if(T instanceof Promise)N.push(T.then((hQ)=>RQ(hQ,A,O,H)));else RQ(T,A,O,H)}if(!J)return N.length?Promise.all(N).then(()=>A):A;return b1(N,H,A,L,W.value,Q)}}),j1=w("$ZodObjectJIT",(Q,Y)=>{q3.init(Q,Y);let X=Q._zod.parse,W=JQ(()=>Z1(Y)),G=(O)=>{let U=new nQ(["shape","payload","ctx"]),T=W.value,hQ=(g)=>{let k=DQ(g);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};U.write("const input = payload.value;");let kY=Object.create(null),g2=0;for(let g of T.keys)kY[g]=`key_${g2++}`;U.write("const newResult = {};");for(let g of T.keys){let k=kY[g],YQ=DQ(g);U.write(`const ${k} = ${hQ(g)};`),U.write(`
1
+ var u4=Object.defineProperty;var y4=(Q,Y)=>{for(var X in Y)u4(Q,X,{get:Y[X],enumerable:!0,configurable:!0,set:(W)=>Y[X]=()=>W})};import{CallToolRequestSchema as oX,CallToolResultSchema as lX,ListPromptsRequestSchema as rX,ListPromptsResultSchema as pX,ListResourcesRequestSchema as dX,ListResourcesResultSchema as iX,ListResourceTemplatesRequestSchema as nX,ListResourceTemplatesResultSchema as eX,LoggingMessageNotificationSchema as tX,PingRequestSchema as aX,PromptListChangedNotificationSchema as sX,ReadResourceRequestSchema as Q2,ReadResourceResultSchema as Y2,ResourceListChangedNotificationSchema as X2,ToolListChangedNotificationSchema as W2}from"@modelcontextprotocol/sdk/types.js";import{Protocol as J2}from"@modelcontextprotocol/sdk/shared/protocol.js";var n="2025-11-21";var E2=Object.freeze({status:"aborted"});function L(Q,Y,X){function W(A,w){if(!A._zod)Object.defineProperty(A,"_zod",{value:{def:w,constr:K,traits:new Set},enumerable:!1});if(A._zod.traits.has(Q))return;A._zod.traits.add(Q),Y(A,w);let H=K.prototype,N=Object.keys(H);for(let O=0;O<N.length;O++){let q=N[O];if(!(q in A))A[q]=H[q].bind(A)}}let J=X?.Parent??Object;class G extends J{}Object.defineProperty(G,"name",{value:Q});function K(A){var w;let H=X?.Parent?new G:this;W(H,A),(w=H._zod).deferred??(w.deferred=[]);for(let N of H._zod.deferred)N();return H}return Object.defineProperty(K,"init",{value:W}),Object.defineProperty(K,Symbol.hasInstance,{value:(A)=>{if(X?.Parent&&A instanceof X.Parent)return!0;return A?._zod?.traits?.has(Q)}}),Object.defineProperty(K,"name",{value:Q}),K}var H2=Symbol("zod_brand");class h extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class XQ extends Error{constructor(Q){super(`Encountered unidirectional transform during encode: ${Q}`);this.name="ZodEncodeError"}}var IQ={};function v(Q){if(Q)Object.assign(IQ,Q);return IQ}var I={};y4(I,{unwrapMessage:()=>WQ,uint8ArrayToHex:()=>H9,uint8ArrayToBase64url:()=>w9,uint8ArrayToBase64:()=>mY,stringifyPrimitive:()=>xY,slugify:()=>yQ,shallowClone:()=>gY,safeExtend:()=>W9,required:()=>K9,randomString:()=>e4,propertyKeyTypes:()=>mQ,promiseAllObject:()=>n4,primitiveTypes:()=>hY,prefixIssues:()=>u,pick:()=>Q9,partial:()=>G9,optionalKeys:()=>fQ,omit:()=>Y9,objectClone:()=>p4,numKeys:()=>t4,nullish:()=>KQ,normalizeParams:()=>B,mergeDefs:()=>f,merge:()=>J9,jsonStringifyReplacer:()=>t,joinValues:()=>r4,issue:()=>a,isPlainObject:()=>o,isObject:()=>e,hexToUint8Array:()=>E9,getSizableOrigin:()=>yY,getParsedType:()=>a4,getLengthableOrigin:()=>LQ,getEnumValues:()=>JQ,getElementAtPath:()=>i4,floatSafeRemainder:()=>uQ,finalizeIssue:()=>j,extend:()=>X9,escapeRegex:()=>x,esc:()=>MQ,defineLazy:()=>M,createTransparentProxy:()=>s4,cloneDef:()=>d4,clone:()=>Z,cleanRegex:()=>AQ,cleanEnum:()=>A9,captureStackTrace:()=>DQ,cached:()=>GQ,base64urlToUint8Array:()=>L9,base64ToUint8Array:()=>cY,assignProp:()=>m,assertNotEqual:()=>m4,assertNever:()=>o4,assertIs:()=>f4,assertEqual:()=>c4,assert:()=>l4,allowsEval:()=>cQ,aborted:()=>l,NUMBER_FORMAT_RANGES:()=>oQ,Class:()=>fY,BIGINT_FORMAT_RANGES:()=>uY});function c4(Q){return Q}function m4(Q){return Q}function f4(Q){}function o4(Q){throw Error("Unexpected value in exhaustive check")}function l4(Q){}function JQ(Q){let Y=Object.values(Q).filter((W)=>typeof W==="number");return Object.entries(Q).filter(([W,J])=>Y.indexOf(+W)===-1).map(([W,J])=>J)}function r4(Q,Y="|"){return Q.map((X)=>xY(X)).join(Y)}function t(Q,Y){if(typeof Y==="bigint")return Y.toString();return Y}function GQ(Q){return{get value(){{let X=Q();return Object.defineProperty(this,"value",{value:X}),X}throw Error("cached value already set")}}}function KQ(Q){return Q===null||Q===void 0}function AQ(Q){let Y=Q.startsWith("^")?1:0,X=Q.endsWith("$")?Q.length-1:Q.length;return Q.slice(Y,X)}function uQ(Q,Y){let X=(Q.toString().split(".")[1]||"").length,W=Y.toString(),J=(W.split(".")[1]||"").length;if(J===0&&/\d?e-\d?/.test(W)){let w=W.match(/\d?e-(\d?)/);if(w?.[1])J=Number.parseInt(w[1])}let G=X>J?X:J,K=Number.parseInt(Q.toFixed(G).replace(".","")),A=Number.parseInt(Y.toFixed(G).replace(".",""));return K%A/10**G}var vY=Symbol("evaluating");function M(Q,Y,X){let W=void 0;Object.defineProperty(Q,Y,{get(){if(W===vY)return;if(W===void 0)W=vY,W=X();return W},set(J){Object.defineProperty(Q,Y,{value:J})},configurable:!0})}function p4(Q){return Object.create(Object.getPrototypeOf(Q),Object.getOwnPropertyDescriptors(Q))}function m(Q,Y,X){Object.defineProperty(Q,Y,{value:X,writable:!0,enumerable:!0,configurable:!0})}function f(...Q){let Y={};for(let X of Q){let W=Object.getOwnPropertyDescriptors(X);Object.assign(Y,W)}return Object.defineProperties({},Y)}function d4(Q){return f(Q._zod.def)}function i4(Q,Y){if(!Y)return Q;return Y.reduce((X,W)=>X?.[W],Q)}function n4(Q){let Y=Object.keys(Q),X=Y.map((W)=>Q[W]);return Promise.all(X).then((W)=>{let J={};for(let G=0;G<Y.length;G++)J[Y[G]]=W[G];return J})}function e4(Q=10){let X="";for(let W=0;W<Q;W++)X+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return X}function MQ(Q){return JSON.stringify(Q)}function yQ(Q){return Q.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var DQ="captureStackTrace"in Error?Error.captureStackTrace:(...Q)=>{};function e(Q){return typeof Q==="object"&&Q!==null&&!Array.isArray(Q)}var cQ=GQ(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(Q){return!1}});function o(Q){if(e(Q)===!1)return!1;let Y=Q.constructor;if(Y===void 0)return!0;if(typeof Y!=="function")return!0;let X=Y.prototype;if(e(X)===!1)return!1;if(Object.prototype.hasOwnProperty.call(X,"isPrototypeOf")===!1)return!1;return!0}function gY(Q){if(o(Q))return{...Q};if(Array.isArray(Q))return[...Q];return Q}function t4(Q){let Y=0;for(let X in Q)if(Object.prototype.hasOwnProperty.call(Q,X))Y++;return Y}var a4=(Q)=>{let Y=typeof Q;switch(Y){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(Q)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(Q))return"array";if(Q===null)return"null";if(Q.then&&typeof Q.then==="function"&&Q.catch&&typeof Q.catch==="function")return"promise";if(typeof Map<"u"&&Q instanceof Map)return"map";if(typeof Set<"u"&&Q instanceof Set)return"set";if(typeof Date<"u"&&Q instanceof Date)return"date";if(typeof File<"u"&&Q instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${Y}`)}},mQ=new Set(["string","number","symbol"]),hY=new Set(["string","number","bigint","boolean","symbol","undefined"]);function x(Q){return Q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(Q,Y,X){let W=new Q._zod.constr(Y??Q._zod.def);if(!Y||X?.parent)W._zod.parent=Q;return W}function B(Q){let Y=Q;if(!Y)return{};if(typeof Y==="string")return{error:()=>Y};if(Y?.message!==void 0){if(Y?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");Y.error=Y.message}if(delete Y.message,typeof Y.error==="string")return{...Y,error:()=>Y.error};return Y}function s4(Q){let Y;return new Proxy({},{get(X,W,J){return Y??(Y=Q()),Reflect.get(Y,W,J)},set(X,W,J,G){return Y??(Y=Q()),Reflect.set(Y,W,J,G)},has(X,W){return Y??(Y=Q()),Reflect.has(Y,W)},deleteProperty(X,W){return Y??(Y=Q()),Reflect.deleteProperty(Y,W)},ownKeys(X){return Y??(Y=Q()),Reflect.ownKeys(Y)},getOwnPropertyDescriptor(X,W){return Y??(Y=Q()),Reflect.getOwnPropertyDescriptor(Y,W)},defineProperty(X,W,J){return Y??(Y=Q()),Reflect.defineProperty(Y,W,J)}})}function xY(Q){if(typeof Q==="bigint")return Q.toString()+"n";if(typeof Q==="string")return`"${Q}"`;return`${Q}`}function fQ(Q){return Object.keys(Q).filter((Y)=>{return Q[Y]._zod.optin==="optional"&&Q[Y]._zod.optout==="optional"})}var oQ={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},uY={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Q9(Q,Y){let X=Q._zod.def,W=f(Q._zod.def,{get shape(){let J={};for(let G in Y){if(!(G in X.shape))throw Error(`Unrecognized key: "${G}"`);if(!Y[G])continue;J[G]=X.shape[G]}return m(this,"shape",J),J},checks:[]});return Z(Q,W)}function Y9(Q,Y){let X=Q._zod.def,W=f(Q._zod.def,{get shape(){let J={...Q._zod.def.shape};for(let G in Y){if(!(G in X.shape))throw Error(`Unrecognized key: "${G}"`);if(!Y[G])continue;delete J[G]}return m(this,"shape",J),J},checks:[]});return Z(Q,W)}function X9(Q,Y){if(!o(Y))throw Error("Invalid input to extend: expected a plain object");let X=Q._zod.def.checks;if(X&&X.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let J=f(Q._zod.def,{get shape(){let G={...Q._zod.def.shape,...Y};return m(this,"shape",G),G},checks:[]});return Z(Q,J)}function W9(Q,Y){if(!o(Y))throw Error("Invalid input to safeExtend: expected a plain object");let X={...Q._zod.def,get shape(){let W={...Q._zod.def.shape,...Y};return m(this,"shape",W),W},checks:Q._zod.def.checks};return Z(Q,X)}function J9(Q,Y){let X=f(Q._zod.def,{get shape(){let W={...Q._zod.def.shape,...Y._zod.def.shape};return m(this,"shape",W),W},get catchall(){return Y._zod.def.catchall},checks:[]});return Z(Q,X)}function G9(Q,Y,X){let W=f(Y._zod.def,{get shape(){let J=Y._zod.def.shape,G={...J};if(X)for(let K in X){if(!(K in J))throw Error(`Unrecognized key: "${K}"`);if(!X[K])continue;G[K]=Q?new Q({type:"optional",innerType:J[K]}):J[K]}else for(let K in J)G[K]=Q?new Q({type:"optional",innerType:J[K]}):J[K];return m(this,"shape",G),G},checks:[]});return Z(Y,W)}function K9(Q,Y,X){let W=f(Y._zod.def,{get shape(){let J=Y._zod.def.shape,G={...J};if(X)for(let K in X){if(!(K in G))throw Error(`Unrecognized key: "${K}"`);if(!X[K])continue;G[K]=new Q({type:"nonoptional",innerType:J[K]})}else for(let K in J)G[K]=new Q({type:"nonoptional",innerType:J[K]});return m(this,"shape",G),G},checks:[]});return Z(Y,W)}function l(Q,Y=0){if(Q.aborted===!0)return!0;for(let X=Y;X<Q.issues.length;X++)if(Q.issues[X]?.continue!==!0)return!0;return!1}function u(Q,Y){return Y.map((X)=>{var W;return(W=X).path??(W.path=[]),X.path.unshift(Q),X})}function WQ(Q){return typeof Q==="string"?Q:Q?.message}function j(Q,Y,X){let W={...Q,path:Q.path??[]};if(!Q.message){let J=WQ(Q.inst?._zod.def?.error?.(Q))??WQ(Y?.error?.(Q))??WQ(X.customError?.(Q))??WQ(X.localeError?.(Q))??"Invalid input";W.message=J}if(delete W.inst,delete W.continue,!Y?.reportInput)delete W.input;return W}function yY(Q){if(Q instanceof Set)return"set";if(Q instanceof Map)return"map";if(Q instanceof File)return"file";return"unknown"}function LQ(Q){if(Array.isArray(Q))return"array";if(typeof Q==="string")return"string";return"unknown"}function a(...Q){let[Y,X,W]=Q;if(typeof Y==="string")return{message:Y,code:"custom",input:X,inst:W};return{...Y}}function A9(Q){return Object.entries(Q).filter(([Y,X])=>{return Number.isNaN(Number.parseInt(Y,10))}).map((Y)=>Y[1])}function cY(Q){let Y=atob(Q),X=new Uint8Array(Y.length);for(let W=0;W<Y.length;W++)X[W]=Y.charCodeAt(W);return X}function mY(Q){let Y="";for(let X=0;X<Q.length;X++)Y+=String.fromCharCode(Q[X]);return btoa(Y)}function L9(Q){let Y=Q.replace(/-/g,"+").replace(/_/g,"/"),X="=".repeat((4-Y.length%4)%4);return cY(Y+X)}function w9(Q){return mY(Q).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function E9(Q){let Y=Q.replace(/^0x/,"");if(Y.length%2!==0)throw Error("Invalid hex string length");let X=new Uint8Array(Y.length/2);for(let W=0;W<Y.length;W+=2)X[W/2]=Number.parseInt(Y.slice(W,W+2),16);return X}function H9(Q){return Array.from(Q).map((Y)=>Y.toString(16).padStart(2,"0")).join("")}class fY{constructor(...Q){}}var oY=(Q,Y)=>{Q.name="$ZodError",Object.defineProperty(Q,"_zod",{value:Q._zod,enumerable:!1}),Object.defineProperty(Q,"issues",{value:Y,enumerable:!1}),Q.message=JSON.stringify(Y,t,2),Object.defineProperty(Q,"toString",{value:()=>Q.message,enumerable:!1})},VQ=L("$ZodError",oY),lQ=L("$ZodError",oY,{Parent:Error});function lY(Q,Y=(X)=>X.message){let X={},W=[];for(let J of Q.issues)if(J.path.length>0)X[J.path[0]]=X[J.path[0]]||[],X[J.path[0]].push(Y(J));else W.push(Y(J));return{formErrors:W,fieldErrors:X}}function rY(Q,Y=(X)=>X.message){let X={_errors:[]},W=(J)=>{for(let G of J.issues)if(G.code==="invalid_union"&&G.errors.length)G.errors.map((K)=>W({issues:K}));else if(G.code==="invalid_key")W({issues:G.issues});else if(G.code==="invalid_element")W({issues:G.issues});else if(G.path.length===0)X._errors.push(Y(G));else{let K=X,A=0;while(A<G.path.length){let w=G.path[A];if(A!==G.path.length-1)K[w]=K[w]||{_errors:[]};else K[w]=K[w]||{_errors:[]},K[w]._errors.push(Y(G));K=K[w],A++}}};return W(Q),X}var FQ=(Q)=>(Y,X,W,J)=>{let G=W?Object.assign(W,{async:!1}):{async:!1},K=Y._zod.run({value:X,issues:[]},G);if(K instanceof Promise)throw new h;if(K.issues.length){let A=new(J?.Err??Q)(K.issues.map((w)=>j(w,G,v())));throw DQ(A,J?.callee),A}return K.value};var UQ=(Q)=>async(Y,X,W,J)=>{let G=W?Object.assign(W,{async:!0}):{async:!0},K=Y._zod.run({value:X,issues:[]},G);if(K instanceof Promise)K=await K;if(K.issues.length){let A=new(J?.Err??Q)(K.issues.map((w)=>j(w,G,v())));throw DQ(A,J?.callee),A}return K.value};var wQ=(Q)=>(Y,X,W)=>{let J=W?{...W,async:!1}:{async:!1},G=Y._zod.run({value:X,issues:[]},J);if(G instanceof Promise)throw new h;return G.issues.length?{success:!1,error:new(Q??VQ)(G.issues.map((K)=>j(K,J,v())))}:{success:!0,data:G.value}},pY=wQ(lQ),EQ=(Q)=>async(Y,X,W)=>{let J=W?Object.assign(W,{async:!0}):{async:!0},G=Y._zod.run({value:X,issues:[]},J);if(G instanceof Promise)G=await G;return G.issues.length?{success:!1,error:new Q(G.issues.map((K)=>j(K,J,v())))}:{success:!0,data:G.value}},dY=EQ(lQ),iY=(Q)=>(Y,X,W)=>{let J=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return FQ(Q)(Y,X,J)};var nY=(Q)=>(Y,X,W)=>{return FQ(Q)(Y,X,W)};var eY=(Q)=>async(Y,X,W)=>{let J=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return UQ(Q)(Y,X,J)};var tY=(Q)=>async(Y,X,W)=>{return UQ(Q)(Y,X,W)};var aY=(Q)=>(Y,X,W)=>{let J=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return wQ(Q)(Y,X,J)};var sY=(Q)=>(Y,X,W)=>{return wQ(Q)(Y,X,W)};var Q1=(Q)=>async(Y,X,W)=>{let J=W?Object.assign(W,{direction:"backward"}):{direction:"backward"};return EQ(Q)(Y,X,J)};var Y1=(Q)=>async(Y,X,W)=>{return EQ(Q)(Y,X,W)};var X1=/^[cC][^\s-]{8,}$/,W1=/^[0-9a-z]+$/,J1=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,G1=/^[0-9a-vA-V]{20}$/,K1=/^[A-Za-z0-9]{27}$/,A1=/^[a-zA-Z0-9_-]{21}$/,L1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var w1=/^([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})$/,rQ=(Q)=>{if(!Q)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${Q}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var E1=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var B9="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function H1(){return new RegExp(B9,"u")}var N1=/^(?:(?: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])$/,B1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;var z1=/^((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])$/,O1=/^(([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])$/,q1=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pQ=/^[A-Za-z0-9_-]*$/;var I1=/^\+(?:[0-9]){6,14}[0-9]$/,M1="(?:(?:\\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])))",D1=new RegExp(`^${M1}$`);function V1(Q){return typeof Q.precision==="number"?Q.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":Q.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${Q.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function F1(Q){return new RegExp(`^${V1(Q)}$`)}function U1(Q){let Y=V1({precision:Q.precision}),X=["Z"];if(Q.local)X.push("");if(Q.offset)X.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let W=`${Y}(?:${X.join("|")})`;return new RegExp(`^${M1}T(?:${W})$`)}var $1=(Q)=>{let Y=Q?`[\\s\\S]{${Q?.minimum??0},${Q?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${Y}$`)};var P1=/^-?\d+$/,R1=/^-?\d+(?:\.\d+)?/,S1=/^(?:true|false)$/i;var _1=/^undefined$/i;var T1=/^[^A-Z]*$/,b1=/^[^a-z]*$/;var S=L("$ZodCheck",(Q,Y)=>{var X;Q._zod??(Q._zod={}),Q._zod.def=Y,(X=Q._zod).onattach??(X.onattach=[])}),Z1={number:"number",bigint:"bigint",object:"date"},dQ=L("$ZodCheckLessThan",(Q,Y)=>{S.init(Q,Y);let X=Z1[typeof Y.value];Q._zod.onattach.push((W)=>{let J=W._zod.bag,G=(Y.inclusive?J.maximum:J.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(Y.value<G)if(Y.inclusive)J.maximum=Y.value;else J.exclusiveMaximum=Y.value}),Q._zod.check=(W)=>{if(Y.inclusive?W.value<=Y.value:W.value<Y.value)return;W.issues.push({origin:X,code:"too_big",maximum:Y.value,input:W.value,inclusive:Y.inclusive,inst:Q,continue:!Y.abort})}}),iQ=L("$ZodCheckGreaterThan",(Q,Y)=>{S.init(Q,Y);let X=Z1[typeof Y.value];Q._zod.onattach.push((W)=>{let J=W._zod.bag,G=(Y.inclusive?J.minimum:J.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(Y.value>G)if(Y.inclusive)J.minimum=Y.value;else J.exclusiveMinimum=Y.value}),Q._zod.check=(W)=>{if(Y.inclusive?W.value>=Y.value:W.value>Y.value)return;W.issues.push({origin:X,code:"too_small",minimum:Y.value,input:W.value,inclusive:Y.inclusive,inst:Q,continue:!Y.abort})}}),j1=L("$ZodCheckMultipleOf",(Q,Y)=>{S.init(Q,Y),Q._zod.onattach.push((X)=>{var W;(W=X._zod.bag).multipleOf??(W.multipleOf=Y.value)}),Q._zod.check=(X)=>{if(typeof X.value!==typeof Y.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof X.value==="bigint"?X.value%Y.value===BigInt(0):uQ(X.value,Y.value)===0)return;X.issues.push({origin:typeof X.value,code:"not_multiple_of",divisor:Y.value,input:X.value,inst:Q,continue:!Y.abort})}}),C1=L("$ZodCheckNumberFormat",(Q,Y)=>{S.init(Q,Y),Y.format=Y.format||"float64";let X=Y.format?.includes("int"),W=X?"int":"number",[J,G]=oQ[Y.format];Q._zod.onattach.push((K)=>{let A=K._zod.bag;if(A.format=Y.format,A.minimum=J,A.maximum=G,X)A.pattern=P1}),Q._zod.check=(K)=>{let A=K.value;if(X){if(!Number.isInteger(A)){K.issues.push({expected:W,format:Y.format,code:"invalid_type",continue:!1,input:A,inst:Q});return}if(!Number.isSafeInteger(A)){if(A>0)K.issues.push({input:A,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:Q,origin:W,continue:!Y.abort});else K.issues.push({input:A,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:Q,origin:W,continue:!Y.abort});return}}if(A<J)K.issues.push({origin:"number",input:A,code:"too_small",minimum:J,inclusive:!0,inst:Q,continue:!Y.abort});if(A>G)K.issues.push({origin:"number",input:A,code:"too_big",maximum:G,inst:Q})}});var k1=L("$ZodCheckMaxLength",(Q,Y)=>{var X;S.init(Q,Y),(X=Q._zod.def).when??(X.when=(W)=>{let J=W.value;return!KQ(J)&&J.length!==void 0}),Q._zod.onattach.push((W)=>{let J=W._zod.bag.maximum??Number.POSITIVE_INFINITY;if(Y.maximum<J)W._zod.bag.maximum=Y.maximum}),Q._zod.check=(W)=>{let J=W.value;if(J.length<=Y.maximum)return;let K=LQ(J);W.issues.push({origin:K,code:"too_big",maximum:Y.maximum,inclusive:!0,input:J,inst:Q,continue:!Y.abort})}}),v1=L("$ZodCheckMinLength",(Q,Y)=>{var X;S.init(Q,Y),(X=Q._zod.def).when??(X.when=(W)=>{let J=W.value;return!KQ(J)&&J.length!==void 0}),Q._zod.onattach.push((W)=>{let J=W._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(Y.minimum>J)W._zod.bag.minimum=Y.minimum}),Q._zod.check=(W)=>{let J=W.value;if(J.length>=Y.minimum)return;let K=LQ(J);W.issues.push({origin:K,code:"too_small",minimum:Y.minimum,inclusive:!0,input:J,inst:Q,continue:!Y.abort})}}),g1=L("$ZodCheckLengthEquals",(Q,Y)=>{var X;S.init(Q,Y),(X=Q._zod.def).when??(X.when=(W)=>{let J=W.value;return!KQ(J)&&J.length!==void 0}),Q._zod.onattach.push((W)=>{let J=W._zod.bag;J.minimum=Y.length,J.maximum=Y.length,J.length=Y.length}),Q._zod.check=(W)=>{let J=W.value,G=J.length;if(G===Y.length)return;let K=LQ(J),A=G>Y.length;W.issues.push({origin:K,...A?{code:"too_big",maximum:Y.length}:{code:"too_small",minimum:Y.length},inclusive:!0,exact:!0,input:W.value,inst:Q,continue:!Y.abort})}}),HQ=L("$ZodCheckStringFormat",(Q,Y)=>{var X,W;if(S.init(Q,Y),Q._zod.onattach.push((J)=>{let G=J._zod.bag;if(G.format=Y.format,Y.pattern)G.patterns??(G.patterns=new Set),G.patterns.add(Y.pattern)}),Y.pattern)(X=Q._zod).check??(X.check=(J)=>{if(Y.pattern.lastIndex=0,Y.pattern.test(J.value))return;J.issues.push({origin:"string",code:"invalid_format",format:Y.format,input:J.value,...Y.pattern?{pattern:Y.pattern.toString()}:{},inst:Q,continue:!Y.abort})});else(W=Q._zod).check??(W.check=()=>{})}),h1=L("$ZodCheckRegex",(Q,Y)=>{HQ.init(Q,Y),Q._zod.check=(X)=>{if(Y.pattern.lastIndex=0,Y.pattern.test(X.value))return;X.issues.push({origin:"string",code:"invalid_format",format:"regex",input:X.value,pattern:Y.pattern.toString(),inst:Q,continue:!Y.abort})}}),x1=L("$ZodCheckLowerCase",(Q,Y)=>{Y.pattern??(Y.pattern=T1),HQ.init(Q,Y)}),u1=L("$ZodCheckUpperCase",(Q,Y)=>{Y.pattern??(Y.pattern=b1),HQ.init(Q,Y)}),y1=L("$ZodCheckIncludes",(Q,Y)=>{S.init(Q,Y);let X=x(Y.includes),W=new RegExp(typeof Y.position==="number"?`^.{${Y.position}}${X}`:X);Y.pattern=W,Q._zod.onattach.push((J)=>{let G=J._zod.bag;G.patterns??(G.patterns=new Set),G.patterns.add(W)}),Q._zod.check=(J)=>{if(J.value.includes(Y.includes,Y.position))return;J.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:Y.includes,input:J.value,inst:Q,continue:!Y.abort})}}),c1=L("$ZodCheckStartsWith",(Q,Y)=>{S.init(Q,Y);let X=new RegExp(`^${x(Y.prefix)}.*`);Y.pattern??(Y.pattern=X),Q._zod.onattach.push((W)=>{let J=W._zod.bag;J.patterns??(J.patterns=new Set),J.patterns.add(X)}),Q._zod.check=(W)=>{if(W.value.startsWith(Y.prefix))return;W.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:Y.prefix,input:W.value,inst:Q,continue:!Y.abort})}}),m1=L("$ZodCheckEndsWith",(Q,Y)=>{S.init(Q,Y);let X=new RegExp(`.*${x(Y.suffix)}$`);Y.pattern??(Y.pattern=X),Q._zod.onattach.push((W)=>{let J=W._zod.bag;J.patterns??(J.patterns=new Set),J.patterns.add(X)}),Q._zod.check=(W)=>{if(W.value.endsWith(Y.suffix))return;W.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:Y.suffix,input:W.value,inst:Q,continue:!Y.abort})}});var f1=L("$ZodCheckOverwrite",(Q,Y)=>{S.init(Q,Y),Q._zod.check=(X)=>{X.value=Y.tx(X.value)}});class nQ{constructor(Q=[]){if(this.content=[],this.indent=0,this)this.args=Q}indented(Q){this.indent+=1,Q(this),this.indent-=1}write(Q){if(typeof Q==="function"){Q(this,{execution:"sync"}),Q(this,{execution:"async"});return}let X=Q.split(`
2
+ `).filter((G)=>G),W=Math.min(...X.map((G)=>G.length-G.trimStart().length)),J=X.map((G)=>G.slice(W)).map((G)=>" ".repeat(this.indent*2)+G);for(let G of J)this.content.push(G)}compile(){let Q=Function,Y=this?.args,W=[...(this?.content??[""]).map((J)=>` ${J}`)];return new Q(...Y,W.join(`
3
+ `))}}var l1={major:4,minor:2,patch:1};var D=L("$ZodType",(Q,Y)=>{var X;Q??(Q={}),Q._zod.def=Y,Q._zod.bag=Q._zod.bag||{},Q._zod.version=l1;let W=[...Q._zod.def.checks??[]];if(Q._zod.traits.has("$ZodCheck"))W.unshift(Q);for(let J of W)for(let G of J._zod.onattach)G(Q);if(W.length===0)(X=Q._zod).deferred??(X.deferred=[]),Q._zod.deferred?.push(()=>{Q._zod.run=Q._zod.parse});else{let J=(K,A,w)=>{let H=l(K),N;for(let O of A){if(O._zod.def.when){if(!O._zod.def.when(K))continue}else if(H)continue;let q=K.issues.length,U=O._zod.check(K);if(U instanceof Promise&&w?.async===!1)throw new h;if(N||U instanceof Promise)N=(N??Promise.resolve()).then(async()=>{if(await U,K.issues.length===q)return;if(!H)H=l(K,q)});else{if(K.issues.length===q)continue;if(!H)H=l(K,q)}}if(N)return N.then(()=>{return K});return K},G=(K,A,w)=>{if(l(K))return K.aborted=!0,K;let H=J(A,W,w);if(H instanceof Promise){if(w.async===!1)throw new h;return H.then((N)=>Q._zod.parse(N,w))}return Q._zod.parse(H,w)};Q._zod.run=(K,A)=>{if(A.skipChecks)return Q._zod.parse(K,A);if(A.direction==="backward"){let H=Q._zod.parse({value:K.value,issues:[]},{...A,skipChecks:!0});if(H instanceof Promise)return H.then((N)=>{return G(N,K,A)});return G(H,K,A)}let w=Q._zod.parse(K,A);if(w instanceof Promise){if(A.async===!1)throw new h;return w.then((H)=>J(H,W,A))}return J(w,W,A)}}Q["~standard"]={validate:(J)=>{try{let G=pY(Q,J);return G.success?{value:G.data}:{issues:G.error?.issues}}catch(G){return dY(Q,J).then((K)=>K.success?{value:K.data}:{issues:K.error?.issues})}},vendor:"zod",version:1}}),SQ=L("$ZodString",(Q,Y)=>{D.init(Q,Y),Q._zod.pattern=[...Q?._zod.bag?.patterns??[]].pop()??$1(Q._zod.bag),Q._zod.parse=(X,W)=>{if(Y.coerce)try{X.value=String(X.value)}catch(J){}if(typeof X.value==="string")return X;return X.issues.push({expected:"string",code:"invalid_type",input:X.value,inst:Q}),X}}),V=L("$ZodStringFormat",(Q,Y)=>{HQ.init(Q,Y),SQ.init(Q,Y)}),s1=L("$ZodGUID",(Q,Y)=>{Y.pattern??(Y.pattern=w1),V.init(Q,Y)}),Q0=L("$ZodUUID",(Q,Y)=>{if(Y.version){let W={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[Y.version];if(W===void 0)throw Error(`Invalid UUID version: "${Y.version}"`);Y.pattern??(Y.pattern=rQ(W))}else Y.pattern??(Y.pattern=rQ());V.init(Q,Y)}),Y0=L("$ZodEmail",(Q,Y)=>{Y.pattern??(Y.pattern=E1),V.init(Q,Y)}),X0=L("$ZodURL",(Q,Y)=>{V.init(Q,Y),Q._zod.check=(X)=>{try{let W=X.value.trim(),J=new URL(W);if(Y.hostname){if(Y.hostname.lastIndex=0,!Y.hostname.test(J.hostname))X.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Y.hostname.source,input:X.value,inst:Q,continue:!Y.abort})}if(Y.protocol){if(Y.protocol.lastIndex=0,!Y.protocol.test(J.protocol.endsWith(":")?J.protocol.slice(0,-1):J.protocol))X.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:Y.protocol.source,input:X.value,inst:Q,continue:!Y.abort})}if(Y.normalize)X.value=J.href;else X.value=W;return}catch(W){X.issues.push({code:"invalid_format",format:"url",input:X.value,inst:Q,continue:!Y.abort})}}}),W0=L("$ZodEmoji",(Q,Y)=>{Y.pattern??(Y.pattern=H1()),V.init(Q,Y)}),J0=L("$ZodNanoID",(Q,Y)=>{Y.pattern??(Y.pattern=A1),V.init(Q,Y)}),G0=L("$ZodCUID",(Q,Y)=>{Y.pattern??(Y.pattern=X1),V.init(Q,Y)}),K0=L("$ZodCUID2",(Q,Y)=>{Y.pattern??(Y.pattern=W1),V.init(Q,Y)}),A0=L("$ZodULID",(Q,Y)=>{Y.pattern??(Y.pattern=J1),V.init(Q,Y)}),L0=L("$ZodXID",(Q,Y)=>{Y.pattern??(Y.pattern=G1),V.init(Q,Y)}),w0=L("$ZodKSUID",(Q,Y)=>{Y.pattern??(Y.pattern=K1),V.init(Q,Y)}),E0=L("$ZodISODateTime",(Q,Y)=>{Y.pattern??(Y.pattern=U1(Y)),V.init(Q,Y)}),H0=L("$ZodISODate",(Q,Y)=>{Y.pattern??(Y.pattern=D1),V.init(Q,Y)}),N0=L("$ZodISOTime",(Q,Y)=>{Y.pattern??(Y.pattern=F1(Y)),V.init(Q,Y)}),B0=L("$ZodISODuration",(Q,Y)=>{Y.pattern??(Y.pattern=L1),V.init(Q,Y)}),z0=L("$ZodIPv4",(Q,Y)=>{Y.pattern??(Y.pattern=N1),V.init(Q,Y),Q._zod.bag.format="ipv4"}),O0=L("$ZodIPv6",(Q,Y)=>{Y.pattern??(Y.pattern=B1),V.init(Q,Y),Q._zod.bag.format="ipv6",Q._zod.check=(X)=>{try{new URL(`http://[${X.value}]`)}catch{X.issues.push({code:"invalid_format",format:"ipv6",input:X.value,inst:Q,continue:!Y.abort})}}});var q0=L("$ZodCIDRv4",(Q,Y)=>{Y.pattern??(Y.pattern=z1),V.init(Q,Y)}),I0=L("$ZodCIDRv6",(Q,Y)=>{Y.pattern??(Y.pattern=O1),V.init(Q,Y),Q._zod.check=(X)=>{let W=X.value.split("/");try{if(W.length!==2)throw Error();let[J,G]=W;if(!G)throw Error();let K=Number(G);if(`${K}`!==G)throw Error();if(K<0||K>128)throw Error();new URL(`http://[${J}]`)}catch{X.issues.push({code:"invalid_format",format:"cidrv6",input:X.value,inst:Q,continue:!Y.abort})}}});function M0(Q){if(Q==="")return!0;if(Q.length%4!==0)return!1;try{return atob(Q),!0}catch{return!1}}var D0=L("$ZodBase64",(Q,Y)=>{Y.pattern??(Y.pattern=q1),V.init(Q,Y),Q._zod.bag.contentEncoding="base64",Q._zod.check=(X)=>{if(M0(X.value))return;X.issues.push({code:"invalid_format",format:"base64",input:X.value,inst:Q,continue:!Y.abort})}});function z9(Q){if(!pQ.test(Q))return!1;let Y=Q.replace(/[-_]/g,(W)=>W==="-"?"+":"/"),X=Y.padEnd(Math.ceil(Y.length/4)*4,"=");return M0(X)}var V0=L("$ZodBase64URL",(Q,Y)=>{Y.pattern??(Y.pattern=pQ),V.init(Q,Y),Q._zod.bag.contentEncoding="base64url",Q._zod.check=(X)=>{if(z9(X.value))return;X.issues.push({code:"invalid_format",format:"base64url",input:X.value,inst:Q,continue:!Y.abort})}}),F0=L("$ZodE164",(Q,Y)=>{Y.pattern??(Y.pattern=I1),V.init(Q,Y)});function O9(Q,Y=null){try{let X=Q.split(".");if(X.length!==3)return!1;let[W]=X;if(!W)return!1;let J=JSON.parse(atob(W));if("typ"in J&&J?.typ!=="JWT")return!1;if(!J.alg)return!1;if(Y&&(!("alg"in J)||J.alg!==Y))return!1;return!0}catch{return!1}}var U0=L("$ZodJWT",(Q,Y)=>{V.init(Q,Y),Q._zod.check=(X)=>{if(O9(X.value,Y.alg))return;X.issues.push({code:"invalid_format",format:"jwt",input:X.value,inst:Q,continue:!Y.abort})}});var tQ=L("$ZodNumber",(Q,Y)=>{D.init(Q,Y),Q._zod.pattern=Q._zod.bag.pattern??R1,Q._zod.parse=(X,W)=>{if(Y.coerce)try{X.value=Number(X.value)}catch(K){}let J=X.value;if(typeof J==="number"&&!Number.isNaN(J)&&Number.isFinite(J))return X;let G=typeof J==="number"?Number.isNaN(J)?"NaN":!Number.isFinite(J)?"Infinity":void 0:void 0;return X.issues.push({expected:"number",code:"invalid_type",input:J,inst:Q,...G?{received:G}:{}}),X}}),$0=L("$ZodNumberFormat",(Q,Y)=>{C1.init(Q,Y),tQ.init(Q,Y)}),P0=L("$ZodBoolean",(Q,Y)=>{D.init(Q,Y),Q._zod.pattern=S1,Q._zod.parse=(X,W)=>{if(Y.coerce)try{X.value=Boolean(X.value)}catch(G){}let J=X.value;if(typeof J==="boolean")return X;return X.issues.push({expected:"boolean",code:"invalid_type",input:J,inst:Q}),X}});var R0=L("$ZodUndefined",(Q,Y)=>{D.init(Q,Y),Q._zod.pattern=_1,Q._zod.values=new Set([void 0]),Q._zod.optin="optional",Q._zod.optout="optional",Q._zod.parse=(X,W)=>{let J=X.value;if(typeof J>"u")return X;return X.issues.push({expected:"undefined",code:"invalid_type",input:J,inst:Q}),X}});var S0=L("$ZodUnknown",(Q,Y)=>{D.init(Q,Y),Q._zod.parse=(X)=>X}),_0=L("$ZodNever",(Q,Y)=>{D.init(Q,Y),Q._zod.parse=(X,W)=>{return X.issues.push({expected:"never",code:"invalid_type",input:X.value,inst:Q}),X}});function r1(Q,Y,X){if(Q.issues.length)Y.issues.push(...u(X,Q.issues));Y.value[X]=Q.value}var T0=L("$ZodArray",(Q,Y)=>{D.init(Q,Y),Q._zod.parse=(X,W)=>{let J=X.value;if(!Array.isArray(J))return X.issues.push({expected:"array",code:"invalid_type",input:J,inst:Q}),X;X.value=Array(J.length);let G=[];for(let K=0;K<J.length;K++){let A=J[K],w=Y.element._zod.run({value:A,issues:[]},W);if(w instanceof Promise)G.push(w.then((H)=>r1(H,X,K)));else r1(w,X,K)}if(G.length)return Promise.all(G).then(()=>X);return X}});function RQ(Q,Y,X,W){if(Q.issues.length)Y.issues.push(...u(X,Q.issues));if(Q.value===void 0){if(X in W)Y.value[X]=void 0}else Y.value[X]=Q.value}function b0(Q){let Y=Object.keys(Q.shape);for(let W of Y)if(!Q.shape?.[W]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${W}": expected a Zod schema`);let X=fQ(Q.shape);return{...Q,keys:Y,keySet:new Set(Y),numKeys:Y.length,optionalKeys:new Set(X)}}function Z0(Q,Y,X,W,J,G){let K=[],A=J.keySet,w=J.catchall._zod,H=w.def.type;for(let N in Y){if(A.has(N))continue;if(H==="never"){K.push(N);continue}let O=w.run({value:Y[N],issues:[]},W);if(O instanceof Promise)Q.push(O.then((q)=>RQ(q,X,N,Y)));else RQ(O,X,N,Y)}if(K.length)X.issues.push({code:"unrecognized_keys",keys:K,input:Y,inst:G});if(!Q.length)return X;return Promise.all(Q).then(()=>{return X})}var q9=L("$ZodObject",(Q,Y)=>{if(D.init(Q,Y),!Object.getOwnPropertyDescriptor(Y,"shape")?.get){let A=Y.shape;Object.defineProperty(Y,"shape",{get:()=>{let w={...A};return Object.defineProperty(Y,"shape",{value:w}),w}})}let W=GQ(()=>b0(Y));M(Q._zod,"propValues",()=>{let A=Y.shape,w={};for(let H in A){let N=A[H]._zod;if(N.values){w[H]??(w[H]=new Set);for(let O of N.values)w[H].add(O)}}return w});let J=e,G=Y.catchall,K;Q._zod.parse=(A,w)=>{K??(K=W.value);let H=A.value;if(!J(H))return A.issues.push({expected:"object",code:"invalid_type",input:H,inst:Q}),A;A.value={};let N=[],O=K.shape;for(let q of K.keys){let T=O[q]._zod.run({value:H[q],issues:[]},w);if(T instanceof Promise)N.push(T.then((hQ)=>RQ(hQ,A,q,H)));else RQ(T,A,q,H)}if(!G)return N.length?Promise.all(N).then(()=>A):A;return Z0(N,H,A,w,W.value,Q)}}),j0=L("$ZodObjectJIT",(Q,Y)=>{q9.init(Q,Y);let X=Q._zod.parse,W=GQ(()=>b0(Y)),J=(q)=>{let U=new nQ(["shape","payload","ctx"]),T=W.value,hQ=(g)=>{let k=MQ(g);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};U.write("const input = payload.value;");let kY=Object.create(null),h4=0;for(let g of T.keys)kY[g]=`key_${h4++}`;U.write("const newResult = {};");for(let g of T.keys){let k=kY[g],YQ=MQ(g);U.write(`const ${k} = ${hQ(g)};`),U.write(`
4
4
  if (${k}.issues.length) {
5
5
  payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
6
6
  ...iss,
@@ -17,15 +17,15 @@ var x2=Object.defineProperty;var u2=(Q,Y)=>{for(var X in Y)x2(Q,X,{get:Y[X],enum
17
17
  newResult[${YQ}] = ${k}.value;
18
18
  }
19
19
 
20
- `)}U.write("payload.value = newResult;"),U.write("return payload;");let h2=U.compile();return(g,k)=>h2(O,g,k)},J,K=e,A=!IQ.jitless,H=A&&cQ.value,N=Y.catchall,q;Q._zod.parse=(O,U)=>{q??(q=W.value);let T=O.value;if(!K(T))return O.issues.push({expected:"object",code:"invalid_type",input:T,inst:Q}),O;if(A&&H&&U?.async===!1&&U.jitless!==!0){if(!J)J=G(Y.shape);if(O=J(O,U),!N)return O;return b1([],T,O,U,q,Q)}return X(O,U)}});function p0(Q,Y,X,W){for(let J of Q)if(J.issues.length===0)return Y.value=J.value,Y;let G=Q.filter((J)=>!l(J));if(G.length===1)return Y.value=G[0].value,G[0];return Y.issues.push({code:"invalid_union",input:Y.value,inst:X,errors:Q.map((J)=>J.issues.map((K)=>j(K,W,v())))}),Y}var C1=w("$ZodUnion",(Q,Y)=>{M.init(Q,Y),D(Q._zod,"optin",()=>Y.options.some((G)=>G._zod.optin==="optional")?"optional":void 0),D(Q._zod,"optout",()=>Y.options.some((G)=>G._zod.optout==="optional")?"optional":void 0),D(Q._zod,"values",()=>{if(Y.options.every((G)=>G._zod.values))return new Set(Y.options.flatMap((G)=>Array.from(G._zod.values)));return}),D(Q._zod,"pattern",()=>{if(Y.options.every((G)=>G._zod.pattern)){let G=Y.options.map((J)=>J._zod.pattern);return new RegExp(`^(${G.map((J)=>AQ(J.source)).join("|")})$`)}return});let X=Y.options.length===1,W=Y.options[0]._zod.run;Q._zod.parse=(G,J)=>{if(X)return W(G,J);let K=!1,A=[];for(let L of Y.options){let H=L._zod.run({value:G.value,issues:[]},J);if(H instanceof Promise)A.push(H),K=!0;else{if(H.issues.length===0)return H;A.push(H)}}if(!K)return p0(A,G,Q,J);return Promise.all(A).then((L)=>{return p0(L,G,Q,J)})}});var k1=w("$ZodIntersection",(Q,Y)=>{M.init(Q,Y),Q._zod.parse=(X,W)=>{let G=X.value,J=Y.left._zod.run({value:G,issues:[]},W),K=Y.right._zod.run({value:G,issues:[]},W);if(J instanceof Promise||K instanceof Promise)return Promise.all([J,K]).then(([L,H])=>{return d0(X,L,H)});return d0(X,J,K)}});function eQ(Q,Y){if(Q===Y)return{valid:!0,data:Q};if(Q instanceof Date&&Y instanceof Date&&+Q===+Y)return{valid:!0,data:Q};if(o(Q)&&o(Y)){let X=Object.keys(Y),W=Object.keys(Q).filter((J)=>X.indexOf(J)!==-1),G={...Q,...Y};for(let J of W){let K=eQ(Q[J],Y[J]);if(!K.valid)return{valid:!1,mergeErrorPath:[J,...K.mergeErrorPath]};G[J]=K.data}return{valid:!0,data:G}}if(Array.isArray(Q)&&Array.isArray(Y)){if(Q.length!==Y.length)return{valid:!1,mergeErrorPath:[]};let X=[];for(let W=0;W<Q.length;W++){let G=Q[W],J=Y[W],K=eQ(G,J);if(!K.valid)return{valid:!1,mergeErrorPath:[W,...K.mergeErrorPath]};X.push(K.data)}return{valid:!0,data:X}}return{valid:!1,mergeErrorPath:[]}}function d0(Q,Y,X){if(Y.issues.length)Q.issues.push(...Y.issues);if(X.issues.length)Q.issues.push(...X.issues);if(l(Q))return Q;let W=eQ(Y.value,X.value);if(!W.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(W.mergeErrorPath)}`);return Q.value=W.data,Q}var v1=w("$ZodRecord",(Q,Y)=>{M.init(Q,Y),Q._zod.parse=(X,W)=>{let G=X.value;if(!o(G))return X.issues.push({expected:"record",code:"invalid_type",input:G,inst:Q}),X;let J=[],K=Y.keyType._zod.values;if(K){X.value={};let A=new Set;for(let H of K)if(typeof H==="string"||typeof H==="number"||typeof H==="symbol"){A.add(typeof H==="number"?H.toString():H);let N=Y.valueType._zod.run({value:G[H],issues:[]},W);if(N instanceof Promise)J.push(N.then((q)=>{if(q.issues.length)X.issues.push(...u(H,q.issues));X.value[H]=q.value}));else{if(N.issues.length)X.issues.push(...u(H,N.issues));X.value[H]=N.value}}let L;for(let H in G)if(!A.has(H))L=L??[],L.push(H);if(L&&L.length>0)X.issues.push({code:"unrecognized_keys",input:G,inst:Q,keys:L})}else{X.value={};for(let A of Reflect.ownKeys(G)){if(A==="__proto__")continue;let L=Y.keyType._zod.run({value:A,issues:[]},W);if(L instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(L.issues.length){if(Y.mode==="loose")X.value[A]=G[A];else X.issues.push({code:"invalid_key",origin:"record",issues:L.issues.map((N)=>j(N,W,v())),input:A,path:[A],inst:Q});continue}let H=Y.valueType._zod.run({value:G[A],issues:[]},W);if(H instanceof Promise)J.push(H.then((N)=>{if(N.issues.length)X.issues.push(...u(A,N.issues));X.value[L.value]=N.value}));else{if(H.issues.length)X.issues.push(...u(A,H.issues));X.value[L.value]=H.value}}}if(J.length)return Promise.all(J).then(()=>X);return X}});var g1=w("$ZodEnum",(Q,Y)=>{M.init(Q,Y);let X=GQ(Y.entries),W=new Set(X);Q._zod.values=W,Q._zod.pattern=new RegExp(`^(${X.filter((G)=>mQ.has(typeof G)).map((G)=>typeof G==="string"?x(G):G.toString()).join("|")})$`),Q._zod.parse=(G,J)=>{let K=G.value;if(W.has(K))return G;return G.issues.push({code:"invalid_value",values:X,input:K,inst:Q}),G}}),h1=w("$ZodLiteral",(Q,Y)=>{if(M.init(Q,Y),Y.values.length===0)throw Error("Cannot create literal schema with no valid values");let X=new Set(Y.values);Q._zod.values=X,Q._zod.pattern=new RegExp(`^(${Y.values.map((W)=>typeof W==="string"?x(W):W?x(W.toString()):String(W)).join("|")})$`),Q._zod.parse=(W,G)=>{let J=W.value;if(X.has(J))return W;return W.issues.push({code:"invalid_value",values:Y.values,input:J,inst:Q}),W}});var x1=w("$ZodTransform",(Q,Y)=>{M.init(Q,Y),Q._zod.parse=(X,W)=>{if(W.direction==="backward")throw new XQ(Q.constructor.name);let G=Y.transform(X.value,X);if(W.async)return(G instanceof Promise?G:Promise.resolve(G)).then((K)=>{return X.value=K,X});if(G instanceof Promise)throw new h;return X.value=G,X}});function i0(Q,Y){if(Q.issues.length&&Y===void 0)return{issues:[],value:void 0};return Q}var u1=w("$ZodOptional",(Q,Y)=>{M.init(Q,Y),Q._zod.optin="optional",Q._zod.optout="optional",D(Q._zod,"values",()=>{return Y.innerType._zod.values?new Set([...Y.innerType._zod.values,void 0]):void 0}),D(Q._zod,"pattern",()=>{let X=Y.innerType._zod.pattern;return X?new RegExp(`^(${AQ(X.source)})?$`):void 0}),Q._zod.parse=(X,W)=>{if(Y.innerType._zod.optin==="optional"){let G=Y.innerType._zod.run(X,W);if(G instanceof Promise)return G.then((J)=>i0(J,X.value));return i0(G,X.value)}if(X.value===void 0)return X;return Y.innerType._zod.run(X,W)}}),y1=w("$ZodNullable",(Q,Y)=>{M.init(Q,Y),D(Q._zod,"optin",()=>Y.innerType._zod.optin),D(Q._zod,"optout",()=>Y.innerType._zod.optout),D(Q._zod,"pattern",()=>{let X=Y.innerType._zod.pattern;return X?new RegExp(`^(${AQ(X.source)}|null)$`):void 0}),D(Q._zod,"values",()=>{return Y.innerType._zod.values?new Set([...Y.innerType._zod.values,null]):void 0}),Q._zod.parse=(X,W)=>{if(X.value===null)return X;return Y.innerType._zod.run(X,W)}}),c1=w("$ZodDefault",(Q,Y)=>{M.init(Q,Y),Q._zod.optin="optional",D(Q._zod,"values",()=>Y.innerType._zod.values),Q._zod.parse=(X,W)=>{if(W.direction==="backward")return Y.innerType._zod.run(X,W);if(X.value===void 0)return X.value=Y.defaultValue,X;let G=Y.innerType._zod.run(X,W);if(G instanceof Promise)return G.then((J)=>n0(J,Y));return n0(G,Y)}});function n0(Q,Y){if(Q.value===void 0)Q.value=Y.defaultValue;return Q}var m1=w("$ZodPrefault",(Q,Y)=>{M.init(Q,Y),Q._zod.optin="optional",D(Q._zod,"values",()=>Y.innerType._zod.values),Q._zod.parse=(X,W)=>{if(W.direction==="backward")return Y.innerType._zod.run(X,W);if(X.value===void 0)X.value=Y.defaultValue;return Y.innerType._zod.run(X,W)}}),f1=w("$ZodNonOptional",(Q,Y)=>{M.init(Q,Y),D(Q._zod,"values",()=>{let X=Y.innerType._zod.values;return X?new Set([...X].filter((W)=>W!==void 0)):void 0}),Q._zod.parse=(X,W)=>{let G=Y.innerType._zod.run(X,W);if(G instanceof Promise)return G.then((J)=>e0(J,Q));return e0(G,Q)}});function e0(Q,Y){if(!Q.issues.length&&Q.value===void 0)Q.issues.push({code:"invalid_type",expected:"nonoptional",input:Q.value,inst:Y});return Q}var o1=w("$ZodCatch",(Q,Y)=>{M.init(Q,Y),D(Q._zod,"optin",()=>Y.innerType._zod.optin),D(Q._zod,"optout",()=>Y.innerType._zod.optout),D(Q._zod,"values",()=>Y.innerType._zod.values),Q._zod.parse=(X,W)=>{if(W.direction==="backward")return Y.innerType._zod.run(X,W);let G=Y.innerType._zod.run(X,W);if(G instanceof Promise)return G.then((J)=>{if(X.value=J.value,J.issues.length)X.value=Y.catchValue({...X,error:{issues:J.issues.map((K)=>j(K,W,v()))},input:X.value}),X.issues=[];return X});if(X.value=G.value,G.issues.length)X.value=Y.catchValue({...X,error:{issues:G.issues.map((J)=>j(J,W,v()))},input:X.value}),X.issues=[];return X}});var l1=w("$ZodPipe",(Q,Y)=>{M.init(Q,Y),D(Q._zod,"values",()=>Y.in._zod.values),D(Q._zod,"optin",()=>Y.in._zod.optin),D(Q._zod,"optout",()=>Y.out._zod.optout),D(Q._zod,"propValues",()=>Y.in._zod.propValues),Q._zod.parse=(X,W)=>{if(W.direction==="backward"){let J=Y.out._zod.run(X,W);if(J instanceof Promise)return J.then((K)=>PQ(K,Y.in,W));return PQ(J,Y.in,W)}let G=Y.in._zod.run(X,W);if(G instanceof Promise)return G.then((J)=>PQ(J,Y.out,W));return PQ(G,Y.out,W)}});function PQ(Q,Y,X){if(Q.issues.length)return Q.aborted=!0,Q;return Y._zod.run({value:Q.value,issues:Q.issues},X)}var r1=w("$ZodReadonly",(Q,Y)=>{M.init(Q,Y),D(Q._zod,"propValues",()=>Y.innerType._zod.propValues),D(Q._zod,"values",()=>Y.innerType._zod.values),D(Q._zod,"optin",()=>Y.innerType?._zod?.optin),D(Q._zod,"optout",()=>Y.innerType?._zod?.optout),Q._zod.parse=(X,W)=>{if(W.direction==="backward")return Y.innerType._zod.run(X,W);let G=Y.innerType._zod.run(X,W);if(G instanceof Promise)return G.then(t0);return t0(G)}});function t0(Q){return Q.value=Object.freeze(Q.value),Q}var p1=w("$ZodCustom",(Q,Y)=>{S.init(Q,Y),M.init(Q,Y),Q._zod.parse=(X,W)=>{return X},Q._zod.check=(X)=>{let W=X.value,G=Y.fn(W);if(G instanceof Promise)return G.then((J)=>a0(J,X,W,Q));a0(G,X,W,Q);return}});function a0(Q,Y,X,W){if(!Q){let G={code:"custom",input:X,inst:W,path:[...W._zod.def.path??[]],continue:!W._zod.def.abort};if(W._zod.def.params)G.params=W._zod.def.params;Y.issues.push(a(G))}}var d1,SX=Symbol("ZodOutput"),_X=Symbol("ZodInput");class i1{constructor(){this._map=new WeakMap,this._idmap=new Map}add(Q,...Y){let X=Y[0];if(this._map.set(Q,X),X&&typeof X==="object"&&"id"in X){if(this._idmap.has(X.id))throw Error(`ID ${X.id} already exists in the registry`);this._idmap.set(X.id,Q)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(Q){let Y=this._map.get(Q);if(Y&&typeof Y==="object"&&"id"in Y)this._idmap.delete(Y.id);return this._map.delete(Q),this}get(Q){let Y=Q._zod.parent;if(Y){let X={...this.get(Y)??{}};delete X.id;let W={...X,...this._map.get(Q)};return Object.keys(W).length?W:void 0}return this._map.get(Q)}has(Q){return this._map.has(Q)}}function O3(){return new i1}(d1=globalThis).__zod_globalRegistry??(d1.__zod_globalRegistry=O3());var d=globalThis.__zod_globalRegistry;function n1(Q,Y){return new Q({type:"string",...B(Y)})}function e1(Q,Y){return new Q({type:"string",format:"email",check:"string_format",abort:!1,...B(Y)})}function aQ(Q,Y){return new Q({type:"string",format:"guid",check:"string_format",abort:!1,...B(Y)})}function t1(Q,Y){return new Q({type:"string",format:"uuid",check:"string_format",abort:!1,...B(Y)})}function a1(Q,Y){return new Q({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...B(Y)})}function s1(Q,Y){return new Q({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...B(Y)})}function Q4(Q,Y){return new Q({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...B(Y)})}function Y4(Q,Y){return new Q({type:"string",format:"url",check:"string_format",abort:!1,...B(Y)})}function X4(Q,Y){return new Q({type:"string",format:"emoji",check:"string_format",abort:!1,...B(Y)})}function W4(Q,Y){return new Q({type:"string",format:"nanoid",check:"string_format",abort:!1,...B(Y)})}function G4(Q,Y){return new Q({type:"string",format:"cuid",check:"string_format",abort:!1,...B(Y)})}function J4(Q,Y){return new Q({type:"string",format:"cuid2",check:"string_format",abort:!1,...B(Y)})}function K4(Q,Y){return new Q({type:"string",format:"ulid",check:"string_format",abort:!1,...B(Y)})}function A4(Q,Y){return new Q({type:"string",format:"xid",check:"string_format",abort:!1,...B(Y)})}function w4(Q,Y){return new Q({type:"string",format:"ksuid",check:"string_format",abort:!1,...B(Y)})}function L4(Q,Y){return new Q({type:"string",format:"ipv4",check:"string_format",abort:!1,...B(Y)})}function H4(Q,Y){return new Q({type:"string",format:"ipv6",check:"string_format",abort:!1,...B(Y)})}function E4(Q,Y){return new Q({type:"string",format:"cidrv4",check:"string_format",abort:!1,...B(Y)})}function N4(Q,Y){return new Q({type:"string",format:"cidrv6",check:"string_format",abort:!1,...B(Y)})}function B4(Q,Y){return new Q({type:"string",format:"base64",check:"string_format",abort:!1,...B(Y)})}function z4(Q,Y){return new Q({type:"string",format:"base64url",check:"string_format",abort:!1,...B(Y)})}function q4(Q,Y){return new Q({type:"string",format:"e164",check:"string_format",abort:!1,...B(Y)})}function O4(Q,Y){return new Q({type:"string",format:"jwt",check:"string_format",abort:!1,...B(Y)})}function I4(Q,Y){return new Q({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...B(Y)})}function D4(Q,Y){return new Q({type:"string",format:"date",check:"string_format",...B(Y)})}function M4(Q,Y){return new Q({type:"string",format:"time",check:"string_format",precision:null,...B(Y)})}function F4(Q,Y){return new Q({type:"string",format:"duration",check:"string_format",...B(Y)})}function V4(Q,Y){return new Q({type:"number",checks:[],...B(Y)})}function U4(Q,Y){return new Q({type:"number",check:"number_format",abort:!1,format:"safeint",...B(Y)})}function $4(Q,Y){return new Q({type:"boolean",...B(Y)})}function P4(Q,Y){return new Q({type:"undefined",...B(Y)})}function R4(Q){return new Q({type:"unknown"})}function S4(Q,Y){return new Q({type:"never",...B(Y)})}function _Q(Q,Y){return new dQ({check:"less_than",...B(Y),value:Q,inclusive:!1})}function NQ(Q,Y){return new dQ({check:"less_than",...B(Y),value:Q,inclusive:!0})}function TQ(Q,Y){return new iQ({check:"greater_than",...B(Y),value:Q,inclusive:!1})}function BQ(Q,Y){return new iQ({check:"greater_than",...B(Y),value:Q,inclusive:!0})}function ZQ(Q,Y){return new j0({check:"multiple_of",...B(Y),value:Q})}function bQ(Q,Y){return new k0({check:"max_length",...B(Y),maximum:Q})}function s(Q,Y){return new v0({check:"min_length",...B(Y),minimum:Q})}function jQ(Q,Y){return new g0({check:"length_equals",...B(Y),length:Q})}function sQ(Q,Y){return new h0({check:"string_format",format:"regex",...B(Y),pattern:Q})}function QY(Q){return new x0({check:"string_format",format:"lowercase",...B(Q)})}function YY(Q){return new u0({check:"string_format",format:"uppercase",...B(Q)})}function XY(Q,Y){return new y0({check:"string_format",format:"includes",...B(Y),includes:Q})}function WY(Q,Y){return new c0({check:"string_format",format:"starts_with",...B(Y),prefix:Q})}function GY(Q,Y){return new m0({check:"string_format",format:"ends_with",...B(Y),suffix:Q})}function r(Q){return new f0({check:"overwrite",tx:Q})}function JY(Q){return r((Y)=>Y.normalize(Q))}function KY(){return r((Q)=>Q.trim())}function AY(){return r((Q)=>Q.toLowerCase())}function wY(){return r((Q)=>Q.toUpperCase())}function LY(){return r((Q)=>yQ(Q))}function _4(Q,Y,X){return new Q({type:"array",element:Y,...B(X)})}function T4(Q,Y,X){return new Q({type:"custom",check:"custom",fn:Y,...B(X)})}function Z4(Q){let Y=I3((X)=>{return X.addIssue=(W)=>{if(typeof W==="string")X.issues.push(a(W,X.value,Y._zod.def));else{let G=W;if(G.fatal)G.continue=!1;G.code??(G.code="custom"),G.input??(G.input=X.value),G.inst??(G.inst=Y),G.continue??(G.continue=!Y._zod.def.abort),X.issues.push(a(G))}},Q(X.value,X)});return Y}function I3(Q,Y){let X=new S({check:"custom",...B(Y)});return X._zod.check=Q,X}function HY(Q){let Y=Q?.target??"draft-2020-12";if(Y==="draft-4")Y="draft-04";if(Y==="draft-7")Y="draft-07";return{processors:Q.processors??{},metadataRegistry:Q?.metadata??d,target:Y,unrepresentable:Q?.unrepresentable??"throw",override:Q?.override??(()=>{}),io:Q?.io??"output",counter:0,seen:new Map,cycles:Q?.cycles??"ref",reused:Q?.reused??"inline",external:Q?.external??void 0}}function R(Q,Y,X={path:[],schemaPath:[]}){var W;let G=Q._zod.def,J=Y.seen.get(Q);if(J){if(J.count++,X.schemaPath.includes(Q))J.cycle=X.path;return J.schema}let K={schema:{},count:1,cycle:void 0,path:X.path};Y.seen.set(Q,K);let A=Q._zod.toJSONSchema?.();if(A)K.schema=A;else{let N={...X,schemaPath:[...X.schemaPath,Q],path:X.path},q=Q._zod.parent;if(q)K.ref=q,R(q,Y,N),Y.seen.get(q).isParent=!0;else if(Q._zod.processJSONSchema)Q._zod.processJSONSchema(Y,K.schema,N);else{let O=K.schema,U=Y.processors[G.type];if(!U)throw Error(`[toJSONSchema]: Non-representable type encountered: ${G.type}`);U(Q,Y,O,N)}}let L=Y.metadataRegistry.get(Q);if(L)Object.assign(K.schema,L);if(Y.io==="input"&&_(Q))delete K.schema.examples,delete K.schema.default;if(Y.io==="input"&&K.schema._prefault)(W=K.schema).default??(W.default=K.schema._prefault);return delete K.schema._prefault,Y.seen.get(Q).schema}function EY(Q,Y){let X=Q.seen.get(Y);if(!X)throw Error("Unprocessed schema. This is a bug in Zod.");let W=(J)=>{let K=Q.target==="draft-2020-12"?"$defs":"definitions";if(Q.external){let N=Q.external.registry.get(J[0])?.id,q=Q.external.uri??((U)=>U);if(N)return{ref:q(N)};let O=J[1].defId??J[1].schema.id??`schema${Q.counter++}`;return J[1].defId=O,{defId:O,ref:`${q("__shared")}#/${K}/${O}`}}if(J[1]===X)return{ref:"#"};let L=`${"#"}/${K}/`,H=J[1].schema.id??`__schema${Q.counter++}`;return{defId:H,ref:L+H}},G=(J)=>{if(J[1].schema.$ref)return;let K=J[1],{ref:A,defId:L}=W(J);if(K.def={...K.schema},L)K.defId=L;let H=K.schema;for(let N in H)delete H[N];H.$ref=A};if(Q.cycles==="throw")for(let J of Q.seen.entries()){let K=J[1];if(K.cycle)throw Error(`Cycle detected: #/${K.cycle?.join("/")}/<root>
20
+ `)}U.write("payload.value = newResult;"),U.write("return payload;");let x4=U.compile();return(g,k)=>x4(q,g,k)},G,K=e,A=!IQ.jitless,H=A&&cQ.value,N=Y.catchall,O;Q._zod.parse=(q,U)=>{O??(O=W.value);let T=q.value;if(!K(T))return q.issues.push({expected:"object",code:"invalid_type",input:T,inst:Q}),q;if(A&&H&&U?.async===!1&&U.jitless!==!0){if(!G)G=J(Y.shape);if(q=G(q,U),!N)return q;return Z0([],T,q,U,O,Q)}return X(q,U)}});function p1(Q,Y,X,W){for(let G of Q)if(G.issues.length===0)return Y.value=G.value,Y;let J=Q.filter((G)=>!l(G));if(J.length===1)return Y.value=J[0].value,J[0];return Y.issues.push({code:"invalid_union",input:Y.value,inst:X,errors:Q.map((G)=>G.issues.map((K)=>j(K,W,v())))}),Y}var C0=L("$ZodUnion",(Q,Y)=>{D.init(Q,Y),M(Q._zod,"optin",()=>Y.options.some((J)=>J._zod.optin==="optional")?"optional":void 0),M(Q._zod,"optout",()=>Y.options.some((J)=>J._zod.optout==="optional")?"optional":void 0),M(Q._zod,"values",()=>{if(Y.options.every((J)=>J._zod.values))return new Set(Y.options.flatMap((J)=>Array.from(J._zod.values)));return}),M(Q._zod,"pattern",()=>{if(Y.options.every((J)=>J._zod.pattern)){let J=Y.options.map((G)=>G._zod.pattern);return new RegExp(`^(${J.map((G)=>AQ(G.source)).join("|")})$`)}return});let X=Y.options.length===1,W=Y.options[0]._zod.run;Q._zod.parse=(J,G)=>{if(X)return W(J,G);let K=!1,A=[];for(let w of Y.options){let H=w._zod.run({value:J.value,issues:[]},G);if(H instanceof Promise)A.push(H),K=!0;else{if(H.issues.length===0)return H;A.push(H)}}if(!K)return p1(A,J,Q,G);return Promise.all(A).then((w)=>{return p1(w,J,Q,G)})}});var k0=L("$ZodIntersection",(Q,Y)=>{D.init(Q,Y),Q._zod.parse=(X,W)=>{let J=X.value,G=Y.left._zod.run({value:J,issues:[]},W),K=Y.right._zod.run({value:J,issues:[]},W);if(G instanceof Promise||K instanceof Promise)return Promise.all([G,K]).then(([w,H])=>{return d1(X,w,H)});return d1(X,G,K)}});function eQ(Q,Y){if(Q===Y)return{valid:!0,data:Q};if(Q instanceof Date&&Y instanceof Date&&+Q===+Y)return{valid:!0,data:Q};if(o(Q)&&o(Y)){let X=Object.keys(Y),W=Object.keys(Q).filter((G)=>X.indexOf(G)!==-1),J={...Q,...Y};for(let G of W){let K=eQ(Q[G],Y[G]);if(!K.valid)return{valid:!1,mergeErrorPath:[G,...K.mergeErrorPath]};J[G]=K.data}return{valid:!0,data:J}}if(Array.isArray(Q)&&Array.isArray(Y)){if(Q.length!==Y.length)return{valid:!1,mergeErrorPath:[]};let X=[];for(let W=0;W<Q.length;W++){let J=Q[W],G=Y[W],K=eQ(J,G);if(!K.valid)return{valid:!1,mergeErrorPath:[W,...K.mergeErrorPath]};X.push(K.data)}return{valid:!0,data:X}}return{valid:!1,mergeErrorPath:[]}}function d1(Q,Y,X){if(Y.issues.length)Q.issues.push(...Y.issues);if(X.issues.length)Q.issues.push(...X.issues);if(l(Q))return Q;let W=eQ(Y.value,X.value);if(!W.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(W.mergeErrorPath)}`);return Q.value=W.data,Q}var v0=L("$ZodRecord",(Q,Y)=>{D.init(Q,Y),Q._zod.parse=(X,W)=>{let J=X.value;if(!o(J))return X.issues.push({expected:"record",code:"invalid_type",input:J,inst:Q}),X;let G=[],K=Y.keyType._zod.values;if(K){X.value={};let A=new Set;for(let H of K)if(typeof H==="string"||typeof H==="number"||typeof H==="symbol"){A.add(typeof H==="number"?H.toString():H);let N=Y.valueType._zod.run({value:J[H],issues:[]},W);if(N instanceof Promise)G.push(N.then((O)=>{if(O.issues.length)X.issues.push(...u(H,O.issues));X.value[H]=O.value}));else{if(N.issues.length)X.issues.push(...u(H,N.issues));X.value[H]=N.value}}let w;for(let H in J)if(!A.has(H))w=w??[],w.push(H);if(w&&w.length>0)X.issues.push({code:"unrecognized_keys",input:J,inst:Q,keys:w})}else{X.value={};for(let A of Reflect.ownKeys(J)){if(A==="__proto__")continue;let w=Y.keyType._zod.run({value:A,issues:[]},W);if(w instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(w.issues.length){if(Y.mode==="loose")X.value[A]=J[A];else X.issues.push({code:"invalid_key",origin:"record",issues:w.issues.map((N)=>j(N,W,v())),input:A,path:[A],inst:Q});continue}let H=Y.valueType._zod.run({value:J[A],issues:[]},W);if(H instanceof Promise)G.push(H.then((N)=>{if(N.issues.length)X.issues.push(...u(A,N.issues));X.value[w.value]=N.value}));else{if(H.issues.length)X.issues.push(...u(A,H.issues));X.value[w.value]=H.value}}}if(G.length)return Promise.all(G).then(()=>X);return X}});var g0=L("$ZodEnum",(Q,Y)=>{D.init(Q,Y);let X=JQ(Y.entries),W=new Set(X);Q._zod.values=W,Q._zod.pattern=new RegExp(`^(${X.filter((J)=>mQ.has(typeof J)).map((J)=>typeof J==="string"?x(J):J.toString()).join("|")})$`),Q._zod.parse=(J,G)=>{let K=J.value;if(W.has(K))return J;return J.issues.push({code:"invalid_value",values:X,input:K,inst:Q}),J}}),h0=L("$ZodLiteral",(Q,Y)=>{if(D.init(Q,Y),Y.values.length===0)throw Error("Cannot create literal schema with no valid values");let X=new Set(Y.values);Q._zod.values=X,Q._zod.pattern=new RegExp(`^(${Y.values.map((W)=>typeof W==="string"?x(W):W?x(W.toString()):String(W)).join("|")})$`),Q._zod.parse=(W,J)=>{let G=W.value;if(X.has(G))return W;return W.issues.push({code:"invalid_value",values:Y.values,input:G,inst:Q}),W}});var x0=L("$ZodTransform",(Q,Y)=>{D.init(Q,Y),Q._zod.parse=(X,W)=>{if(W.direction==="backward")throw new XQ(Q.constructor.name);let J=Y.transform(X.value,X);if(W.async)return(J instanceof Promise?J:Promise.resolve(J)).then((K)=>{return X.value=K,X});if(J instanceof Promise)throw new h;return X.value=J,X}});function i1(Q,Y){if(Q.issues.length&&Y===void 0)return{issues:[],value:void 0};return Q}var u0=L("$ZodOptional",(Q,Y)=>{D.init(Q,Y),Q._zod.optin="optional",Q._zod.optout="optional",M(Q._zod,"values",()=>{return Y.innerType._zod.values?new Set([...Y.innerType._zod.values,void 0]):void 0}),M(Q._zod,"pattern",()=>{let X=Y.innerType._zod.pattern;return X?new RegExp(`^(${AQ(X.source)})?$`):void 0}),Q._zod.parse=(X,W)=>{if(Y.innerType._zod.optin==="optional"){let J=Y.innerType._zod.run(X,W);if(J instanceof Promise)return J.then((G)=>i1(G,X.value));return i1(J,X.value)}if(X.value===void 0)return X;return Y.innerType._zod.run(X,W)}}),y0=L("$ZodNullable",(Q,Y)=>{D.init(Q,Y),M(Q._zod,"optin",()=>Y.innerType._zod.optin),M(Q._zod,"optout",()=>Y.innerType._zod.optout),M(Q._zod,"pattern",()=>{let X=Y.innerType._zod.pattern;return X?new RegExp(`^(${AQ(X.source)}|null)$`):void 0}),M(Q._zod,"values",()=>{return Y.innerType._zod.values?new Set([...Y.innerType._zod.values,null]):void 0}),Q._zod.parse=(X,W)=>{if(X.value===null)return X;return Y.innerType._zod.run(X,W)}}),c0=L("$ZodDefault",(Q,Y)=>{D.init(Q,Y),Q._zod.optin="optional",M(Q._zod,"values",()=>Y.innerType._zod.values),Q._zod.parse=(X,W)=>{if(W.direction==="backward")return Y.innerType._zod.run(X,W);if(X.value===void 0)return X.value=Y.defaultValue,X;let J=Y.innerType._zod.run(X,W);if(J instanceof Promise)return J.then((G)=>n1(G,Y));return n1(J,Y)}});function n1(Q,Y){if(Q.value===void 0)Q.value=Y.defaultValue;return Q}var m0=L("$ZodPrefault",(Q,Y)=>{D.init(Q,Y),Q._zod.optin="optional",M(Q._zod,"values",()=>Y.innerType._zod.values),Q._zod.parse=(X,W)=>{if(W.direction==="backward")return Y.innerType._zod.run(X,W);if(X.value===void 0)X.value=Y.defaultValue;return Y.innerType._zod.run(X,W)}}),f0=L("$ZodNonOptional",(Q,Y)=>{D.init(Q,Y),M(Q._zod,"values",()=>{let X=Y.innerType._zod.values;return X?new Set([...X].filter((W)=>W!==void 0)):void 0}),Q._zod.parse=(X,W)=>{let J=Y.innerType._zod.run(X,W);if(J instanceof Promise)return J.then((G)=>e1(G,Q));return e1(J,Q)}});function e1(Q,Y){if(!Q.issues.length&&Q.value===void 0)Q.issues.push({code:"invalid_type",expected:"nonoptional",input:Q.value,inst:Y});return Q}var o0=L("$ZodCatch",(Q,Y)=>{D.init(Q,Y),M(Q._zod,"optin",()=>Y.innerType._zod.optin),M(Q._zod,"optout",()=>Y.innerType._zod.optout),M(Q._zod,"values",()=>Y.innerType._zod.values),Q._zod.parse=(X,W)=>{if(W.direction==="backward")return Y.innerType._zod.run(X,W);let J=Y.innerType._zod.run(X,W);if(J instanceof Promise)return J.then((G)=>{if(X.value=G.value,G.issues.length)X.value=Y.catchValue({...X,error:{issues:G.issues.map((K)=>j(K,W,v()))},input:X.value}),X.issues=[];return X});if(X.value=J.value,J.issues.length)X.value=Y.catchValue({...X,error:{issues:J.issues.map((G)=>j(G,W,v()))},input:X.value}),X.issues=[];return X}});var l0=L("$ZodPipe",(Q,Y)=>{D.init(Q,Y),M(Q._zod,"values",()=>Y.in._zod.values),M(Q._zod,"optin",()=>Y.in._zod.optin),M(Q._zod,"optout",()=>Y.out._zod.optout),M(Q._zod,"propValues",()=>Y.in._zod.propValues),Q._zod.parse=(X,W)=>{if(W.direction==="backward"){let G=Y.out._zod.run(X,W);if(G instanceof Promise)return G.then((K)=>PQ(K,Y.in,W));return PQ(G,Y.in,W)}let J=Y.in._zod.run(X,W);if(J instanceof Promise)return J.then((G)=>PQ(G,Y.out,W));return PQ(J,Y.out,W)}});function PQ(Q,Y,X){if(Q.issues.length)return Q.aborted=!0,Q;return Y._zod.run({value:Q.value,issues:Q.issues},X)}var r0=L("$ZodReadonly",(Q,Y)=>{D.init(Q,Y),M(Q._zod,"propValues",()=>Y.innerType._zod.propValues),M(Q._zod,"values",()=>Y.innerType._zod.values),M(Q._zod,"optin",()=>Y.innerType?._zod?.optin),M(Q._zod,"optout",()=>Y.innerType?._zod?.optout),Q._zod.parse=(X,W)=>{if(W.direction==="backward")return Y.innerType._zod.run(X,W);let J=Y.innerType._zod.run(X,W);if(J instanceof Promise)return J.then(t1);return t1(J)}});function t1(Q){return Q.value=Object.freeze(Q.value),Q}var p0=L("$ZodCustom",(Q,Y)=>{S.init(Q,Y),D.init(Q,Y),Q._zod.parse=(X,W)=>{return X},Q._zod.check=(X)=>{let W=X.value,J=Y.fn(W);if(J instanceof Promise)return J.then((G)=>a1(G,X,W,Q));a1(J,X,W,Q);return}});function a1(Q,Y,X,W){if(!Q){let J={code:"custom",input:X,inst:W,path:[...W._zod.def.path??[]],continue:!W._zod.def.abort};if(W._zod.def.params)J.params=W._zod.def.params;Y.issues.push(a(J))}}var d0,_2=Symbol("ZodOutput"),T2=Symbol("ZodInput");class i0{constructor(){this._map=new WeakMap,this._idmap=new Map}add(Q,...Y){let X=Y[0];if(this._map.set(Q,X),X&&typeof X==="object"&&"id"in X){if(this._idmap.has(X.id))throw Error(`ID ${X.id} already exists in the registry`);this._idmap.set(X.id,Q)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(Q){let Y=this._map.get(Q);if(Y&&typeof Y==="object"&&"id"in Y)this._idmap.delete(Y.id);return this._map.delete(Q),this}get(Q){let Y=Q._zod.parent;if(Y){let X={...this.get(Y)??{}};delete X.id;let W={...X,...this._map.get(Q)};return Object.keys(W).length?W:void 0}return this._map.get(Q)}has(Q){return this._map.has(Q)}}function I9(){return new i0}(d0=globalThis).__zod_globalRegistry??(d0.__zod_globalRegistry=I9());var d=globalThis.__zod_globalRegistry;function n0(Q,Y){return new Q({type:"string",...B(Y)})}function e0(Q,Y){return new Q({type:"string",format:"email",check:"string_format",abort:!1,...B(Y)})}function aQ(Q,Y){return new Q({type:"string",format:"guid",check:"string_format",abort:!1,...B(Y)})}function t0(Q,Y){return new Q({type:"string",format:"uuid",check:"string_format",abort:!1,...B(Y)})}function a0(Q,Y){return new Q({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...B(Y)})}function s0(Q,Y){return new Q({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...B(Y)})}function Q3(Q,Y){return new Q({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...B(Y)})}function Y3(Q,Y){return new Q({type:"string",format:"url",check:"string_format",abort:!1,...B(Y)})}function X3(Q,Y){return new Q({type:"string",format:"emoji",check:"string_format",abort:!1,...B(Y)})}function W3(Q,Y){return new Q({type:"string",format:"nanoid",check:"string_format",abort:!1,...B(Y)})}function J3(Q,Y){return new Q({type:"string",format:"cuid",check:"string_format",abort:!1,...B(Y)})}function G3(Q,Y){return new Q({type:"string",format:"cuid2",check:"string_format",abort:!1,...B(Y)})}function K3(Q,Y){return new Q({type:"string",format:"ulid",check:"string_format",abort:!1,...B(Y)})}function A3(Q,Y){return new Q({type:"string",format:"xid",check:"string_format",abort:!1,...B(Y)})}function L3(Q,Y){return new Q({type:"string",format:"ksuid",check:"string_format",abort:!1,...B(Y)})}function w3(Q,Y){return new Q({type:"string",format:"ipv4",check:"string_format",abort:!1,...B(Y)})}function E3(Q,Y){return new Q({type:"string",format:"ipv6",check:"string_format",abort:!1,...B(Y)})}function H3(Q,Y){return new Q({type:"string",format:"cidrv4",check:"string_format",abort:!1,...B(Y)})}function N3(Q,Y){return new Q({type:"string",format:"cidrv6",check:"string_format",abort:!1,...B(Y)})}function B3(Q,Y){return new Q({type:"string",format:"base64",check:"string_format",abort:!1,...B(Y)})}function z3(Q,Y){return new Q({type:"string",format:"base64url",check:"string_format",abort:!1,...B(Y)})}function O3(Q,Y){return new Q({type:"string",format:"e164",check:"string_format",abort:!1,...B(Y)})}function q3(Q,Y){return new Q({type:"string",format:"jwt",check:"string_format",abort:!1,...B(Y)})}function I3(Q,Y){return new Q({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...B(Y)})}function M3(Q,Y){return new Q({type:"string",format:"date",check:"string_format",...B(Y)})}function D3(Q,Y){return new Q({type:"string",format:"time",check:"string_format",precision:null,...B(Y)})}function V3(Q,Y){return new Q({type:"string",format:"duration",check:"string_format",...B(Y)})}function F3(Q,Y){return new Q({type:"number",checks:[],...B(Y)})}function U3(Q,Y){return new Q({type:"number",check:"number_format",abort:!1,format:"safeint",...B(Y)})}function $3(Q,Y){return new Q({type:"boolean",...B(Y)})}function P3(Q,Y){return new Q({type:"undefined",...B(Y)})}function R3(Q){return new Q({type:"unknown"})}function S3(Q,Y){return new Q({type:"never",...B(Y)})}function _Q(Q,Y){return new dQ({check:"less_than",...B(Y),value:Q,inclusive:!1})}function NQ(Q,Y){return new dQ({check:"less_than",...B(Y),value:Q,inclusive:!0})}function TQ(Q,Y){return new iQ({check:"greater_than",...B(Y),value:Q,inclusive:!1})}function BQ(Q,Y){return new iQ({check:"greater_than",...B(Y),value:Q,inclusive:!0})}function bQ(Q,Y){return new j1({check:"multiple_of",...B(Y),value:Q})}function ZQ(Q,Y){return new k1({check:"max_length",...B(Y),maximum:Q})}function s(Q,Y){return new v1({check:"min_length",...B(Y),minimum:Q})}function jQ(Q,Y){return new g1({check:"length_equals",...B(Y),length:Q})}function sQ(Q,Y){return new h1({check:"string_format",format:"regex",...B(Y),pattern:Q})}function QY(Q){return new x1({check:"string_format",format:"lowercase",...B(Q)})}function YY(Q){return new u1({check:"string_format",format:"uppercase",...B(Q)})}function XY(Q,Y){return new y1({check:"string_format",format:"includes",...B(Y),includes:Q})}function WY(Q,Y){return new c1({check:"string_format",format:"starts_with",...B(Y),prefix:Q})}function JY(Q,Y){return new m1({check:"string_format",format:"ends_with",...B(Y),suffix:Q})}function r(Q){return new f1({check:"overwrite",tx:Q})}function GY(Q){return r((Y)=>Y.normalize(Q))}function KY(){return r((Q)=>Q.trim())}function AY(){return r((Q)=>Q.toLowerCase())}function LY(){return r((Q)=>Q.toUpperCase())}function wY(){return r((Q)=>yQ(Q))}function _3(Q,Y,X){return new Q({type:"array",element:Y,...B(X)})}function T3(Q,Y,X){return new Q({type:"custom",check:"custom",fn:Y,...B(X)})}function b3(Q){let Y=M9((X)=>{return X.addIssue=(W)=>{if(typeof W==="string")X.issues.push(a(W,X.value,Y._zod.def));else{let J=W;if(J.fatal)J.continue=!1;J.code??(J.code="custom"),J.input??(J.input=X.value),J.inst??(J.inst=Y),J.continue??(J.continue=!Y._zod.def.abort),X.issues.push(a(J))}},Q(X.value,X)});return Y}function M9(Q,Y){let X=new S({check:"custom",...B(Y)});return X._zod.check=Q,X}function EY(Q){let Y=Q?.target??"draft-2020-12";if(Y==="draft-4")Y="draft-04";if(Y==="draft-7")Y="draft-07";return{processors:Q.processors??{},metadataRegistry:Q?.metadata??d,target:Y,unrepresentable:Q?.unrepresentable??"throw",override:Q?.override??(()=>{}),io:Q?.io??"output",counter:0,seen:new Map,cycles:Q?.cycles??"ref",reused:Q?.reused??"inline",external:Q?.external??void 0}}function R(Q,Y,X={path:[],schemaPath:[]}){var W;let J=Q._zod.def,G=Y.seen.get(Q);if(G){if(G.count++,X.schemaPath.includes(Q))G.cycle=X.path;return G.schema}let K={schema:{},count:1,cycle:void 0,path:X.path};Y.seen.set(Q,K);let A=Q._zod.toJSONSchema?.();if(A)K.schema=A;else{let N={...X,schemaPath:[...X.schemaPath,Q],path:X.path},O=Q._zod.parent;if(O)K.ref=O,R(O,Y,N),Y.seen.get(O).isParent=!0;else if(Q._zod.processJSONSchema)Q._zod.processJSONSchema(Y,K.schema,N);else{let q=K.schema,U=Y.processors[J.type];if(!U)throw Error(`[toJSONSchema]: Non-representable type encountered: ${J.type}`);U(Q,Y,q,N)}}let w=Y.metadataRegistry.get(Q);if(w)Object.assign(K.schema,w);if(Y.io==="input"&&_(Q))delete K.schema.examples,delete K.schema.default;if(Y.io==="input"&&K.schema._prefault)(W=K.schema).default??(W.default=K.schema._prefault);return delete K.schema._prefault,Y.seen.get(Q).schema}function HY(Q,Y){let X=Q.seen.get(Y);if(!X)throw Error("Unprocessed schema. This is a bug in Zod.");let W=(G)=>{let K=Q.target==="draft-2020-12"?"$defs":"definitions";if(Q.external){let N=Q.external.registry.get(G[0])?.id,O=Q.external.uri??((U)=>U);if(N)return{ref:O(N)};let q=G[1].defId??G[1].schema.id??`schema${Q.counter++}`;return G[1].defId=q,{defId:q,ref:`${O("__shared")}#/${K}/${q}`}}if(G[1]===X)return{ref:"#"};let w=`${"#"}/${K}/`,H=G[1].schema.id??`__schema${Q.counter++}`;return{defId:H,ref:w+H}},J=(G)=>{if(G[1].schema.$ref)return;let K=G[1],{ref:A,defId:w}=W(G);if(K.def={...K.schema},w)K.defId=w;let H=K.schema;for(let N in H)delete H[N];H.$ref=A};if(Q.cycles==="throw")for(let G of Q.seen.entries()){let K=G[1];if(K.cycle)throw Error(`Cycle detected: #/${K.cycle?.join("/")}/<root>
21
21
 
22
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let J of Q.seen.entries()){let K=J[1];if(Y===J[0]){G(J);continue}if(Q.external){let L=Q.external.registry.get(J[0])?.id;if(Y!==J[0]&&L){G(J);continue}}if(Q.metadataRegistry.get(J[0])?.id){G(J);continue}if(K.cycle){G(J);continue}if(K.count>1){if(Q.reused==="ref"){G(J);continue}}}}function NY(Q,Y){let X=Q.seen.get(Y);if(!X)throw Error("Unprocessed schema. This is a bug in Zod.");let W=(K)=>{let A=Q.seen.get(K),L=A.def??A.schema,H={...L};if(A.ref===null)return;let N=A.ref;if(A.ref=null,N){W(N);let q=Q.seen.get(N).schema;if(q.$ref&&(Q.target==="draft-07"||Q.target==="draft-04"||Q.target==="openapi-3.0"))L.allOf=L.allOf??[],L.allOf.push(q);else Object.assign(L,q),Object.assign(L,H)}if(!A.isParent)Q.override({zodSchema:K,jsonSchema:L,path:A.path??[]})};for(let K of[...Q.seen.entries()].reverse())W(K[0]);let G={};if(Q.target==="draft-2020-12")G.$schema="https://json-schema.org/draft/2020-12/schema";else if(Q.target==="draft-07")G.$schema="http://json-schema.org/draft-07/schema#";else if(Q.target==="draft-04")G.$schema="http://json-schema.org/draft-04/schema#";else if(Q.target==="openapi-3.0");if(Q.external?.uri){let K=Q.external.registry.get(Y)?.id;if(!K)throw Error("Schema is missing an `id` property");G.$id=Q.external.uri(K)}Object.assign(G,X.def??X.schema);let J=Q.external?.defs??{};for(let K of Q.seen.entries()){let A=K[1];if(A.def&&A.defId)J[A.defId]=A.def}if(Q.external);else if(Object.keys(J).length>0)if(Q.target==="draft-2020-12")G.$defs=J;else G.definitions=J;try{let K=JSON.parse(JSON.stringify(G));return Object.defineProperty(K,"~standard",{value:{...Y["~standard"],jsonSchema:{input:zQ(Y,"input"),output:zQ(Y,"output")}},enumerable:!1,writable:!1}),K}catch(K){throw Error("Error converting schema to JSON.")}}function _(Q,Y){let X=Y??{seen:new Set};if(X.seen.has(Q))return!1;X.seen.add(Q);let W=Q._zod.def;if(W.type==="transform")return!0;if(W.type==="array")return _(W.element,X);if(W.type==="set")return _(W.valueType,X);if(W.type==="lazy")return _(W.getter(),X);if(W.type==="promise"||W.type==="optional"||W.type==="nonoptional"||W.type==="nullable"||W.type==="readonly"||W.type==="default"||W.type==="prefault")return _(W.innerType,X);if(W.type==="intersection")return _(W.left,X)||_(W.right,X);if(W.type==="record"||W.type==="map")return _(W.keyType,X)||_(W.valueType,X);if(W.type==="pipe")return _(W.in,X)||_(W.out,X);if(W.type==="object"){for(let G in W.shape)if(_(W.shape[G],X))return!0;return!1}if(W.type==="union"){for(let G of W.options)if(_(G,X))return!0;return!1}if(W.type==="tuple"){for(let G of W.items)if(_(G,X))return!0;if(W.rest&&_(W.rest,X))return!0;return!1}return!1}var b4=(Q,Y={})=>(X)=>{let W=HY({...X,processors:Y});return R(Q,W),EY(W,Q),NY(W,Q)},zQ=(Q,Y)=>(X)=>{let{libraryOptions:W,target:G}=X??{},J=HY({...W??{},target:G,io:Y,processors:{}});return R(Q,J),EY(J,Q),NY(J,Q)};var D3={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},j4=(Q,Y,X,W)=>{let G=X;G.type="string";let{minimum:J,maximum:K,format:A,patterns:L,contentEncoding:H}=Q._zod.bag;if(typeof J==="number")G.minLength=J;if(typeof K==="number")G.maxLength=K;if(A){if(G.format=D3[A]??A,G.format==="")delete G.format}if(H)G.contentEncoding=H;if(L&&L.size>0){let N=[...L];if(N.length===1)G.pattern=N[0].source;else if(N.length>1)G.allOf=[...N.map((q)=>({...Y.target==="draft-07"||Y.target==="draft-04"||Y.target==="openapi-3.0"?{type:"string"}:{},pattern:q.source}))]}},C4=(Q,Y,X,W)=>{let G=X,{minimum:J,maximum:K,format:A,multipleOf:L,exclusiveMaximum:H,exclusiveMinimum:N}=Q._zod.bag;if(typeof A==="string"&&A.includes("int"))G.type="integer";else G.type="number";if(typeof N==="number")if(Y.target==="draft-04"||Y.target==="openapi-3.0")G.minimum=N,G.exclusiveMinimum=!0;else G.exclusiveMinimum=N;if(typeof J==="number"){if(G.minimum=J,typeof N==="number"&&Y.target!=="draft-04")if(N>=J)delete G.minimum;else delete G.exclusiveMinimum}if(typeof H==="number")if(Y.target==="draft-04"||Y.target==="openapi-3.0")G.maximum=H,G.exclusiveMaximum=!0;else G.exclusiveMaximum=H;if(typeof K==="number"){if(G.maximum=K,typeof H==="number"&&Y.target!=="draft-04")if(H<=K)delete G.maximum;else delete G.exclusiveMaximum}if(typeof L==="number")G.multipleOf=L},k4=(Q,Y,X,W)=>{X.type="boolean"};var v4=(Q,Y,X,W)=>{if(Y.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")};var g4=(Q,Y,X,W)=>{X.not={}};var h4=(Q,Y,X,W)=>{};var x4=(Q,Y,X,W)=>{let G=Q._zod.def,J=GQ(G.entries);if(J.every((K)=>typeof K==="number"))X.type="number";if(J.every((K)=>typeof K==="string"))X.type="string";X.enum=J},u4=(Q,Y,X,W)=>{let G=Q._zod.def,J=[];for(let K of G.values)if(K===void 0){if(Y.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof K==="bigint")if(Y.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else J.push(Number(K));else J.push(K);if(J.length===0);else if(J.length===1){let K=J[0];if(X.type=K===null?"null":typeof K,Y.target==="draft-04"||Y.target==="openapi-3.0")X.enum=[K];else X.const=K}else{if(J.every((K)=>typeof K==="number"))X.type="number";if(J.every((K)=>typeof K==="string"))X.type="string";if(J.every((K)=>typeof K==="boolean"))X.type="boolean";if(J.every((K)=>K===null))X.type="null";X.enum=J}};var y4=(Q,Y,X,W)=>{if(Y.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")};var c4=(Q,Y,X,W)=>{if(Y.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")};var m4=(Q,Y,X,W)=>{let G=X,J=Q._zod.def,{minimum:K,maximum:A}=Q._zod.bag;if(typeof K==="number")G.minItems=K;if(typeof A==="number")G.maxItems=A;G.type="array",G.items=R(J.element,Y,{...W,path:[...W.path,"items"]})},f4=(Q,Y,X,W)=>{let G=X,J=Q._zod.def;G.type="object",G.properties={};let K=J.shape;for(let H in K)G.properties[H]=R(K[H],Y,{...W,path:[...W.path,"properties",H]});let A=new Set(Object.keys(K)),L=new Set([...A].filter((H)=>{let N=J.shape[H]._zod;if(Y.io==="input")return N.optin===void 0;else return N.optout===void 0}));if(L.size>0)G.required=Array.from(L);if(J.catchall?._zod.def.type==="never")G.additionalProperties=!1;else if(!J.catchall){if(Y.io==="output")G.additionalProperties=!1}else if(J.catchall)G.additionalProperties=R(J.catchall,Y,{...W,path:[...W.path,"additionalProperties"]})},o4=(Q,Y,X,W)=>{let G=Q._zod.def,J=G.inclusive===!1,K=G.options.map((A,L)=>R(A,Y,{...W,path:[...W.path,J?"oneOf":"anyOf",L]}));if(J)X.oneOf=K;else X.anyOf=K},l4=(Q,Y,X,W)=>{let G=Q._zod.def,J=R(G.left,Y,{...W,path:[...W.path,"allOf",0]}),K=R(G.right,Y,{...W,path:[...W.path,"allOf",1]}),A=(H)=>("allOf"in H)&&Object.keys(H).length===1,L=[...A(J)?J.allOf:[J],...A(K)?K.allOf:[K]];X.allOf=L};var r4=(Q,Y,X,W)=>{let G=X,J=Q._zod.def;if(G.type="object",Y.target==="draft-07"||Y.target==="draft-2020-12")G.propertyNames=R(J.keyType,Y,{...W,path:[...W.path,"propertyNames"]});G.additionalProperties=R(J.valueType,Y,{...W,path:[...W.path,"additionalProperties"]})},p4=(Q,Y,X,W)=>{let G=Q._zod.def,J=R(G.innerType,Y,W),K=Y.seen.get(Q);if(Y.target==="openapi-3.0")K.ref=G.innerType,X.nullable=!0;else X.anyOf=[J,{type:"null"}]},d4=(Q,Y,X,W)=>{let G=Q._zod.def;R(G.innerType,Y,W);let J=Y.seen.get(Q);J.ref=G.innerType},i4=(Q,Y,X,W)=>{let G=Q._zod.def;R(G.innerType,Y,W);let J=Y.seen.get(Q);J.ref=G.innerType,X.default=JSON.parse(JSON.stringify(G.defaultValue))},n4=(Q,Y,X,W)=>{let G=Q._zod.def;R(G.innerType,Y,W);let J=Y.seen.get(Q);if(J.ref=G.innerType,Y.io==="input")X._prefault=JSON.parse(JSON.stringify(G.defaultValue))},e4=(Q,Y,X,W)=>{let G=Q._zod.def;R(G.innerType,Y,W);let J=Y.seen.get(Q);J.ref=G.innerType;let K;try{K=G.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}X.default=K},t4=(Q,Y,X,W)=>{let G=Q._zod.def,J=Y.io==="input"?G.in._zod.def.type==="transform"?G.out:G.in:G.out;R(J,Y,W);let K=Y.seen.get(Q);K.ref=J},a4=(Q,Y,X,W)=>{let G=Q._zod.def;R(G.innerType,Y,W);let J=Y.seen.get(Q);J.ref=G.innerType,X.readOnly=!0};var s4=(Q,Y,X,W)=>{let G=Q._zod.def;R(G.innerType,Y,W);let J=Y.seen.get(Q);J.ref=G.innerType};var R3=w("ZodISODateTime",(Q,Y)=>{H1.init(Q,Y),V.init(Q,Y)});function Q2(Q){return I4(R3,Q)}var S3=w("ZodISODate",(Q,Y)=>{E1.init(Q,Y),V.init(Q,Y)});function Y2(Q){return D4(S3,Q)}var _3=w("ZodISOTime",(Q,Y)=>{N1.init(Q,Y),V.init(Q,Y)});function X2(Q){return M4(_3,Q)}var T3=w("ZodISODuration",(Q,Y)=>{B1.init(Q,Y),V.init(Q,Y)});function W2(Q){return F4(T3,Q)}var G2=(Q,Y)=>{FQ.init(Q,Y),Q.name="ZodError",Object.defineProperties(Q,{format:{value:(X)=>rY(Q,X)},flatten:{value:(X)=>lY(Q,X)},addIssue:{value:(X)=>{Q.issues.push(X),Q.message=JSON.stringify(Q.issues,t,2)}},addIssues:{value:(X)=>{Q.issues.push(...X),Q.message=JSON.stringify(Q.issues,t,2)}},isEmpty:{get(){return Q.issues.length===0}}})},G6=w("ZodError",G2),Z=w("ZodError",G2,{Parent:Error});var J2=VQ(Z),K2=UQ(Z),A2=LQ(Z),w2=HQ(Z),L2=iY(Z),H2=nY(Z),E2=eY(Z),N2=tY(Z),B2=aY(Z),z2=sY(Z),q2=Q0(Z),O2=Y0(Z);var $=w("ZodType",(Q,Y)=>{return M.init(Q,Y),Object.assign(Q["~standard"],{jsonSchema:{input:zQ(Q,"input"),output:zQ(Q,"output")}}),Q.toJSONSchema=b4(Q,{}),Q.def=Y,Q.type=Y.type,Object.defineProperty(Q,"_def",{value:Y}),Q.check=(...X)=>{return Q.clone(I.mergeDefs(Y,{checks:[...Y.checks??[],...X.map((W)=>typeof W==="function"?{_zod:{check:W,def:{check:"custom"},onattach:[]}}:W)]}))},Q.clone=(X,W)=>b(Q,X,W),Q.brand=()=>Q,Q.register=(X,W)=>{return X.add(Q,W),Q},Q.parse=(X,W)=>J2(Q,X,W,{callee:Q.parse}),Q.safeParse=(X,W)=>A2(Q,X,W),Q.parseAsync=async(X,W)=>K2(Q,X,W,{callee:Q.parseAsync}),Q.safeParseAsync=async(X,W)=>w2(Q,X,W),Q.spa=Q.safeParseAsync,Q.encode=(X,W)=>L2(Q,X,W),Q.decode=(X,W)=>H2(Q,X,W),Q.encodeAsync=async(X,W)=>E2(Q,X,W),Q.decodeAsync=async(X,W)=>N2(Q,X,W),Q.safeEncode=(X,W)=>B2(Q,X,W),Q.safeDecode=(X,W)=>z2(Q,X,W),Q.safeEncodeAsync=async(X,W)=>q2(Q,X,W),Q.safeDecodeAsync=async(X,W)=>O2(Q,X,W),Q.refine=(X,W)=>Q.check($9(X,W)),Q.superRefine=(X)=>Q.check(P9(X)),Q.overwrite=(X)=>Q.check(r(X)),Q.optional=()=>M2(Q),Q.nullable=()=>F2(Q),Q.nullish=()=>M2(F2(Q)),Q.nonoptional=(X)=>O9(Q,X),Q.array=()=>c(Q),Q.or=(X)=>p([Q,X]),Q.and=(X)=>J9(Q,X),Q.transform=(X)=>V2(Q,H9(X)),Q.default=(X)=>B9(Q,X),Q.prefault=(X)=>q9(Q,X),Q.catch=(X)=>D9(Q,X),Q.pipe=(X)=>V2(Q,X),Q.readonly=()=>V9(Q),Q.describe=(X)=>{let W=Q.clone();return d.add(W,{description:X}),W},Object.defineProperty(Q,"description",{get(){return d.get(Q)?.description},configurable:!0}),Q.meta=(...X)=>{if(X.length===0)return d.get(Q);let W=Q.clone();return d.add(W,X[0]),W},Q.isOptional=()=>Q.safeParse(void 0).success,Q.isNullable=()=>Q.safeParse(null).success,Q}),U2=w("_ZodString",(Q,Y)=>{SQ.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(W,G,J)=>j4(Q,W,G,J);let X=Q._zod.bag;Q.format=X.format??null,Q.minLength=X.minimum??null,Q.maxLength=X.maximum??null,Q.regex=(...W)=>Q.check(sQ(...W)),Q.includes=(...W)=>Q.check(XY(...W)),Q.startsWith=(...W)=>Q.check(WY(...W)),Q.endsWith=(...W)=>Q.check(GY(...W)),Q.min=(...W)=>Q.check(s(...W)),Q.max=(...W)=>Q.check(bQ(...W)),Q.length=(...W)=>Q.check(jQ(...W)),Q.nonempty=(...W)=>Q.check(s(1,...W)),Q.lowercase=(W)=>Q.check(QY(W)),Q.uppercase=(W)=>Q.check(YY(W)),Q.trim=()=>Q.check(KY()),Q.normalize=(...W)=>Q.check(JY(...W)),Q.toLowerCase=()=>Q.check(AY()),Q.toUpperCase=()=>Q.check(wY()),Q.slugify=()=>Q.check(LY())}),C3=w("ZodString",(Q,Y)=>{SQ.init(Q,Y),U2.init(Q,Y),Q.email=(X)=>Q.check(e1(k3,X)),Q.url=(X)=>Q.check(Y4(v3,X)),Q.jwt=(X)=>Q.check(O4(n3,X)),Q.emoji=(X)=>Q.check(X4(g3,X)),Q.guid=(X)=>Q.check(aQ(I2,X)),Q.uuid=(X)=>Q.check(t1(kQ,X)),Q.uuidv4=(X)=>Q.check(a1(kQ,X)),Q.uuidv6=(X)=>Q.check(s1(kQ,X)),Q.uuidv7=(X)=>Q.check(Q4(kQ,X)),Q.nanoid=(X)=>Q.check(W4(h3,X)),Q.guid=(X)=>Q.check(aQ(I2,X)),Q.cuid=(X)=>Q.check(G4(x3,X)),Q.cuid2=(X)=>Q.check(J4(u3,X)),Q.ulid=(X)=>Q.check(K4(y3,X)),Q.base64=(X)=>Q.check(B4(p3,X)),Q.base64url=(X)=>Q.check(z4(d3,X)),Q.xid=(X)=>Q.check(A4(c3,X)),Q.ksuid=(X)=>Q.check(w4(m3,X)),Q.ipv4=(X)=>Q.check(L4(f3,X)),Q.ipv6=(X)=>Q.check(H4(o3,X)),Q.cidrv4=(X)=>Q.check(E4(l3,X)),Q.cidrv6=(X)=>Q.check(N4(r3,X)),Q.e164=(X)=>Q.check(q4(i3,X)),Q.datetime=(X)=>Q.check(Q2(X)),Q.date=(X)=>Q.check(Y2(X)),Q.time=(X)=>Q.check(X2(X)),Q.duration=(X)=>Q.check(W2(X))});function P(Q){return n1(C3,Q)}var V=w("ZodStringFormat",(Q,Y)=>{F.init(Q,Y),U2.init(Q,Y)}),k3=w("ZodEmail",(Q,Y)=>{Y1.init(Q,Y),V.init(Q,Y)});var I2=w("ZodGUID",(Q,Y)=>{s0.init(Q,Y),V.init(Q,Y)});var kQ=w("ZodUUID",(Q,Y)=>{Q1.init(Q,Y),V.init(Q,Y)});var v3=w("ZodURL",(Q,Y)=>{X1.init(Q,Y),V.init(Q,Y)});var g3=w("ZodEmoji",(Q,Y)=>{W1.init(Q,Y),V.init(Q,Y)});var h3=w("ZodNanoID",(Q,Y)=>{G1.init(Q,Y),V.init(Q,Y)});var x3=w("ZodCUID",(Q,Y)=>{J1.init(Q,Y),V.init(Q,Y)});var u3=w("ZodCUID2",(Q,Y)=>{K1.init(Q,Y),V.init(Q,Y)});var y3=w("ZodULID",(Q,Y)=>{A1.init(Q,Y),V.init(Q,Y)});var c3=w("ZodXID",(Q,Y)=>{w1.init(Q,Y),V.init(Q,Y)});var m3=w("ZodKSUID",(Q,Y)=>{L1.init(Q,Y),V.init(Q,Y)});var f3=w("ZodIPv4",(Q,Y)=>{z1.init(Q,Y),V.init(Q,Y)});var o3=w("ZodIPv6",(Q,Y)=>{q1.init(Q,Y),V.init(Q,Y)});var l3=w("ZodCIDRv4",(Q,Y)=>{O1.init(Q,Y),V.init(Q,Y)});var r3=w("ZodCIDRv6",(Q,Y)=>{I1.init(Q,Y),V.init(Q,Y)});var p3=w("ZodBase64",(Q,Y)=>{M1.init(Q,Y),V.init(Q,Y)});var d3=w("ZodBase64URL",(Q,Y)=>{F1.init(Q,Y),V.init(Q,Y)});var i3=w("ZodE164",(Q,Y)=>{V1.init(Q,Y),V.init(Q,Y)});var n3=w("ZodJWT",(Q,Y)=>{U1.init(Q,Y),V.init(Q,Y)});var $2=w("ZodNumber",(Q,Y)=>{tQ.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(W,G,J)=>C4(Q,W,G,J),Q.gt=(W,G)=>Q.check(TQ(W,G)),Q.gte=(W,G)=>Q.check(BQ(W,G)),Q.min=(W,G)=>Q.check(BQ(W,G)),Q.lt=(W,G)=>Q.check(_Q(W,G)),Q.lte=(W,G)=>Q.check(NQ(W,G)),Q.max=(W,G)=>Q.check(NQ(W,G)),Q.int=(W)=>Q.check(D2(W)),Q.safe=(W)=>Q.check(D2(W)),Q.positive=(W)=>Q.check(TQ(0,W)),Q.nonnegative=(W)=>Q.check(BQ(0,W)),Q.negative=(W)=>Q.check(_Q(0,W)),Q.nonpositive=(W)=>Q.check(NQ(0,W)),Q.multipleOf=(W,G)=>Q.check(ZQ(W,G)),Q.step=(W,G)=>Q.check(ZQ(W,G)),Q.finite=()=>Q;let X=Q._zod.bag;Q.minValue=Math.max(X.minimum??Number.NEGATIVE_INFINITY,X.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,Q.maxValue=Math.min(X.maximum??Number.POSITIVE_INFINITY,X.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,Q.isInt=(X.format??"").includes("int")||Number.isSafeInteger(X.multipleOf??0.5),Q.isFinite=!0,Q.format=X.format??null});function C(Q){return V4($2,Q)}var e3=w("ZodNumberFormat",(Q,Y)=>{$1.init(Q,Y),$2.init(Q,Y)});function D2(Q){return U4(e3,Q)}var t3=w("ZodBoolean",(Q,Y)=>{P1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>k4(Q,X,W,G)});function y(Q){return $4(t3,Q)}var a3=w("ZodUndefined",(Q,Y)=>{R1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>v4(Q,X,W,G)});function P2(Q){return P4(a3,Q)}var s3=w("ZodUnknown",(Q,Y)=>{S1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>h4(Q,X,W,G)});function i(){return R4(s3)}var Q9=w("ZodNever",(Q,Y)=>{_1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>g4(Q,X,W,G)});function Y9(Q){return S4(Q9,Q)}var X9=w("ZodArray",(Q,Y)=>{T1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>m4(Q,X,W,G),Q.element=Y.element,Q.min=(X,W)=>Q.check(s(X,W)),Q.nonempty=(X)=>Q.check(s(1,X)),Q.max=(X,W)=>Q.check(bQ(X,W)),Q.length=(X,W)=>Q.check(jQ(X,W)),Q.unwrap=()=>Q.element});function c(Q,Y){return _4(X9,Q,Y)}var R2=w("ZodObject",(Q,Y)=>{j1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>f4(Q,X,W,G),I.defineLazy(Q,"shape",()=>{return Y.shape}),Q.keyof=()=>A9(Object.keys(Q._zod.def.shape)),Q.catchall=(X)=>Q.clone({...Q._zod.def,catchall:X}),Q.passthrough=()=>Q.clone({...Q._zod.def,catchall:i()}),Q.loose=()=>Q.clone({...Q._zod.def,catchall:i()}),Q.strict=()=>Q.clone({...Q._zod.def,catchall:Y9()}),Q.strip=()=>Q.clone({...Q._zod.def,catchall:void 0}),Q.extend=(X)=>{return I.extend(Q,X)},Q.safeExtend=(X)=>{return I.safeExtend(Q,X)},Q.merge=(X)=>I.merge(Q,X),Q.pick=(X)=>I.pick(Q,X),Q.omit=(X)=>I.omit(Q,X),Q.partial=(...X)=>I.partial(S2,Q,X[0]),Q.required=(...X)=>I.required(_2,Q,X[0])});function z(Q,Y){let X={type:"object",shape:Q??{},...I.normalizeParams(Y)};return new R2(X)}function QQ(Q,Y){return new R2({type:"object",shape:Q,catchall:i(),...I.normalizeParams(Y)})}var W9=w("ZodUnion",(Q,Y)=>{C1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>o4(Q,X,W,G),Q.options=Y.options});function p(Q,Y){return new W9({type:"union",options:Q,...I.normalizeParams(Y)})}var G9=w("ZodIntersection",(Q,Y)=>{k1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>l4(Q,X,W,G)});function J9(Q,Y){return new G9({type:"intersection",left:Q,right:Y})}var K9=w("ZodRecord",(Q,Y)=>{v1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>r4(Q,X,W,G),Q.keyType=Y.keyType,Q.valueType=Y.valueType});function qQ(Q,Y,X){return new K9({type:"record",keyType:Q,valueType:Y,...I.normalizeParams(X)})}var BY=w("ZodEnum",(Q,Y)=>{g1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(W,G,J)=>x4(Q,W,G,J),Q.enum=Y.entries,Q.options=Object.values(Y.entries);let X=new Set(Object.keys(Y.entries));Q.extract=(W,G)=>{let J={};for(let K of W)if(X.has(K))J[K]=Y.entries[K];else throw Error(`Key ${K} not found in enum`);return new BY({...Y,checks:[],...I.normalizeParams(G),entries:J})},Q.exclude=(W,G)=>{let J={...Y.entries};for(let K of W)if(X.has(K))delete J[K];else throw Error(`Key ${K} not found in enum`);return new BY({...Y,checks:[],...I.normalizeParams(G),entries:J})}});function A9(Q,Y){let X=Array.isArray(Q)?Object.fromEntries(Q.map((W)=>[W,W])):Q;return new BY({type:"enum",entries:X,...I.normalizeParams(Y)})}var w9=w("ZodLiteral",(Q,Y)=>{h1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>u4(Q,X,W,G),Q.values=new Set(Y.values),Object.defineProperty(Q,"value",{get(){if(Y.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return Y.values[0]}})});function E(Q,Y){return new w9({type:"literal",values:Array.isArray(Q)?Q:[Q],...I.normalizeParams(Y)})}var L9=w("ZodTransform",(Q,Y)=>{x1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>c4(Q,X,W,G),Q._zod.parse=(X,W)=>{if(W.direction==="backward")throw new XQ(Q.constructor.name);X.addIssue=(J)=>{if(typeof J==="string")X.issues.push(I.issue(J,X.value,Y));else{let K=J;if(K.fatal)K.continue=!1;K.code??(K.code="custom"),K.input??(K.input=X.value),K.inst??(K.inst=Q),X.issues.push(I.issue(K))}};let G=Y.transform(X.value,X);if(G instanceof Promise)return G.then((J)=>{return X.value=J,X});return X.value=G,X}});function H9(Q){return new L9({type:"transform",transform:Q})}var S2=w("ZodOptional",(Q,Y)=>{u1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>s4(Q,X,W,G),Q.unwrap=()=>Q._zod.def.innerType});function M2(Q){return new S2({type:"optional",innerType:Q})}var E9=w("ZodNullable",(Q,Y)=>{y1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>p4(Q,X,W,G),Q.unwrap=()=>Q._zod.def.innerType});function F2(Q){return new E9({type:"nullable",innerType:Q})}var N9=w("ZodDefault",(Q,Y)=>{c1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>i4(Q,X,W,G),Q.unwrap=()=>Q._zod.def.innerType,Q.removeDefault=Q.unwrap});function B9(Q,Y){return new N9({type:"default",innerType:Q,get defaultValue(){return typeof Y==="function"?Y():I.shallowClone(Y)}})}var z9=w("ZodPrefault",(Q,Y)=>{m1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>n4(Q,X,W,G),Q.unwrap=()=>Q._zod.def.innerType});function q9(Q,Y){return new z9({type:"prefault",innerType:Q,get defaultValue(){return typeof Y==="function"?Y():I.shallowClone(Y)}})}var _2=w("ZodNonOptional",(Q,Y)=>{f1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>d4(Q,X,W,G),Q.unwrap=()=>Q._zod.def.innerType});function O9(Q,Y){return new _2({type:"nonoptional",innerType:Q,...I.normalizeParams(Y)})}var I9=w("ZodCatch",(Q,Y)=>{o1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>e4(Q,X,W,G),Q.unwrap=()=>Q._zod.def.innerType,Q.removeCatch=Q.unwrap});function D9(Q,Y){return new I9({type:"catch",innerType:Q,catchValue:typeof Y==="function"?Y:()=>Y})}var M9=w("ZodPipe",(Q,Y)=>{l1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>t4(Q,X,W,G),Q.in=Y.in,Q.out=Y.out});function V2(Q,Y){return new M9({type:"pipe",in:Q,out:Y})}var F9=w("ZodReadonly",(Q,Y)=>{r1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>a4(Q,X,W,G),Q.unwrap=()=>Q._zod.def.innerType});function V9(Q){return new F9({type:"readonly",innerType:Q})}var U9=w("ZodCustom",(Q,Y)=>{p1.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,G)=>y4(Q,X,W,G)});function $9(Q,Y={}){return T4(U9,Q,Y)}function P9(Q){return Z4(Q)}import{ContentBlockSchema as R9,CallToolResultSchema as S9,ImplementationSchema as T2,RequestIdSchema as _9,ToolSchema as T9}from"@modelcontextprotocol/sdk/types.js";var Z2=p([E("light"),E("dark")]).describe("Color theme preference for the host environment."),vQ=p([E("inline"),E("fullscreen"),E("pip")]).describe("Display mode for UI presentation."),Z9=p([E("--color-background-primary"),E("--color-background-secondary"),E("--color-background-tertiary"),E("--color-background-inverse"),E("--color-background-ghost"),E("--color-background-info"),E("--color-background-danger"),E("--color-background-success"),E("--color-background-warning"),E("--color-background-disabled"),E("--color-text-primary"),E("--color-text-secondary"),E("--color-text-tertiary"),E("--color-text-inverse"),E("--color-text-info"),E("--color-text-danger"),E("--color-text-success"),E("--color-text-warning"),E("--color-text-disabled"),E("--color-border-primary"),E("--color-border-secondary"),E("--color-border-tertiary"),E("--color-border-inverse"),E("--color-border-ghost"),E("--color-border-info"),E("--color-border-danger"),E("--color-border-success"),E("--color-border-warning"),E("--color-border-disabled"),E("--color-ring-primary"),E("--color-ring-secondary"),E("--color-ring-inverse"),E("--color-ring-info"),E("--color-ring-danger"),E("--color-ring-success"),E("--color-ring-warning"),E("--font-sans"),E("--font-mono"),E("--font-weight-normal"),E("--font-weight-medium"),E("--font-weight-semibold"),E("--font-weight-bold"),E("--font-text-xs-size"),E("--font-text-sm-size"),E("--font-text-md-size"),E("--font-text-lg-size"),E("--font-heading-xs-size"),E("--font-heading-sm-size"),E("--font-heading-md-size"),E("--font-heading-lg-size"),E("--font-heading-xl-size"),E("--font-heading-2xl-size"),E("--font-heading-3xl-size"),E("--font-text-xs-line-height"),E("--font-text-sm-line-height"),E("--font-text-md-line-height"),E("--font-text-lg-line-height"),E("--font-heading-xs-line-height"),E("--font-heading-sm-line-height"),E("--font-heading-md-line-height"),E("--font-heading-lg-line-height"),E("--font-heading-xl-line-height"),E("--font-heading-2xl-line-height"),E("--font-heading-3xl-line-height"),E("--border-radius-xs"),E("--border-radius-sm"),E("--border-radius-md"),E("--border-radius-lg"),E("--border-radius-xl"),E("--border-radius-full"),E("--border-width-regular"),E("--shadow-hairline"),E("--shadow-sm"),E("--shadow-md"),E("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),b9=qQ(Z9.describe(`Style variables for theming MCP apps.
22
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let G of Q.seen.entries()){let K=G[1];if(Y===G[0]){J(G);continue}if(Q.external){let w=Q.external.registry.get(G[0])?.id;if(Y!==G[0]&&w){J(G);continue}}if(Q.metadataRegistry.get(G[0])?.id){J(G);continue}if(K.cycle){J(G);continue}if(K.count>1){if(Q.reused==="ref"){J(G);continue}}}}function NY(Q,Y){let X=Q.seen.get(Y);if(!X)throw Error("Unprocessed schema. This is a bug in Zod.");let W=(K)=>{let A=Q.seen.get(K),w=A.def??A.schema,H={...w};if(A.ref===null)return;let N=A.ref;if(A.ref=null,N){W(N);let O=Q.seen.get(N).schema;if(O.$ref&&(Q.target==="draft-07"||Q.target==="draft-04"||Q.target==="openapi-3.0"))w.allOf=w.allOf??[],w.allOf.push(O);else Object.assign(w,O),Object.assign(w,H)}if(!A.isParent)Q.override({zodSchema:K,jsonSchema:w,path:A.path??[]})};for(let K of[...Q.seen.entries()].reverse())W(K[0]);let J={};if(Q.target==="draft-2020-12")J.$schema="https://json-schema.org/draft/2020-12/schema";else if(Q.target==="draft-07")J.$schema="http://json-schema.org/draft-07/schema#";else if(Q.target==="draft-04")J.$schema="http://json-schema.org/draft-04/schema#";else if(Q.target==="openapi-3.0");if(Q.external?.uri){let K=Q.external.registry.get(Y)?.id;if(!K)throw Error("Schema is missing an `id` property");J.$id=Q.external.uri(K)}Object.assign(J,X.def??X.schema);let G=Q.external?.defs??{};for(let K of Q.seen.entries()){let A=K[1];if(A.def&&A.defId)G[A.defId]=A.def}if(Q.external);else if(Object.keys(G).length>0)if(Q.target==="draft-2020-12")J.$defs=G;else J.definitions=G;try{let K=JSON.parse(JSON.stringify(J));return Object.defineProperty(K,"~standard",{value:{...Y["~standard"],jsonSchema:{input:zQ(Y,"input"),output:zQ(Y,"output")}},enumerable:!1,writable:!1}),K}catch(K){throw Error("Error converting schema to JSON.")}}function _(Q,Y){let X=Y??{seen:new Set};if(X.seen.has(Q))return!1;X.seen.add(Q);let W=Q._zod.def;if(W.type==="transform")return!0;if(W.type==="array")return _(W.element,X);if(W.type==="set")return _(W.valueType,X);if(W.type==="lazy")return _(W.getter(),X);if(W.type==="promise"||W.type==="optional"||W.type==="nonoptional"||W.type==="nullable"||W.type==="readonly"||W.type==="default"||W.type==="prefault")return _(W.innerType,X);if(W.type==="intersection")return _(W.left,X)||_(W.right,X);if(W.type==="record"||W.type==="map")return _(W.keyType,X)||_(W.valueType,X);if(W.type==="pipe")return _(W.in,X)||_(W.out,X);if(W.type==="object"){for(let J in W.shape)if(_(W.shape[J],X))return!0;return!1}if(W.type==="union"){for(let J of W.options)if(_(J,X))return!0;return!1}if(W.type==="tuple"){for(let J of W.items)if(_(J,X))return!0;if(W.rest&&_(W.rest,X))return!0;return!1}return!1}var Z3=(Q,Y={})=>(X)=>{let W=EY({...X,processors:Y});return R(Q,W),HY(W,Q),NY(W,Q)},zQ=(Q,Y)=>(X)=>{let{libraryOptions:W,target:J}=X??{},G=EY({...W??{},target:J,io:Y,processors:{}});return R(Q,G),HY(G,Q),NY(G,Q)};var D9={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},j3=(Q,Y,X,W)=>{let J=X;J.type="string";let{minimum:G,maximum:K,format:A,patterns:w,contentEncoding:H}=Q._zod.bag;if(typeof G==="number")J.minLength=G;if(typeof K==="number")J.maxLength=K;if(A){if(J.format=D9[A]??A,J.format==="")delete J.format}if(H)J.contentEncoding=H;if(w&&w.size>0){let N=[...w];if(N.length===1)J.pattern=N[0].source;else if(N.length>1)J.allOf=[...N.map((O)=>({...Y.target==="draft-07"||Y.target==="draft-04"||Y.target==="openapi-3.0"?{type:"string"}:{},pattern:O.source}))]}},C3=(Q,Y,X,W)=>{let J=X,{minimum:G,maximum:K,format:A,multipleOf:w,exclusiveMaximum:H,exclusiveMinimum:N}=Q._zod.bag;if(typeof A==="string"&&A.includes("int"))J.type="integer";else J.type="number";if(typeof N==="number")if(Y.target==="draft-04"||Y.target==="openapi-3.0")J.minimum=N,J.exclusiveMinimum=!0;else J.exclusiveMinimum=N;if(typeof G==="number"){if(J.minimum=G,typeof N==="number"&&Y.target!=="draft-04")if(N>=G)delete J.minimum;else delete J.exclusiveMinimum}if(typeof H==="number")if(Y.target==="draft-04"||Y.target==="openapi-3.0")J.maximum=H,J.exclusiveMaximum=!0;else J.exclusiveMaximum=H;if(typeof K==="number"){if(J.maximum=K,typeof H==="number"&&Y.target!=="draft-04")if(H<=K)delete J.maximum;else delete J.exclusiveMaximum}if(typeof w==="number")J.multipleOf=w},k3=(Q,Y,X,W)=>{X.type="boolean"};var v3=(Q,Y,X,W)=>{if(Y.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")};var g3=(Q,Y,X,W)=>{X.not={}};var h3=(Q,Y,X,W)=>{};var x3=(Q,Y,X,W)=>{let J=Q._zod.def,G=JQ(J.entries);if(G.every((K)=>typeof K==="number"))X.type="number";if(G.every((K)=>typeof K==="string"))X.type="string";X.enum=G},u3=(Q,Y,X,W)=>{let J=Q._zod.def,G=[];for(let K of J.values)if(K===void 0){if(Y.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof K==="bigint")if(Y.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else G.push(Number(K));else G.push(K);if(G.length===0);else if(G.length===1){let K=G[0];if(X.type=K===null?"null":typeof K,Y.target==="draft-04"||Y.target==="openapi-3.0")X.enum=[K];else X.const=K}else{if(G.every((K)=>typeof K==="number"))X.type="number";if(G.every((K)=>typeof K==="string"))X.type="string";if(G.every((K)=>typeof K==="boolean"))X.type="boolean";if(G.every((K)=>K===null))X.type="null";X.enum=G}};var y3=(Q,Y,X,W)=>{if(Y.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")};var c3=(Q,Y,X,W)=>{if(Y.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")};var m3=(Q,Y,X,W)=>{let J=X,G=Q._zod.def,{minimum:K,maximum:A}=Q._zod.bag;if(typeof K==="number")J.minItems=K;if(typeof A==="number")J.maxItems=A;J.type="array",J.items=R(G.element,Y,{...W,path:[...W.path,"items"]})},f3=(Q,Y,X,W)=>{let J=X,G=Q._zod.def;J.type="object",J.properties={};let K=G.shape;for(let H in K)J.properties[H]=R(K[H],Y,{...W,path:[...W.path,"properties",H]});let A=new Set(Object.keys(K)),w=new Set([...A].filter((H)=>{let N=G.shape[H]._zod;if(Y.io==="input")return N.optin===void 0;else return N.optout===void 0}));if(w.size>0)J.required=Array.from(w);if(G.catchall?._zod.def.type==="never")J.additionalProperties=!1;else if(!G.catchall){if(Y.io==="output")J.additionalProperties=!1}else if(G.catchall)J.additionalProperties=R(G.catchall,Y,{...W,path:[...W.path,"additionalProperties"]})},o3=(Q,Y,X,W)=>{let J=Q._zod.def,G=J.inclusive===!1,K=J.options.map((A,w)=>R(A,Y,{...W,path:[...W.path,G?"oneOf":"anyOf",w]}));if(G)X.oneOf=K;else X.anyOf=K},l3=(Q,Y,X,W)=>{let J=Q._zod.def,G=R(J.left,Y,{...W,path:[...W.path,"allOf",0]}),K=R(J.right,Y,{...W,path:[...W.path,"allOf",1]}),A=(H)=>("allOf"in H)&&Object.keys(H).length===1,w=[...A(G)?G.allOf:[G],...A(K)?K.allOf:[K]];X.allOf=w};var r3=(Q,Y,X,W)=>{let J=X,G=Q._zod.def;if(J.type="object",Y.target==="draft-07"||Y.target==="draft-2020-12")J.propertyNames=R(G.keyType,Y,{...W,path:[...W.path,"propertyNames"]});J.additionalProperties=R(G.valueType,Y,{...W,path:[...W.path,"additionalProperties"]})},p3=(Q,Y,X,W)=>{let J=Q._zod.def,G=R(J.innerType,Y,W),K=Y.seen.get(Q);if(Y.target==="openapi-3.0")K.ref=J.innerType,X.nullable=!0;else X.anyOf=[G,{type:"null"}]},d3=(Q,Y,X,W)=>{let J=Q._zod.def;R(J.innerType,Y,W);let G=Y.seen.get(Q);G.ref=J.innerType},i3=(Q,Y,X,W)=>{let J=Q._zod.def;R(J.innerType,Y,W);let G=Y.seen.get(Q);G.ref=J.innerType,X.default=JSON.parse(JSON.stringify(J.defaultValue))},n3=(Q,Y,X,W)=>{let J=Q._zod.def;R(J.innerType,Y,W);let G=Y.seen.get(Q);if(G.ref=J.innerType,Y.io==="input")X._prefault=JSON.parse(JSON.stringify(J.defaultValue))},e3=(Q,Y,X,W)=>{let J=Q._zod.def;R(J.innerType,Y,W);let G=Y.seen.get(Q);G.ref=J.innerType;let K;try{K=J.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}X.default=K},t3=(Q,Y,X,W)=>{let J=Q._zod.def,G=Y.io==="input"?J.in._zod.def.type==="transform"?J.out:J.in:J.out;R(G,Y,W);let K=Y.seen.get(Q);K.ref=G},a3=(Q,Y,X,W)=>{let J=Q._zod.def;R(J.innerType,Y,W);let G=Y.seen.get(Q);G.ref=J.innerType,X.readOnly=!0};var s3=(Q,Y,X,W)=>{let J=Q._zod.def;R(J.innerType,Y,W);let G=Y.seen.get(Q);G.ref=J.innerType};var S9=L("ZodISODateTime",(Q,Y)=>{E0.init(Q,Y),F.init(Q,Y)});function Q4(Q){return I3(S9,Q)}var _9=L("ZodISODate",(Q,Y)=>{H0.init(Q,Y),F.init(Q,Y)});function Y4(Q){return M3(_9,Q)}var T9=L("ZodISOTime",(Q,Y)=>{N0.init(Q,Y),F.init(Q,Y)});function X4(Q){return D3(T9,Q)}var b9=L("ZodISODuration",(Q,Y)=>{B0.init(Q,Y),F.init(Q,Y)});function W4(Q){return V3(b9,Q)}var J4=(Q,Y)=>{VQ.init(Q,Y),Q.name="ZodError",Object.defineProperties(Q,{format:{value:(X)=>rY(Q,X)},flatten:{value:(X)=>lY(Q,X)},addIssue:{value:(X)=>{Q.issues.push(X),Q.message=JSON.stringify(Q.issues,t,2)}},addIssues:{value:(X)=>{Q.issues.push(...X),Q.message=JSON.stringify(Q.issues,t,2)}},isEmpty:{get(){return Q.issues.length===0}}})},G6=L("ZodError",J4),b=L("ZodError",J4,{Parent:Error});var G4=FQ(b),K4=UQ(b),A4=wQ(b),L4=EQ(b),w4=iY(b),E4=nY(b),H4=eY(b),N4=tY(b),B4=aY(b),z4=sY(b),O4=Q1(b),q4=Y1(b);var $=L("ZodType",(Q,Y)=>{return D.init(Q,Y),Object.assign(Q["~standard"],{jsonSchema:{input:zQ(Q,"input"),output:zQ(Q,"output")}}),Q.toJSONSchema=Z3(Q,{}),Q.def=Y,Q.type=Y.type,Object.defineProperty(Q,"_def",{value:Y}),Q.check=(...X)=>{return Q.clone(I.mergeDefs(Y,{checks:[...Y.checks??[],...X.map((W)=>typeof W==="function"?{_zod:{check:W,def:{check:"custom"},onattach:[]}}:W)]}))},Q.clone=(X,W)=>Z(Q,X,W),Q.brand=()=>Q,Q.register=(X,W)=>{return X.add(Q,W),Q},Q.parse=(X,W)=>G4(Q,X,W,{callee:Q.parse}),Q.safeParse=(X,W)=>A4(Q,X,W),Q.parseAsync=async(X,W)=>K4(Q,X,W,{callee:Q.parseAsync}),Q.safeParseAsync=async(X,W)=>L4(Q,X,W),Q.spa=Q.safeParseAsync,Q.encode=(X,W)=>w4(Q,X,W),Q.decode=(X,W)=>E4(Q,X,W),Q.encodeAsync=async(X,W)=>H4(Q,X,W),Q.decodeAsync=async(X,W)=>N4(Q,X,W),Q.safeEncode=(X,W)=>B4(Q,X,W),Q.safeDecode=(X,W)=>z4(Q,X,W),Q.safeEncodeAsync=async(X,W)=>O4(Q,X,W),Q.safeDecodeAsync=async(X,W)=>q4(Q,X,W),Q.refine=(X,W)=>Q.check(PX(X,W)),Q.superRefine=(X)=>Q.check(RX(X)),Q.overwrite=(X)=>Q.check(r(X)),Q.optional=()=>D4(Q),Q.nullable=()=>V4(Q),Q.nullish=()=>D4(V4(Q)),Q.nonoptional=(X)=>IX(Q,X),Q.array=()=>c(Q),Q.or=(X)=>p([Q,X]),Q.and=(X)=>KX(Q,X),Q.transform=(X)=>F4(Q,HX(X)),Q.default=(X)=>zX(Q,X),Q.prefault=(X)=>qX(Q,X),Q.catch=(X)=>DX(Q,X),Q.pipe=(X)=>F4(Q,X),Q.readonly=()=>UX(Q),Q.describe=(X)=>{let W=Q.clone();return d.add(W,{description:X}),W},Object.defineProperty(Q,"description",{get(){return d.get(Q)?.description},configurable:!0}),Q.meta=(...X)=>{if(X.length===0)return d.get(Q);let W=Q.clone();return d.add(W,X[0]),W},Q.isOptional=()=>Q.safeParse(void 0).success,Q.isNullable=()=>Q.safeParse(null).success,Q}),U4=L("_ZodString",(Q,Y)=>{SQ.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(W,J,G)=>j3(Q,W,J,G);let X=Q._zod.bag;Q.format=X.format??null,Q.minLength=X.minimum??null,Q.maxLength=X.maximum??null,Q.regex=(...W)=>Q.check(sQ(...W)),Q.includes=(...W)=>Q.check(XY(...W)),Q.startsWith=(...W)=>Q.check(WY(...W)),Q.endsWith=(...W)=>Q.check(JY(...W)),Q.min=(...W)=>Q.check(s(...W)),Q.max=(...W)=>Q.check(ZQ(...W)),Q.length=(...W)=>Q.check(jQ(...W)),Q.nonempty=(...W)=>Q.check(s(1,...W)),Q.lowercase=(W)=>Q.check(QY(W)),Q.uppercase=(W)=>Q.check(YY(W)),Q.trim=()=>Q.check(KY()),Q.normalize=(...W)=>Q.check(GY(...W)),Q.toLowerCase=()=>Q.check(AY()),Q.toUpperCase=()=>Q.check(LY()),Q.slugify=()=>Q.check(wY())}),k9=L("ZodString",(Q,Y)=>{SQ.init(Q,Y),U4.init(Q,Y),Q.email=(X)=>Q.check(e0(v9,X)),Q.url=(X)=>Q.check(Y3(g9,X)),Q.jwt=(X)=>Q.check(q3(e9,X)),Q.emoji=(X)=>Q.check(X3(h9,X)),Q.guid=(X)=>Q.check(aQ(I4,X)),Q.uuid=(X)=>Q.check(t0(kQ,X)),Q.uuidv4=(X)=>Q.check(a0(kQ,X)),Q.uuidv6=(X)=>Q.check(s0(kQ,X)),Q.uuidv7=(X)=>Q.check(Q3(kQ,X)),Q.nanoid=(X)=>Q.check(W3(x9,X)),Q.guid=(X)=>Q.check(aQ(I4,X)),Q.cuid=(X)=>Q.check(J3(u9,X)),Q.cuid2=(X)=>Q.check(G3(y9,X)),Q.ulid=(X)=>Q.check(K3(c9,X)),Q.base64=(X)=>Q.check(B3(d9,X)),Q.base64url=(X)=>Q.check(z3(i9,X)),Q.xid=(X)=>Q.check(A3(m9,X)),Q.ksuid=(X)=>Q.check(L3(f9,X)),Q.ipv4=(X)=>Q.check(w3(o9,X)),Q.ipv6=(X)=>Q.check(E3(l9,X)),Q.cidrv4=(X)=>Q.check(H3(r9,X)),Q.cidrv6=(X)=>Q.check(N3(p9,X)),Q.e164=(X)=>Q.check(O3(n9,X)),Q.datetime=(X)=>Q.check(Q4(X)),Q.date=(X)=>Q.check(Y4(X)),Q.time=(X)=>Q.check(X4(X)),Q.duration=(X)=>Q.check(W4(X))});function P(Q){return n0(k9,Q)}var F=L("ZodStringFormat",(Q,Y)=>{V.init(Q,Y),U4.init(Q,Y)}),v9=L("ZodEmail",(Q,Y)=>{Y0.init(Q,Y),F.init(Q,Y)});var I4=L("ZodGUID",(Q,Y)=>{s1.init(Q,Y),F.init(Q,Y)});var kQ=L("ZodUUID",(Q,Y)=>{Q0.init(Q,Y),F.init(Q,Y)});var g9=L("ZodURL",(Q,Y)=>{X0.init(Q,Y),F.init(Q,Y)});var h9=L("ZodEmoji",(Q,Y)=>{W0.init(Q,Y),F.init(Q,Y)});var x9=L("ZodNanoID",(Q,Y)=>{J0.init(Q,Y),F.init(Q,Y)});var u9=L("ZodCUID",(Q,Y)=>{G0.init(Q,Y),F.init(Q,Y)});var y9=L("ZodCUID2",(Q,Y)=>{K0.init(Q,Y),F.init(Q,Y)});var c9=L("ZodULID",(Q,Y)=>{A0.init(Q,Y),F.init(Q,Y)});var m9=L("ZodXID",(Q,Y)=>{L0.init(Q,Y),F.init(Q,Y)});var f9=L("ZodKSUID",(Q,Y)=>{w0.init(Q,Y),F.init(Q,Y)});var o9=L("ZodIPv4",(Q,Y)=>{z0.init(Q,Y),F.init(Q,Y)});var l9=L("ZodIPv6",(Q,Y)=>{O0.init(Q,Y),F.init(Q,Y)});var r9=L("ZodCIDRv4",(Q,Y)=>{q0.init(Q,Y),F.init(Q,Y)});var p9=L("ZodCIDRv6",(Q,Y)=>{I0.init(Q,Y),F.init(Q,Y)});var d9=L("ZodBase64",(Q,Y)=>{D0.init(Q,Y),F.init(Q,Y)});var i9=L("ZodBase64URL",(Q,Y)=>{V0.init(Q,Y),F.init(Q,Y)});var n9=L("ZodE164",(Q,Y)=>{F0.init(Q,Y),F.init(Q,Y)});var e9=L("ZodJWT",(Q,Y)=>{U0.init(Q,Y),F.init(Q,Y)});var $4=L("ZodNumber",(Q,Y)=>{tQ.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(W,J,G)=>C3(Q,W,J,G),Q.gt=(W,J)=>Q.check(TQ(W,J)),Q.gte=(W,J)=>Q.check(BQ(W,J)),Q.min=(W,J)=>Q.check(BQ(W,J)),Q.lt=(W,J)=>Q.check(_Q(W,J)),Q.lte=(W,J)=>Q.check(NQ(W,J)),Q.max=(W,J)=>Q.check(NQ(W,J)),Q.int=(W)=>Q.check(M4(W)),Q.safe=(W)=>Q.check(M4(W)),Q.positive=(W)=>Q.check(TQ(0,W)),Q.nonnegative=(W)=>Q.check(BQ(0,W)),Q.negative=(W)=>Q.check(_Q(0,W)),Q.nonpositive=(W)=>Q.check(NQ(0,W)),Q.multipleOf=(W,J)=>Q.check(bQ(W,J)),Q.step=(W,J)=>Q.check(bQ(W,J)),Q.finite=()=>Q;let X=Q._zod.bag;Q.minValue=Math.max(X.minimum??Number.NEGATIVE_INFINITY,X.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,Q.maxValue=Math.min(X.maximum??Number.POSITIVE_INFINITY,X.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,Q.isInt=(X.format??"").includes("int")||Number.isSafeInteger(X.multipleOf??0.5),Q.isFinite=!0,Q.format=X.format??null});function C(Q){return F3($4,Q)}var t9=L("ZodNumberFormat",(Q,Y)=>{$0.init(Q,Y),$4.init(Q,Y)});function M4(Q){return U3(t9,Q)}var a9=L("ZodBoolean",(Q,Y)=>{P0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>k3(Q,X,W,J)});function y(Q){return $3(a9,Q)}var s9=L("ZodUndefined",(Q,Y)=>{R0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>v3(Q,X,W,J)});function P4(Q){return P3(s9,Q)}var QX=L("ZodUnknown",(Q,Y)=>{S0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>h3(Q,X,W,J)});function i(){return R3(QX)}var YX=L("ZodNever",(Q,Y)=>{_0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>g3(Q,X,W,J)});function XX(Q){return S3(YX,Q)}var WX=L("ZodArray",(Q,Y)=>{T0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>m3(Q,X,W,J),Q.element=Y.element,Q.min=(X,W)=>Q.check(s(X,W)),Q.nonempty=(X)=>Q.check(s(1,X)),Q.max=(X,W)=>Q.check(ZQ(X,W)),Q.length=(X,W)=>Q.check(jQ(X,W)),Q.unwrap=()=>Q.element});function c(Q,Y){return _3(WX,Q,Y)}var R4=L("ZodObject",(Q,Y)=>{j0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>f3(Q,X,W,J),I.defineLazy(Q,"shape",()=>{return Y.shape}),Q.keyof=()=>LX(Object.keys(Q._zod.def.shape)),Q.catchall=(X)=>Q.clone({...Q._zod.def,catchall:X}),Q.passthrough=()=>Q.clone({...Q._zod.def,catchall:i()}),Q.loose=()=>Q.clone({...Q._zod.def,catchall:i()}),Q.strict=()=>Q.clone({...Q._zod.def,catchall:XX()}),Q.strip=()=>Q.clone({...Q._zod.def,catchall:void 0}),Q.extend=(X)=>{return I.extend(Q,X)},Q.safeExtend=(X)=>{return I.safeExtend(Q,X)},Q.merge=(X)=>I.merge(Q,X),Q.pick=(X)=>I.pick(Q,X),Q.omit=(X)=>I.omit(Q,X),Q.partial=(...X)=>I.partial(S4,Q,X[0]),Q.required=(...X)=>I.required(_4,Q,X[0])});function z(Q,Y){let X={type:"object",shape:Q??{},...I.normalizeParams(Y)};return new R4(X)}function QQ(Q,Y){return new R4({type:"object",shape:Q,catchall:i(),...I.normalizeParams(Y)})}var JX=L("ZodUnion",(Q,Y)=>{C0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>o3(Q,X,W,J),Q.options=Y.options});function p(Q,Y){return new JX({type:"union",options:Q,...I.normalizeParams(Y)})}var GX=L("ZodIntersection",(Q,Y)=>{k0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>l3(Q,X,W,J)});function KX(Q,Y){return new GX({type:"intersection",left:Q,right:Y})}var AX=L("ZodRecord",(Q,Y)=>{v0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>r3(Q,X,W,J),Q.keyType=Y.keyType,Q.valueType=Y.valueType});function OQ(Q,Y,X){return new AX({type:"record",keyType:Q,valueType:Y,...I.normalizeParams(X)})}var BY=L("ZodEnum",(Q,Y)=>{g0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(W,J,G)=>x3(Q,W,J,G),Q.enum=Y.entries,Q.options=Object.values(Y.entries);let X=new Set(Object.keys(Y.entries));Q.extract=(W,J)=>{let G={};for(let K of W)if(X.has(K))G[K]=Y.entries[K];else throw Error(`Key ${K} not found in enum`);return new BY({...Y,checks:[],...I.normalizeParams(J),entries:G})},Q.exclude=(W,J)=>{let G={...Y.entries};for(let K of W)if(X.has(K))delete G[K];else throw Error(`Key ${K} not found in enum`);return new BY({...Y,checks:[],...I.normalizeParams(J),entries:G})}});function LX(Q,Y){let X=Array.isArray(Q)?Object.fromEntries(Q.map((W)=>[W,W])):Q;return new BY({type:"enum",entries:X,...I.normalizeParams(Y)})}var wX=L("ZodLiteral",(Q,Y)=>{h0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>u3(Q,X,W,J),Q.values=new Set(Y.values),Object.defineProperty(Q,"value",{get(){if(Y.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return Y.values[0]}})});function E(Q,Y){return new wX({type:"literal",values:Array.isArray(Q)?Q:[Q],...I.normalizeParams(Y)})}var EX=L("ZodTransform",(Q,Y)=>{x0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>c3(Q,X,W,J),Q._zod.parse=(X,W)=>{if(W.direction==="backward")throw new XQ(Q.constructor.name);X.addIssue=(G)=>{if(typeof G==="string")X.issues.push(I.issue(G,X.value,Y));else{let K=G;if(K.fatal)K.continue=!1;K.code??(K.code="custom"),K.input??(K.input=X.value),K.inst??(K.inst=Q),X.issues.push(I.issue(K))}};let J=Y.transform(X.value,X);if(J instanceof Promise)return J.then((G)=>{return X.value=G,X});return X.value=J,X}});function HX(Q){return new EX({type:"transform",transform:Q})}var S4=L("ZodOptional",(Q,Y)=>{u0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>s3(Q,X,W,J),Q.unwrap=()=>Q._zod.def.innerType});function D4(Q){return new S4({type:"optional",innerType:Q})}var NX=L("ZodNullable",(Q,Y)=>{y0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>p3(Q,X,W,J),Q.unwrap=()=>Q._zod.def.innerType});function V4(Q){return new NX({type:"nullable",innerType:Q})}var BX=L("ZodDefault",(Q,Y)=>{c0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>i3(Q,X,W,J),Q.unwrap=()=>Q._zod.def.innerType,Q.removeDefault=Q.unwrap});function zX(Q,Y){return new BX({type:"default",innerType:Q,get defaultValue(){return typeof Y==="function"?Y():I.shallowClone(Y)}})}var OX=L("ZodPrefault",(Q,Y)=>{m0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>n3(Q,X,W,J),Q.unwrap=()=>Q._zod.def.innerType});function qX(Q,Y){return new OX({type:"prefault",innerType:Q,get defaultValue(){return typeof Y==="function"?Y():I.shallowClone(Y)}})}var _4=L("ZodNonOptional",(Q,Y)=>{f0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>d3(Q,X,W,J),Q.unwrap=()=>Q._zod.def.innerType});function IX(Q,Y){return new _4({type:"nonoptional",innerType:Q,...I.normalizeParams(Y)})}var MX=L("ZodCatch",(Q,Y)=>{o0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>e3(Q,X,W,J),Q.unwrap=()=>Q._zod.def.innerType,Q.removeCatch=Q.unwrap});function DX(Q,Y){return new MX({type:"catch",innerType:Q,catchValue:typeof Y==="function"?Y:()=>Y})}var VX=L("ZodPipe",(Q,Y)=>{l0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>t3(Q,X,W,J),Q.in=Y.in,Q.out=Y.out});function F4(Q,Y){return new VX({type:"pipe",in:Q,out:Y})}var FX=L("ZodReadonly",(Q,Y)=>{r0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>a3(Q,X,W,J),Q.unwrap=()=>Q._zod.def.innerType});function UX(Q){return new FX({type:"readonly",innerType:Q})}var $X=L("ZodCustom",(Q,Y)=>{p0.init(Q,Y),$.init(Q,Y),Q._zod.processJSONSchema=(X,W,J)=>y3(Q,X,W,J)});function PX(Q,Y={}){return T3($X,Q,Y)}function RX(Q){return b3(Q)}import{ContentBlockSchema as SX,CallToolResultSchema as _X,ImplementationSchema as T4,RequestIdSchema as TX,ToolSchema as bX}from"@modelcontextprotocol/sdk/types.js";var b4=p([E("light"),E("dark")]).describe("Color theme preference for the host environment."),vQ=p([E("inline"),E("fullscreen"),E("pip")]).describe("Display mode for UI presentation."),ZX=p([E("--color-background-primary"),E("--color-background-secondary"),E("--color-background-tertiary"),E("--color-background-inverse"),E("--color-background-ghost"),E("--color-background-info"),E("--color-background-danger"),E("--color-background-success"),E("--color-background-warning"),E("--color-background-disabled"),E("--color-text-primary"),E("--color-text-secondary"),E("--color-text-tertiary"),E("--color-text-inverse"),E("--color-text-info"),E("--color-text-danger"),E("--color-text-success"),E("--color-text-warning"),E("--color-text-disabled"),E("--color-text-ghost"),E("--color-border-primary"),E("--color-border-secondary"),E("--color-border-tertiary"),E("--color-border-inverse"),E("--color-border-ghost"),E("--color-border-info"),E("--color-border-danger"),E("--color-border-success"),E("--color-border-warning"),E("--color-border-disabled"),E("--color-ring-primary"),E("--color-ring-secondary"),E("--color-ring-inverse"),E("--color-ring-info"),E("--color-ring-danger"),E("--color-ring-success"),E("--color-ring-warning"),E("--font-sans"),E("--font-mono"),E("--font-weight-normal"),E("--font-weight-medium"),E("--font-weight-semibold"),E("--font-weight-bold"),E("--font-text-xs-size"),E("--font-text-sm-size"),E("--font-text-md-size"),E("--font-text-lg-size"),E("--font-heading-xs-size"),E("--font-heading-sm-size"),E("--font-heading-md-size"),E("--font-heading-lg-size"),E("--font-heading-xl-size"),E("--font-heading-2xl-size"),E("--font-heading-3xl-size"),E("--font-text-xs-line-height"),E("--font-text-sm-line-height"),E("--font-text-md-line-height"),E("--font-text-lg-line-height"),E("--font-heading-xs-line-height"),E("--font-heading-sm-line-height"),E("--font-heading-md-line-height"),E("--font-heading-lg-line-height"),E("--font-heading-xl-line-height"),E("--font-heading-2xl-line-height"),E("--font-heading-3xl-line-height"),E("--border-radius-xs"),E("--border-radius-sm"),E("--border-radius-md"),E("--border-radius-lg"),E("--border-radius-xl"),E("--border-radius-full"),E("--border-width-regular"),E("--shadow-hairline"),E("--shadow-sm"),E("--shadow-md"),E("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),jX=OQ(ZX.describe(`Style variables for theming MCP apps.
23
23
 
24
24
  Individual style keys are optional - hosts may provide any subset of these values.
25
25
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
26
26
 
27
27
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
28
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),p([P(),P2()]).describe(`Style variables for theming MCP apps.
28
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),p([P(),P4()]).describe(`Style variables for theming MCP apps.
29
29
 
30
30
  Individual style keys are optional - hosts may provide any subset of these values.
31
31
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
@@ -37,6 +37,6 @@ Individual style keys are optional - hosts may provide any subset of these value
37
37
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
38
38
 
39
39
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
40
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),zY=z({method:E("ui/open-link"),params:z({url:P().describe("URL to open in the host's browser")})}),qY=QQ({isError:y().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}),OY=QQ({isError:y().optional().describe("True if the host rejected or failed to deliver the message.")}),IY=z({method:E("ui/notifications/sandbox-proxy-ready"),params:z({})}),j9=z({method:E("ui/notifications/sandbox-resource-ready"),params:z({html:P().describe("HTML content to load into the inner iframe."),sandbox:P().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:z({connectDomains:c(P()).optional().describe("Origins for network requests (fetch/XHR/WebSocket)."),resourceDomains:c(P()).optional().describe("Origins for static resources (scripts, images, styles, fonts).")}).optional().describe("CSP configuration from resource metadata.")})}),DY=z({method:E("ui/notifications/size-changed"),params:z({width:C().optional().describe("New width in pixels."),height:C().optional().describe("New height in pixels.")})}),MY=z({method:E("ui/notifications/tool-input"),params:z({arguments:qQ(P(),i().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),FY=z({method:E("ui/notifications/tool-input-partial"),params:z({arguments:qQ(P(),i().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),VY=z({method:E("ui/notifications/tool-cancelled"),params:z({reason:P().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),b2=z({variables:b9.optional().describe("CSS variables for theming the app.")}),UY=z({method:E("ui/resource-teardown"),params:z({})}),$Y=qQ(P(),i()),j2=z({experimental:z({}).optional().describe("Experimental features (structure TBD)."),openLinks:z({}).optional().describe("Host supports opening external URLs."),serverTools:z({listChanged:y().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:z({listChanged:y().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:z({}).optional().describe("Host accepts log messages.")}),C2=z({experimental:z({}).optional().describe("Experimental features (structure TBD)."),tools:z({listChanged:y().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call.")}),PY=z({method:E("ui/notifications/initialized"),params:z({}).optional()}),k2=z({connectDomains:c(P()).optional().describe("Origins for network requests (fetch/XHR/WebSocket)."),resourceDomains:c(P()).optional().describe("Origins for static resources (scripts, images, styles, fonts).")}),C9=z({csp:k2.optional().describe("Content Security Policy configuration."),domain:P().optional().describe("Dedicated origin for widget sandbox."),prefersBorder:y().optional().describe("Visual boundary preference - true if UI prefers a visible border.")}),gQ=z({method:E("ui/request-display-mode"),params:z({mode:vQ.describe("The display mode being requested.")})}),RY=QQ({mode:vQ.describe("The display mode that was actually set. May differ from requested if not supported.")}),v2=p([E("model"),E("app")]).describe("Tool visibility scope - who can access the tool."),k9=z({resourceUri:P(),visibility:c(v2).optional().describe(`Who can access this tool. Default: ["model", "app"]
40
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),zY=z({method:E("ui/open-link"),params:z({url:P().describe("URL to open in the host's browser")})}),OY=QQ({isError:y().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}),qY=QQ({isError:y().optional().describe("True if the host rejected or failed to deliver the message.")}),IY=z({method:E("ui/notifications/sandbox-proxy-ready"),params:z({})}),CX=z({method:E("ui/notifications/sandbox-resource-ready"),params:z({html:P().describe("HTML content to load into the inner iframe."),sandbox:P().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:z({connectDomains:c(P()).optional().describe("Origins for network requests (fetch/XHR/WebSocket)."),resourceDomains:c(P()).optional().describe("Origins for static resources (scripts, images, styles, fonts).")}).optional().describe("CSP configuration from resource metadata.")})}),MY=z({method:E("ui/notifications/size-changed"),params:z({width:C().optional().describe("New width in pixels."),height:C().optional().describe("New height in pixels.")})}),DY=z({method:E("ui/notifications/tool-input"),params:z({arguments:OQ(P(),i().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),VY=z({method:E("ui/notifications/tool-input-partial"),params:z({arguments:OQ(P(),i().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),FY=z({method:E("ui/notifications/tool-cancelled"),params:z({reason:P().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Z4=z({fonts:P().optional().describe("CSS for font loading (@font-face rules or")}),j4=z({variables:jX.optional().describe("CSS variables for theming the app."),css:Z4.optional().describe("CSS blocks that apps can inject.")}),UY=z({method:E("ui/resource-teardown"),params:z({})}),$Y=OQ(P(),i()),C4=z({experimental:z({}).optional().describe("Experimental features (structure TBD)."),openLinks:z({}).optional().describe("Host supports opening external URLs."),serverTools:z({listChanged:y().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:z({listChanged:y().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:z({}).optional().describe("Host accepts log messages.")}),k4=z({experimental:z({}).optional().describe("Experimental features (structure TBD)."),tools:z({listChanged:y().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call.")}),PY=z({method:E("ui/notifications/initialized"),params:z({}).optional()}),v4=z({connectDomains:c(P()).optional().describe("Origins for network requests (fetch/XHR/WebSocket)."),resourceDomains:c(P()).optional().describe("Origins for static resources (scripts, images, styles, fonts).")}),kX=z({csp:v4.optional().describe("Content Security Policy configuration."),domain:P().optional().describe("Dedicated origin for widget sandbox."),prefersBorder:y().optional().describe("Visual boundary preference - true if UI prefers a visible border.")}),gQ=z({method:E("ui/request-display-mode"),params:z({mode:vQ.describe("The display mode being requested.")})}),RY=QQ({mode:vQ.describe("The display mode that was actually set. May differ from requested if not supported.")}),g4=p([E("model"),E("app")]).describe("Tool visibility scope - who can access the tool."),vX=z({resourceUri:P(),visibility:c(g4).optional().describe(`Who can access this tool. Default: ["model", "app"]
41
41
  - "model": Tool visible to and callable by the agent
42
- - "app": Tool callable by the app from this server only`)}),SY=z({method:E("ui/message"),params:z({role:E("user").describe('Message role, currently only "user" is supported.'),content:c(R9).describe("Message content blocks (text, image, etc.).")})}),_Y=z({method:E("ui/notifications/tool-result"),params:S9.describe("Standard MCP tool execution result.")}),TY=QQ({toolInfo:z({id:_9.describe("JSON-RPC id of the tools/call request."),tool:T9.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:Z2.optional().describe("Current color theme preference."),styles:b2.optional().describe("Style configuration for theming the app."),displayMode:vQ.optional().describe("How the UI is currently displayed."),availableDisplayModes:c(P()).optional().describe("Display modes the host supports."),viewport:z({width:C().describe("Current viewport width in pixels."),height:C().describe("Current viewport height in pixels."),maxHeight:C().optional().describe("Maximum available height in pixels (if constrained)."),maxWidth:C().optional().describe("Maximum available width in pixels (if constrained).")}).optional().describe("Current and maximum dimensions available to the UI."),locale:P().optional().describe("User's language and region preference in BCP 47 format."),timeZone:P().optional().describe("User's timezone in IANA format."),userAgent:P().optional().describe("Host application identifier."),platform:p([E("web"),E("desktop"),E("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:z({touch:y().optional().describe("Whether the device supports touch input."),hover:y().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:z({top:C().describe("Top safe area inset in pixels."),right:C().describe("Right safe area inset in pixels."),bottom:C().describe("Bottom safe area inset in pixels."),left:C().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}),ZY=z({method:E("ui/notifications/host-context-changed"),params:TY.describe("Partial context update containing only changed fields.")}),bY=z({method:E("ui/initialize"),params:z({appInfo:T2.describe("App identification (name and version)."),appCapabilities:C2.describe("Features and capabilities this app provides."),protocolVersion:P().describe("Protocol version this app supports.")})}),jY=QQ({protocolVersion:P().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:T2.describe("Host application identification and version."),hostCapabilities:j2.describe("Features and capabilities provided by the host."),hostContext:TY.describe("Rich context about the host environment.")});import{Protocol as g9}from"@modelcontextprotocol/sdk/shared/protocol.js";import{CallToolRequestSchema as h9,CallToolResultSchema as x9,ListToolsRequestSchema as u9,PingRequestSchema as y9}from"@modelcontextprotocol/sdk/types.js";import{JSONRPCMessageSchema as v9}from"@modelcontextprotocol/sdk/types.js";class OQ{eventTarget;eventSource;messageListener;constructor(Q=window.parent,Y){this.eventTarget=Q;this.eventSource=Y;this.messageListener=(X)=>{if(Y&&X.source!==this.eventSource){console.error("Ignoring message from unknown source",X);return}let W=v9.safeParse(X.data);if(W.success)console.debug("Parsed message",W.data),this.onmessage?.(W.data);else console.error("Failed to parse message",W.error.message,X),this.onerror?.(Error("Invalid JSON-RPC message received: "+W.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(Q,Y){console.debug("Sending message",Q),this.eventTarget.postMessage(Q,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var CY="ui/resourceUri",c9="text/html;profile=mcp-app";class m9 extends g9{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;constructor(Q,Y={},X={autoResize:!0}){super(X);this._appInfo=Q;this._capabilities=Y;this.options=X;this.setRequestHandler(y9,(W)=>{return console.log("Received ping:",W.params),{}}),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(Q){this.setNotificationHandler(MY,(Y)=>Q(Y.params))}set ontoolinputpartial(Q){this.setNotificationHandler(FY,(Y)=>Q(Y.params))}set ontoolresult(Q){this.setNotificationHandler(_Y,(Y)=>Q(Y.params))}set ontoolcancelled(Q){this.setNotificationHandler(VY,(Y)=>Q(Y.params))}set onhostcontextchanged(Q){this.setNotificationHandler(ZY,(Y)=>{this._hostContext={...this._hostContext,...Y.params},Q(Y.params)})}set onteardown(Q){this.setRequestHandler(UY,(Y,X)=>Q(Y.params,X))}set oncalltool(Q){this.setRequestHandler(h9,(Y,X)=>Q(Y.params,X))}set onlisttools(Q){this.setRequestHandler(u9,(Y,X)=>Q(Y.params,X))}assertCapabilityForMethod(Q){}assertRequestHandlerCapability(Q){switch(Q){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${Q})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${Q} registered`)}}assertNotificationCapability(Q){}assertTaskCapability(Q){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(Q){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(Q,Y){return await this.request({method:"tools/call",params:Q},x9,Y)}sendMessage(Q,Y){return this.request({method:"ui/message",params:Q},OY,Y)}sendLog(Q){return this.notification({method:"notifications/message",params:Q})}openLink(Q,Y){return this.request({method:"ui/open-link",params:Q},qY,Y)}sendOpenLink=this.openLink;requestDisplayMode(Q,Y){return this.request({method:"ui/request-display-mode",params:Q},RY,Y)}sendSizeChanged(Q){return this.notification({method:"ui/notifications/size-changed",params:Q})}setupSizeChangedNotifications(){let Q=!1,Y=0,X=0,W=()=>{if(Q)return;Q=!0,requestAnimationFrame(()=>{Q=!1;let J=document.documentElement,K=J.style.width,A=J.style.height;J.style.width="fit-content",J.style.height="fit-content";let L=J.getBoundingClientRect();J.style.width=K,J.style.height=A;let H=window.innerWidth-J.clientWidth,N=Math.ceil(L.width+H),q=Math.ceil(L.height);if(N!==Y||q!==X)Y=N,X=q,this.sendSizeChanged({width:N,height:q})})};W();let G=new ResizeObserver(W);return G.observe(document.documentElement),G.observe(document.body),()=>G.disconnect()}async connect(Q=new OQ(window.parent),Y){await super.connect(Q);try{let X=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:n}},jY,Y);if(X===void 0)throw Error(`Server sent invalid initialize result: ${X}`);if(this._hostCapabilities=X.hostCapabilities,this._hostInfo=X.hostInfo,this._hostContext=X.hostContext,await this.notification({method:"ui/notifications/initialized"}),this.options?.autoResize)this.setupSizeChangedNotifications()}catch(X){throw this.close(),X}}}function mW(Q){let X=Q._meta?.ui?.resourceUri;if(X===void 0)X=Q._meta?.[CY];if(typeof X==="string"&&X.startsWith("ui://"))return X;else if(X!==void 0)throw Error(`Invalid UI resource URI: ${JSON.stringify(X)}`);return}var GX=[n];class JX extends WX{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;constructor(Q,Y,X,W){super(W);this._client=Q;this._hostInfo=Y;this._capabilities=X;this._hostContext=W?.hostContext||{},this.setRequestHandler(bY,(G)=>this._oninitialize(G)),this.setRequestHandler(t9,(G,J)=>{return this.onping?.(G.params,J),{}}),this.setRequestHandler(gQ,(G)=>{return{mode:this._hostContext.displayMode??"inline"}})}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;set onsizechange(Q){this.setNotificationHandler(DY,(Y)=>Q(Y.params))}set onsandboxready(Q){this.setNotificationHandler(IY,(Y)=>Q(Y.params))}set oninitialized(Q){this.setNotificationHandler(PY,(Y)=>Q(Y.params))}set onmessage(Q){this.setRequestHandler(SY,async(Y,X)=>{return Q(Y.params,X)})}set onopenlink(Q){this.setRequestHandler(zY,async(Y,X)=>{return Q(Y.params,X)})}set onrequestdisplaymode(Q){this.setRequestHandler(gQ,async(Y,X)=>{return Q(Y.params,X)})}set onloggingmessage(Q){this.setNotificationHandler(e9,async(Y)=>{Q(Y.params)})}set oncalltool(Q){this.setRequestHandler(f9,async(Y,X)=>{return Q(Y.params,X)})}sendToolListChanged(Q={}){return this.notification({method:"notifications/tools/list_changed",params:Q})}set onlistresources(Q){this.setRequestHandler(p9,async(Y,X)=>{return Q(Y.params,X)})}set onlistresourcetemplates(Q){this.setRequestHandler(i9,async(Y,X)=>{return Q(Y.params,X)})}set onreadresource(Q){this.setRequestHandler(s9,async(Y,X)=>{return Q(Y.params,X)})}sendResourceListChanged(Q={}){return this.notification({method:"notifications/resources/list_changed",params:Q})}set onlistprompts(Q){this.setRequestHandler(l9,async(Y,X)=>{return Q(Y.params,X)})}sendPromptListChanged(Q={}){return this.notification({method:"notifications/prompts/list_changed",params:Q})}assertCapabilityForMethod(Q){}assertRequestHandlerCapability(Q){}assertNotificationCapability(Q){}assertTaskCapability(Q){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(Q){throw Error("Task handlers are not supported in MCP Apps")}getCapabilities(){return this._capabilities}async _oninitialize(Q){let Y=Q.params.protocolVersion;return this._appCapabilities=Q.params.appCapabilities,this._appInfo=Q.params.appInfo,{protocolVersion:GX.includes(Y)?Y:n,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(Q){let Y={},X=!1;for(let W of Object.keys(Q)){let G=this._hostContext[W],J=Q[W];if(KX(G,J))continue;Y[W]=J,X=!0}if(X)this._hostContext=Q,this.sendHostContextChange(Y)}sendHostContextChange(Q){return this.notification({method:"ui/notifications/host-context-changed",params:Q})}sendToolInput(Q){return this.notification({method:"ui/notifications/tool-input",params:Q})}sendToolInputPartial(Q){return this.notification({method:"ui/notifications/tool-input-partial",params:Q})}sendToolResult(Q){return this.notification({method:"ui/notifications/tool-result",params:Q})}sendToolCancelled(Q){return this.notification({method:"ui/notifications/tool-cancelled",params:Q})}sendSandboxResourceReady(Q){return this.notification({method:"ui/notifications/sandbox-resource-ready",params:Q})}teardownResource(Q,Y){return this.request({method:"ui/resource-teardown",params:Q},$Y,Y)}sendResourceTeardown=this.teardownResource;async connect(Q){if(this._client){let Y=this._client.getServerCapabilities();if(!Y)throw Error("Client server capabilities not available");if(Y.tools){if(this.oncalltool=async(X,W)=>{return this._client.request({method:"tools/call",params:X},o9,{signal:W.signal})},Y.tools.listChanged)this._client.setNotificationHandler(XX,(X)=>this.sendToolListChanged(X.params))}if(Y.resources){if(this.onlistresources=async(X,W)=>{return this._client.request({method:"resources/list",params:X},d9,{signal:W.signal})},this.onlistresourcetemplates=async(X,W)=>{return this._client.request({method:"resources/templates/list",params:X},n9,{signal:W.signal})},this.onreadresource=async(X,W)=>{return this._client.request({method:"resources/read",params:X},QX,{signal:W.signal})},Y.resources.listChanged)this._client.setNotificationHandler(YX,(X)=>this.sendResourceListChanged(X.params))}if(Y.prompts){if(this.onlistprompts=async(X,W)=>{return this._client.request({method:"prompts/list",params:X},r9,{signal:W.signal})},Y.prompts.listChanged)this._client.setNotificationHandler(a9,(X)=>this.sendPromptListChanged(X.params))}}return super.connect(Q)}}function KX(Q,Y){return JSON.stringify(Q)===JSON.stringify(Y)}export{mW as getToolUiResourceUri,GX as SUPPORTED_PROTOCOL_VERSIONS,CY as RESOURCE_URI_META_KEY,c9 as RESOURCE_MIME_TYPE,OQ as PostMessageTransport,v2 as McpUiToolVisibilitySchema,_Y as McpUiToolResultNotificationSchema,k9 as McpUiToolMetaSchema,FY as McpUiToolInputPartialNotificationSchema,MY as McpUiToolInputNotificationSchema,VY as McpUiToolCancelledNotificationSchema,Z2 as McpUiThemeSchema,DY as McpUiSizeChangedNotificationSchema,j9 as McpUiSandboxResourceReadyNotificationSchema,IY as McpUiSandboxProxyReadyNotificationSchema,$Y as McpUiResourceTeardownResultSchema,UY as McpUiResourceTeardownRequestSchema,C9 as McpUiResourceMetaSchema,k2 as McpUiResourceCspSchema,RY as McpUiRequestDisplayModeResultSchema,gQ as McpUiRequestDisplayModeRequestSchema,qY as McpUiOpenLinkResultSchema,zY as McpUiOpenLinkRequestSchema,OY as McpUiMessageResultSchema,SY as McpUiMessageRequestSchema,PY as McpUiInitializedNotificationSchema,jY as McpUiInitializeResultSchema,bY as McpUiInitializeRequestSchema,b2 as McpUiHostStylesSchema,TY as McpUiHostContextSchema,ZY as McpUiHostContextChangedNotificationSchema,j2 as McpUiHostCapabilitiesSchema,vQ as McpUiDisplayModeSchema,C2 as McpUiAppCapabilitiesSchema,n as LATEST_PROTOCOL_VERSION,JX as AppBridge};
42
+ - "app": Tool callable by the app from this server only`)}),SY=z({method:E("ui/message"),params:z({role:E("user").describe('Message role, currently only "user" is supported.'),content:c(SX).describe("Message content blocks (text, image, etc.).")})}),_Y=z({method:E("ui/notifications/tool-result"),params:_X.describe("Standard MCP tool execution result.")}),TY=QQ({toolInfo:z({id:TX.describe("JSON-RPC id of the tools/call request."),tool:bX.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:b4.optional().describe("Current color theme preference."),styles:j4.optional().describe("Style configuration for theming the app."),displayMode:vQ.optional().describe("How the UI is currently displayed."),availableDisplayModes:c(P()).optional().describe("Display modes the host supports."),viewport:z({width:C().describe("Current viewport width in pixels."),height:C().describe("Current viewport height in pixels."),maxHeight:C().optional().describe("Maximum available height in pixels (if constrained)."),maxWidth:C().optional().describe("Maximum available width in pixels (if constrained).")}).optional().describe("Current and maximum dimensions available to the UI."),locale:P().optional().describe("User's language and region preference in BCP 47 format."),timeZone:P().optional().describe("User's timezone in IANA format."),userAgent:P().optional().describe("Host application identifier."),platform:p([E("web"),E("desktop"),E("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:z({touch:y().optional().describe("Whether the device supports touch input."),hover:y().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:z({top:C().describe("Top safe area inset in pixels."),right:C().describe("Right safe area inset in pixels."),bottom:C().describe("Bottom safe area inset in pixels."),left:C().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}),bY=z({method:E("ui/notifications/host-context-changed"),params:TY.describe("Partial context update containing only changed fields.")}),ZY=z({method:E("ui/initialize"),params:z({appInfo:T4.describe("App identification (name and version)."),appCapabilities:k4.describe("Features and capabilities this app provides."),protocolVersion:P().describe("Protocol version this app supports.")})}),jY=QQ({protocolVersion:P().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:T4.describe("Host application identification and version."),hostCapabilities:C4.describe("Features and capabilities provided by the host."),hostContext:TY.describe("Rich context about the host environment.")});import{Protocol as hX}from"@modelcontextprotocol/sdk/shared/protocol.js";import{CallToolRequestSchema as xX,CallToolResultSchema as uX,ListToolsRequestSchema as yX,PingRequestSchema as cX}from"@modelcontextprotocol/sdk/types.js";import{JSONRPCMessageSchema as gX}from"@modelcontextprotocol/sdk/types.js";class qQ{eventTarget;eventSource;messageListener;constructor(Q=window.parent,Y){this.eventTarget=Q;this.eventSource=Y;this.messageListener=(X)=>{if(Y&&X.source!==this.eventSource){console.error("Ignoring message from unknown source",X);return}let W=gX.safeParse(X.data);if(W.success)console.debug("Parsed message",W.data),this.onmessage?.(W.data);else console.error("Failed to parse message",W.error.message,X),this.onerror?.(Error("Invalid JSON-RPC message received: "+W.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(Q,Y){console.debug("Sending message",Q),this.eventTarget.postMessage(Q,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var CY="ui/resourceUri",mX="text/html;profile=mcp-app";class fX extends hX{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;constructor(Q,Y={},X={autoResize:!0}){super(X);this._appInfo=Q;this._capabilities=Y;this.options=X;this.setRequestHandler(cX,(W)=>{return console.log("Received ping:",W.params),{}}),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(Q){this.setNotificationHandler(DY,(Y)=>Q(Y.params))}set ontoolinputpartial(Q){this.setNotificationHandler(VY,(Y)=>Q(Y.params))}set ontoolresult(Q){this.setNotificationHandler(_Y,(Y)=>Q(Y.params))}set ontoolcancelled(Q){this.setNotificationHandler(FY,(Y)=>Q(Y.params))}set onhostcontextchanged(Q){this.setNotificationHandler(bY,(Y)=>{this._hostContext={...this._hostContext,...Y.params},Q(Y.params)})}set onteardown(Q){this.setRequestHandler(UY,(Y,X)=>Q(Y.params,X))}set oncalltool(Q){this.setRequestHandler(xX,(Y,X)=>Q(Y.params,X))}set onlisttools(Q){this.setRequestHandler(yX,(Y,X)=>Q(Y.params,X))}assertCapabilityForMethod(Q){}assertRequestHandlerCapability(Q){switch(Q){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${Q})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${Q} registered`)}}assertNotificationCapability(Q){}assertTaskCapability(Q){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(Q){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(Q,Y){return await this.request({method:"tools/call",params:Q},uX,Y)}sendMessage(Q,Y){return this.request({method:"ui/message",params:Q},qY,Y)}sendLog(Q){return this.notification({method:"notifications/message",params:Q})}openLink(Q,Y){return this.request({method:"ui/open-link",params:Q},OY,Y)}sendOpenLink=this.openLink;requestDisplayMode(Q,Y){return this.request({method:"ui/request-display-mode",params:Q},RY,Y)}sendSizeChanged(Q){return this.notification({method:"ui/notifications/size-changed",params:Q})}setupSizeChangedNotifications(){let Q=!1,Y=0,X=0,W=()=>{if(Q)return;Q=!0,requestAnimationFrame(()=>{Q=!1;let G=document.documentElement,K=G.style.width,A=G.style.height;G.style.width="fit-content",G.style.height="fit-content";let w=G.getBoundingClientRect();G.style.width=K,G.style.height=A;let H=window.innerWidth-G.clientWidth,N=Math.ceil(w.width+H),O=Math.ceil(w.height);if(N!==Y||O!==X)Y=N,X=O,this.sendSizeChanged({width:N,height:O})})};W();let J=new ResizeObserver(W);return J.observe(document.documentElement),J.observe(document.body),()=>J.disconnect()}async connect(Q=new qQ(window.parent),Y){await super.connect(Q);try{let X=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:n}},jY,Y);if(X===void 0)throw Error(`Server sent invalid initialize result: ${X}`);if(this._hostCapabilities=X.hostCapabilities,this._hostInfo=X.hostInfo,this._hostContext=X.hostContext,await this.notification({method:"ui/notifications/initialized"}),this.options?.autoResize)this.setupSizeChangedNotifications()}catch(X){throw this.close(),X}}}function oW(Q){let X=Q._meta?.ui?.resourceUri;if(X===void 0)X=Q._meta?.[CY];if(typeof X==="string"&&X.startsWith("ui://"))return X;else if(X!==void 0)throw Error(`Invalid UI resource URI: ${JSON.stringify(X)}`);return}var G2=[n];class K2 extends J2{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;constructor(Q,Y,X,W){super(W);this._client=Q;this._hostInfo=Y;this._capabilities=X;this._hostContext=W?.hostContext||{},this.setRequestHandler(ZY,(J)=>this._oninitialize(J)),this.setRequestHandler(aX,(J,G)=>{return this.onping?.(J.params,G),{}}),this.setRequestHandler(gQ,(J)=>{return{mode:this._hostContext.displayMode??"inline"}})}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;set onsizechange(Q){this.setNotificationHandler(MY,(Y)=>Q(Y.params))}set onsandboxready(Q){this.setNotificationHandler(IY,(Y)=>Q(Y.params))}set oninitialized(Q){this.setNotificationHandler(PY,(Y)=>Q(Y.params))}set onmessage(Q){this.setRequestHandler(SY,async(Y,X)=>{return Q(Y.params,X)})}set onopenlink(Q){this.setRequestHandler(zY,async(Y,X)=>{return Q(Y.params,X)})}set onrequestdisplaymode(Q){this.setRequestHandler(gQ,async(Y,X)=>{return Q(Y.params,X)})}set onloggingmessage(Q){this.setNotificationHandler(tX,async(Y)=>{Q(Y.params)})}set oncalltool(Q){this.setRequestHandler(oX,async(Y,X)=>{return Q(Y.params,X)})}sendToolListChanged(Q={}){return this.notification({method:"notifications/tools/list_changed",params:Q})}set onlistresources(Q){this.setRequestHandler(dX,async(Y,X)=>{return Q(Y.params,X)})}set onlistresourcetemplates(Q){this.setRequestHandler(nX,async(Y,X)=>{return Q(Y.params,X)})}set onreadresource(Q){this.setRequestHandler(Q2,async(Y,X)=>{return Q(Y.params,X)})}sendResourceListChanged(Q={}){return this.notification({method:"notifications/resources/list_changed",params:Q})}set onlistprompts(Q){this.setRequestHandler(rX,async(Y,X)=>{return Q(Y.params,X)})}sendPromptListChanged(Q={}){return this.notification({method:"notifications/prompts/list_changed",params:Q})}assertCapabilityForMethod(Q){}assertRequestHandlerCapability(Q){}assertNotificationCapability(Q){}assertTaskCapability(Q){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(Q){throw Error("Task handlers are not supported in MCP Apps")}getCapabilities(){return this._capabilities}async _oninitialize(Q){let Y=Q.params.protocolVersion;return this._appCapabilities=Q.params.appCapabilities,this._appInfo=Q.params.appInfo,{protocolVersion:G2.includes(Y)?Y:n,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(Q){let Y={},X=!1;for(let W of Object.keys(Q)){let J=this._hostContext[W],G=Q[W];if(A2(J,G))continue;Y[W]=G,X=!0}if(X)this._hostContext=Q,this.sendHostContextChange(Y)}sendHostContextChange(Q){return this.notification({method:"ui/notifications/host-context-changed",params:Q})}sendToolInput(Q){return this.notification({method:"ui/notifications/tool-input",params:Q})}sendToolInputPartial(Q){return this.notification({method:"ui/notifications/tool-input-partial",params:Q})}sendToolResult(Q){return this.notification({method:"ui/notifications/tool-result",params:Q})}sendToolCancelled(Q){return this.notification({method:"ui/notifications/tool-cancelled",params:Q})}sendSandboxResourceReady(Q){return this.notification({method:"ui/notifications/sandbox-resource-ready",params:Q})}teardownResource(Q,Y){return this.request({method:"ui/resource-teardown",params:Q},$Y,Y)}sendResourceTeardown=this.teardownResource;async connect(Q){if(this._client){let Y=this._client.getServerCapabilities();if(!Y)throw Error("Client server capabilities not available");if(Y.tools){if(this.oncalltool=async(X,W)=>{return this._client.request({method:"tools/call",params:X},lX,{signal:W.signal})},Y.tools.listChanged)this._client.setNotificationHandler(W2,(X)=>this.sendToolListChanged(X.params))}if(Y.resources){if(this.onlistresources=async(X,W)=>{return this._client.request({method:"resources/list",params:X},iX,{signal:W.signal})},this.onlistresourcetemplates=async(X,W)=>{return this._client.request({method:"resources/templates/list",params:X},eX,{signal:W.signal})},this.onreadresource=async(X,W)=>{return this._client.request({method:"resources/read",params:X},Y2,{signal:W.signal})},Y.resources.listChanged)this._client.setNotificationHandler(X2,(X)=>this.sendResourceListChanged(X.params))}if(Y.prompts){if(this.onlistprompts=async(X,W)=>{return this._client.request({method:"prompts/list",params:X},pX,{signal:W.signal})},Y.prompts.listChanged)this._client.setNotificationHandler(sX,(X)=>this.sendPromptListChanged(X.params))}}return super.connect(Q)}}function A2(Q,Y){return JSON.stringify(Q)===JSON.stringify(Y)}export{oW as getToolUiResourceUri,G2 as SUPPORTED_PROTOCOL_VERSIONS,CY as RESOURCE_URI_META_KEY,mX as RESOURCE_MIME_TYPE,qQ as PostMessageTransport,g4 as McpUiToolVisibilitySchema,_Y as McpUiToolResultNotificationSchema,vX as McpUiToolMetaSchema,VY as McpUiToolInputPartialNotificationSchema,DY as McpUiToolInputNotificationSchema,FY as McpUiToolCancelledNotificationSchema,b4 as McpUiThemeSchema,MY as McpUiSizeChangedNotificationSchema,CX as McpUiSandboxResourceReadyNotificationSchema,IY as McpUiSandboxProxyReadyNotificationSchema,$Y as McpUiResourceTeardownResultSchema,UY as McpUiResourceTeardownRequestSchema,kX as McpUiResourceMetaSchema,v4 as McpUiResourceCspSchema,RY as McpUiRequestDisplayModeResultSchema,gQ as McpUiRequestDisplayModeRequestSchema,OY as McpUiOpenLinkResultSchema,zY as McpUiOpenLinkRequestSchema,qY as McpUiMessageResultSchema,SY as McpUiMessageRequestSchema,PY as McpUiInitializedNotificationSchema,jY as McpUiInitializeResultSchema,ZY as McpUiInitializeRequestSchema,j4 as McpUiHostStylesSchema,Z4 as McpUiHostCssSchema,TY as McpUiHostContextSchema,bY as McpUiHostContextChangedNotificationSchema,C4 as McpUiHostCapabilitiesSchema,vQ as McpUiDisplayModeSchema,k4 as McpUiAppCapabilitiesSchema,n as LATEST_PROTOCOL_VERSION,K2 as AppBridge};
package/dist/src/app.d.ts CHANGED
@@ -5,7 +5,7 @@ import { McpUiAppCapabilities, McpUiHostCapabilities, McpUiHostContext, McpUiHos
5
5
  import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
6
6
  export { PostMessageTransport } from "./message-transport";
7
7
  export * from "./types";
8
- export { applyHostStyleVariables, getDocumentTheme, applyDocumentTheme, } from "./styles";
8
+ export { applyHostStyleVariables, applyHostFonts, getDocumentTheme, applyDocumentTheme, } from "./styles";
9
9
  /**
10
10
  * Metadata key for associating a resource URI with a tool call.
11
11
  *